Program: 57190
Project: 57190
Buggy source:
protected void updatePathwayPortals(){
  PathwayMultiFormInfo info=null;
  if (activeWindow instanceof GLPathwayWindow) {
    GLPathwayWindow w=(GLPathwayWindow)activeWindow;
    if (w.info instanceof PathwayMultiFormInfo) {
      info=(PathwayMultiFormInfo)w.info;
    }
  }
  if (info == null)   return;
  augmentation.clear();
  PathwayVertexRep lastNodeOfPrevSegment=null;
  for (  PathwayPath segment : pathSegments) {
    List<PathwayVertexRep> nodes=segment.getNodes();
    if (!nodes.isEmpty()) {
      if (lastNodeOfPrevSegment != null) {
        PathwayMultiFormInfo info1=getInfo(lastNodeOfPrevSegment);
        PathwayMultiFormInfo info2=getInfo(nodes.get(0));
        Rectangle2D loc1=getAbsoluteVertexLocation(getPathwayRepresentation(info1.multiFormRenderer,info1.multiFormRenderer.getActiveRendererID()),lastNodeOfPrevSegment,info1.container);
        Rectangle2D loc2=getAbsoluteVertexLocation(getPathwayRepresentation(info2.multiFormRenderer,info2.multiFormRenderer.getActiveRendererID()),nodes.get(0),info2.container);
        augmentation.add(new LinkRenderer(this,true,loc1,loc2,info1,info2,1,false,false,false,true,lastNodeOfPrevSegment,nodes.get(0)));
      }
      lastNodeOfPrevSegment=nodes.get(nodes.size() - 1);
    }
  }
  if (isShowPortals) {
    for (    PathwayVertexRep vertexRep : info.pathway.vertexSet()) {
      Pair<Rectangle2D,Boolean> sourcePair=getPortalLocation(vertexRep,info);
      for (      PathwayMultiFormInfo i : pathwayInfos) {
        if (info != i) {
          if (info.getCurrentEmbeddingID() != EEmbeddingID.PATHWAY_LEVEL1) {
            if (i.getCurrentEmbeddingID() == EEmbeddingID.PATHWAY_LEVEL1) {
              addLinkRenderers(vertexRep,info,i,sourcePair);
            }
          }
 else {
            addLinkRenderers(vertexRep,info,i,sourcePair);
          }
        }
 else {
        }
      }
    }
  }
}

Fixed version (ground truth):
protected void updatePathwayPortals(){
  PathwayMultiFormInfo info=null;
  if (activeWindow instanceof GLPathwayWindow) {
    GLPathwayWindow w=(GLPathwayWindow)activeWindow;
    if (w.info instanceof PathwayMultiFormInfo) {
      info=(PathwayMultiFormInfo)w.info;
    }
  }
  if (info == null)   return;
  augmentation.clear();
  PathwayVertexRep lastNodeOfPrevSegment=null;
  for (  PathwayPath segment : pathSegments) {
    List<PathwayVertexRep> nodes=segment.getNodes();
    if (!nodes.isEmpty()) {
      if (lastNodeOfPrevSegment != null) {
        PathwayMultiFormInfo info1=getInfo(lastNodeOfPrevSegment);
        PathwayMultiFormInfo info2=getInfo(nodes.get(0));
        if (pathwayRow.getVisibility() == EVisibility.NONE)         continue;
        Rectangle2D loc1=getAbsoluteVertexLocation(getPathwayRepresentation(info1.multiFormRenderer,info1.multiFormRenderer.getActiveRendererID()),lastNodeOfPrevSegment,info1.container);
        Rectangle2D loc2=getAbsoluteVertexLocation(getPathwayRepresentation(info2.multiFormRenderer,info2.multiFormRenderer.getActiveRendererID()),nodes.get(0),info2.container);
        augmentation.add(new LinkRenderer(this,true,loc1,loc2,info1,info2,1,false,false,false,true,lastNodeOfPrevSegment,nodes.get(0)));
      }
      lastNodeOfPrevSegment=nodes.get(nodes.size() - 1);
    }
  }
  if (isShowPortals) {
    for (    PathwayVertexRep vertexRep : info.pathway.vertexSet()) {
      Pair<Rectangle2D,Boolean> sourcePair=getPortalLocation(vertexRep,info);
      for (      PathwayMultiFormInfo i : pathwayInfos) {
        if (info != i) {
          if (info.getCurrentEmbeddingID() != EEmbeddingID.PATHWAY_LEVEL1) {
            if (i.getCurrentEmbeddingID() == EEmbeddingID.PATHWAY_LEVEL1) {
              addLinkRenderers(vertexRep,info,i,sourcePair);
            }
          }
 else {
            addLinkRenderers(vertexRep,info,i,sourcePair);
          }
        }
 else {
        }
      }
    }
  }
}