Program: 72388
Project: 72388
Buggy source:
/** 
 * Write the number of HLA calls of each federate, along with informations about the time step and the runtime, in a file. The name and location of this file are specified in the initialization of the variable file.
 */
public void writeNumberOfHLACalls(){
  try {
    String fullName=federateName.toString();
    String nameOfTheFile=fullName.substring(fullName.indexOf('{') + 1,fullName.lastIndexOf('.'));
    String RKSolver="String_Node_Str";
    nameOfTheFile=nameOfTheFile.substring(1,nameOfTheFile.lastIndexOf('.')) + "String_Node_Str";
    String path=fedFile.asFile().getPath();
    path=path.substring(0,path.lastIndexOf("String_Node_Str") + 1);
    File file=new File(path + nameOfTheFile);
    StringBuffer info=new StringBuffer("String_Node_Str" + getDisplayName() + "String_Node_Str"+ nameOfTheFile);
    RKSolver=AutomaticSimulation.findParameterValue(file,RKSolver,0);
    info.append("String_Node_Str" + RKSolver);
    info.append("String_Node_Str" + "String_Node_Str" + _stopTime + "String_Node_Str"+ _hlaTimeUnitValue+ "String_Node_Str"+ _hlaLookAHead);
    if (_isCreator) {
      info=new StringBuffer("String_Node_Str" + info);
    }
    if (_timeStepped) {
      info.append("String_Node_Str" + _hlaTimeStep + "String_Node_Str"+ "String_Node_Str"+ _numberOfTARs);
    }
 else     if (_eventBased) {
      info.append("String_Node_Str" + _numberOfNERs);
    }
    info.append("String_Node_Str" + _numberOfUAVs + "String_Node_Str"+ _numberOfTAGs+ "String_Node_Str"+ _numberOfRAVs+ "String_Node_Str"+ "String_Node_Str"+ _runtime+ "String_Node_Str");
    writeInTextFile(_file,info.toString());
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Write the number of HLA calls of each federate, along with informations about the time step and the runtime, in a file. The name and location of this file are specified in the initialization of the variable file.
 */
public void writeNumberOfHLACalls(){
  try {
    String fullName=federateName.toString();
    String nameOfTheFile=fullName.substring(fullName.indexOf('{') + 1,fullName.lastIndexOf('.'));
    String RKSolver="String_Node_Str";
    nameOfTheFile=nameOfTheFile.substring(1,nameOfTheFile.lastIndexOf('.')) + "String_Node_Str";
    String path=fedFile.asFile().getPath();
    path=path.substring(0,path.lastIndexOf("String_Node_Str") + 1);
    File file=new File(path + nameOfTheFile);
    StringBuffer info=new StringBuffer("String_Node_Str" + getDisplayName() + "String_Node_Str"+ nameOfTheFile);
    RKSolver=AutomaticSimulation.findParameterValue(file,RKSolver);
    info.append("String_Node_Str" + RKSolver);
    info.append("String_Node_Str" + "String_Node_Str" + _stopTime + "String_Node_Str"+ _hlaTimeUnitValue+ "String_Node_Str"+ _hlaLookAHead);
    if (_isCreator) {
      info=new StringBuffer("String_Node_Str" + info);
    }
    if (_timeStepped) {
      info.append("String_Node_Str" + _hlaTimeStep + "String_Node_Str"+ "String_Node_Str"+ _numberOfTARs);
    }
 else     if (_eventBased) {
      info.append("String_Node_Str" + _numberOfNERs);
    }
    info.append("String_Node_Str" + _numberOfUAVs + "String_Node_Str"+ _numberOfTAGs+ "String_Node_Str"+ _numberOfRAVs+ "String_Node_Str"+ "String_Node_Str"+ _runtime+ "String_Node_Str");
    writeInTextFile(_file,info.toString());
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str");
  }
}