<commit_before>package com.davebsoft.sctw.ui

import javax.swing.table.DefaultTableCellRenderer

/**
 * Renderer for the Age column
 * @author <NAME>
 */

class AgeCellRenderer extends DefaultTableCellRenderer {
  override def setValue(value: Any) {
    val time = value.asInstanceOf[Long]
    val days = time / 86400
    val hours = (time / 3600) - (days * 24)
    val mins = (time / 60) - (days * 1440) - (hours * 60)
    val seconds = time % 60
    val sb = new StringBuilder
    if (days > 0) sb.append(twoDigitNum(days)).append(":")
    if (hours > 0) sb.append(twoDigitNum(hours)).append(":")
    if (mins > 0) sb.append(twoDigitNum(mins)).append(":")
    sb.append(twoDigitNum(seconds))
    setText(sb.toString)
  }

  private def twoDigitNum(num: java.lang.Long): String = {
    String.format("%02d", num)
  }
  
}

<commit_msg>Don’t leave out parts of the time string because they are 0<commit_after>package com.davebsoft.sctw.ui

import javax.swing.table.DefaultTableCellRenderer

/**
 * Renderer for the Age column
 * @author <NAME>
 */

class AgeCellRenderer extends DefaultTableCellRenderer {
  override def setValue(value: Any) {
    val time = value.asInstanceOf[Long]
    val days = time / 86400
    val hours = (time / 3600) - (days * 24)
    val mins = (time / 60) - (days * 1440) - (hours * 60)
    val seconds = time % 60
    val sb = new StringBuilder
    if (days > 0) sb.append(twoDigitNum(days)).append(":")
    if (hours > 0 || sb.length > 0) sb.append(twoDigitNum(hours)).append(":")
    if (mins > 0 || sb.length > 0) sb.append(twoDigitNum(mins)).append(":")
    sb.append(twoDigitNum(seconds))
    setText(sb.toString)
  }

  private def twoDigitNum(num: java.lang.Long): String = {
    String.format("%02d", num)
  }
  
}


{'fraction_non_alphanumeric': 0.1432648401826484, 'fraction_numerical': 0.03139269406392694, 'mean_word_length': 3.3177339901477834, 'pattern_counts': {'":': 6, '<': 5, '<?xml version=': 0, '>': 13, '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': '7323008', 'n_tokens_mistral': 665, 'n_tokens_neox': 606, 'n_words': 153}