<commit_before>import Haneke

public class PosterPlugin: UIContainerPlugin {
    private var poster = UIImageView(frame: CGRectZero)
    private var url: NSURL!
    
    required public init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    public init() {
        super.init(frame: CGRectZero)
        userInteractionEnabled = false
    }
    
    public override func wasInstalled() {
        guard let urlString = container!.options[posterUrl] as? String  else {
            removeFromSuperview()
            return
        }
        
        url = NSURL(string: urlString)!
        addConstraints()
    }
    
    public override func layoutSubviews() {
        super.layoutSubviews()
        poster.hnk_setImageFromURL(url)
    }
    
    private func addConstraints() {
        removeFromSuperview()
        container!.addSubviewMatchingConstraints(self)
        addSubviewMatchingConstraints(poster)
    }
}<commit_msg>PosterPlugin: Remove auto resizing mask convertion<commit_after>import Haneke

public class PosterPlugin: UIContainerPlugin {
    private var poster = UIImageView(frame: CGRectZero)
    private var url: NSURL!
    
    required public init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    public init() {
        super.init(frame: CGRectZero)
        translatesAutoresizingMaskIntoConstraints = false
        userInteractionEnabled = false
    }
    
    public override func layoutSubviews() {
        super.layoutSubviews()
        poster.hnk_setImageFromURL(url)
    }
    
    public override func wasInstalled() {
        guard let urlString = container!.options[posterUrl] as? String  else {
            removeFromSuperview()
            return
        }
        
        url = NSURL(string: urlString)!
        addConstraints()   
    }
    
    private func addConstraints() {
        container!.addMatchingConstraints(self)
        addSubviewMatchingConstraints(poster)
    }
}
{'fraction_non_alphanumeric': 0.07627538385339278, 'fraction_numerical': 0.0, 'mean_word_length': 2.46483704974271, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4547064', 'n_tokens_mistral': 563, 'n_tokens_neox': 557, 'n_words': 126}