<commit_before>package org.bullecarree.improv.model;


public class ImprovRenderer {
    private Improv improv;
    private final String compared;
    private final String mixt;
    private final String unlimited;
    private final String categoryFree;
    
    public ImprovRenderer(String compared, String mixt, String unlimited, String categoryFree) {
        this.compared = compared;
        this.mixt = mixt;
        this.unlimited = unlimited;
        this.categoryFree = categoryFree;
    }
    
    public void setImprov(Improv improv) {
        this.improv = improv;
    }
    
    public String getTitle() {
        return improv.getTitle();
    }
    
    public String getType() {
        if (improv.getType() == ImprovType.COMPARED) {
            return this.compared;
        } else {
            return this.mixt;
        }
    }
    
    public String getCategory() {
        String res = improv.getCategory();
        if (res == null || "".equals(res)) {
            res = categoryFree;
        }
        return res;
    }
    
    public String getPlayerCount() {
        if (improv.getPlayerCount() == 0) {
            return this.unlimited;
        } else {
            return String.valueOf(improv.getPlayerCount());
        }
    }
    
    public String getDuration() {
        return displayTime(improv.getDuration());
    }
    
    public String displayTime(int duration) {
        StringBuffer res = new StringBuffer();
        int minutes = duration / 60;
        int seconds = duration % 60;
        
        if (minutes > 0) {
            res.append(minutes).append("m ");
        }
        res.append(seconds).append("s");
        return res.toString();
    }
    
}<commit_msg>fixed time display when there was no seconds<commit_after>package org.bullecarree.improv.model;


public class ImprovRenderer {
    private Improv improv;
    private final String compared;
    private final String mixt;
    private final String unlimited;
    private final String categoryFree;
    
    public ImprovRenderer(String compared, String mixt, String unlimited, String categoryFree) {
        this.compared = compared;
        this.mixt = mixt;
        this.unlimited = unlimited;
        this.categoryFree = categoryFree;
    }
    
    public void setImprov(Improv improv) {
        this.improv = improv;
    }
    
    public String getTitle() {
        return improv.getTitle();
    }
    
    public String getType() {
        if (improv.getType() == ImprovType.COMPARED) {
            return this.compared;
        } else {
            return this.mixt;
        }
    }
    
    public String getCategory() {
        String res = improv.getCategory();
        if (res == null || "".equals(res)) {
            res = categoryFree;
        }
        return res;
    }
    
    public String getPlayerCount() {
        if (improv.getPlayerCount() == 0) {
            return this.unlimited;
        } else {
            return String.valueOf(improv.getPlayerCount());
        }
    }
    
    public String getDuration() {
        return displayTime(improv.getDuration());
    }
    
    public String displayTime(int duration) {
        StringBuffer res = new StringBuffer();
        int minutes = duration / 60;
        int seconds = duration % 60;
        
        if (minutes > 0) {
            res.append(minutes).append("m ");
        }
        if (seconds > 0 && duration != 0) {
            res.append(seconds).append("s");
        }
        return res.toString();
    }
    
}
{'fraction_non_alphanumeric': 0.09831860929039613, 'fraction_numerical': 0.003989740666856654, 'mean_word_length': 1.8676470588235294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '7386716', 'n_tokens_mistral': 990, 'n_tokens_neox': 964, 'n_words': 244}