Program: 141030
Project: 141030
Buggy source:
/** 
 * Parse the column including the information by sample.
 * @param design the design object
 * @param columnNames the name of the columns
 * @param line the line read from your design file
 * @throws IOException
 */
private void parseColumns(final Design design,final List<String> columnNames,final String line,final boolean firstLine) throws IOException {
  final List<String> splitLine=GuavaCompatibility.splitToList(this.tabSplitter,line);
  if (firstLine) {
    columnNames.addAll(splitLine);
    final int sampleIdPos=columnNames.indexOf(SAMPLE_ID_FIELDNAME);
    if (sampleIdPos == -1) {
      throw new IOException("String_Node_Str" + "String_Node_Str" + SAMPLE_ID_FIELDNAME + "String_Node_Str");
    }
    if (sampleIdPos != 0) {
      throw new IOException("String_Node_Str" + "String_Node_Str" + SAMPLE_ID_FIELDNAME + "String_Node_Str");
    }
    final int sampleNamePos=columnNames.indexOf(SAMPLE_NAME_FIELDNAME);
    if (sampleNamePos == -1) {
      throw new IOException("String_Node_Str" + "String_Node_Str" + SAMPLE_NAME_FIELDNAME + "String_Node_Str");
    }
    if (sampleNamePos != 1) {
      throw new IOException("String_Node_Str" + "String_Node_Str" + SAMPLE_NAME_FIELDNAME + "String_Node_Str");
    }
  }
 else {
    if (splitLine.size() != columnNames.size()) {
      throw new IOException("String_Node_Str" + "String_Node_Str" + splitLine.size() + "String_Node_Str"+ columnNames.size()+ "String_Node_Str"+ line);
    }
    final String sampleId=splitLine.get(0);
    final String sampleName=splitLine.get(1);
    final Sample sample=design.addSample(sampleId);
    sample.setName(sampleName);
    for (    Experiment e : design.getExperiments()) {
      e.addSample(sample);
    }
    final Iterator<String> nameIterator=columnNames.iterator();
    final Iterator<String> valueIterator=splitLine.iterator();
    while (nameIterator.hasNext() && valueIterator.hasNext()) {
      final String columnName=nameIterator.next();
      final String columnValue=valueIterator.next();
      if (SAMPLE_ID_FIELDNAME.equals(columnName) || SAMPLE_NAME_FIELDNAME.equals(columnName)) {
        continue;
      }
      if (columnName.startsWith(EXPERIMENT_FIELD_PREFIX)) {
        readExperimentSampleMetadata(columnName,columnValue,design,sample);
      }
 else {
        readSampleMetadata(columnName,columnValue,design,sample);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Parse the column including the information by sample.
 * @param design the design object
 * @param columnNames the name of the columns
 * @param line the line read from your design file
 * @throws IOException if the data read is incorrect
 */
private void parseColumns(final Design design,final List<String> columnNames,final String line,final boolean firstLine) throws IOException {
  final List<String> splitLine=GuavaCompatibility.splitToList(this.tabSplitter,line);
  if (firstLine) {
    columnNames.addAll(splitLine);
    final int sampleIdPos=columnNames.indexOf(SAMPLE_ID_FIELDNAME);
    if (sampleIdPos == -1) {
      throw new IOException("String_Node_Str" + "String_Node_Str" + SAMPLE_ID_FIELDNAME + "String_Node_Str");
    }
    if (sampleIdPos != 0) {
      throw new IOException("String_Node_Str" + "String_Node_Str" + SAMPLE_ID_FIELDNAME + "String_Node_Str");
    }
    final int sampleNamePos=columnNames.indexOf(SAMPLE_NAME_FIELDNAME);
    if (sampleNamePos == -1) {
      throw new IOException("String_Node_Str" + "String_Node_Str" + SAMPLE_NAME_FIELDNAME + "String_Node_Str");
    }
    if (sampleNamePos != 1) {
      throw new IOException("String_Node_Str" + "String_Node_Str" + SAMPLE_NAME_FIELDNAME + "String_Node_Str");
    }
  }
 else {
    if (splitLine.size() != columnNames.size()) {
      throw new IOException("String_Node_Str" + "String_Node_Str" + splitLine.size() + "String_Node_Str"+ columnNames.size()+ "String_Node_Str"+ line);
    }
    final String sampleId=splitLine.get(0);
    final String sampleName=splitLine.get(1);
    final Sample sample=design.addSample(sampleId);
    sample.setName(sampleName);
    for (    Experiment e : design.getExperiments()) {
      e.addSample(sample);
    }
    final Iterator<String> nameIterator=columnNames.iterator();
    final Iterator<String> valueIterator=splitLine.iterator();
    while (nameIterator.hasNext() && valueIterator.hasNext()) {
      final String columnName=nameIterator.next();
      final String columnValue=valueIterator.next();
      if (SAMPLE_ID_FIELDNAME.equals(columnName) || SAMPLE_NAME_FIELDNAME.equals(columnName)) {
        continue;
      }
      if (columnName.startsWith(EXPERIMENT_FIELD_PREFIX)) {
        readExperimentSampleMetadata(columnName,columnValue,design,sample);
      }
 else {
        readSampleMetadata(columnName,columnValue,design,sample);
      }
    }
  }
}