<commit_before>package com.stulsoft.ysps.pmatch

/**
  * Created by <NAME> on 9/15/2016.
  */
object PMatch {
  def main(args: Array[String]): Unit = {
    var s = "123"
    var r = s match{
      case "12" | "123" => "The 123"
      case _ => "Other"
    }
    println(s"s=$s, r=$r")

    s = "789"
    r = s match{
      case "12" | "123" => "The 123"
      case _ => "Other"
    }
    println(s"s=$s, r=$r")
  }
}<commit_msg>match with if<commit_after>package com.stulsoft.ysps.pmatch

/**
  * Created by <NAME> on 9/15/2016.
  */
object PMatch {
  def main(args: Array[String]): Unit = {
    test1()
    test2()
    test3()
  }

  def test1(): Unit = {
    println("==>test1")
    var s = "123"
    var r = s match {
      case "12" | "123" => "The 123"
      case _ => "Other"
    }
    println(s"s=$s, r=$r")

    s = "789"
    r = s match {
      case "12" | "123" => "The 123"
      case _ => "Other"
    }
    println(s"s=$s, r=$r")
    println("<==test1")
  }

  def test2(): Unit = {
    println("==>test2")
    val t = "123";
    val r = t match {
      case "123" => 1
      case _ => 0
    }

    println(s"t=$t, r=$r")
    println("<==test2")
  }

  def test3(): Unit = {
    println("==>test3")
    var t = "123"
    var r = t match {
      case s if (s == "123" || s.startsWith("1")) => 1
      case _ => 0
    }
    println(s"t=$t, r=$r")

    t = "rtyrtyrty"
    r = t match {
      case s if (s == "123" || s.startsWith("1")) => 1
      case _ => 0
    }
    println(s"t=$t, r=$r")
    println("<==test3")
  }
}
{'fraction_non_alphanumeric': 0.20901371652514697, 'fraction_numerical': 0.06074461136512083, 'mean_word_length': 1.9461538461538461, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 22, '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': '4259282', 'n_tokens_mistral': 705, 'n_tokens_neox': 627, 'n_words': 154}