Program: 18375
Project: 18375
Buggy source:
@Override public void compose(FSTTerminal terminalA,FSTTerminal terminalB,FSTTerminal terminalComp,FSTNonTerminal nonterminalParent){
  FSTTerminal terminalComp2=(FSTTerminal)terminalB.getDeepClone();
  FSTTerminal terminalComp3=(FSTTerminal)terminalB.getDeepClone();
  nonterminalParent.addChild(terminalComp2);
  nonterminalParent.addChild(terminalComp3);
  Signature sigB=Signature.fromString(terminalB.getBody());
  String toReplace="String_Node_Str";
  String featureName=getFeatureName(terminalA);
  String beforeFunctionName=sigB.name + "String_Node_Str" + featureName;
  String roleFunctionName=sigB.name + "String_Node_Str" + featureName;
  String newBody=terminalComp.getBody().replaceAll(toReplace,beforeFunctionName + "String_Node_Str");
  newBody=replaceFunctionName(roleFunctionName,sigB.name,newBody);
  terminalComp3.setBody(newBody);
  terminalComp3.setName(roleFunctionName);
  String newBody2=replaceFunctionName(beforeFunctionName,sigB.name,terminalComp2.getBody());
  terminalComp2.setBody(newBody2);
  terminalComp2.setName(beforeFunctionName);
  System.out.println(terminalA.getName());
  String switchIdentifier="String_Node_Str" + featureName;
  String newBody3=sigB.toString() + "String_Node_Str" + "String_Node_Str"+ switchIdentifier+ "String_Node_Str"+ "String_Node_Str"+ roleFunctionName+ sigB.arglist+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ beforeFunctionName+ sigB.arglist+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  terminalComp.setBody(newBody3);
}

Fixed version (ground truth):
@Override public void compose(FSTTerminal terminalA,FSTTerminal terminalB,FSTTerminal terminalComp,FSTNonTerminal nonterminalParent){
  FSTTerminal terminalComp2=(FSTTerminal)terminalB.getDeepClone();
  FSTTerminal terminalComp3=(FSTTerminal)terminalB.getDeepClone();
  nonterminalParent.addChild(terminalComp2);
  nonterminalParent.addChild(terminalComp3);
  Signature sigB=Signature.fromString(terminalB.getBody());
  String toReplace="String_Node_Str";
  String featureName=getFeatureName(terminalA);
  String beforeFunctionName=sigB.name + "String_Node_Str" + featureName;
  String roleFunctionName=sigB.name + "String_Node_Str" + featureName;
  String newBody=terminalComp.getBody().replaceAll(toReplace,beforeFunctionName + "String_Node_Str");
  newBody=replaceFunctionName(roleFunctionName,sigB.name,newBody);
  terminalComp3.setBody(newBody);
  terminalComp3.setName(roleFunctionName);
  String newBody2=replaceFunctionName(beforeFunctionName,sigB.name,terminalComp2.getBody());
  terminalComp2.setBody(newBody2);
  terminalComp2.setName(beforeFunctionName);
  System.out.println(terminalA.getName());
  String switchIdentifier="String_Node_Str" + featureName;
  String newBody3="String_Node_Str";
  if (sigB.returnType.trim().equals("String_Node_Str")) {
    newBody3=sigB.toString() + "String_Node_Str" + "String_Node_Str"+ switchIdentifier+ "String_Node_Str"+ "String_Node_Str"+ roleFunctionName+ sigB.arglist+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ beforeFunctionName+ sigB.arglist+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  }
 else {
    newBody3=sigB.toString() + "String_Node_Str" + "String_Node_Str"+ switchIdentifier+ "String_Node_Str"+ "String_Node_Str"+ roleFunctionName+ sigB.arglist+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ beforeFunctionName+ sigB.arglist+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  }
  terminalComp.setBody(newBody3);
}