Program: 178685
Project: 178685
Buggy source:
private void readCsvFile(String filename){
  if (filename == null) {
    return;
  }
  try {
    FileReader freader=new FileReader(filename);
    CSVReader reader=new CSVReader(freader);
    String[] nextLine;
    nextLine=reader.readNext();
    if (nextLine == null) {
      return;
    }
    String[] names=new String[nextLine.length - 1];
    for (int i=1; i < nextLine.length; i++) {
      names[i - 1]=nextLine[i].trim();
    }
    LinkedList<Number> timesList=new LinkedList<Number>();
    LinkedList<double[]> resultsList=new LinkedList<double[]>();
    while ((nextLine=reader.readNext()) != null) {
      timesList.add(Double.parseDouble(nextLine[0].trim()));
      double[] resultLine=new double[names.length];
      for (int column=1; column < names.length; column++) {
        if (column > nextLine.length) {
          resultLine[column]=0;
        }
 else {
          double value=Double.parseDouble(nextLine[column].trim());
          resultLine[column]=value;
        }
      }
      resultsList.addLast(resultLine);
    }
    double[] times=new double[timesList.size()];
    for (int index=0; index < times.length; index++) {
      times[index]=timesList.get(index).doubleValue();
    }
    double[][] results=new double[names.length][];
    for (int i=0; i < names.length; i++) {
      results[i]=new double[times.length];
    }
    for (int timeIndex=0; timeIndex < times.length; timeIndex++) {
      double[] resultLine=resultsList.get(timeIndex);
      for (int index=0; index < results.length; index++) {
        results[index][timeIndex]=resultLine[index];
      }
    }
    Parameters params=new Parameters();
    HashMap<String,Number> modelParams=new HashMap<String,Number>();
    BasicResult thisResult=new BasicResult(params,modelParams);
    thisResult.setComponentNames(names);
    thisResult.setResults(results);
    thisResult.setTimePoints(times);
    this.setErrorMessage(null);
    plottableResult=thisResult;
  }
 catch (  FileNotFoundException e) {
    this.csvParseError("String_Node_Str");
    e.printStackTrace();
  }
catch (  IOException e) {
    this.csvParseError("String_Node_Str" + e.getMessage());
    e.printStackTrace();
  }
catch (  Exception e) {
    this.csvParseError("String_Node_Str" + e.getMessage());
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void readCsvFile(String filename){
  if (filename == null) {
    return;
  }
  try {
    FileReader freader=new FileReader(filename);
    CSVReader reader=new CSVReader(freader);
    String[] nextLine;
    nextLine=reader.readNext();
    if (nextLine == null) {
      return;
    }
    String[] names=new String[nextLine.length - 1];
    for (int i=1; i < nextLine.length; i++) {
      names[i - 1]=nextLine[i].trim();
    }
    LinkedList<Number> timesList=new LinkedList<Number>();
    LinkedList<double[]> resultsList=new LinkedList<double[]>();
    while ((nextLine=reader.readNext()) != null) {
      timesList.add(Double.parseDouble(nextLine[0].trim()));
      double[] resultLine=new double[names.length];
      for (int column=0; column < names.length; column++) {
        if (column > nextLine.length) {
          resultLine[column]=0;
        }
 else {
          double value=Double.parseDouble(nextLine[column + 1].trim());
          resultLine[column]=value;
        }
      }
      resultsList.addLast(resultLine);
    }
    double[] times=new double[timesList.size()];
    for (int index=0; index < times.length; index++) {
      times[index]=timesList.get(index).doubleValue();
    }
    double[][] results=new double[names.length][];
    for (int i=0; i < names.length; i++) {
      results[i]=new double[times.length];
    }
    for (int timeIndex=0; timeIndex < times.length; timeIndex++) {
      double[] resultLine=resultsList.get(timeIndex);
      for (int index=0; index < results.length; index++) {
        results[index][timeIndex]=resultLine[index];
      }
    }
    Parameters params=new Parameters();
    HashMap<String,Number> modelParams=new HashMap<String,Number>();
    BasicResult thisResult=new BasicResult(params,modelParams);
    thisResult.setComponentNames(names);
    thisResult.setResults(results);
    thisResult.setTimePoints(times);
    this.setErrorMessage(null);
    plottableResult=thisResult;
  }
 catch (  FileNotFoundException e) {
    this.csvParseError("String_Node_Str");
    e.printStackTrace();
  }
catch (  IOException e) {
    this.csvParseError("String_Node_Str" + e.getMessage());
    e.printStackTrace();
  }
catch (  Exception e) {
    this.csvParseError("String_Node_Str" + e.getMessage());
    e.printStackTrace();
  }
}