Program: 57234
Project: 57234
Buggy source:
public void addPathway(PathwayGraph pathway){
  if (tablePerspectives.size() <= 0)   return;
  PathwayDataDomain pathwayDataDomain=(PathwayDataDomain)DataDomainManager.get().getDataDomainByType(PathwayDataDomain.DATA_DOMAIN_TYPE);
  TablePerspective tablePerspective=tablePerspectives.get(0);
  Perspective oldRecordPerspective=tablePerspective.getRecordPerspective();
  Perspective newRecordPerspective=new Perspective(tablePerspective.getDataDomain(),oldRecordPerspective.getIdType());
  PerspectiveInitializationData data=new PerspectiveInitializationData();
  data.setData(oldRecordPerspective.getVirtualArray());
  newRecordPerspective.init(data);
  Perspective oldDimensionPerspective=tablePerspective.getDimensionPerspective();
  Perspective newDimensionPerspective=new Perspective(tablePerspective.getDataDomain(),oldDimensionPerspective.getIdType());
  data=new PerspectiveInitializationData();
  data.setData(oldDimensionPerspective.getVirtualArray());
  newDimensionPerspective.init(data);
  PathwayTablePerspective pathwayTablePerspective=new PathwayTablePerspective(tablePerspective.getDataDomain(),pathwayDataDomain,newRecordPerspective,newDimensionPerspective,pathway);
  pathwayDataDomain.addTablePerspective(pathwayTablePerspective);
  List<TablePerspective> pathwayTablePerspectives=new ArrayList<>(1);
  pathwayTablePerspectives.add(pathwayTablePerspective);
  PathwayMultiFormInfo info=new PathwayMultiFormInfo();
  info.pathway=pathway;
  info.age=currentPathwayAge--;
  createMultiformRenderer(pathwayTablePerspectives,EnumSet.of(EEmbeddingID.PATHWAY_LEVEL1,EEmbeddingID.PATHWAY_LEVEL2,EEmbeddingID.PATHWAY_LEVEL3,EEmbeddingID.PATHWAY_LEVEL4),pathwayRow,Float.NaN,info);
  pathwayLayout.addColumn(info.window);
  int rendererID=info.embeddingIDToRendererIDs.get(EEmbeddingID.PATHWAY_LEVEL1).get(0);
  if (info.multiFormRenderer.getActiveRendererID() != rendererID) {
    info.multiFormRenderer.setActive(rendererID);
  }
  lastUsedLevel1Renderer=info.multiFormRenderer;
  lastUsedRenderer=info.multiFormRenderer;
  pathwayInfos.add(info);
}

Fixed version (ground truth):
public void addPathway(PathwayGraph pathway){
  if (tablePerspectives.size() <= 0)   return;
  PathwayDataDomain pathwayDataDomain=(PathwayDataDomain)DataDomainManager.get().getDataDomainByType(PathwayDataDomain.DATA_DOMAIN_TYPE);
  TablePerspective tablePerspective=tablePerspectives.get(0);
  Perspective oldRecordPerspective=tablePerspective.getRecordPerspective();
  Perspective newRecordPerspective=new Perspective(tablePerspective.getDataDomain(),oldRecordPerspective.getIdType());
  PerspectiveInitializationData data=new PerspectiveInitializationData();
  data.setData(oldRecordPerspective.getVirtualArray());
  newRecordPerspective.init(data);
  Perspective oldDimensionPerspective=tablePerspective.getDimensionPerspective();
  Perspective newDimensionPerspective=new Perspective(tablePerspective.getDataDomain(),oldDimensionPerspective.getIdType());
  data=new PerspectiveInitializationData();
  data.setData(oldDimensionPerspective.getVirtualArray());
  newDimensionPerspective.init(data);
  PathwayTablePerspective pathwayTablePerspective=new PathwayTablePerspective(tablePerspective.getDataDomain(),pathwayDataDomain,newRecordPerspective,newDimensionPerspective,pathway);
  pathwayDataDomain.addTablePerspective(pathwayTablePerspective);
  List<TablePerspective> pathwayTablePerspectives=new ArrayList<>(1);
  pathwayTablePerspectives.add(pathwayTablePerspective);
  PathwayMultiFormInfo info=new PathwayMultiFormInfo();
  info.pathway=pathway;
  info.age=currentPathwayAge--;
  createMultiformRenderer(pathwayTablePerspectives,EnumSet.of(EEmbeddingID.PATHWAY_LEVEL1,EEmbeddingID.PATHWAY_LEVEL2,EEmbeddingID.PATHWAY_LEVEL3,EEmbeddingID.PATHWAY_LEVEL4),pathwayRow,Float.NaN,info);
  pathwayLayout.addColumn(info.window);
  int rendererID=info.embeddingIDToRendererIDs.get(EEmbeddingID.PATHWAY_LEVEL1).get(0);
  if (info.multiFormRenderer.getActiveRendererID() != rendererID) {
    info.multiFormRenderer.setActive(rendererID);
  }
  lastUsedLevel1Renderer=info.multiFormRenderer;
  lastUsedRenderer=info.multiFormRenderer;
  pathwayInfos.add(info);
  wasPathwayAdded=true;
}