nus-yam/ex-repair huggingface dataset:
Program: 59113
Project: 59113
Buggy source:
@Override public ArrayList<String> getInfo(){
  ArrayList<String> alInfo=new ArrayList<String>();
  alInfo.add("String_Node_Str");
  return alInfo;
}

Fixed version (ground truth):
@Override public ArrayList<String> getInfo(){
  ArrayList<String> alInfo=new ArrayList<String>();
  alInfo.add("String_Node_Str");
  alInfo.add("String_Node_Str" + alContentSelection.size() + "String_Node_Str");
  return alInfo;
}
Program: 59114
Project: 59114
Buggy source:
protected void initLists(){
  Set<Integer> setMouseOver=verticalSelectionManager.getElements(EViewInternalSelectionType.MOUSE_OVER);
  horizontalSelectionManager.resetSelectionManager();
  alContentSelection=mapSelections.get(eWhichContentSelection);
  alStorageSelection=mapSelections.get(eWhichStorageSelection);
  if (renderStyle != null) {
    renderStyle.setContentSelection(alContentSelection);
  }
  int iNumberOfRowsToRender=alStorageSelection.size();
  int iNumberOfColumns=alContentSelection.size();
  for (int iRowCount=0; iRowCount < iNumberOfRowsToRender; iRowCount++) {
    horizontalSelectionManager.initialAdd(alStorageSelection.get(iRowCount));
  }
  for (int iColumnCount=0; iColumnCount < iNumberOfColumns; iColumnCount++) {
    verticalSelectionManager.initialAdd(alContentSelection.get(iColumnCount));
    if (setMouseOver.contains(alContentSelection.get(iColumnCount))) {
      verticalSelectionManager.addToType(EViewInternalSelectionType.MOUSE_OVER,alContentSelection.get(iColumnCount));
    }
  }
}

Fixed version (ground truth):
protected void initLists(){
  Set<Integer> setMouseOver=verticalSelectionManager.getElements(EViewInternalSelectionType.MOUSE_OVER);
  horizontalSelectionManager.resetSelectionManager();
  verticalSelectionManager.resetSelectionManager();
  alContentSelection=mapSelections.get(eWhichContentSelection);
  alStorageSelection=mapSelections.get(eWhichStorageSelection);
  if (renderStyle != null) {
    renderStyle.setContentSelection(alContentSelection);
  }
  int iNumberOfRowsToRender=alStorageSelection.size();
  int iNumberOfColumns=alContentSelection.size();
  for (int iRowCount=0; iRowCount < iNumberOfRowsToRender; iRowCount++) {
    horizontalSelectionManager.initialAdd(alStorageSelection.get(iRowCount));
  }
  for (int iColumnCount=0; iColumnCount < iNumberOfColumns; iColumnCount++) {
    verticalSelectionManager.initialAdd(alContentSelection.get(iColumnCount));
    if (setMouseOver.contains(alContentSelection.get(iColumnCount))) {
      verticalSelectionManager.addToType(EViewInternalSelectionType.MOUSE_OVER,alContentSelection.get(iColumnCount));
    }
  }
}
Program: 59115
Project: 59115
Buggy source:
public void start(){
  iOriginPosIndex=originHierarchyLayer.getPositionIndexByElementId(iElementId);
  if (iDestinationPosIndex == -1) {
    if (destinationHierarchyLayer.containsElement(-1))     this.iDestinationPosIndex=destinationHierarchyLayer.getPositionIndexByElementId(-1);
 else     this.iDestinationPosIndex=destinationHierarchyLayer.getNextPositionIndex();
  }
  originHierarchyLayer.removeElement(iElementId);
  if (destinationHierarchyLayer.getElementList().size() < destinationHierarchyLayer.getCapacity())   destinationHierarchyLayer.addElement(iElementId);
 else   destinationHierarchyLayer.replaceElement(iElementId,iDestinationPosIndex);
}

Fixed version (ground truth):
public void start(){
  iOriginPosIndex=originHierarchyLayer.getPositionIndexByElementId(iElementId);
  if (iDestinationPosIndex == -1) {
    this.iDestinationPosIndex=destinationHierarchyLayer.getNextPositionIndex();
  }
  originHierarchyLayer.removeElement(iElementId);
  if (destinationHierarchyLayer.getElementList().size() < destinationHierarchyLayer.getCapacity())   destinationHierarchyLayer.addElement(iElementId);
 else   destinationHierarchyLayer.replaceElement(iElementId,iDestinationPosIndex);
}
Program: 59116
Project: 59116
Buggy source:
private void slerpView(final GL gl,SlerpAction slerpAction){
  int iViewId=slerpAction.getElementId();
  SlerpMod slerpMod=new SlerpMod();
  if ((iSlerpFactor == 0)) {
    slerpMod.playSlerpSound();
  }
  Transform transform=slerpMod.interpolate(slerpAction.getOriginHierarchyLayer().getTransformByPositionIndex(slerpAction.getOriginPosIndex()),slerpAction.getDestinationHierarchyLayer().getTransformByPositionIndex(slerpAction.getDestinationPosIndex()),(float)iSlerpFactor / SLERP_RANGE);
  gl.glPushMatrix();
  slerpMod.applySlerp(gl,transform);
  ((AGLCanvasUser)generalManager.getSingelton().getViewGLCanvasManager().getItem(iViewId)).displayRemote(gl);
  gl.glPopMatrix();
  if (iSlerpFactor >= SLERP_RANGE) {
    arSlerpActions.remove(slerpAction);
    slerpAction.getDestinationHierarchyLayer().setElementVisibilityById(true,iViewId);
    iSlerpFactor=0;
  }
  if (arSlerpActions.isEmpty())   glConnectionLineRenderer.enableRendering(true);
}

Fixed version (ground truth):
private void slerpView(final GL gl,SlerpAction slerpAction){
  int iViewId=slerpAction.getElementId();
  SlerpMod slerpMod=new SlerpMod();
  if ((iSlerpFactor == 0)) {
    slerpMod.playSlerpSound();
  }
  Transform transform=slerpMod.interpolate(slerpAction.getOriginHierarchyLayer().getTransformByPositionIndex(slerpAction.getOriginPosIndex()),slerpAction.getDestinationHierarchyLayer().getTransformByPositionIndex(slerpAction.getDestinationPosIndex()),(float)iSlerpFactor / SLERP_RANGE);
  gl.glPushMatrix();
  slerpMod.applySlerp(gl,transform);
  ((AGLCanvasUser)generalManager.getSingelton().getViewGLCanvasManager().getItem(iViewId)).displayRemote(gl);
  gl.glPopMatrix();
  if (iSlerpFactor >= SLERP_RANGE) {
    arSlerpActions.remove(slerpAction);
    slerpAction.getDestinationHierarchyLayer().setElementVisibilityById(true,iViewId);
    iSlerpFactor=0;
  }
  if (arSlerpActions.isEmpty()) {
    glConnectionLineRenderer.enableRendering(true);
    generalManager.getSingelton().getViewGLCanvasManager().getInfoAreaManager().enable(!bEnableNavigationOverlay);
  }
}
Program: 59117
Project: 59117
Buggy source:
private void updatePoolLayer(){
  float fSelectedScaling=1;
  float fYAdd=0;
  int iSelectedViewIndex=poolLayer.getPositionIndexByElementId(iMouseOverViewID);
  for (int iViewIndex=0; iViewIndex < poolLayer.getCapacity(); iViewIndex++) {
    if (iViewIndex == iSelectedViewIndex) {
      fSelectedScaling=8;
    }
 else {
      fSelectedScaling=1;
    }
    Transform transform=new Transform();
    transform.setTranslation(new Vec3f(4.1f,0.1f * iViewIndex + fYAdd,4));
    if (iViewIndex == iSelectedViewIndex) {
      fYAdd+=0.1 * fSelectedScaling;
    }
    transform.setScale(new Vec3f(SCALING_FACTOR_POOL_LAYER * fSelectedScaling,SCALING_FACTOR_POOL_LAYER * fSelectedScaling,SCALING_FACTOR_POOL_LAYER * fSelectedScaling));
    poolLayer.setTransformByPositionIndex(iViewIndex,transform);
  }
}

Fixed version (ground truth):
private void updatePoolLayer(){
  float fSelectedScaling=1;
  float fYAdd=0;
  int iSelectedViewIndex=poolLayer.getPositionIndexByElementId(iMouseOverViewID);
  for (int iViewIndex=0; iViewIndex < poolLayer.getCapacity(); iViewIndex++) {
    if (iViewIndex == iSelectedViewIndex) {
      fSelectedScaling=4;
    }
 else {
      fSelectedScaling=1;
    }
    Transform transform=new Transform();
    transform.setTranslation(new Vec3f(4.1f,0.2f * iViewIndex + fYAdd,4));
    if (iViewIndex == iSelectedViewIndex) {
      fYAdd+=0.2 * fSelectedScaling;
    }
    transform.setScale(new Vec3f(SCALING_FACTOR_POOL_LAYER * fSelectedScaling,SCALING_FACTOR_POOL_LAYER * fSelectedScaling,SCALING_FACTOR_POOL_LAYER * fSelectedScaling));
    poolLayer.setTransformByPositionIndex(iViewIndex,transform);
  }
}
Program: 59118
Project: 59118
Buggy source:
private void loadViewToUnderInteractionLayer(final int iViewID){
  generalManager.getSingelton().logMsg(this.getClass().getSimpleName() + "String_Node_Str" + iViewID+ "String_Node_Str",LoggerType.VERBOSE);
  if (iSlerpFactor > 0 && iSlerpFactor < SLERP_RANGE)   return;
  arSlerpActions.clear();
  glConnectionLineRenderer.enableRendering(false);
  if (stackLayer.containsElement(iViewID)) {
    SlerpAction slerpActionTransition=new SlerpAction(iViewID,stackLayer,transitionLayer);
    arSlerpActions.add(slerpActionTransition);
    SlerpAction reverseSlerpAction=new SlerpAction(underInteractionLayer.getElementIdByPositionIndex(0),underInteractionLayer,stackLayer);
    arSlerpActions.add(reverseSlerpAction);
    SlerpAction slerpAction=new SlerpAction(iViewID,transitionLayer,underInteractionLayer);
    arSlerpActions.add(slerpAction);
  }
 else {
    SlerpAction slerpActionTransition=new SlerpAction(iViewID,poolLayer,transitionLayer);
    arSlerpActions.add(slerpActionTransition);
    SlerpAction reverseSlerpAction=new SlerpAction(stackLayer.getElementIdByPositionIndex(stackLayer.getNextPositionIndex()),stackLayer,true);
    arSlerpActions.add(reverseSlerpAction);
    SlerpAction reverseSlerpAction2=new SlerpAction(underInteractionLayer.getElementIdByPositionIndex(0),underInteractionLayer,true);
    arSlerpActions.add(reverseSlerpAction2);
    SlerpAction slerpAction=new SlerpAction(iViewID,transitionLayer,underInteractionLayer);
    arSlerpActions.add(slerpAction);
  }
  iSlerpFactor=0;
}

Fixed version (ground truth):
private void loadViewToUnderInteractionLayer(final int iViewID){
  generalManager.getSingelton().logMsg(this.getClass().getSimpleName() + "String_Node_Str" + iViewID+ "String_Node_Str",LoggerType.VERBOSE);
  if (iSlerpFactor > 0 && iSlerpFactor < SLERP_RANGE)   return;
  arSlerpActions.clear();
  glConnectionLineRenderer.enableRendering(false);
  if (stackLayer.containsElement(iViewID)) {
    SlerpAction slerpActionTransition=new SlerpAction(iViewID,stackLayer,transitionLayer);
    arSlerpActions.add(slerpActionTransition);
    SlerpAction reverseSlerpAction=new SlerpAction(underInteractionLayer.getElementIdByPositionIndex(0),underInteractionLayer,stackLayer);
    arSlerpActions.add(reverseSlerpAction);
    SlerpAction slerpAction=new SlerpAction(iViewID,transitionLayer,underInteractionLayer);
    arSlerpActions.add(slerpAction);
  }
 else {
    SlerpAction slerpActionTransition=new SlerpAction(iViewID,poolLayer,transitionLayer);
    arSlerpActions.add(slerpActionTransition);
    if (!stackLayer.containsElement(-1)) {
      SlerpAction reverseSlerpAction=new SlerpAction(stackLayer.getElementIdByPositionIndex(stackLayer.getNextPositionIndex()),stackLayer,true);
      arSlerpActions.add(reverseSlerpAction);
    }
    SlerpAction reverseSlerpAction2=new SlerpAction(underInteractionLayer.getElementIdByPositionIndex(0),underInteractionLayer,true);
    arSlerpActions.add(reverseSlerpAction2);
    SlerpAction slerpAction=new SlerpAction(iViewID,transitionLayer,underInteractionLayer);
    arSlerpActions.add(slerpAction);
  }
  iSlerpFactor=0;
}
Program: 59119
Project: 59119
Buggy source:
public void displayLocal(final GL gl){
  if (pickingTriggerMouseAdapter.wasRightMouseButtonPressed()) {
    bEnableNavigationOverlay=!bEnableNavigationOverlay;
  }
  pickingManager.handlePicking(iUniqueId,gl,true);
  display(gl);
  checkForHits(gl);
  pickingTriggerMouseAdapter.resetEvents();
}

Fixed version (ground truth):
public void displayLocal(final GL gl){
  if (pickingTriggerMouseAdapter.wasRightMouseButtonPressed()) {
    bEnableNavigationOverlay=!bEnableNavigationOverlay;
    generalManager.getSingelton().getViewGLCanvasManager().getInfoAreaManager().enable(!bEnableNavigationOverlay);
  }
  pickingManager.handlePicking(iUniqueId,gl,true);
  display(gl);
  checkForHits(gl);
  pickingTriggerMouseAdapter.resetEvents();
}
Program: 59120
Project: 59120
Buggy source:
private void buildPoolLayer(final GL gl){
  for (int iViewIndex=0; iViewIndex < poolLayer.getCapacity(); iViewIndex++) {
    Transform transform=new Transform();
    transform.setTranslation(new Vec3f(4.1f,0.1f * iViewIndex,4));
    transform.setScale(new Vec3f(SCALING_FACTOR_POOL_LAYER,SCALING_FACTOR_POOL_LAYER,SCALING_FACTOR_POOL_LAYER));
    poolLayer.setTransformByPositionIndex(iViewIndex,transform);
  }
}

Fixed version (ground truth):
private void buildPoolLayer(final GL gl){
  for (int iViewIndex=0; iViewIndex < poolLayer.getCapacity(); iViewIndex++) {
    Transform transform=new Transform();
    transform.setTranslation(new Vec3f(4.1f,0.2f * iViewIndex,4));
    transform.setScale(new Vec3f(SCALING_FACTOR_POOL_LAYER,SCALING_FACTOR_POOL_LAYER,SCALING_FACTOR_POOL_LAYER));
    poolLayer.setTransformByPositionIndex(iViewIndex,transform);
  }
}
Program: 59123
Project: 59123
Buggy source:
public void buildPathwayDisplayList(final GL gl,final AUniqueManagedObject containingView,final int iPathwayId){
  refGeneralManager.getSingelton().logMsg(this.getClass().getSimpleName() + "String_Node_Str" + iPathwayId,LoggerType.VERBOSE);
  PathwayGraph refTmpPathway=(PathwayGraph)refGeneralManager.getSingelton().getPathwayManager().getItem(iPathwayId);
  int iVerticesDisplayListId=-1;
  int iEdgesDisplayListId=-1;
  if (hashPathwayId2VerticesDisplayListId.containsKey(iPathwayId)) {
    iVerticesDisplayListId=hashPathwayId2VerticesDisplayListId.get(iPathwayId);
  }
 else {
    iVerticesDisplayListId=gl.glGenLists(1);
    hashPathwayId2VerticesDisplayListId.put(iPathwayId,iVerticesDisplayListId);
  }
  gl.glNewList(iVerticesDisplayListId,GL.GL_COMPILE);
  extractVertices(gl,containingView,refTmpPathway);
  gl.glEndList();
  if (hashPathwayId2EdgesDisplayListId.containsKey(iPathwayId)) {
    iEdgesDisplayListId=hashPathwayId2EdgesDisplayListId.get(iPathwayId);
  }
 else {
    iEdgesDisplayListId=gl.glGenLists(1);
    hashPathwayId2EdgesDisplayListId.put(iPathwayId,iEdgesDisplayListId);
  }
  gl.glNewList(iEdgesDisplayListId,GL.GL_COMPILE);
  extractEdges(gl,refTmpPathway);
  gl.glEndList();
}

Fixed version (ground truth):
public void buildPathwayDisplayList(final GL gl,final AUniqueManagedObject containingView,final int iPathwayId){
  PathwayGraph refTmpPathway=(PathwayGraph)refGeneralManager.getSingelton().getPathwayManager().getItem(iPathwayId);
  int iVerticesDisplayListId=-1;
  int iEdgesDisplayListId=-1;
  if (hashPathwayId2VerticesDisplayListId.containsKey(iPathwayId)) {
    iVerticesDisplayListId=hashPathwayId2VerticesDisplayListId.get(iPathwayId);
  }
 else {
    iVerticesDisplayListId=gl.glGenLists(1);
    hashPathwayId2VerticesDisplayListId.put(iPathwayId,iVerticesDisplayListId);
  }
  gl.glNewList(iVerticesDisplayListId,GL.GL_COMPILE);
  extractVertices(gl,containingView,refTmpPathway);
  gl.glEndList();
  if (hashPathwayId2EdgesDisplayListId.containsKey(iPathwayId)) {
    iEdgesDisplayListId=hashPathwayId2EdgesDisplayListId.get(iPathwayId);
  }
 else {
    iEdgesDisplayListId=gl.glGenLists(1);
    hashPathwayId2EdgesDisplayListId.put(iPathwayId,iEdgesDisplayListId);
  }
  gl.glNewList(iEdgesDisplayListId,GL.GL_COMPILE);
  extractEdges(gl,refTmpPathway);
  gl.glEndList();
}
Program: 59124
Project: 59124
Buggy source:
public final int getNextPositionIndex(){
  if (llElementId.size() < iCapacity) {
    return llElementId.size();
  }
 else   if (llElementId.contains(-1)) {
    return llElementId.indexOf(-1);
  }
 else {
    return llElementId.indexOf(llElementIdImportanceQueue.getLast());
  }
}

Fixed version (ground truth):
public final int getNextPositionIndex(){
  if (llElementId.contains(-1)) {
    return llElementId.indexOf(-1);
  }
 else {
    return llElementId.indexOf(llElementIdImportanceQueue.getLast());
  }
}
Program: 59125
Project: 59125
Buggy source:
protected void propagateGeneSelection(int iExternalID,ArrayList<Integer> iAlOldSelection){
  int iAccessionID=getAccesionIDFromStorageIndex(iExternalID);
  generalManager.getSingelton().getViewGLCanvasManager().getInfoAreaManager().setData(iUniqueId,iAccessionID,EInputDataType.GENE,getInfo());
  ArrayList<Integer> iAlTmpSelectionId=new ArrayList<Integer>(2);
  ArrayList<Integer> iAlTmpGroup=new ArrayList<Integer>(2);
  if (iAccessionID != -1) {
    iAlTmpSelectionId.add(iAccessionID);
    iAlTmpGroup.add(2);
    extSelectionManager.modifySelection(iAccessionID,createElementRep(iExternalID),ESelectionMode.ReplacePick);
  }
  for (  Integer iCurrent : iAlOldSelection) {
    iAccessionID=getAccesionIDFromStorageIndex(iCurrent);
    if (iAccessionID != -1) {
      iAlTmpSelectionId.add(iAccessionID);
      iAlTmpGroup.add(0);
    }
  }
  propagateGeneSet(iAlTmpSelectionId,iAlTmpGroup);
}

Fixed version (ground truth):
protected void propagateGeneSelection(int iExternalID,int iNewGroupID,ArrayList<Integer> iAlOldSelection){
  int iAccessionID=getAccesionIDFromStorageIndex(iExternalID);
  generalManager.getSingelton().getViewGLCanvasManager().getInfoAreaManager().setData(iUniqueId,iAccessionID,EInputDataType.GENE,getInfo());
  ArrayList<Integer> iAlTmpSelectionId=new ArrayList<Integer>(2);
  ArrayList<Integer> iAlTmpGroup=new ArrayList<Integer>(2);
  if (iAccessionID != -1) {
    iAlTmpSelectionId.add(iAccessionID);
    iAlTmpGroup.add(iNewGroupID);
    extSelectionManager.modifySelection(iAccessionID,createElementRep(iExternalID),ESelectionMode.ReplacePick);
  }
  for (  Integer iCurrent : iAlOldSelection) {
    iAccessionID=getAccesionIDFromStorageIndex(iCurrent);
    if (iAccessionID != -1) {
      iAlTmpSelectionId.add(iAccessionID);
      iAlTmpGroup.add(0);
    }
  }
  propagateGeneSet(iAlTmpSelectionId,iAlTmpGroup);
}
Program: 59126
Project: 59126
Buggy source:
protected void handleEvents(EPickingType pickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
switch (pickingType) {
case FIELD_SELECTION:
switch (pickingMode) {
case CLICKED:
      extSelectionManager.clear();
    ArrayList<Integer> iAlOldSelection=prepareSelection(verticalSelectionManager,EViewInternalSelectionType.SELECTION);
  verticalSelectionManager.clearSelection(EViewInternalSelectionType.SELECTION);
verticalSelectionManager.addToType(EViewInternalSelectionType.SELECTION,iExternalID);
if (eFieldDataType == EInputDataType.GENE) {
propagateGeneSelection(iExternalID,iAlOldSelection);
}
break;
case MOUSE_OVER:
extSelectionManager.clear();
verticalSelectionManager.clearSelection(EViewInternalSelectionType.MOUSE_OVER);
verticalSelectionManager.addToType(EViewInternalSelectionType.MOUSE_OVER,iExternalID);
if (eFieldDataType == EInputDataType.GENE) {
generalManager.getSingelton().getViewGLCanvasManager().getInfoAreaManager().setData(iUniqueId,getAccesionIDFromStorageIndex(iExternalID),EInputDataType.GENE,getInfo());
}
break;
}
pickingManager.flushHits(iUniqueId,pickingType);
break;
}
}

Fixed version (ground truth):
protected void handleEvents(EPickingType pickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  ArrayList<Integer> iAlOldSelection;
switch (pickingType) {
case FIELD_SELECTION:
switch (pickingMode) {
case CLICKED:
      extSelectionManager.clear();
    iAlOldSelection=prepareSelection(verticalSelectionManager,EViewInternalSelectionType.SELECTION);
  verticalSelectionManager.clearSelection(EViewInternalSelectionType.SELECTION);
verticalSelectionManager.addToType(EViewInternalSelectionType.SELECTION,iExternalID);
if (eFieldDataType == EInputDataType.GENE) {
propagateGeneSelection(iExternalID,2,iAlOldSelection);
}
break;
case MOUSE_OVER:
extSelectionManager.clear();
iAlOldSelection=prepareSelection(verticalSelectionManager,EViewInternalSelectionType.SELECTION);
verticalSelectionManager.clearSelection(EViewInternalSelectionType.MOUSE_OVER);
verticalSelectionManager.addToType(EViewInternalSelectionType.MOUSE_OVER,iExternalID);
if (eFieldDataType == EInputDataType.GENE) {
propagateGeneSelection(iExternalID,1,iAlOldSelection);
}
break;
}
pickingManager.flushHits(iUniqueId,pickingType);
break;
}
}
Program: 59127
Project: 59127
Buggy source:
protected void initLists(){
  horizontalSelectionManager.resetSelectionManager();
  verticalSelectionManager.resetSelectionManager();
  alContentSelection=mapSelections.get(eWhichContentSelection);
  alStorageSelection=mapSelections.get(eWhichStorageSelection);
  int iNumberOfRowsToRender=alStorageSelection.size();
  int iNumberOfColumns=alContentSelection.size();
  for (int iRowCount=0; iRowCount < iNumberOfRowsToRender; iRowCount++) {
    horizontalSelectionManager.initialAdd(alStorageSelection.get(iRowCount));
  }
  for (int iColumnCount=0; iColumnCount < iNumberOfColumns; iColumnCount++) {
    verticalSelectionManager.initialAdd(alContentSelection.get(iColumnCount));
  }
}

Fixed version (ground truth):
protected void initLists(){
  horizontalSelectionManager.resetSelectionManager();
  verticalSelectionManager.resetSelectionManager();
  alContentSelection=mapSelections.get(eWhichContentSelection);
  alStorageSelection=mapSelections.get(eWhichStorageSelection);
  if (renderStyle != null) {
    renderStyle.setContentSelection(alContentSelection);
  }
  int iNumberOfRowsToRender=alStorageSelection.size();
  int iNumberOfColumns=alContentSelection.size();
  for (int iRowCount=0; iRowCount < iNumberOfRowsToRender; iRowCount++) {
    horizontalSelectionManager.initialAdd(alStorageSelection.get(iRowCount));
  }
  for (int iColumnCount=0; iColumnCount < iNumberOfColumns; iColumnCount++) {
    verticalSelectionManager.initialAdd(alContentSelection.get(iColumnCount));
  }
}
Program: 59128
Project: 59128
Buggy source:
private void loadViewToUnderInteractionLayer(final int iViewID){
  generalManager.getSingelton().logMsg(this.getClass().getSimpleName() + "String_Node_Str" + iViewID+ "String_Node_Str",LoggerType.VERBOSE);
  if (iSlerpFactor > 0 && iSlerpFactor < SLERP_RANGE)   return;
  arSlerpActions.clear();
  glConnectionLineRenderer.enableRendering(false);
  if (stackLayer.containsElement(iViewID)) {
    SlerpAction slerpActionTransition=new SlerpAction(iViewID,stackLayer,transitionLayer);
    arSlerpActions.add(slerpActionTransition);
    SlerpAction reverseSlerpAction=new SlerpAction(underInteractionLayer.getElementIdByPositionIndex(0),underInteractionLayer,stackLayer);
    arSlerpActions.add(reverseSlerpAction);
    SlerpAction slerpAction=new SlerpAction(iViewID,transitionLayer,underInteractionLayer);
    arSlerpActions.add(slerpAction);
  }
 else {
    SlerpAction slerpActionTransition=new SlerpAction(iViewID,poolLayer,transitionLayer);
    arSlerpActions.add(slerpActionTransition);
    if (!stackLayer.containsElement(-1)) {
      SlerpAction reverseSlerpAction=new SlerpAction(stackLayer.getElementIdByPositionIndex(stackLayer.getNextPositionIndex()),stackLayer,true);
      arSlerpActions.add(reverseSlerpAction);
    }
    SlerpAction reverseSlerpAction2=new SlerpAction(underInteractionLayer.getElementIdByPositionIndex(0),underInteractionLayer,true);
    arSlerpActions.add(reverseSlerpAction2);
    SlerpAction slerpAction=new SlerpAction(iViewID,transitionLayer,underInteractionLayer);
    arSlerpActions.add(slerpAction);
  }
  iSlerpFactor=0;
}

Fixed version (ground truth):
private void loadViewToUnderInteractionLayer(final int iViewID){
  generalManager.getSingelton().logMsg(this.getClass().getSimpleName() + "String_Node_Str" + iViewID+ "String_Node_Str",LoggerType.VERBOSE);
  if (iSlerpFactor > 0 && iSlerpFactor < SLERP_RANGE)   return;
  arSlerpActions.clear();
  if (stackLayer.containsElement(iViewID)) {
    SlerpAction slerpActionTransition=new SlerpAction(iViewID,stackLayer,transitionLayer);
    arSlerpActions.add(slerpActionTransition);
    SlerpAction reverseSlerpAction=new SlerpAction(underInteractionLayer.getElementIdByPositionIndex(0),underInteractionLayer,stackLayer);
    arSlerpActions.add(reverseSlerpAction);
    SlerpAction slerpAction=new SlerpAction(iViewID,transitionLayer,underInteractionLayer);
    arSlerpActions.add(slerpAction);
  }
 else {
    SlerpAction slerpActionTransition=new SlerpAction(iViewID,poolLayer,transitionLayer);
    arSlerpActions.add(slerpActionTransition);
    if (!stackLayer.containsElement(-1)) {
      SlerpAction reverseSlerpAction=new SlerpAction(stackLayer.getElementIdByPositionIndex(stackLayer.getNextPositionIndex()),stackLayer,true);
      arSlerpActions.add(reverseSlerpAction);
    }
    SlerpAction reverseSlerpAction2=new SlerpAction(underInteractionLayer.getElementIdByPositionIndex(0),underInteractionLayer,true);
    arSlerpActions.add(reverseSlerpAction2);
    SlerpAction slerpAction=new SlerpAction(iViewID,transitionLayer,underInteractionLayer);
    arSlerpActions.add(slerpAction);
  }
  iSlerpFactor=0;
}
Program: 59129
Project: 59129
Buggy source:
public ParCoordsRenderStyle(){
  polylineOcclusionPrevColor=new Vec4f(0.0f,0.0f,0.0f,1.0f);
}

Fixed version (ground truth):
public ParCoordsRenderStyle(){
  polylineOcclusionPrevColor=new Vec4f(0.0f,0.0f,0.0f,1.0f);
  polylineDeselectedColor=new Vec4f(0.0f,0.0f,0.0f,0.1f);
}
Program: 59130
Project: 59130
Buggy source:
public Vec4f getPolylineOcclusionPrevColor(int numberOfRenderedLines){
  if (numberOfRenderedLines > 100) {
    polylineOcclusionPrevColor.set(3,0.1f);
  }
 else {
    polylineOcclusionPrevColor.set(3,0.6f);
  }
  return polylineOcclusionPrevColor;
}

Fixed version (ground truth):
public Vec4f getPolylineOcclusionPrevColor(int iNumberOfRenderedLines){
  fOcclusionPrevAlpha=(float)(4 / Math.sqrt(iNumberOfRenderedLines));
  polylineOcclusionPrevColor.set(3,fOcclusionPrevAlpha);
  return polylineOcclusionPrevColor;
}
Program: 59132
Project: 59132
Buggy source:
public void mouseDragged(MouseEvent e){
  int x=e.getX();
  int y=e.getY();
  Dimension size=e.getComponent().getSize();
  if (!bMouseRightButtonDown) {
    if (!bMouseMiddleButtonDown) {
      Rotf currentRotX=new Rotf();
      Rotf currentRotY=new Rotf();
      float fpercentX=(float)(x - prevMouseX) / (float)(size.width) * fMouseSensitivityRotation;
      float fpercentY=(float)(y - prevMouseY) / (float)(size.height) * fMouseSensitivityRotation;
      currentRotX.set(new Vec3f(0,1,0),fpercentX * MathUtil.PI);
      currentRotY.set(new Vec3f(0,1,0),fpercentY * MathUtil.PI);
      currentRotX=currentRotX.times(currentRotY);
      prevMouseX=x;
      prevMouseY=y;
      gLCanvas.getViewCamera().addCameraRotation(currentRotX);
    }
  }
 else {
    Vec3f addVec3f=new Vec3f(fPanScale * ((float)(x - prevMouseX) / (float)size.width),fPanScale * ((float)(prevMouseY - y) / (float)size.height),0.0f);
    prevMouseX=x;
    prevMouseY=y;
    gLCanvas.getViewCamera().addCameraPosition(addVec3f);
  }
}

Fixed version (ground truth):
public void mouseDragged(MouseEvent e){
  int x=e.getX();
  int y=e.getY();
  Dimension size=e.getComponent().getSize();
  if (!bMouseRightButtonDown) {
    if (!bMouseMiddleButtonDown) {
    }
  }
 else {
    Vec3f addVec3f=new Vec3f(fPanScale * ((float)(x - prevMouseX) / (float)size.width),fPanScale * ((float)(prevMouseY - y) / (float)size.height),0.0f);
    prevMouseX=x;
    prevMouseY=y;
    gLCanvas.getViewCamera().addCameraPosition(addVec3f);
  }
}
Program: 59133
Project: 59133
Buggy source:
public final boolean wasMousePressed(){
  boolean bTmp=bMousePressed;
  bMousePressed=false;
  return bTmp;
}

Fixed version (ground truth):
public final boolean wasMousePressed(){
  boolean bTmp=bMousePressed;
  return bTmp;
}
Program: 59134
Project: 59134
Buggy source:
public final boolean wasMouseReleased(){
  boolean bTmp=bMouseReleased;
  bMouseReleased=false;
  return bTmp;
}

Fixed version (ground truth):
public final boolean wasMouseReleased(){
  boolean bTmp=bMouseReleased;
  return bTmp;
}
Program: 59135
Project: 59135
Buggy source:
public final boolean wasMouseDragged(){
  boolean bTmp=bMouseDragged;
  bMouseDragged=false;
  return bTmp;
}

Fixed version (ground truth):
public final boolean wasMouseDragged(){
  boolean bTmp=bMouseDragged;
  return bTmp;
}
Program: 59136
Project: 59136
Buggy source:
public final boolean wasMouseMoved(){
  boolean bTmp=bMouseMoved;
  bMouseMoved=false;
  return bTmp;
}

Fixed version (ground truth):
public final boolean wasMouseMoved(){
  boolean bTmp=bMouseMoved;
  return bTmp;
}
Program: 59137
Project: 59137
Buggy source:
/** 
 * Initialization for gl called by a managing view Has to call init internally!
 * @param gl
 */
public abstract void initRemote(final GL gl);

Fixed version (ground truth):
/** 
 * Initialization for gl called by a managing view Has to call init internally!
 * @param gl
 */
public abstract void initRemote(final GL gl,final PickingJoglMouseListener pickingTriggerMouseAdapter);
Program: 59138
Project: 59138
Buggy source:
public void displayLocal(final GL gl){
  pickingManager.handlePicking(this,gl,pickingTriggerMouseAdapter,true);
  display(gl);
}

Fixed version (ground truth):
public void displayLocal(final GL gl){
  pickingManager.handlePicking(this,gl,pickingTriggerMouseAdapter,true);
  display(gl);
  pickingTriggerMouseAdapter.resetEvents();
}
Program: 59139
Project: 59139
Buggy source:
public void initRemote(final GL gl){
  init(gl);
}

Fixed version (ground truth):
public void initRemote(final GL gl,final PickingJoglMouseListener pickingTriggerMouseAdapter){
  this.pickingTriggerMouseAdapter=pickingTriggerMouseAdapter;
  init(gl);
}
Program: 59140
Project: 59140
Buggy source:
public void initRemote(final GL gl){
  init(gl);
}

Fixed version (ground truth):
public void initRemote(final GL gl,final PickingJoglMouseListener pickingTriggerMouseAdapter){
  this.pickingTriggerMouseAdapter=pickingTriggerMouseAdapter;
  init(gl);
}
Program: 59141
Project: 59141
Buggy source:
public void displayLocal(final GL gl){
  pickingManager.handlePicking(this,gl,pickingTriggerMouseAdapter,true);
  display(gl);
}

Fixed version (ground truth):
public void displayLocal(final GL gl){
  pickingManager.handlePicking(this,gl,pickingTriggerMouseAdapter,true);
  display(gl);
  pickingTriggerMouseAdapter.resetEvents();
}
Program: 59142
Project: 59142
Buggy source:
public void initRemote(final GL gl){
  init(gl);
}

Fixed version (ground truth):
public void initRemote(final GL gl,final PickingJoglMouseListener pickingTriggerMouseAdapter){
  this.pickingTriggerMouseAdapter=pickingTriggerMouseAdapter;
  init(gl);
}
Program: 59143
Project: 59143
Buggy source:
public void displayLocal(final GL gl){
  pickingManager.handlePicking(this,gl,pickingTriggerMouseAdapter,true);
  display(gl);
}

Fixed version (ground truth):
public void displayLocal(final GL gl){
  pickingManager.handlePicking(this,gl,pickingTriggerMouseAdapter,true);
  display(gl);
  pickingTriggerMouseAdapter.resetEvents();
}
Program: 59144
Project: 59144
Buggy source:
public void displayLocal(final GL gl){
  pickingManager.handlePicking(this,gl,pickingTriggerMouseAdapter,true);
  display(gl);
}

Fixed version (ground truth):
public void displayLocal(final GL gl){
  pickingManager.handlePicking(this,gl,pickingTriggerMouseAdapter,true);
  display(gl);
  pickingTriggerMouseAdapter.resetEvents();
}
Program: 59145
Project: 59145
Buggy source:
public void initRemote(final GL gl){
  init(gl);
}

Fixed version (ground truth):
public void initRemote(final GL gl,final PickingJoglMouseListener pickingTriggerMouseAdapter){
  this.pickingTriggerMouseAdapter=pickingTriggerMouseAdapter;
  init(gl);
}
Program: 59146
Project: 59146
Buggy source:
public void displayLocal(final GL gl){
  pickingManager.handlePicking(this,gl,pickingTriggerMouseAdapter,true);
  display(gl);
}

Fixed version (ground truth):
public void displayLocal(final GL gl){
  pickingManager.handlePicking(this,gl,pickingTriggerMouseAdapter,true);
  display(gl);
  pickingTriggerMouseAdapter.resetEvents();
}
Program: 59147
Project: 59147
Buggy source:
public void initRemote(final GL gl){
  init(gl);
}

Fixed version (ground truth):
public void initRemote(final GL gl,final PickingJoglMouseListener pickingTriggerMouseAdapter){
  this.pickingTriggerMouseAdapter=pickingTriggerMouseAdapter;
  init(gl);
}
Program: 59149
Project: 59149
Buggy source:
public void renderPart(GL gl){
  if (iLazyPathwayLoadingId != -1) {
    loadPathwayToUnderInteractionPosition(iLazyPathwayLoadingId);
    iLazyPathwayLoadingId=-1;
  }
  handlePicking(gl);
  if (arSlerpActions.isEmpty() && bSelectionChanged && selectedVertex != null) {
    bSelectionChanged=false;
    bRebuildVisiblePathwayDisplayLists=true;
  }
  if (bRebuildVisiblePathwayDisplayLists)   rebuildVisiblePathwayDisplayLists(gl);
  if (dragAndDrop.isDragActionRunning()) {
    dragAndDrop.renderDragThumbnailTexture(gl);
  }
  if (bUpdateReceived) {
    int[] iArSelectionId=alSetSelection.get(0).getSelectionIdArray();
    ArrayList<IGraphItem> alSelectedVertexReps=new ArrayList<IGraphItem>();
    IPathwayItemManager pathwayItemManager=refGeneralManager.getSingelton().getPathwayItemManager();
    for (int iItemIndex=0; iItemIndex < iArSelectionId.length; iItemIndex++) {
      alSelectedVertexReps.add((IGraphItem)pathwayItemManager.getItem(iArSelectionId[iItemIndex]));
    }
    loadDependentPathways(gl,alSelectedVertexReps);
    bUpdateReceived=false;
  }
  time.update();
  doSlerpActions(gl);
  renderScene(gl);
  renderInfoArea(gl);
  renderConnectingLines(gl);
}

Fixed version (ground truth):
public void renderPart(GL gl){
  if (iLazyPathwayLoadingId != -1) {
    loadPathwayToUnderInteractionPosition(iLazyPathwayLoadingId);
    iLazyPathwayLoadingId=-1;
  }
  handlePicking(gl);
  if (arSlerpActions.isEmpty() && bSelectionChanged && selectedVertex != null) {
    bSelectionChanged=false;
    bRebuildVisiblePathwayDisplayLists=true;
  }
  if (bRebuildVisiblePathwayDisplayLists)   rebuildVisiblePathwayDisplayLists(gl);
  if (dragAndDrop.isDragActionRunning()) {
    dragAndDrop.renderDragThumbnailTexture(gl);
  }
  if (bUpdateReceived) {
    int[] iArSelectionId=alSetSelection.get(0).getSelectionIdArray();
    ArrayList<IGraphItem> alSelectedVertexReps=new ArrayList<IGraphItem>();
    IPathwayItemManager pathwayItemManager=refGeneralManager.getSingelton().getPathwayItemManager();
    for (int iItemIndex=0; iItemIndex < iArSelectionId.length; iItemIndex++) {
      alSelectedVertexReps.add((IGraphItem)pathwayItemManager.getItem(iArSelectionId[iItemIndex]));
    }
    loadDependentPathways(gl,alSelectedVertexReps);
    bUpdateReceived=false;
  }
  time.update();
  doSlerpActions(gl);
  renderConnectingLines(gl);
  renderScene(gl);
  renderInfoArea(gl);
}
Program: 59150
Project: 59150
Buggy source:
private void renderPathwayById(final GL gl,final int iPathwayId,final JukeboxHierarchyLayer layer){
  if (!layer.getElementVisibilityById(iPathwayId))   return;
  gl.glPushMatrix();
  Transform transform=layer.getTransformByElementId(iPathwayId);
  Vec3f translation=transform.getTranslation();
  Rotf rot=transform.getRotation();
  Vec3f scale=transform.getScale();
  Vec3f axis=new Vec3f();
  float fAngle=rot.get(axis);
  gl.glTranslatef(translation.x(),translation.y(),translation.z());
  gl.glScalef(scale.x(),scale.y(),scale.z());
  gl.glRotatef(Vec3f.convertRadiant2Grad(fAngle),axis.x(),axis.y(),axis.z());
  if (bEnablePathwayTextures) {
    if (!layer.getElementList().isEmpty() && pathwayUnderInteractionLayer.getElementIdByPositionIndex(0) == iPathwayId) {
      refGLPathwayTextureManager.renderPathway(gl,iPathwayId,fTextureTransparency,true);
    }
 else {
      refGLPathwayTextureManager.renderPathway(gl,iPathwayId,fTextureTransparency,false);
    }
  }
  float tmp=GLPathwayManager.SCALING_FACTOR_Y * ((PathwayGraph)refGeneralManager.getSingelton().getPathwayManager().getItem(iPathwayId)).getHeight();
  gl.glTranslatef(0,tmp,0);
  if (layer.equals(pathwayLayeredLayer)) {
    refGLPathwayManager.renderPathway(gl,iPathwayId,false);
  }
 else {
    refGLPathwayManager.renderPathway(gl,iPathwayId,true);
  }
  gl.glTranslatef(0,-tmp,0);
  gl.glPopMatrix();
}

Fixed version (ground truth):
private void renderPathwayById(final GL gl,final int iPathwayId,final JukeboxHierarchyLayer layer){
  if (!layer.getElementVisibilityById(iPathwayId))   return;
  gl.glPushMatrix();
  Transform transform=layer.getTransformByElementId(iPathwayId);
  Vec3f translation=transform.getTranslation();
  Rotf rot=transform.getRotation();
  Vec3f scale=transform.getScale();
  Vec3f axis=new Vec3f();
  float fAngle=rot.get(axis);
  gl.glTranslatef(translation.x(),translation.y(),translation.z());
  gl.glScalef(scale.x(),scale.y(),scale.z());
  gl.glRotatef(Vec3f.convertRadiant2Grad(fAngle),axis.x(),axis.y(),axis.z());
  if (bEnablePathwayTextures) {
    if (!layer.getElementList().isEmpty() && pathwayUnderInteractionLayer.getElementIdByPositionIndex(0) == iPathwayId) {
      if (layer.equals(pathwayLayeredLayer)) {
        refGLPathwayTextureManager.renderPathway(gl,iPathwayId,fTextureTransparency,true);
      }
 else {
        refGLPathwayTextureManager.renderPathway(gl,iPathwayId,1.0f,true);
      }
    }
 else {
      refGLPathwayTextureManager.renderPathway(gl,iPathwayId,fTextureTransparency,false);
    }
  }
  float tmp=GLPathwayManager.SCALING_FACTOR_Y * ((PathwayGraph)refGeneralManager.getSingelton().getPathwayManager().getItem(iPathwayId)).getHeight();
  gl.glTranslatef(0,tmp,0);
  if (layer.equals(pathwayLayeredLayer)) {
    refGLPathwayManager.renderPathway(gl,iPathwayId,false);
  }
 else {
    refGLPathwayManager.renderPathway(gl,iPathwayId,true);
  }
  gl.glTranslatef(0,-tmp,0);
  gl.glPopMatrix();
}
Program: 59152
Project: 59152
Buggy source:
public void appendMappingToFile(final String sBioCartaGeneID,final String sAccessionNumber){
  outputWriter.append(sAccessionNumber + "String_Node_Str" + sBioCartaGeneID+ "String_Node_Str");
}

Fixed version (ground truth):
public void appendMappingToFile(final String sBioCartaGeneID,final String sAccessionNumber){
  outputWriter.println(sAccessionNumber + "String_Node_Str" + sBioCartaGeneID);
  outputWriter.flush();
}
Program: 59153
Project: 59153
Buggy source:
public MappingBuilder_BioCartaGeneID2Accession() throws IOException {
  outputWriter=new PrintWriter(OUTPUT_FILE_PATH);
}

Fixed version (ground truth):
public MappingBuilder_BioCartaGeneID2Accession() throws IOException {
  outputWriter=new PrintWriter(new BufferedWriter(new FileWriter(OUTPUT_FILE_PATH),100000));
}
Program: 59154
Project: 59154
Buggy source:
/** 
 * Add a selection
 * @param iElementID
 * @param selectedElementRep
 */
public void addSelection(final int iElementID,final SelectedElementRep selectedElementRep){
  if (!hashSelectedElementID2SelectedElementReps.containsKey(iElementID)) {
    hashSelectedElementID2SelectedElementReps.put(iElementID,new ArrayList<SelectedElementRep>());
    hashSelectedElementID2SelectedElementReps.get(iElementID).add(selectedElementRep);
  }
}

Fixed version (ground truth):
/** 
 * Add a selection
 * @param iElementID
 * @param selectedElementRep
 */
public void addSelection(final int iElementID,final SelectedElementRep selectedElementRep){
  if (!hashSelectedElementID2SelectedElementReps.containsKey(iElementID)) {
    hashSelectedElementID2SelectedElementReps.put(iElementID,new ArrayList<SelectedElementRep>());
  }
  hashSelectedElementID2SelectedElementReps.get(iElementID).add(selectedElementRep);
}
Program: 59155
Project: 59155
Buggy source:
public void mouseDragged(MouseEvent e){
  int x=e.getX();
  int y=e.getY();
  Dimension size=e.getComponent().getSize();
  if (!bMouseRightButtonDown) {
    if (!bMouseMiddleButtonDown) {
      Rotf currentRotX=new Rotf();
      Rotf currentRotY=new Rotf();
      float fpercentX=(float)(x - prevMouseX) / (float)(size.width) * fMouseSensitivityRotation;
      float fpercentY=(float)(y - prevMouseY) / (float)(size.height) * fMouseSensitivityRotation;
      currentRotX.set(new Vec3f(0,1,0),fpercentX * MathUtil.PI);
      currentRotY.set(new Vec3f(0,1,0),fpercentY * MathUtil.PI);
      currentRotX=currentRotX.times(currentRotY);
      prevMouseX=x;
      prevMouseY=y;
      gLCanvas.getViewCamera().addCameraRotation(currentRotX);
    }
 else {
      float zoomX=fZoomScale * (float)(x - prevMouseX);
      float zoomY=fZoomScale * (float)(prevMouseY - y);
      if ((zoomX < 0.0f) && (zoomY > 0.0f)) {
        zoomX=-zoomX;
      }
      prevMouseX=x;
      prevMouseY=y;
      gLCanvas.getViewCamera().addCameraScale(new Vec3f(0,0,zoomY + zoomX));
    }
  }
 else {
    Vec3f addVec3f=new Vec3f(fPanScale * ((float)(x - prevMouseX) / (float)size.width),fPanScale * ((float)(prevMouseY - y) / (float)size.height),0.0f);
    prevMouseX=x;
    prevMouseY=y;
    gLCanvas.getViewCamera().addCameraPosition(addVec3f);
  }
}

Fixed version (ground truth):
public void mouseDragged(MouseEvent e){
  int x=e.getX();
  int y=e.getY();
  Dimension size=e.getComponent().getSize();
  if (!bMouseRightButtonDown) {
  }
 else {
    Vec3f addVec3f=new Vec3f(fPanScale * ((float)(x - prevMouseX) / (float)size.width),fPanScale * ((float)(prevMouseY - y) / (float)size.height),0.0f);
    prevMouseX=x;
    prevMouseY=y;
    gLCanvas.getViewCamera().addCameraPosition(addVec3f);
  }
}
Program: 59157
Project: 59157
Buggy source:
private void pickObjects(final GL gl,Point pickPoint){
  int PICKING_BUFSIZE=1024;
  int iArPickingBuffer[]=new int[PICKING_BUFSIZE];
  IntBuffer pickingBuffer=BufferUtil.newIntBuffer(PICKING_BUFSIZE);
  int iHitCount=-1;
  int viewport[]=new int[4];
  gl.glGetIntegerv(GL.GL_VIEWPORT,viewport,0);
  gl.glSelectBuffer(PICKING_BUFSIZE,pickingBuffer);
  gl.glRenderMode(GL.GL_SELECT);
  gl.glInitNames();
  gl.glMatrixMode(GL.GL_PROJECTION);
  gl.glPushMatrix();
  gl.glLoadIdentity();
  GLU glu=new GLU();
  glu.gluPickMatrix((double)pickPoint.x,(double)(viewport[3] - pickPoint.y),5.0,5.0,viewport,0);
  float fAspectRatio=(float)(float)(viewport[3] - viewport[1]) / (float)(viewport[2] - viewport[0]);
  if (fAspectRatio < 1.0) {
    fAspectRatio=1.0f / fAspectRatio;
    gl.glOrtho(-4 * fAspectRatio,4 * fAspectRatio,-4 * 1.0,4 * 1.0,-1.0,1.0);
  }
 else   gl.glOrtho(-4 * 1.0,4 * 1.0,-4 * fAspectRatio,4 * fAspectRatio,-1.0,1.0);
  gl.glMatrixMode(GL.GL_MODELVIEW);
  Point tmpPickPoint=(Point)pickPoint.clone();
  pickPoint=null;
  renderScene(gl);
  gl.glMatrixMode(GL.GL_PROJECTION);
  gl.glPopMatrix();
  gl.glMatrixMode(GL.GL_MODELVIEW);
  iHitCount=gl.glRenderMode(GL.GL_RENDER);
  pickingBuffer.get(iArPickingBuffer);
  processHits(gl,iHitCount,iArPickingBuffer,tmpPickPoint);
}

Fixed version (ground truth):
private void pickObjects(final GL gl,Point pickPoint){
  int PICKING_BUFSIZE=1024;
  int iArPickingBuffer[]=new int[PICKING_BUFSIZE];
  IntBuffer pickingBuffer=BufferUtil.newIntBuffer(PICKING_BUFSIZE);
  int iHitCount=-1;
  int viewport[]=new int[4];
  gl.glGetIntegerv(GL.GL_VIEWPORT,viewport,0);
  gl.glSelectBuffer(PICKING_BUFSIZE,pickingBuffer);
  gl.glRenderMode(GL.GL_SELECT);
  gl.glInitNames();
  gl.glMatrixMode(GL.GL_PROJECTION);
  gl.glPushMatrix();
  gl.glLoadIdentity();
  GLU glu=new GLU();
  glu.gluPickMatrix((double)pickPoint.x,(double)(viewport[3] - pickPoint.y),5.0,5.0,viewport,0);
  float fAspectRatio=(float)(float)(viewport[3] - viewport[1]) / (float)(viewport[2] - viewport[0]);
  if (fAspectRatio < 1.0) {
    fAspectRatio=1.0f / fAspectRatio;
    gl.glOrtho(-4 * fAspectRatio,4 * fAspectRatio,-4 * 1.0,4 * 1.0,-1.0,1.0);
  }
 else   gl.glOrtho(-4 * 1.0,4 * 1.0,-4 * fAspectRatio,4 * fAspectRatio,-1.0,1.0);
  gl.glMatrixMode(GL.GL_MODELVIEW);
  Point tmpPickPoint=(Point)pickPoint.clone();
  pickPoint=null;
  renderScene(gl);
  gl.glMatrixMode(GL.GL_PROJECTION);
  gl.glPopMatrix();
  gl.glMatrixMode(GL.GL_MODELVIEW);
  iHitCount=gl.glRenderMode(GL.GL_RENDER);
  pickingManager.processHits(this,iHitCount,iArPickingBuffer,EPickingMode.CLICKED);
}
Program: 59158
Project: 59158
Buggy source:
private void doSlerpActions(final GL gl){
  if (arSlerpActions.isEmpty())   return;
  if (iSlerpFactor < 1000) {
    iSlerpFactor+=1200 * time.deltaT();
    if (iSlerpFactor > 1000)     iSlerpFactor=1000;
    System.out.println("String_Node_Str" + iSlerpFactor);
  }
  slerpPathway(gl,arSlerpActions.get(0));
}

Fixed version (ground truth):
private void doSlerpActions(final GL gl){
  if (arSlerpActions.isEmpty())   return;
  if (iSlerpFactor < 1000) {
    iSlerpFactor+=1200 * time.deltaT();
    if (iSlerpFactor > 1000)     iSlerpFactor=1000;
  }
  slerpPathway(gl,arSlerpActions.get(0));
}
Program: 59159
Project: 59159
Buggy source:
/** 
 * Get the GLCanvas.
 * @return The GLCanvas that is supposed to be filled by the View.
 */
public GLCanvas getGLCanvas(){
  return refGLCanvas;
}

Fixed version (ground truth):
/** 
 * Get the GLCanvas embedded in a JPanel. Obviously this is faster than the GLCanvas AWT embedded frame!
 * @return The GLCanvas that is supposed to be filled by the View.
 */
public GLJPanel getGLCanvas(){
  return refGLCanvas;
}
Program: 59160
Project: 59160
Buggy source:
private List<List<IGraphItem>> createDepthSortedList(final int iSetDepth){
  List<List<IGraphItem>> resultDepthSortedList=new ArrayList<List<IGraphItem>>(iSetDepth);
  for (int i=0; i < iSearchDepth; i++) {
    depthSortedList.add(i,new ArrayList<IGraphItem>());
  }
  return resultDepthSortedList;
}

Fixed version (ground truth):
private List<List<IGraphItem>> createDepthSortedList(final int iSetDepth){
  List<List<IGraphItem>> resultDepthSortedList=new ArrayList<List<IGraphItem>>(iSetDepth);
  for (int i=0; i < iSearchDepth; i++) {
    resultDepthSortedList.add(i,new ArrayList<IGraphItem>());
  }
  return resultDepthSortedList;
}
Program: 59161
Project: 59161
Buggy source:
public final List<List<IGraphItem>> getSearchResultDepthOrdered(){
  List<List<IGraphItem>> resultList=createDepthSortedList(iSearchDepth);
  Iterator<List<IGraphItem>> iterDepthLevels=depthSortedList.iterator();
  for (int i=0; iterDepthLevels.hasNext(); i++) {
    List<IGraphItem> resultListDepthLevels=resultList.get(i);
    Iterator<IGraphItem> iterInnerLoop=iterDepthLevels.next().iterator();
    while (iterInnerLoop.hasNext()) {
      resultListDepthLevels.add(iterInnerLoop.next());
    }
  }
  return resultList;
}

Fixed version (ground truth):
/** 
 * Create a deep copy of teh search result list.
 * @return deep copy of the search result list
 */
public final List<List<IGraphItem>> getSearchResultDepthOrdered(){
  List<List<IGraphItem>> resultList=createDepthSortedList(depthSortedList.size());
  Iterator<List<IGraphItem>> iterRawDataTopLevel=depthSortedList.iterator();
  int index=0;
  while (iterRawDataTopLevel.hasNext()) {
    List<IGraphItem> currentRawDataDepthList=iterRawDataTopLevel.next();
    Iterator<IGraphItem> iterRawDataInnerLoop=currentRawDataDepthList.iterator();
    ArrayList<IGraphItem> resultListDeepCopy=new ArrayList<IGraphItem>(currentRawDataDepthList.size());
    while (iterRawDataInnerLoop.hasNext()) {
      resultListDeepCopy.add(iterRawDataInnerLoop.next());
    }
    resultList.set(index,resultListDeepCopy);
    index++;
  }
  return resultList;
}
Program: 59163
Project: 59163
Buggy source:
/** 
 * Create a deep copy of teh search result list.
 * @return deep copy of the search result list
 */
public final List<List<IGraphItem>> getSearchResultDepthOrdered(){
  List<List<IGraphItem>> resultList=createDepthSortedList(depthSortedList.size());
  Iterator<List<IGraphItem>> iterRawDataTopLevel=depthSortedList.iterator();
  int index=0;
  while (iterRawDataTopLevel.hasNext()) {
    List<IGraphItem> currentRawDataDepthList=iterRawDataTopLevel.next();
    Iterator<IGraphItem> iterRawDataInnerLoop=currentRawDataDepthList.iterator();
    ArrayList<IGraphItem> resultListDeepCopy=new ArrayList<IGraphItem>(currentRawDataDepthList.size());
    while (iterRawDataInnerLoop.hasNext()) {
      resultListDeepCopy.add(iterRawDataInnerLoop.next());
    }
    resultList.set(index,resultListDeepCopy);
    index++;
  }
  return resultList;
}

Fixed version (ground truth):
/** 
 * Create a deep copy of teh search result list.
 * @return deep copy of the search result list
 */
public final List<List<IGraphItem>> getSearchResultDepthOrdered(){
  List<List<IGraphItem>> resultList=createDepthSortedList(depthSortedList.size());
  for (int iIndex=0; iIndex < depthSortedList.size(); iIndex++) {
    List<IGraphItem> currentRawDataDepthList=depthSortedList.get(iIndex);
    Iterator<IGraphItem> iterRawDataInnerLoop=currentRawDataDepthList.iterator();
    ArrayList<IGraphItem> resultListDeepCopy=new ArrayList<IGraphItem>(currentRawDataDepthList.size());
    while (iterRawDataInnerLoop.hasNext()) {
      resultListDeepCopy.add(iterRawDataInnerLoop.next());
    }
    resultList.set(iIndex,resultListDeepCopy);
  }
  return resultList;
}