nus-yam/ex-repair huggingface dataset:
Program: 58184
Project: 58184
Buggy source:
@SuppressWarnings("String_Node_Str") public MetaSet(Set originalSet,Tree<ClusterNode> storageTree,ClusterNode storageTreeRoot){
  init();
  this.iUniqueID=GeneralManager.get().getIDManager().createID(EManagedObjectType.SET);
  this.isSetHomogeneous=true;
  this.externalDataRep=originalSet.getExternalDataRep();
  this.hashContentData=(HashMap<ContentVAType,ContentData>)originalSet.hashContentData.clone();
  defaultStorageData.setStorageTree(storageTree);
  defaultStorageData.setStorageTreeRoot(storageTreeRoot);
  hashStorageData.put(StorageVAType.STORAGE,defaultStorageData.clone());
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public MetaSet(Set originalSet,Tree<ClusterNode> storageTree,ClusterNode storageTreeRoot){
  super(originalSet.getDataDomain());
  init();
  this.iUniqueID=GeneralManager.get().getIDManager().createID(EManagedObjectType.SET);
  this.isSetHomogeneous=true;
  this.externalDataRep=originalSet.getExternalDataRep();
  this.hashContentData=(HashMap<ContentVAType,ContentData>)originalSet.hashContentData.clone();
  defaultStorageData.setStorageTree(storageTree);
  defaultStorageData.setStorageTreeRoot(storageTreeRoot);
  hashStorageData.put(StorageVAType.STORAGE,defaultStorageData.clone());
}
Program: 58185
Project: 58185
Buggy source:
@Override public void cluster(ClusterState clusterState){
  if (bIsNumerical == true && isSetHomogeneous == true) {
    ContentVAType contentVAType=clusterState.getContentVAType();
    if (contentVAType != null) {
      clusterState.setContentVA(getContentData(contentVAType).getContentVA());
    }
    StorageVAType storageVAType=clusterState.getStorageVAType();
    if (storageVAType != null) {
      clusterState.setStorageVA(getStorageData(storageVAType).getStorageVA());
    }
    ClusterManager clusterManager=new ClusterManager(this);
    ClusterResult result=clusterManager.cluster(clusterState);
    ContentData contentResult=result.getContentResult();
    if (contentResult != null) {
      hashContentData.put(clusterState.getContentVAType(),contentResult);
    }
    StorageData storageResult=result.getStorageResult();
    if (storageResult != null) {
      hashStorageData.put(clusterState.getStorageVAType(),storageResult);
    }
  }
 else   throw new IllegalStateException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void cluster(ClusterState clusterState){
  if (bIsNumerical == true && isSetHomogeneous == true) {
    ContentVAType contentVAType=clusterState.getContentVAType();
    if (contentVAType != null) {
      clusterState.setContentVA(getContentData(contentVAType).getContentVA());
      clusterState.setContentIDType(dataDomain.getContentIDType());
    }
    StorageVAType storageVAType=clusterState.getStorageVAType();
    if (storageVAType != null) {
      clusterState.setStorageVA(getStorageData(storageVAType).getStorageVA());
      clusterState.setStorageIDType(dataDomain.getStorageIDType());
    }
    ClusterManager clusterManager=new ClusterManager(this);
    ClusterResult result=clusterManager.cluster(clusterState);
    ContentData contentResult=result.getContentResult();
    if (contentResult != null) {
      hashContentData.put(clusterState.getContentVAType(),contentResult);
    }
    StorageData storageResult=result.getStorageResult();
    if (storageResult != null) {
      hashStorageData.put(clusterState.getStorageVAType(),storageResult);
    }
  }
 else   throw new IllegalStateException("String_Node_Str");
}
Program: 58186
Project: 58186
Buggy source:
private ContentData createContentData(ContentVAType vaType){
  ContentData contentData=new ContentData();
  ContentVirtualArray contentVA=new ContentVirtualArray(vaType);
  if (!vaType.isEmptyByDefault()) {
    for (int count=0; count < depth(); count++) {
      contentVA.append(count);
    }
  }
  contentData.setContentVA(contentVA);
  return contentData;
}

Fixed version (ground truth):
private ContentData createContentData(ContentVAType vaType){
  ContentData contentData=new ContentData(dataDomain.getContentIDType());
  ContentVirtualArray contentVA=new ContentVirtualArray(vaType);
  if (!vaType.isEmptyByDefault()) {
    for (int count=0; count < depth(); count++) {
      contentVA.append(count);
    }
  }
  contentData.setContentVA(contentVA);
  return contentData;
}
Program: 58187
Project: 58187
Buggy source:
/** 
 * Constructor for the set. Creates and initializes members and registers the set whit the set manager. Also creates a new default tree. This should not be called by implementing sub-classes.
 */
public Set(){
  super(GeneralManager.get().getIDManager().createID(EManagedObjectType.SET));
  SetManager.getInstance().registerItem(this);
  init();
  Tree<ClusterNode> tree=new Tree<ClusterNode>();
  ClusterNode root=new ClusterNode(tree,"String_Node_Str",1,true,-1);
  tree.setRootNode(root);
  defaultStorageData.setStorageTree(tree);
  hashStorageData.put(StorageVAType.STORAGE,defaultStorageData.clone());
}

Fixed version (ground truth):
/** 
 * Constructor for the set. Creates and initializes members and registers the set whit the set manager. Also creates a new default tree. This should not be called by implementing sub-classes.
 */
public Set(ASetBasedDataDomain dataDomain){
  super(GeneralManager.get().getIDManager().createID(EManagedObjectType.SET));
  this.dataDomain=dataDomain;
  SetManager.getInstance().registerItem(this);
  init();
  Tree<ClusterNode> tree=new Tree<ClusterNode>();
  tree.initializeIDTypes(dataDomain.getStorageIDType());
  ClusterNode root=new ClusterNode(tree,"String_Node_Str",1,true,-1);
  tree.setRootNode(root);
  defaultStorageData.setStorageTree(tree);
  hashStorageData.put(StorageVAType.STORAGE,defaultStorageData.clone());
}
Program: 58189
Project: 58189
Buggy source:
public Tree<ClusterNode> importStorageTree(String fileName) throws JAXBException, FileNotFoundException {
  Tree<ClusterNode> tree=importTree(fileName);
  org.caleydo.core.data.collection.set.Set set=(org.caleydo.core.data.collection.set.Set)dataDomain.getSet();
  tree.getRoot().createMetaSets(set);
  return tree;
}

Fixed version (ground truth):
public Tree<ClusterNode> importStorageTree(String fileName) throws JAXBException, FileNotFoundException {
  Tree<ClusterNode> tree=importTree(fileName,dataDomain.getStorageIDType());
  org.caleydo.core.data.collection.set.Set set=(org.caleydo.core.data.collection.set.Set)dataDomain.getSet();
  tree.getRoot().createMetaSets(set);
  return tree;
}
Program: 58191
Project: 58191
Buggy source:
/** 
 * Adds a new, custom selection type to the selection manager. Should only be called via a  {@link SelectionTypeEvent}
 */
public void addSelectionType(SelectionType selectionType){
  hashSelectionTypes.put(selectionType,new HashMap<Integer,Integer>());
  selectionTypes.add(selectionType);
}

Fixed version (ground truth):
/** 
 * Adds a new, custom selection type to the selection manager. Should only be called via a  {@link SelectionTypeEvent}
 */
public void addSelectionType(SelectionType selectionType){
  if (!hashSelectionTypes.containsKey(selectionType)) {
    hashSelectionTypes.put(selectionType,new HashMap<Integer,Integer>());
    selectionTypes.add(selectionType);
  }
}
Program: 58192
Project: 58192
Buggy source:
@Override public ISet createSet(){
  ISet set=new Set();
  return set;
}

Fixed version (ground truth):
@Override public ISet createSet(){
  throw new IllegalStateException("String_Node_Str");
}
Program: 58193
Project: 58193
Buggy source:
@Override public void setSet(ISet set){
  assert(set != null);
  set.setDataDomain(this);
  ISet oldSet=this.set;
  this.set=set;
  if (oldSet != null) {
    oldSet.destroy();
    oldSet=null;
  }
}

Fixed version (ground truth):
@Override public void setSet(ISet set){
  assert(set != null);
  ISet oldSet=this.set;
  this.set=set;
  if (oldSet != null) {
    oldSet.destroy();
    oldSet=null;
  }
}
Program: 58194
Project: 58194
Buggy source:
private void runContentClustering(AClusterer clusterer,ClusterState clusterState,ClusterResult result,int progressBarOffset,int progressBarMulti){
  clusterer.setClusterState(clusterState);
  TempResult tempResult=clusterer.getSortedVA(set,clusterState,progressBarOffset,progressBarMulti);
  result.contentResult=new ContentData();
  result.contentResult.setContentVA(new ContentVirtualArray(clusterState.getContentVAType(),tempResult.indices));
  result.contentResult.setContentClusterSizes(tempResult.clusterSizes);
  result.contentResult.setContentSampleElements(tempResult.sampleElements);
  result.contentResult.setContentTree(tempResult.tree);
}

Fixed version (ground truth):
private void runContentClustering(AClusterer clusterer,ClusterState clusterState,ClusterResult result,int progressBarOffset,int progressBarMulti){
  clusterer.setClusterState(clusterState);
  TempResult tempResult=clusterer.getSortedVA(set,clusterState,progressBarOffset,progressBarMulti);
  result.contentResult=new ContentData(set.getDataDomain().getContentIDType());
  result.contentResult.setContentVA(new ContentVirtualArray(clusterState.getContentVAType(),tempResult.indices));
  result.contentResult.setContentClusterSizes(tempResult.clusterSizes);
  result.contentResult.setContentSampleElements(tempResult.sampleElements);
  tempResult.tree.initializeIDTypes(clusterState.getContentIDType());
  result.contentResult.setContentTree(tempResult.tree);
}
Program: 58195
Project: 58195
Buggy source:
/** 
 * Depending on the cluster state the corresponding clusterer will be called. Virtual arrays for content and storage will be returned.
 * @param clusterState All information needed ba cluster algorithm
 * @return array list of {@link IVirtualArray}s including VAs for content and storage.
 */
public ClusterResult cluster(ClusterState clusterState){
  ClusterResult clusterResult=null;
switch (clusterState.getClustererAlgo()) {
case TREE_CLUSTERER:
    clusterResult=runClustering(new TreeClusterer(),clusterState);
  break;
case COBWEB_CLUSTERER:
clusterResult=runClustering(new HierarchicalClusterer(),clusterState);
break;
case AFFINITY_PROPAGATION:
clusterResult=runClustering(new AffinityClusterer(),clusterState);
break;
case KMEANS_CLUSTERER:
clusterResult=runClustering(new KMeansClusterer(),clusterState);
}
GeneralManager.get().getEventPublisher().triggerEvent(new UpdateViewEvent());
if (clusterResult == null) {
GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
public void run(){
Shell shell=new Shell();
MessageBox messageBox=new MessageBox(shell,SWT.ERROR);
messageBox.setText("String_Node_Str");
messageBox.setMessage("String_Node_Str");
messageBox.open();
}
}
);
}
return clusterResult;
}

Fixed version (ground truth):
/** 
 * Depending on the cluster state the corresponding clusterer will be called. Virtual arrays for content and storage will be returned.
 * @param clusterState All information needed ba cluster algorithm
 * @return array list of {@link IVirtualArray}s including VAs for content and storage.
 */
public ClusterResult cluster(ClusterState clusterState){
  ClusterResult clusterResult=null;
switch (clusterState.getClustererAlgo()) {
case TREE_CLUSTERER:
    clusterResult=runClustering(new TreeClusterer(),clusterState);
  break;
case COBWEB_CLUSTERER:
clusterResult=runClustering(new HierarchicalClusterer(),clusterState);
break;
case AFFINITY_PROPAGATION:
clusterResult=runClustering(new AffinityClusterer(),clusterState);
break;
case KMEANS_CLUSTERER:
clusterResult=runClustering(new KMeansClusterer(),clusterState);
}
if (clusterResult == null) {
GeneralManager.get().getGUIBridge().getDisplay().asyncExec(new Runnable(){
public void run(){
Shell shell=new Shell();
MessageBox messageBox=new MessageBox(shell,SWT.ERROR);
messageBox.setText("String_Node_Str");
messageBox.setMessage("String_Node_Str");
messageBox.open();
}
}
);
}
 else {
GeneralManager.get().getEventPublisher().triggerEvent(new UpdateViewEvent());
}
return clusterResult;
}
Program: 58196
Project: 58196
Buggy source:
private void runStorageClustering(AClusterer clusterer,ClusterState clusterState,ClusterResult result,int progressBarOffset,int progressBarMulti){
  clusterer.setClusterState(clusterState);
  TempResult tempResult=clusterer.getSortedVA(set,clusterState,progressBarOffset,progressBarMulti);
  result.storageResult=new StorageData();
  result.storageResult.setStorageVA(new StorageVirtualArray(clusterState.getStorageVAType(),tempResult.indices));
  result.storageResult.setStorageClusterSizes(tempResult.clusterSizes);
  result.storageResult.setStorageSampleElements(tempResult.sampleElements);
  if (tempResult.tree == null) {
    result.storageResult.setDefaultTree(true);
  }
 else {
    result.storageResult.setStorageTree(tempResult.tree);
    result.storageResult.setDefaultTree(false);
  }
}

Fixed version (ground truth):
private void runStorageClustering(AClusterer clusterer,ClusterState clusterState,ClusterResult result,int progressBarOffset,int progressBarMulti){
  clusterer.setClusterState(clusterState);
  TempResult tempResult=clusterer.getSortedVA(set,clusterState,progressBarOffset,progressBarMulti);
  result.storageResult=new StorageData();
  result.storageResult.setStorageVA(new StorageVirtualArray(clusterState.getStorageVAType(),tempResult.indices));
  result.storageResult.setStorageClusterSizes(tempResult.clusterSizes);
  result.storageResult.setStorageSampleElements(tempResult.sampleElements);
  if (tempResult.tree == null) {
    result.storageResult.setDefaultTree(true);
  }
 else {
    result.storageResult.setStorageTree(tempResult.tree);
    result.storageResult.setDefaultTree(false);
  }
  result.storageResult.getStorageTree().initializeIDTypes(clusterState.getContentIDType());
}
Program: 58198
Project: 58198
Buggy source:
/** 
 * <p> Set a virtual array if the data you are managing with this selection manager is also managed by a virtual array. </p> <p> If you reset this virtual array at runtime the manager is completely resetted and reinitialized with the data of the virtual array </p>
 * @param virtualArray the currently active virtual array
 */
public void setVA(VA virtualArray){
  this.virtualArray=virtualArray;
}

Fixed version (ground truth):
/** 
 * <p> Set a virtual array if the data you are managing with this selection manager is also managed by a virtual array. </p>
 * @param virtualArray the currently active virtual array
 */
public void setVA(VA virtualArray){
  clearSelections();
  this.virtualArray=virtualArray;
}
Program: 58199
Project: 58199
Buggy source:
/** 
 * Replace content VA for a specific set.
 * @param setID
 * @param dataDomainType
 * @param vaType
 * @param virtualArray
 */
public void replaceContentVA(int setID,String dataDomainType,ContentVAType vaType,ContentVirtualArray virtualArray){
  if (dataDomainType != this.dataDomainType) {
    handleForeignContentVAUpdate(setID,dataDomainType,vaType,virtualArray);
    return;
  }
  ISet set;
  if (setID == this.set.getID()) {
    set=this.set;
  }
 else {
    set=this.set.getStorageData(StorageVAType.STORAGE).getStorageTreeRoot().getMetaSetFromSubTree(setID);
  }
  set.setContentVA(vaType,virtualArray.clone());
  virtualArray.setGroupList(null);
  eventPublisher.triggerEvent(new ReplaceContentVAEvent(set,dataDomainType,vaType));
}

Fixed version (ground truth):
/** 
 * Replace content VA for a specific set.
 * @param setID
 * @param dataDomainType
 * @param vaType
 * @param virtualArray
 */
public void replaceContentVA(int setID,String dataDomainType,ContentVAType vaType,ContentVirtualArray virtualArray){
  if (dataDomainType != this.dataDomainType) {
    handleForeignContentVAUpdate(setID,dataDomainType,vaType,virtualArray);
    return;
  }
  ISet set;
  if (setID == this.set.getID()) {
    set=this.set;
  }
 else {
    set=this.set.getStorageData(StorageVAType.STORAGE).getStorageTreeRoot().getMetaSetFromSubTree(setID);
  }
  set.setContentVA(vaType,virtualArray.clone());
  virtualArray.setGroupList(null);
  System.out.println("String_Node_Str");
  eventPublisher.triggerEvent(new ReplaceContentVAEvent(set,dataDomainType,vaType));
}
Program: 58200
Project: 58200
Buggy source:
@Override public String getStorageLabel(Object id){
  return getStorageLabel(storageIDType,id);
}

Fixed version (ground truth):
@Override public String getStorageLabel(IDType idType,Object id){
  return set.get((Integer)id).getLabel();
}
Program: 58201
Project: 58201
Buggy source:
@Override public String getContentLabel(IDType idType,Object id){
  String geneSymbol=null;
  String refSeq=null;
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getContentLabel(IDType idType,Object id){
  String geneSymbol=null;
  String refSeq=null;
  Set<String> setRefSeqIDs=idMappingManager.getIDAsSet(idType,IDType.getIDType("String_Node_Str"),id);
  if ((setRefSeqIDs != null && !setRefSeqIDs.isEmpty())) {
    refSeq=(String)setRefSeqIDs.toArray()[0];
  }
  Set<String> setGeneSymbols=idMappingManager.getIDAsSet(contentIDType,humanReadableContentIDType,id);
  if ((setGeneSymbols != null && !setGeneSymbols.isEmpty())) {
    geneSymbol=(String)setGeneSymbols.toArray()[0];
  }
  if (geneSymbol != null)   return geneSymbol + "String_Node_Str" + refSeq;
 else   if (refSeq != null)   return refSeq;
 else   return "String_Node_Str";
}
Program: 58202
Project: 58202
Buggy source:
@Override public String getStorageLabel(IDType idType,Object id){
  return null;
}

Fixed version (ground truth):
@Override public String getStorageLabel(IDType idType,Object id){
  return super.getStorageLabel(idType,id);
}
Program: 58203
Project: 58203
Buggy source:
@Override public void init(Shell splash){
  super.init(splash);
  createUI();
  doEventLoop();
  splash.setText("String_Node_Str");
}

Fixed version (ground truth):
@Override public void init(Shell splash){
  super.init(splash);
  shell=splash;
  createUI();
  doEventLoop();
  splash.setText("String_Node_Str");
}
Program: 58204
Project: 58204
Buggy source:
/** 
 * Static method for initializing the Caleydo core. Called when initializing the workbench because XML startup the progress bar is needed
 */
public void initCore(){
  GeneralManager.get().getSWTGUIManager();
  GeneralManager.get().init(new RCPBridge());
  GeneralManager.get().getGUIBridge().init();
  if (startupProcedure == null) {
    Shell shell=display.getActiveShell();
    WizardDialog projectWizardDialog=new WizardDialog(shell,new CaleydoProjectWizard(shell));
    if (projectWizardDialog.open() == Window.CANCEL) {
      shutdown();
    }
  }
  startupProcedure.init(appInitData);
  startupProcedure.execute();
  ColorMappingManager.get().initiFromPreferenceStore(EColorMappingType.GENE_EXPRESSION);
}

Fixed version (ground truth):
/** 
 * Static method for initializing the Caleydo core. Called when initializing the workbench because XML startup the progress bar is needed
 */
public void initCore(){
  GeneralManager.get().getSWTGUIManager();
  GeneralManager.get().init(new RCPBridge());
  GeneralManager.get().getGUIBridge().init();
  if (startupProcedure == null) {
    Shell shell=InteractiveSplashHandler.getShell();
    WizardDialog projectWizardDialog=new WizardDialog(shell,new CaleydoProjectWizard(shell));
    if (projectWizardDialog.open() == Window.CANCEL) {
      shutdown();
    }
  }
  startupProcedure.init(appInitData);
  startupProcedure.execute();
  ColorMappingManager.get().initiFromPreferenceStore(EColorMappingType.GENE_EXPRESSION);
}
Program: 58205
Project: 58205
Buggy source:
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLGrouper(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum,true);
  viewType=VIEW_ID;
  hashGroups=new HashMap<Integer,GroupRepresentation>();
  dragAndDropController=new DragAndDropController(this);
  selectionTypeClicked=new SelectionType("String_Node_Str",new float[]{1.0f,0.0f,1.0f,0.0f},1,true,false,1.0f);
  SelectionTypeEvent selectionTypeEvent=new SelectionTypeEvent(selectionTypeClicked);
  eventPublisher.triggerEvent(selectionTypeEvent);
  selectionManager.addTypeToDeltaBlacklist(selectionTypeClicked);
  renderStyle=new GrouperRenderStyle(viewFrustum);
  textRenderer=new TextRenderer(new Font("String_Node_Str",Font.PLAIN,32),true,true);
  glKeyListener=new GLGrouperKeyListener(this);
  iDraggedOverCollapseButtonID=-1;
  bHierarchyChanged=true;
  iLastUsedGroupID=0;
  bPotentialNewSelection=false;
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param glCanvas
 * @param sLabel
 * @param viewFrustum
 */
public GLGrouper(GLCaleydoCanvas glCanvas,final String sLabel,final IViewFrustum viewFrustum){
  super(glCanvas,sLabel,viewFrustum,true);
  viewType=VIEW_ID;
  hashGroups=new HashMap<Integer,GroupRepresentation>();
  dragAndDropController=new DragAndDropController(this);
  selectionTypeClicked=new SelectionType("String_Node_Str",new float[]{1.0f,0.0f,1.0f,0.0f},1,true,false,1.0f);
  SelectionTypeEvent selectionTypeEvent=new SelectionTypeEvent(selectionTypeClicked);
  eventPublisher.triggerEvent(selectionTypeEvent);
  renderStyle=new GrouperRenderStyle(viewFrustum);
  textRenderer=new TextRenderer(new Font("String_Node_Str",Font.PLAIN,32),true,true);
  glKeyListener=new GLGrouperKeyListener(this);
  iDraggedOverCollapseButtonID=-1;
  bHierarchyChanged=true;
  iLastUsedGroupID=0;
  bPotentialNewSelection=false;
}
Program: 58206
Project: 58206
Buggy source:
@Override public void init(GL gl){
  set=dataDomain.getSet();
  storageVA=set.getStorageData(StorageVAType.STORAGE).getStorageVA();
  drawingStrategyManager=new DrawingStrategyManager(pickingManager,iUniqueID,renderStyle);
  if (set.getStorageData(storageVAType).getStorageTree() != null) {
    tree=set.getStorageData(storageVAType).getStorageTree();
    selectionManager=new SelectionManager(tree.getNodeIDType());
    initHierarchy(tree);
  }
 else {
    createNewHierarchy();
  }
}

Fixed version (ground truth):
@Override public void init(GL gl){
}
Program: 58207
Project: 58207
Buggy source:
@Override public void setDataDomain(ASetBasedDataDomain dataDomain){
  this.dataDomain=dataDomain;
}

Fixed version (ground truth):
@Override public void setDataDomain(ASetBasedDataDomain dataDomain){
  this.dataDomain=dataDomain;
  setSet(this.dataDomain.getSet());
  storageVA=set.getStorageData(StorageVAType.STORAGE).getStorageVA();
  drawingStrategyManager=new DrawingStrategyManager(pickingManager,iUniqueID,renderStyle);
  if (set.getStorageData(storageVAType).getStorageTree() != null) {
    tree=set.getStorageData(storageVAType).getStorageTree();
    selectionManager=new SelectionManager(tree.getNodeIDType());
    initHierarchy(tree);
  }
 else {
    createNewHierarchy();
  }
  selectionManager.addTypeToDeltaBlacklist(selectionTypeClicked);
}
Program: 58208
Project: 58208
Buggy source:
/** 
 * Constructor.
 */
public ClinicalDataDomain(){
  super("String_Node_Str");
  icon=EIconTextures.DATA_DOMAIN_CLINICAL;
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public ClinicalDataDomain(){
  super(DATA_DOMAIN_TYPE);
  icon=EIconTextures.DATA_DOMAIN_CLINICAL;
}
Program: 58209
Project: 58209
Buggy source:
/** 
 * Constructor.
 */
public GenericDataDomain(){
  super("String_Node_Str");
  contentLabelSingular="String_Node_Str";
  contentLabelPlural="String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public GenericDataDomain(){
  super(DATA_DOMAIN_TYPE);
  contentLabelSingular="String_Node_Str";
  contentLabelPlural="String_Node_Str";
}
Program: 58210
Project: 58210
Buggy source:
/** 
 * Constructor.
 */
public GeneticDataDomain(){
  super("String_Node_Str");
  icon=EIconTextures.DATA_DOMAIN_GENETIC;
  primaryContentMappingType=IDType.getIDType("String_Node_Str");
  humanReadableContentIDType=IDType.getIDType("String_Node_Str");
  humanReadableStorageIDType=IDType.getIDType("String_Node_Str");
  pathwayViewerMode=false;
  contentLabelSingular="String_Node_Str";
  contentLabelPlural="String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public GeneticDataDomain(){
  super(DATA_DOMAIN_TYPE);
  icon=EIconTextures.DATA_DOMAIN_GENETIC;
  primaryContentMappingType=IDType.getIDType("String_Node_Str");
  humanReadableContentIDType=IDType.getIDType("String_Node_Str");
  humanReadableStorageIDType=IDType.getIDType("String_Node_Str");
  pathwayViewerMode=false;
  contentLabelSingular="String_Node_Str";
  contentLabelPlural="String_Node_Str";
}
Program: 58211
Project: 58211
Buggy source:
private void createMenuContent(int davidID){
  GeneralManager generalManager=GeneralManager.get();
  String sGeneSymbol=generalManager.getIDMappingManager().getID(dataDomain.getPrimaryContentMappingType(),((GeneticDataDomain)(DataDomainManager.getInstance().getDataDomain(GeneticDataDomain.dataDomainType))).getHumanReadableContentIDType(),davidID);
  if (sGeneSymbol == "String_Node_Str" || sGeneSymbol == null)   sGeneSymbol="String_Node_Str";
  addHeading(sGeneSymbol);
  if (PathwayManager.get().isPathwayLoadingFinished()) {
    LoadPathwaysByGeneItem loadPathwaysByGeneItem=new LoadPathwaysByGeneItem();
    loadPathwaysByGeneItem.setDavid(dataDomain.getPrimaryContentMappingType(),davidID);
    addContextMenuItem(loadPathwaysByGeneItem);
    ShowPathwaysByGeneItem showPathwaysByGeneItem=new ShowPathwaysByGeneItem();
    showPathwaysByGeneItem.setDavid(dataDomain.getPrimaryContentMappingType(),davidID);
    addContextMenuItem(showPathwaysByGeneItem);
  }
  BookmarkItem addToListItem=new BookmarkItem(dataDomain.getPrimaryContentMappingType(),davidID);
  addContextMenuItem(addToListItem);
}

Fixed version (ground truth):
private void createMenuContent(int davidID){
  GeneralManager generalManager=GeneralManager.get();
  String sGeneSymbol=generalManager.getIDMappingManager().getID(dataDomain.getPrimaryContentMappingType(),((GeneticDataDomain)(DataDomainManager.getInstance().getDataDomain(dataDomain.getDataDomainType()))).getHumanReadableContentIDType(),davidID);
  if (sGeneSymbol == "String_Node_Str" || sGeneSymbol == null)   sGeneSymbol="String_Node_Str";
  addHeading(sGeneSymbol);
  if (PathwayManager.get().isPathwayLoadingFinished()) {
    LoadPathwaysByGeneItem loadPathwaysByGeneItem=new LoadPathwaysByGeneItem();
    loadPathwaysByGeneItem.setDavid(dataDomain.getPrimaryContentMappingType(),davidID);
    addContextMenuItem(loadPathwaysByGeneItem);
    ShowPathwaysByGeneItem showPathwaysByGeneItem=new ShowPathwaysByGeneItem();
    showPathwaysByGeneItem.setDavid(dataDomain.getPrimaryContentMappingType(),davidID);
    addContextMenuItem(showPathwaysByGeneItem);
  }
  BookmarkItem addToListItem=new BookmarkItem(dataDomain.getPrimaryContentMappingType(),davidID);
  addContextMenuItem(addToListItem);
}
Program: 58212
Project: 58212
Buggy source:
public void handleForeignSelectionCommand(String dataDomainType,EIDCategory category,SelectionCommand selectionCommand);

Fixed version (ground truth):
public void handleForeignSelectionCommand(String dataDomainType,IDType idType,SelectionCommand selectionCommand);
Program: 58213
Project: 58213
Buggy source:
/** 
 * Interface used by   {@link ForeignSelectionCommandListener} to signal foreign selection commands. Can beimplemented in concrete classes, has no functionality in base class.
 */
@Override public void handleForeignSelectionCommand(String dataDomainType,EIDCategory category,SelectionCommand selectionCommand){
}

Fixed version (ground truth):
/** 
 * Interface used by   {@link ForeignSelectionCommandListener} to signal foreign selection commands. Can beimplemented in concrete classes, has no functionality in base class.
 */
@Override public void handleForeignSelectionCommand(String dataDomainType,IDType idType,SelectionCommand selectionCommand){
}
Program: 58214
Project: 58214
Buggy source:
@Override public void handleSelectionCommand(EIDCategory category,SelectionCommand selectionCommand){
}

Fixed version (ground truth):
@Override public void handleSelectionCommand(IDType idType,SelectionCommand selectionCommand){
}
Program: 58215
Project: 58215
Buggy source:
@Override public boolean checkIntegrity(){
  if (category == null)   throw new NullPointerException("String_Node_Str");
  if (selectionCommand == null)   throw new NullPointerException("String_Node_Str");
  return true;
}

Fixed version (ground truth):
@Override public boolean checkIntegrity(){
  if (idType == null)   throw new NullPointerException("String_Node_Str");
  if (selectionCommand == null)   throw new NullPointerException("String_Node_Str");
  return true;
}
Program: 58216
Project: 58216
Buggy source:
@Override public void handleContentVAUpdate(ContentVADelta delta,String info){
  contentVA.setGroupList(null);
  if (delta.getIDType() == EIDType.REFSEQ_MRNA_INT)   delta=DeltaConverter.convertDelta(EIDType.EXPRESSION_INDEX,delta);
  reactOnContentVAChanges(delta);
  contentSelectionManager.setVADelta(delta);
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void handleContentVAUpdate(ContentVADelta delta,String info){
  contentVA.setGroupList(null);
  reactOnContentVAChanges(delta);
  contentSelectionManager.setVADelta(delta);
  setDisplayListDirty();
}
Program: 58218
Project: 58218
Buggy source:
@Override public void handleSelectionCommand(EIDCategory category,SelectionCommand selectionCommand){
  if (category == EIDCategory.GENE)   contentSelectionManager.executeSelectionCommand(selectionCommand);
 else   storageSelectionManager.executeSelectionCommand(selectionCommand);
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void handleSelectionCommand(IDType idType,SelectionCommand selectionCommand){
  if (idType == contentIDType)   contentSelectionManager.executeSelectionCommand(selectionCommand);
 else   storageSelectionManager.executeSelectionCommand(selectionCommand);
  setDisplayListDirty();
}
Program: 58219
Project: 58219
Buggy source:
@Override public void setDataDomain(ASetBasedDataDomain dataDomain){
  this.dataDomain=(ASetBasedDataDomain)dataDomain;
  contentSelectionManager=this.dataDomain.getContentSelectionManager();
  storageSelectionManager=this.dataDomain.getStorageSelectionManager();
  setSet(this.dataDomain.getSet());
}

Fixed version (ground truth):
@Override public void setDataDomain(ASetBasedDataDomain dataDomain){
  this.dataDomain=(ASetBasedDataDomain)dataDomain;
  contentSelectionManager=this.dataDomain.getContentSelectionManager();
  storageSelectionManager=this.dataDomain.getStorageSelectionManager();
  contentIDType=dataDomain.getContentIDType();
  storageIDType=dataDomain.getStorageIDType();
  setSet(this.dataDomain.getSet());
}
Program: 58220
Project: 58220
Buggy source:
@Override public void handleSelectionUpdate(ISelectionDelta selectionDelta,boolean scrollToSelection,String info){
  if (selectionDelta.getIDType().getCategory() == EIDCategory.GENE && dataDomain.getDataDomainType().equals("String_Node_Str")) {
    contentSelectionManager.setDelta(selectionDelta);
    initForAddedElements();
    handleConnectedElementRep(selectionDelta);
    reactOnExternalSelection(scrollToSelection);
    setDisplayListDirty();
  }
 else   if (selectionDelta.getIDType() == EIDType.EXPERIMENT_INDEX && dataDomain.getDataDomainType().equals("String_Node_Str")) {
    storageSelectionManager.setDelta(selectionDelta);
    handleConnectedElementRep(selectionDelta);
    reactOnExternalSelection(scrollToSelection);
    setDisplayListDirty();
  }
 else   if (selectionDelta.getIDType() == EIDType.EXPERIMENT_INDEX && dataDomain.getDataDomainType().equals("String_Node_Str")) {
    contentSelectionManager.setDelta(selectionDelta);
    handleConnectedElementRep(selectionDelta);
    reactOnExternalSelection(scrollToSelection);
    setDisplayListDirty();
  }
 else   if (selectionDelta.getIDType() == EIDType.EXPRESSION_INDEX && dataDomain.getDataDomainType().equals("String_Node_Str")) {
    contentSelectionManager.setDelta(selectionDelta);
    handleConnectedElementRep(selectionDelta);
    reactOnExternalSelection(scrollToSelection);
    setDisplayListDirty();
  }
 else   if (selectionDelta.getIDType() == EIDType.EXPERIMENT_INDEX && dataDomain.getDataDomainType().equals("String_Node_Str")) {
    storageSelectionManager.setDelta(selectionDelta);
    handleConnectedElementRep(selectionDelta);
    reactOnExternalSelection(scrollToSelection);
    setDisplayListDirty();
  }
}

Fixed version (ground truth):
@Override public void handleSelectionUpdate(ISelectionDelta selectionDelta,boolean scrollToSelection,String info){
  if (selectionDelta.getIDType() == contentIDType) {
    contentSelectionManager.setDelta(selectionDelta);
    initForAddedElements();
    handleConnectedElementRep(selectionDelta);
    reactOnExternalSelection(scrollToSelection);
    setDisplayListDirty();
  }
 else   if (selectionDelta.getIDType() == storageIDType) {
    storageSelectionManager.setDelta(selectionDelta);
    handleConnectedElementRep(selectionDelta);
    reactOnExternalSelection(scrollToSelection);
    setDisplayListDirty();
  }
}
Program: 58221
Project: 58221
Buggy source:
@Override public void clearAllSelections(){
  connectedElementRepresentationManager.clear(EIDType.EXPRESSION_INDEX);
  contentSelectionManager.clearSelections();
  storageSelectionManager.clearSelections();
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void clearAllSelections(){
  connectedElementRepresentationManager.clear(contentIDType);
  connectedElementRepresentationManager.clear(storageIDType);
  contentSelectionManager.clearSelections();
  storageSelectionManager.clearSelections();
  setDisplayListDirty();
}
Program: 58222
Project: 58222
Buggy source:
/** 
 * Create 0:n   {@link SelectedElementRep} for the selectionDelta
 * @param iDType TODO
 * @param selectionDelta the selection delta which should be represented
 * @throws InvalidAttributeValueException when the selectionDelta does not contain a valid type for this view
 */
protected abstract ArrayList<SelectedElementRep> createElementRep(EIDType idType,int iStorageIndex) throws InvalidAttributeValueException ;

Fixed version (ground truth):
/** 
 * Create 0:n   {@link SelectedElementRep} for the selectionDelta
 * @param iDType TODO
 * @param selectionDelta the selection delta which should be represented
 * @throws InvalidAttributeValueException when the selectionDelta does not contain a valid type for this view
 */
protected abstract ArrayList<SelectedElementRep> createElementRep(IDType idType,int iStorageIndex) throws InvalidAttributeValueException ;
Program: 58223
Project: 58223
Buggy source:
/** 
 * Handles   {@link SelectionCommandEvent}s by extracting the events payload and calling the related handler
 * @param event {@link SelectionCommandEvent} to handle, other events will be ignored
 */
@Override public void handleEvent(AEvent event){
  if (event instanceof SelectionCommandEvent) {
    SelectionCommandEvent selectionCommandEvent=(SelectionCommandEvent)event;
    SelectionCommand selectionCommand=selectionCommandEvent.getSelectionCommand();
    EIDCategory category=selectionCommandEvent.getCategory();
    String dataDomainType=selectionCommandEvent.getDataDomainType();
    handler.handleForeignSelectionCommand(dataDomainType,category,selectionCommand);
  }
}

Fixed version (ground truth):
/** 
 * Handles   {@link SelectionCommandEvent}s by extracting the events payload and calling the related handler
 * @param event {@link SelectionCommandEvent} to handle, other events will be ignored
 */
@Override public void handleEvent(AEvent event){
  if (event instanceof SelectionCommandEvent) {
    SelectionCommandEvent selectionCommandEvent=(SelectionCommandEvent)event;
    SelectionCommand selectionCommand=selectionCommandEvent.getSelectionCommand();
    IDType idType=selectionCommandEvent.getIDType();
    String dataDomainType=selectionCommandEvent.getDataDomainType();
    handler.handleForeignSelectionCommand(dataDomainType,idType,selectionCommand);
  }
}
Program: 58224
Project: 58224
Buggy source:
/** 
 * Handler method to be called when a TriggerSelectionCommand event is caught that should trigger a content-selection-command by a related. by a related   {@link SelectionCommandListener}.
 * @param selectionCommands
 */
public void handleSelectionCommand(EIDCategory category,SelectionCommand selectionCommand);

Fixed version (ground truth):
/** 
 * Handler method to be called when a TriggerSelectionCommand event is caught that should trigger a content-selection-command by a related. by a related   {@link SelectionCommandListener}.
 * @param selectionCommands
 */
public void handleSelectionCommand(IDType idType,SelectionCommand selectionCommand);
Program: 58225
Project: 58225
Buggy source:
/** 
 * Handles   {@link SelectionCommandEvent}s by extracting the events payload and calling the related handler
 * @param event {@link SelectionCommandEvent} to handle, other events will be ignored
 */
@Override public void handleEvent(AEvent event){
  if (event instanceof SelectionCommandEvent) {
    SelectionCommandEvent selectionCommandEvent=(SelectionCommandEvent)event;
    SelectionCommand selectionCommand=selectionCommandEvent.getSelectionCommand();
    EIDCategory category=selectionCommandEvent.getCategory();
    handler.handleSelectionCommand(category,selectionCommand);
  }
}

Fixed version (ground truth):
/** 
 * Handles   {@link SelectionCommandEvent}s by extracting the events payload and calling the related handler
 * @param event {@link SelectionCommandEvent} to handle, other events will be ignored
 */
@Override public void handleEvent(AEvent event){
  if (event instanceof SelectionCommandEvent) {
    SelectionCommandEvent selectionCommandEvent=(SelectionCommandEvent)event;
    SelectionCommand selectionCommand=selectionCommandEvent.getSelectionCommand();
    IDType idType=selectionCommandEvent.getIDType();
    handler.handleSelectionCommand(idType,selectionCommand);
  }
}
Program: 58226
Project: 58226
Buggy source:
/** 
 * Load data from file using a token pattern.
 * @see org.caleydo.core.command.ICommand#doCommand()
 */
public void doCommand(){
  LookupTableLoader loader=null;
  if (sFileName.contains("String_Node_Str")) {
    EOrganism eOrganism=GeneralManager.get().getOrganism();
    this.sFileName=sFileName.replace("String_Node_Str",eOrganism.toString());
  }
  IIDMappingManager genomeIdManager=generalManager.getIDMappingManager();
  MappingType mappingType=genomeIdManager.getMappingType(fromIDType.getTypeName() + "String_Node_Str" + toIDType.getTypeName());
  int iIndex=0;
  if (sFileName.equals("String_Node_Str")) {
    MappingType tmpMappingType=genomeIdManager.createMap(IDType.getIDType("String_Node_Str"),IDType.getIDType("String_Node_Str"),false);
    Map<String,Integer> hashTmp=genomeIdManager.getMap(tmpMappingType);
    for (    Object refSeqIDObject : genomeIdManager.getMap(genomeIdManager.getMappingType("String_Node_Str")).values()) {
      hashTmp.put((String)refSeqIDObject,iIndex++);
    }
  }
 else   if (!sFileName.equals("String_Node_Str")) {
    loader=new LookupTableLoader(sFileName,fromIDType,toIDType,false);
    loader.setTokenSeperator(sLookupTableDelimiter);
    loader.setStartParsingStopParsingAtLine(iStartPareseFileAtLine,iStopParseFileAtLine);
    loader.loadData();
  }
  commandManager.runDoCommand(this);
}

Fixed version (ground truth):
/** 
 * Load data from file using a token pattern.
 * @see org.caleydo.core.command.ICommand#doCommand()
 */
public void doCommand(){
}
Program: 58227
Project: 58227
Buggy source:
public Tree(IDType leaveIDType){
  init();
  setLeaveIDType(leaveIDType);
}

Fixed version (ground truth):
public Tree(IDType leaveIDType){
  init();
  initializeIDTypes(leaveIDType);
}
Program: 58228
Project: 58228
Buggy source:
/** 
 * Returns the id type of the leaves
 * @return
 */
public IDType getLeaveIDType(){
  return leaveIDType;
}

Fixed version (ground truth):
/** 
 * Returns the id type of the leaves
 * @return
 */
public IDType getLeaveIDType(){
  return leafIDType;
}
Program: 58230
Project: 58230
Buggy source:
private void createMenuContent(EIDType idType,int id){
  if (idType.getCategory() == EIDCategory.GENE) {
    ContentContextMenuItemContainer geneContainer=new ContentContextMenuItemContainer();
    geneContainer.setID(EIDType.DAVID,id);
    addItemContainer(geneContainer);
    addSeparator();
  }
  RemoveBookmarkItem removeBookmarkItem=new RemoveBookmarkItem(idType,id);
  addContextMenuItem(removeBookmarkItem);
}

Fixed version (ground truth):
private void createMenuContent(IDType idType,int id){
  if (idType.getCategory() == EIDCategory.GENE) {
    ContentContextMenuItemContainer geneContainer=new ContentContextMenuItemContainer();
    geneContainer.setID(EIDType.DAVID,id);
    addItemContainer(geneContainer);
    addSeparator();
  }
  RemoveBookmarkItem removeBookmarkItem=new RemoveBookmarkItem(idType,id);
  addContextMenuItem(removeBookmarkItem);
}
Program: 58231
Project: 58231
Buggy source:
/** 
 * Set the experiment index
 */
public void setID(EIDType idType,int id){
  createMenuContent(idType,id);
}

Fixed version (ground truth):
/** 
 * Set the experiment index
 */
public void setID(IDType idType,int id){
  createMenuContent(idType,id);
}
Program: 58232
Project: 58232
Buggy source:
public void setID(EIDType idType,int id){
  Integer davidID=GeneralManager.get().getIDMappingManager().getID(idType,EIDType.DAVID,id);
  if (davidID == null)   return;
  createMenuContent(davidID);
}

Fixed version (ground truth):
public void setID(IDType idType,int id){
  Integer davidID=GeneralManager.get().getIDMappingManager().getID(idType,IDType.DAVID,id);
  if (davidID == null)   return;
  createMenuContent(davidID);
}
Program: 58233
Project: 58233
Buggy source:
private void createMenuContent(int experimentIndex){
  String sExperimentTitle=((ISetBasedDataDomain)DataDomainManager.getInstance().getDataDomain("String_Node_Str")).getSet().get(experimentIndex).getLabel();
  addHeading(sExperimentTitle);
  BookmarkItem addToListItem=new BookmarkItem(EIDType.EXPERIMENT_INDEX,experimentIndex);
  addContextMenuItem(addToListItem);
}

Fixed version (ground truth):
private void createMenuContent(IDType idType,int experimentIndex){
  String sExperimentTitle=((ISetBasedDataDomain)DataDomainManager.getInstance().getDataDomain("String_Node_Str")).getSet().get(experimentIndex).getLabel();
  addHeading(sExperimentTitle);
  BookmarkItem addToListItem=new BookmarkItem(idType,experimentIndex);
  addContextMenuItem(addToListItem);
}
Program: 58234
Project: 58234
Buggy source:
/** 
 * Set the experiment index
 */
public void setID(int experimentIndex){
  createMenuContent(experimentIndex);
}

Fixed version (ground truth):
/** 
 * Set the experiment index
 */
public void setID(IDType idType,int experimentIndex){
  createMenuContent(idType,experimentIndex);
}
Program: 58235
Project: 58235
Buggy source:
public void setGenes(EIDType idType,ArrayList<Integer> genes){
  if (isGeneGroup) {
    ShowPathwaysByGenesItem pathwaysItem=new ShowPathwaysByGenesItem();
    pathwaysItem.setIDs(idType,genes);
    addContextMenuItem(pathwaysItem);
  }
}

Fixed version (ground truth):
public void setGenes(IDType idType,ArrayList<Integer> genes){
  if (isGeneGroup) {
    ShowPathwaysByGenesItem pathwaysItem=new ShowPathwaysByGenesItem();
    pathwaysItem.setIDs(idType,genes);
    addContextMenuItem(pathwaysItem);
  }
}
Program: 58236
Project: 58236
Buggy source:
/** 
 * Constructor which takes an array of storage indices.
 * @param alStorageIndex
 */
public RemoveBookmarkItem(EIDType idType,ArrayList<Integer> ids){
  super();
  setIconTexture(EIconTextures.CM_BOOKMARK);
  setText("String_Node_Str");
  BookmarkEvent<Integer> event=new BookmarkEvent<Integer>(idType);
  for (  Integer id : ids)   event.addBookmark(id);
  registerEvent(event);
}

Fixed version (ground truth):
/** 
 * Constructor which takes an array of storage indices.
 * @param alStorageIndex
 */
public RemoveBookmarkItem(IDType idType,ArrayList<Integer> ids){
  super();
  setIconTexture(EIconTextures.CM_BOOKMARK);
  setText("String_Node_Str");
  BookmarkEvent<Integer> event=new BookmarkEvent<Integer>(idType);
  for (  Integer id : ids)   event.addBookmark(id);
  registerEvent(event);
}
Program: 58237
Project: 58237
Buggy source:
/** 
 * Convenience method that automatically creates a   {@link LoadPathwaysByGeneEvent} based on a david ID
 * @param david the int code associated with a refseq
 */
public void setIDs(EIDType idType,ArrayList<Integer> genes){
  HashMap<PathwayGraph,Integer> hashPathwaysToOccurences=new HashMap<PathwayGraph,Integer>();
  for (  int gene : genes) {
    int david=GeneralManager.get().getIDMappingManager().getID(idType,EIDType.DAVID,gene);
    Set<PathwayGraph> pathwayGraphs=GeneticIDMappingHelper.get().getPathwayGraphsByGeneID(EIDType.DAVID,david);
    if (pathwayGraphs != null) {
      for (      PathwayGraph pathwayGraph : pathwayGraphs) {
        if (!hashPathwaysToOccurences.containsKey(pathwayGraph))         hashPathwaysToOccurences.put(pathwayGraph,1);
 else {
          int occurences=hashPathwaysToOccurences.get(pathwayGraph);
          occurences++;
          hashPathwaysToOccurences.put(pathwayGraph,occurences);
        }
      }
    }
  }
  ArrayList<Pair<Integer,PathwayGraph>> pathways=new ArrayList<Pair<Integer,PathwayGraph>>();
  for (  PathwayGraph pathway : hashPathwaysToOccurences.keySet()) {
    pathways.add(new Pair<Integer,PathwayGraph>(hashPathwaysToOccurences.get(pathway),pathway));
  }
  Collections.sort(pathways);
  for (int count=pathways.size() - 1; count >= 0; count--) {
    Pair<Integer,PathwayGraph> pair=pathways.get(count);
    if (pair.getFirst() > 1) {
      LoadPathwaysByPathwayIDItem item=new LoadPathwaysByPathwayIDItem(pair.getSecond().getID(),pair.getFirst());
      addSubItem(item);
    }
  }
}

Fixed version (ground truth):
/** 
 * Convenience method that automatically creates a   {@link LoadPathwaysByGeneEvent} based on a david ID
 * @param david the int code associated with a refseq
 */
public void setIDs(IDType idType,ArrayList<Integer> genes){
  HashMap<PathwayGraph,Integer> hashPathwaysToOccurences=new HashMap<PathwayGraph,Integer>();
  for (  int gene : genes) {
    int david=GeneralManager.get().getIDMappingManager().getID(idType,EIDType.DAVID,gene);
    Set<PathwayGraph> pathwayGraphs=GeneticIDMappingHelper.get().getPathwayGraphsByGeneID(EIDType.DAVID,david);
    if (pathwayGraphs != null) {
      for (      PathwayGraph pathwayGraph : pathwayGraphs) {
        if (!hashPathwaysToOccurences.containsKey(pathwayGraph))         hashPathwaysToOccurences.put(pathwayGraph,1);
 else {
          int occurences=hashPathwaysToOccurences.get(pathwayGraph);
          occurences++;
          hashPathwaysToOccurences.put(pathwayGraph,occurences);
        }
      }
    }
  }
  ArrayList<Pair<Integer,PathwayGraph>> pathways=new ArrayList<Pair<Integer,PathwayGraph>>();
  for (  PathwayGraph pathway : hashPathwaysToOccurences.keySet()) {
    pathways.add(new Pair<Integer,PathwayGraph>(hashPathwaysToOccurences.get(pathway),pathway));
  }
  Collections.sort(pathways);
  for (int count=pathways.size() - 1; count >= 0; count--) {
    Pair<Integer,PathwayGraph> pair=pathways.get(count);
    if (pair.getFirst() > 1) {
      LoadPathwaysByPathwayIDItem item=new LoadPathwaysByPathwayIDItem(pair.getSecond().getID(),pair.getFirst());
      addSubItem(item);
    }
  }
}
Program: 58240
Project: 58240
Buggy source:
protected final boolean closeCurrentTag(){
  if (this.currentHandler == null)   throw new IllegalStateException("String_Node_Str");
  IXmlParserHandler buffer=currentHandler;
  if (!llXmlParserStack.isEmpty()) {
    if (!llXmlParserStack.remove(buffer))     return false;
    if (llXmlParserStack.isEmpty()) {
      currentHandler=null;
    }
 else {
      currentHandler=llXmlParserStack.getLast();
    }
  }
 else {
    currentHandler=null;
  }
  if (buffer.isHandlerDestoryedAfterClosingTag()) {
    unregisterSaxHandler(buffer.getXmlActivationTag());
    buffer.destroyHandler();
    buffer=null;
  }
 else {
  }
  return true;
}

Fixed version (ground truth):
protected final boolean closeCurrentTag(){
  if (this.currentHandler == null)   throw new IllegalStateException("String_Node_Str");
  IXmlParserHandler buffer=currentHandler;
  if (!llXmlParserStack.isEmpty()) {
    if (!llXmlParserStack.remove(buffer))     return false;
    if (llXmlParserStack.isEmpty()) {
      currentHandler=null;
    }
 else {
      currentHandler=llXmlParserStack.getLast();
    }
  }
 else {
    currentHandler=null;
  }
  if (buffer.isHandlerDestoryedAfterClosingTag()) {
    unregisterSaxHandler(buffer.getXmlActivationTag());
    buffer.destroyHandler();
    buffer=null;
  }
  return true;
}