Program: 133686
Project: 133686
Buggy source:
/** 
 * <p> Reads in the given IFile to the CaebatModel datastructures. There are four components in each IPS INI file that are parsed and arranged into the form that will be displayed to the user. Returns a form composed of the data read in from the specified location which can be modified and written out by the user. </p>
 * @param ifile The file to be read in
 * @return a form with the imported data
 */
@Override public Form read(IFile ifile){
  if (ifile == null) {
    return null;
  }
  Form form=new Form();
  ArrayList<String> lines=null;
  try {
    lines=readFileLines(ifile);
  }
 catch (  FileNotFoundException e) {
    System.out.println("String_Node_Str");
    return null;
  }
catch (  IOException e) {
    System.out.println("String_Node_Str");
    return null;
  }
  Iterator<String> iniIterator=lines.iterator();
  TableComponent globalConfiguration=loadGlobalConfiguration(iniIterator);
  TableComponent portsData=loadPortsData(iniIterator);
  int numberPorts=portsData.numberOfRows();
  ArrayList<DataComponent> ipsComponents=new ArrayList<DataComponent>();
  ArrayList<String> names=new ArrayList<String>();
  for (int i=0; i < numberPorts; i++) {
    DataComponent ipsComponent=loadComponent(iniIterator);
    ipsComponents.add(ipsComponent);
    names.add(ipsComponent.getName());
  }
  MasterDetailsComponent portsMaster=buildMasterDetailsComponent(ipsComponents);
  DataComponent timeLoopComponent=loadTimeLoopComponent(iniIterator);
  form.addComponent(timeLoopComponent);
  form.addComponent(globalConfiguration);
  form.addComponent(portsData);
  form.addComponent(portsMaster);
  return form;
}

Fixed version (ground truth):
/** 
 * <p> Reads in the given IFile to the CaebatModel datastructures. There are four components in each IPS INI file that are parsed and arranged into the form that will be displayed to the user. Returns a form composed of the data read in from the specified location which can be modified and written out by the user. </p>
 * @param ifile The file to be read in
 * @return a form with the imported data
 */
@Override public Form read(IFile ifile){
  if (ifile == null) {
    return null;
  }
  Form form=new Form();
  ArrayList<String> lines=null;
  try {
    lines=readFileLines(ifile);
  }
 catch (  FileNotFoundException e) {
    System.out.println("String_Node_Str");
    return null;
  }
catch (  IOException e) {
    System.out.println("String_Node_Str");
    return null;
  }
  Iterator<String> iniIterator=lines.iterator();
  TableComponent globalConfiguration=loadGlobalConfiguration(iniIterator);
  TableComponent portsData=loadPortsData(iniIterator);
  int numberPorts=portsData.numberOfRows();
  ArrayList<DataComponent> ipsComponents=new ArrayList<DataComponent>();
  ArrayList<String> names=new ArrayList<String>();
  String name="String_Node_Str";
  while (!name.equals("String_Node_Str")) {
    DataComponent ipsComponent=loadComponent(iniIterator);
    name=ipsComponent.getName();
    if (!name.equals("String_Node_Str")) {
      ipsComponents.add(ipsComponent);
      names.add(ipsComponent.getName());
    }
  }
  MasterDetailsComponent portsMaster=buildMasterDetailsComponent(ipsComponents);
  DataComponent timeLoopComponent=loadTimeLoopComponent(iniIterator);
  form.addComponent(timeLoopComponent);
  form.addComponent(globalConfiguration);
  form.addComponent(portsData);
  form.addComponent(portsMaster);
  return form;
}