<commit_before>package scala.swing

abstract class SimpleSwingApplication extends SwingApplication {
  def top: Frame

  override def startup(args: Array[String]) {
    val t = top
    t.pack()
    t.visible = true
  }

  def resourceFromClassloader(path: String): java.net.URL =
    this.getClass.getResource(path)

  def resourceFromUserDirectory(path: String): java.io.File =
    new java.io.File(util.Properties.userDir, path)<commit_msg>Fixed #3219. No review.<commit_after>package scala.swing

abstract class SimpleSwingApplication extends SwingApplication {
  def top: Frame

  override def startup(args: Array[String]) {
    val t = top
    if (t.size == new Dimension(0,0)) t.pack()
    t.visible = true
  }

  def resourceFromClassloader(path: String): java.net.URL =
    this.getClass.getResource(path)

  def resourceFromUserDirectory(path: String): java.io.File =
    new java.io.File(util.Properties.userDir, path)
{'fraction_non_alphanumeric': 0.10668103448275862, 'fraction_numerical': 0.00646551724137931, 'mean_word_length': 4.104395604395604, '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': '5038552', 'n_tokens_mistral': 293, 'n_tokens_neox': 285, 'n_words': 70}