Program: 57530
Project: 57530
Buggy source:
/** 
 * <p> Creates the   {@link DataTable} and the {@link AColumn}s for the  {@link DataTable}, as well as the raw data columns to be set into the columns, which are also stored in   {@link #targetColumns}. </p> <p> Also creates the mapping of columnIDs to column labels in the  {@link IDMappingManager}</p>
 */
private void initializeDataContainers(){
  DataTable table=new DataTable(dataDomain);
  dataDomain.setTable(table);
  ArrayList<ColumnDescription> parsingPattern=dataSetDescription.getParsingPattern();
  String[] headers=null;
  if (dataSetDescription.isContainsColumnIDs()) {
    try {
      BufferedReader reader=GeneralManager.get().getResourceLoader().getResource(filePath);
      Integer rowOfColumnIDs=dataSetDescription.getNumberOfHeaderLines() - 1;
      if (dataSetDescription.getRowOfColumnIDs() != null)       rowOfColumnIDs=dataSetDescription.getRowOfColumnIDs();
      for (int rowCount=0; rowCount < rowOfColumnIDs; rowCount++) {
        reader.readLine();
      }
      String headerLine=reader.readLine();
      headers=headerLine.split(dataSetDescription.getDelimiter());
      reader.close();
    }
 catch (    Exception e) {
      Logger.log(new Status(IStatus.ERROR,this.toString(),"String_Node_Str",e));
      throw new IllegalStateException("String_Node_Str" + filePath + "String_Node_Str",e);
    }
  }
  calculateNumberOfLinesInFile();
  int numberOfDataLines=numberOfLinesInFile - dataSetDescription.getNumberOfHeaderLines();
  IDMappingManager columnIDMappingManager;
  IDType columnIDType;
  IDType hrColumnIDType;
  if (!dataDomain.getDataSetDescription().isTransposeMatrix()) {
    columnIDMappingManager=dataDomain.getDimensionIDMappingManager();
    columnIDType=dataDomain.getDimensionIDType();
    hrColumnIDType=columnIDType.getIDCategory().getHumanReadableIDType();
  }
 else {
    columnIDMappingManager=dataDomain.getRecordIDMappingManager();
    columnIDType=dataDomain.getRecordIDType();
    hrColumnIDType=columnIDType.getIDCategory().getHumanReadableIDType();
  }
  MappingType mappingType=columnIDMappingManager.createMap(columnIDType,hrColumnIDType,false,true);
  int columnCount=0;
  for (  ColumnDescription parsingDetail : parsingPattern) {
    int columnID;
    if (parsingDetail.getDataType().equalsIgnoreCase("String_Node_Str")) {
      float[] dataColumn=new float[numberOfDataLines];
      targetColumns.add(dataColumn);
      NumericalColumn column;
      if (parsingDetail.getColumnID() == null) {
        column=new NumericalColumn();
        parsingDetail.setColumnID(column.getID());
      }
 else {
        column=new NumericalColumn(parsingDetail.getColumnID());
      }
      columnID=column.getID();
      column.setRawData(dataColumn);
      table.addColumn(column);
    }
 else     if (parsingDetail.getDataType().equalsIgnoreCase("String_Node_Str")) {
      ArrayList<String> dataColumn=new ArrayList<String>(numberOfDataLines);
      targetColumns.add(dataColumn);
      NominalColumn<String> column;
      if (parsingDetail.getColumnID() == null) {
        column=new NominalColumn<String>();
        parsingDetail.setColumnID(column.getID());
      }
 else {
        column=new NominalColumn<String>(parsingDetail.getColumnID());
      }
      columnID=column.getID();
      column.setRawNominalData(dataColumn);
      table.addColumn(column);
    }
 else {
      throw new IllegalStateException("String_Node_Str" + parsingDetail + "String_Node_Str"+ parsingPattern);
    }
    if (headers != null) {
      String idString=headers[parsingDetail.getColumn()];
      idString=convertID(idString,dataSetDescription.getColumnIDSpecification().getIdTypeParsingRules());
      columnIDMappingManager.addMapping(mappingType,columnID,idString);
    }
 else {
      columnIDMappingManager.addMapping(mappingType,columnID,"String_Node_Str" + columnCount++);
    }
  }
}

Fixed version (ground truth):
/** 
 * <p> Creates the   {@link DataTable} and the {@link AColumn}s for the  {@link DataTable}, as well as the raw data columns to be set into the columns, which are also stored in   {@link #targetColumns}. </p> <p> Also creates the mapping of columnIDs to column labels in the  {@link IDMappingManager}</p>
 */
private void initializeDataContainers(){
  DataTable table=new DataTable(dataDomain);
  dataDomain.setTable(table);
  ArrayList<ColumnDescription> parsingPattern=dataSetDescription.getParsingPattern();
  String[] headers=null;
  if (dataSetDescription.isContainsColumnIDs()) {
    try {
      BufferedReader reader=GeneralManager.get().getResourceLoader().getResource(filePath);
      Integer rowOfColumnIDs=dataSetDescription.getNumberOfHeaderLines() - 1;
      if (dataSetDescription.getRowOfColumnIDs() != null)       rowOfColumnIDs=dataSetDescription.getRowOfColumnIDs();
      for (int rowCount=0; rowCount < rowOfColumnIDs; rowCount++) {
        reader.readLine();
      }
      String headerLine=reader.readLine();
      headers=headerLine.split(dataSetDescription.getDelimiter());
      reader.close();
    }
 catch (    Exception e) {
      Logger.log(new Status(IStatus.ERROR,this.toString(),"String_Node_Str",e));
      throw new IllegalStateException("String_Node_Str" + filePath + "String_Node_Str",e);
    }
  }
  calculateNumberOfLinesInFile();
  int numberOfDataLines=numberOfLinesInFile - dataSetDescription.getNumberOfHeaderLines();
  IDMappingManager columnIDMappingManager;
  IDType targetColumnIDType;
  IDType sourceColumnIDType=IDType.getIDType(dataSetDescription.getColumnIDSpecification().getIdType());
  if (!dataDomain.getDataSetDescription().isTransposeMatrix()) {
    columnIDMappingManager=dataDomain.getDimensionIDMappingManager();
    targetColumnIDType=dataDomain.getDimensionIDType();
  }
 else {
    columnIDMappingManager=dataDomain.getRecordIDMappingManager();
    targetColumnIDType=dataDomain.getRecordIDType();
  }
  MappingType mappingType=columnIDMappingManager.createMap(targetColumnIDType,sourceColumnIDType,false,true);
  int columnCount=0;
  for (  ColumnDescription parsingDetail : parsingPattern) {
    int columnID;
    if (parsingDetail.getDataType().equalsIgnoreCase("String_Node_Str")) {
      float[] dataColumn=new float[numberOfDataLines];
      targetColumns.add(dataColumn);
      NumericalColumn column;
      if (parsingDetail.getColumnID() == null) {
        column=new NumericalColumn();
        parsingDetail.setColumnID(column.getID());
      }
 else {
        column=new NumericalColumn(parsingDetail.getColumnID());
      }
      columnID=column.getID();
      column.setRawData(dataColumn);
      table.addColumn(column);
    }
 else     if (parsingDetail.getDataType().equalsIgnoreCase("String_Node_Str")) {
      ArrayList<String> dataColumn=new ArrayList<String>(numberOfDataLines);
      targetColumns.add(dataColumn);
      NominalColumn<String> column;
      if (parsingDetail.getColumnID() == null) {
        column=new NominalColumn<String>();
        parsingDetail.setColumnID(column.getID());
      }
 else {
        column=new NominalColumn<String>(parsingDetail.getColumnID());
      }
      columnID=column.getID();
      column.setRawNominalData(dataColumn);
      table.addColumn(column);
    }
 else {
      throw new IllegalStateException("String_Node_Str" + parsingDetail + "String_Node_Str"+ parsingPattern);
    }
    if (headers != null) {
      String idString=headers[parsingDetail.getColumn()];
      idString=convertID(idString,sourceColumnIDType.getIdTypeParsingRules());
      columnIDMappingManager.addMapping(mappingType,columnID,idString);
    }
 else {
      columnIDMappingManager.addMapping(mappingType,columnID,"String_Node_Str" + columnCount++);
    }
  }
}