<commit_before>
import Foundation
import UIKit


let kGrayLineColor: CGFloat = 0.88
let kLineThickness: CGFloat = 0.5


extension UIView {
    
    public var height: CGFloat {
    
        get {
            return self.frame.size.height
        }
    }
    
    public var width: CGFloat {
        
        get {
            return self.frame.size.width
        }
    }
    
    public func addDivider() {
    
        addDividerAtLocation(self.height - 1.0)
    }
    
    public func addDividerAtLocation(location: CGFloat, withEdgeInset insets:UIEdgeInsets) {
    
        let grayColor =  UIColor(white: kGrayLineColor, alpha: CGFloat(1.0))
    
        var rect = CGRectMake(0.0, location, self.width, 1.0)
    
        rect = UIEdgeInsetsInsetRect(rect, insets);
    
        let divider = UIView(frame: rect)
        divider.backgroundColor = grayColor
        addSubview(divider)
    }
    
    public func addDividerAtLocation(location: CGFloat) {
    
        let grayColor = UIColor(white: kGrayLineColor, alpha: 1.0)
        addDividerAtLocation(location, withColor:grayColor)
    }
    
    public func addDividerAtLocation(location: CGFloat, withColor color:UIColor) {
    
        let divider = UIView(frame:CGRectMake(0.0, location, self.width, kLineThickness))
    
        divider.backgroundColor = color
    
        addSubview(divider)
    }
<commit_msg>Added constraint to dividers to allow proper layout<commit_after>
import Foundation
import UIKit


let kGrayLineColor: CGFloat = 0.88
let kLineThickness: CGFloat = 0.5


extension UIView {
    
    public var height: CGFloat {
    
        get {
            return self.frame.size.height
        }
    }
    
    public var width: CGFloat {
        
        get {
            return self.frame.size.width
        }
    }
    
    public func addDivider() {
    
        addDividerAtLocation(self.height - 1.0)
    }
    
    public func addDividerAtLocation(location: CGFloat, withEdgeInset insets:UIEdgeInsets) {
    
        let grayColor =  UIColor(white: kGrayLineColor, alpha: CGFloat(1.0))
    
        var rect = CGRectMake(0.0, location, self.width, 1.0)
    
        rect = UIEdgeInsetsInsetRect(rect, insets);
    
        let divider = UIView(frame: rect)
        divider.backgroundColor = grayColor
        addSubview(divider)
    }
    
    public func addDividerAtLocation(location: CGFloat) {
    
        let grayColor = UIColor(white: kGrayLineColor, alpha: 1.0)
        addDividerAtLocation(location, withColor:grayColor)
    }
    
    public func addDividerAtLocation(location: CGFloat, withColor color:UIColor) {
        
        let divider = UIView(frame:CGRectMake(0.0, location, self.width, kLineThickness))
    
        divider.backgroundColor = color
    
        addSubview(divider)
        
        let constraint = NSLayoutConstraint(item: divider, attribute: .Bottom, relatedBy: .Equal,
                                        toItem: self, attribute: .Bottom, multiplier: 1.0, constant: location)
        
        self.addConstraint(constraint)
    }

{'fraction_non_alphanumeric': 0.08011772400261609, 'fraction_numerical': 0.011772400261608895, 'mean_word_length': 2.150360453141092, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4928351', 'n_tokens_mistral': 972, 'n_tokens_neox': 943, 'n_words': 202}