nus-yam/ex-repair huggingface dataset:
Program: 58841
Project: 58841
Buggy source:
@Override protected void initLists(){
  if (bRenderOnlyContext) {
    iContentVAID=mapVAIDs.get(EStorageBasedVAType.EXTERNAL_SELECTION);
  }
 else {
    if (!mapVAIDs.containsKey(EStorageBasedVAType.COMPLETE_SELECTION)) {
      initCompleteList();
    }
    iContentVAID=mapVAIDs.get(EStorageBasedVAType.COMPLETE_SELECTION);
  }
  iStorageVAID=mapVAIDs.get(EStorageBasedVAType.STORAGE_SELECTION);
  contentSelectionManager.resetSelectionManager();
  storageSelectionManager.resetSelectionManager();
  contentSelectionManager.setVA(set.getVA(iContentVAID));
  storageSelectionManager.setVA(set.getVA(iStorageVAID));
  int iNumberOfColumns=set.getVA(iContentVAID).size();
  int iNumberOfRows=set.getVA(iStorageVAID).size();
  for (int iRowCount=0; iRowCount < iNumberOfRows; iRowCount++) {
    storageSelectionManager.initialAdd(set.getVA(iStorageVAID).get(iRowCount));
  }
  for (int iColumnCount=0; iColumnCount < iNumberOfColumns; iColumnCount++) {
    contentSelectionManager.initialAdd(set.getVA(iContentVAID).get(iColumnCount));
  }
  renderStyle=new HeatMapRenderStyle(this,viewFrustum);
  super.renderStyle=renderStyle;
  vecTranslation=new Vec3f(0,renderStyle.getYCenter() * 2,0);
}

Fixed version (ground truth):
@Override protected void initLists(){
  if (bRenderOnlyContext) {
    iContentVAID=mapVAIDs.get(EStorageBasedVAType.EXTERNAL_SELECTION);
  }
 else {
    if (!mapVAIDs.containsKey(EStorageBasedVAType.COMPLETE_SELECTION)) {
      initCompleteList();
    }
    iContentVAID=mapVAIDs.get(EStorageBasedVAType.COMPLETE_SELECTION);
  }
  iStorageVAID=mapVAIDs.get(EStorageBasedVAType.STORAGE_SELECTION);
  contentSelectionManager.setVA(set.getVA(iContentVAID));
  storageSelectionManager.setVA(set.getVA(iStorageVAID));
  int iNumberOfColumns=set.getVA(iContentVAID).size();
  int iNumberOfRows=set.getVA(iStorageVAID).size();
  for (int iRowCount=0; iRowCount < iNumberOfRows; iRowCount++) {
    storageSelectionManager.initialAdd(set.getVA(iStorageVAID).get(iRowCount));
  }
  for (int iColumnCount=0; iColumnCount < iNumberOfColumns; iColumnCount++) {
    contentSelectionManager.initialAdd(set.getVA(iContentVAID).get(iColumnCount));
  }
  renderStyle=new HeatMapRenderStyle(this,viewFrustum);
  super.renderStyle=renderStyle;
  vecTranslation=new Vec3f(0,renderStyle.getYCenter() * 2,0);
}
Program: 58843
Project: 58843
Buggy source:
@Override public boolean performCancel(){
  super.performCancel();
  MessageBox messageBox=new MessageBox(this.getShell(),SWT.OK);
  messageBox.setText("String_Node_Str");
  messageBox.setMessage("String_Node_Str" + "String_Node_Str");
  messageBox.open();
  return true;
}

Fixed version (ground truth):
@Override public boolean performCancel(){
  super.performCancel();
  PreferenceStore store=GeneralManager.get().getPreferenceStore();
  if (store.getBoolean(PreferenceConstants.PATHWAY_DATA_OK))   return true;
  MessageBox messageBox=new MessageBox(this.getShell(),SWT.OK);
  messageBox.setText("String_Node_Str");
  messageBox.setMessage("String_Node_Str" + "String_Node_Str");
  messageBox.open();
  return true;
}
Program: 58844
Project: 58844
Buggy source:
private void updateColorLabel(){
  DecimalFormat decimalFormat=new DecimalFormat("String_Node_Str");
  int iNumberOfMarkerPoints=store.getInt(PreferenceConstants.GENE_EXPRESSION_PREFIX + PreferenceConstants.NUMBER_OF_COLOR_MARKER_POINTS);
  Color[] alColor=new Color[iNumberOfMarkerPoints];
  int[] iArColorMarkerPoints=new int[iNumberOfMarkerPoints - 1];
  for (int iCount=1; iCount <= iNumberOfMarkerPoints; iCount++) {
    float normalizedValue=store.getFloat(PreferenceConstants.GENE_EXPRESSION_PREFIX + PreferenceConstants.COLOR_MARKER_POINT_VALUE + iCount);
    double correspondingValue=GeneralManager.get().getSetManager().getAllItems().iterator().next().getRawForNormalized(normalizedValue);
    labels.get(iCount - 1).setText(decimalFormat.format(correspondingValue));
    int iColorMarkerPoint=(int)(100 * normalizedValue);
    if (iColorMarkerPoint != 0) {
      iArColorMarkerPoints[iCount - 2]=iColorMarkerPoint;
    }
    String color=store.getString(PreferenceConstants.GENE_EXPRESSION_PREFIX + PreferenceConstants.COLOR_MARKER_POINT_COLOR + iCount);
    int[] iArColor=ConversionTools.getIntColorFromString(color);
    alColor[iCount - 1]=new Color(PlatformUI.getWorkbench().getDisplay(),iArColor[0],iArColor[1],iArColor[2]);
  }
  colorMappingPreviewLabel.setBackground(alColor,iArColorMarkerPoints);
  colorMappingPreviewLabel.update();
}

Fixed version (ground truth):
private void updateColorLabel(){
  DecimalFormat decimalFormat;
  int iNumberOfMarkerPoints=store.getInt(PreferenceConstants.GENE_EXPRESSION_PREFIX + PreferenceConstants.NUMBER_OF_COLOR_MARKER_POINTS);
  Color[] alColor=new Color[iNumberOfMarkerPoints];
  int[] iArColorMarkerPoints=new int[iNumberOfMarkerPoints - 1];
  for (int iCount=1; iCount <= iNumberOfMarkerPoints; iCount++) {
    float normalizedValue=store.getFloat(PreferenceConstants.GENE_EXPRESSION_PREFIX + PreferenceConstants.COLOR_MARKER_POINT_VALUE + iCount);
    double correspondingValue=GeneralManager.get().getUseCase().getSet().getRawForNormalized(normalizedValue);
    if (Math.abs(correspondingValue) > 10000)     decimalFormat=new DecimalFormat("String_Node_Str");
 else     if (Math.abs(correspondingValue) > 100)     decimalFormat=new DecimalFormat("String_Node_Str");
 else     if (Math.abs(correspondingValue) > 10)     decimalFormat=new DecimalFormat("String_Node_Str");
 else     decimalFormat=new DecimalFormat("String_Node_Str");
    labels.get(iCount - 1).setText(decimalFormat.format(correspondingValue));
    int iColorMarkerPoint=(int)(100 * normalizedValue);
    if (iColorMarkerPoint != 0) {
      iArColorMarkerPoints[iCount - 2]=iColorMarkerPoint;
    }
    String color=store.getString(PreferenceConstants.GENE_EXPRESSION_PREFIX + PreferenceConstants.COLOR_MARKER_POINT_COLOR + iCount);
    int[] iArColor=ConversionTools.getIntColorFromString(color);
    alColor[iCount - 1]=new Color(PlatformUI.getWorkbench().getDisplay(),iArColor[0],iArColor[1],iArColor[2]);
  }
  colorMappingPreviewLabel.setBackground(alColor,iArColorMarkerPoints);
  colorMappingPreviewLabel.update();
}
Program: 58846
Project: 58846
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);
  swtComposite=parent;
  GeneralManager.get().getViewGLCanvasManager().registerItem(tabularDataView);
}

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");
  tabularDataView.registerEventListeners();
  IUseCase useCase=GeneralManager.get().getUseCase();
  tabularDataView.setSet(useCase.getSet());
  tabularDataView.initViewRCP(parent);
  tabularDataView.drawView();
  useCase.addView(tabularDataView);
  swtComposite=parent;
  GeneralManager.get().getViewGLCanvasManager().registerItem(tabularDataView);
  iViewID=tabularDataView.getID();
}
Program: 58847
Project: 58847
Buggy source:
public void createControl(Composite parent){
  parentWizard=(Wizard)this.getWizard();
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new FillLayout(SWT.VERTICAL));
  final TabFolder tabFolder=new TabFolder(composite,SWT.BORDER);
  createGeneticUseCaseTab(tabFolder);
  createGeneralDataUseCaseTab(tabFolder);
  tabFolder.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (((TabItem)e.item) == generalDataUseCaseTab) {
        useCaseMode=EUseCaseMode.UNSPECIFIED_DATA;
        Application.bLoadPathwayData=false;
      }
 else       if (((TabItem)e.item) == generalDataUseCaseTab)       useCaseMode=EUseCaseMode.GENETIC_DATA;
 else       throw new IllegalStateException("String_Node_Str");
    }
  }
);
  tabFolder.pack();
  setControl(composite);
  composite.pack();
}

Fixed version (ground truth):
public void createControl(Composite parent){
  parentWizard=(Wizard)this.getWizard();
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new FillLayout(SWT.VERTICAL));
  final TabFolder tabFolder=new TabFolder(composite,SWT.BORDER);
  createGeneticUseCaseTab(tabFolder);
  createGeneralDataUseCaseTab(tabFolder);
  tabFolder.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (((TabItem)e.item) == generalDataUseCaseTab) {
        useCaseMode=EUseCaseMode.UNSPECIFIED_DATA;
        Application.bLoadPathwayData=false;
      }
 else       if (((TabItem)e.item) == geneticDataUseCaseTab)       useCaseMode=EUseCaseMode.GENETIC_DATA;
 else       throw new IllegalStateException("String_Node_Str");
    }
  }
);
  tabFolder.pack();
  setControl(composite);
  composite.pack();
}
Program: 58849
Project: 58849
Buggy source:
@Override public void reshape(GLAutoDrawable drawable,int x,int y,int width,int height){
  if (remoteRenderingGLCanvas != null || this instanceof GLRemoteRendering || this instanceof GLGlyph) {
    viewFrustum.considerAspectRatio(true);
  }
 else {
    Rectangle frame=parentGLCanvas.getBounds();
    viewFrustum.setLeft(0);
    viewFrustum.setRight(8);
    viewFrustum.setBottom(0);
    float value=(float)frame.height / (float)frame.width * 8.0f;
    viewFrustum.setTop(value);
    bIsDisplayListDirtyLocal=true;
    bIsDisplayListDirtyRemote=true;
    bHasFrustumChanged=true;
  }
  GL gl=drawable.getGL();
  fAspectRatio=(float)height / (float)width;
  gl.glMatrixMode(GL.GL_PROJECTION);
  gl.glLoadIdentity();
  viewFrustum.setProjectionMatrix(gl,fAspectRatio);
}

Fixed version (ground truth):
@Override public void reshape(GLAutoDrawable drawable,int x,int y,int width,int height){
  if (remoteRenderingGLCanvas != null || this instanceof GLRemoteRendering || this instanceof GLGlyph) {
    viewFrustum.considerAspectRatio(true);
  }
 else {
    Rectangle frame=parentGLCanvas.getBounds();
    viewFrustum.setLeft(0);
    viewFrustum.setRight(8);
    viewFrustum.setBottom(0);
    float value=(float)frame.height / (float)frame.width * 8.0f;
    viewFrustum.setTop(value);
    bIsDisplayListDirtyLocal=true;
    bIsDisplayListDirtyRemote=true;
    bHasFrustumChanged=true;
  }
  GL gl=drawable.getGL();
  fAspectRatio=(float)height / (float)width;
  gl.glViewport(x,y,width,height);
  gl.glMatrixMode(GL.GL_PROJECTION);
  gl.glLoadIdentity();
  viewFrustum.setProjectionMatrix(gl,fAspectRatio);
}
Program: 58850
Project: 58850
Buggy source:
public void render(final GL gl){
  if (connectedElementRepManager.getOccuringIDTypes().size() == 0 || bEnableRendering == false)   return;
  renderConnectionLines(gl);
}

Fixed version (ground truth):
public void render(final GL gl){
  if (connectedElementRepManager.getOccuringIDTypes().size() == 0 || bEnableRendering == false)   return;
  gl.glDisable(GL.GL_DEPTH_TEST);
  renderConnectionLines(gl);
  gl.glEnable(GL.GL_DEPTH_TEST);
}
Program: 58853
Project: 58853
Buggy source:
private void buildDisplayList(final GL gl,int iGLDisplayListIndex){
  if (bHasFrustumChanged) {
    bHasFrustumChanged=false;
  }
  gl.glNewList(iGLDisplayListIndex,GL.GL_COMPILE);
  if (contentSelectionManager.getNumberOfElements() == 0 && !listModeEnabled) {
    renderSymbol(gl);
  }
 else {
    float fSpacing=0;
    if (!bRenderStorageHorizontally) {
      if (listModeEnabled) {
        fSpacing=HeatMapRenderStyle.LIST_SPACING;
      }
      gl.glTranslatef(vecTranslation.x(),viewFrustum.getHeight() - fSpacing,vecTranslation.z());
      gl.glRotatef(vecRotation.x(),vecRotation.y(),vecRotation.z(),vecRotation.w());
    }
    gl.glTranslatef(fAnimationTranslation,0.0f,0.0f);
    renderHeatMap(gl);
    renderSelection(gl,ESelectionType.MOUSE_OVER);
    renderSelection(gl,ESelectionType.SELECTION);
    gl.glTranslatef(-fAnimationTranslation,0.0f,0.0f);
    if (!bRenderStorageHorizontally) {
      gl.glRotatef(-vecRotation.x(),vecRotation.y(),vecRotation.z(),vecRotation.w());
      gl.glTranslatef(-vecTranslation.x(),-viewFrustum.getHeight() + fSpacing,-vecTranslation.z());
    }
    gl.glDisable(GL.GL_STENCIL_TEST);
  }
  gl.glEndList();
}

Fixed version (ground truth):
private void buildDisplayList(final GL gl,int iGLDisplayListIndex){
  if (bHasFrustumChanged) {
    bHasFrustumChanged=false;
  }
  gl.glNewList(iGLDisplayListIndex,GL.GL_COMPILE);
  if (contentSelectionManager.getNumberOfElements() == 0 && !listModeEnabled) {
    renderSymbol(gl);
  }
 else {
    float fSpacing=0;
    if (!bRenderStorageHorizontally) {
      if (listModeEnabled) {
        fSpacing=HeatMapRenderStyle.LIST_SPACING;
      }
      gl.glTranslatef(vecTranslation.x(),viewFrustum.getHeight() - fSpacing,vecTranslation.z());
      gl.glRotatef(vecRotation.x(),vecRotation.y(),vecRotation.z(),vecRotation.w());
    }
    gl.glTranslatef(fAnimationTranslation,0.0f,0.0f);
    renderHeatMap(gl);
    renderSelection(gl,ESelectionType.MOUSE_OVER);
    renderSelection(gl,ESelectionType.SELECTION);
    gl.glTranslatef(-fAnimationTranslation,0.0f,0.0f);
    if (!bRenderStorageHorizontally) {
      gl.glRotatef(-vecRotation.x(),vecRotation.y(),vecRotation.z(),vecRotation.w());
      gl.glTranslatef(-vecTranslation.x(),-viewFrustum.getHeight() + fSpacing,-vecTranslation.z());
    }
  }
  gl.glEndList();
}
Program: 58854
Project: 58854
Buggy source:
@Override public synchronized void display(GL gl){
  gl.glCallList(iGLDisplayListToCall);
}

Fixed version (ground truth):
@Override public synchronized void display(GL gl){
  gl.glCallList(iGLDisplayListToCall);
  if (!isRenderedRemote())   contextMenu.render(gl,iUniqueID);
}
Program: 58859
Project: 58859
Buggy source:
/** 
 * Convenience version of   {@link #convertWindowCoordinatesToWorldCoordinates(GL,int,int,float)} whichassumes z to be 0.3, which is accurate for the bottom of the bucket
 * @param gl
 * @param iWindowCoordinatePositionX
 * @param iWindowCoordinatePositionY
 * @return
 */
public static float[] convertWindowCoordinatesToWorldCoordinates(final GL gl,final int iWindowCoordinatePositionX,final int iWindowCoordinatePositionY){
  return convertWindowCoordinatesToWorldCoordinates(gl,iWindowCoordinatePositionX,iWindowCoordinatePositionY,0.3f);
}

Fixed version (ground truth):
/** 
 * Convenience version of   {@link #convertWindowCoordinatesToWorldCoordinates(GL,int,int,float)} whichassumes z to be 0.3, which is accurate for the bottom of the bucket
 * @param gl
 * @param iWindowCoordinatePositionX
 * @param iWindowCoordinatePositionY
 * @return
 */
public static float[] convertWindowCoordinatesToWorldCoordinates(final GL gl,final int iWindowCoordinatePositionX,final int iWindowCoordinatePositionY){
  return convertWindowCoordinatesToWorldCoordinates(gl,iWindowCoordinatePositionX,iWindowCoordinatePositionY,0.055f);
}
Program: 58860
Project: 58860
Buggy source:
public void setAttributes(final ArrayList<Integer> iAlStorageId,final String sFileName,final String sTokenPattern,final String sTokenSeparator,final int iStartParseFileAtLine,final int iStopParseFileAtLine){
  this.iAlStorageIDs=iAlStorageId;
  this.sFileName=sFileName;
  this.sTokenPattern=sTokenPattern;
  this.iStartParseFileAtLine=iStartParseFileAtLine;
  this.iStopParseFileAtLine=iStopParseFileAtLine;
  this.sTokenSeparator=sTokenSeparator;
}

Fixed version (ground truth):
public void setAttributes(final ArrayList<Integer> iAlStorageId,final String sFileName,final String sTreeFileName,final String sTokenPattern,final String sTokenSeparator,final int iStartParseFileAtLine,final int iStopParseFileAtLine){
  this.iAlStorageIDs=iAlStorageId;
  this.sFileName=sFileName;
  this.sTreeFileName=sTreeFileName;
  this.sTokenPattern=sTokenPattern;
  this.iStartParseFileAtLine=iStartParseFileAtLine;
  this.iStopParseFileAtLine=iStopParseFileAtLine;
  this.sTokenSeparator=sTokenSeparator;
}
Program: 58861
Project: 58861
Buggy source:
@Override public void doCommand(){
  generalManager.getLogger().log(Level.INFO,"String_Node_Str" + sFileName + "String_Node_Str"+ sTokenPattern+ "String_Node_Str"+ iAlStorageIDs.toString());
  TabularAsciiDataReader loader=new TabularAsciiDataReader(sFileName);
  loader.setTokenPattern(sTokenPattern);
  loader.setTargetStorages(iAlStorageIDs);
  loader.setStartParsingStopParsingAtLine(iStartParseFileAtLine,iStopParseFileAtLine);
  if (!sTokenSeparator.isEmpty()) {
    loader.setTokenSeperator(sTokenSeparator);
  }
  loader.loadData();
  generalManager.getGUIBridge().setFileNameCurrentDataSet(sFileName);
  commandManager.runDoCommand(this);
}

Fixed version (ground truth):
@Override public void doCommand(){
  generalManager.getLogger().log(Level.INFO,"String_Node_Str" + sFileName + "String_Node_Str"+ sTokenPattern+ "String_Node_Str"+ iAlStorageIDs.toString());
  TabularAsciiDataReader loader=new TabularAsciiDataReader(sFileName);
  loader.setTokenPattern(sTokenPattern);
  loader.setTargetStorages(iAlStorageIDs);
  loader.setStartParsingStopParsingAtLine(iStartParseFileAtLine,iStopParseFileAtLine);
  if (!sTokenSeparator.isEmpty()) {
    loader.setTokenSeperator(sTokenSeparator);
  }
  loader.loadData();
  generalManager.getGUIBridge().setFileNameCurrentDataSet(sFileName);
  if (sTreeFileName != null) {
    if (sTreeFileName.equals("String_Node_Str") == false) {
      generalManager.getLogger().log(Level.INFO,"String_Node_Str" + sTreeFileName);
      TreePorter treePorter=new TreePorter();
      Tree<ClusterNode> tree=treePorter.importTree(sTreeFileName);
      ISet set=generalManager.getUseCase().getSet();
      set.setClusteredTreeGenes(tree);
    }
  }
  commandManager.runDoCommand(this);
}
Program: 58863
Project: 58863
Buggy source:
@Override public void setGroupNrInfo(int[] arGroupInfo){
  int cluster=0, cnt=0;
  groupList.clear();
  for (int i=0; i < arGroupInfo.length; i++) {
    Group group=null;
    if (cluster != arGroupInfo[i]) {
      group=new Group(cnt,false,0,ESelectionType.NORMAL);
      groupList.append(group);
      cluster++;
      cnt=0;
    }
    cnt++;
  }
  bClusterInfo=true;
}

Fixed version (ground truth):
@Override public void setGroupNrInfo(int[] arGroupInfo){
  int cluster=0, cnt=0;
  groupList.clear();
  for (int i=0; i < arGroupInfo.length; i++) {
    Group group=null;
    if (cluster != arGroupInfo[i]) {
      group=new Group(cnt,false,0,ESelectionType.NORMAL);
      groupList.append(group);
      cluster++;
      cnt=0;
    }
    cnt++;
    if (i == arGroupInfo.length - 1) {
      group=new Group(cnt,false,0,ESelectionType.NORMAL);
      groupList.append(group);
    }
  }
  bClusterInfo=true;
}
Program: 58864
Project: 58864
Buggy source:
public Tree<ClusterNode> importTree(String fileName){
  Tree<ClusterNode> tree=new Tree<ClusterNode>();
  ClusterNode rootNode=null;
  DirectedGraph<ClusterNode,DefaultEdge> graph=new DefaultDirectedGraph<ClusterNode,DefaultEdge>(DefaultEdge.class);
  JAXBContext jaxbContext=null;
  TreePorter treePorter=null;
  Unmarshaller unmarshaller;
  HashMap<String,ClusterNode> hashClusterNodes=new HashMap<String,ClusterNode>();
  try {
    jaxbContext=JAXBContext.newInstance(TreePorter.class);
    unmarshaller=jaxbContext.createUnmarshaller();
    treePorter=(TreePorter)unmarshaller.unmarshal(new FileReader(fileName));
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
catch (  JAXBException e) {
    e.printStackTrace();
  }
  for (  ClusterNode node : treePorter.nodeSet) {
    graph.addVertex(node);
    hashClusterNodes.put(node.toString(),node);
    if (node.isRootNode())     rootNode=node;
  }
  for (  String[] edge : treePorter.edges) {
    graph.addEdge(hashClusterNodes.get(edge[0]),hashClusterNodes.get(edge[1]));
  }
  tree.setRootNode(rootNode);
  tree.setGraph(graph);
  return tree;
}

Fixed version (ground truth):
public Tree<ClusterNode> importTree(String fileName){
  Tree<ClusterNode> tree=new Tree<ClusterNode>();
  ClusterNode rootNode=null;
  DirectedGraph<ClusterNode,DefaultEdge> graph=new DefaultDirectedGraph<ClusterNode,DefaultEdge>(DefaultEdge.class);
  JAXBContext jaxbContext=null;
  TreePorter treePorter=null;
  Unmarshaller unmarshaller;
  HashMap<Integer,ClusterNode> hashClusterNr=new HashMap<Integer,ClusterNode>();
  HashMap<String,ClusterNode> hashClusterNodes=new HashMap<String,ClusterNode>();
  try {
    jaxbContext=JAXBContext.newInstance(TreePorter.class);
    unmarshaller=jaxbContext.createUnmarshaller();
    treePorter=(TreePorter)unmarshaller.unmarshal(new FileReader(fileName));
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
catch (  JAXBException e) {
    e.printStackTrace();
  }
  for (  ClusterNode node : treePorter.nodeSet) {
    graph.addVertex(node);
    hashClusterNodes.put(node.toString(),node);
    hashClusterNr.put(node.getClusterNr(),node);
    if (node.isRootNode())     rootNode=node;
  }
  for (  String[] edge : treePorter.edges) {
    graph.addEdge(hashClusterNodes.get(edge[0]),hashClusterNodes.get(edge[1]));
  }
  tree.setHashMap(hashClusterNr);
  tree.setRootNode(rootNode);
  tree.setGraph(graph);
  return tree;
}
Program: 58865
Project: 58865
Buggy source:
@Override public void handleMouseOver(String clusterNodeName){
}

Fixed version (ground truth):
public void handleMouseOver(int clusterNr){
  if (tree.getNodeByNumber(clusterNr) != null)   tree.getNodeByNumber(clusterNr).setSelectionType(ESelectionType.MOUSE_OVER);
  setDisplayListDirty();
}
Program: 58869
Project: 58869
Buggy source:
@Override public synchronized void display(final GL gl){
  time.update();
  layoutRenderStyle.initPoolLevel(false,iMouseOverObjectID);
  layoutRenderStyle.initFocusLevel();
  if (GeneralManager.get().isWiiModeActive() && layoutMode.equals(ARemoteViewLayoutRenderStyle.LayoutMode.BUCKET)) {
    ((BucketLayoutRenderStyle)layoutRenderStyle).initFocusLevelWii();
    ((BucketLayoutRenderStyle)layoutRenderStyle).initStackLevelWii();
  }
  doSlerpActions(gl);
  initNewView(gl);
  if (!generalManager.isWiiModeActive()) {
    renderRemoteLevel(gl,focusLevel);
    renderRemoteLevel(gl,stackLevel);
  }
 else {
    if (bUpdateOffScreenTextures) {
      updateOffScreenTextures(gl);
    }
    renderRemoteLevel(gl,focusLevel);
    glOffScreenRenderer.renderRubberBucket(gl,stackLevel,(BucketLayoutRenderStyle)layoutRenderStyle,this);
  }
  if (bucketMouseWheelListener == null || !bucketMouseWheelListener.isZoomedIn()) {
    renderPoolAndMemoLayerBackground(gl);
    renderRemoteLevel(gl,transitionLevel);
    renderRemoteLevel(gl,spawnLevel);
    renderRemoteLevel(gl,poolLevel);
    renderRemoteLevel(gl,externalSelectionLevel);
  }
  if (layoutMode.equals(ARemoteViewLayoutRenderStyle.LayoutMode.BUCKET)) {
    bucketMouseWheelListener.render();
  }
  renderHandles(gl);
  gl.glDisable(GL.GL_DEPTH_TEST);
  if (glConnectionLineRenderer != null && connectionLinesEnabled) {
    glConnectionLineRenderer.render(gl);
  }
  gl.glEnable(GL.GL_DEPTH_TEST);
}

Fixed version (ground truth):
@Override public synchronized void display(final GL gl){
  time.update();
  layoutRenderStyle.initPoolLevel(false,iMouseOverObjectID);
  layoutRenderStyle.initFocusLevel();
  if (GeneralManager.get().isWiiModeActive() && layoutMode.equals(ARemoteViewLayoutRenderStyle.LayoutMode.BUCKET)) {
    ((BucketLayoutRenderStyle)layoutRenderStyle).initFocusLevelWii();
    ((BucketLayoutRenderStyle)layoutRenderStyle).initStackLevelWii();
  }
  doSlerpActions(gl);
  initNewView(gl);
  if (!generalManager.isWiiModeActive()) {
    renderRemoteLevel(gl,focusLevel);
    renderRemoteLevel(gl,stackLevel);
  }
 else {
    if (bUpdateOffScreenTextures) {
      updateOffScreenTextures(gl);
    }
    renderRemoteLevel(gl,focusLevel);
    glOffScreenRenderer.renderRubberBucket(gl,stackLevel,(BucketLayoutRenderStyle)layoutRenderStyle,this);
  }
  if (bucketMouseWheelListener == null || !bucketMouseWheelListener.isZoomedIn()) {
    renderPoolAndMemoLayerBackground(gl);
    renderRemoteLevel(gl,transitionLevel);
    renderRemoteLevel(gl,spawnLevel);
    renderRemoteLevel(gl,poolLevel);
    renderRemoteLevel(gl,externalSelectionLevel);
  }
  if (layoutMode.equals(ARemoteViewLayoutRenderStyle.LayoutMode.BUCKET)) {
    bucketMouseWheelListener.render();
  }
  renderHandles(gl);
  gl.glDisable(GL.GL_DEPTH_TEST);
  if (glConnectionLineRenderer != null && connectionLinesEnabled) {
    glConnectionLineRenderer.render(gl);
  }
  gl.glEnable(GL.GL_DEPTH_TEST);
  Dimension size=getParentGLCanvas().getSize();
  infoAreaManager.renderRemoteInPlaceInfo(gl,100,100,viewFrustum);
}
Program: 58871
Project: 58871
Buggy source:
public IGraphItem createVertexRep(final IGraph parentPathway,final IGraphItem parentVertex,final String sName,final String sShapeType,final String sCoords);

Fixed version (ground truth):
public IGraphItem createVertexRep(final IGraph parentPathway,ArrayList<IGraphItem> alVertexGraphItem,final String sName,final String sShapeType,final String sCoords);
Program: 58872
Project: 58872
Buggy source:
public IGraphItem createVertexGene(final String sName,final String sType,final String sExternalLink,final String sReactionId,final int iDavidId);

Fixed version (ground truth):
public ArrayList<IGraphItem> createVertexGene(final String sName,final String sType,final String sExternalLink,final String sReactionId,final Set<Integer> iSetDavidId);
Program: 58873
Project: 58873
Buggy source:
public IGraphItem createVertexRep(final IGraph parentPathway,final IGraphItem parentVertex,final String sName,final String sShapeType,final String sCoords){
  ICaleydoGraphItem pathwayVertexRep=new PathwayVertexGraphItemRep(sName,sShapeType,sCoords);
  registerItem(pathwayVertexRep);
  parentPathway.addItem(pathwayVertexRep);
  pathwayVertexRep.addGraph(parentPathway,EGraphItemHierarchy.GRAPH_PARENT);
  pathwayVertexRep.addItem(parentVertex,EGraphItemProperty.ALIAS_PARENT);
  parentVertex.addItem(pathwayVertexRep,EGraphItemProperty.ALIAS_CHILD);
  hashIDToPathwayVertexGraphItemRep.put(pathwayVertexRep.getId(),(PathwayVertexGraphItemRep)pathwayVertexRep);
  return pathwayVertexRep;
}

Fixed version (ground truth):
public IGraphItem createVertexRep(final IGraph parentPathway,final ArrayList<IGraphItem> alVertexGraphItem,final String sName,final String sShapeType,final String sCoords){
  ICaleydoGraphItem pathwayVertexRep=new PathwayVertexGraphItemRep(sName,sShapeType,sCoords);
  registerItem(pathwayVertexRep);
  parentPathway.addItem(pathwayVertexRep);
  pathwayVertexRep.addGraph(parentPathway,EGraphItemHierarchy.GRAPH_PARENT);
  for (  IGraphItem parentVertex : alVertexGraphItem) {
    pathwayVertexRep.addItem(parentVertex,EGraphItemProperty.ALIAS_PARENT);
    parentVertex.addItem(pathwayVertexRep,EGraphItemProperty.ALIAS_CHILD);
  }
  hashIDToPathwayVertexGraphItemRep.put(pathwayVertexRep.getId(),(PathwayVertexGraphItemRep)pathwayVertexRep);
  return pathwayVertexRep;
}
Program: 58874
Project: 58874
Buggy source:
public IGraphItem createVertexGene(final String sName,final String sType,final String sExternalLink,final String sReactionId,final int iDavidId){
  if (hashDavidIdToPathwayVertexGraphItemId.containsKey(iDavidId))   return hashItems.get(hashDavidIdToPathwayVertexGraphItemId.get(iDavidId));
  IGraphItem tmpGraphItem=createVertex(sName,sType,sExternalLink,sReactionId);
  hashDavidIdToPathwayVertexGraphItemId.put(iDavidId,tmpGraphItem.getId());
  hashPathwayVertexGraphItemIdToDavidId.put(tmpGraphItem.getId(),iDavidId);
  return tmpGraphItem;
}

Fixed version (ground truth):
public ArrayList<IGraphItem> createVertexGene(final String sName,final String sType,final String sExternalLink,final String sReactionId,final Set<Integer> iSetDavidId){
  ArrayList<IGraphItem> alGraphItems=new ArrayList<IGraphItem>();
  for (  int iDavidId : iSetDavidId) {
    if (hashDavidIdToPathwayVertexGraphItemId.containsKey(iDavidId)) {
      alGraphItems.add(hashItems.get(hashDavidIdToPathwayVertexGraphItemId.get(iDavidId)));
    }
 else {
      IGraphItem tmpGraphItem=createVertex(sName,sType,sExternalLink,sReactionId);
      hashDavidIdToPathwayVertexGraphItemId.put(iDavidId,tmpGraphItem.getId());
      hashPathwayVertexGraphItemIdToDavidId.put(tmpGraphItem.getId(),iDavidId);
    }
  }
  return alGraphItems;
}
Program: 58876
Project: 58876
Buggy source:
@Override public void startElement(String namespaceURI,String sSimpleName,String sQualifiedName,Attributes attributes) throws SAXException {
  String sElementName=sSimpleName;
  this.attributes=attributes;
  if ("String_Node_Str".equals(sElementName)) {
    sElementName=sQualifiedName;
  }
  if (attributes != null) {
    if (sElementName.equals("String_Node_Str")) {
      handlePathwayTag();
    }
 else     if (sElementName.equals("String_Node_Str")) {
      handleEntryTag();
    }
 else     if (sElementName.equals("String_Node_Str")) {
      handleGraphicsTag();
    }
 else     if (sElementName.equals("String_Node_Str")) {
      handleRelationTag();
    }
 else     if (sElementName.equals("String_Node_Str")) {
      handleReactionTag();
    }
 else     if (sElementName.equals("String_Node_Str")) {
      handleReactionProductTag();
    }
 else     if (sElementName.equals("String_Node_Str")) {
      handleReactionSubstrateTag();
    }
  }
}

Fixed version (ground truth):
@Override public void startElement(String namespaceURI,String sSimpleName,String sQualifiedName,Attributes attributes) throws SAXException {
  String sElementName=sSimpleName;
  this.attributes=attributes;
  if ("String_Node_Str".equals(sElementName)) {
    sElementName=sQualifiedName;
  }
  if (attributes != null) {
    if (sElementName.equals("String_Node_Str")) {
      handlePathwayTag();
    }
 else     if (sElementName.equals("String_Node_Str")) {
      handleEntryTag();
    }
 else     if (sElementName.equals("String_Node_Str")) {
      handleGraphicsTag();
    }
  }
}
Program: 58879
Project: 58879
Buggy source:
private void triggerToolBarUpdate(){
  log.info("String_Node_Str");
  ViewActivationEvent viewActivationEvent=new ViewActivationEvent();
  List<Integer> viewIDs=this.getAllViewIDs();
  viewActivationEvent.setViewIDs(viewIDs);
  IEventPublisher eventPublisher=GeneralManager.get().getEventPublisher();
  eventPublisher.triggerEvent(viewActivationEvent);
}

Fixed version (ground truth):
/** 
 * Triggers a toolbar update by sending an event similar to the view activation
 */
private void triggerToolBarUpdate(){
  log.info("String_Node_Str");
  ViewActivationEvent viewActivationEvent=new ViewActivationEvent();
  List<Integer> viewIDs=this.getAllViewIDs();
  viewActivationEvent.setViewIDs(viewIDs);
  IEventPublisher eventPublisher=GeneralManager.get().getEventPublisher();
  eventPublisher.triggerEvent(viewActivationEvent);
}
Program: 58880
Project: 58880
Buggy source:
@Override public void partHidden(IWorkbenchPartReference partRef){
  IWorkbenchPart activePart=partRef.getPart(false);
  if (!(activePart instanceof AGLViewPart))   return;
  AGLViewPart glViewPart=(AGLViewPart)activePart;
  GeneralManager.get().getViewGLCanvasManager().unregisterGLCanvasFromAnimator(glViewPart.getGLCanvas().getID());
}

Fixed version (ground truth):
@Override public void partHidden(IWorkbenchPartReference partRef){
  IWorkbenchPart activePart=partRef.getPart(false);
  if (!(activePart instanceof CaleydoViewPart)) {
    return;
  }
  CaleydoViewPart viewPart=(CaleydoViewPart)activePart;
  viewPart.setAttached(isViewAttached(viewPart));
  if (!(activePart instanceof AGLViewPart)) {
    return;
  }
  AGLViewPart glViewPart=(AGLViewPart)activePart;
  GeneralManager.get().getViewGLCanvasManager().unregisterGLCanvasFromAnimator(glViewPart.getGLCanvas().getID());
}
Program: 58881
Project: 58881
Buggy source:
@Override public void partVisible(IWorkbenchPartReference partRef){
  log.info("String_Node_Str");
  IWorkbenchPart activePart=partRef.getPart(false);
  if (!(activePart instanceof CaleydoViewPart)) {
    return;
  }
  CaleydoViewPart viewPart=(CaleydoViewPart)activePart;
  if (viewPart instanceof AGLViewPart) {
    GeneralManager.get().getViewGLCanvasManager().registerGLCanvasToAnimator(((AGLViewPart)viewPart).getGLCanvas().getID());
  }
  if (!activePart.getSite().getShell().getText().equals("String_Node_Str")) {
    if (viewPart instanceof CaleydoViewPart) {
      drawInlineToolBar(viewPart);
      removeViewSpecificToolBarItems();
    }
  }
 else {
    if (viewPart instanceof AGLViewPart) {
      removeInlineToolBar((AGLViewPart)viewPart);
      sendViewActivationEvent(viewPart);
    }
  }
}

Fixed version (ground truth):
@Override public void partVisible(IWorkbenchPartReference partRef){
  log.info("String_Node_Str");
  IWorkbenchPart activePart=partRef.getPart(false);
  if (!(activePart instanceof CaleydoViewPart)) {
    return;
  }
  CaleydoViewPart viewPart=(CaleydoViewPart)activePart;
  viewPart.setAttached(isViewAttached(viewPart));
  if (viewPart instanceof AGLViewPart) {
    GeneralManager.get().getViewGLCanvasManager().registerGLCanvasToAnimator(((AGLViewPart)viewPart).getGLCanvas().getID());
  }
  if (!activePart.getSite().getShell().getText().equals("String_Node_Str")) {
    if (viewPart instanceof CaleydoViewPart) {
      drawInlineToolBar(viewPart);
      removeViewSpecificToolBarItems();
    }
  }
 else {
    if (viewPart instanceof AGLViewPart) {
      removeInlineToolBar((AGLViewPart)viewPart);
      sendViewActivationEvent(viewPart);
    }
  }
}
Program: 58882
Project: 58882
Buggy source:
public static boolean isViewAttached(IViewPart viewPart){
  if (viewPart.getSite().getShell().getText().equals("String_Node_Str")) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean isViewAttached(IViewPart viewPart){
  if (viewPart.getSite().getShell().getText().equals("String_Node_Str")) {
    return true;
  }
 else {
    return false;
  }
}
Program: 58883
Project: 58883
Buggy source:
/** 
 * Initializes an instance of this class.  Must be called before the first usage.  
 */
public void init(){
  contentMap=new HashMap<String,Class<?>>();
  AToolBarContent toolBarContent;
  toolBarContent=new HeatMapToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),HeatMapToolBarContent.class);
  toolBarContent=new HierarchicalHeatMapToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),HierarchicalHeatMapToolBarContent.class);
  toolBarContent=new ParCoordsToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),ParCoordsToolBarContent.class);
  toolBarContent=new RemoteRenderingToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),RemoteRenderingToolBarContent.class);
  toolBarContent=new ClinicalParCoordsToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),ClinicalParCoordsToolBarContent.class);
  toolBarContent=new GlyphToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),GlyphToolBarContent.class);
  toolBarContent=new HTMLBrowserToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),HTMLBrowserToolBarContent.class);
}

Fixed version (ground truth):
/** 
 * Initializes an instance of this class.  Must be called before the first usage.  
 */
public void init(){
  contentMap=new HashMap<String,Class<?>>();
  relatedRcpViews=new HashMap<Class<? extends IView>,String>();
  AToolBarContent toolBarContent;
  toolBarContent=new HeatMapToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),HeatMapToolBarContent.class);
  relatedRcpViews.put(GLRemoteRendering.class,GLRemoteRenderingView.ID);
  toolBarContent=new HierarchicalHeatMapToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),HierarchicalHeatMapToolBarContent.class);
  relatedRcpViews.put(GLHierarchicalHeatMap.class,GLHierarchicalHeatMapView.ID);
  toolBarContent=new ParCoordsToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),ParCoordsToolBarContent.class);
  relatedRcpViews.put(GLParallelCoordinates.class,GLParCoordsView.ID);
  toolBarContent=new RemoteRenderingToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),RemoteRenderingToolBarContent.class);
  relatedRcpViews.put(GLRemoteRendering.class,GLRemoteRenderingView.ID);
  toolBarContent=new ClinicalParCoordsToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),ClinicalParCoordsToolBarContent.class);
  toolBarContent=new GlyphToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),GlyphToolBarContent.class);
  relatedRcpViews.put(GLGlyph.class,GLGlyphView.ID);
  toolBarContent=new HTMLBrowserToolBarContent();
  contentMap.put(toolBarContent.getViewClass().getName(),HTMLBrowserToolBarContent.class);
  relatedRcpViews.put(GenomeHTMLBrowserViewRep.class,HTMLBrowserView.ID);
}
Program: 58884
Project: 58884
Buggy source:
/** 
 * determines if a view is attached to the caleydo's main window or not
 * @param viewID id of the view as used by {@link IViewManager}
 * @return true if the view is attached, false otherwise
 */
private boolean isViewAttached(int viewID){
  if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() == null) {
    return true;
  }
  IWorkbenchPage workbenchPage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  IView view=retrieveView(viewID);
  boolean isAttached=true;
  IViewPart relatedView=null;
  if (view instanceof GLRemoteRendering) {
    relatedView=workbenchPage.findView(GLRemoteRenderingView.ID);
  }
 else   if (view instanceof GLParallelCoordinates) {
    relatedView=workbenchPage.findView(GLParCoordsView.ID);
  }
  if (relatedView != null) {
    isAttached=PartListener.isViewAttached(relatedView);
  }
  return isAttached;
}

Fixed version (ground truth):
/** 
 * determines if a view is attached to the caleydo's main window or not
 * @param viewID id of the view as used by {@link IViewManager}
 * @return true if the view is attached, false otherwise
 */
private boolean isViewAttached(int viewID){
  IView view=retrieveView(viewID);
  if (view instanceof CaleydoViewPart) {
    return ((CaleydoViewPart)view).isAttached();
  }
 else   if (view instanceof AView) {
    CaleydoViewPart relatedView=getRelatedViewPart(view);
    if (relatedView != null) {
      return relatedView.isAttached();
    }
  }
  log.warning("String_Node_Str" + viewID + "String_Node_Str");
  return false;
}
Program: 58885
Project: 58885
Buggy source:
/** 
 * Constructor.
 * @param iViewID
 * @param iGLCanvasID
 * @param sLabel
 * @param viewFrustum
 */
public GLDendrogram(ESetType setType,final int iGLCanvasID,final String sLabel,final IViewFrustum viewFrustum){
  super(iGLCanvasID,sLabel,viewFrustum,true);
  viewType=EManagedObjectType.GL_DENDOGRAM;
  renderStyle=new DendrogramRenderStyle(this,viewFrustum);
  colorMapper=ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param iViewID
 * @param iGLCanvasID
 * @param sLabel
 * @param viewFrustum
 */
public GLDendrogram(ESetType setType,final int iGLCanvasID,final String sLabel,final IViewFrustum viewFrustum){
  super(setType,iGLCanvasID,sLabel,viewFrustum);
  viewType=EManagedObjectType.GL_DENDOGRAM;
  ArrayList<ESelectionType> alSelectionTypes=new ArrayList<ESelectionType>();
  alSelectionTypes.add(ESelectionType.NORMAL);
  alSelectionTypes.add(ESelectionType.MOUSE_OVER);
  alSelectionTypes.add(ESelectionType.SELECTION);
  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();
  renderStyle=new DendrogramRenderStyle(this,viewFrustum);
  colorMapper=ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION);
}
Program: 58886
Project: 58886
Buggy source:
private void buildDisplayList(final GL gl,int iGLDisplayListIndex){
  gl.glNewList(iGLDisplayListIndex,GL.GL_COMPILE);
  if (tree == null) {
    if (bRenderGeneTree)     tree=set.getClusteredTreeGenes();
 else     tree=set.getClusteredTreeExps();
    renderSymbol(gl);
  }
 else {
    if (tree != null && bRenderGeneTree) {
      xmax=viewFrustum.getWidth() - 0.2f;
      fSampleHeight=(viewFrustum.getHeight() - 0.7f) / tree.getRoot().getNrElements();
      fLevelHeight=(viewFrustum.getWidth() - 3f) / tree.getRoot().getDepth();
      yPosInit=viewFrustum.getHeight() - 0.4f;
      determinePositions();
    }
    gl.glTranslatef(0.1f,0,0);
    gl.glLineWidth(0.1f);
    renderDendrogram(gl,tree.getRoot());
    renderCut(gl);
    gl.glTranslatef(-0.1f,0,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)     tree=set.getClusteredTreeGenes();
 else     tree=set.getClusteredTreeExps();
    initData();
    renderSymbol(gl);
  }
 else {
    if (tree != null && bRenderGeneTree) {
      xmax=viewFrustum.getWidth() - 0.2f;
      fSampleHeight=(viewFrustum.getHeight() - 0.7f) / tree.getRoot().getNrElements();
      fLevelHeight=(viewFrustum.getWidth() - 3f) / tree.getRoot().getDepth();
      yPosInit=viewFrustum.getHeight() - 0.4f;
      determinePositions();
    }
    gl.glTranslatef(0.1f,0,0);
    gl.glLineWidth(0.1f);
    renderDendrogram(gl,tree.getRoot());
    renderCut(gl);
    gl.glTranslatef(-0.1f,0,0);
  }
  gl.glEndList();
}
Program: 58887
Project: 58887
Buggy source:
@Override public void initLocal(GL gl){
  iGLDisplayListIndexLocal=gl.glGenLists(1);
  iGLDisplayListToCall=iGLDisplayListIndexLocal;
  init(gl);
}

Fixed version (ground truth):
@Override public void initLocal(GL gl){
  generalManager.getEventPublisher().addSender(EMediatorType.SELECTION_MEDIATOR,this);
  generalManager.getEventPublisher().addReceiver(EMediatorType.SELECTION_MEDIATOR,this);
  iGLDisplayListIndexLocal=gl.glGenLists(1);
  iGLDisplayListToCall=iGLDisplayListIndexLocal;
  init(gl);
}
Program: 58888
Project: 58888
Buggy source:
@Override public void broadcastElements(EVAOperation type){
}

Fixed version (ground truth):
@Override public void broadcastElements(){
}
Program: 58890
Project: 58890
Buggy source:
/** 
 * Add a list of children to the specified parent node. Uses   {@link #addChildren(ANode,List)} internally
 * @param parentNode the node to which the children are added
 * @param children the list of children
 */
public void addChildren(NodeType parentNode,List<NodeType> children){
  for (  NodeType child : children) {
    addChild(parentNode,child);
  }
}

Fixed version (ground truth):
/** 
 * Add a list of children to the specified parent node. Uses   {@link #addChildren(ANode,List)} internally
 * @param parentNode the node to which the children are added
 * @param children the list of children
 */
public void addChildren(NodeType parentNode,List<NodeType> children){
  for (  NodeType child : children) {
    addChild(parentNode,child);
    if (child instanceof ClusterNode)     hashNodes.put(((ClusterNode)child).getClusterNr(),child);
  }
}
Program: 58891
Project: 58891
Buggy source:
public Tree(){
  graph=new DefaultDirectedGraph<NodeType,DefaultEdge>(DefaultEdge.class);
  hashClusterNames=new HashMap<Integer,String>();
}

Fixed version (ground truth):
public Tree(){
  graph=new DefaultDirectedGraph<NodeType,DefaultEdge>(DefaultEdge.class);
  hashNodes=new HashMap<Integer,NodeType>();
}
Program: 58892
Project: 58892
Buggy source:
/** 
 * Adds a child to the specified parent node. The order of the children is specified by their compare method
 * @param parentNode the parent where the child will be added
 * @param childNode the child to be added
 */
public void addChild(NodeType parentNode,NodeType childNode){
  graph.addVertex(childNode);
  graph.addEdge(parentNode,childNode);
  hashClusterNames.put(((ClusterNode)childNode).getClusterNr(),((ClusterNode)childNode).getNodeName());
}

Fixed version (ground truth):
/** 
 * Adds a child to the specified parent node. The order of the children is specified by their compare method
 * @param parentNode the parent where the child will be added
 * @param childNode the child to be added
 */
public void addChild(NodeType parentNode,NodeType childNode){
  graph.addVertex(childNode);
  graph.addEdge(parentNode,childNode);
  if (childNode instanceof ClusterNode)   hashNodes.put(((ClusterNode)childNode).getClusterNr(),childNode);
}
Program: 58893
Project: 58893
Buggy source:
public boolean exportTree(String fileName,DirectedGraph<ClusterNode,DefaultEdge> graph,ClusterNode root) throws JAXBException, IOException {
  Set<DefaultEdge> edgeSet=(Set<DefaultEdge>)graph.edgeSet();
  for (  DefaultEdge edge : edgeSet) {
    edges.add(edge.toString());
  }
  nodeSet=graph.vertexSet();
  JAXBContext jaxbContext=JAXBContext.newInstance(TreePorter.class,DefaultEdge.class);
  Marshaller marshaller=jaxbContext.createMarshaller();
  Writer w=null;
  try {
    w=new FileWriter(fileName);
    marshaller.marshal(this,w);
  }
  finally {
    try {
      w.close();
    }
 catch (    Exception e) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean exportTree(String fileName,Tree<ClusterNode> tree) throws JAXBException, IOException {
  Set<DefaultEdge> edgeSet=(Set<DefaultEdge>)tree.graph.edgeSet();
  for (  DefaultEdge edge : edgeSet) {
    edges.add(edge.toString());
  }
  nodeSet=tree.graph.vertexSet();
  JAXBContext jaxbContext=JAXBContext.newInstance(TreePorter.class,DefaultEdge.class);
  Marshaller marshaller=jaxbContext.createMarshaller();
  Writer w=null;
  try {
    w=new FileWriter(fileName);
    marshaller.marshal(this,w);
  }
  finally {
    try {
      w.close();
    }
 catch (    Exception e) {
      return false;
    }
  }
  return true;
}
Program: 58895
Project: 58895
Buggy source:
private ArrayList<Integer> traverse(ArrayList<Integer> indexes,ClusterNode node){
  if (tree.hasChildren(node) == false)   indexes.add(node.getClusterNr());
 else {
    for (    ClusterNode current : tree.getChildren(node)) {
      traverse(indexes,current);
    }
  }
  return indexes;
}

Fixed version (ground truth):
private ArrayList<Integer> traverse(ArrayList<Integer> indexes,ClusterNode node){
  if (tree.hasChildren(node) == false) {
    indexes.add(node.getClusterNr() + 1);
  }
 else {
    for (    ClusterNode current : tree.getChildren(node)) {
      traverse(indexes,current);
    }
  }
  return indexes;
}
Program: 58899
Project: 58899
Buggy source:
public ArrayList<IGraphItem> createVertexGene(final String sName,final String sType,final String sExternalLink,final String sReactionId,final Set<Integer> iSetDavidId){
  ArrayList<IGraphItem> alGraphItems=new ArrayList<IGraphItem>();
  for (  int iDavidId : iSetDavidId) {
    if (hashDavidIdToPathwayVertexGraphItemId.containsKey(iDavidId)) {
      alGraphItems.add(hashItems.get(hashDavidIdToPathwayVertexGraphItemId.get(iDavidId)));
    }
 else {
      IGraphItem tmpGraphItem=createVertex(sName,sType,sExternalLink,sReactionId);
      hashDavidIdToPathwayVertexGraphItemId.put(iDavidId,tmpGraphItem.getId());
      hashPathwayVertexGraphItemIdToDavidId.put(tmpGraphItem.getId(),iDavidId);
    }
  }
  return alGraphItems;
}

Fixed version (ground truth):
public ArrayList<IGraphItem> createVertexGene(final String sName,final String sType,final String sExternalLink,final String sReactionId,final Set<Integer> iSetDavidId){
  ArrayList<IGraphItem> alGraphItems=new ArrayList<IGraphItem>();
  for (  int iDavidId : iSetDavidId) {
    if (hashDavidIdToPathwayVertexGraphItemId.containsKey(iDavidId)) {
      alGraphItems.add(hashItems.get(hashDavidIdToPathwayVertexGraphItemId.get(iDavidId)));
    }
 else {
      IGraphItem tmpGraphItem=createVertex(sName,sType,sExternalLink,sReactionId);
      hashDavidIdToPathwayVertexGraphItemId.put(iDavidId,tmpGraphItem.getId());
      hashPathwayVertexGraphItemIdToDavidId.put(tmpGraphItem.getId(),iDavidId);
      alGraphItems.add(tmpGraphItem);
    }
  }
  return alGraphItems;
}