nus-yam/ex-repair huggingface dataset:
Program: 58586
Project: 58586
Buggy source:
/** 
 * Constructor.
 */
public GLParallelCoordinates(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum);
  viewType=EManagedObjectType.GL_PARALLEL_COORDINATES;
  renderStyle=new ParCoordsRenderStyle(this,viewFrustum);
  super.renderStyle=this.renderStyle;
  contentSelectionManager=new SelectionManager.Builder(EIDType.EXPRESSION_INDEX).build();
  storageSelectionManager=new SelectionManager.Builder(EIDType.EXPERIMENT_INDEX).build();
  alIsAngleBlocking=new ArrayList<ArrayList<Integer>>();
  alIsAngleBlocking.add(new ArrayList<Integer>());
  alAxisSpacing=new ArrayList<Float>();
  iNumberOfRandomElements=generalManager.getPreferenceStore().getInt(PreferenceConstants.PC_NUM_RANDOM_SAMPLING_POINT);
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public GLParallelCoordinates(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum);
  viewType=EManagedObjectType.GL_PARALLEL_COORDINATES;
  renderStyle=new ParCoordsRenderStyle(this,viewFrustum);
  super.renderStyle=this.renderStyle;
  alIsAngleBlocking=new ArrayList<ArrayList<Integer>>();
  alIsAngleBlocking.add(new ArrayList<Integer>());
  alAxisSpacing=new ArrayList<Float>();
  iNumberOfRandomElements=generalManager.getPreferenceStore().getInt(PreferenceConstants.PC_NUM_RANDOM_SAMPLING_POINT);
}
Program: 58588
Project: 58588
Buggy source:
/** 
 * Reset all selections and deselections
 */
@Override public void clearAllSelections(){
  initGates();
  contentSelectionManager.clearSelections();
  storageSelectionManager.clearSelections();
  bIsAngularBrushingActive=false;
  for (  ArrayList<Integer> alCurrent : alIsAngleBlocking) {
    alCurrent.clear();
  }
  for (  ArrayList<Integer> alCurrent : hashIsGateBlocking.values()) {
    alCurrent.clear();
  }
  setDisplayListDirty();
  connectedElementRepresentationManager.clear(EIDType.EXPRESSION_INDEX);
  if (glSelectionHeatMap != null) {
    glSelectionHeatMap.clearAllSelections();
  }
}

Fixed version (ground truth):
/** 
 * Reset all selections and deselections
 */
@Override public void clearAllSelections(){
  initGates();
  contentSelectionManager.clearSelections();
  storageSelectionManager.clearSelections();
  bIsAngularBrushingActive=false;
  for (  ArrayList<Integer> alCurrent : alIsAngleBlocking) {
    alCurrent.clear();
  }
  for (  ArrayList<Integer> alCurrent : hashIsGateBlocking.values()) {
    alCurrent.clear();
  }
  setDisplayListDirty();
  connectedElementRepresentationManager.clear(EIDType.EXPRESSION_INDEX);
  if (glBookmarks != null) {
    glBookmarks.clearAllSelections();
  }
}
Program: 58589
Project: 58589
Buggy source:
public float getWidthOfCoordinateSystem(){
  float numberOfSpacings=2;
  if (pcs.getSet().isSetHomogeneous())   numberOfSpacings=2.5f;
  if (pcs.bShowSelectionHeatMap)   return viewFrustum.getWidth() - COORDINATE_SIDE_SPACING * numberOfSpacings * getScaling() - pcs.glSelectionHeatMap.getViewFrustum().getWidth();
 else   return viewFrustum.getWidth() - COORDINATE_SIDE_SPACING * numberOfSpacings * getScaling();
}

Fixed version (ground truth):
public float getWidthOfCoordinateSystem(){
  float numberOfSpacings=2;
  if (pcs.getSet().isSetHomogeneous())   numberOfSpacings=2.5f;
  if (pcs.bShowSelectionHeatMap)   return viewFrustum.getWidth() - COORDINATE_SIDE_SPACING * numberOfSpacings * getScaling() - pcs.glBookmarks.getViewFrustum().getWidth();
 else   return viewFrustum.getWidth() - COORDINATE_SIDE_SPACING * numberOfSpacings * getScaling();
}
Program: 58591
Project: 58591
Buggy source:
private IUseCase createUseCase(EDataDomain dataDomain){
switch (dataDomain) {
case CLINICAL_DATA:
    return new ClinicalUseCase();
case GENETIC_DATA:
  return new GeneticUseCase();
case GENERAL_DATA:
return new UnspecifiedUseCase();
default :
throw new IllegalStateException("String_Node_Str" + dataDomain);
}
}

Fixed version (ground truth):
private IUseCase createUseCase(EDataDomain dataDomain){
switch (dataDomain) {
case CLINICAL_DATA:
    return new ClinicalUseCase();
case GENETIC_DATA:
  return new GeneticUseCase();
case TISSUE_DATA:
return new TissueUseCase();
case PATHWAY_DATA:
return new PathwayUseCase();
case GENERAL_DATA:
return new UnspecifiedUseCase();
default :
throw new IllegalStateException("String_Node_Str" + dataDomain);
}
}
Program: 58593
Project: 58593
Buggy source:
/** 
 * Gets the interval to wait between 2 auto-saves in miliseconds.
 * @return auto save interval
 */
public long getInterval(){
  return interval;
}

Fixed version (ground truth):
/** 
 * Gets the interval to wait between 2 auto-saves in milliseconds.
 * @return auto save interval
 */
public long getInterval(){
  return interval;
}
Program: 58594
Project: 58594
Buggy source:
/** 
 * Sets the interval to wait between 2 auto-saves in miliseconds.
 * @param interval new auto save interval to set
 */
public void setInterval(long interval){
  this.interval=interval;
}

Fixed version (ground truth):
/** 
 * Sets the interval to wait between 2 auto-saves in milliseconds.
 * @param interval new auto save interval to set
 */
public void setInterval(long interval){
  this.interval=interval;
}
Program: 58595
Project: 58595
Buggy source:
/** 
 * Gets the timestamp when the most recent auto save operation has been performered. If no auto save operation has been performed yet, the initialization time of this instance is returned.
 * @return timestamp of most recent recent auto save operation.
 */
public Date getLastSaveTimeStamp(){
  return lastSaveTimeStamp;
}

Fixed version (ground truth):
/** 
 * Gets the timestamp when the most recent auto save operation has been performed. If no auto save operation has been performed yet, the initialization time of this instance is returned.
 * @return timestamp of most recent recent auto save operation.
 */
public Date getLastSaveTimeStamp(){
  return lastSaveTimeStamp;
}
Program: 58596
Project: 58596
Buggy source:
@Override public void handleUpdateView(){
  bRedrawTextures=true;
  bFirstStartExperimentDendrogram=true;
  bFirstStartGeneDendrogram=true;
  initData();
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void handleUpdateView(){
  bRedrawTextures=true;
  bFirstStartExperimentDendrogram=true;
  bFirstStartGeneDendrogram=true;
  setDisplayListDirty();
}
Program: 58597
Project: 58597
Buggy source:
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLHyperbolic(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum,true);
  viewType=EManagedObjectType.GL_HYPERBOLIC;
  colorMappingManager=ColorMappingManager.get();
  renderStyle=new HyperbolicRenderStyle(viewFrustum);
  tree=buildTestTree(HyperbolicRenderStyle.MAX_DEPTH,7);
  System.out.println(tree.getGraph().toString());
  layouter=new LTLayouter(viewFrustum,pickingManager,iUniqueID);
  layouter.setTree(tree);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLHyperbolic(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum,true);
  viewType=EManagedObjectType.GL_HYPERBOLIC;
  colorMappingManager=ColorMappingManager.get();
  renderStyle=new HyperbolicRenderStyle(viewFrustum);
  tree=buildTestTree(HyperbolicRenderStyle.MAX_DEPTH,7);
  System.out.println(tree.getGraph().toString());
  layouter=new HTLayouter(viewFrustum,pickingManager,iUniqueID);
  layouter.setTree(tree);
}
Program: 58599
Project: 58599
Buggy source:
@Override public void renderTreeLayout(){
  fRadius=treeProjector.getProtectedLineFromCenterToBorder() / HyperbolicRenderStyle.MAX_DEPTH;
  updateSizeInfo();
  mNodeSpaceRec=new HashMap<IDrawAbleNode,Integer>();
  fDepth=tree.getDepth();
  setFCenterX(fWidth / 2);
  setFCenterY(fHeight / 2);
  setFCenterZ(0.0f);
  if (tree == null)   return;
  float fNodeSize=HyperbolicRenderStyle.MAX_NODE_SIZE;
  IDrawAbleNode rootNode=tree.getRoot();
  rootNode.setDetailLevel(EDrawAbleNodeDetailLevel.Low);
  placeNode(rootNode,fCenterX,fCenterY,fCenterZ,fNodeSize,fNodeSize);
  int fLayer=2;
  float fNumberOfNodesInLayer=tree.getNumberOfElementsInLayer((int)fLayer);
  float fCurrentNodeCount=0.0f;
  int overall=0;
  if (tree.hasChildren(rootNode))   overall=updateNodespace(tree.getChildren(rootNode),2);
  mNodeSpaceRec.put(rootNode,overall);
  if (tree.hasChildren(rootNode)) {
    ArrayList<IDrawAbleNode> childs=new ArrayList<IDrawAbleNode>();
    childs=tree.getChildren(rootNode);
    for (    IDrawAbleNode tmpChild : childs) {
      fCurrentNodeCount++;
      float fFirstLayerAngle=calculateCircle(fRadius,fCurrentNodeCount,fNumberOfNodesInLayer);
      fNodeSize=HyperbolicRenderStyle.MAX_NODE_SIZE * (float)Math.pow(HyperbolicRenderStyle.NODE_SCALING_PER_LAYER,fLayer);
      tmpChild.setDetailLevel(EDrawAbleNodeDetailLevel.Low);
      placeNode(tmpChild,fXCoord,fYCoord,0.0f,fNodeSize,fNodeSize);
      placeConnection(rootNode,tmpChild);
      calculateRecursiveLayout(tmpChild,fRadius,fFirstLayerAngle * fCurrentNodeCount,fLayer + 1,fNodeSize,fXCoord,fYCoord);
    }
  }
  return;
}

Fixed version (ground truth):
@Override public void renderTreeLayout(){
  updateSizeInfo();
  fDepth=tree.getDepth();
  fViewAbleSpaceRadius=treeProjector.getProtectedLineFromCenterToBorder();
  fRadius=fViewAbleSpaceRadius / (HyperbolicRenderStyle.MAX_DEPTH - 1);
  mNodeSpaceRec=new HashMap<IDrawAbleNode,Integer>();
  setFCenterX(fWidth / 2);
  setFCenterY(fHeight / 2);
  setFCenterZ(0.0f);
  if (tree == null)   return;
  float fNodeSize=HyperbolicRenderStyle.MAX_NODE_SIZE;
  IDrawAbleNode rootNode=tree.getRoot();
  rootNode.setDetailLevel(EDrawAbleNodeDetailLevel.Low);
  placeNode(rootNode,fCenterX,fCenterY,fCenterZ,fNodeSize,fNodeSize);
  int fLayer=2;
  float fNumberOfNodesInLayer=tree.getNumberOfElementsInLayer((int)fLayer);
  float fCurrentNodeCount=0.0f;
  if (tree.hasChildren(rootNode)) {
    ArrayList<IDrawAbleNode> childs=new ArrayList<IDrawAbleNode>();
    childs=tree.getChildren(rootNode);
    for (    IDrawAbleNode tmpChild : childs) {
      fCurrentNodeCount++;
      float fFirstLayerAngle=calculateCircle(fRadius,fCurrentNodeCount,fNumberOfNodesInLayer);
      fNodeSize=HyperbolicRenderStyle.MAX_NODE_SIZE * (float)Math.pow(HyperbolicRenderStyle.NODE_SCALING_PER_LAYER,fLayer);
      tmpChild.setDetailLevel(EDrawAbleNodeDetailLevel.Low);
      placeNode(tmpChild,fXCoord,fYCoord,0.0f,fNodeSize,fNodeSize);
      placeConnection(rootNode,tmpChild);
      calculateRecursiveLayout(tmpChild,fRadius,fFirstLayerAngle * fCurrentNodeCount,fLayer + 1,fNodeSize,fXCoord,fYCoord);
    }
  }
  return;
}
Program: 58600
Project: 58600
Buggy source:
public float getProtectedLineFromCenterToBorder(){
  return radius * (float)Math.toRadians(90);
}

Fixed version (ground truth):
public float getProtectedLineFromCenterToBorder(){
  float fLine=radius * ((float)Math.PI / 2);
  return fLine;
}
Program: 58601
Project: 58601
Buggy source:
/** 
 * Function used for updating cursor position in case of dragging
 * @param gl
 */
private void handleDragging(final GL gl){
  Point currentPoint=glMouseListener.getPickedPoint();
  float[] fArTargetWorldCoordinates=new float[3];
  fArTargetWorldCoordinates=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,currentPoint.x,currentPoint.y);
  float fWidth=viewFrustum.getWidth() - 0.1f;
  float fHeight=viewFrustum.getHeight();
  if (bRenderGeneTree) {
    if (fArTargetWorldCoordinates[0] > -0.1f && fArTargetWorldCoordinates[0] < fWidth)     fPosCut=fArTargetWorldCoordinates[0] - fLevelWidth;
  }
 else {
    if (fArTargetWorldCoordinates[1] > -0.1f && fArTargetWorldCoordinates[1] < fHeight)     fPosCut=fArTargetWorldCoordinates[1] + fLevelHeight;
  }
  setDisplayListDirty();
  if (glMouseListener.wasMouseReleased()) {
    bIsDraggingActive=false;
    determineSelectedNodes();
  }
}

Fixed version (ground truth):
/** 
 * Function used for updating cursor position in case of dragging
 * @param gl
 */
private void handleDragging(final GL gl){
  Point currentPoint=glMouseListener.getPickedPoint();
  float[] fArTargetWorldCoordinates=new float[3];
  fArTargetWorldCoordinates=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,currentPoint.x,currentPoint.y);
  float fWidth=viewFrustum.getWidth();
  float fHeight=viewFrustum.getHeight();
  if (bRenderGeneTree) {
    if (fArTargetWorldCoordinates[0] > 0.1f && fArTargetWorldCoordinates[0] < fWidth)     fPosCut=fArTargetWorldCoordinates[0] - fLevelWidth;
  }
 else {
    if (fArTargetWorldCoordinates[1] > -0.1f && fArTargetWorldCoordinates[1] < fHeight)     fPosCut=fArTargetWorldCoordinates[1] + fLevelHeight;
  }
  setDisplayListDirty();
  if (glMouseListener.wasMouseReleased()) {
    bIsDraggingActive=false;
    determineSelectedNodes();
  }
}
Program: 58603
Project: 58603
Buggy source:
@Override public void renderTreeLayout(){
  updateSizeInfo();
  if (tree == null)   return;
  fDepth=tree.getDepth();
  setFCenterX(fWidth / 2);
  setFCenterY(fHeight / 2);
  float fNodeSize=0.05f;
  IDrawAbleNode rootNode=tree.getRoot();
  rootNode.setDetailLevel(EDrawAbleNodeDetailLevel.Low);
  placeNode(rootNode,fCenterX,fCenterY,0,fNodeSize,0.2f);
  float fLayer=1.0f;
  float fRadius=0.5f;
  float fNumberOfNodesInLayer=tree.getNumberOfElementsInLayer((int)fLayer);
  float fCurrentNodeCount=0;
  if (tree.hasChildren(rootNode)) {
    ArrayList<IDrawAbleNode> childs=new ArrayList<IDrawAbleNode>();
    childs=tree.getChildren(rootNode);
    for (    IDrawAbleNode tmpChild : childs) {
      fCurrentNodeCount++;
      float fFirstLayerAngle=calculateCircle((fRadius),fCurrentNodeCount,fNumberOfNodesInLayer);
      tmpChild.setDetailLevel(EDrawAbleNodeDetailLevel.Low);
      placeNode(tmpChild,getFXCoord(),getFYCoord(),0,fNodeSize,0.2f);
      drawLine(fCenterX,fCenterY,getFXCoord(),getFYCoord());
      calculateRecursiveLayout(tmpChild,fRadius - 0.05f,fFirstLayerAngle * fCurrentNodeCount,fLayer + 1,fNodeSize,getFXCoord(),getFYCoord());
    }
  }
  return;
}

Fixed version (ground truth):
@Override public void renderTreeLayout(){
  updateSizeInfo();
  if (tree == null)   return;
  fDepth=tree.getDepth();
  setFCenterX(fWidth / 2);
  setFCenterY(fHeight / 2);
  float fNodeSize=HyperbolicRenderStyle.MAX_NODE_SIZE;
  IDrawAbleNode rootNode=tree.getRoot();
  rootNode.setDetailLevel(EDrawAbleNodeDetailLevel.Low);
  placeNode(rootNode,fCenterX,fCenterY,0,fNodeSize,fNodeSize);
  float fLayer=2.0f;
  float fRadius=0.5f;
  float fNumberOfNodesInLayer=tree.getNumberOfElementsInLayer((int)fLayer);
  float fCurrentNodeCount=0;
  if (tree.hasChildren(rootNode)) {
    ArrayList<IDrawAbleNode> childs=new ArrayList<IDrawAbleNode>();
    childs=tree.getChildren(rootNode);
    for (    IDrawAbleNode tmpChild : childs) {
      fCurrentNodeCount++;
      float fFirstLayerAngle=calculateCircle((fRadius),fCurrentNodeCount,fNumberOfNodesInLayer);
      fNodeSize=HyperbolicRenderStyle.MAX_NODE_SIZE * (float)Math.pow(HyperbolicRenderStyle.NODE_SCALING_PER_LAYER,fLayer);
      tmpChild.setDetailLevel(EDrawAbleNodeDetailLevel.Low);
      placeNode(tmpChild,getFXCoord(),getFYCoord(),0,fNodeSize,fNodeSize);
      float fFirstChildX=getFXCoord();
      float fFirstChildY=getFYCoord();
      drawLine(fCenterX,fCenterY,fFirstChildX,fFirstChildY);
      calculateRecursiveLayout(tmpChild,fRadius - 0.05f,fFirstLayerAngle * fCurrentNodeCount,fLayer + 1,fNodeSize,getFXCoord(),getFYCoord());
    }
  }
  return;
}
Program: 58604
Project: 58604
Buggy source:
@Override public Integer remove(int iIndex){
  if (groupList != null) {
    groupList.removeElementOfVA(iIndex);
  }
  return virtualArray.remove(iIndex);
}

Fixed version (ground truth):
@Override public Integer remove(int iIndex){
  return virtualArray.remove(iIndex);
}
Program: 58605
Project: 58605
Buggy source:
@Override public void removeByElement(int iElement){
  if (groupList != null) {
    groupList.removeElementOfVA(virtualArray.indexOf(iElement));
  }
  Iterator<Integer> iter=virtualArray.iterator();
  while (iter.hasNext()) {
    if (iter.next() == iElement) {
      iter.remove();
    }
  }
}

Fixed version (ground truth):
@Override public void removeByElement(int iElement){
  Iterator<Integer> iter=virtualArray.iterator();
  while (iter.hasNext()) {
    if (iter.next() == iElement) {
      iter.remove();
    }
  }
}
Program: 58606
Project: 58606
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + getLabel() + "String_Node_Str"+ alStorages.size()+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + getLabel() + "String_Node_Str"+ setType+ "String_Node_Str"+ alStorages.size()+ "String_Node_Str";
}
Program: 58607
Project: 58607
Buggy source:
/** 
 * Sets the set, calls   {@link #initData()} and sets display lists dirty
 */
@Override public final void setSet(ISet set){
  this.set=set;
  initData();
}

Fixed version (ground truth):
/** 
 * Sets the set, calls   {@link #initData()} and sets display lists dirty
 */
@Override public void setSet(ISet set){
  this.set=set;
  initData();
}
Program: 58608
Project: 58608
Buggy source:
@Override public void replaceVirtualArray(EVAType vaType,IVirtualArray virtualArray){
  set.replaceVA(mapVAIDs.get(vaType),virtualArray.clone());
  Tree<ClusterNode> tree=null;
  if (vaType == EVAType.CONTENT)   tree=set.getClusteredTreeGenes();
 else   if (vaType == EVAType.STORAGE)   tree=set.getClusteredTreeExps();
  if (tree != null) {
    GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
      public void run(){
        Shell shell=new Shell();
        MessageBox messageBox=new MessageBox(shell,SWT.CANCEL);
        messageBox.setText("String_Node_Str");
        messageBox.setMessage("String_Node_Str");
        messageBox.open();
      }
    }
);
    if (vaType == EVAType.CONTENT)     set.setClusteredTreeGenes(null);
 else     if (vaType == EVAType.STORAGE)     set.setClusteredTreeExps(null);
  }
  eventPublisher.triggerEvent(new ReplaceVirtualArrayEvent(vaType));
}

Fixed version (ground truth):
@Override public void replaceVirtualArray(EVAType vaType,IVirtualArray virtualArray){
  set.replaceVA(mapVAIDs.get(vaType),virtualArray.clone());
  Tree<ClusterNode> tree=null;
  if (vaType == EVAType.CONTENT)   tree=set.getClusteredTreeGenes();
 else   if (vaType == EVAType.STORAGE)   tree=set.getClusteredTreeExps();
  if (tree != null) {
    GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
      public void run(){
        Shell shell=new Shell();
        MessageBox messageBox=new MessageBox(shell,SWT.CANCEL);
        messageBox.setText("String_Node_Str");
        messageBox.setMessage("String_Node_Str");
        messageBox.open();
      }
    }
);
    if (vaType == EVAType.CONTENT)     set.setClusteredTreeGenes(null);
 else     if (vaType == EVAType.STORAGE)     set.setClusteredTreeExps(null);
  }
  virtualArray.setGroupList(null);
  eventPublisher.triggerEvent(new ReplaceVirtualArrayEvent(vaType));
}
Program: 58609
Project: 58609
Buggy source:
@Override public void handleVirtualArrayUpdate(IVirtualArrayDelta delta,String info){
  if (delta.getVAType() != contentVAType && delta.getVAType() != storageVAType)   return;
  SelectionManager selectionManager;
  if (delta.getIDType() == EIDType.EXPERIMENT_INDEX) {
    selectionManager=storageSelectionManager;
  }
 else   if (delta.getIDType() == EIDType.REFSEQ_MRNA_INT) {
    delta=DeltaConverter.convertDelta(EIDType.EXPRESSION_INDEX,delta);
    selectionManager=contentSelectionManager;
  }
 else   if (delta.getIDType() == EIDType.EXPRESSION_INDEX) {
    selectionManager=contentSelectionManager;
  }
 else   return;
  reactOnVAChanges(delta);
  selectionManager.setVADelta(delta);
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void handleVirtualArrayUpdate(IVirtualArrayDelta delta,String info){
  if (delta.getVAType() != contentVAType && delta.getVAType() != storageVAType)   return;
  if (delta.getVAType() == contentVAType) {
    contentVA.setGroupList(null);
  }
  if (delta.getVAType() == storageVAType) {
    storageVA.setGroupList(null);
  }
  SelectionManager selectionManager;
  if (delta.getIDType() == EIDType.EXPERIMENT_INDEX) {
    selectionManager=storageSelectionManager;
  }
 else   if (delta.getIDType() == EIDType.REFSEQ_MRNA_INT) {
    delta=DeltaConverter.convertDelta(EIDType.EXPRESSION_INDEX,delta);
    selectionManager=contentSelectionManager;
  }
 else   if (delta.getIDType() == EIDType.EXPRESSION_INDEX) {
    selectionManager=contentSelectionManager;
  }
 else   return;
  reactOnVAChanges(delta);
  selectionManager.setVADelta(delta);
  setDisplayListDirty();
}
Program: 58610
Project: 58610
Buggy source:
/** 
 * Function enables redraw of dendrogram, needed in case of viewfrustum changed and view is rendered remote.
 */
public void setRedrawDendrogram(){
  this.bRedrawDendrogram=true;
}

Fixed version (ground truth):
/** 
 * Function enables redraw of dendrogram, needed in case of viewfrustum changed and view is rendered remote.
 */
public void setRedrawDendrogram(){
  this.bRedrawDendrogram=true;
  setDisplayListDirty();
}
Program: 58612
Project: 58612
Buggy source:
@Override public void append(Integer iNewElement){
  if (iNewElement < length) {
    virtualArray.add(iNewElement);
  }
 else   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void append(Integer iNewElement){
  if (iNewElement < length) {
    virtualArray.add(iNewElement);
  }
 else   throw new IllegalArgumentException("String_Node_Str" + iNewElement + "String_Node_Str"+ "String_Node_Str"+ length+ "String_Node_Str"+ "String_Node_Str");
}
Program: 58613
Project: 58613
Buggy source:
@Override public void handleVirtualArrayUpdate(IVirtualArrayDelta vaDelta,String info){
  EIDCategory targetCategory=vaDelta.getIDType().getCategory();
  if (!(targetCategory == EIDCategory.EXPERIMENT || targetCategory == EIDCategory.GENE))   return;
  Integer vaID=mapVAIDs.get(vaDelta.getVAType());
  IVirtualArray va=set.getVA(vaID);
  va.setDelta(vaDelta);
}

Fixed version (ground truth):
@Override public void handleVirtualArrayUpdate(IVirtualArrayDelta vaDelta,String info){
  EIDCategory targetCategory=vaDelta.getIDType().getCategory();
  if (!(targetCategory == EIDCategory.EXPERIMENT || targetCategory == EIDCategory.GENE))   return;
  Integer vaID=mapVAIDs.get(vaDelta.getVAType());
  if (targetCategory == EIDCategory.GENE && vaDelta.getIDType() != EIDType.EXPRESSION_INDEX)   vaDelta=DeltaConverter.convertDelta(EIDType.EXPRESSION_INDEX,vaDelta);
  IVirtualArray va=set.getVA(vaID);
  va.setDelta(vaDelta);
}
Program: 58614
Project: 58614
Buggy source:
@Override public void setSet(ISet set){
  if ((set.getSetType() == ESetType.GENE_EXPRESSION_DATA && useCaseMode == EDataDomain.GENETIC_DATA) || (set.getSetType() == ESetType.CLINICAL_DATA && useCaseMode == EDataDomain.CLINICAL_DATA) || (set.getSetType() == ESetType.UNSPECIFIED && useCaseMode == EDataDomain.GENERAL_DATA)) {
    oldSet=this.set;
    this.set=set;
    if (oldSet != null) {
      oldSet.destroy();
      oldSet=null;
    }
  }
 else {
    throw new IllegalStateException("String_Node_Str" + set + "String_Node_Str"+ this);
  }
}

Fixed version (ground truth):
@Override public void setSet(ISet set){
  assert(set != null);
  if ((set.getSetType() == ESetType.GENE_EXPRESSION_DATA && useCaseMode == EDataDomain.GENETIC_DATA) || (set.getSetType() == ESetType.CLINICAL_DATA && useCaseMode == EDataDomain.CLINICAL_DATA) || (set.getSetType() == ESetType.UNSPECIFIED && useCaseMode == EDataDomain.GENERAL_DATA)) {
    oldSet=this.set;
    this.set=set;
    if (oldSet != null) {
      oldSet.destroy();
      oldSet=null;
    }
  }
 else {
    throw new IllegalStateException("String_Node_Str" + set + "String_Node_Str"+ this);
  }
}
Program: 58615
Project: 58615
Buggy source:
@Override public void replaceVirtualArray(EIDCategory idCategory,EVAType vaType,IVirtualArray virtualArray){
  if (!possibleIDCategories.containsKey(idCategory))   return;
  Tree<ClusterNode> tree=null;
  if (vaType == EVAType.CONTENT)   tree=set.getClusteredTreeGenes();
 else   if (vaType == EVAType.STORAGE)   tree=set.getClusteredTreeExps();
  if (tree != null) {
    GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
      public void run(){
        Shell shell=new Shell();
        MessageBox messageBox=new MessageBox(shell,SWT.CANCEL);
        messageBox.setText("String_Node_Str");
        messageBox.setMessage("String_Node_Str");
        messageBox.open();
      }
    }
);
    if (vaType == EVAType.CONTENT)     set.setClusteredTreeGenes(null);
 else     if (vaType == EVAType.STORAGE)     set.setClusteredTreeExps(null);
  }
  virtualArray.setGroupList(null);
  eventPublisher.triggerEvent(new ReplaceVirtualArrayEvent(idCategory,vaType));
}

Fixed version (ground truth):
@Override public void replaceVirtualArray(EIDCategory idCategory,EVAType vaType,IVirtualArray virtualArray){
  if (!possibleIDCategories.containsKey(idCategory))   return;
  set.replaceVA(mapVAIDs.get(vaType),virtualArray.clone());
  Tree<ClusterNode> tree=null;
  if (vaType == EVAType.CONTENT)   tree=set.getClusteredTreeGenes();
 else   if (vaType == EVAType.STORAGE)   tree=set.getClusteredTreeExps();
  if (tree != null) {
    GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
      public void run(){
        Shell shell=new Shell();
        MessageBox messageBox=new MessageBox(shell,SWT.CANCEL);
        messageBox.setText("String_Node_Str");
        messageBox.setMessage("String_Node_Str");
        messageBox.open();
      }
    }
);
    if (vaType == EVAType.CONTENT)     set.setClusteredTreeGenes(null);
 else     if (vaType == EVAType.STORAGE)     set.setClusteredTreeExps(null);
  }
  virtualArray.setGroupList(null);
  eventPublisher.triggerEvent(new ReplaceVirtualArrayEvent(idCategory,vaType));
}
Program: 58618
Project: 58618
Buggy source:
@Override protected void initLists(){
  if (contentVAType != EVAType.CONTENT_EMBEDDED_HM) {
    if (bRenderOnlyContext)     contentVAType=EVAType.CONTENT_CONTEXT;
 else     contentVAType=EVAType.CONTENT;
  }
  contentVA=useCase.getVA(contentVAType);
  storageVA=useCase.getVA(storageVAType);
  contentSelectionManager.setVA(contentVA);
  storageSelectionManager.setVA(storageVA);
  int iNumberOfColumns=contentVA.size();
  int iNumberOfRows=storageVA.size();
  for (int iRowCount=0; iRowCount < iNumberOfRows; iRowCount++) {
    storageSelectionManager.initialAdd(storageVA.get(iRowCount));
  }
  for (int iColumnCount=0; iColumnCount < iNumberOfColumns; iColumnCount++) {
    contentSelectionManager.initialAdd(contentVA.get(iColumnCount));
  }
  renderStyle=new HeatMapRenderStyle(this,viewFrustum);
  if (getRemoteRenderingGLCanvas() == null)   renderStyle.disableFishEye();
  vecTranslation=new Vec3f(0,renderStyle.getYCenter() * 2,0);
}

Fixed version (ground truth):
@Override protected void initLists(){
  if (contentVAType != EVAType.CONTENT_EMBEDDED_HM) {
    if (bRenderOnlyContext)     contentVAType=EVAType.CONTENT_CONTEXT;
 else     contentVAType=EVAType.CONTENT;
  }
  contentVA=useCase.getVA(contentVAType);
  storageVA=useCase.getVA(storageVAType);
  contentSelectionManager.setVA(contentVA);
  storageSelectionManager.setVA(storageVA);
  int iNumberOfColumns=contentVA.size();
  int iNumberOfRows=storageVA.size();
  for (int iRowCount=0; iRowCount < iNumberOfRows; iRowCount++) {
    storageSelectionManager.initialAdd(storageVA.get(iRowCount));
  }
  for (int iColumnCount=0; iColumnCount < iNumberOfColumns; iColumnCount++) {
    contentSelectionManager.initialAdd(contentVA.get(iColumnCount));
  }
  renderStyle=new HeatMapRenderStyle(this,viewFrustum);
  if (getRemoteRenderingGLCanvas() instanceof GLHierarchicalHeatMap)   renderStyle.disableFishEye();
  vecTranslation=new Vec3f(0,renderStyle.getYCenter() * 2,0);
}
Program: 58619
Project: 58619
Buggy source:
@Override protected void reactOnVAChanges(IVirtualArrayDelta delta){
  glHeatMapView.handleVirtualArrayUpdate(delta,getShortInfo());
  bRedrawTextures=true;
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override protected void reactOnVAChanges(IVirtualArrayDelta delta){
  if (delta.getVAType() == contentVAType)   contentVA.setGroupList(null);
  if (delta.getVAType() == storageVAType)   storageVA.setGroupList(null);
  glHeatMapView.handleVirtualArrayUpdate(delta,getShortInfo());
  bRedrawTextures=true;
  setDisplayListDirty();
}
Program: 58620
Project: 58620
Buggy source:
public void saveSelection(){
  polylineSelectionManager.removeElements(ESelectionType.DESELECTED);
  clearAllSelections();
  setDisplayListDirty();
  ReplaceVirtualArrayInUseCaseEvent event=new ReplaceVirtualArrayInUseCaseEvent(ePolylineDataType.getCategory(),polylineVAType,(VirtualArray)polylineVA);
  event.setSender(this);
  eventPublisher.triggerEvent(event);
}

Fixed version (ground truth):
public void saveSelection(){
  polylineSelectionManager.removeElements(ESelectionType.DESELECTED);
  clearAllSelections();
  setDisplayListDirty();
  polylineVA.setGroupList(null);
  ReplaceVirtualArrayInUseCaseEvent event=new ReplaceVirtualArrayInUseCaseEvent(ePolylineDataType.getCategory(),polylineVAType,(VirtualArray)polylineVA);
  event.setSender(this);
  eventPublisher.triggerEvent(event);
}
Program: 58621
Project: 58621
Buggy source:
private void valueChangedFloat(Text text,boolean bGeneFactor){
  if (!text.isFocusControl())   return;
  float temp=0;
  try {
    temp=Float.parseFloat(text.getText());
    if (temp >= 1f && temp < 10) {
      if (bGeneFactor == true)       fclusterFactorGenes=temp;
 else       fclusterFactorExperiments=temp;
    }
 else {
      Shell shell=new Shell();
      MessageBox messageBox=new MessageBox(shell,SWT.OK);
      messageBox.setText("String_Node_Str");
      messageBox.setMessage("String_Node_Str");
      messageBox.open();
    }
  }
 catch (  NumberFormatException e) {
    System.out.println("String_Node_Str");
  }
}

Fixed version (ground truth):
private void valueChangedFloat(Text text,boolean bGeneFactor){
  if (!text.isFocusControl())   return;
  float temp=0;
  try {
    temp=Float.parseFloat(text.getText());
    if (temp >= 1f && temp <= 10) {
      if (bGeneFactor == true)       fclusterFactorGenes=temp;
 else       fclusterFactorExperiments=temp;
    }
 else {
      Shell shell=new Shell();
      MessageBox messageBox=new MessageBox(shell,SWT.OK);
      messageBox.setText("String_Node_Str");
      messageBox.setMessage("String_Node_Str");
      messageBox.open();
    }
  }
 catch (  NumberFormatException e) {
    System.out.println("String_Node_Str");
  }
}
Program: 58622
Project: 58622
Buggy source:
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLHyperbolic(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum,true);
  viewType=EManagedObjectType.GL_HYPERBOLIC;
  colorMappingManager=ColorMappingManager.get();
  renderStyle=new HyperbolicRenderStyle(viewFrustum);
  tree=buildTestTree(HyperbolicRenderStyle.MAX_DEPTH,20);
  System.out.println(tree.getGraph().toString());
  layouter=new HTLayouter(viewFrustum,pickingManager,iUniqueID);
  layouter.setTree(tree);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLHyperbolic(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum,true);
  viewType=EManagedObjectType.GL_HYPERBOLIC;
  colorMappingManager=ColorMappingManager.get();
  renderStyle=new HyperbolicRenderStyle(viewFrustum);
  tree=buildTestTree(7,6);
  System.out.println(tree.getGraph().toString());
  layouter=new HTLayouter(viewFrustum,pickingManager,iUniqueID);
  layouter.setTree(tree);
}
Program: 58623
Project: 58623
Buggy source:
/** 
 * Function used for updating cursor position in case of dragging
 * @param gl
 */
private void handleDragging(final GL gl){
  Point currentPoint=glMouseListener.getPickedPoint();
  float[] fArTargetWorldCoordinates=new float[3];
  fArTargetWorldCoordinates=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,currentPoint.x,currentPoint.y);
  float fWidth=viewFrustum.getWidth() - 0.1f;
  float fHeight=viewFrustum.getHeight();
  if (bRenderGeneTree) {
    if (fArTargetWorldCoordinates[0] > -0.1f && fArTargetWorldCoordinates[0] < fWidth)     fPosCut=fArTargetWorldCoordinates[0] - 0.0f;
  }
 else {
    if (fArTargetWorldCoordinates[1] > -0.1f && fArTargetWorldCoordinates[1] < fHeight)     fPosCut=fArTargetWorldCoordinates[1] + 0.0f;
  }
  setDisplayListDirty();
  if (glMouseListener.wasMouseReleased()) {
    bIsDraggingActive=false;
    determineSelectedNodes();
  }
}

Fixed version (ground truth):
/** 
 * Function used for updating cursor position in case of dragging
 * @param gl
 */
private void handleDragging(final GL gl){
  Point currentPoint=glMouseListener.getPickedPoint();
  float[] fArTargetWorldCoordinates=new float[3];
  fArTargetWorldCoordinates=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,currentPoint.x,currentPoint.y);
  float fWidth=viewFrustum.getWidth() - 0.1f;
  float fHeight=viewFrustum.getHeight();
  if (bRenderGeneTree) {
    if (fArTargetWorldCoordinates[0] > -0.1f && fArTargetWorldCoordinates[0] < fWidth)     fPosCut=fArTargetWorldCoordinates[0] - fLevelWidth;
  }
 else {
    if (fArTargetWorldCoordinates[1] > -0.1f && fArTargetWorldCoordinates[1] < fHeight)     fPosCut=fArTargetWorldCoordinates[1] + fLevelHeight;
  }
  setDisplayListDirty();
  if (glMouseListener.wasMouseReleased()) {
    bIsDraggingActive=false;
    determineSelectedNodes();
  }
}
Program: 58625
Project: 58625
Buggy source:
/** 
 * Function which merges the clusters determined by the cut off value to group lists used for rendering the clusters assignments in   {@link GLHierarchicalHeatMap}.
 */
private void buildNewGroupList(){
  if (iAlClusterNodes.size() < 2) {
    groupList=null;
    if (bRenderGeneTree) {
      useCase.getSet().setGroupListGenes(groupList);
      useCase.replaceVirtualArray(EVAType.CONTENT,contentVA);
    }
 else {
      useCase.getSet().setGroupListExperiments(groupList);
      useCase.replaceVirtualArray(EVAType.STORAGE,storageVA);
    }
    bRedrawDendrogram=true;
    bEnableDepthCheck=false;
    setDisplayListDirty();
    return;
  }
  groupList=new GroupList(iAlClusterNodes.size());
  bEnableDepthCheck=true;
  int cnt=0;
  int iExample=0;
  IVirtualArray currentVA=null;
  if (bRenderGeneTree) {
    currentVA=contentVA;
  }
 else {
    currentVA=storageVA;
  }
  for (  ClusterNode iter : iAlClusterNodes) {
    Group temp=new Group(iter.getNrElements(),false,currentVA.get(iExample),ESelectionType.NORMAL,iter);
    groupList.append(temp);
    cnt++;
    iExample+=iter.getNrElements();
  }
  if (bRenderGeneTree) {
    useCase.getSet().setGroupListGenes(groupList);
    useCase.replaceVirtualArray(EVAType.CONTENT,contentVA);
  }
 else {
    useCase.getSet().setGroupListExperiments(groupList);
    useCase.replaceVirtualArray(EVAType.STORAGE,storageVA);
  }
}

Fixed version (ground truth):
/** 
 * Function which merges the clusters determined by the cut off value to group lists used for rendering the clusters assignments in   {@link GLHierarchicalHeatMap}.
 */
private void buildNewGroupList(){
  if (iAlClusterNodes.size() < 1) {
    groupList=new GroupList(iAlClusterNodes.size());
    Group temp=new Group(tree.getRoot().getNrElements(),false,0,ESelectionType.NORMAL,tree.getRoot());
    groupList.append(temp);
    if (bRenderGeneTree) {
      useCase.getSet().setGroupListGenes(groupList);
      useCase.replaceVirtualArray(EVAType.CONTENT,contentVA);
    }
 else {
      useCase.getSet().setGroupListExperiments(groupList);
      useCase.replaceVirtualArray(EVAType.STORAGE,storageVA);
    }
    return;
  }
  groupList=new GroupList(iAlClusterNodes.size());
  bEnableDepthCheck=true;
  int cnt=0;
  int iExample=0;
  IVirtualArray currentVA=null;
  if (bRenderGeneTree) {
    currentVA=contentVA;
  }
 else {
    currentVA=storageVA;
  }
  for (  ClusterNode iter : iAlClusterNodes) {
    Group temp=new Group(iter.getNrElements(),false,currentVA.get(iExample),ESelectionType.NORMAL,iter);
    groupList.append(temp);
    cnt++;
    iExample+=iter.getNrElements();
  }
  if (bRenderGeneTree) {
    useCase.getSet().setGroupListGenes(groupList);
    useCase.replaceVirtualArray(EVAType.CONTENT,contentVA);
  }
 else {
    useCase.getSet().setGroupListExperiments(groupList);
    useCase.replaceVirtualArray(EVAType.STORAGE,storageVA);
  }
}
Program: 58626
Project: 58626
Buggy source:
/** 
 * Function calculates for each node (gene or entity) in the dendrogram recursive the corresponding position inside the view frustum
 * @param currentNode current node for calculation
 * @return Vec3f position of the current node
 */
private Vec3f determinePosRecGenes(ClusterNode currentNode){
  Vec3f pos=new Vec3f();
  if (tree.hasChildren(currentNode)) {
    ArrayList<ClusterNode> alChilds=tree.getChildren(currentNode);
    int iNrChildsNode=alChilds.size();
    Vec3f[] positions=new Vec3f[iNrChildsNode];
    for (int i=0; i < iNrChildsNode; i++) {
      ClusterNode node=(ClusterNode)alChilds.get(i);
      positions[i]=determinePosRecGenes(node);
    }
    float fXmin=Float.MAX_VALUE;
    float fYmax=Float.MIN_VALUE;
    float fYmin=Float.MAX_VALUE;
    for (    Vec3f vec : positions) {
      fXmin=Math.min(fXmin,vec.x());
      fYmax=Math.max(fYmax,vec.y());
      fYmin=Math.min(fYmin,vec.y());
    }
    pos.setX(fXmin - fLevelWidth);
    pos.setY(fYmin + (fYmax - fYmin) / 2);
    pos.setZ(DENDROGRAM_Z);
  }
 else {
    pos.setY(yPosInit);
    yPosInit-=fSampleHeight;
    pos.setX(xGlobalMax - fLevelWidth);
    pos.setZ(DENDROGRAM_Z);
  }
  currentNode.setPos(pos);
  return pos;
}

Fixed version (ground truth):
/** 
 * Function calculates for each node (gene or entity) in the dendrogram recursive the corresponding position inside the view frustum
 * @param currentNode current node for calculation
 * @return Vec3f position of the current node
 */
private Vec3f determinePosRecGenes(ClusterNode currentNode){
  Vec3f pos=new Vec3f();
  if (tree.hasChildren(currentNode)) {
    ArrayList<ClusterNode> alChilds=tree.getChildren(currentNode);
    int iNrChildsNode=alChilds.size();
    Vec3f[] positions=new Vec3f[iNrChildsNode];
    for (int i=0; i < iNrChildsNode; i++) {
      ClusterNode node=(ClusterNode)alChilds.get(i);
      positions[i]=determinePosRecGenes(node);
    }
    float fXmin=Float.MAX_VALUE;
    float fYmax=Float.MIN_VALUE;
    float fYmin=Float.MAX_VALUE;
    for (    Vec3f vec : positions) {
      fXmin=Math.min(fXmin,vec.x());
      fYmax=Math.max(fYmax,vec.y());
      fYmin=Math.min(fYmin,vec.y());
    }
    float fCoeff=currentNode.getCoefficient();
    pos.setX(fXmin - fLevelWidth * (1 - fCoeff));
    pos.setY(fYmin + (fYmax - fYmin) / 2);
    pos.setZ(DENDROGRAM_Z);
  }
 else {
    float fCoeff=currentNode.getCoefficient();
    pos.setY(yPosInit);
    yPosInit-=fSampleHeight;
    pos.setX(xGlobalMax - fLevelWidth * (1 - fCoeff));
    pos.setZ(DENDROGRAM_Z);
  }
  currentNode.setPos(pos);
  return pos;
}
Program: 58627
Project: 58627
Buggy source:
/** 
 * Function calculates for each node (experiment) in the dendrogram recursive the corresponding position inside the view frustum
 * @param currentNode current node for calculation
 * @return Vec3f position of the current node
 */
private Vec3f determinePosRecExperiments(ClusterNode currentNode){
  Vec3f pos=new Vec3f();
  if (tree.hasChildren(currentNode)) {
    ArrayList<ClusterNode> alChilds=tree.getChildren(currentNode);
    int iNrChildsNode=alChilds.size();
    Vec3f[] positions=new Vec3f[iNrChildsNode];
    for (int i=0; i < iNrChildsNode; i++) {
      ClusterNode node=(ClusterNode)alChilds.get(i);
      positions[i]=determinePosRecExperiments(node);
    }
    float fXmax=Float.MIN_VALUE;
    float fXmin=Float.MAX_VALUE;
    float fYmax=Float.MIN_VALUE;
    float fYmin=Float.MAX_VALUE;
    for (    Vec3f vec : positions) {
      fXmax=Math.max(fXmax,vec.x());
      fXmin=Math.min(fXmin,vec.x());
      fYmax=Math.max(fYmax,vec.y());
      fYmin=Math.min(fYmin,vec.y());
    }
    pos.setX(fXmin + (fXmax - fXmin) / 2);
    pos.setY(fYmax + fLevelHeight);
    pos.setZ(DENDROGRAM_Z);
  }
 else {
    pos.setX(xPosInit);
    xPosInit+=fSampleWidth;
    pos.setY(yGlobalMin + fLevelHeight);
    pos.setZ(DENDROGRAM_Z);
  }
  currentNode.setPos(pos);
  return pos;
}

Fixed version (ground truth):
/** 
 * Function calculates for each node (experiment) in the dendrogram recursive the corresponding position inside the view frustum
 * @param currentNode current node for calculation
 * @return Vec3f position of the current node
 */
private Vec3f determinePosRecExperiments(ClusterNode currentNode){
  Vec3f pos=new Vec3f();
  if (tree.hasChildren(currentNode)) {
    ArrayList<ClusterNode> alChilds=tree.getChildren(currentNode);
    int iNrChildsNode=alChilds.size();
    Vec3f[] positions=new Vec3f[iNrChildsNode];
    for (int i=0; i < iNrChildsNode; i++) {
      ClusterNode node=(ClusterNode)alChilds.get(i);
      positions[i]=determinePosRecExperiments(node);
    }
    float fXmax=Float.MIN_VALUE;
    float fXmin=Float.MAX_VALUE;
    float fYmax=Float.MIN_VALUE;
    float fYmin=Float.MAX_VALUE;
    for (    Vec3f vec : positions) {
      fXmax=Math.max(fXmax,vec.x());
      fXmin=Math.min(fXmin,vec.x());
      fYmax=Math.max(fYmax,vec.y());
      fYmin=Math.min(fYmin,vec.y());
    }
    float fCoeff=currentNode.getCoefficient();
    pos.setX(fXmin + (fXmax - fXmin) / 2);
    pos.setY(fYmax + fLevelHeight * (1 - fCoeff));
    pos.setZ(DENDROGRAM_Z);
  }
 else {
    float fCoeff=currentNode.getCoefficient();
    pos.setX(xPosInit);
    xPosInit+=fSampleWidth;
    pos.setY(yGlobalMin + fLevelHeight * (1 - fCoeff));
    pos.setZ(DENDROGRAM_Z);
  }
  currentNode.setPos(pos);
  return pos;
}
Program: 58628
Project: 58628
Buggy source:
@Override public void initData(){
  super.initData();
  initHierarchy();
  calculateTextures();
  initPosCursorLevel1();
  if (bSkipLevel2 == false) {
    initPosCursorLevel2();
  }
  glHeatMapView.setSet(set);
  glHeatMapView.setContentVAType(EVAType.CONTENT_EMBEDDED_HM);
  glHeatMapView.initData();
  if (set.getClusteredTreeGenes() != null) {
    bGeneDendrogramActive=true;
  }
  if (set.getClusteredTreeExps() != null) {
    bExperimentDendrogramActive=true;
  }
  glGeneDendrogramView.setSet(set);
  glGeneDendrogramView.setContentVAType(EVAType.CONTENT);
  glGeneDendrogramView.initData();
  glGeneDendrogramView.setRenderUntilCut(false);
  glExperimentDendrogramView.setSet(set);
  glExperimentDendrogramView.setContentVAType(EVAType.CONTENT);
  glExperimentDendrogramView.initData();
  glExperimentDendrogramView.setRenderUntilCut(false);
  if (bSkipLevel2 == false)   bRedrawTextures=true;
}

Fixed version (ground truth):
@Override public void initData(){
  super.initData();
  initHierarchy();
  calculateTextures();
  initPosCursorLevel1();
  if (bSkipLevel2 == false) {
    initPosCursorLevel2();
  }
  glHeatMapView.setSet(set);
  glHeatMapView.setContentVAType(EVAType.CONTENT_EMBEDDED_HM);
  glHeatMapView.initData();
  if (set.getClusteredTreeGenes() == null) {
    bGeneDendrogramActive=false;
    bGeneDendrogramRenderCut=false;
  }
  if (set.getClusteredTreeExps() == null) {
    bExperimentDendrogramActive=false;
    bExperimentDendrogramRenderCut=false;
  }
  glGeneDendrogramView.setSet(set);
  glGeneDendrogramView.setContentVAType(EVAType.CONTENT);
  glGeneDendrogramView.initData();
  glGeneDendrogramView.setRenderUntilCut(bGeneDendrogramRenderCut);
  glExperimentDendrogramView.setSet(set);
  glExperimentDendrogramView.setContentVAType(EVAType.CONTENT);
  glExperimentDendrogramView.initData();
  glExperimentDendrogramView.setRenderUntilCut(bExperimentDendrogramRenderCut);
  if (bSkipLevel2 == false)   bRedrawTextures=true;
}
Program: 58629
Project: 58629
Buggy source:
private void buildDisplayList(final GL gl,int iGLDisplayListIndex){
  if (bRedrawTextures) {
    initTextures(gl);
    bRedrawTextures=false;
  }
  if (bHasFrustumChanged) {
    glHeatMapView.setDisplayListDirty();
    glGeneDendrogramView.setDisplayListDirty();
    glExperimentDendrogramView.setDisplayListDirty();
    bHasFrustumChanged=false;
  }
  gl.glNewList(iGLDisplayListIndex,GL.GL_COMPILE);
  gl.glMatrixMode(GL.GL_MODELVIEW);
  gl.glLoadIdentity();
  gl.glColor4fv(BACKGROUND_COLOR,0);
  gl.glBegin(GL.GL_QUADS);
  gl.glVertex3f(0,0,-0.1f);
  gl.glVertex3f(viewFrustum.getRight(),0,-0.1f);
  gl.glVertex3f(viewFrustum.getRight(),viewFrustum.getHeight(),-0.1f);
  gl.glVertex3f(0,viewFrustum.getHeight(),-0.1f);
  gl.glEnd();
  viewFrustum.setTop(viewFrustum.getTop() - 0.6f);
  viewFrustum.setLeft(viewFrustum.getLeft() + 0.1f);
  gl.glTranslatef(0.1f,0.4f,0);
  setEmbeddedHeatMapData();
  if (bSkipLevel1 == false && bSkipLevel2 == false) {
    renderViewsLevel_1_2_3_Active(gl);
  }
 else   if (bSkipLevel1 == true && bSkipLevel2 == false) {
    renderViewsLevel_2_3_Active(gl);
  }
 else   if (bSkipLevel1 == true && bSkipLevel2 == true) {
    renderViewsLevel_3_Active(gl);
  }
 else {
    throw new IllegalStateException();
  }
  gl.glTranslatef(-0.1f,-0.4f,0);
  viewFrustum.setTop(viewFrustum.getTop() + 0.6f);
  viewFrustum.setLeft(viewFrustum.getLeft() - 0.1f);
  gl.glEndList();
}

Fixed version (ground truth):
private void buildDisplayList(final GL gl,int iGLDisplayListIndex){
  if (bRedrawTextures) {
    initTextures(gl);
    bRedrawTextures=false;
  }
  if (bHasFrustumChanged) {
    glHeatMapView.setDisplayListDirty();
    glGeneDendrogramView.setRedrawDendrogram();
    glGeneDendrogramView.setDisplayListDirty();
    glExperimentDendrogramView.setRedrawDendrogram();
    glExperimentDendrogramView.setDisplayListDirty();
    bHasFrustumChanged=false;
  }
  gl.glNewList(iGLDisplayListIndex,GL.GL_COMPILE);
  gl.glMatrixMode(GL.GL_MODELVIEW);
  gl.glLoadIdentity();
  gl.glColor4fv(BACKGROUND_COLOR,0);
  gl.glBegin(GL.GL_QUADS);
  gl.glVertex3f(0,0,-0.1f);
  gl.glVertex3f(viewFrustum.getRight(),0,-0.1f);
  gl.glVertex3f(viewFrustum.getRight(),viewFrustum.getHeight(),-0.1f);
  gl.glVertex3f(0,viewFrustum.getHeight(),-0.1f);
  gl.glEnd();
  viewFrustum.setTop(viewFrustum.getTop() - 0.6f);
  viewFrustum.setLeft(viewFrustum.getLeft() + 0.1f);
  gl.glTranslatef(0.1f,0.4f,0);
  setEmbeddedHeatMapData();
  if (bSkipLevel1 == false && bSkipLevel2 == false) {
    renderViewsLevel_1_2_3_Active(gl);
  }
 else   if (bSkipLevel1 == true && bSkipLevel2 == false) {
    renderViewsLevel_2_3_Active(gl);
  }
 else   if (bSkipLevel1 == true && bSkipLevel2 == true) {
    renderViewsLevel_3_Active(gl);
  }
 else {
    throw new IllegalStateException();
  }
  gl.glTranslatef(-0.1f,-0.4f,0);
  viewFrustum.setTop(viewFrustum.getTop() + 0.6f);
  viewFrustum.setLeft(viewFrustum.getLeft() - 0.1f);
  gl.glEndList();
}