nus-yam/ex-repair huggingface dataset:
Program: 58739
Project: 58739
Buggy source:
@Override public abstract void drawLayout();

Fixed version (ground truth):
@Override public abstract void drawLayout(GL gl);
Program: 58740
Project: 58740
Buggy source:
@Override public void drawLayout(){
}

Fixed version (ground truth):
@Override public void drawLayout(GL gl){
}
Program: 58741
Project: 58741
Buggy source:
/** 
 * Draw the tree layout. TODO: specify params and maybe naming (espacially GLLists and Animation)
 * @return
 */
public void drawLayout();

Fixed version (ground truth):
/** 
 * Draw the tree layout. TODO: specify params and maybe naming (espacially GLLists and Animation)
 * @return
 */
public void drawLayout(GL gl);
Program: 58742
Project: 58742
Buggy source:
@Override public void drawLayout(){
  tree.getRoot().drawAtPostion(this.gl,fHigh / 2f,fWidth / 2f,0.0f,0.2f,0.2f,EDrawAbleNodeDetailLevel.VeryHigh);
  tree.getRoot().drawAtPostion(this.gl,fHigh / 4f,fWidth / 4f,0.0f,0.2f,0.2f,EDrawAbleNodeDetailLevel.High);
  return;
}

Fixed version (ground truth):
@Override public void drawLayout(GL gl){
  tree.getRoot().drawAtPostion(gl,fHigh / 2f,fWidth / 2f,0.0f,0.2f,0.2f,EDrawAbleNodeDetailLevel.VeryHigh);
  tree.getRoot().drawAtPostion(gl,fHigh / 4f,fWidth / 4f,0.0f,0.2f,0.2f,EDrawAbleNodeDetailLevel.High);
  return;
}
Program: 58744
Project: 58744
Buggy source:
@Override public boolean performOk(){
  boolean bReturn=super.performOk();
  PreferenceStore store=GeneralManager.get().getPreferenceStore();
  store.setValue(PreferenceConstants.COLOR_MAPPING_USED,iCurrentlyUsedMapping);
  int iCount=1;
  for (  String color : sAlTargetColors) {
    store.setValue(PreferenceConstants.GENE_EXPRESSION_PREFIX + PreferenceConstants.COLOR_MARKER_POINT_COLOR + iCount,color);
    iCount++;
  }
  ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION).initiFromPreferenceStore();
  IEventPublisher eventPublisher=GeneralManager.get().getEventPublisher();
  RedrawViewEvent event=new RedrawViewEvent();
  event.setSender(this);
  eventPublisher.triggerEvent(event);
  return bReturn;
}

Fixed version (ground truth):
@Override public boolean performOk(){
  boolean bReturn=super.performOk();
  PreferenceStore store=GeneralManager.get().getPreferenceStore();
  store.setValue(PreferenceConstants.COLOR_MAPPING_USED,iCurrentlyUsedMapping);
  int iCount=1;
  for (  String color : sAlTargetColors) {
    store.setValue(PreferenceConstants.GENE_EXPRESSION_PREFIX + PreferenceConstants.COLOR_MARKER_POINT_COLOR + iCount,color);
    iCount++;
  }
  ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION).initiFromPreferenceStore();
  IEventPublisher eventPublisher=GeneralManager.get().getEventPublisher();
  UpdateViewEvent event=new UpdateViewEvent();
  event.setSender(this);
  eventPublisher.triggerEvent(event);
  return bReturn;
}
Program: 58745
Project: 58745
Buggy source:
@Override public void registerEventListeners(){
  redrawViewListener=new RedrawViewListener();
  redrawViewListener.setHandler(this);
  eventPublisher.addListener(RedrawViewEvent.class,redrawViewListener);
  clusterNodeMouseOverListener=new ClusterNodeSelectionListener();
  clusterNodeMouseOverListener.setHandler(this);
  eventPublisher.addListener(ClusterNodeSelectionEvent.class,clusterNodeMouseOverListener);
  goBackInHistoryListener=new GoBackInHistoryListener();
  goBackInHistoryListener.setHandler(this);
  eventPublisher.addListener(GoBackInHistoryEvent.class,goBackInHistoryListener);
  goForthInHistoryListener=new GoForthInHistoryListener();
  goForthInHistoryListener.setHandler(this);
  eventPublisher.addListener(GoForthInHistoryEvent.class,goForthInHistoryListener);
  changeColorModeListener=new ChangeColorModeListener();
  changeColorModeListener.setHandler(this);
  eventPublisher.addListener(ChangeColorModeEvent.class,changeColorModeListener);
  setMaxDisplayedHierarchyDepthListener=new SetMaxDisplayedHierarchyDepthListener();
  setMaxDisplayedHierarchyDepthListener.setHandler(this);
  eventPublisher.addListener(SetMaxDisplayedHierarchyDepthEvent.class,setMaxDisplayedHierarchyDepthListener);
}

Fixed version (ground truth):
@Override public void registerEventListeners(){
  redrawViewListener=new RedrawViewListener();
  redrawViewListener.setHandler(this);
  eventPublisher.addListener(RedrawViewEvent.class,redrawViewListener);
  clusterNodeMouseOverListener=new ClusterNodeSelectionListener();
  clusterNodeMouseOverListener.setHandler(this);
  eventPublisher.addListener(ClusterNodeSelectionEvent.class,clusterNodeMouseOverListener);
  goBackInHistoryListener=new GoBackInHistoryListener();
  goBackInHistoryListener.setHandler(this);
  eventPublisher.addListener(GoBackInHistoryEvent.class,goBackInHistoryListener);
  goForthInHistoryListener=new GoForthInHistoryListener();
  goForthInHistoryListener.setHandler(this);
  eventPublisher.addListener(GoForthInHistoryEvent.class,goForthInHistoryListener);
  changeColorModeListener=new ChangeColorModeListener();
  changeColorModeListener.setHandler(this);
  eventPublisher.addListener(ChangeColorModeEvent.class,changeColorModeListener);
  setMaxDisplayedHierarchyDepthListener=new SetMaxDisplayedHierarchyDepthListener();
  setMaxDisplayedHierarchyDepthListener.setHandler(this);
  eventPublisher.addListener(SetMaxDisplayedHierarchyDepthEvent.class,setMaxDisplayedHierarchyDepthListener);
  updateViewListener=new UpdateViewListener();
  updateViewListener.setHandler(this);
  eventPublisher.addListener(UpdateViewEvent.class,updateViewListener);
}
Program: 58746
Project: 58746
Buggy source:
@Override public void unregisterEventListeners(){
  if (redrawViewListener != null) {
    eventPublisher.removeListener(redrawViewListener);
    redrawViewListener=null;
  }
  if (clusterNodeMouseOverListener != null) {
    eventPublisher.removeListener(clusterNodeMouseOverListener);
    clusterNodeMouseOverListener=null;
  }
  if (goBackInHistoryListener != null) {
    eventPublisher.removeListener(goBackInHistoryListener);
    goBackInHistoryListener=null;
  }
  if (goForthInHistoryListener != null) {
    eventPublisher.removeListener(goForthInHistoryListener);
    goForthInHistoryListener=null;
  }
  if (changeColorModeListener != null) {
    eventPublisher.removeListener(changeColorModeListener);
    changeColorModeListener=null;
  }
  if (setMaxDisplayedHierarchyDepthListener != null) {
    eventPublisher.removeListener(setMaxDisplayedHierarchyDepthListener);
    setMaxDisplayedHierarchyDepthListener=null;
  }
}

Fixed version (ground truth):
@Override public void unregisterEventListeners(){
  if (redrawViewListener != null) {
    eventPublisher.removeListener(redrawViewListener);
    redrawViewListener=null;
  }
  if (clusterNodeMouseOverListener != null) {
    eventPublisher.removeListener(clusterNodeMouseOverListener);
    clusterNodeMouseOverListener=null;
  }
  if (goBackInHistoryListener != null) {
    eventPublisher.removeListener(goBackInHistoryListener);
    goBackInHistoryListener=null;
  }
  if (goForthInHistoryListener != null) {
    eventPublisher.removeListener(goForthInHistoryListener);
    goForthInHistoryListener=null;
  }
  if (changeColorModeListener != null) {
    eventPublisher.removeListener(changeColorModeListener);
    changeColorModeListener=null;
  }
  if (setMaxDisplayedHierarchyDepthListener != null) {
    eventPublisher.removeListener(setMaxDisplayedHierarchyDepthListener);
    setMaxDisplayedHierarchyDepthListener=null;
  }
  if (updateViewListener != null) {
    eventPublisher.removeListener(updateViewListener);
    updateViewListener=null;
  }
}
Program: 58747
Project: 58747
Buggy source:
@Override public void handleUpdateView(){
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void handleUpdateView(){
  Tree<ClusterNode> tree=set.getClusteredTreeGenes();
  if (tree != null) {
    initHierarchy(tree);
  }
  setDisplayListDirty();
}
Program: 58748
Project: 58748
Buggy source:
private void buildDisplayList(final GL gl,int iGLDisplayListIndex){
  gl.glNewList(iGLDisplayListIndex,GL.GL_COMPILE);
  if (tree == null) {
    if (bRenderGeneTree == true) {
      if (set.getClusteredTreeGenes() != null) {
        tree=set.getClusteredTreeGenes();
        currentRootNode=tree.getRoot();
      }
 else       renderSymbol(gl);
    }
 else {
      if (set.getClusteredTreeExps() != null) {
        tree=set.getClusteredTreeExps();
      }
 else       renderSymbol(gl);
    }
  }
 else {
    if (tree != null) {
      if (bRenderGeneTree) {
        xmax=viewFrustum.getWidth() - 0.2f;
        fSampleHeight=(viewFrustum.getHeight() - 0.7f) / tree.getRoot().getNrElements();
        fLevelWidth=(viewFrustum.getWidth() - 3f) / tree.getRoot().getDepth();
        yPosInit=viewFrustum.getHeight() - 0.4f;
      }
 else {
        ymin=0.1f;
        fSampleWidth=(viewFrustum.getWidth() - 1f) / tree.getRoot().getNrElements();
        fLevelHeight=(viewFrustum.getHeight() - 0.7f) / tree.getRoot().getDepth();
        xPosInit=0.4f;
      }
      determinePositions();
    }
    gl.glLineWidth(0.1f);
    if (bRenderGeneTree) {
      gl.glTranslatef(0.1f,0,0);
{
        renderDendrogramGenes(gl,currentRootNode);
      }
    }
 else {
      gl.glTranslatef(0,0.1f,0);
      renderDendrogramExperiments(gl,tree.getRoot());
    }
    renderSelections(gl,tree.getRoot());
    renderCut(gl);
    if (bRenderGeneTree)     gl.glTranslatef(-0.1f,0,0);
 else     gl.glTranslatef(0,-0.1f,0);
  }
  gl.glEndList();
}

Fixed version (ground truth):
private void buildDisplayList(final GL gl,int iGLDisplayListIndex){
  gl.glNewList(iGLDisplayListIndex,GL.GL_COMPILE);
  if (tree == null) {
    if (bRenderGeneTree == true) {
      if (set.getClusteredTreeGenes() != null) {
        tree=set.getClusteredTreeGenes();
        currentRootNode=tree.getRoot();
      }
 else       renderSymbol(gl);
    }
 else {
      if (set.getClusteredTreeExps() != null) {
        tree=set.getClusteredTreeExps();
      }
 else       renderSymbol(gl);
    }
  }
  if (tree != null) {
    if (bRenderGeneTree) {
      xmax=viewFrustum.getWidth() - 0.2f;
      fSampleHeight=(viewFrustum.getHeight() - 0.7f) / tree.getRoot().getNrElements();
      fLevelWidth=(viewFrustum.getWidth() - 3f) / tree.getRoot().getDepth();
      yPosInit=viewFrustum.getHeight() - 0.4f;
    }
 else {
      ymin=0.1f;
      fSampleWidth=(viewFrustum.getWidth() - 1f) / tree.getRoot().getNrElements();
      fLevelHeight=(viewFrustum.getHeight() - 0.7f) / tree.getRoot().getDepth();
      xPosInit=0.4f;
    }
    determinePositions();
    gl.glLineWidth(0.1f);
    if (bRenderGeneTree) {
      gl.glTranslatef(0.1f,0,0);
{
        renderDendrogramGenes(gl,currentRootNode);
      }
    }
 else {
      gl.glTranslatef(0,0.1f,0);
      renderDendrogramExperiments(gl,tree.getRoot());
    }
    renderSelections(gl,tree.getRoot());
    renderCut(gl);
    if (bRenderGeneTree)     gl.glTranslatef(-0.1f,0,0);
 else     gl.glTranslatef(0,-0.1f,0);
  }
  gl.glEndList();
}
Program: 58749
Project: 58749
Buggy source:
@Override public void handleUpdateView(){
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void handleUpdateView(){
  tree=null;
  setDisplayListDirty();
}
Program: 58751
Project: 58751
Buggy source:
/** 
 * Returns name of the node. Therefore we need an index of the gene/experiment
 * @param eClustererType either gene or expression clustering
 * @param index index of the current node in the VA
 * @return name of the current node
 */
private String getNodeName(EClustererType eClustererType,int index){
  String nodeName=null;
  IVirtualArray contentVA=set.getVA(idContent);
  IVirtualArray storageVA=set.getVA(idStorage);
  if (eClustererType == EClustererType.GENE_CLUSTERING) {
    if (set.getSetType() == ESetType.GENE_EXPRESSION_DATA) {
      nodeName=GeneticIDMappingHelper.get().getShortNameFromExpressionIndex(contentVA.get(index));
      nodeName+="String_Node_Str";
      nodeName+=GeneticIDMappingHelper.get().getRefSeqStringFromStorageIndex(contentVA.get(index));
    }
 else     if (set.getSetType() == ESetType.UNSPECIFIED) {
      nodeName="String_Node_Str" + contentVA.get(index) + "String_Node_Str";
    }
 else {
      throw new IllegalStateException("String_Node_Str" + set.getSetType() + "String_Node_Str");
    }
  }
 else {
    nodeName=set.get(storageVA.get(index)).getLabel();
  }
  if (hashedNodeNames.containsKey(nodeName)) {
    int iNr=1;
    if (duplicatedNodes.containsKey(nodeName)) {
      iNr=duplicatedNodes.get(nodeName);
      duplicatedNodes.put(nodeName,iNr + 1);
    }
 else     duplicatedNodes.put(nodeName,iNr);
    nodeName=nodeName + "String_Node_Str" + iNr;
  }
 else   hashedNodeNames.put(nodeName,1);
  return nodeName;
}

Fixed version (ground truth):
/** 
 * Returns name of the node. Therefore we need an index of the gene/experiment
 * @param eClustererType either gene or expression clustering
 * @param index index of the current node in the VA
 * @return name of the current node
 */
private String getNodeName(EClustererType eClustererType,int index){
  String nodeName=null;
  IVirtualArray contentVA=set.getVA(idContent);
  IVirtualArray storageVA=set.getVA(idStorage);
  if (eClustererType == EClustererType.GENE_CLUSTERING) {
    if (set.getSetType() == ESetType.GENE_EXPRESSION_DATA) {
      nodeName=GeneticIDMappingHelper.get().getShortNameFromExpressionIndex(contentVA.get(index));
      nodeName+="String_Node_Str";
      nodeName+=GeneticIDMappingHelper.get().getRefSeqStringFromStorageIndex(contentVA.get(index));
    }
 else     if (set.getSetType() == ESetType.UNSPECIFIED) {
      nodeName="String_Node_Str" + contentVA.get(index) + "String_Node_Str";
    }
 else {
      throw new IllegalStateException("String_Node_Str" + set.getSetType() + "String_Node_Str");
    }
  }
 else {
    nodeName=set.get(storageVA.get(index)).getLabel();
  }
  if (hashedNodeNames.containsKey(nodeName)) {
    int iNr=1;
    if (duplicatedNodes.containsKey(nodeName)) {
      iNr=duplicatedNodes.get(nodeName);
      duplicatedNodes.put(nodeName,++iNr);
    }
 else     duplicatedNodes.put(nodeName,iNr);
    nodeName=nodeName + "String_Node_Str" + iNr;
  }
 else   hashedNodeNames.put(nodeName,1);
  return nodeName;
}
Program: 58752
Project: 58752
Buggy source:
@Override public void handleMergeGroups(boolean bGeneGroup){
  int iVAId=0;
  if (bGeneGroup)   iVAId=iContentVAID;
 else   iVAId=iStorageVAID;
  IGroupList groupList=set.getVA(iVAId).getGroupList();
  ArrayList<Integer> selGroups=new ArrayList<Integer>();
  if (groupList == null) {
    System.out.println("String_Node_Str");
    return;
  }
  for (  Group iter : groupList) {
    if (iter.getSelectionType() == ESelectionType.SELECTION)     selGroups.add(groupList.indexOf(iter));
  }
  while (selGroups.size() >= 2) {
    int iLastSelected=selGroups.size() - 1;
    if (groupList.merge(set.getVA(iVAId),selGroups.get(iLastSelected - 1),selGroups.get(iLastSelected)) == false) {
      System.out.println("String_Node_Str");
      return;
    }
    selGroups.remove(iLastSelected);
  }
  bRedrawTextures=true;
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void handleMergeGroups(boolean bGeneGroup){
  int iVAId=0;
  if (bGeneGroup)   iVAId=iContentVAID;
 else   iVAId=iStorageVAID;
  IGroupList groupList=set.getVA(iVAId).getGroupList();
  ArrayList<Integer> selGroups=new ArrayList<Integer>();
  if (groupList == null) {
    System.out.println("String_Node_Str");
    return;
  }
  for (  Group iter : groupList) {
    if (iter.getSelectionType() == ESelectionType.SELECTION)     selGroups.add(groupList.indexOf(iter));
  }
  while (selGroups.size() >= 2) {
    int iLastSelected=selGroups.size() - 1;
    if (groupList.merge(set.getVA(iVAId),selGroups.get(iLastSelected - 1),selGroups.get(iLastSelected)) == false) {
      System.out.println("String_Node_Str");
      return;
    }
    selGroups.remove(iLastSelected);
  }
  if (bGeneGroup)   iSelectorBar=selGroups.get(0) + 1;
  bRedrawTextures=true;
  setDisplayListDirty();
}
Program: 58755
Project: 58755
Buggy source:
@Override public Integer getSortedVAId(ISet set,Integer idContent,Integer idStorage,ClusterState clusterState){
  Integer VAId=0;
  if (clusterState.getClustererType() == EClustererType.GENE_CLUSTERING)   fClusterFactor=clusterState.getAffinityPropClusterFactorGenes();
 else   fClusterFactor=clusterState.getAffinityPropClusterFactorExperiments();
  eDistanceMeasure=clusterState.getDistanceMeasure();
  if (determineSimilarities(set,idContent,idStorage,clusterState.getClustererType()) == -1) {
    GeneralManager.get().getEventPublisher().triggerEvent(new ClusterProgressEvent(100,false));
    return -1;
  }
  VAId=affinityPropagation(set,clusterState.getClustererType());
  return VAId;
}

Fixed version (ground truth):
@Override public Integer getSortedVAId(ISet set,Integer idContent,Integer idStorage,ClusterState clusterState){
  Integer VAId=0;
  if (clusterState.getClustererType() == EClustererType.GENE_CLUSTERING)   fClusterFactor=clusterState.getAffinityPropClusterFactorGenes();
 else   fClusterFactor=clusterState.getAffinityPropClusterFactorExperiments();
  eDistanceMeasure=clusterState.getDistanceMeasure();
  if (determineSimilarities(set,idContent,idStorage,clusterState.getClustererType()) == -1) {
    GeneralManager.get().getEventPublisher().triggerEvent(new ClusterProgressEvent(100,false));
    return -1;
  }
  this.set=set;
  VAId=affinityPropagation(clusterState.getClustererType());
  return VAId;
}
Program: 58757
Project: 58757
Buggy source:
private void CNodeToTree(ClusterNode clusterNode,CNode node){
  if (node.getChilds() != null) {
    int iNrChildsNode=node.getChilds().size();
    for (int i=0; i < iNrChildsNode; i++) {
      CNode currentNode=(CNode)node.getChilds().elementAt(i);
      ClusterNode currentGraph=new ClusterNode("String_Node_Str" + currentNode.getClusterNum(),currentNode.getClusterNum(),0f,0,false);
      currentGraph.setNrElements(1);
      tree.addChild(clusterNode,currentGraph);
      CNodeToTree(currentGraph,currentNode);
    }
  }
}

Fixed version (ground truth):
private void CNodeToTree(ClusterNode clusterNode,CNode node,EClustererType eClustererType){
  if (node.getChilds() != null) {
    int iNrChildsNode=node.getChilds().size();
    for (int i=0; i < iNrChildsNode; i++) {
      CNode currentNode=(CNode)node.getChilds().elementAt(i);
      int clusterNr=0;
      clusterNr=currentNode.getClusterNum();
      ClusterNode currentGraph=new ClusterNode("String_Node_Str" + clusterNr,clusterNr,0f,0,false);
      currentGraph.setNrElements(1);
      tree.addChild(clusterNode,currentGraph);
      CNodeToTree(currentGraph,currentNode,eClustererType);
    }
  }
}
Program: 58758
Project: 58758
Buggy source:
@Override public Integer getSortedVAId(ISet set,Integer idContent,Integer idStorage,ClusterState clusterState){
  Integer VAId=0;
  VAId=cluster(set,idContent,idStorage,clusterState.getClustererType());
  return VAId;
}

Fixed version (ground truth):
@Override public Integer getSortedVAId(ISet set,Integer idContent,Integer idStorage,ClusterState clusterState){
  Integer VAId=0;
  this.set=set;
  this.iVAIdContent=idContent;
  this.iVAIdStorage=idStorage;
  VAId=cluster(idContent,idStorage,clusterState.getClustererType());
  return VAId;
}
Program: 58765
Project: 58765
Buggy source:
private Set<Integer> convertExternalToInternal(Integer iSelectionID){
  if (externalToInternalMapping.isMultiMap())   return GeneralManager.get().getIDMappingManager().getMultiID(externalToInternalMapping,iSelectionID);
  Set<Integer> iSetID=new HashSet<Integer>();
  iSetID.add((Integer)GeneralManager.get().getIDMappingManager().getID(externalToInternalMapping,iSelectionID));
  return iSetID;
}

Fixed version (ground truth):
private Set<Integer> convertExternalToInternal(Integer iSelectionID){
  if (externalToInternalMapping == null)   throw new IllegalStateException("String_Node_Str" + this + "String_Node_Str");
  if (externalToInternalMapping.isMultiMap())   return GeneralManager.get().getIDMappingManager().getMultiID(externalToInternalMapping,iSelectionID);
  Set<Integer> iSetID=new HashSet<Integer>();
  iSetID.add((Integer)GeneralManager.get().getIDMappingManager().getID(externalToInternalMapping,iSelectionID));
  return iSetID;
}
Program: 58766
Project: 58766
Buggy source:
/** 
 * Constructor.
 */
public TabularDataViewRep(final int iParentContainerId,final String sLabel){
  super(iParentContainerId,sLabel,GeneralManager.get().getIDManager().createID(EManagedObjectType.VIEW_SWT_TABULAR_DATA_VIEWER));
  mapVAIDs=new EnumMap<EStorageBasedVAType,Integer>(EStorageBasedVAType.class);
  contentSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPRESSION_INDEX).externalIDType(EIDType.REFSEQ_MRNA_INT).mappingType(EMappingType.EXPRESSION_INDEX_2_REFSEQ_MRNA_INT,EMappingType.REFSEQ_MRNA_INT_2_EXPRESSION_INDEX).build();
  storageSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPERIMENT_INDEX).build();
  idMappingManager=generalManager.getIDMappingManager();
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public TabularDataViewRep(final int iParentContainerId,final String sLabel){
  super(iParentContainerId,sLabel,GeneralManager.get().getIDManager().createID(EManagedObjectType.VIEW_SWT_TABULAR_DATA_VIEWER));
  mapVAIDs=new EnumMap<EStorageBasedVAType,Integer>(EStorageBasedVAType.class);
  contentSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPRESSION_INDEX).build();
  storageSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPERIMENT_INDEX).build();
  idMappingManager=generalManager.getIDMappingManager();
}
Program: 58768
Project: 58768
Buggy source:
private static int determineHierarchyDepthRec(Tree<ClusterNode> tree,ClusterNode node){
  if (tree.hasChildren(node)) {
    int temp=node.getDepth();
    for (    ClusterNode current : tree.getChildren(node)) {
      if (temp < determineHierarchyDepthRec(tree,current))       temp=determineHierarchyDepthRec(tree,current) + 1;
    }
    node.setDepth(temp);
  }
 else   node.setDepth(1);
  return node.getDepth();
}

Fixed version (ground truth):
private static int determineHierarchyDepthRec(Tree<ClusterNode> tree,ClusterNode node){
  if (tree.hasChildren(node)) {
    int temp=node.getDepth();
    for (    ClusterNode current : tree.getChildren(node)) {
      if (temp <= determineHierarchyDepthRec(tree,current))       temp=determineHierarchyDepthRec(tree,current) + 1;
    }
    node.setDepth(temp);
  }
 else   node.setDepth(1);
  return node.getDepth();
}
Program: 58769
Project: 58769
Buggy source:
/** 
 * Returns name of the node. Therefore we need an index of the gene/experiment
 * @param eClustererType either gene or expression clustering
 * @param index index of the current node in the VA
 * @return name of the current node
 */
private String getNodeName(EClustererType eClustererType,int index){
  String nodeName=null;
  IVirtualArray contentVA=set.getVA(idContent);
  IVirtualArray storageVA=set.getVA(idStorage);
  if (eClustererType == EClustererType.GENE_CLUSTERING) {
    if (set.getSetType() == ESetType.GENE_EXPRESSION_DATA) {
      nodeName=GeneticIDMappingHelper.get().getShortNameFromExpressionIndex(contentVA.get(index));
      nodeName+="String_Node_Str";
      nodeName+=GeneticIDMappingHelper.get().getRefSeqStringFromStorageIndex(contentVA.get(index));
    }
 else     if (set.getSetType() == ESetType.UNSPECIFIED) {
      nodeName="String_Node_Str" + contentVA.get(index) + "String_Node_Str";
    }
 else {
      throw new IllegalStateException("String_Node_Str" + set.getSetType() + "String_Node_Str");
    }
  }
 else {
    nodeName=set.get(storageVA.get(index)).getLabel();
  }
  return nodeName;
}

Fixed version (ground truth):
/** 
 * Returns name of the node. Therefore we need an index of the gene/experiment
 * @param eClustererType either gene or expression clustering
 * @param index index of the current node in the VA
 * @return name of the current node
 */
private String getNodeName(EClustererType eClustererType,int index){
  String nodeName=null;
  IVirtualArray contentVA=set.getVA(idContent);
  IVirtualArray storageVA=set.getVA(idStorage);
  if (eClustererType == EClustererType.GENE_CLUSTERING) {
    if (set.getSetType() == ESetType.GENE_EXPRESSION_DATA) {
      nodeName=GeneticIDMappingHelper.get().getShortNameFromExpressionIndex(contentVA.get(index));
      nodeName+="String_Node_Str";
      nodeName+=GeneticIDMappingHelper.get().getRefSeqStringFromStorageIndex(contentVA.get(index));
    }
 else     if (set.getSetType() == ESetType.UNSPECIFIED) {
      nodeName="String_Node_Str" + contentVA.get(index) + "String_Node_Str";
    }
 else {
      throw new IllegalStateException("String_Node_Str" + set.getSetType() + "String_Node_Str");
    }
  }
 else {
    nodeName=set.get(storageVA.get(index)).getLabel();
  }
  if (hashedNodeNames.containsKey(nodeName)) {
    int iNr=1;
    if (duplicatedNodes.containsKey(nodeName)) {
      iNr=duplicatedNodes.get(nodeName);
      duplicatedNodes.put(nodeName,iNr + 1);
    }
 else     duplicatedNodes.put(nodeName,iNr);
    nodeName=nodeName + "String_Node_Str" + iNr;
  }
 else   hashedNodeNames.put(nodeName,1);
  return nodeName;
}
Program: 58770
Project: 58770
Buggy source:
public DendrogramRenderStyle(AGLDendrogram dendrogram,IViewFrustum viewFrustum){
  super(viewFrustum);
}

Fixed version (ground truth):
public DendrogramRenderStyle(GLDendrogram dendrogram,IViewFrustum viewFrustum){
  super(viewFrustum);
}
Program: 58773
Project: 58773
Buggy source:
/** 
 * Function responsible for initialization of hierarchy levels. Depending on the amount of samples in the data set 2 or 3 levels are used.
 */
private void initHierarchy(){
  if (set == null)   return;
  createDendrogram();
  iNumberOfElements=set.getVA(iContentVAID).size();
  if (iNumberOfElements < MIN_SAMPLES_PER_HEATMAP) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (iNumberOfElements < 100) {
    bSkipLevel1=true;
    iSelectorBar=1;
    iSamplesPerTexture=iNumberOfElements;
    iSamplesPerHeatmap=(int)Math.floor(iSamplesPerTexture / 3);
  }
 else {
    bSkipLevel1=false;
    iSelectorBar=1;
    iSamplesPerTexture=(int)Math.floor(iNumberOfElements / 5);
    if (iSamplesPerTexture > 250)     iSamplesPerTexture=250;
    iSamplesPerHeatmap=(int)Math.floor(iSamplesPerTexture / 3);
  }
  if (iSamplesPerHeatmap > MAX_SAMPLES_PER_HEATMAP)   iSamplesPerTexture=100;
  if (iSamplesPerHeatmap < MIN_SAMPLES_PER_HEATMAP)   iSamplesPerHeatmap=MIN_SAMPLES_PER_HEATMAP;
}

Fixed version (ground truth):
/** 
 * Function responsible for initialization of hierarchy levels. Depending on the amount of samples in the data set 2 or 3 levels are used.
 */
private void initHierarchy(){
  if (set == null)   return;
  createDendrogram();
  iNumberOfElements=set.getVA(iContentVAID).size();
  if (iNumberOfElements < MIN_SAMPLES_PER_HEATMAP) {
    System.out.println("String_Node_Str");
  }
  if (iNumberOfElements < 100) {
    bSkipLevel1=true;
    iSelectorBar=1;
    iSamplesPerTexture=iNumberOfElements;
    iSamplesPerHeatmap=(int)Math.floor(iSamplesPerTexture / 3);
  }
 else {
    bSkipLevel1=false;
    iSelectorBar=1;
    iSamplesPerTexture=(int)Math.floor(iNumberOfElements / 5);
    if (iSamplesPerTexture > 250)     iSamplesPerTexture=250;
    iSamplesPerHeatmap=(int)Math.floor(iSamplesPerTexture / 3);
  }
  if (iSamplesPerHeatmap > MAX_SAMPLES_PER_HEATMAP)   iSamplesPerTexture=100;
  if (iSamplesPerHeatmap < MIN_SAMPLES_PER_HEATMAP)   iSamplesPerHeatmap=MIN_SAMPLES_PER_HEATMAP;
}
Program: 58776
Project: 58776
Buggy source:
public boolean loadData(){
  BufferedReader brFile=GeneralManager.get().getResourceLoader().getResource(sFileName);
  GeneralManager.get().getLogger().log(new Status(Status.INFO,GeneralManager.PLUGIN_ID,"String_Node_Str" + sFileName + "String_Node_Str"));
  try {
    this.loadDataParseFile(brFile,computeNumberOfLinesInFile(sFileName));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  if (brFile != null) {
    try {
      brFile.close();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  GeneralManager.get().getLogger().log(new Status(Status.WARNING,GeneralManager.PLUGIN_ID,"String_Node_Str" + sFileName + "String_Node_Str"));
  setArraysToStorages();
  return true;
}

Fixed version (ground truth):
public boolean loadData(){
  BufferedReader brFile=GeneralManager.get().getResourceLoader().getResource(sFileName);
  GeneralManager.get().getLogger().log(new Status(Status.INFO,GeneralManager.PLUGIN_ID,"String_Node_Str" + sFileName + "String_Node_Str"));
  try {
    this.loadDataParseFile(brFile,computeNumberOfLinesInFile(sFileName));
    if (brFile != null) {
      brFile.close();
    }
  }
 catch (  IOException ioe) {
    return false;
  }
catch (  NumberFormatException nfe) {
    return false;
  }
  GeneralManager.get().getLogger().log(new Status(Status.WARNING,GeneralManager.PLUGIN_ID,"String_Node_Str" + sFileName + "String_Node_Str"));
  setArraysToStorages();
  return true;
}
Program: 58779
Project: 58779
Buggy source:
public void execute(){
  createData();
}

Fixed version (ground truth):
public boolean execute(){
  return createData();
}
Program: 58780
Project: 58780
Buggy source:
@Override protected void okPressed(){
  fileLoadDataAction.execute();
  super.okPressed();
}

Fixed version (ground truth):
@Override protected void okPressed(){
  if (fileLoadDataAction.execute())   super.okPressed();
}
Program: 58781
Project: 58781
Buggy source:
@Override public boolean performFinish(){
  if (((NewProjectImportDataPage)getPage(NewProjectImportDataPage.PAGE_NAME)).isPageComplete()) {
    ((NewProjectImportDataPage)getPage(NewProjectImportDataPage.PAGE_NAME)).getFileLoadDataAction().execute();
    Application.applicationMode=EApplicationMode.STANDARD;
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  if (((NewProjectImportDataPage)getPage(NewProjectImportDataPage.PAGE_NAME)).isPageComplete()) {
    if (!((NewProjectImportDataPage)getPage(NewProjectImportDataPage.PAGE_NAME)).getFileLoadDataAction().execute()) {
      return false;
    }
    Application.applicationMode=EApplicationMode.STANDARD;
    return true;
  }
  return false;
}
Program: 58783
Project: 58783
Buggy source:
@Override public void triggerEvent(AEvent event){
  if (!event.checkIntegrity()) {
    throw new IllegalStateException("String_Node_Str" + event + "String_Node_Str");
  }
  Collection<AEventListener<?>> listeners=listenerMap.get(event.getClass());
  if (listeners != null) {
    for (    AEventListener<?> receiver : listeners) {
      receiver.queueEvent(event);
    }
  }
}

Fixed version (ground truth):
@Override public synchronized void triggerEvent(AEvent event){
  if (!event.checkIntegrity()) {
    throw new IllegalStateException("String_Node_Str" + event + "String_Node_Str");
  }
  Collection<AEventListener<?>> listeners=listenerMap.get(event.getClass());
  if (listeners != null) {
    for (    AEventListener<?> receiver : listeners) {
      receiver.queueEvent(event);
    }
  }
}
Program: 58784
Project: 58784
Buggy source:
@Override public void removeListener(AEventListener<?> listener){
  for (  Collection<AEventListener<?>> listeners : listenerMap.values()) {
    listeners.remove(listener);
  }
}

Fixed version (ground truth):
@Override public synchronized void removeListener(AEventListener<?> listener){
  for (  Collection<AEventListener<?>> listeners : listenerMap.values()) {
    listeners.remove(listener);
  }
}
Program: 58785
Project: 58785
Buggy source:
@Override public void addListener(Class<? extends AEvent> eventClass,AEventListener<?> listener){
  listener.checkIntegrity();
  Collection<AEventListener<?>> listeners=listenerMap.get(eventClass);
  if (listeners == null) {
    listeners=new ArrayList<AEventListener<?>>();
    listenerMap.put(eventClass,listeners);
  }
  listeners.add(listener);
}

Fixed version (ground truth):
@Override public synchronized void addListener(Class<? extends AEvent> eventClass,AEventListener<?> listener){
  listener.checkIntegrity();
  Collection<AEventListener<?>> listeners=listenerMap.get(eventClass);
  if (listeners == null) {
    listeners=new ArrayList<AEventListener<?>>();
    listenerMap.put(eventClass,listeners);
  }
  listeners.add(listener);
}
Program: 58786
Project: 58786
Buggy source:
@Override public Integer getSortedVAId(ISet set,Integer idContent,Integer idStorage,ClusterState clusterState){
  Integer VAId=0;
  if (clusterState.getClustererType() == EClustererType.GENE_CLUSTERING)   fClusterFactor=clusterState.getAffinityPropClusterFactorGenes();
 else   fClusterFactor=clusterState.getAffinityPropClusterFactorExperiments();
  eDistanceMeasure=clusterState.getDistanceMeasure();
  buildProgressBar();
  determineSimilarities(set,idContent,idStorage,clusterState.getClustererType());
  VAId=affinityPropagation(set,clusterState.getClustererType());
  shell.close();
  return VAId;
}

Fixed version (ground truth):
@Override public Integer getSortedVAId(ISet set,Integer idContent,Integer idStorage,ClusterState clusterState){
  Integer VAId=0;
  if (clusterState.getClustererType() == EClustererType.GENE_CLUSTERING)   fClusterFactor=clusterState.getAffinityPropClusterFactorGenes();
 else   fClusterFactor=clusterState.getAffinityPropClusterFactorExperiments();
  eDistanceMeasure=clusterState.getDistanceMeasure();
  determineSimilarities(set,idContent,idStorage,clusterState.getClustererType());
  VAId=affinityPropagation(set,clusterState.getClustererType());
  shell.close();
  return VAId;
}
Program: 58787
Project: 58787
Buggy source:
@Override public Integer getSortedVAId(ISet set,Integer idContent,Integer idStorage,ClusterState clusterState){
  Integer VAId=0;
  buildProgressBar();
  VAId=cluster(set,idContent,idStorage,clusterState.getClustererType());
  shell.close();
  return VAId;
}

Fixed version (ground truth):
@Override public Integer getSortedVAId(ISet set,Integer idContent,Integer idStorage,ClusterState clusterState){
  Integer VAId=0;
  VAId=cluster(set,idContent,idStorage,clusterState.getClustererType());
  shell.close();
  return VAId;
}
Program: 58788
Project: 58788
Buggy source:
/** 
 * Constructor.
 */
public AView(final int iParentContainerId,final String sLabel,final int iViewID){
  super(iViewID);
  generalManager=GeneralManager.get();
  eventPublisher=generalManager.getEventPublisher();
  this.iParentContainerId=iParentContainerId;
  this.sLabel=sLabel;
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public AView(final int iParentContainerId,final String sLabel,final int iViewID){
  super(iViewID);
  generalManager=GeneralManager.get();
  eventPublisher=generalManager.getEventPublisher();
  this.iParentContainerId=iParentContainerId;
  this.sLabel=sLabel;
  registerEventListeners();
}
Program: 58789
Project: 58789
Buggy source:
/** 
 * Registers the listeners for this view to the event system. To release the allocated resources unregisterEventListeners() has to be called. This method is intended to be overridden, but it's super() should be called to be registered to the listeners defined by other classes in the hierarchy.
 */
public void registerEventListeners(){
  newSetListener=new NewSetListener();
  newSetListener.setHandler(this);
  eventPublisher.addListener(NewSetEvent.class,newSetListener);
}

Fixed version (ground truth):
/** 
 * <p> Registers the listeners for this view to the event system. To release the allocated resources unregisterEventListeners() has to be called. This method is intended to be overridden, but it's super() should be called to be registered to the listeners defined by other classes in the hierarchy. </p> <p> This method is called by the Constructor of   {@link AView}, therefore there is no need to call it yourself. </p>
 */
public void registerEventListeners(){
  newSetListener=new NewSetListener();
  newSetListener.setHandler(this);
  eventPublisher.addListener(NewSetEvent.class,newSetListener);
}
Program: 58790
Project: 58790
Buggy source:
/** 
 * Registers the listeners for this view to the event system. To release the allocated resources unregisterEventListeners() has to be called. If inherited classes override this method, they should usually call it via super.
 */
@Override public void registerEventListeners(){
  super.registerEventListeners();
  IEventPublisher eventPublisher=generalManager.getEventPublisher();
  selectionUpdateListener=new SelectionUpdateListener();
  selectionUpdateListener.setHandler(this);
  eventPublisher.addListener(SelectionUpdateEvent.class,selectionUpdateListener);
  triggerSelectionCommandListener=new TriggerSelectionCommandListener();
  triggerSelectionCommandListener.setHandler(this);
  eventPublisher.addListener(TriggerSelectionCommandEvent.class,triggerSelectionCommandListener);
}

Fixed version (ground truth):
@Override public void registerEventListeners(){
  super.registerEventListeners();
  IEventPublisher eventPublisher=generalManager.getEventPublisher();
  selectionUpdateListener=new SelectionUpdateListener();
  selectionUpdateListener.setHandler(this);
  eventPublisher.addListener(SelectionUpdateEvent.class,selectionUpdateListener);
  triggerSelectionCommandListener=new TriggerSelectionCommandListener();
  triggerSelectionCommandListener.setHandler(this);
  eventPublisher.addListener(TriggerSelectionCommandEvent.class,triggerSelectionCommandListener);
}
Program: 58791
Project: 58791
Buggy source:
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLHistogram(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum,true);
  viewType=EManagedObjectType.GL_HISTOGRAM;
  colorMapping=ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION);
  renderStyle=new HistogramRenderStyle(this,viewFrustum);
  textRenderer=new TextRenderer(new Font("String_Node_Str",Font.PLAIN,18),true,true);
  registerEventListeners();
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLHistogram(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum,true);
  viewType=EManagedObjectType.GL_HISTOGRAM;
  colorMapping=ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION);
  renderStyle=new HistogramRenderStyle(this,viewFrustum);
  textRenderer=new TextRenderer(new Font("String_Node_Str",Font.PLAIN,18),true,true);
}
Program: 58792
Project: 58792
Buggy source:
/** 
 * Creates and initializes a new view based on its serialized form. The view is already added to the list of event receivers and senders.
 * @param gl
 * @param serView serialized form of the view to create
 * @return the created view ready to be used within the application
 */
private AGLEventListener createView(GL gl,ASerializedView serView){
  ICommandManager cm=generalManager.getCommandManager();
  ECommandType cmdType=serView.getCreationCommandType();
  CmdCreateGLEventListener cmdView=(CmdCreateGLEventListener)cm.createCommandByType(cmdType);
  cmdView.setAttributesFromSerializedForm(serView);
  cmdView.setSet(set);
  cmdView.doCommand();
  AGLEventListener glView=cmdView.getCreatedObject();
  glView.registerEventListeners();
  useCase.addView(glView);
  glView.setUseCase(useCase);
  glView.setRenderedRemote(true);
  glView.initData();
  if (glView instanceof GLPathway) {
    initializePathwayView((GLPathway)glView);
  }
  triggerMostRecentDelta();
  return glView;
}

Fixed version (ground truth):
/** 
 * Creates and initializes a new view based on its serialized form. The view is already added to the list of event receivers and senders.
 * @param gl
 * @param serView serialized form of the view to create
 * @return the created view ready to be used within the application
 */
private AGLEventListener createView(GL gl,ASerializedView serView){
  ICommandManager cm=generalManager.getCommandManager();
  ECommandType cmdType=serView.getCreationCommandType();
  CmdCreateGLEventListener cmdView=(CmdCreateGLEventListener)cm.createCommandByType(cmdType);
  cmdView.setAttributesFromSerializedForm(serView);
  cmdView.setSet(set);
  cmdView.doCommand();
  AGLEventListener glView=cmdView.getCreatedObject();
  useCase.addView(glView);
  glView.setUseCase(useCase);
  glView.setRenderedRemote(true);
  glView.initData();
  if (glView instanceof GLPathway) {
    initializePathwayView((GLPathway)glView);
  }
  triggerMostRecentDelta();
  return glView;
}
Program: 58794
Project: 58794
Buggy source:
/** 
 * Constructor.
 */
public HTMLBrowserViewRep(final int iParentContainerId,final String sLabel,int iViewID){
  super(iParentContainerId,sLabel,iViewID);
  init();
  registerEventListeners();
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public HTMLBrowserViewRep(final int iParentContainerId,final String sLabel,int iViewID){
  super(iParentContainerId,sLabel,iViewID);
  init();
}
Program: 58795
Project: 58795
Buggy source:
@Override public void createPartControl(Composite parent){
  browserView=(HTMLBrowserViewRep)GeneralManager.get().getViewGLCanvasManager().createView(EManagedObjectType.VIEW_SWT_BROWSER_GENOME,-1,"String_Node_Str");
  browserView.registerEventListeners();
  browserView.initViewRCP(parent);
  browserView.drawView();
  iViewID=browserView.getID();
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  browserView=(HTMLBrowserViewRep)GeneralManager.get().getViewGLCanvasManager().createView(EManagedObjectType.VIEW_SWT_BROWSER_GENOME,-1,"String_Node_Str");
  browserView.initViewRCP(parent);
  browserView.drawView();
  iViewID=browserView.getID();
}
Program: 58796
Project: 58796
Buggy source:
@Override public void createPartControl(Composite parent){
  tabularDataView=(TabularDataViewRep)GeneralManager.get().getViewGLCanvasManager().createView(EManagedObjectType.VIEW_SWT_TABULAR_DATA_VIEWER,-1,"String_Node_Str");
  tabularDataView.registerEventListeners();
  IUseCase useCase=GeneralManager.get().getUseCase();
  tabularDataView.setSet(useCase.getSet());
  tabularDataView.initViewRCP(parent);
  tabularDataView.drawView();
  useCase.addView(tabularDataView);
  parentComposite=parent;
  GeneralManager.get().getViewGLCanvasManager().registerItem(tabularDataView);
  iViewID=tabularDataView.getID();
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  tabularDataView=(TabularDataViewRep)GeneralManager.get().getViewGLCanvasManager().createView(EManagedObjectType.VIEW_SWT_TABULAR_DATA_VIEWER,-1,"String_Node_Str");
  IUseCase useCase=GeneralManager.get().getUseCase();
  tabularDataView.setSet(useCase.getSet());
  tabularDataView.initViewRCP(parent);
  tabularDataView.drawView();
  useCase.addView(tabularDataView);
  parentComposite=parent;
  GeneralManager.get().getViewGLCanvasManager().registerItem(tabularDataView);
  iViewID=tabularDataView.getID();
}
Program: 58799
Project: 58799
Buggy source:
private void renderCaption(GL gl,String sLabel,float fXOrigin,float fYOrigin,float fZOrigin,float fRotation,float fFontScaling){
  if (sLabel.length() > GeneralRenderStyle.NUM_CHAR_LIMIT + 1) {
    sLabel=sLabel.substring(0,GeneralRenderStyle.NUM_CHAR_LIMIT - 2);
    sLabel=sLabel + "String_Node_Str";
  }
  gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
  gl.glTranslatef(fXOrigin,fYOrigin,fZOrigin);
  gl.glRotatef(fRotation,0,0,1);
  textRenderer.begin3DRendering();
  textRenderer.draw3D(sLabel,0,0,0,fFontScaling);
  textRenderer.end3DRendering();
  gl.glRotatef(-fRotation,0,0,1);
  gl.glTranslatef(-fXOrigin,-fYOrigin,-fZOrigin);
  gl.glPopAttrib();
}

Fixed version (ground truth):
private void renderCaption(GL gl,String sLabel,float fXOrigin,float fYOrigin,float fZOrigin,float fRotation,float fFontScaling){
  if (isRenderedRemote() && remoteRenderingGLView instanceof GLRemoteRendering)   fFontScaling*=1.5;
  if (sLabel.length() > GeneralRenderStyle.NUM_CHAR_LIMIT + 1) {
    sLabel=sLabel.substring(0,GeneralRenderStyle.NUM_CHAR_LIMIT - 2);
    sLabel=sLabel + "String_Node_Str";
  }
  gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
  gl.glTranslatef(fXOrigin,fYOrigin,fZOrigin);
  gl.glRotatef(fRotation,0,0,1);
  textRenderer.begin3DRendering();
  textRenderer.draw3D(sLabel,0,0,0,fFontScaling);
  textRenderer.end3DRendering();
  gl.glRotatef(-fRotation,0,0,1);
  gl.glTranslatef(-fXOrigin,-fYOrigin,-fZOrigin);
  gl.glPopAttrib();
}
Program: 58800
Project: 58800
Buggy source:
private void handleUnselection(){
  handleGateUnselection();
  handleNANUnselection();
  handleMasterGateUnselection();
  polylineSelectionManager.clearSelection(ESelectionType.DESELECTED);
  for (  ArrayList<Integer> alCurrent : hashIsGateBlocking.values()) {
    polylineSelectionManager.addToType(ESelectionType.DESELECTED,alCurrent);
  }
  for (  ArrayList<Integer> alCurrent : alIsAngleBlocking) {
    polylineSelectionManager.addToType(ESelectionType.DESELECTED,alCurrent);
  }
  for (  ArrayList<Integer> alCurrent : hashIsNANBlocking.values()) {
    polylineSelectionManager.addToType(ESelectionType.DESELECTED,alCurrent);
  }
}

Fixed version (ground truth):
private void handleUnselection(){
  handleGateUnselection();
  handleNANUnselection();
  handleMasterGateUnselection();
  polylineSelectionManager.clearSelection(ESelectionType.DESELECTED);
  for (  ArrayList<Integer> alCurrent : hashIsGateBlocking.values()) {
    polylineSelectionManager.addToType(ESelectionType.DESELECTED,alCurrent);
  }
  for (  ArrayList<Integer> alCurrent : alIsAngleBlocking) {
    polylineSelectionManager.addToType(ESelectionType.DESELECTED,alCurrent);
  }
  for (  ArrayList<Integer> alCurrent : hashIsNANBlocking.values()) {
    polylineSelectionManager.addToType(ESelectionType.DESELECTED,alCurrent);
  }
  if (bIsDraggingActive || bIsAngularBrushingActive) {
    triggerSelectionUpdate();
  }
}
Program: 58802
Project: 58802
Buggy source:
/** 
 * Render the captions on the axis
 * @param gl
 * @param fXOrigin
 * @param fYOrigin
 * @param renderMode
 */
private void renderBoxedYValues(GL gl,float fXOrigin,float fYOrigin,String sRawValue,ESelectionType renderMode){
  if (fYOrigin < 0)   return;
  gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
  gl.glLineWidth(Y_AXIS_LINE_WIDTH);
  gl.glColor4fv(Y_AXIS_COLOR,0);
  Rectangle2D tempRectangle=textRenderer.getBounds(sRawValue);
  float fSmallSpacing=renderStyle.getVerySmallSpacing();
  float fBackPlaneWidth=(float)tempRectangle.getWidth() * renderStyle.getSmallFontScalingFactor();
  float fBackPlaneHeight=(float)tempRectangle.getHeight() * renderStyle.getSmallFontScalingFactor();
  float fXTextOrigin=fXOrigin + 2 * AXIS_MARKER_WIDTH;
  float fYTextOrigin=fYOrigin;
  gl.glColor4f(1f,1f,1f,0.8f);
  gl.glBegin(GL.GL_POLYGON);
  gl.glVertex3f(fXTextOrigin - fSmallSpacing,fYTextOrigin - fSmallSpacing,LABEL_Z);
  gl.glVertex3f(fXTextOrigin + fBackPlaneWidth,fYTextOrigin - fSmallSpacing,LABEL_Z);
  gl.glVertex3f(fXTextOrigin + fBackPlaneWidth,fYTextOrigin + fBackPlaneHeight,LABEL_Z);
  gl.glVertex3f(fXTextOrigin - fSmallSpacing,fYTextOrigin + fBackPlaneHeight,LABEL_Z);
  gl.glEnd();
  renderNumber(sRawValue,fXTextOrigin,fYTextOrigin);
  gl.glPopAttrib();
}

Fixed version (ground truth):
/** 
 * Render the captions on the axis
 * @param gl
 * @param fXOrigin
 * @param fYOrigin
 * @param renderMode
 */
private void renderBoxedYValues(GL gl,float fXOrigin,float fYOrigin,String sRawValue,ESelectionType renderMode){
  float fScaling=renderStyle.getSmallFontScalingFactor();
  if (isRenderedRemote())   fScaling*=1.5f;
  if (fYOrigin < 0)   return;
  gl.glPushAttrib(GL.GL_CURRENT_BIT | GL.GL_LINE_BIT);
  gl.glLineWidth(Y_AXIS_LINE_WIDTH);
  gl.glColor4fv(Y_AXIS_COLOR,0);
  Rectangle2D tempRectangle=textRenderer.getBounds(sRawValue);
  float fSmallSpacing=renderStyle.getVerySmallSpacing();
  float fBackPlaneWidth=(float)tempRectangle.getWidth() * fScaling;
  float fBackPlaneHeight=(float)tempRectangle.getHeight() * fScaling;
  float fXTextOrigin=fXOrigin + 2 * AXIS_MARKER_WIDTH;
  float fYTextOrigin=fYOrigin;
  gl.glColor4f(1f,1f,1f,0.8f);
  gl.glBegin(GL.GL_POLYGON);
  gl.glVertex3f(fXTextOrigin - fSmallSpacing,fYTextOrigin - fSmallSpacing,LABEL_Z);
  gl.glVertex3f(fXTextOrigin + fBackPlaneWidth,fYTextOrigin - fSmallSpacing,LABEL_Z);
  gl.glVertex3f(fXTextOrigin + fBackPlaneWidth,fYTextOrigin + fBackPlaneHeight,LABEL_Z);
  gl.glVertex3f(fXTextOrigin - fSmallSpacing,fYTextOrigin + fBackPlaneHeight,LABEL_Z);
  gl.glEnd();
  renderNumber(sRawValue,fXTextOrigin,fYTextOrigin);
  gl.glPopAttrib();
}