nus-yam/ex-repair huggingface dataset:
Program: 58803
Project: 58803
Buggy source:
private void renderNumber(String sRawValue,float fXOrigin,float fYOrigin){
  textRenderer.begin3DRendering();
  textRenderer.draw3D(sRawValue,fXOrigin,fYOrigin,ParCoordsRenderStyle.TEXT_ON_LABEL_Z,renderStyle.getSmallFontScalingFactor());
  textRenderer.end3DRendering();
}

Fixed version (ground truth):
private void renderNumber(String sRawValue,float fXOrigin,float fYOrigin){
  textRenderer.begin3DRendering();
  float fScaling=renderStyle.getSmallFontScalingFactor();
  if (isRenderedRemote())   fScaling*=1.5f;
  textRenderer.draw3D(sRawValue,fXOrigin,fYOrigin,ParCoordsRenderStyle.TEXT_ON_LABEL_Z,fScaling);
  textRenderer.end3DRendering();
}
Program: 58806
Project: 58806
Buggy source:
private void createMenuContent(PathwayGraph pathway){
  addContextMenuItem(new LoadPathwaysByPathwayIDItem(pathway.getID()));
}

Fixed version (ground truth):
private void createMenuContent(PathwayGraph pathway){
  addHeading("String_Node_Str");
  addContextMenuItem(new LoadPathwaysByPathwayIDItem(pathway.getID()));
}
Program: 58807
Project: 58807
Buggy source:
/** 
 * The 2D screen coordinates of the position of the mouse at the time the pick occured
 * @return
 */
public Point getPickedPoint(){
  return pickedPoint;
}

Fixed version (ground truth):
/** 
 * The 2D screen coordinates of the mouse position at the time the pick occurred.
 */
public Point getPickedPoint(){
  return pickedPoint;
}
Program: 58808
Project: 58808
Buggy source:
public synchronized void clearAll(){
  if (containedViewIDs == null)   return;
  enableBusyMode(false);
  pickingManager.enablePicking(true);
  ArrayList<ASerializedView> removeNewViews=new ArrayList<ASerializedView>();
  for (  ASerializedView view : newViews) {
    if (!(view instanceof SerializedParallelCoordinatesView || view instanceof SerializedHeatMapView)) {
      removeNewViews.add(view);
    }
  }
  newViews.removeAll(removeNewViews);
  ArrayList<Integer> removeViewIDs=new ArrayList<Integer>();
  IViewManager viewManager=generalManager.getViewGLCanvasManager();
  for (  int viewID : containedViewIDs) {
    AGLEventListener view=viewManager.getGLEventListener(viewID);
    if (!(view instanceof GLParallelCoordinates || view instanceof GLHeatMap)) {
      removeViewIDs.add(viewID);
    }
  }
  containedViewIDs.removeAll(removeViewIDs);
  generalManager.getPathwayManager().resetPathwayVisiblityState();
  arSlerpActions.clear();
  clearRemoteLevel(focusLevel);
  clearRemoteLevel(stackLevel);
  clearRemoteLevel(poolLevel);
  generalManager.getViewGLCanvasManager().getConnectedElementRepresentationManager().clearAll();
}

Fixed version (ground truth):
public synchronized void clearAll(){
  if (containedViewIDs == null)   return;
  enableBusyMode(false);
  pickingManager.enablePicking(true);
  ArrayList<ASerializedView> removeNewViews=new ArrayList<ASerializedView>();
  for (  ASerializedView view : newViews) {
    if (!(view instanceof SerializedParallelCoordinatesView || view instanceof SerializedHeatMapView)) {
      removeNewViews.add(view);
    }
  }
  newViews.removeAll(removeNewViews);
  ArrayList<Integer> removeViewIDs=new ArrayList<Integer>();
  IViewManager viewManager=generalManager.getViewGLCanvasManager();
  for (  int viewID : containedViewIDs) {
    AGLEventListener view=viewManager.getGLEventListener(viewID);
    if (!(view instanceof GLParallelCoordinates || view instanceof GLHeatMap)) {
      removeViewIDs.add(viewID);
    }
  }
  containedViewIDs.removeAll(removeViewIDs);
  generalManager.getPathwayManager().resetPathwayVisiblityState();
  for (  SlerpAction slerpAction : arSlerpActions) {
    viewManager.getGLEventListener(slerpAction.getElementId()).broadcastElements(EVAOperation.REMOVE_ELEMENT);
  }
  arSlerpActions.clear();
  clearRemoteLevel(focusLevel);
  clearRemoteLevel(stackLevel);
  clearRemoteLevel(poolLevel);
  clearRemoteLevel(transitionLevel);
  for (  int viewID : containedViewIDs) {
    AGLEventListener view=viewManager.getGLEventListener(viewID);
    if (view instanceof GLParallelCoordinates) {
      stackLevel.getElementByPositionIndex(0).setContainedElementID(viewID);
    }
 else     if (view instanceof GLHeatMap) {
      focusLevel.getElementByPositionIndex(0).setContainedElementID(viewID);
    }
  }
  generalManager.getViewGLCanvasManager().getConnectedElementRepresentationManager().clearAll();
}
Program: 58809
Project: 58809
Buggy source:
private void clearRemoteLevel(RemoteLevel remoteLevel){
  int iViewID;
  IViewManager viewManager=generalManager.getViewGLCanvasManager();
  AGLEventListener glEventListener=null;
  for (  RemoteLevelElement element : remoteLevel.getAllElements()) {
    iViewID=element.getContainedElementID();
    if (iViewID == -1) {
      continue;
    }
    glEventListener=viewManager.getGLEventListener(iViewID);
    if (glEventListener instanceof GLHeatMap || glEventListener instanceof GLParallelCoordinates) {
      ((AStorageBasedView)glEventListener).resetView();
      if (!glEventListener.isRenderedRemote()) {
        glEventListener.enableBusyMode(false);
      }
    }
 else {
      removeView(glEventListener);
      element.setContainedElementID(-1);
    }
  }
}

Fixed version (ground truth):
private void clearRemoteLevel(RemoteLevel remoteLevel){
  int iViewID;
  IViewManager viewManager=generalManager.getViewGLCanvasManager();
  AGLEventListener glEventListener=null;
  for (  RemoteLevelElement element : remoteLevel.getAllElements()) {
    iViewID=element.getContainedElementID();
    if (iViewID == -1) {
      continue;
    }
    glEventListener=viewManager.getGLEventListener(iViewID);
    if (glEventListener instanceof GLHeatMap || glEventListener instanceof GLParallelCoordinates) {
      ((AStorageBasedView)glEventListener).resetView();
      if (!glEventListener.isRenderedRemote()) {
        glEventListener.enableBusyMode(false);
      }
    }
 else {
      removeView(glEventListener);
      glEventListener.broadcastElements(EVAOperation.REMOVE_ELEMENT);
    }
    element.setContainedElementID(-1);
  }
}
Program: 58811
Project: 58811
Buggy source:
@Override public void run(){
  super.run();
  ClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext(ApplicationConstants.CORE_SPRING_CONFIG_FILE);
  final Dispatcher dispatcher=(Dispatcher)context.getBean("String_Node_Str");
  DownloadJobFilter downloadFilter=new DownloadJobFilter();
  downloadFilter.setAllowedHostNames(new String[]{"String_Node_Str"});
  downloadFilter.setMaxRecursionDepth(2);
  downloadFilter.setSaveToDisk(new String[]{"String_Node_Str"});
  dispatcher.addJobFilter(downloadFilter);
  RegExpJobFilter regExpFilter=new RegExpJobFilter();
  RegExpFilterRule regExpFilterRule=new RegExpJobFilter.RegExpFilterRule("String_Node_Str" + "String_Node_Str");
  RegExpFilterAction regExpFilterAction=new RegExpJobFilter.RegExpFilterAction();
  regExpFilterAction.setAccept(false);
  regExpFilterRule.setMatchAction(regExpFilterAction);
  regExpFilter.addFilterRule(regExpFilterRule);
  dispatcher.addJobFilter(regExpFilter);
  DownloadJobFactory jobFactory=(DownloadJobFactory)context.getBean("String_Node_Str");
  String sOutputFileName=IGeneralManager.CALEYDO_HOME_PATH;
  UrlDownloadJob job=jobFactory.createDownloadJob();
  try {
    job.setUrl(new URL("String_Node_Str"));
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
  job.setSavePath(new File(sOutputFileName));
  job.setIgnoreFilter(true);
  dispatcher.addJob(job);
  processJobs(dispatcher);
  triggerPathwayListGeneration();
  if (triggeringCommand != null) {
    triggeringCommand.setFinishedKeggImageCacher();
  }
}

Fixed version (ground truth):
@Override public void run(){
  super.run();
  ClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext(ApplicationConstants.CORE_SPRING_CONFIG_FILE);
  final Dispatcher dispatcher=(Dispatcher)context.getBean("String_Node_Str");
  DownloadJobFilter downloadFilter=new DownloadJobFilter();
  downloadFilter.setAllowedHostNames(new String[]{"String_Node_Str","String_Node_Str"});
  downloadFilter.setMaxRecursionDepth(2);
  downloadFilter.setSaveToDisk(new String[]{"String_Node_Str"});
  dispatcher.addJobFilter(downloadFilter);
  RegExpJobFilter regExpFilter=new RegExpJobFilter();
  RegExpFilterRule regExpFilterRule=new RegExpJobFilter.RegExpFilterRule("String_Node_Str" + "String_Node_Str");
  RegExpFilterAction regExpFilterAction=new RegExpJobFilter.RegExpFilterAction();
  regExpFilterAction.setAccept(false);
  regExpFilterRule.setMatchAction(regExpFilterAction);
  regExpFilter.addFilterRule(regExpFilterRule);
  dispatcher.addJobFilter(regExpFilter);
  DownloadJobFactory jobFactory=(DownloadJobFactory)context.getBean("String_Node_Str");
  String sOutputFileName=IGeneralManager.CALEYDO_HOME_PATH;
  UrlDownloadJob job=jobFactory.createDownloadJob();
  try {
    job.setUrl(new URL("String_Node_Str"));
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
  job.setSavePath(new File(sOutputFileName));
  job.setIgnoreFilter(true);
  dispatcher.addJob(job);
  processJobs(dispatcher);
  triggerPathwayListGeneration();
  if (triggeringCommand != null) {
    triggeringCommand.setFinishedKeggImageCacher();
  }
}
Program: 58812
Project: 58812
Buggy source:
@Override public synchronized void initData(){
  super.initData();
  initHierarchy();
  calculateTextures();
  initPosCursor();
  bRedrawTextures=true;
}

Fixed version (ground truth):
@Override public synchronized void initData(){
  super.initData();
  initHierarchy();
  calculateTextures();
  initPosCursor();
  glHeatMapView.setSet(set);
  glHeatMapView.initData();
  bRedrawTextures=true;
}
Program: 58813
Project: 58813
Buggy source:
/** 
 * Function responsible for initialization of hierarchy levels. Depending on the amount of samples in the data set 2 or 3 levels are used.
 */
private void initHierarchy(){
  if (set == null)   return;
  createHeatMap();
  iNumberOfElements=set.getVA(iContentVAID).size();
  if (iNumberOfElements < MIN_SAMPLES_PER_HEATMAP) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (iNumberOfElements < 100) {
    bSkipLevel1=true;
    iSelectorBar=1;
    iSamplesPerTexture=iNumberOfElements;
    iSamplesPerHeatmap=(int)Math.floor(iSamplesPerTexture / 3);
  }
 else {
    bSkipLevel1=false;
    iSelectorBar=1;
    iSamplesPerTexture=(int)Math.floor(iNumberOfElements / 5);
    if (iSamplesPerTexture > 250)     iSamplesPerTexture=250;
    iSamplesPerHeatmap=(int)Math.floor(iSamplesPerTexture / 3);
  }
  if (iSamplesPerHeatmap > MAX_SAMPLES_PER_HEATMAP)   iSamplesPerTexture=100;
  if (iSamplesPerHeatmap < MIN_SAMPLES_PER_HEATMAP)   iSamplesPerHeatmap=MIN_SAMPLES_PER_HEATMAP;
}

Fixed version (ground truth):
/** 
 * Function responsible for initialization of hierarchy levels. Depending on the amount of samples in the data set 2 or 3 levels are used.
 */
private void initHierarchy(){
  if (set == null)   return;
  iNumberOfElements=set.getVA(iContentVAID).size();
  if (iNumberOfElements < MIN_SAMPLES_PER_HEATMAP) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (iNumberOfElements < 100) {
    bSkipLevel1=true;
    iSelectorBar=1;
    iSamplesPerTexture=iNumberOfElements;
    iSamplesPerHeatmap=(int)Math.floor(iSamplesPerTexture / 3);
  }
 else {
    bSkipLevel1=false;
    iSelectorBar=1;
    iSamplesPerTexture=(int)Math.floor(iNumberOfElements / 5);
    if (iSamplesPerTexture > 250)     iSamplesPerTexture=250;
    iSamplesPerHeatmap=(int)Math.floor(iSamplesPerTexture / 3);
  }
  if (iSamplesPerHeatmap > MAX_SAMPLES_PER_HEATMAP)   iSamplesPerTexture=100;
  if (iSamplesPerHeatmap < MIN_SAMPLES_PER_HEATMAP)   iSamplesPerHeatmap=MIN_SAMPLES_PER_HEATMAP;
}
Program: 58814
Project: 58814
Buggy source:
/** 
 * Create embedded heatmap, register heatmap as a sender and receiver
 * @param
 */
private void createHeatMap(){
  CmdCreateGLEventListener cmdView=(CmdCreateGLEventListener)generalManager.getCommandManager().createCommandByType(ECommandType.CREATE_GL_HEAT_MAP_3D);
  float fHeatMapHeight=viewFrustum.getHeight();
  float fHeatMapWidth=viewFrustum.getWidth();
  cmdView.setAttributes(EProjectionMode.ORTHOGRAPHIC,0,fHeatMapHeight,0,fHeatMapWidth,-20,20,set,-1);
  cmdView.doCommand();
  glHeatMapView=(GLHeatMap)cmdView.getCreatedObject();
  GeneralManager.get().getUseCase().addView(glHeatMapView);
  glHeatMapView.setUseCase(useCase);
  glHeatMapView.setRenderedRemote(true);
  glHeatMapView.initData();
}

Fixed version (ground truth):
/** 
 * Create embedded heatmap, register heatmap as a sender and receiver
 * @param
 */
private void createHeatMap(){
  CmdCreateGLEventListener cmdView=(CmdCreateGLEventListener)generalManager.getCommandManager().createCommandByType(ECommandType.CREATE_GL_HEAT_MAP_3D);
  float fHeatMapHeight=viewFrustum.getHeight();
  float fHeatMapWidth=viewFrustum.getWidth();
  cmdView.setAttributes(EProjectionMode.ORTHOGRAPHIC,0,fHeatMapHeight,0,fHeatMapWidth,-20,20,set,-1);
  cmdView.doCommand();
  glHeatMapView=(GLHeatMap)cmdView.getCreatedObject();
  GeneralManager.get().getUseCase().addView(glHeatMapView);
  glHeatMapView.setUseCase(useCase);
  glHeatMapView.setRenderedRemote(true);
}
Program: 58815
Project: 58815
Buggy source:
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLHierarchicalHeatMap(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum);
  viewType=EManagedObjectType.GL_HIER_HEAT_MAP;
  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).build();
  storageSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPERIMENT_INDEX).build();
  colorMapper=ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION);
  fAlXDistances=new ArrayList<Float>();
  bUseClusteredVA=false;
  glKeyListener=new GLHierarchicalHeatMapKeyListener(this);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLHierarchicalHeatMap(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum);
  viewType=EManagedObjectType.GL_HIER_HEAT_MAP;
  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).build();
  storageSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPERIMENT_INDEX).build();
  colorMapper=ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION);
  fAlXDistances=new ArrayList<Float>();
  bUseClusteredVA=false;
  glKeyListener=new GLHierarchicalHeatMapKeyListener(this);
  createHeatMap();
}
Program: 58816
Project: 58816
Buggy source:
@Override public void createPartControl(Composite parent){
  super.createPartControl(parent);
  createGLCanvas();
  if (Application.applicationMode != EApplicationMode.PATHWAY_VIEWER) {
    try {
      GeneralManager.get().getIDManager().getInternalFromExternalID(453010);
      AGLEventListener glyph1=createGLEventListener(ECommandType.CREATE_GL_GLYPH,-1,true);
      iAlContainedViewIDs.add(glyph1.getID());
      AGLEventListener glyph2=createGLEventListener(ECommandType.CREATE_GL_GLYPH,-1,true);
      iAlContainedViewIDs.add(glyph2.getID());
    }
 catch (    IllegalArgumentException e) {
      GeneralManager.get().getLogger().log(Level.WARNING,"String_Node_Str");
    }
  }
  GLRemoteRendering bucket=(GLRemoteRendering)createGLRemoteEventListener(ECommandType.CREATE_GL_BUCKET_3D,glCanvas.getID(),true,iAlContainedViewIDs);
  SerializedHeatMapView heatMap=new SerializedHeatMapView();
  bucket.addInitialRemoteView(heatMap);
  SerializedParallelCoordinatesView parCoords=new SerializedParallelCoordinatesView();
  bucket.addInitialRemoteView(parCoords);
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  super.createPartControl(parent);
  createGLCanvas();
  if (Application.applicationMode != EApplicationMode.PATHWAY_VIEWER) {
    try {
      GeneralManager.get().getIDManager().getInternalFromExternalID(453010);
      AGLEventListener glyph1=createGLEventListener(ECommandType.CREATE_GL_GLYPH,-1,true);
      iAlContainedViewIDs.add(glyph1.getID());
      AGLEventListener glyph2=createGLEventListener(ECommandType.CREATE_GL_GLYPH,-1,true);
      iAlContainedViewIDs.add(glyph2.getID());
    }
 catch (    IllegalArgumentException e) {
      GeneralManager.get().getLogger().log(Level.WARNING,"String_Node_Str");
    }
  }
  GLRemoteRendering bucket=(GLRemoteRendering)createGLRemoteEventListener(ECommandType.CREATE_GL_BUCKET_3D,glCanvas.getID(),true,iAlContainedViewIDs);
  if (Application.applicationMode != EApplicationMode.PATHWAY_VIEWER) {
    SerializedHeatMapView heatMap=new SerializedHeatMapView();
    bucket.addInitialRemoteView(heatMap);
    SerializedParallelCoordinatesView parCoords=new SerializedParallelCoordinatesView();
    bucket.addInitialRemoteView(parCoords);
  }
}
Program: 58817
Project: 58817
Buggy source:
@Override public IWizardPage getNextPage(IWizardPage page){
  if (page instanceof NewOrExistingProjectPage) {
    if (((NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME)).getProjectType() == EProjectType.NEW_PROJECT) {
      NewProjectImportDataPage nextPage=(NewProjectImportDataPage)getPage(NewProjectImportDataPage.PAGE_NAME);
      nextPage.setPageComplete(true);
      return nextPage;
    }
 else     if (((NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME)).getProjectType() == EProjectType.EXISTING_PROJECT) {
      FileOpenProjectAction fileOpenProjectAction=new FileOpenProjectAction(this.getShell());
      fileOpenProjectAction.run();
      this.performFinish();
    }
 else     if (((NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME)).getProjectType() == EProjectType.SAMPLE_DATA_RANDOM) {
    }
 else     if (((NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME)).getProjectType() == EProjectType.SAMPLE_DATA_REAL) {
    }
 else     if (((NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME)).getProjectType() == EProjectType.PATHWAY_VIEWER_MODE) {
      for (      AGLEventListener glEventListener : GeneralManager.get().getViewGLCanvasManager().getAllGLEventListeners()) {
        if (glEventListener instanceof GLHeatMap || glEventListener instanceof GLParallelCoordinates) {
          GeneralManager.get().getViewGLCanvasManager().unregisterGLEventListener(glEventListener);
        }
      }
      this.performFinish();
    }
  }
  return page;
}

Fixed version (ground truth):
@Override public IWizardPage getNextPage(IWizardPage page){
  if (page instanceof NewOrExistingProjectPage) {
    if (((NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME)).getProjectType() == EProjectType.NEW_PROJECT) {
      NewProjectImportDataPage nextPage=(NewProjectImportDataPage)getPage(NewProjectImportDataPage.PAGE_NAME);
      nextPage.setPageComplete(true);
      return nextPage;
    }
 else     if (((NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME)).getProjectType() == EProjectType.EXISTING_PROJECT) {
      FileOpenProjectAction fileOpenProjectAction=new FileOpenProjectAction(this.getShell());
      fileOpenProjectAction.run();
      this.performFinish();
    }
 else     if (((NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME)).getProjectType() == EProjectType.SAMPLE_DATA_RANDOM) {
    }
 else     if (((NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME)).getProjectType() == EProjectType.SAMPLE_DATA_REAL) {
    }
  }
  return page;
}
Program: 58818
Project: 58818
Buggy source:
@Override public boolean performFinish(){
  if (((NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME)).isPageComplete()) {
    NewOrExistingProjectPage page=(NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME);
    IUseCase useCase;
    if (page.getUseCaseMode() == EUseCaseMode.GENETIC_DATA) {
      useCase=new GeneticUseCase();
      if (page.getProjectType() == EProjectType.PATHWAY_VIEWER_MODE) {
        Application.applicationMode=EApplicationMode.PATHWAY_VIEWER;
      }
 else       if (page.getProjectType() == EProjectType.SAMPLE_DATA_RANDOM) {
        Application.applicationMode=EApplicationMode.SAMPLE_DATA_RANDOM;
      }
 else       if (page.getProjectType() == EProjectType.SAMPLE_DATA_REAL) {
        Application.applicationMode=EApplicationMode.SAMPLE_DATA_REAL;
      }
 else       if (page.getProjectType() == EProjectType.NEW_PROJECT) {
        Application.applicationMode=EApplicationMode.STANDARD;
      }
    }
 else     if (page.getUseCaseMode() == EUseCaseMode.UNSPECIFIED_DATA) {
      useCase=new UnspecifiedUseCase();
    }
 else     throw new IllegalStateException("String_Node_Str");
    GeneralManager.get().setUseCase(useCase);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  if (((NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME)).isPageComplete()) {
    NewOrExistingProjectPage page=(NewOrExistingProjectPage)getPage(NewOrExistingProjectPage.PAGE_NAME);
    IUseCase useCase;
    if (page.getUseCaseMode() == EUseCaseMode.GENETIC_DATA) {
      useCase=new GeneticUseCase();
      if (page.getProjectType() == EProjectType.SAMPLE_DATA_RANDOM) {
        Application.applicationMode=EApplicationMode.SAMPLE_DATA_RANDOM;
      }
 else       if (page.getProjectType() == EProjectType.SAMPLE_DATA_REAL) {
        Application.applicationMode=EApplicationMode.SAMPLE_DATA_REAL;
      }
 else       if (page.getProjectType() == EProjectType.NEW_PROJECT) {
        Application.applicationMode=EApplicationMode.STANDARD;
      }
    }
 else     if (page.getUseCaseMode() == EUseCaseMode.UNSPECIFIED_DATA) {
      useCase=new UnspecifiedUseCase();
    }
 else     throw new IllegalStateException("String_Node_Str");
    GeneralManager.get().setUseCase(useCase);
    return true;
  }
  return false;
}
Program: 58820
Project: 58820
Buggy source:
public <KeyType,ValueType>ValueType getID(EMappingType type,KeyType key);

Fixed version (ground truth):
/** 
 * Returns the mapped ID of type ValueType or null if no such mapping exists.
 * @param < KeyType > the type of the key used in the mapping
 * @param < ValueType > the type of the value used in the mapping
 * @param type the mapping type, specifying the actual relationship between key and value
 * @param key the key for which the mapping is requested
 * @return the value, or null if no such mapping exists
 */
public <KeyType,ValueType>ValueType getID(EMappingType type,KeyType key);
Program: 58821
Project: 58821
Buggy source:
public int getRefSeqFromStorageIndex(int index){
  Integer iRefSeqID=idMappingManager.getID(EMappingType.EXPRESSION_INDEX_2_REFSEQ_MRNA_INT,index);
  if (iRefSeqID == null)   return -1;
  return iRefSeqID;
}

Fixed version (ground truth):
/** 
 * Converts a storage index to a refSeq int. Returns -1 if no mapping can be found.
 * @param index The index in the storage which should be converted to a refseq
 * @return the int representation of a refseq, or -1 if no mapping was found
 */
public int getRefSeqFromStorageIndex(int index){
  Integer iRefSeqID=idMappingManager.getID(EMappingType.EXPRESSION_INDEX_2_REFSEQ_MRNA_INT,index);
  if (iRefSeqID == null)   return -1;
  return iRefSeqID;
}
Program: 58822
Project: 58822
Buggy source:
public PathwayVertexGraphItem convertGeneIDToPathwayVertex(EIDType idType,int geneID){
  int iGraphItemID=0;
  Integer iDavidID=-1;
  if (idType == EIDType.REFSEQ_MRNA_INT) {
    iDavidID=GeneralManager.get().getIDMappingManager().getID(EMappingType.REFSEQ_MRNA_INT_2_DAVID,geneID);
  }
 else   if (idType == EIDType.DAVID) {
    iDavidID=geneID;
  }
 else   return null;
  if (iDavidID == null || iDavidID == -1)   throw new IllegalStateException("String_Node_Str");
  iGraphItemID=GeneralManager.get().getPathwayItemManager().getPathwayVertexGraphItemIdByDavidId(iDavidID);
  if (iGraphItemID == -1) {
    return null;
  }
  return (PathwayVertexGraphItem)GeneralManager.get().getPathwayItemManager().getItem(iGraphItemID);
}

Fixed version (ground truth):
/** 
 * TODO: Marc document
 * @param idType
 * @param geneID
 * @return the PathwayVertexGraphItem corresponding to the mapping or null if no such mapping exists
 */
public PathwayVertexGraphItem convertGeneIDToPathwayVertex(EIDType idType,int geneID){
  int iGraphItemID=0;
  Integer iDavidID=-1;
  if (idType == EIDType.REFSEQ_MRNA_INT) {
    iDavidID=GeneralManager.get().getIDMappingManager().getID(EMappingType.REFSEQ_MRNA_INT_2_DAVID,geneID);
  }
 else   if (idType == EIDType.DAVID) {
    iDavidID=geneID;
  }
 else   return null;
  if (iDavidID == null || iDavidID == -1)   throw new IllegalStateException("String_Node_Str");
  iGraphItemID=GeneralManager.get().getPathwayItemManager().getPathwayVertexGraphItemIdByDavidId(iDavidID);
  if (iGraphItemID == -1) {
    return null;
  }
  return (PathwayVertexGraphItem)GeneralManager.get().getPathwayItemManager().getItem(iGraphItemID);
}
Program: 58823
Project: 58823
Buggy source:
public String getRefSeqStringFromStorageIndex(int iIndex){
  int iRefSeqID=getRefSeqFromStorageIndex(iIndex);
  return idMappingManager.getID(EMappingType.REFSEQ_MRNA_INT_2_REFSEQ_MRNA,iRefSeqID);
}

Fixed version (ground truth):
/** 
 * Returns the refSeq String mapped to a storage index, or null if no string was found
 * @param index the storage index for which the mapping is requested
 * @return the String containing the refSeq, or null if no such mapping existed.
 */
public String getRefSeqStringFromStorageIndex(int index){
  int iRefSeqID=getRefSeqFromStorageIndex(index);
  return idMappingManager.getID(EMappingType.REFSEQ_MRNA_INT_2_REFSEQ_MRNA,iRefSeqID);
}
Program: 58824
Project: 58824
Buggy source:
public Set<PathwayGraph> getPathwayGraphsByGeneID(EIDType idType,int geneID){
  Set<PathwayGraph> newPathways=new HashSet<PathwayGraph>();
  PathwayVertexGraphItem pathwayVertexGraphItem=convertGeneIDToPathwayVertex(idType,geneID);
  List<IGraphItem> pathwayItems=pathwayVertexGraphItem.getAllItemsByProp(EGraphItemProperty.ALIAS_CHILD);
  for (  IGraphItem pathwayItem : pathwayItems) {
    PathwayGraph pathwayGraph=(PathwayGraph)pathwayItem.getAllGraphByType(EGraphItemHierarchy.GRAPH_PARENT).get(0);
    newPathways.add(pathwayGraph);
  }
  return newPathways;
}

Fixed version (ground truth):
/** 
 * TODO
 * @param idType
 * @param geneID
 * @return a Set of PathwayGraphs or null if no such mapping exists
 */
public Set<PathwayGraph> getPathwayGraphsByGeneID(EIDType idType,int geneID){
  Set<PathwayGraph> newPathways=new HashSet<PathwayGraph>();
  PathwayVertexGraphItem pathwayVertexGraphItem=convertGeneIDToPathwayVertex(idType,geneID);
  if (pathwayVertexGraphItem == null)   return null;
  List<IGraphItem> pathwayItems=pathwayVertexGraphItem.getAllItemsByProp(EGraphItemProperty.ALIAS_CHILD);
  for (  IGraphItem pathwayItem : pathwayItems) {
    PathwayGraph pathwayGraph=(PathwayGraph)pathwayItem.getAllGraphByType(EGraphItemHierarchy.GRAPH_PARENT).get(0);
    newPathways.add(pathwayGraph);
  }
  return newPathways;
}
Program: 58825
Project: 58825
Buggy source:
public int getDavidIDFromStorageIndex(int index){
  int refSeq=getRefSeqFromStorageIndex(index);
  Integer david=idMappingManager.getID(EMappingType.REFSEQ_MRNA_INT_2_DAVID,refSeq);
  if (david == null)   return -1;
  return david;
}

Fixed version (ground truth):
/** 
 * Converts a storage index to a david ID. Returns the david ID or -1 if no mapping was found.
 * @param index The index in the storage which should be converted to a refSeq
 * @return the int representation of a david ID, or -1 if no mapping was found
 */
public int getDavidIDFromStorageIndex(int index){
  int refSeq=getRefSeqFromStorageIndex(index);
  Integer david=idMappingManager.getID(EMappingType.REFSEQ_MRNA_INT_2_DAVID,refSeq);
  if (david == null)   return -1;
  return david;
}
Program: 58826
Project: 58826
Buggy source:
@Override public void handleEvent(AEvent event){
  if (event instanceof LoadPathwaysByGeneEvent) {
    LoadPathwaysByGeneEvent loadEvent=(LoadPathwaysByGeneEvent)event;
    if (loadEvent.getIdType() == EIDType.DAVID || loadEvent.getIdType() == EIDType.REFSEQ_MRNA_INT) {
      handler.loadDependentPathways(GeneticIDMappingHelper.get().getPathwayGraphsByGeneID(loadEvent.getIdType(),loadEvent.getGeneID()));
    }
 else     throw new IllegalStateException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void handleEvent(AEvent event){
  if (event instanceof LoadPathwaysByGeneEvent) {
    LoadPathwaysByGeneEvent loadEvent=(LoadPathwaysByGeneEvent)event;
    if (loadEvent.getIdType() == EIDType.DAVID || loadEvent.getIdType() == EIDType.REFSEQ_MRNA_INT) {
      Set<PathwayGraph> pathwayGraphs=GeneticIDMappingHelper.get().getPathwayGraphsByGeneID(loadEvent.getIdType(),loadEvent.getGeneID());
      if (pathwayGraphs == null) {
        GeneralManager.get().getLogger().log(Level.WARNING,"String_Node_Str");
        return;
      }
      handler.loadDependentPathways(pathwayGraphs);
    }
 else     throw new IllegalStateException("String_Node_Str");
  }
}
Program: 58827
Project: 58827
Buggy source:
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLHeatMap(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum);
  viewType=EManagedObjectType.GL_HEAT_MAP;
  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).build();
  storageSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPERIMENT_INDEX).build();
  colorMapper=ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION);
  fAlXDistances=new ArrayList<Float>();
  glKeyListener=new GLHeatMapKeyListener(this);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLHeatMap(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum);
  viewType=EManagedObjectType.GL_HEAT_MAP;
  contentSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPRESSION_INDEX).build();
  storageSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPERIMENT_INDEX).build();
  colorMapper=ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION);
  fAlXDistances=new ArrayList<Float>();
  glKeyListener=new GLHeatMapKeyListener(this);
}
Program: 58829
Project: 58829
Buggy source:
private float[] determineNodeColor(PathwayVertexGraphItemRep vertexRep){
  int iDavidID=generalManager.getPathwayItemManager().getDavidIdByPathwayVertexGraphItemId(vertexRep.getAllItemsByProp(EGraphItemProperty.ALIAS_PARENT).get(0).getId());
  if (iDavidID == -1 || iDavidID == 0) {
    generalManager.getLogger().log(new Status(Status.WARNING,GeneralManager.PLUGIN_ID,"String_Node_Str"));
  }
 else {
    Set<Integer> iSetRefSeq=idMappingManager.getMultiID(EMappingType.DAVID_2_REFSEQ_MRNA_INT,iDavidID);
    if (iSetRefSeq == null) {
      generalManager.getLogger().log(new Status(Status.ERROR,GeneralManager.PLUGIN_ID,"String_Node_Str" + iDavidID));
    }
 else {
      if (iSetRefSeq.size() > 1)       return new float[]{0,1,1};
      for (      Object iRefSeqID : iSetRefSeq) {
        if (idMappingManager.getMultiID(EMappingType.REFSEQ_MRNA_INT_2_EXPRESSION_INDEX,((Integer)iRefSeqID)) == null) {
          break;
        }
        for (        Object iExpressionIndex : idMappingManager.getMultiID(EMappingType.REFSEQ_MRNA_INT_2_EXPRESSION_INDEX,((Integer)iRefSeqID))) {
          return colorMapper.getColor(glPathwayView.getSet().get(glPathwayView.iCurrentStorageIndex).getFloat(EDataRepresentation.NORMALIZED,((Integer)iExpressionIndex).intValue()));
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private float[] determineNodeColor(PathwayVertexGraphItemRep vertexRep){
  int iDavidID=generalManager.getPathwayItemManager().getDavidIdByPathwayVertexGraphItemId(vertexRep.getAllItemsByProp(EGraphItemProperty.ALIAS_PARENT).get(0).getId());
  if (iDavidID == -1 || iDavidID == 0) {
    generalManager.getLogger().log(new Status(Status.WARNING,GeneralManager.PLUGIN_ID,"String_Node_Str"));
  }
 else {
    Set<Integer> iSetRefSeq=idMappingManager.getMultiID(EMappingType.DAVID_2_REFSEQ_MRNA_INT,iDavidID);
    if (iSetRefSeq == null) {
    }
 else {
      if (iSetRefSeq.size() > 1)       return new float[]{0,1,1};
      for (      Object iRefSeqID : iSetRefSeq) {
        if (idMappingManager.getMultiID(EMappingType.REFSEQ_MRNA_INT_2_EXPRESSION_INDEX,((Integer)iRefSeqID)) == null) {
          break;
        }
        for (        Object iExpressionIndex : idMappingManager.getMultiID(EMappingType.REFSEQ_MRNA_INT_2_EXPRESSION_INDEX,((Integer)iRefSeqID))) {
          return colorMapper.getColor(glPathwayView.getSet().get(glPathwayView.iCurrentStorageIndex).getFloat(EDataRepresentation.NORMALIZED,((Integer)iExpressionIndex).intValue()));
        }
      }
    }
  }
  return null;
}
Program: 58831
Project: 58831
Buggy source:
public void run(){
  if (!checkInternetConnection())   return;
  int iItemsToLoad=0;
  for (  SelectionDeltaItem selectionDeltaItem : selectionDelta) {
    if (selectionDeltaItem.getSelectionType() == ESelectionType.MOUSE_OVER || selectionDeltaItem.getSelectionType() == ESelectionType.SELECTION) {
      Integer iRefSeqID=generalManager.getIDMappingManager().getID(EMappingType.EXPRESSION_INDEX_2_REFSEQ_MRNA_INT,selectionDeltaItem.getPrimaryID());
      String sRefSeqID=generalManager.getIDMappingManager().getID(EMappingType.REFSEQ_MRNA_INT_2_REFSEQ_MRNA,iRefSeqID);
      Integer iDavidID=generalManager.getIDMappingManager().getID(EMappingType.REFSEQ_MRNA_INT_2_DAVID,selectionDeltaItem.getPrimaryID());
      if (iItemsToLoad == 0) {
        String sURL=urlGenerator.createURL(eBrowserQueryType,iDavidID);
        browser.setUrl(sURL);
        browser.update();
        textURL.setText(sURL);
        iAlDavidID.clear();
      }
      String sOutput="String_Node_Str";
      sOutput=sOutput + generalManager.getIDMappingManager().getID(EMappingType.DAVID_2_GENE_SYMBOL,iDavidID);
      sOutput=sOutput + "String_Node_Str";
      sOutput=sOutput + sRefSeqID;
      if (iAlDavidID.contains(selectionDeltaItem.getPrimaryID())) {
        continue;
      }
      iAlDavidID.add(iDavidID);
      iItemsToLoad++;
    }
  }
}

Fixed version (ground truth):
public void run(){
  if (!checkInternetConnection())   return;
  int iItemsToLoad=0;
  for (  SelectionDeltaItem selectionDeltaItem : selectionDelta) {
    if (selectionDeltaItem.getSelectionType() == ESelectionType.MOUSE_OVER || selectionDeltaItem.getSelectionType() == ESelectionType.SELECTION) {
      Integer iRefSeqID=generalManager.getIDMappingManager().getID(EMappingType.EXPRESSION_INDEX_2_REFSEQ_MRNA_INT,selectionDeltaItem.getPrimaryID());
      String sRefSeqID=generalManager.getIDMappingManager().getID(EMappingType.REFSEQ_MRNA_INT_2_REFSEQ_MRNA,iRefSeqID);
      Integer iDavidID=generalManager.getIDMappingManager().getID(EMappingType.REFSEQ_MRNA_INT_2_DAVID,iRefSeqID);
      if (iDavidID == null)       continue;
      if (iItemsToLoad == 0) {
        String sURL=urlGenerator.createURL(eBrowserQueryType,iDavidID);
        browser.setUrl(sURL);
        browser.update();
        textURL.setText(sURL);
        iAlDavidID.clear();
      }
      String sOutput="String_Node_Str";
      sOutput=sOutput + generalManager.getIDMappingManager().getID(EMappingType.DAVID_2_GENE_SYMBOL,iDavidID);
      sOutput=sOutput + "String_Node_Str";
      sOutput=sOutput + sRefSeqID;
      if (iAlDavidID.contains(selectionDeltaItem.getPrimaryID())) {
        continue;
      }
      iAlDavidID.add(iDavidID);
      iItemsToLoad++;
    }
  }
}
Program: 58832
Project: 58832
Buggy source:
private boolean triggerSearchResult(int iDavidID){
  Set<Integer> iSetRefSeq=generalManager.getIDMappingManager().getMultiID(EMappingType.DAVID_2_REFSEQ_MRNA_INT,iDavidID);
  if (iSetRefSeq == null) {
    generalManager.getLogger().log(new Status(Status.ERROR,GeneralManager.PLUGIN_ID,"String_Node_Str" + iDavidID));
    return false;
  }
  ISelectionDelta selectionDelta=new SelectionDelta(EIDType.REFSEQ_MRNA_INT);
  for (  Object iRefSeqID : iSetRefSeq) {
    selectionDelta.add(new SelectionDeltaItem((Integer)iRefSeqID,ESelectionType.SELECTION));
  }
  SelectionCommand command=new SelectionCommand(ESelectionCommandType.CLEAR,ESelectionType.SELECTION);
  sendSelectionCommandEvent(EIDType.EXPRESSION_INDEX,command);
  SelectionUpdateEvent event=new SelectionUpdateEvent();
  event.setSender(this);
  event.setSelectionDelta(selectionDelta);
  eventPublisher.triggerEvent(event);
  return true;
}

Fixed version (ground truth):
private boolean triggerSearchResult(int iDavidID){
  Set<Integer> iSetRefSeq=generalManager.getIDMappingManager().getMultiID(EMappingType.DAVID_2_REFSEQ_MRNA_INT,iDavidID);
  if (iSetRefSeq == null) {
    return false;
  }
  ISelectionDelta selectionDelta=new SelectionDelta(EIDType.REFSEQ_MRNA_INT);
  for (  Object iRefSeqID : iSetRefSeq) {
    selectionDelta.add(new SelectionDeltaItem((Integer)iRefSeqID,ESelectionType.SELECTION));
  }
  SelectionCommand command=new SelectionCommand(ESelectionCommandType.CLEAR,ESelectionType.SELECTION);
  sendSelectionCommandEvent(EIDType.EXPRESSION_INDEX,command);
  SelectionUpdateEvent event=new SelectionUpdateEvent();
  event.setSender(this);
  event.setSelectionDelta(selectionDelta);
  eventPublisher.triggerEvent(event);
  return true;
}
Program: 58833
Project: 58833
Buggy source:
/** 
 * Returns the external ID (the id with which you initialized getPickingID()) when you provide the picking ID and the id of the view.
 * @param viewID the id of the view which has to be the same which was used when the picking id was created
 * @param pickingID the picking ID of which the external id mapping is desired
 * @return the external ID, null if no entry for that pickingID
 */
private Integer getExternalIDFromPickingID(int viewID,int pickingID){
  return hashViewIDToViewSpecificPickingIDContainer.get(viewID).getExternalID(pickingID);
}

Fixed version (ground truth):
/** 
 * Returns the external ID (the id with which you initialized getPickingID()) when you provide the picking ID and the id of the view.
 * @param viewID the id of the view which has to be the same which was used when the picking id was created
 * @param pickingID the picking ID of which the external id mapping is desired
 * @return the external ID, null if no entry for that pickingID
 */
private Integer getExternalIDFromPickingID(int viewID,EPickingType pickingType,int pickingID){
  return hashViewIDToViewSpecificPickingIDContainer.get(viewID).getExternalID(pickingType,pickingID);
}
Program: 58834
Project: 58834
Buggy source:
/** 
 * Returns the external ID associated with the provided pickingID
 * @param pickingID
 * @return the externalID
 */
public Integer getExternalID(Integer pickingID){
  return hashPickingIDToExternalID.get(pickingID);
}

Fixed version (ground truth):
/** 
 * Returns the external ID associated with the provided pickingID and pickingType or null if no such mapping exists
 * @param pickingID
 * @param pickingType
 * @return the externalID or null
 */
public Integer getExternalID(EPickingType pickingType,Integer pickingID){
  HashMap<Integer,Integer> hashMap=hashTypeToPickingIDToExternalID.get(pickingType);
  if (hashMap == null)   return null;
  return hashMap.get(pickingID);
}
Program: 58835
Project: 58835
Buggy source:
/** 
 * Add a new pickingID and its corresponding externalID
 * @param pickingID
 * @param externalID
 */
public void put(Integer pickingID,Integer externalID){
  hashPickingIDToExternalID.put(pickingID,externalID);
  hashExternaldIDToPickingID.put(externalID,pickingID);
}

Fixed version (ground truth):
/** 
 * Add a new pickingID and its corresponding externalID
 * @param pickingID
 * @param externalID
 */
public void put(EPickingType pickingType,Integer pickingID,Integer externalID){
  HashMap<Integer,Integer> hashPickingIDToExternalID=hashTypeToPickingIDToExternalID.get(pickingType);
  if (hashPickingIDToExternalID == null) {
    hashPickingIDToExternalID=new HashMap<Integer,Integer>();
    hashTypeToPickingIDToExternalID.put(pickingType,hashPickingIDToExternalID);
  }
  hashPickingIDToExternalID.put(pickingID,externalID);
  HashMap<Integer,Integer> hashExternaldIDToPickingID=hashTypeToExternaldIDToPickingID.get(pickingType);
  if (hashExternaldIDToPickingID == null) {
    hashExternaldIDToPickingID=new HashMap<Integer,Integer>();
    hashTypeToExternaldIDToPickingID.put(pickingType,hashExternaldIDToPickingID);
  }
  hashExternaldIDToPickingID.put(externalID,pickingID);
}
Program: 58836
Project: 58836
Buggy source:
/** 
 * Returns a unique picking ID which can be used for the glPushName() commands. The returned id is mapped to the provided externalID which is intended to be used by the caller internally. external id
 * @param iViewID the ID of the calling view
 * @param ePickingType the type of the pick
 * @param iExternalID an arbitrary integer which helps the client of the manager to determine which element was picked
 * @return the picking id, use {@link #getExternalIDFromPickingID(int,int)} to retrieve the correspondingexternal id
 */
public int getPickingID(int iViewID,EPickingType ePickingType,int iExternalID){
  ViewSpecificPickingIDContainer pickingIDContainer=hashViewIDToViewSpecificPickingIDContainer.get(iViewID);
  if (pickingIDContainer == null) {
    pickingIDContainer=new ViewSpecificPickingIDContainer();
    hashViewIDToViewSpecificPickingIDContainer.put(iViewID,pickingIDContainer);
  }
  Integer pickingID=pickingIDContainer.getPickingID(iExternalID);
  if (pickingID == null)   pickingID=calculateID();
  pickingIDContainer.put(pickingID,iExternalID);
  hashPickingIDToViewID.put(pickingID,new Pair<Integer,EPickingType>(iViewID,ePickingType));
  return pickingID;
}

Fixed version (ground truth):
/** 
 * Returns a unique picking ID which can be used for the glPushName() commands. The returned id is mapped to the provided externalID which is intended to be used by the caller internally. external id
 * @param iViewID the ID of the calling view
 * @param ePickingType the type of the pick
 * @param iExternalID an arbitrary integer which helps the client of the manager to determine which element was picked
 * @return the picking id, use {@link #getExternalIDFromPickingID(int,int)} to retrieve the correspondingexternal id
 */
public int getPickingID(int iViewID,EPickingType ePickingType,int iExternalID){
  ViewSpecificPickingIDContainer pickingIDContainer=hashViewIDToViewSpecificPickingIDContainer.get(iViewID);
  if (pickingIDContainer == null) {
    pickingIDContainer=new ViewSpecificPickingIDContainer();
    hashViewIDToViewSpecificPickingIDContainer.put(iViewID,pickingIDContainer);
  }
  Integer pickingID=pickingIDContainer.getPickingID(ePickingType,iExternalID);
  if (pickingID == null)   pickingID=calculateID();
  pickingIDContainer.put(ePickingType,pickingID,iExternalID);
  hashPickingIDToViewID.put(pickingID,new Pair<Integer,EPickingType>(iViewID,ePickingType));
  return pickingID;
}
Program: 58837
Project: 58837
Buggy source:
/** 
 * Returns all pickingIDs stored in the container
 * @return all picking IDs
 */
public Set<Integer> getAllPickingIDs(){
  return hashPickingIDToExternalID.keySet();
}

Fixed version (ground truth):
/** 
 * Returns all pickingIDs stored in the container
 * @return all picking IDs
 */
public Set<Integer> getAllPickingIDs(){
  Set<Integer> set=new HashSet<Integer>();
  for (  EPickingType type : hashTypeToPickingIDToExternalID.keySet()) {
    set.addAll(hashTypeToPickingIDToExternalID.get(type).keySet());
  }
  return set;
}
Program: 58838
Project: 58838
Buggy source:
public ViewSpecificPickingIDContainer(){
  hashPickingIDToExternalID=new HashMap<Integer,Integer>();
  hashExternaldIDToPickingID=new HashMap<Integer,Integer>();
}

Fixed version (ground truth):
public ViewSpecificPickingIDContainer(){
  hashTypeToPickingIDToExternalID=new EnumMap<EPickingType,HashMap<Integer,Integer>>(EPickingType.class);
  hashTypeToExternaldIDToPickingID=new EnumMap<EPickingType,HashMap<Integer,Integer>>(EPickingType.class);
}
Program: 58839
Project: 58839
Buggy source:
/** 
 * Given the list of picking IDs which where hit it maps the picking ID to the view and stores it in the hit list
 * @param alPickingIDs
 * @param myMode
 * @param pickedPoint
 * @param dragStartPoint
 */
private void processPicks(ArrayList<Integer> alPickingIDs,EPickingMode myMode,Point pickedPoint,Point dragStartPoint){
  for (  int pickingID : alPickingIDs) {
    Pair<Integer,EPickingType> pickAssociatedValues=hashPickingIDToViewID.get(pickingID);
    EPickingType eType=pickAssociatedValues.getSecond();
    int viewIDToUse=pickAssociatedValues.getFirst();
    Pick pick=new Pick(getExternalIDFromPickingID(viewIDToUse,pickingID),myMode,pickedPoint,dragStartPoint,fMinimumZValue);
    ViewSpecificHitListContainer hitContainer=hashViewIDToViewSpecificHitListContainer.get(viewIDToUse);
    if (hitContainer == null) {
      hitContainer=new ViewSpecificHitListContainer();
      hashViewIDToViewSpecificHitListContainer.put(viewIDToUse,hitContainer);
    }
    hitContainer.addPicksForPickingType(eType,pick);
  }
}

Fixed version (ground truth):
/** 
 * Given the list of picking IDs which where hit it maps the picking ID to the view and stores it in the hit list
 * @param alPickingIDs
 * @param myMode
 * @param pickedPoint
 * @param dragStartPoint
 */
private void processPicks(ArrayList<Integer> alPickingIDs,EPickingMode myMode,Point pickedPoint,Point dragStartPoint){
  for (  int pickingID : alPickingIDs) {
    Pair<Integer,EPickingType> pickAssociatedValues=hashPickingIDToViewID.get(pickingID);
    EPickingType eType=pickAssociatedValues.getSecond();
    int viewIDToUse=pickAssociatedValues.getFirst();
    Pick pick=new Pick(getExternalIDFromPickingID(viewIDToUse,eType,pickingID),myMode,pickedPoint,dragStartPoint,fMinimumZValue);
    ViewSpecificHitListContainer hitContainer=hashViewIDToViewSpecificHitListContainer.get(viewIDToUse);
    if (hitContainer == null) {
      hitContainer=new ViewSpecificHitListContainer();
      hashViewIDToViewSpecificHitListContainer.put(viewIDToUse,hitContainer);
    }
    hitContainer.addPicksForPickingType(eType,pick);
  }
}
Program: 58840
Project: 58840
Buggy source:
/** 
 * Removes all elements and sets the element counter to 0 Removes all elements in selectionDelta. Sets virtual array to null
 */
public void resetSelectionManager(){
  hashSelectionTypes.clear();
  for (  ESelectionType eType : alSelectionTypes) {
    hashSelectionTypes.put(eType,new HashMap<Integer,Integer>());
  }
  if (virtualArray != null) {
    virtualArray=null;
  }
  selectionDelta=new SelectionDelta(internalIDType);
}

Fixed version (ground truth):
/** 
 * Removes all elements and sets the element counter to 0 Removes all elements in selectionDelta. Sets virtual array to null
 */
public void resetSelectionManager(){
  hashSelectionTypes.clear();
  for (  ESelectionType eType : alSelectionTypes) {
    hashSelectionTypes.put(eType,new HashMap<Integer,Integer>());
  }
  if (virtualArray != null) {
    virtualArray.clear();
  }
  selectionDelta=new SelectionDelta(internalIDType);
}