Program: 57447
Project: 57447
Buggy source:
/** 
 * <p> Creates a column for each TablePerspective supplied </p> <p> As StratomeX can only map between data sets that share a mapping between records, the imprinting of the IDType and IDCategory for the records is done here if there is no data set yet. </p>
 * @param newTablePerspectives
 * @param brickConfigurer The brick configurer can be specified externally (e.g., pathways, kaplan meier). If null, the {@link NumericalDataConfigurer} will be used.
 */
public void addTablePerspectives(List<TablePerspective> newTablePerspectives,IBrickConfigurer brickConfigurer){
  if (newTablePerspectives == null || newTablePerspectives.size() == 0) {
    Logger.log(new Status(Status.WARNING,this.toString(),"String_Node_Str"));
    return;
  }
  if (recordIDCategory == null) {
    ATableBasedDataDomain dataDomain=newTablePerspectives.get(0).getDataDomain();
    imprintVisBricks(dataDomain);
  }
  ArrayList<BrickColumn> brickColumns=brickColumnManager.getBrickColumns();
  for (  TablePerspective tablePerspective : newTablePerspectives) {
    if (tablePerspective == null) {
      Logger.log(new Status(Status.ERROR,this.toString(),"String_Node_Str"));
      continue;
    }
    if (!tablePerspective.getDataDomain().getTable().isDataHomogeneous() && brickConfigurer == null) {
      Logger.log(new Status(Status.WARNING,this.toString(),"String_Node_Str"));
      continue;
    }
    if (!tablePerspective.getDataDomain().getRecordIDCategory().equals(recordIDCategory)) {
      Logger.log(new Status(Status.ERROR,this.toString(),"String_Node_Str" + tablePerspective + "String_Node_Str"));
      continue;
    }
    boolean columnExists=false;
    for (    BrickColumn brickColumn : brickColumns) {
      if (brickColumn.getTablePerspective().getID() == tablePerspective.getID()) {
        columnExists=true;
        break;
      }
    }
    if (!columnExists) {
      BrickColumn brickColumn=(BrickColumn)GeneralManager.get().getViewManager().createGLView(BrickColumn.class,getParentGLCanvas(),parentComposite,new ViewFrustum(CameraProjectionMode.ORTHOGRAPHIC,0,1,0,1,-1,1));
      if (brickConfigurer == null) {
        if (tablePerspective.getNrDimensions() == 1) {
          brickConfigurer=new CategoricalDataConfigurer(tablePerspective);
        }
 else {
          brickConfigurer=new NumericalDataConfigurer(tablePerspective);
        }
      }
      brickColumn.setDetailLevel(this.getDetailLevel());
      brickColumn.setBrickConfigurer(brickConfigurer);
      brickColumn.setDataDomain(tablePerspective.getDataDomain());
      brickColumn.setTablePerspective(tablePerspective);
      brickColumn.setRemoteRenderingGLView(this);
      brickColumn.setStratomex(this);
      brickColumn.initialize();
      brickColumns.add(brickColumn);
      tablePerspectives.add(tablePerspective);
      uninitializedSubViews.add(brickColumn);
      brickColumnManager.setRightColumnStartIndex(brickColumnManager.getRightColumnStartIndex() + 1);
    }
  }
  TablePerspectivesChangedEvent event=new TablePerspectivesChangedEvent(this);
  event.setSender(this);
  GeneralManager.get().getEventPublisher().triggerEvent(event);
}

Fixed version (ground truth):
/** 
 * <p> Creates a column for each TablePerspective supplied </p> <p> As StratomeX can only map between data sets that share a mapping between records, the imprinting of the IDType and IDCategory for the records is done here if there is no data set yet. </p>
 * @param newTablePerspectives
 * @param brickConfigurer The brick configurer can be specified externally (e.g., pathways, kaplan meier). If null, the {@link NumericalDataConfigurer} will be used.
 */
public void addTablePerspectives(List<TablePerspective> newTablePerspectives,IBrickConfigurer brickConfigurer){
  if (newTablePerspectives == null || newTablePerspectives.size() == 0) {
    Logger.log(new Status(Status.WARNING,this.toString(),"String_Node_Str"));
    return;
  }
  if (recordIDCategory == null) {
    ATableBasedDataDomain dataDomain=newTablePerspectives.get(0).getDataDomain();
    imprintVisBricks(dataDomain);
  }
  ArrayList<BrickColumn> brickColumns=brickColumnManager.getBrickColumns();
  for (  TablePerspective tablePerspective : newTablePerspectives) {
    if (tablePerspective == null) {
      Logger.log(new Status(Status.ERROR,this.toString(),"String_Node_Str"));
      continue;
    }
    if (!tablePerspective.getDataDomain().getTable().isDataHomogeneous() && brickConfigurer == null) {
      Logger.log(new Status(Status.WARNING,this.toString(),"String_Node_Str"));
      continue;
    }
    if (!tablePerspective.getDataDomain().getRecordIDCategory().equals(recordIDCategory)) {
      Logger.log(new Status(Status.ERROR,this.toString(),"String_Node_Str" + tablePerspective + "String_Node_Str"));
      continue;
    }
    boolean columnExists=false;
    for (    BrickColumn brickColumn : brickColumns) {
      if (brickColumn.getTablePerspective().getID() == tablePerspective.getID()) {
        columnExists=true;
        break;
      }
    }
    if (!columnExists) {
      BrickColumn brickColumn=(BrickColumn)GeneralManager.get().getViewManager().createGLView(BrickColumn.class,getParentGLCanvas(),parentComposite,new ViewFrustum(CameraProjectionMode.ORTHOGRAPHIC,0,1,0,1,-1,1));
      if (brickConfigurer == null) {
        if (tablePerspective.getNrDimensions() == 1) {
          brickConfigurer=new CategoricalDataConfigurer(tablePerspective);
        }
 else {
          brickConfigurer=new NumericalDataConfigurer(tablePerspective);
        }
      }
      brickColumn.setDetailLevel(this.getDetailLevel());
      brickColumn.setBrickConfigurer(brickConfigurer);
      brickColumn.setDataDomain(tablePerspective.getDataDomain());
      brickColumn.setTablePerspective(tablePerspective);
      brickColumn.setRemoteRenderingGLView(this);
      brickColumn.setStratomex(this);
      brickColumn.initialize();
      brickColumns.add(brickColumnManager.getRightColumnStartIndex(),brickColumn);
      tablePerspectives.add(tablePerspective);
      uninitializedSubViews.add(brickColumn);
      brickColumnManager.setRightColumnStartIndex(brickColumnManager.getRightColumnStartIndex() + 1);
    }
  }
  TablePerspectivesChangedEvent event=new TablePerspectivesChangedEvent(this);
  event.setSender(this);
  GeneralManager.get().getEventPublisher().triggerEvent(event);
}