Program: 57215
Project: 57215
Buggy source:
public void addPathway(PathwayGraph pathway){
  PathwayDataDomain pathwayDataDomain=(PathwayDataDomain)DataDomainManager.get().getDataDomainByType(PathwayDataDomain.DATA_DOMAIN_TYPE);
  List<TablePerspective> tablePerspectives=new ArrayList<>(experimentalDataMappingElement.getTablePerspectives());
  TablePerspective tablePerspective=tablePerspectives.get(0);
  Perspective recordPerspective=tablePerspective.getRecordPerspective();
  Perspective dimensionPerspective=tablePerspective.getDimensionPerspective();
  PathwayTablePerspective pathwayTablePerspective=new PathwayTablePerspective(tablePerspective.getDataDomain(),pathwayDataDomain,recordPerspective,dimensionPerspective,pathway);
  pathwayDataDomain.addTablePerspective(pathwayTablePerspective);
  List<TablePerspective> pathwayTablePerspectives=new ArrayList<>(1);
  pathwayTablePerspectives.add(pathwayTablePerspective);
  for (int i=1; i < tablePerspectives.size(); i++) {
    pathwayTablePerspectives.add(tablePerspectives.get(i));
  }
  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;
  addPortalsOfPathway(info);
  pathwayInfos.add(info);
  wasPathwayAdded=true;
}

Fixed version (ground truth):
public void addPathway(PathwayGraph pathway){
  PathwayDataDomain pathwayDataDomain=(PathwayDataDomain)DataDomainManager.get().getDataDomainByType(PathwayDataDomain.DATA_DOMAIN_TYPE);
  List<TablePerspective> tablePerspectives=new ArrayList<>(experimentalDataMappingElement.getTablePerspectives());
  TablePerspective tablePerspective=tablePerspectives.get(0);
  Perspective recordPerspective=tablePerspective.getRecordPerspective();
  Perspective dimensionPerspective=tablePerspective.getDimensionPerspective();
  PathwayTablePerspective pathwayTablePerspective=new PathwayTablePerspective(tablePerspective.getDataDomain(),pathwayDataDomain,recordPerspective,dimensionPerspective,pathway);
  pathwayDataDomain.addTablePerspective(pathwayTablePerspective);
  List<TablePerspective> pathwayTablePerspectives=new ArrayList<>(1);
  pathwayTablePerspectives.add(pathwayTablePerspective);
  for (int i=1; i < tablePerspectives.size(); i++) {
    pathwayTablePerspectives.add(tablePerspectives.get(i));
  }
  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);
  addPortalsOfPathway(info);
  wasPathwayAdded=true;
}