nus-yam/ex-repair huggingface dataset:
Program: 52677
Project: 52677
Buggy source:
@Test @Ignore("String_Node_Str") public void reduceOflazerAnalysisResult() throws IOException {
  Path inPath=DATA_PATH.resolve("String_Node_Str").resolve("String_Node_Str");
  List<String> lines=Files.readAllLines(inPath,StandardCharsets.UTF_8);
  Log.info("String_Node_Str");
  LinkedHashSet<String> accepted=new LinkedHashSet<>(lines.size() / 5);
  for (  String line : lines) {
    if (line.trim().length() == 0 || line.endsWith("String_Node_Str")) {
      continue;
    }
    accepted.add(line.trim());
  }
  sortAndSave(DATA_PATH.resolve("String_Node_Str").resolve("String_Node_Str"),new ArrayList<>(accepted));
}

Fixed version (ground truth):
@Test @Ignore("String_Node_Str") public void reduceOflazerAnalysisResult() throws IOException {
  Path inPath=DATA_PATH.resolve("String_Node_Str").resolve("String_Node_Str");
  List<String> lines=Files.readAllLines(inPath,StandardCharsets.UTF_8);
  Log.info("String_Node_Str");
  LinkedHashSet<String> accepted=new LinkedHashSet<>(lines.size() / 5);
  for (  String line : lines) {
    if (line.trim().length() == 0 || line.endsWith("String_Node_Str")) {
      continue;
    }
    accepted.add(line.trim());
  }
  save(DATA_PATH.resolve("String_Node_Str").resolve("String_Node_Str"),new ArrayList<>(accepted));
}
Program: 52679
Project: 52679
Buggy source:
@Test public void kimTest(){
  AnalysisTester tester=getTester("String_Node_Str");
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void kimTest(){
  AnalysisTester tester=getTester("String_Node_Str");
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
}
Program: 52680
Project: 52680
Buggy source:
@Test public void kimiTest(){
  AnalysisTester tester=getTester("String_Node_Str");
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectFail("String_Node_Str","String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test public void kimiTest(){
  AnalysisTester tester=getTester("String_Node_Str");
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectFail("String_Node_Str","String_Node_Str","String_Node_Str");
}
Program: 52683
Project: 52683
Buggy source:
public MorphemeState getRootState(DictionaryItem dictionaryItem,AttributeSet<PhoneticAttribute> phoneticAttributes){
  MorphemeState root=itemRootStateMap.get(dictionaryItem.id);
  if (root != null) {
    return root;
  }
  if (phoneticAttributes.contains(PhoneticAttribute.LastVowelDropped)) {
    return verbRoot_Prog_S;
  }
switch (dictionaryItem.primaryPos) {
case Noun:
    if (dictionaryItem.hasAttribute(RootAttribute.CompoundP3sgRoot)) {
      return nounCompoundRoot_S;
    }
 else {
      return noun_S;
    }
case Adjective:
case Numeral:
  return adj_ST;
case Pronoun:
switch (dictionaryItem.secondaryPos) {
case PersonalPron:
  return pronPers_S;
case DemonstrativePron:
return pronDemons_S;
case QuantitivePron:
return pronQuant_S;
case QuestionPron:
return pronQues_S;
case ReflexivePron:
return pronReflex_S;
default :
return pronQuant_S;
}
case Adverb:
return advRoot_ST;
case Conjunction:
return conjRoot_ST;
case Question:
return questionRoot_S;
case Interjection:
return interjRoot_ST;
case Verb:
return verbRoot_S;
case Punctuation:
return puncRoot_ST;
default :
return noun_S;
}
}

Fixed version (ground truth):
public MorphemeState getRootState(DictionaryItem dictionaryItem,AttributeSet<PhoneticAttribute> phoneticAttributes){
  MorphemeState root=itemRootStateMap.get(dictionaryItem.id);
  if (root != null) {
    return root;
  }
  if (phoneticAttributes.contains(PhoneticAttribute.LastLetterDropped)) {
    return verbRoot_Prog_S;
  }
switch (dictionaryItem.primaryPos) {
case Noun:
    if (dictionaryItem.hasAttribute(RootAttribute.CompoundP3sgRoot)) {
      return nounCompoundRoot_S;
    }
 else {
      return noun_S;
    }
case Adjective:
case Numeral:
  return adj_ST;
case Pronoun:
switch (dictionaryItem.secondaryPos) {
case PersonalPron:
  return pronPers_S;
case DemonstrativePron:
return pronDemons_S;
case QuantitivePron:
return pronQuant_S;
case QuestionPron:
return pronQues_S;
case ReflexivePron:
return pronReflex_S;
default :
return pronQuant_S;
}
case Adverb:
return advRoot_ST;
case Conjunction:
return conjRoot_ST;
case Question:
return questionRoot_S;
case Interjection:
return interjRoot_ST;
case Verb:
return verbRoot_S;
case Punctuation:
return puncRoot_ST;
default :
return noun_S;
}
}
Program: 52684
Project: 52684
Buggy source:
@Test public void lastVowelDropExceptionTest(){
  AnalysisTester t=getTester("String_Node_Str");
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectFail("String_Node_Str");
}

Fixed version (ground truth):
@Test public void lastVowelDropExceptionTest(){
  AnalysisTester t=getTester("String_Node_Str");
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectFail("String_Node_Str");
  t.expectFail("String_Node_Str");
  t=getTester("String_Node_Str");
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectAny("String_Node_Str",matchesTailLex("String_Node_Str"));
  t.expectFail("String_Node_Str");
  t.expectFail("String_Node_Str");
}
Program: 52686
Project: 52686
Buggy source:
private ParseResult(LinkedList<String> bestParse,float score){
  this.bestParse=bestParse;
  this.score=score;
}

Fixed version (ground truth):
private ParseResult(List<String> bestParse,float score){
  this.bestParse=bestParse;
  this.score=score;
}
Program: 52687
Project: 52687
Buggy source:
/** 
 * Calculates the best path using Viterbi decoding.
 * @param sentence sentece with ambiguous wrods.
 * @return best parse sequence and its score.
 */
ParseResult bestPath(SentenceData sentence){
  sentence.allWordAnalyses.add(WordData.SENTENCE_END);
  Hypothesis initialHypothesis=new Hypothesis("String_Node_Str","String_Node_Str",null,0);
  ActiveList currentList=new ActiveList();
  currentList.add(initialHypothesis);
  for (  WordData wordAnalysis : sentence.allWordAnalyses) {
    ActiveList nextList=new ActiveList();
    for (    String analysis : wordAnalysis.allParses) {
      for (      Hypothesis h : currentList) {
        String[] trigram={h.prev,h.current,analysis};
        IntValueMap<String> features=extractor.extractFromTrigram(trigram);
        float trigramScore=0;
        for (        String key : features) {
          trigramScore+=(model.data.get(key) * features.get(key));
        }
        Hypothesis newHyp=new Hypothesis(h.current,analysis,h,h.score + trigramScore);
        nextList.add(newHyp);
      }
    }
    currentList=nextList;
  }
  Hypothesis best=currentList.getBest();
  LinkedList<String> result=Lists.newLinkedList();
  while (best.previous != null) {
    result.addFirst(best.current);
    best=best.previous;
  }
  result.removeLast();
  return new ParseResult(result,best.score);
}

Fixed version (ground truth):
/** 
 * Calculates the best path using Viterbi decoding.
 * @param sentence sentece with ambiguous wrods.
 * @return best parse sequence and its score.
 */
ParseResult bestPath(SentenceData sentence){
  ActiveList currentList=new ActiveList();
  currentList.add(new Hypothesis("String_Node_Str","String_Node_Str",null,0));
  for (  WordData analysisData : sentence.allWordAnalyses) {
    ActiveList nextList=new ActiveList();
    for (    String analysis : analysisData.allAnalyses) {
      for (      Hypothesis h : currentList) {
        String[] trigram={h.prev,h.current,analysis};
        IntValueMap<String> features=extractor.extractFromTrigram(trigram);
        float trigramScore=0;
        for (        String key : features) {
          trigramScore+=(model.get(key) * features.get(key));
        }
        Hypothesis newHyp=new Hypothesis(h.current,analysis,h,h.score + trigramScore);
        nextList.add(newHyp);
      }
    }
    currentList=nextList;
  }
  for (  Hypothesis h : currentList) {
    String sentenceEnd="String_Node_Str";
    String[] trigram={h.prev,h.current,sentenceEnd};
    IntValueMap<String> features=extractor.extractFromTrigram(trigram);
    float trigramScore=0;
    for (    String key : features) {
      trigramScore+=(model.get(key) * features.get(key));
    }
    h.score+=trigramScore;
  }
  Hypothesis best=currentList.getBest();
  float bestScore=best.score;
  List<String> result=Lists.newArrayList();
  if (best.previous == null) {
    result.add(best.current);
    return new ParseResult(result,bestScore);
  }
  while (best.previous != null) {
    result.add(best.current);
    best=best.previous;
  }
  Collections.reverse(result);
  return new ParseResult(result,bestScore);
}
Program: 52688
Project: 52688
Buggy source:
private void updateModel(IntValueMap<String> correctFeatures,IntValueMap<String> bestFeatures,int numExamples){
  Set<String> keySet=Sets.newHashSet();
  keySet.addAll(correctFeatures.getKeyList());
  keySet.addAll(bestFeatures.getKeyList());
  for (  String feat : keySet) {
    updateAverageWeights(numExamples,feat);
    weights.increment(feat,(correctFeatures.get(feat) - bestFeatures.get(feat)));
    counts.put(feat,numExamples);
    if (averagedWeights.get(feat) == 0) {
      averagedWeights.data.remove(feat);
    }
    if (weights.get(feat) == 0) {
      weights.data.remove(feat);
    }
  }
}

Fixed version (ground truth):
private void updateModel(IntValueMap<String> correctFeatures,IntValueMap<String> bestFeatures,int numExamples){
  Set<String> keySet=Sets.newHashSet();
  keySet.addAll(correctFeatures.getKeyList());
  keySet.addAll(bestFeatures.getKeyList());
  for (  String feat : keySet) {
    updateAverageWeights(numExamples,feat);
    weights.increment(feat,(correctFeatures.get(feat) - bestFeatures.get(feat)));
    counts.put(feat,numExamples);
  }
}
Program: 52689
Project: 52689
Buggy source:
WordData(String line){
  int i=0;
  for (  String s : Splitter.on(WHITE_SPACE).omitEmptyStrings().trimResults().split(line)) {
    if (i == 0) {
      this.word=s;
    }
 else {
      allParses.add(s);
    }
    if (i == 1) {
      this.correctParse=s;
    }
    i++;
  }
}

Fixed version (ground truth):
WordData(String line){
  int i=0;
  for (  String s : Splitter.on(WHITE_SPACE).omitEmptyStrings().trimResults().split(line)) {
    if (i == 0) {
      this.word=s;
    }
 else {
      allAnalyses.add(s);
    }
    if (i == 1) {
      this.correctParse=s;
    }
    i++;
  }
}
Program: 52690
Project: 52690
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + word + '\''+ "String_Node_Str"+ correctParse+ '\''+ "String_Node_Str"+ allParses+ '}';
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + word + '\''+ "String_Node_Str"+ correctParse+ '\''+ "String_Node_Str"+ allAnalyses+ '}';
}
Program: 52691
Project: 52691
Buggy source:
SentenceData(List<WordData> allWordAnalyses){
  this.allWordAnalyses=allWordAnalyses;
  for (  WordData word : allWordAnalyses) {
    correctParse.add(word.correctParse);
  }
  for (  WordData word : allWordAnalyses) {
    allParse.add(word.allParses);
  }
}

Fixed version (ground truth):
SentenceData(List<WordData> allWordAnalyses){
  this.allWordAnalyses=allWordAnalyses;
  for (  WordData word : allWordAnalyses) {
    correctParse.add(word.correctParse);
  }
  for (  WordData word : allWordAnalyses) {
    allParse.add(word.allAnalyses);
  }
}
Program: 52693
Project: 52693
Buggy source:
public void test(File testFile) throws IOException {
  DataSet testSet=Files.readLines(testFile,Charsets.UTF_8,new DataSetLoader());
  System.out.println("String_Node_Str" + testSet.sentences.size());
  System.out.println("String_Node_Str" + testSet.tokenCount());
  int hit=0, total=0;
  Stopwatch sw=Stopwatch.createStarted();
  Random r=new Random(5);
  for (  SentenceData sentence : testSet.sentences) {
    for (    WordData word : sentence.allWordAnalyses) {
      Collections.shuffle(word.allParses,r);
    }
    Ambiguous[] seq=getAmbiguousSequence(sentence);
    int[] bestSeq=bestSequence(seq);
    int j=0;
    for (    int parseIndex : bestSeq) {
      WordData wordData=sentence.allWordAnalyses.get(j);
      if (wordData.allParses.get(parseIndex).equals(wordData.correctParse)) {
        hit++;
      }
 else {
      }
      total++;
      j++;
    }
  }
  System.out.println("String_Node_Str" + sw.elapsed(TimeUnit.MILLISECONDS) + "String_Node_Str");
  System.out.println("String_Node_Str" + total + "String_Node_Str"+ hit);
  System.out.println(String.format("String_Node_Str",(double)hit / total * 100));
  if (sw.elapsed(TimeUnit.MILLISECONDS) > 0) {
    System.out.println("String_Node_Str" + (1000L * total / sw.elapsed(TimeUnit.MILLISECONDS)) + "String_Node_Str");
  }
}

Fixed version (ground truth):
public void test(File testFile) throws IOException {
  DataSet testSet=Files.readLines(testFile,Charsets.UTF_8,new DataSetLoader());
  System.out.println("String_Node_Str" + testSet.sentences.size());
  System.out.println("String_Node_Str" + testSet.tokenCount());
  int hit=0, total=0;
  Stopwatch sw=Stopwatch.createStarted();
  Random r=new Random(5);
  for (  SentenceData sentence : testSet.sentences) {
    for (    WordData word : sentence.allWordAnalyses) {
      Collections.shuffle(word.allAnalyses,r);
    }
    Ambiguous[] seq=getAmbiguousSequence(sentence);
    int[] bestSeq=bestSequence(seq);
    int j=0;
    for (    int parseIndex : bestSeq) {
      WordData wordData=sentence.allWordAnalyses.get(j);
      if (wordData.allAnalyses.get(parseIndex).equals(wordData.correctParse)) {
        hit++;
      }
 else {
      }
      total++;
      j++;
    }
  }
  System.out.println("String_Node_Str" + sw.elapsed(TimeUnit.MILLISECONDS) + "String_Node_Str");
  System.out.println("String_Node_Str" + total + "String_Node_Str"+ hit);
  System.out.println(String.format("String_Node_Str",(double)hit / total * 100));
  if (sw.elapsed(TimeUnit.MILLISECONDS) > 0) {
    System.out.println("String_Node_Str" + (1000L * total / sw.elapsed(TimeUnit.MILLISECONDS)) + "String_Node_Str");
  }
}
Program: 52694
Project: 52694
Buggy source:
public Ambiguous[] getAmbiguousSequence(SentenceData sentence){
  Ambiguous[] awords=new Ambiguous[sentence.size() + 3];
  awords[0]=startWord;
  awords[1]=startWord;
  int i=2;
  for (  WordData word : sentence.allWordAnalyses) {
    int[] roots=new int[word.allParses.size()];
    int[][] igs=new int[word.allParses.size()][];
    int j=0;
    for (    String parseStr : word.allParses) {
      WordParse parse=new WordParse(parseStr);
      String rootPart=parse.root;
      roots[j]=rootLm.getVocabulary().indexOf(rootPart);
      if (parse.igs.size() == 0) {
        igs[j]=new int[]{-1};
      }
 else {
        igs[j]=new int[parse.igs.size()];
        for (int k=0; k < parse.igs.size(); k++) {
          igs[j][k]=igLm.getVocabulary().indexOf(parse.igs.get(k));
        }
      }
      j++;
    }
    awords[i]=new Ambiguous(roots,igs);
    i++;
  }
  awords[i]=endWord;
  return awords;
}

Fixed version (ground truth):
public Ambiguous[] getAmbiguousSequence(SentenceData sentence){
  Ambiguous[] awords=new Ambiguous[sentence.size() + 3];
  awords[0]=startWord;
  awords[1]=startWord;
  int i=2;
  for (  WordData word : sentence.allWordAnalyses) {
    int[] roots=new int[word.allAnalyses.size()];
    int[][] igs=new int[word.allAnalyses.size()][];
    int j=0;
    for (    String parseStr : word.allAnalyses) {
      WordParse parse=new WordParse(parseStr);
      String rootPart=parse.root;
      roots[j]=rootLm.getVocabulary().indexOf(rootPart);
      if (parse.igs.size() == 0) {
        igs[j]=new int[]{-1};
      }
 else {
        igs[j]=new int[parse.igs.size()];
        for (int k=0; k < parse.igs.size(); k++) {
          igs[j][k]=igLm.getVocabulary().indexOf(parse.igs.get(k));
        }
      }
      j++;
    }
    awords[i]=new Ambiguous(roots,igs);
    i++;
  }
  awords[i]=endWord;
  return awords;
}
Program: 52695
Project: 52695
Buggy source:
private void connectVerbs(){
  verb_S.addEmpty(vImp_S);
  vImp_S.addEmpty(vA2sg_ST);
  vImp_S.add(vA3sg_ST,"String_Node_Str");
  vImp_S.add(vA3pl_ST,"String_Node_Str");
  verb_S.add(vCausT_S,"String_Node_Str",has(PhoneticAttribute.LastLetterVowel).or(new Conditions.LastDerivationIs(vCausTR_S)).andNot(new Conditions.LastDerivationIs(vCausT_S)));
  verb_S.add(vCausTR_S,"String_Node_Str",has(PhoneticAttribute.LastLetterConsonant).andNot(new Conditions.LastDerivationIs(vCausTR_S)));
  vCausT_S.addEmpty(verb_S);
  vCausTR_S.addEmpty(verb_S);
  verb_Prog_S.add(vProgYor_S,"String_Node_Str");
  vProgYor_S.add(vA1sg_ST,"String_Node_Str");
  vProgYor_S.add(vA2sg_ST,"String_Node_Str");
  vProgYor_S.addEmpty(vA3sg_ST);
  vProgYor_S.add(vA1pl_ST,"String_Node_Str");
  vProgYor_S.add(vA3pl_ST,"String_Node_Str");
}

Fixed version (ground truth):
private void connectVerbs(){
  verb_S.addEmpty(vImp_S);
  vImp_S.addEmpty(vA2sg_ST);
  vImp_S.add(vA3sg_ST,"String_Node_Str");
  vImp_S.add(vA3pl_ST,"String_Node_Str");
  verb_S.add(vCausT_S,"String_Node_Str",has(PhoneticAttribute.LastLetterVowel).or(new Conditions.LastDerivationIs(vCausTR_S)).andNot(new Conditions.LastDerivationIs(vCausT_S)));
  verb_S.add(vCausTR_S,"String_Node_Str",has(PhoneticAttribute.LastLetterConsonant).andNot(new Conditions.LastDerivationIs(vCausTR_S)));
  vCausT_S.addEmpty(verb_S);
  vCausTR_S.addEmpty(verb_S);
  verb_S.add(vProgYor_S,"String_Node_Str",notHave(PhoneticAttribute.LastLetterVowel));
  verb_Prog_S.add(vProgYor_S,"String_Node_Str");
  vProgYor_S.add(vA1sg_ST,"String_Node_Str");
  vProgYor_S.add(vA2sg_ST,"String_Node_Str");
  vProgYor_S.addEmpty(vA3sg_ST);
  vProgYor_S.add(vA1pl_ST,"String_Node_Str");
  vProgYor_S.add(vA3pl_ST,"String_Node_Str");
}
Program: 52696
Project: 52696
Buggy source:
@Test public void progressive1Drop(){
  AnalysisTester tester=getTester("String_Node_Str");
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester=getTester("String_Node_Str");
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void progressive1Drop(){
  AnalysisTester tester=getTester("String_Node_Str");
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester=getTester("String_Node_Str");
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester=getTester("String_Node_Str");
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
}
Program: 52697
Project: 52697
Buggy source:
@Test public void progressive1(){
  AnalysisTester tester=getTester("String_Node_Str");
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void progressive1(){
  AnalysisTester tester=getTester("String_Node_Str");
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester=getTester("String_Node_Str");
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
  tester.expectSingle("String_Node_Str",matchesTailLex("String_Node_Str"));
}
Program: 52698
Project: 52698
Buggy source:
@Override public String toString(){
  return lexicalTransition.to.morpheme.id + "String_Node_Str" + (surface.isEmpty() ? "String_Node_Str" : surface);
}

Fixed version (ground truth):
@Override public String toString(){
  return lexicalTransition.to.id + "String_Node_Str" + (surface.isEmpty() ? "String_Node_Str" : surface);
}
Program: 52699
Project: 52699
Buggy source:
public boolean containsPhoneticExpectation(PhoneticExpectation expectation){
  return stemTransition.item.attributes.contains(expectation);
}

Fixed version (ground truth):
public boolean containsPhoneticExpectation(PhoneticExpectation expectation){
  return phoneticExpectations.contains(expectation);
}
Program: 52701
Project: 52701
Buggy source:
@Test public void implicitDative_1(){
  List<AnalysisResult> results=getAnalyzer("String_Node_Str").analyze("String_Node_Str");
  printResults(results);
  Assert.assertEquals(2,results.size());
  AnalysisResult first=results.get(1);
  Assert.assertEquals("String_Node_Str",first.getDictionaryItem().id);
  Assert.assertEquals("String_Node_Str",first.root);
  Assert.assertTrue(containsMorpheme(first,"String_Node_Str"));
}

Fixed version (ground truth):
@Test public void implicitDative_1(){
  String in="String_Node_Str";
  List<AnalysisResult> results=getAnalyzer("String_Node_Str").analyze(in);
  printAndSort(in,results);
  Assert.assertEquals(2,results.size());
  AnalysisResult first=results.get(0);
  Assert.assertEquals("String_Node_Str",first.getDictionaryItem().id);
  Assert.assertEquals("String_Node_Str",first.root);
  Assert.assertTrue(containsMorpheme(first,"String_Node_Str"));
}
Program: 52702
Project: 52702
Buggy source:
@Test public void shouldParse_1(){
  List<AnalysisResult> results=getAnalyzer("String_Node_Str").analyze("String_Node_Str");
  printResults(results);
  Assert.assertEquals(1,results.size());
  AnalysisResult first=results.get(0);
  Assert.assertEquals("String_Node_Str",first.getDictionaryItem().id);
  Assert.assertEquals("String_Node_Str",first.root);
  Assert.assertTrue(containsMorpheme(first,"String_Node_Str"));
}

Fixed version (ground truth):
@Test public void shouldParse_1(){
  String in="String_Node_Str";
  List<AnalysisResult> results=getAnalyzer("String_Node_Str").analyze(in);
  printAndSort(in,results);
  Assert.assertEquals(1,results.size());
  AnalysisResult first=results.get(0);
  Assert.assertEquals("String_Node_Str",first.getDictionaryItem().id);
  Assert.assertEquals("String_Node_Str",first.root);
  Assert.assertTrue(containsMorpheme(first,"String_Node_Str"));
}
Program: 52703
Project: 52703
Buggy source:
/** 
 * Returns string representation of node and all child nodes until leafs.
 * @param b     string buffer to append.
 * @param level level of the operation
 */
private void toDeepString(StringBuffer b,int level){
  char[] indentChars=new char[level * 2];
  for (int i=0; i < indentChars.length; i++)   indentChars[i]=' ';
  b.append(indentChars).append(this.toString());
  b.append("String_Node_Str");
  if (children_ != null) {
    for (    Node subNode : this.children_.getValues()) {
      if (subNode != null) {
        subNode.toDeepString(b,level + 1);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Returns string representation of node and all child nodes until leafs.
 * @param b     string buffer to append.
 * @param level level of the operation
 */
private void toDeepString(StringBuffer b,int level){
  char[] indentChars=new char[level * 2];
  for (int i=0; i < indentChars.length; i++)   indentChars[i]=' ';
  b.append(indentChars).append(this.toString());
  b.append("String_Node_Str");
  if (children != null) {
    for (    Node subNode : this.children.getValues()) {
      if (subNode != null) {
        subNode.toDeepString(b,level + 1);
      }
    }
  }
}
Program: 52704
Project: 52704
Buggy source:
public List<StemNode> getMatchingStems(String input){
  Node node=root;
  int i=0;
  List<StemNode> stems=new ArrayList<>();
  while (i < input.length()) {
    node=node.getChildNode(input.charAt(i));
    if (node == null) {
      break;
    }
    char[] fragment=node.fragment;
    int j=0;
    while (j < fragment.length && i < input.length() && fragment[j++] == input.charAt(i++))     ;
    if (i <= input.length() && node.hasStem()) {
      stems.addAll(node.stems);
    }
  }
  return stems;
}

Fixed version (ground truth):
public List<StemNode> getMatchingStems(String input){
  Node node=root;
  int i=0;
  List<StemNode> stems=new ArrayList<>();
  while (i < input.length()) {
    node=node.getChildNode(input.charAt(i));
    if (node == null) {
      break;
    }
    char[] fragment=node.fragment;
    int j=0;
    while (j < fragment.length && i < input.length() && fragment[j++] == input.charAt(i++))     ;
    if (j == fragment.length && i <= input.length() && node.hasStem()) {
      stems.addAll(node.stems);
    }
  }
  return stems;
}
Program: 52705
Project: 52705
Buggy source:
public Node getChildNode(char c){
  if (children_ == null)   return null;
  return children_.get(c);
}

Fixed version (ground truth):
public Node getChildNode(char c){
  if (children == null)   return null;
  return children.get(c);
}
Program: 52706
Project: 52706
Buggy source:
@Override public String toString(){
  String s=getFragment() + "String_Node_Str";
  if (children_ != null) {
    s+="String_Node_Str";
    for (    Node node : children_.getValues()) {
      if (node != null) {
        s+=node.getChar() + "String_Node_Str";
      }
    }
    s+="String_Node_Str";
  }
 else {
    s+="String_Node_Str";
  }
  if (stems != null) {
    for (    StemNode stem : stems) {
      s+="String_Node_Str" + stem.surfaceForm + "String_Node_Str";
    }
  }
  return s;
}

Fixed version (ground truth):
@Override public String toString(){
  String s=getFragment() + "String_Node_Str";
  if (children != null) {
    s+="String_Node_Str";
    for (    Node node : children.getValues()) {
      if (node != null) {
        s+=node.getChar() + "String_Node_Str";
      }
    }
    s+="String_Node_Str";
  }
 else {
    s+="String_Node_Str";
  }
  if (stems != null) {
    for (    StemNode stem : stems) {
      s+="String_Node_Str" + stem.surfaceForm + "String_Node_Str";
    }
  }
  return s;
}
Program: 52707
Project: 52707
Buggy source:
public void addChild(Node node){
  if (children_ == null) {
    children_=new IntMap<>(2);
  }
  children_.put(node.getChar(),node);
}

Fixed version (ground truth):
public void addChild(Node node){
  if (children == null) {
    children=new IntMap<>(2);
  }
  children.put(node.getChar(),node);
}
Program: 52708
Project: 52708
Buggy source:
private void checkNodesMatches(String prefix,List<StemNode> nodes){
  List<StemNode> stems=lt.getMatchingStems(prefix);
  for (  StemNode node : stems) {
    assertTrue("String_Node_Str" + node,stems.contains(node));
  }
}

Fixed version (ground truth):
private void checkNodesMatches(String prefix,List<StemNode> nodes){
  List<StemNode> stems=lt.getMatchingStems(prefix);
  for (  StemNode node : nodes) {
    assertTrue("String_Node_Str" + node,stems.contains(node));
  }
}
Program: 52709
Project: 52709
Buggy source:
@Test public void stemsForLongerInputs(){
  List<StemNode> nodes=createNodes("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  addStemNodes(nodes);
  System.out.println(lt);
  checkNodesExist(nodes);
  checkNodesMatches("String_Node_Str",createNodes());
  checkNodesMatches("String_Node_Str",createNodes("String_Node_Str"));
  checkNodesMatches("String_Node_Str",createNodes("String_Node_Str"));
  checkNodesMatches("String_Node_Str",createNodes("String_Node_Str","String_Node_Str"));
  checkNodesMatches("String_Node_Str",createNodes("String_Node_Str","String_Node_Str"));
  checkNodesMatches("String_Node_Str",createNodes("String_Node_Str","String_Node_Str","String_Node_Str"));
  checkNodesMatches("String_Node_Str",createNodes("String_Node_Str","String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Test public void stemsForLongerInputs(){
  List<StemNode> nodes=createNodes("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  addStemNodes(nodes);
  checkNodesExist(nodes);
  checkNodesMatches("String_Node_Str",createNodes());
  checkNodesMatches("String_Node_Str",createNodes("String_Node_Str"));
  checkNodesMatches("String_Node_Str",createNodes("String_Node_Str"));
  checkNodesMatches("String_Node_Str",createNodes("String_Node_Str","String_Node_Str"));
  checkNodesMatches("String_Node_Str",createNodes("String_Node_Str","String_Node_Str"));
  checkNodesMatches("String_Node_Str",createNodes("String_Node_Str","String_Node_Str","String_Node_Str"));
  checkNodesMatches("String_Node_Str",createNodes("String_Node_Str","String_Node_Str","String_Node_Str"));
}
Program: 52710
Project: 52710
Buggy source:
PosInfo getPosData(String posStr,String word){
  if (posStr == null) {
    return new PosInfo(inferPrimaryPos(word),inferSecondaryPos(word));
  }
 else {
    PrimaryPos primaryPos=null;
    SecondaryPos secondaryPos=null;
    for (    String s : Splitter.on("String_Node_Str").trimResults().split(posStr)) {
      if (PrimaryPos.converter().enumExists(s)) {
        if (primaryPos != null && !SecondaryPos.converter().enumExists(s))         throw new RuntimeException("String_Node_Str" + posStr);
 else         primaryPos=PrimaryPos.converter().getEnum(s);
      }
 else       if (SecondaryPos.converter().enumExists(s)) {
        if (secondaryPos != null && !PrimaryPos.converter().enumExists(s))         throw new RuntimeException("String_Node_Str" + posStr);
 else         secondaryPos=SecondaryPos.converter().getEnum(s);
      }
 else       throw new RuntimeException("String_Node_Str" + s + "String_Node_Str"+ posStr);
    }
    if (primaryPos == null) {
      primaryPos=inferPrimaryPos(word);
    }
    if (secondaryPos == null) {
      secondaryPos=inferSecondaryPos(word);
    }
    return new PosInfo(primaryPos,secondaryPos);
  }
}

Fixed version (ground truth):
PosInfo getPosData(String posStr,String word){
  if (posStr == null) {
    return new PosInfo(inferPrimaryPos(word),inferSecondaryPos(word));
  }
 else {
    PrimaryPos primaryPos=null;
    SecondaryPos secondaryPos=null;
    List<String> tokens=Splitter.on("String_Node_Str").trimResults().splitToList(posStr);
    if (tokens.size() > 2) {
      throw new RuntimeException("String_Node_Str" + posStr);
    }
    for (    String token : tokens) {
      if (!PrimaryPos.exists(token) && !SecondaryPos.exists(token)) {
        throw new RuntimeException("String_Node_Str" + token + "String_Node_Str"+ posStr);
      }
    }
    for (    String token : tokens) {
      if (PrimaryPos.exists(token)) {
        if (primaryPos == null) {
          primaryPos=PrimaryPos.converter().getEnum(token);
          continue;
        }
 else         if (!SecondaryPos.exists(token)) {
          throw new RuntimeException("String_Node_Str" + posStr);
        }
      }
      if (SecondaryPos.exists(token)) {
        if (secondaryPos == null) {
          secondaryPos=SecondaryPos.converter().getEnum(token);
        }
 else         if (!PrimaryPos.exists(token)) {
          throw new RuntimeException("String_Node_Str" + posStr);
        }
      }
    }
    if (primaryPos == null) {
      primaryPos=inferPrimaryPos(word);
    }
    if (secondaryPos == null) {
      secondaryPos=inferSecondaryPos(word);
    }
    return new PosInfo(primaryPos,secondaryPos);
  }
}
Program: 52711
Project: 52711
Buggy source:
private void removeStemNode(StemNode stemNode){
  final String surfaceForm=stemNode.surfaceForm;
  if (multiStems.containsKey(surfaceForm)) {
    multiStems.remove(surfaceForm,stemNode);
  }
 else   if (singleStems.containsKey(surfaceForm) && singleStems.get(surfaceForm).equals(stemNode)) {
    singleStems.remove(surfaceForm);
  }
  stemNodes.remove(stemNode);
}

Fixed version (ground truth):
private void removeStemNode(StemNode stemNode){
  final String surfaceForm=stemNode.surfaceForm;
  if (multiStems.containsKey(surfaceForm)) {
    multiStems.remove(surfaceForm,stemNode);
  }
 else   if (singleStems.containsKey(surfaceForm) && singleStems.get(surfaceForm).getDictionaryItem().equals(stemNode.dictionaryItem)) {
    singleStems.remove(surfaceForm);
  }
  stemNodes.remove(stemNode);
}
Program: 52712
Project: 52712
Buggy source:
public void run(TurkishWordParserGenerator parser) throws IOException {
  String input;
  System.out.println("String_Node_Str");
  Scanner sc=new Scanner(System.in);
  input=sc.nextLine();
  while (!input.equals("String_Node_Str") && !input.equals("String_Node_Str")) {
    List<MorphParse> tokens=parser.parse(input);
    if (tokens.size() == 0) {
      System.out.println("String_Node_Str");
      if (parser.getParser() instanceof WordParser) {
        ((WordParser)parser.getParser()).dump(input);
      }
    }
 else {
      tokens.forEach(this::printMorphParse);
    }
    input=sc.nextLine();
  }
}

Fixed version (ground truth):
public void run(TurkishWordParserGenerator parser) throws IOException {
  String input;
  System.out.println("String_Node_Str");
  Scanner sc=new Scanner(System.in);
  input=sc.nextLine();
  while (!input.equals("String_Node_Str") && !input.equals("String_Node_Str")) {
    List<MorphParse> tokens=parser.parse(input);
    if (tokens.size() == 0 || (tokens.size() == 1 && tokens.get(0).dictionaryItem.primaryPos == PrimaryPos.Unknown)) {
      System.out.println("String_Node_Str");
      if (parser.getParser() instanceof WordParser) {
        ((WordParser)parser.getParser()).dump(input);
      }
    }
 else {
      tokens.forEach(this::printMorphParse);
    }
    input=sc.nextLine();
  }
}
Program: 52713
Project: 52713
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  SuffixForm that=(SuffixForm)o;
  if (index != that.index)   return false;
  if (!id.equals(that.id))   return false;
  if (!generation.equals(that.generation))   return false;
  if (!suffix.equals(that.suffix))   return false;
  if (!connections.equals(that.connections))   return false;
  if (!indirectConnections.equals(that.indirectConnections))   return false;
  if (terminationType != that.terminationType)   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  SuffixForm that=(SuffixForm)o;
  if (index != that.index)   return false;
  if (!id.equals(that.id))   return false;
  if (!generation.equals(that.generation))   return false;
  if (!suffix.equals(that.suffix))   return false;
  if (terminationType != that.terminationType)   return false;
  if (!connections.equals(that.connections))   return false;
  if (!indirectConnections.equals(that.indirectConnections))   return false;
  return true;
}
Program: 52714
Project: 52714
Buggy source:
private void removeStemNode(StemNode stemNode){
  final String surfaceForm=stemNode.surfaceForm;
  if (multiStems.containsKey(surfaceForm)) {
    multiStems.remove(surfaceForm,stemNode);
  }
 else   if (singeStems.containsKey(surfaceForm)) {
    singeStems.remove(surfaceForm);
  }
  stemNodes.remove(stemNode);
}

Fixed version (ground truth):
private void removeStemNode(StemNode stemNode){
  final String surfaceForm=stemNode.surfaceForm;
  if (multiStems.containsKey(surfaceForm)) {
    multiStems.remove(surfaceForm,stemNode);
  }
 else   if (singleStems.containsKey(surfaceForm)) {
    singleStems.remove(surfaceForm);
  }
  stemNodes.remove(stemNode);
}
Program: 52715
Project: 52715
Buggy source:
public List<StemNode> getMatchingStemNodes(String stem){
  if (singeStems.containsKey(stem)) {
    return Lists.newArrayList(singeStems.get(stem));
  }
 else   if (multiStems.containsKey(stem)) {
    return Lists.newArrayList(multiStems.get(stem));
  }
 else   return Collections.emptyList();
}

Fixed version (ground truth):
public List<StemNode> getMatchingStemNodes(String stem){
  if (singleStems.containsKey(stem)) {
    return Lists.newArrayList(singleStems.get(stem));
  }
 else   if (multiStems.containsKey(stem)) {
    return Lists.newArrayList(multiStems.get(stem));
  }
 else   return Collections.emptyList();
}
Program: 52716
Project: 52716
Buggy source:
private void addStemNode(StemNode stemNode){
  final String surfaceForm=stemNode.surfaceForm;
  if (multiStems.containsKey(surfaceForm)) {
    multiStems.put(surfaceForm,stemNode);
  }
 else   if (singeStems.containsKey(surfaceForm)) {
    multiStems.put(surfaceForm,singeStems.get(surfaceForm));
    singeStems.remove(surfaceForm);
    multiStems.put(surfaceForm,stemNode);
  }
 else {
    singeStems.put(surfaceForm,stemNode);
  }
  stemNodes.add(stemNode);
}

Fixed version (ground truth):
private void addStemNode(StemNode stemNode){
  final String surfaceForm=stemNode.surfaceForm;
  if (multiStems.containsKey(surfaceForm)) {
    multiStems.put(surfaceForm,stemNode);
  }
 else   if (singleStems.containsKey(surfaceForm)) {
    multiStems.put(surfaceForm,singleStems.get(surfaceForm));
    singleStems.remove(surfaceForm);
    multiStems.put(surfaceForm,stemNode);
  }
 else {
    singleStems.put(surfaceForm,stemNode);
  }
  stemNodes.add(stemNode);
}
Program: 52717
Project: 52717
Buggy source:
private boolean containsNode(StemNode node){
  return multiStems.containsEntry(node.surfaceForm,node) || singeStems.containsKey(node.surfaceForm);
}

Fixed version (ground truth):
private boolean containsNode(StemNode node){
  return multiStems.containsEntry(node.surfaceForm,node) || singleStems.containsKey(node.surfaceForm);
}
Program: 52718
Project: 52718
Buggy source:
protected void registerForm(SuffixForm formSet){
  if (formSet instanceof SuffixFormTemplate) {
    formLookupByName.put(formSet.getId(),formSet);
    return;
  }
  if (suffixForms.containsKey(formSet)) {
    return;
  }
  SuffixData allConnections=formSet.allConnections();
  List<SuffixForm> templateFormsToRemove=new ArrayList<SuffixForm>();
  List<SuffixForm> nullFormsToRegister=new ArrayList<SuffixForm>();
  for (  SuffixForm connection : formSet.connections) {
    if (connection instanceof SuffixFormTemplate) {
      NullSuffixForm nullForm=generateNullFormFromTemplate((SuffixFormTemplate)connection,new SuffixData(allConnections)).copy();
      nullFormsToRegister.add(nullForm);
      templateFormsToRemove.add(connection);
    }
  }
  formSet.connections.remove(templateFormsToRemove);
  formSet.indirectConnections.clear();
  formSet.connections.add(nullFormsToRegister);
  if (formSet.index != -1)   formSet.index=getNewIndex();
  suffixForms.put(formSet,formSet);
  formLookupByName.put(formSet.getId(),formSet);
  for (  SuffixForm form : nullFormsToRegister) {
    registerForm(form);
  }
}

Fixed version (ground truth):
protected void registerForm(SuffixForm formSet){
  if (formSet instanceof SuffixFormTemplate) {
    formLookupByName.put(formSet.getId(),formSet);
    return;
  }
  if (suffixForms.containsKey(formSet)) {
    return;
  }
  SuffixData allConnections=formSet.allConnections();
  List<SuffixForm> templateFormsToRemove=new ArrayList<>();
  List<SuffixForm> nullFormsToRegister=new ArrayList<>();
  for (  SuffixForm connection : formSet.connections) {
    if (connection instanceof SuffixFormTemplate) {
      NullSuffixForm nullForm=generateNullFormFromTemplate((SuffixFormTemplate)connection,new SuffixData(allConnections)).copy();
      nullFormsToRegister.add(nullForm);
      templateFormsToRemove.add(connection);
    }
  }
  formSet.connections.remove(templateFormsToRemove);
  formSet.indirectConnections.clear();
  formSet.connections.add(nullFormsToRegister);
  if (formSet.index != -1)   formSet.index=getNewIndex();
  suffixForms.put(formSet,formSet);
  formLookupByName.put(formSet.getId(),formSet);
  for (  SuffixForm form : nullFormsToRegister) {
    registerForm(form);
  }
}
Program: 52721
Project: 52721
Buggy source:
private void generateCaches(){
  this.dynamicCache=CacheBuilder.newBuilder().maximumSize(50000).concurrencyLevel(1).initialCapacity(20000).build(new CacheLoader<String,List<MorphParse>>(){
    @Override public List<MorphParse> load(    String s){
      if (s.length() == 0)       return Collections.emptyList();
      List<MorphParse> res=parser.parse(s);
      if (res.size() == 0) {
        res.addAll(unidentifiedTokenParser.parse(s));
      }
      if (res.size() == 0) {
        res.add(new MorphParse(DictionaryItem.UNKNOWN,s,Lists.newArrayList(MorphParse.InflectionalGroup.UNKNOWN)));
      }
      return res;
    }
  }
);
  try {
    List<String> words=Resources.readLines(Resources.getResource("String_Node_Str"),Charsets.UTF_8);
    staticCache=new StaticMorphCache(parser,words);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void generateCaches(){
  this.dynamicCache=CacheBuilder.newBuilder().maximumSize(50000).concurrencyLevel(1).initialCapacity(20000).build(new MorphParseCacheLoader());
  try {
    List<String> words=Resources.readLines(Resources.getResource("String_Node_Str"),Charsets.UTF_8);
    staticCache=new StaticMorphCache(parser,words);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 52722
Project: 52722
Buggy source:
@Override public List<MorphParse> load(String s){
  if (s.length() == 0)   return Collections.emptyList();
  List<MorphParse> res=parser.parse(s);
  if (res.size() == 0) {
    res.addAll(unidentifiedTokenParser.parse(s));
  }
  if (res.size() == 0) {
    res.add(new MorphParse(DictionaryItem.UNKNOWN,s,Lists.newArrayList(MorphParse.InflectionalGroup.UNKNOWN)));
  }
  return res;
}

Fixed version (ground truth):
@Override public List<MorphParse> load(String s) throws Exception {
  if (s.length() == 0)   return Collections.emptyList();
  List<MorphParse> res=parser.parse(s);
  if (res.size() == 0) {
    res.addAll(quoteParseCheck(s));
  }
  if (res.size() == 0) {
    res.addAll(unidentifiedTokenParser.parse(s));
  }
  if (res.size() == 0) {
    res.add(new MorphParse(DictionaryItem.UNKNOWN,s,Lists.newArrayList(MorphParse.InflectionalGroup.UNKNOWN)));
  }
  return res;
}
Program: 52723
Project: 52723
Buggy source:
public List<MorphParse> parse(String word){
  List<MorphParse> results=Lists.newArrayList();
  if (!Strings.containsNone(word,"String_Node_Str")) {
    results=parseNumeral(word);
    return results;
  }
  if (word.contains("String_Node_Str")) {
    StemAndEnding se=new StemAndEnding(Strings.subStringUntilFirst(word,"String_Node_Str"),Strings.subStringAfterFirst(word,"String_Node_Str"));
    String stem=normalize(se.stem);
    String ending=normalize(se.ending);
    String pron=guessPronunciation(stem);
    DictionaryItem itemProp=new DictionaryItem(Turkish.capitalize(stem),stem,pron,PrimaryPos.Noun,SecondaryPos.ProperNoun);
    itemProp.attributes.add(RootAttribute.Runtime);
    String toParse=stem + ending;
    graph.addDictionaryItem(itemProp);
    List<MorphParse> properResults=parser.parse(toParse);
    graph.removeDictionaryItem(itemProp);
    results.addAll(properResults);
  }
 else   if (Character.isUpperCase(word.charAt(0))) {
    String normalized=normalize(word);
    String pron=guessPronunciation(normalized);
    DictionaryItem itemProp=new DictionaryItem(Turkish.capitalize(normalized),normalized,pron,PrimaryPos.Noun,SecondaryPos.ProperNoun);
    itemProp.attributes.add(RootAttribute.Runtime);
    graph.addDictionaryItem(itemProp);
    List<MorphParse> properResults=parser.parse(normalized);
    graph.removeDictionaryItem(itemProp);
    results.addAll(properResults);
  }
  return results;
}

Fixed version (ground truth):
public List<MorphParse> parse(String word){
  List<MorphParse> results=Lists.newArrayListWithCapacity(2);
  if (!Strings.containsNone(word,"String_Node_Str")) {
    results=parseNumeral(word);
    return results;
  }
  if (word.contains("String_Node_Str")) {
    StemAndEnding se=new StemAndEnding(Strings.subStringUntilFirst(word,"String_Node_Str"),Strings.subStringAfterFirst(word,"String_Node_Str"));
    String stem=normalize(se.stem);
    String ending=normalize(se.ending);
    String pron=guessPronunciation(stem);
    DictionaryItem itemProp=new DictionaryItem(Turkish.capitalize(stem),stem,pron,PrimaryPos.Noun,SecondaryPos.ProperNoun);
    itemProp.attributes.add(RootAttribute.Runtime);
    graph.addDictionaryItem(itemProp);
    String toParse=stem + ending;
    List<MorphParse> properResults=parser.parse(toParse);
    graph.removeDictionaryItem(itemProp);
    results.addAll(properResults);
  }
 else   if (Character.isUpperCase(word.charAt(0))) {
    String normalized=normalize(word);
    String pron=guessPronunciation(normalized);
    DictionaryItem itemProp=new DictionaryItem(Turkish.capitalize(normalized),normalized,pron,PrimaryPos.Noun,SecondaryPos.ProperNoun);
    itemProp.attributes.add(RootAttribute.Runtime);
    graph.addDictionaryItem(itemProp);
    List<MorphParse> properResults=parser.parse(normalized);
    graph.removeDictionaryItem(itemProp);
    results.addAll(properResults);
  }
  return results;
}