<commit_before>//
//  StoryCell.swift
//  HackerNews
//
//  Created by <NAME> on 15/02/2015.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import UIKit

class StoryCell: UITableViewCell {
    
    @IBOutlet var storyTitleLabel: UILabel!;
    @IBOutlet var subtitleLabel: UILabel!;
    @IBOutlet var viewCommentsButton: ViewCommentsButton!;
    
    func updateWithStory(story: Story) {
        self.storyTitleLabel.text = story.title
        self.subtitleLabel.text = makeSubtitle(story)
        self.viewCommentsButton.setTitle("\(story.numberOfComments)", forState: .Normal)
        self.viewCommentsButton.key = String(story.id)
        
        if story.unread {
            self.storyTitleLabel.textColor = UIColor.blackColor()
            self.storyTitleLabel.font = UIFont.boldSystemFontOfSize(self.storyTitleLabel.font.pointSize)
        } else {
            self.storyTitleLabel.textColor = UIColor.darkGrayColor()
            self.storyTitleLabel.font = UIFont.systemFontOfSize(self.storyTitleLabel.font.pointSize)
        }
    }
    
    private func makeSubtitle(story:Story) -> String {
        return "\(story.points) points by \(story.by) \(story.timeAgo) ago"
    }
}<commit_msg>Time ago already includes the word 'ago' so removed the duplication<commit_after>//
//  StoryCell.swift
//  HackerNews
//
//  Created by <NAME> on 15/02/2015.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import UIKit

class StoryCell: UITableViewCell {
    
    @IBOutlet var storyTitleLabel: UILabel!;
    @IBOutlet var subtitleLabel: UILabel!;
    @IBOutlet var viewCommentsButton: ViewCommentsButton!;
    
    func updateWithStory(story: Story) {
        self.storyTitleLabel.text = story.title
        self.subtitleLabel.text = makeSubtitle(story)
        self.viewCommentsButton.setTitle("\(story.numberOfComments)", forState: .Normal)
        self.viewCommentsButton.key = String(story.id)
        
        if story.unread {
            self.storyTitleLabel.textColor = UIColor.blackColor()
            self.storyTitleLabel.font = UIFont.boldSystemFontOfSize(self.storyTitleLabel.font.pointSize)
        } else {
            self.storyTitleLabel.textColor = UIColor.darkGrayColor()
            self.storyTitleLabel.font = UIFont.systemFontOfSize(self.storyTitleLabel.font.pointSize)
        }
    }
    
    private func makeSubtitle(story:Story) -> String {
        return "\(story.points) points by \(story.by) \(story.timeAgo)"
    }
}
{'fraction_non_alphanumeric': 0.10885458976441917, 'fraction_numerical': 0.00974817221770918, 'mean_word_length': 2.8126934984520124, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '5364385', 'n_tokens_mistral': 790, 'n_tokens_neox': 749, 'n_words': 141}