Program: 52681
Project: 52681
Buggy source:
private List<StemTransition> generateModifiedRootNodes(DictionaryItem dicItem){
  TurkishLetterSequence modifiedSeq=new TurkishLetterSequence(dicItem.pronunciation,alphabet);
  AttributeSet<PhoneticAttribute> originalAttrs=calculateAttributes(dicItem.pronunciation);
  AttributeSet<PhoneticAttribute> modifiedAttrs=originalAttrs.copy();
  for (  RootAttribute attribute : dicItem.attributes) {
switch (attribute) {
case Voicing:
      TurkicLetter last=modifiedSeq.lastLetter();
    TurkicLetter modifiedLetter=alphabet.voice(last);
  if (modifiedLetter == null) {
    throw new LexiconException("String_Node_Str" + dicItem);
  }
if (dicItem.lemma.endsWith("String_Node_Str")) {
  modifiedLetter=TurkishAlphabet.L_g;
}
modifiedSeq.changeLetter(modifiedSeq.length() - 1,modifiedLetter);
modifiedAttrs.remove(PhoneticAttribute.LastLetterVoicelessStop);
originalAttrs.add(PhoneticAttribute.ExpectsConsonant);
modifiedAttrs.add(PhoneticAttribute.ExpectsVowel);
modifiedAttrs.add(PhoneticAttribute.CannotTerminate);
break;
case Doubling:
modifiedSeq.append(modifiedSeq.lastLetter());
originalAttrs.add(PhoneticAttribute.ExpectsConsonant);
modifiedAttrs.add(PhoneticAttribute.ExpectsVowel);
modifiedAttrs.add(PhoneticAttribute.CannotTerminate);
break;
case LastVowelDrop:
if (modifiedSeq.lastLetter().isVowel()) {
modifiedSeq.delete(modifiedSeq.length() - 1);
modifiedAttrs.add(PhoneticAttribute.ExpectsConsonant);
modifiedAttrs.add(PhoneticAttribute.CannotTerminate);
}
 else {
modifiedSeq.delete(modifiedSeq.length() - 2);
if (!dicItem.primaryPos.equals(PrimaryPos.Verb)) {
originalAttrs.add(PhoneticAttribute.ExpectsConsonant);
}
modifiedAttrs.add(PhoneticAttribute.ExpectsVowel);
modifiedAttrs.add(PhoneticAttribute.CannotTerminate);
}
break;
case InverseHarmony:
originalAttrs.add(PhoneticAttribute.LastVowelFrontal);
originalAttrs.remove(PhoneticAttribute.LastVowelBack);
modifiedAttrs.add(PhoneticAttribute.LastVowelFrontal);
modifiedAttrs.remove(PhoneticAttribute.LastVowelBack);
break;
case ProgressiveVowelDrop:
modifiedSeq.delete(modifiedSeq.length() - 1);
if (modifiedSeq.hasVowel()) {
modifiedAttrs=calculateAttributes(modifiedSeq);
}
modifiedAttrs.add(PhoneticAttribute.LastVowelDropped);
break;
default :
break;
}
}
StemTransition original=new StemTransition(dicItem.root,dicItem,originalAttrs,morphotactics.getRootState(dicItem,originalAttrs));
StemTransition modified=new StemTransition(modifiedSeq.toString(),dicItem,modifiedAttrs,morphotactics.getRootState(dicItem,modifiedAttrs));
if (original.equals(modified)) {
return Collections.singletonList(original);
}
return Lists.newArrayList(original,modified);
}

Fixed version (ground truth):
private List<StemTransition> generateModifiedRootNodes(DictionaryItem dicItem){
  TurkishLetterSequence modifiedSeq=new TurkishLetterSequence(dicItem.pronunciation,alphabet);
  AttributeSet<PhoneticAttribute> originalAttrs=calculateAttributes(dicItem.pronunciation);
  AttributeSet<PhoneticAttribute> modifiedAttrs=originalAttrs.copy();
  for (  RootAttribute attribute : dicItem.attributes) {
switch (attribute) {
case Voicing:
      TurkicLetter last=modifiedSeq.lastLetter();
    TurkicLetter modifiedLetter=alphabet.voice(last);
  if (modifiedLetter == null) {
    throw new LexiconException("String_Node_Str" + dicItem);
  }
if (dicItem.lemma.endsWith("String_Node_Str")) {
  modifiedLetter=TurkishAlphabet.L_g;
}
modifiedSeq.changeLetter(modifiedSeq.length() - 1,modifiedLetter);
modifiedAttrs.remove(PhoneticAttribute.LastLetterVoicelessStop);
originalAttrs.add(PhoneticAttribute.ExpectsConsonant);
modifiedAttrs.add(PhoneticAttribute.ExpectsVowel);
modifiedAttrs.add(PhoneticAttribute.CannotTerminate);
break;
case Doubling:
modifiedSeq.append(modifiedSeq.lastLetter());
originalAttrs.add(PhoneticAttribute.ExpectsConsonant);
modifiedAttrs.add(PhoneticAttribute.ExpectsVowel);
modifiedAttrs.add(PhoneticAttribute.CannotTerminate);
break;
case LastVowelDrop:
if (modifiedSeq.lastLetter().isVowel()) {
modifiedSeq.delete(modifiedSeq.length() - 1);
modifiedAttrs.add(PhoneticAttribute.ExpectsConsonant);
modifiedAttrs.add(PhoneticAttribute.CannotTerminate);
}
 else {
modifiedSeq.delete(modifiedSeq.length() - 2);
if (!dicItem.primaryPos.equals(PrimaryPos.Verb)) {
originalAttrs.add(PhoneticAttribute.ExpectsConsonant);
}
modifiedAttrs.add(PhoneticAttribute.ExpectsVowel);
modifiedAttrs.add(PhoneticAttribute.CannotTerminate);
}
break;
case InverseHarmony:
originalAttrs.add(PhoneticAttribute.LastVowelFrontal);
originalAttrs.remove(PhoneticAttribute.LastVowelBack);
modifiedAttrs.add(PhoneticAttribute.LastVowelFrontal);
modifiedAttrs.remove(PhoneticAttribute.LastVowelBack);
break;
case ProgressiveVowelDrop:
modifiedSeq.delete(modifiedSeq.length() - 1);
if (modifiedSeq.hasVowel()) {
modifiedAttrs=calculateAttributes(modifiedSeq);
}
modifiedAttrs.add(PhoneticAttribute.LastLetterDropped);
break;
default :
break;
}
}
StemTransition original=new StemTransition(dicItem.root,dicItem,originalAttrs,morphotactics.getRootState(dicItem,originalAttrs));
StemTransition modified=new StemTransition(modifiedSeq.toString(),dicItem,modifiedAttrs,morphotactics.getRootState(dicItem,modifiedAttrs));
if (original.equals(modified)) {
return Collections.singletonList(original);
}
return Lists.newArrayList(original,modified);
}