nus-yam/ex-repair huggingface dataset:
Program: 59164
Project: 59164
Buggy source:
public List<IGraphItem> getSearchResult(){
  if (iSearchDepth < 1) {
    return new ArrayList<IGraphItem>(0);
  }
  List<IGraphItem> resultList=new ArrayList<IGraphItem>();
  List<IGraphItem> tmpList=this.itemSource.getAllItemsByProp(prop);
  Iterator<IGraphItem> iterTmpGraphItems=tmpList.iterator();
  while (iterTmpGraphItems.hasNext()) {
    resultList.add(iterTmpGraphItems.next());
  }
  if (iSearchDepth == 1) {
    depthSortedList.add(0,resultList);
    return resultList;
  }
  List<IGraphItem> currentSourceList=new ArrayList<IGraphItem>(resultList);
  depthSortedList.add(0,currentSourceList);
  for (int iCurrentDepthIndex=1; iCurrentDepthIndex < this.iSearchDepth; iCurrentDepthIndex++) {
    List<IGraphItem> currentLevel=new ArrayList<IGraphItem>();
    Iterator<IGraphItem> iter=currentSourceList.iterator();
    while (iter.hasNext()) {
      Iterator<IGraphItem> iterInner=iter.next().getAllItemsByProp(prop).iterator();
      while (iterInner.hasNext()) {
        IGraphItem item=iterInner.next();
        if (!resultList.contains(item)) {
          resultList.add(item);
          currentLevel.add(item);
        }
      }
    }
    depthSortedList.add(iCurrentDepthIndex,currentLevel);
    currentSourceList=currentLevel;
  }
  return resultList;
}

Fixed version (ground truth):
public List<IGraphItem> getSearchResult(){
  if (iSearchDepth < 1) {
    return new ArrayList<IGraphItem>(0);
  }
  List<IGraphItem> resultList=new ArrayList<IGraphItem>();
  List<IGraphItem> tmpList=this.itemSource.getAllItemsByProp(prop);
  Iterator<IGraphItem> iterTmpGraphItems=tmpList.iterator();
  while (iterTmpGraphItems.hasNext()) {
    resultList.add(iterTmpGraphItems.next());
  }
  if (iSearchDepth == 1) {
    depthSortedList.set(0,resultList);
    return resultList;
  }
  List<IGraphItem> currentSourceList=new ArrayList<IGraphItem>(resultList);
  depthSortedList.set(0,currentSourceList);
  for (int iCurrentDepthIndex=1; iCurrentDepthIndex < this.iSearchDepth; iCurrentDepthIndex++) {
    List<IGraphItem> currentLevel=new ArrayList<IGraphItem>();
    Iterator<IGraphItem> iter=currentSourceList.iterator();
    while (iter.hasNext()) {
      Iterator<IGraphItem> iterInner=iter.next().getAllItemsByProp(prop).iterator();
      while (iterInner.hasNext()) {
        IGraphItem item=iterInner.next();
        if (!resultList.contains(item)) {
          resultList.add(item);
          currentLevel.add(item);
        }
      }
    }
    depthSortedList.set(iCurrentDepthIndex,currentLevel);
    currentSourceList=currentLevel;
  }
  return resultList;
}
Program: 59167
Project: 59167
Buggy source:
private void drawPickedObjectInfoSingle(final GL gl,final PathwayVertex pickedVertex,final boolean bDrawDisplaced){
  if (fArWorldCoordinatePosition == null)   return;
  gl.glPushMatrix();
  gl.glTranslatef(fArWorldCoordinatePosition[0],fArWorldCoordinatePosition[1],fZValue);
  if (bDrawDisplaced) {
    float fOffsetX=1.0f;
    float fOffsetY=1.0f;
    gl.glScalef(fScaleFactor,fScaleFactor,fScaleFactor);
    gl.glLineWidth(2);
    gl.glColor4f(0.5f,0.5f,0.5f,0.8f);
    gl.glBegin(GL.GL_TRIANGLES);
    gl.glVertex3f(0,0,-fZValue);
    gl.glVertex3f(fOffsetX,fOffsetY - fHeight,0);
    gl.glVertex3f(fOffsetX,fOffsetY,0);
    gl.glEnd();
    gl.glColor3f(0.2f,0.2f,0.2f);
    gl.glBegin(GL.GL_LINE_LOOP);
    gl.glVertex3f(0,0,-fZValue);
    gl.glVertex3f(fOffsetX,fOffsetY - fHeight,0);
    gl.glVertex3f(fOffsetX,fOffsetY,0);
    gl.glEnd();
    gl.glTranslatef(fOffsetX,fOffsetY,0.0f);
  }
  if (fScaleFactor < 1.0f) {
    gl.glPopMatrix();
    return;
  }
  float fMaxWidth=calculateInfoAreaWidth(pickedVertex);
  gl.glColor4f(0.5f,0.5f,0.5f,0.8f);
  gl.glBegin(GL.GL_POLYGON);
  gl.glVertex3f(0,0,0);
  gl.glVertex3f(fMaxWidth,0,0);
  gl.glVertex3f(fMaxWidth,-fHeight,0);
  gl.glVertex3f(0,-fHeight,0);
  gl.glEnd();
  gl.glColor3f(0.2f,0.2f,0.2f);
  gl.glBegin(GL.GL_LINE_LOOP);
  gl.glVertex3f(0,0,0);
  gl.glVertex3f(fMaxWidth,0,0);
  gl.glVertex3f(fMaxWidth,-fHeight,0);
  gl.glVertex3f(0,-fHeight,0);
  gl.glEnd();
  drawMappingAnnotation(gl,pickedVertex);
  gl.glPopMatrix();
}

Fixed version (ground truth):
private void drawPickedObjectInfoSingle(final GL gl,final PathwayVertex pickedVertex,final boolean bDrawDisplaced){
  if (fArWorldCoordinatePosition == null)   return;
  gl.glPushMatrix();
  gl.glTranslatef(fArWorldCoordinatePosition[0],fArWorldCoordinatePosition[1],fZValue);
  if (bDrawDisplaced) {
    float fOffsetX=0.5f;
    float fOffsetY=0.7f;
    gl.glScalef(fScaleFactor,fScaleFactor,fScaleFactor);
    gl.glLineWidth(2);
    gl.glColor4f(0.5f,0.5f,0.5f,0.8f);
    gl.glBegin(GL.GL_TRIANGLES);
    gl.glVertex3f(0,0,-fZValue);
    gl.glVertex3f(fOffsetX,fOffsetY - fHeight,0);
    gl.glVertex3f(fOffsetX,fOffsetY,0);
    gl.glEnd();
    gl.glColor3f(0.2f,0.2f,0.2f);
    gl.glBegin(GL.GL_LINE_LOOP);
    gl.glVertex3f(0,0,-fZValue);
    gl.glVertex3f(fOffsetX,fOffsetY - fHeight,0);
    gl.glVertex3f(fOffsetX,fOffsetY,0);
    gl.glEnd();
    gl.glTranslatef(fOffsetX,fOffsetY,0.0f);
  }
  if (fScaleFactor < 1.0f) {
    gl.glPopMatrix();
    return;
  }
  float fMaxWidth=calculateInfoAreaWidth(pickedVertex);
  gl.glColor4f(0.5f,0.5f,0.5f,0.8f);
  gl.glBegin(GL.GL_POLYGON);
  gl.glVertex3f(0,0,0);
  gl.glVertex3f(fMaxWidth,0,0);
  gl.glVertex3f(fMaxWidth,-fHeight,0);
  gl.glVertex3f(0,-fHeight,0);
  gl.glEnd();
  gl.glColor3f(0.2f,0.2f,0.2f);
  gl.glBegin(GL.GL_LINE_LOOP);
  gl.glVertex3f(0,0,0);
  gl.glVertex3f(fMaxWidth,0,0);
  gl.glVertex3f(fMaxWidth,-fHeight,0);
  gl.glVertex3f(0,-fHeight,0);
  gl.glEnd();
  drawMappingAnnotation(gl,pickedVertex);
  gl.glPopMatrix();
}
Program: 59168
Project: 59168
Buggy source:
public static void renderTextInRegion(final GL gl,String showText,final int iSize,final float fx,final float fy,final float fz,final float fWidth,final float fHeight){
  int iMaxLineChars=(int)(fWidth / 0.006f);
  if (iMaxLineChars < 3)   return;
  float fLineHeight=0.03f;
  int iTotalLines=showText.length() / iMaxLineChars;
  String sTmpText;
  for (int iLineIndex=0; iLineIndex <= iTotalLines; iLineIndex++) {
    if (showText.length() <= iMaxLineChars) {
      renderText(gl,showText,iSize,fx,fy + iLineIndex * fLineHeight,fz);
      showText="String_Node_Str";
    }
 else {
      sTmpText=showText.subSequence(0,iMaxLineChars).toString();
      if (sTmpText.contains("String_Node_Str"))       sTmpText=sTmpText.substring(0,sTmpText.lastIndexOf(' '));
      renderText(gl,sTmpText,iSize,fx,fy + iLineIndex * fLineHeight,fz);
      showText=showText.substring(sTmpText.length(),showText.length());
    }
  }
}

Fixed version (ground truth):
public static void renderTextInRegion(final GL gl,String showText,final int iSize,final float fx,final float fy,final float fz,final float fWidth,final float fHeight){
  int iMaxLineChars=(int)(fWidth / 0.006f);
  if (iMaxLineChars < 3)   return;
  float fLineHeight=0.03f;
  int iTotalLines=showText.length() / iMaxLineChars;
  String sTmpText;
  for (int iLineIndex=0; iLineIndex <= iTotalLines; iLineIndex++) {
    if (showText.length() <= iMaxLineChars) {
      renderText(gl,showText,iSize,fx,fy - iLineIndex * fLineHeight,fz);
      showText="String_Node_Str";
    }
 else {
      sTmpText=showText.subSequence(0,iMaxLineChars).toString();
      if (sTmpText.contains("String_Node_Str"))       sTmpText=sTmpText.substring(0,sTmpText.lastIndexOf(' '));
      renderText(gl,sTmpText,iSize,fx,fy - iLineIndex * fLineHeight,fz);
      showText=showText.substring(sTmpText.length(),showText.length());
    }
  }
}
Program: 59169
Project: 59169
Buggy source:
private void rebuildVisiblePathwayDisplayLists(final GL gl){
  Iterator<Integer> iterVisiblePathway=pathwayLayeredLayer.getElementList().iterator();
  while (iterVisiblePathway.hasNext()) {
    refGLPathwayManager.buildPathwayDisplayList(gl,iterVisiblePathway.next());
  }
  if (!pathwayLayeredLayer.containsElement(pathwayUnderInteractionLayer.getElementIdByPositionIndex(0))) {
    refGLPathwayManager.buildPathwayDisplayList(gl,pathwayUnderInteractionLayer.getElementIdByPositionIndex(0));
  }
}

Fixed version (ground truth):
private void rebuildVisiblePathwayDisplayLists(final GL gl){
  refGLPathwayManager.clearOldPickingIDs();
  Iterator<Integer> iterVisiblePathway=pathwayLayeredLayer.getElementList().iterator();
  while (iterVisiblePathway.hasNext()) {
    refGLPathwayManager.buildPathwayDisplayList(gl,iterVisiblePathway.next());
  }
  if (!pathwayLayeredLayer.containsElement(pathwayUnderInteractionLayer.getElementIdByPositionIndex(0))) {
    refGLPathwayManager.buildPathwayDisplayList(gl,pathwayUnderInteractionLayer.getElementIdByPositionIndex(0));
  }
}
Program: 59171
Project: 59171
Buggy source:
public void renderInfoArea(final GL gl,final PathwayVertex pickedVertex){
  if (fScaleFactor < 1.0)   fScaleFactor+=0.04;
  if (pickedVertex.getVertexType().equals(PathwayVertexType.gene))   extractMultipleGeneMapping(pickedVertex);
  if (pickedVertex.getElementTitle().contains("String_Node_Str")) {
    drawPickedObjectInfoStar(gl,pickedVertex);
  }
 else {
    drawPickedObjectInfoSingle(gl,pickedVertex,true);
  }
}

Fixed version (ground truth):
public void renderInfoArea(final GL gl,final PathwayVertex pickedVertex){
  if (fScaleFactor < 1.0)   fScaleFactor+=0.04;
  if (pickedVertex.getVertexType().equals(PathwayVertexType.gene))   extractMultipleGeneMapping(pickedVertex);
  if (pickedVertex.getElementTitle().contains("String_Node_Str") && pickedVertex.getElementTitle().contains("String_Node_Str")) {
    drawPickedObjectInfoStar(gl,pickedVertex);
  }
 else {
    drawPickedObjectInfoSingle(gl,pickedVertex,true);
  }
}
Program: 59174
Project: 59174
Buggy source:
private void loadPathwayToUnderInteractionPosition(int iPathwayId){
  refGeneralManager.getSingelton().logMsg(this.getClass().getSimpleName() + "String_Node_Str" + iPathwayId+ "String_Node_Str",LoggerType.VERBOSE);
  if (iSlerpFactor > 0 && iSlerpFactor < 1000)   return;
  arSlerpActions.clear();
  if (!refGeneralManager.getSingelton().getPathwayManager().hasItem(iPathwayId))   return;
  if (!pathwayUnderInteractionLayer.getElementList().isEmpty()) {
    SlerpAction reverseSlerpAction=new SlerpAction(pathwayUnderInteractionLayer.getElementIdByPositionIndex(0),pathwayUnderInteractionLayer,true);
    arSlerpActions.add(reverseSlerpAction);
  }
  SlerpAction slerpAction;
  slerpAction=new SlerpAction(iPathwayId,pathwayPoolLayer,false);
  arSlerpActions.add(slerpAction);
  slerpAction=new SlerpAction(iPathwayId,pathwayLayeredLayer,false);
  arSlerpActions.add(slerpAction);
  iSlerpFactor=0;
  int[] tmp=new int[1];
  tmp[0]=iPathwayId;
  alSetSelection.get(0).updateSelectionSet(iUniqueId,new int[0],new int[0],tmp);
}

Fixed version (ground truth):
private void loadPathwayToUnderInteractionPosition(final GL gl,final int iPathwayId){
  refGeneralManager.getSingelton().logMsg(this.getClass().getSimpleName() + "String_Node_Str" + iPathwayId+ "String_Node_Str",LoggerType.VERBOSE);
  if (iSlerpFactor > 0 && iSlerpFactor < 1000)   return;
  arSlerpActions.clear();
  if (!refGeneralManager.getSingelton().getPathwayManager().hasItem(iPathwayId))   return;
  if (!pathwayUnderInteractionLayer.getElementList().isEmpty()) {
    SlerpAction reverseSlerpAction=new SlerpAction(pathwayUnderInteractionLayer.getElementIdByPositionIndex(0),pathwayUnderInteractionLayer,true);
    arSlerpActions.add(reverseSlerpAction);
  }
  SlerpAction slerpAction;
  slerpAction=new SlerpAction(iPathwayId,pathwayPoolLayer,false);
  arSlerpActions.add(slerpAction);
  slerpAction=new SlerpAction(iPathwayId,pathwayLayeredLayer,false);
  arSlerpActions.add(slerpAction);
  iSlerpFactor=0;
  rebuildVisiblePathwayDisplayLists(gl);
  int[] tmp=new int[1];
  tmp[0]=iPathwayId;
  alSetSelection.get(0).updateSelectionSet(iUniqueId,new int[0],new int[0],tmp);
}
Program: 59175
Project: 59175
Buggy source:
private void doSlerpActions(final GL gl){
  if (!arSlerpActions.isEmpty()) {
    slerpPathway(gl,arSlerpActions.get(0));
    selectedVertex=null;
  }
 else   if (arSlerpActions.isEmpty() && bSelectionChanged) {
    highlightIdenticalNodes(gl,selectedVertex);
    bSelectionChanged=false;
    Iterator<Integer> iterVisiblePathway=pathwayLayeredLayer.getElementList().iterator();
    while (iterVisiblePathway.hasNext()) {
      refGLPathwayManager.buildPathwayDisplayList(gl,iterVisiblePathway.next());
    }
    refGLPathwayManager.buildPathwayDisplayList(gl,pathwayUnderInteractionLayer.getElementIdByPositionIndex(0));
  }
  if (iSlerpFactor < 1000) {
    iSlerpFactor+=15;
  }
}

Fixed version (ground truth):
private void doSlerpActions(final GL gl){
  if (!arSlerpActions.isEmpty()) {
    slerpPathway(gl,arSlerpActions.get(0));
  }
 else   if (arSlerpActions.isEmpty() && bSelectionChanged) {
    bSelectionChanged=false;
    highlightIdenticalNodes(gl,selectedVertex);
    rebuildVisiblePathwayDisplayLists(gl);
  }
  if (iSlerpFactor < 1000) {
    iSlerpFactor+=15;
  }
}
Program: 59176
Project: 59176
Buggy source:
@SuppressWarnings("String_Node_Str") protected void highlightIdenticalNodes(final GL gl,final PathwayVertex refVertex){
  iAlSelectedElements.clear();
  Pathway refTmpPathway=null;
  PathwayVertex refTmpVertex=null;
  Iterator<PathwayVertex> iterIdenticalVertices=null;
  int iPathwayId=0;
  LinkedList<Integer> tmpVisiblePathways=(LinkedList<Integer>)pathwayLayeredLayer.getElementList().clone();
  tmpVisiblePathways.add(pathwayUnderInteractionLayer.getElementIdByPositionIndex(0));
  Iterator<Integer> iterVisiblePathway=tmpVisiblePathways.iterator();
  while (iterVisiblePathway.hasNext()) {
    iPathwayId=iterVisiblePathway.next();
    refTmpPathway=(Pathway)refGeneralManager.getSingelton().getPathwayManager().getItem(iPathwayId);
    iterIdenticalVertices=refGeneralManager.getSingelton().getPathwayElementManager().getPathwayVertexListByName(refVertex.getElementTitle()).iterator();
    while (iterIdenticalVertices.hasNext()) {
      refTmpVertex=iterIdenticalVertices.next();
      if (refTmpPathway.isVertexInPathway(refTmpVertex) == true) {
        if (refTmpVertex != null) {
          iAlSelectedElements.add(refTmpVertex.getElementId());
          System.out.println("String_Node_Str" + refTmpVertex.getElementTitle() + "String_Node_Str");
        }
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected void highlightIdenticalNodes(final GL gl,final PathwayVertex refVertex){
  iAlSelectedElements.clear();
  Pathway refTmpPathway=null;
  PathwayVertex refTmpVertex=null;
  Iterator<PathwayVertex> iterIdenticalVertices=null;
  int iPathwayId=0;
  LinkedList<Integer> tmpVisiblePathways=(LinkedList<Integer>)pathwayLayeredLayer.getElementList().clone();
  if (!tmpVisiblePathways.contains(pathwayUnderInteractionLayer.getElementIdByPositionIndex(0)))   tmpVisiblePathways.add(pathwayUnderInteractionLayer.getElementIdByPositionIndex(0));
  Iterator<Integer> iterVisiblePathway=tmpVisiblePathways.iterator();
  while (iterVisiblePathway.hasNext()) {
    iPathwayId=iterVisiblePathway.next();
    System.out.println("String_Node_Str" + iPathwayId + "String_Node_Str");
    refTmpPathway=(Pathway)refGeneralManager.getSingelton().getPathwayManager().getItem(iPathwayId);
    iterIdenticalVertices=refGeneralManager.getSingelton().getPathwayElementManager().getPathwayVertexListByName(refVertex.getElementTitle()).iterator();
    while (iterIdenticalVertices.hasNext()) {
      refTmpVertex=iterIdenticalVertices.next();
      if (refTmpPathway.isVertexInPathway(refTmpVertex) == true && refTmpVertex.getVertexRepByIndex(0) != null) {
        iAlSelectedElements.add(refTmpVertex.getElementId());
        System.out.println("String_Node_Str" + refTmpVertex.getElementTitle() + "String_Node_Str");
      }
    }
  }
}
Program: 59177
Project: 59177
Buggy source:
private void buildPathwayPool(final GL gl){
  float fTiltAngleDegree=90;
  float fTiltAngleRad=Vec3f.convertGrad2Radiant(fTiltAngleDegree);
  int iMaxLines=200;
  Transform transform;
  for (int iLineIndex=0; iLineIndex < iMaxLines; iLineIndex++) {
    transform=new Transform();
    transform.setRotation(new Rotf(fTiltAngleRad,-1,0,0));
    pathwayPoolLayer.setTransformByPositionIndex(iLineIndex,transform);
  }
  IStorage tmpStorage=alSetData.get(0).getStorageByDimAndIndex(0,0);
  int[] iArPathwayIDs=tmpStorage.getArrayInt();
  int iPathwayId=0;
  for (int iPathwayIndex=0; iPathwayIndex < tmpStorage.getSize(StorageType.INT); iPathwayIndex++) {
    iPathwayId=iArPathwayIDs[iPathwayIndex];
    boolean bLoadingOK=refGeneralManager.getSingelton().getPathwayManager().loadPathwayById(iPathwayId);
    if (!bLoadingOK)     return;
    refGLPathwayManager.buildPathwayDisplayList(gl,iPathwayId);
    pathwayPoolLayer.addElement(iPathwayId);
  }
}

Fixed version (ground truth):
private void buildPathwayPool(final GL gl){
  float fTiltAngleDegree=90;
  float fTiltAngleRad=Vec3f.convertGrad2Radiant(fTiltAngleDegree);
  int iMaxLines=200;
  Transform transform;
  for (int iLineIndex=0; iLineIndex < iMaxLines; iLineIndex++) {
    transform=new Transform();
    transform.setRotation(new Rotf(fTiltAngleRad,-1,0,0));
    pathwayPoolLayer.setTransformByPositionIndex(iLineIndex,transform);
  }
  IStorage tmpStorage=alSetData.get(0).getStorageByDimAndIndex(0,0);
  int[] iArPathwayIDs=tmpStorage.getArrayInt();
  int iPathwayId=0;
  for (int iPathwayIndex=0; iPathwayIndex < tmpStorage.getSize(StorageType.INT); iPathwayIndex++) {
    iPathwayId=iArPathwayIDs[iPathwayIndex];
    boolean bLoadingOK=refGeneralManager.getSingelton().getPathwayManager().loadPathwayById(iPathwayId);
    if (!bLoadingOK)     return;
    pathwayPoolLayer.addElement(iPathwayId);
  }
}
Program: 59178
Project: 59178
Buggy source:
public void loadDependentPathwayContainingVertex(final GL gl,final PathwayVertex refVertex){
  IStorage tmpStorage=alSetData.get(0).getStorageByDimAndIndex(0,0);
  int[] iArPathwayIDs=tmpStorage.getArrayInt();
  Iterator<PathwayVertex> iterIdenticalVertices=null;
  Pathway refTmpPathway=null;
  PathwayVertex refTmpVertex=null;
  int iPathwayId=0;
  int iMaxPathways=4;
  int iMaxPathwayCount=0;
  for (int iPathwayIndex=0; iPathwayIndex < tmpStorage.getSize(StorageType.INT); iPathwayIndex++) {
    iPathwayId=iArPathwayIDs[iPathwayIndex];
    refTmpPathway=(Pathway)refGeneralManager.getSingelton().getPathwayManager().getItem(iPathwayId);
    iterIdenticalVertices=refGeneralManager.getSingelton().getPathwayElementManager().getPathwayVertexListByName(refVertex.getElementTitle()).iterator();
    while (iterIdenticalVertices.hasNext()) {
      refTmpVertex=iterIdenticalVertices.next();
      if (refTmpPathway.isVertexInPathway(refTmpVertex) == true) {
        if (refTmpVertex != null) {
          SlerpAction slerpAction;
          if (!pathwayLayeredLayer.containsElement(iPathwayId)) {
            if (iMaxPathwayCount >= iMaxPathways)             return;
            iMaxPathwayCount++;
            slerpAction=new SlerpAction(iPathwayId,pathwayPoolLayer,false);
            arSlerpActions.add(slerpAction);
            iSlerpFactor=0;
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public void loadDependentPathwayContainingVertex(final GL gl,final PathwayVertex refVertex){
  IStorage tmpStorage=alSetData.get(0).getStorageByDimAndIndex(0,0);
  int[] iArPathwayIDs=tmpStorage.getArrayInt();
  Iterator<PathwayVertex> iterIdenticalVertices=null;
  Pathway refTmpPathway=null;
  PathwayVertex refTmpVertex=null;
  int iPathwayId=0;
  int iMaxPathways=4;
  int iMaxPathwayCount=0;
  for (int iPathwayIndex=0; iPathwayIndex < tmpStorage.getSize(StorageType.INT); iPathwayIndex++) {
    iPathwayId=iArPathwayIDs[iPathwayIndex];
    refTmpPathway=(Pathway)refGeneralManager.getSingelton().getPathwayManager().getItem(iPathwayId);
    iterIdenticalVertices=refGeneralManager.getSingelton().getPathwayElementManager().getPathwayVertexListByName(refVertex.getElementTitle()).iterator();
    while (iterIdenticalVertices.hasNext()) {
      refTmpVertex=iterIdenticalVertices.next();
      if (refTmpPathway.isVertexInPathway(refTmpVertex) == true && refTmpVertex.getVertexRepByIndex(0) != null) {
        System.out.println("String_Node_Str" + iPathwayId);
        SlerpAction slerpAction;
        if (!pathwayLayeredLayer.containsElement(iPathwayId)) {
          if (iMaxPathwayCount >= iMaxPathways)           break;
          iMaxPathwayCount++;
          slerpAction=new SlerpAction(iPathwayId,pathwayPoolLayer,false);
          arSlerpActions.add(slerpAction);
          iSlerpFactor=0;
        }
      }
    }
  }
  rebuildVisiblePathwayDisplayLists(gl);
}
Program: 59179
Project: 59179
Buggy source:
public Texture loadPathwayTextureById(int iPathwayID){
  if (refHashPathwayIdToTexture.containsKey(iPathwayID))   return refHashPathwayIdToTexture.get(iPathwayID);
  String sPathwayTexturePath="String_Node_Str";
  Texture refPathwayTexture;
  if (iPathwayID < 10) {
    sPathwayTexturePath="String_Node_Str" + Integer.toString(iPathwayID);
  }
 else   if (iPathwayID < 100 && iPathwayID >= 10) {
    sPathwayTexturePath="String_Node_Str" + Integer.toString(iPathwayID);
  }
 else   if (iPathwayID < 1000 && iPathwayID >= 100) {
    sPathwayTexturePath="String_Node_Str" + Integer.toString(iPathwayID);
  }
 else   if (iPathwayID < 10000 && iPathwayID >= 1000) {
    sPathwayTexturePath="String_Node_Str" + Integer.toString(iPathwayID);
  }
  sPathwayTexturePath=refGeneralManager.getSingelton().getPathwayManager().getPathwayImagePath() + sPathwayTexturePath + "String_Node_Str";
  try {
    refPathwayTexture=TextureIO.newTexture(TextureIO.newTextureData(new File(sPathwayTexturePath),false,"String_Node_Str"));
    refHashPathwayIdToTexture.put(iPathwayID,refPathwayTexture);
    refGeneralManager.getSingelton().logMsg(this.getClass().getSimpleName() + "String_Node_Str" + iPathwayID,LoggerType.VERBOSE);
    return refPathwayTexture;
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + sPathwayTexturePath);
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
public Texture loadPathwayTextureById(int iPathwayID){
  if (refHashPathwayIdToTexture.containsKey(iPathwayID))   return refHashPathwayIdToTexture.get(iPathwayID);
  String sPathwayTexturePath="String_Node_Str";
  Texture refPathwayTexture;
  if (iPathwayID < 10) {
    sPathwayTexturePath="String_Node_Str" + Integer.toString(iPathwayID);
  }
 else   if (iPathwayID < 100 && iPathwayID >= 10) {
    sPathwayTexturePath="String_Node_Str" + Integer.toString(iPathwayID);
  }
 else   if (iPathwayID < 1000 && iPathwayID >= 100) {
    sPathwayTexturePath="String_Node_Str" + Integer.toString(iPathwayID);
  }
 else   if (iPathwayID < 10000 && iPathwayID >= 1000) {
    sPathwayTexturePath="String_Node_Str" + Integer.toString(iPathwayID);
  }
  sPathwayTexturePath=refGeneralManager.getSingelton().getPathwayManager().getPathwayImagePath() + sPathwayTexturePath + "String_Node_Str";
  try {
    refPathwayTexture=TextureIO.newTexture(TextureIO.newTextureData(new File(sPathwayTexturePath),true,"String_Node_Str"));
    refHashPathwayIdToTexture.put(iPathwayID,refPathwayTexture);
    refGeneralManager.getSingelton().logMsg(this.getClass().getSimpleName() + "String_Node_Str" + iPathwayID,LoggerType.VERBOSE);
    return refPathwayTexture;
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + sPathwayTexturePath);
    e.printStackTrace();
  }
  return null;
}
Program: 59180
Project: 59180
Buggy source:
protected void handleSubtypeTag(){
  String sName="String_Node_Str";
  int iCompoundId=0;
  for (int iAttributeIndex=0; iAttributeIndex < attributes.getLength(); iAttributeIndex++) {
    sAttributeName=attributes.getLocalName(iAttributeIndex);
    if ("String_Node_Str".equals(sAttributeName)) {
      sAttributeName=attributes.getQName(iAttributeIndex);
    }
    if (sAttributeName.equals("String_Node_Str"))     sName=attributes.getValue(iAttributeIndex);
 else     if (sAttributeName.equals("String_Node_Str")) {
      if (attributes.getValue(iAttributeIndex).contains("String_Node_Str") || attributes.getValue(iAttributeIndex).contains("String_Node_Str") || attributes.getValue(iAttributeIndex).contains("String_Node_Str")|| attributes.getValue(iAttributeIndex).contains("String_Node_Str"))       iCompoundId=0;
 else       iCompoundId=new Integer(attributes.getValue(iAttributeIndex));
    }
  }
  if (sName.equals("String_Node_Str")) {
    refGeneralManager.getSingelton().getPathwayElementManager().addRelationCompound(kgmlIdToElementIdLUT.get(iCompoundId));
  }
}

Fixed version (ground truth):
protected void handleSubtypeTag(){
  String sName="String_Node_Str";
  int iCompoundId=0;
  for (int iAttributeIndex=0; iAttributeIndex < attributes.getLength(); iAttributeIndex++) {
    sAttributeName=attributes.getLocalName(iAttributeIndex);
    if ("String_Node_Str".equals(sAttributeName)) {
      sAttributeName=attributes.getQName(iAttributeIndex);
    }
    if (sAttributeName.equals("String_Node_Str"))     sName=attributes.getValue(iAttributeIndex);
 else     if (sAttributeName.equals("String_Node_Str")) {
      if (attributes.getValue(iAttributeIndex).contains("String_Node_Str") || attributes.getValue(iAttributeIndex).contains("String_Node_Str") || attributes.getValue(iAttributeIndex).contains("String_Node_Str")|| attributes.getValue(iAttributeIndex).contains("String_Node_Str")|| attributes.getValue(iAttributeIndex).contains("String_Node_Str"))       iCompoundId=0;
 else       iCompoundId=new Integer(attributes.getValue(iAttributeIndex));
    }
  }
  if (sName.equals("String_Node_Str")) {
    refGeneralManager.getSingelton().getPathwayElementManager().addRelationCompound(kgmlIdToElementIdLUT.get(iCompoundId));
  }
}
Program: 59181
Project: 59181
Buggy source:
public void addGLCanvasUser(IGLCanvasUser user){
  if (vecGLCanvasUser.contains(user)) {
    throw new CerberusRuntimeException("String_Node_Str");
  }
  if (!super.abEnableRendering.get()) {
    vecGLCanvasUser.addElement(user);
    initGLCanvasUser();
  }
 else {
    super.abEnableRendering.set(false);
    vecGLCanvasUser.addElement(user);
    super.abEnableRendering.set(true);
  }
  refGeneralManager.getSingelton().logMsg("String_Node_Str" + getId() + "String_Node_Str"+ user.getId()+ "String_Node_Str"+ user.toString(),LoggerType.TRANSITION);
}

Fixed version (ground truth):
public void addGLCanvasUser(IGLCanvasUser user){
  if (vecGLCanvasUser.contains(user)) {
    throw new CerberusRuntimeException("String_Node_Str");
  }
  if (!super.abEnableRendering.get()) {
    vecGLCanvasUser.addElement(user);
    initGLCanvasUser();
  }
 else {
    super.abEnableRendering.set(false);
    vecGLCanvasUser.addElement(user);
    initGLCanvasUser();
    super.abEnableRendering.set(true);
  }
  refGeneralManager.getSingelton().logMsg("String_Node_Str" + getId() + "String_Node_Str"+ user.getId()+ "String_Node_Str"+ user.toString(),LoggerType.TRANSITION);
}
Program: 59182
Project: 59182
Buggy source:
public synchronized void initGLCanvasUser(){
  if (this.refGLCanvas != null) {
    refGeneralManager.getSingelton().logMsg("String_Node_Str" + iUniqueId + "String_Node_Str"+ this.getClass().toString(),LoggerType.STATUS);
    Iterator<IGLCanvasUser> iter=vecGLCanvasUser.iterator();
    if (!iter.hasNext()) {
      refGeneralManager.getSingelton().logMsg("String_Node_Str" + iUniqueId + "String_Node_Str"+ this.getClass().toString()+ "String_Node_Str",LoggerType.MINOR_ERROR);
      return;
    }
    refGeneralManager.getSingelton().logMsg("String_Node_Str" + iUniqueId + "String_Node_Str"+ this.getClass().toString()+ "String_Node_Str",LoggerType.STATUS);
    while (iter.hasNext()) {
      IGLCanvasUser glCanvas=iter.next();
      if (!glCanvas.isInitGLDone()) {
        glCanvas.initGLCanvas(refGLCanvas);
      }
    }
    return;
  }
  refGeneralManager.getSingelton().logMsg("String_Node_Str" + iUniqueId + "String_Node_Str"+ this.getClass().toString()+ "String_Node_Str",LoggerType.MINOR_ERROR);
}

Fixed version (ground truth):
public synchronized void initGLCanvasUser(){
  if (this.refGLCanvas != null) {
    refGeneralManager.getSingelton().logMsg("String_Node_Str" + iUniqueId + "String_Node_Str"+ this.getClass().toString(),LoggerType.STATUS);
    if (vecGLCanvasUser.isEmpty()) {
      refGeneralManager.getSingelton().logMsg("String_Node_Str" + iUniqueId + "String_Node_Str"+ this.getClass().toString()+ "String_Node_Str",LoggerType.MINOR_ERROR);
      return;
    }
    Iterator<IGLCanvasUser> iter=vecGLCanvasUser.iterator();
    refGeneralManager.getSingelton().logMsg("String_Node_Str" + iUniqueId + "String_Node_Str"+ this.getClass().toString()+ "String_Node_Str",LoggerType.STATUS);
    while (iter.hasNext()) {
      IGLCanvasUser glCanvas=iter.next();
      if (!glCanvas.isInitGLDone()) {
        glCanvas.initGLCanvas(refGLCanvas);
      }
    }
    return;
  }
  refGeneralManager.getSingelton().logMsg("String_Node_Str" + iUniqueId + "String_Node_Str"+ this.getClass().toString()+ "String_Node_Str",LoggerType.MINOR_ERROR);
}
Program: 59183
Project: 59183
Buggy source:
/** 
 * Method takes uses the parent container ID to retrieve the  GUI widget by calling the createWidget method from the SWT GUI Manager. Method is implemented in the subclasses because only there the type of the needed widget is available.
 */
public void retrieveGUIContainer();

Fixed version (ground truth):
/** 
 * Method takes uses the parent container ID to retrieve the  GUI widget by calling the createWidget method from the SWT GUI Manager. Method is implemented in the subclasses because only there the type of the needed widget is available.
 * @deprecated use initView()
 */
public void retrieveGUIContainer();
Program: 59184
Project: 59184
Buggy source:
public boolean isInitGLDone();

Fixed version (ground truth):
/** 
 * Should be used by void render(GLAutoDrawable canvas); to test if initGLCanvas was done.
 * @return
 */
public boolean isInitGLDone();
Program: 59185
Project: 59185
Buggy source:
public abstract void render(GLAutoDrawable canvas);

Fixed version (ground truth):
/** 
 * Attention: Each IGLCanvasUser object has to take care that its initGLCanvas(GLCanvas canvas); method is called. The IGLCanvasDirector tries to call it once inside the initGLCanvasUser(), if the IGLCanvasUser is registered  by that time to the Vector <IGLCanvasUser> vecGLCanvasUser; and calls setInitGLDone(); afterwards. Solution: Check if initGLCanvas(GLCanvas canvas); was called prio to render(GLAutoDrawable canvas);  by calling boolean isInitGLDone();
 * @param canvas
 */
public abstract void render(GLAutoDrawable canvas);
Program: 59186
Project: 59186
Buggy source:
protected final void setInitGLDone(){
  if (bInitGLcanvawsWasCalled) {
    System.err.println("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ this.getId());
  }
 else {
    System.err.println("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ this.getId());
  }
  bInitGLcanvawsWasCalled=true;
}

Fixed version (ground truth):
public final void setInitGLDone(){
  if (bInitGLcanvawsWasCalled) {
    System.err.println("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ this.getId());
  }
 else {
    System.err.println("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ this.getId());
  }
  bInitGLcanvawsWasCalled=true;
}
Program: 59187
Project: 59187
Buggy source:
protected final void setInitGLDone(){
  if (bInitGLcanvawsWasCalled) {
    System.err.println("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ this.getId());
  }
 else {
    System.out.println("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ this.getId());
  }
  bInitGLcanvawsWasCalled=true;
}

Fixed version (ground truth):
public final void setInitGLDone(){
  if (bInitGLcanvawsWasCalled) {
    System.err.println("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ this.getId());
  }
 else {
    System.out.println("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ this.getId());
  }
  bInitGLcanvawsWasCalled=true;
}
Program: 59188
Project: 59188
Buggy source:
public final void render(GLAutoDrawable canvas){
  this.gl=canvas.getGL();
  gl.glPushMatrix();
  gl.glTranslatef(origin.x(),origin.y(),origin.z());
  gl.glRotatef(rotation.x(),rotation.y(),rotation.z(),rotation.w());
  if (pickPoint != null) {
    pickObjects(gl);
  }
  renderPart(gl,GL.GL_RENDER);
  gl.glPopMatrix();
}

Fixed version (ground truth):
public final void render(GLAutoDrawable canvas){
  this.gl=canvas.getGL();
  if (!bInitGLcanvawsWasCalled) {
    initGLCanvas((GLCanvas)canvas);
  }
  gl.glPushMatrix();
  gl.glTranslatef(origin.x(),origin.y(),origin.z());
  gl.glRotatef(rotation.x(),rotation.y(),rotation.z(),rotation.w());
  if (pickPoint != null) {
    pickObjects(gl);
  }
  renderPart(gl,GL.GL_RENDER);
  gl.glPopMatrix();
}
Program: 59189
Project: 59189
Buggy source:
public void addGLCanvasUser(IGLCanvasUser user){
  if (vecGLCanvasUser.contains(user)) {
    throw new CerberusRuntimeException("String_Node_Str");
  }
  if (!super.abEnableRendering.get()) {
    vecGLCanvasUser.addElement(user);
    initGLCanvasUser();
  }
 else {
    super.abEnableRendering.set(false);
    vecGLCanvasUser.addElement(user);
    initGLCanvasUser();
    super.abEnableRendering.set(true);
  }
  refGeneralManager.getSingelton().logMsg("String_Node_Str" + getId() + "String_Node_Str"+ user.getId()+ "String_Node_Str"+ user.toString(),LoggerType.TRANSITION);
}

Fixed version (ground truth):
public void addGLCanvasUser(IGLCanvasUser user){
  if (vecGLCanvasUser.contains(user)) {
    throw new CerberusRuntimeException("String_Node_Str");
  }
  vecGLCanvasUser.addElement(user);
  refGeneralManager.getSingelton().logMsg("String_Node_Str" + getId() + "String_Node_Str"+ user.getId()+ "String_Node_Str"+ user.toString(),LoggerType.TRANSITION);
}
Program: 59190
Project: 59190
Buggy source:
public void renderGLCanvasUser(GLAutoDrawable drawable){
  if (abEnableRendering.get()) {
    Iterator<IGLCanvasUser> iter=vecGLCanvasUser.iterator();
    while (iter.hasNext()) {
      IGLCanvasUser glCanvas=iter.next();
      if (glCanvas.isInitGLDone()) {
        glCanvas.render(drawable);
      }
    }
  }
}

Fixed version (ground truth):
public void renderGLCanvasUser(GLAutoDrawable drawable){
  if (abEnableRendering.get()) {
    Iterator<IGLCanvasUser> iter=vecGLCanvasUser.iterator();
    while (iter.hasNext()) {
      iter.next().render(drawable);
    }
  }
}
Program: 59191
Project: 59191
Buggy source:
public static boolean parseOnce(InputSource inStream,final String sInputStreamLabel,ContentHandler handler,final ILoggerManager refLoggerManager){
  if (handler == null) {
    refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str",LoggerType.ERROR_ONLY);
    return false;
  }
  try {
    XMLReader reader=XMLReaderFactory.createXMLReader();
    reader.setContentHandler(handler);
    try {
      reader.parse(inStream);
    }
 catch (    IOException e) {
      refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str"+ e.toString(),LoggerType.ERROR_ONLY);
    }
catch (    Exception e) {
      refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str"+ e.toString()+ "String_Node_Str",LoggerType.ERROR_ONLY);
      e.printStackTrace();
    }
    inStream.getCharacterStream().close();
    refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str",LoggerType.STATUS);
  }
 catch (  SAXException se) {
    refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str"+ se.toString(),LoggerType.ERROR_ONLY);
  }
catch (  IOException ioe) {
    refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str"+ ioe.toString(),LoggerType.ERROR_ONLY);
  }
catch (  Exception e) {
    refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str"+ e.toString(),LoggerType.ERROR_ONLY);
  }
  return true;
}

Fixed version (ground truth):
public static boolean parseOnce(InputSource inStream,final String sInputStreamLabel,ContentHandler handler,final ILoggerManager refLoggerManager){
  if (handler == null) {
    refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str",LoggerType.ERROR_ONLY);
    return false;
  }
  try {
    XMLReader reader=XMLReaderFactory.createXMLReader();
    DefaultHandler entityResolver=new DefaultHandler();
    reader.setFeature("String_Node_Str",false);
    reader.setEntityResolver(entityResolver);
    reader.setContentHandler(handler);
    try {
      reader.parse(inStream);
    }
 catch (    IOException e) {
      refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str"+ e.toString(),LoggerType.ERROR_ONLY);
    }
catch (    Exception e) {
      refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str"+ e.toString()+ "String_Node_Str",LoggerType.ERROR_ONLY);
      e.printStackTrace();
    }
    inStream.getCharacterStream().close();
    refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str",LoggerType.STATUS);
  }
 catch (  SAXException se) {
    refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str"+ se.toString(),LoggerType.ERROR_ONLY);
  }
catch (  IOException ioe) {
    refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str"+ ioe.toString(),LoggerType.ERROR_ONLY);
  }
catch (  Exception e) {
    refLoggerManager.logMsg("String_Node_Str" + sInputStreamLabel + "String_Node_Str"+ e.toString(),LoggerType.ERROR_ONLY);
  }
  return true;
}
Program: 59194
Project: 59194
Buggy source:
/** 
 * Start application by parsing a XMl file.  XML file is eihter local or received from a Muddleware server.
 * @param filename XML bootstrap file
 */
public void run(){
  if (bEnableBootstrapViaMuddleware) {
    logger.logMsg("String_Node_Str",LoggerType.STATUS);
    runUsingMuddleWare("String_Node_Str");
  }
 else {
    logger.logMsg("String_Node_Str",LoggerType.STATUS);
    runFromLocalXML_File();
  }
  logger.logMsg("String_Node_Str",LoggerType.STATUS);
  refSWTGUIManager.runApplication();
  logger.logMsg("String_Node_Str",LoggerType.STATUS);
  refOneForAllManager.destroyOnExit();
  logger.logMsg("String_Node_Str",LoggerType.STATUS);
  logger.logMsg("String_Node_Str",LoggerType.STATUS);
}

Fixed version (ground truth):
/** 
 * Start application by parsing a XMl file.  XML file is eihter local or received from a Muddleware server.
 * @param filename XML bootstrap file
 */
public void run(){
  if (bEnableBootstrapViaMuddleware) {
    logger.logMsg("String_Node_Str",LoggerType.STATUS);
    runUsingMuddleWare("String_Node_Str");
  }
 else {
    logger.logMsg("String_Node_Str",LoggerType.STATUS);
    refXmlParserManager.parseXmlFileByName(sFileName);
  }
  logger.logMsg("String_Node_Str",LoggerType.STATUS);
  refSWTGUIManager.runApplication();
  logger.logMsg("String_Node_Str",LoggerType.STATUS);
  refOneForAllManager.destroyOnExit();
  logger.logMsg("String_Node_Str",LoggerType.STATUS);
  logger.logMsg("String_Node_Str",LoggerType.STATUS);
}
Program: 59195
Project: 59195
Buggy source:
/** 
 * Identifies each application in the network with a unique Id form [1..99] issued by the network server.
 * @return unique networkHostId of this host.
 */
public abstract int getNetworkPostfix();

Fixed version (ground truth):
/** 
 * Identifies each application in the network with a unique Id form [1..99] issued by the network server.
 * @see cerberus.manager.IGeneralManager#iUniqueId_WorkspaceOffset
 * @return unique networkHostId of this host.
 */
public abstract int getNetworkPostfix();
Program: 59196
Project: 59196
Buggy source:
/** 
 * Call initAll() before using this class!
 * @see cerberus.data.manager.singelton.OneForAllManager#initAll()
 */
public OneForAllManager(final SingeltonManager sef_SingeltonManager){
  if (refSingeltonManager == null) {
    refSingeltonManager=new SingeltonManager(this);
    refSingeltonManager.initManager();
  }
 else {
    refSingeltonManager=sef_SingeltonManager;
  }
}

Fixed version (ground truth):
/** 
 * Call initAll() before using this class!
 * @see cerberus.data.manager.singelton.OneForAllManager#initAll()
 */
public OneForAllManager(final SingeltonManager sef_SingeltonManager){
  if (refSingeltonManager == null) {
    refSingeltonManager=new SingeltonManager(this);
    refSingeltonManager.initManager();
  }
 else {
    refSingeltonManager=sef_SingeltonManager;
  }
  refSingeltonManager.setNetworkPostfix(1);
}
Program: 59197
Project: 59197
Buggy source:
public void setNetworkPostfix(int iSetNetworkPrefix){
  if ((iSetNetworkPrefix < IGeneralManager.iUniqueId_WorkspaceOffset) && (iSetNetworkPrefix > 0)) {
    iNetworkApplicationIdPostfix=iSetNetworkPrefix;
  }
  throw new RuntimeException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @see cerberus.manager.singelton.Singelton#setNetworkPostfix(int)
 * @see cerberus.manager.IGeneralManager#iUniqueId_WorkspaceOffset
 */
public void setNetworkPostfix(int iSetNetworkPrefix){
  if ((iSetNetworkPrefix < IGeneralManager.iUniqueId_WorkspaceOffset) && (iSetNetworkPrefix >= 0)) {
    iNetworkApplicationIdPostfix=iSetNetworkPrefix;
    return;
  }
  throw new RuntimeException("String_Node_Str" + IGeneralManager.iUniqueId_WorkspaceOffset + "String_Node_Str");
}
Program: 59199
Project: 59199
Buggy source:
public void init(GLAutoDrawable canvas){
  setInitGLDone();
  this.gl=canvas.getGL();
  gl.glEnable(GL.GL_LINE_SMOOTH);
  gl.glHint(GL.GL_LINE_SMOOTH_HINT,GL.GL_NICEST);
  gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT,GL.GL_NICEST);
  gl.glLineWidth(1.0f);
  float[] fMatSpecular={1.0f,1.0f,1.0f,1.0f};
  float[] fMatShininess={25.0f};
  float[] fLightPosition={-1.0f,0.0f,0.0f,1.0f};
  float[] fWhiteLight={1.0f,1.0f,1.0f,1.0f};
  float[] fModelAmbient={0.2f,0.2f,0.2f,1.0f};
  gl.glEnable(GL.GL_COLOR_MATERIAL);
  gl.glColorMaterial(GL.GL_FRONT,GL.GL_DIFFUSE);
  gl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,fLightPosition,0);
  gl.glLightModelfv(GL.GL_LIGHT_MODEL_AMBIENT,fModelAmbient,0);
  gl.glEnable(GL.GL_LIGHTING);
  gl.glEnable(GL.GL_LIGHT0);
  gl.glClearColor(1.0f,1.0f,1.0f,1.0f);
  gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
  buildPathwayDisplayList();
}

Fixed version (ground truth):
public void init(GLAutoDrawable canvas){
  setInitGLDone();
  this.gl=canvas.getGL();
  gl.glEnable(GL.GL_LINE_SMOOTH);
  gl.glHint(GL.GL_LINE_SMOOTH_HINT,GL.GL_NICEST);
  gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT,GL.GL_NICEST);
  gl.glLineWidth(1.0f);
  float[] fMatSpecular={1.0f,1.0f,1.0f,1.0f};
  float[] fMatShininess={25.0f};
  float[] fLightPosition={-1.0f,0.0f,0.0f,1.0f};
  float[] fWhiteLight={1.0f,1.0f,1.0f,1.0f};
  float[] fModelAmbient={0.3f,0.3f,0.3f,1.0f};
  gl.glEnable(GL.GL_COLOR_MATERIAL);
  gl.glColorMaterial(GL.GL_FRONT,GL.GL_DIFFUSE);
  gl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,fLightPosition,0);
  gl.glLightModelfv(GL.GL_LIGHT_MODEL_AMBIENT,fModelAmbient,0);
  gl.glEnable(GL.GL_LIGHTING);
  gl.glEnable(GL.GL_LIGHT0);
  gl.glClearColor(1.0f,1.0f,1.0f,1.0f);
  gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
  buildPathwayDisplayList();
}
Program: 59200
Project: 59200
Buggy source:
public void resetPathway(){
  refCurrentPathway=null;
  refCurrentPathwayImageMap=null;
  refGraphModel=new DefaultGraphModel();
  refPathwayGraph.setModel(refGraphModel);
  refGraphLayoutCache.setModel(refGraphModel);
  refGraphModel.addUndoableEditListener(refUndoManager);
  vecVertices.removeAllElements();
  vecRelationEdges.removeAllElements();
  vecReactionEdges.removeAllElements();
  iNeighbourhoodUndoCount=0;
  bNeighbourhoodShown=false;
}

Fixed version (ground truth):
public void resetPathway(){
  refGraphModel=new DefaultGraphModel();
  refPathwayGraph.setModel(refGraphModel);
  refGraphLayoutCache.setModel(refGraphModel);
  refGraphModel.addUndoableEditListener(refUndoManager);
  vecVertices.removeAllElements();
  vecRelationEdges.removeAllElements();
  vecReactionEdges.removeAllElements();
  iNeighbourhoodUndoCount=0;
  bNeighbourhoodShown=false;
}
Program: 59201
Project: 59201
Buggy source:
public void loadPathwayFromFile(String sFilePath){
  super.loadPathwayFromFile(sFilePath);
  resetPathway();
  iPathwayId=Integer.parseInt(sFilePath.substring(sFilePath.lastIndexOf('/') + 4,sFilePath.lastIndexOf('/') + 9));
  drawView();
  refPathwayGraph.setBackgroundImage(null);
  if (bShowBackgroundOverlay == true) {
    String sPathwayImageFilePath=refCurrentPathway.getTitle();
    sPathwayImageFilePath=sPathwayImageFilePath.substring(5);
    sPathwayImageFilePath="String_Node_Str" + sPathwayImageFilePath + "String_Node_Str";
    loadBackgroundOverlayImage(sPathwayImageFilePath);
  }
  refGraphLayoutCache.reload();
}

Fixed version (ground truth):
public void loadPathwayFromFile(String sFilePath){
  super.loadPathwayFromFile(sFilePath);
  refCurrentPathway=null;
  refCurrentPathwayImageMap=null;
  resetPathway();
  iPathwayId=Integer.parseInt(sFilePath.substring(sFilePath.lastIndexOf('/') + 4,sFilePath.lastIndexOf('/') + 9));
  drawView();
  refPathwayGraph.setBackgroundImage(null);
  if (bShowBackgroundOverlay == true) {
    String sPathwayImageFilePath=refCurrentPathway.getTitle();
    sPathwayImageFilePath=sPathwayImageFilePath.substring(5);
    sPathwayImageFilePath="String_Node_Str" + sPathwayImageFilePath + "String_Node_Str";
    loadBackgroundOverlayImage(sPathwayImageFilePath);
  }
  refGraphLayoutCache.reload();
}
Program: 59202
Project: 59202
Buggy source:
public void loadImageMapFromFile(String sImageMapPath){
  resetPathway();
  refGeneralManager.getSingelton().getXmlParserManager().parseXmlFileByName(sImageMapPath);
  refCurrentPathwayImageMap=refGeneralManager.getSingelton().getPathwayManager().getCurrentPathwayImageMap();
  loadBackgroundOverlayImage(refCurrentPathwayImageMap.getImageLink());
}

Fixed version (ground truth):
public void loadImageMapFromFile(String sImageMapPath){
  refCurrentPathway=null;
  refCurrentPathwayImageMap=null;
  resetPathway();
  refGeneralManager.getSingelton().getXmlParserManager().parseXmlFileByName(sImageMapPath);
  refCurrentPathwayImageMap=refGeneralManager.getSingelton().getPathwayManager().getCurrentPathwayImageMap();
  loadBackgroundOverlayImage(refCurrentPathwayImageMap.getImageLink());
}