nus-yam/ex-repair huggingface dataset:
Program: 59057
Project: 59057
Buggy source:
@Override public void triggerParsingPathwayDatabases(){
  pathwayLoaderThread=new PathwayLoaderThread(hashPathwayDatabase.values());
}

Fixed version (ground truth):
@Override public void triggerParsingPathwayDatabases(){
  new PathwayLoaderThread(hashPathwayDatabase.values());
}
Program: 59058
Project: 59058
Buggy source:
@Override public IStatus run(IProgressMonitor monitor){
  monitor.beginTask("String_Node_Str",100);
  monitor.subTask("String_Node_Str");
  PathwayLoaderThread.loadAllPathwaysByType(GeneralManager.get(),GeneralManager.get().getPathwayManager().getPathwayDatabaseByType(EPathwayDatabaseType.KEGG));
  monitor.worked(50);
  monitor.subTask("String_Node_Str");
  PathwayLoaderThread.loadAllPathwaysByType(GeneralManager.get(),GeneralManager.get().getPathwayManager().getPathwayDatabaseByType(EPathwayDatabaseType.BIOCARTA));
  monitor.worked(50);
  monitor.done();
  return Status.OK_STATUS;
}

Fixed version (ground truth):
@Override public IStatus run(IProgressMonitor monitor){
  monitor.beginTask("String_Node_Str",100);
  monitor.subTask("String_Node_Str");
  PathwayLoaderThread.loadAllPathwaysByType(GeneralManager.get(),GeneralManager.get().getPathwayManager().getPathwayDatabaseByType(EPathwayDatabaseType.KEGG));
  monitor.worked(50);
  monitor.subTask("String_Node_Str");
  PathwayLoaderThread.loadAllPathwaysByType(GeneralManager.get(),GeneralManager.get().getPathwayManager().getPathwayDatabaseByType(EPathwayDatabaseType.BIOCARTA));
  monitor.worked(50);
  GeneralManager.get().getPathwayManager().notifyPathwayLoadingFinished(true);
  monitor.done();
  return Status.OK_STATUS;
}
Program: 59059
Project: 59059
Buggy source:
/** 
 * Constructor.
 * @param iId
 * @param sReactionId
 * @param sType
 */
public PathwayReactionEdgeGraphItem(final int iId,final String sReactionId,final String sType){
  super(iId,EGraphItemKind.EDGE);
  this.sReactionId=sReactionId;
  type=EPathwayReactionEdgeType.valueOf(sType);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param sReactionId
 * @param sType
 */
public PathwayReactionEdgeGraphItem(final String sReactionId,final String sType){
  super(EGraphItemKind.EDGE);
  this.sReactionId=sReactionId;
  type=EPathwayReactionEdgeType.valueOf(sType);
}
Program: 59060
Project: 59060
Buggy source:
/** 
 * Constructor.
 * @param iId
 */
public PathwayReactionEdgeGraphItemRep(final int iId){
  super(iId,EGraphItemKind.EDGE);
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public PathwayReactionEdgeGraphItemRep(){
  super(EGraphItemKind.EDGE);
}
Program: 59061
Project: 59061
Buggy source:
/** 
 * Constructor.
 * @param iId
 * @param sType
 */
public PathwayRelationEdgeGraphItem(final int iId,final String sType){
  super(iId,EGraphItemKind.EDGE);
  type=EPathwayRelationEdgeType.valueOf(sType);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param sType
 */
public PathwayRelationEdgeGraphItem(final String sType){
  super(EGraphItemKind.EDGE);
  type=EPathwayRelationEdgeType.valueOf(sType);
}
Program: 59062
Project: 59062
Buggy source:
/** 
 * Constructor.
 * @param iId
 */
public PathwayRelationEdgeGraphItemRep(final int iId){
  super(iId,EGraphItemKind.EDGE);
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public PathwayRelationEdgeGraphItemRep(){
  super(EGraphItemKind.EDGE);
}
Program: 59063
Project: 59063
Buggy source:
public void runApplication(){
  Iterator<Shell> shellIterator;
  Shell currentShell;
  setProgressBarVisible(false);
  shellIterator=windowMap.values().iterator();
  while (shellIterator.hasNext()) {
    currentShell=shellIterator.next();
    currentShell.setVisible(true);
  }
  GeneralManager.get().getViewGLCanvasManager().createAnimator();
  shellIterator=windowMap.values().iterator();
  while (shellIterator.hasNext()) {
    currentShell=shellIterator.next();
    while (!currentShell.isDisposed()) {
      if (!display.readAndDispatch())       display.sleep();
    }
  }
}

Fixed version (ground truth):
public void runApplication(){
  Iterator<Shell> shellIterator;
  Shell currentShell;
  if (loadingProgressBarWindow != null)   setProgressBarVisible(false);
  shellIterator=windowMap.values().iterator();
  while (shellIterator.hasNext()) {
    currentShell=shellIterator.next();
    currentShell.setVisible(true);
  }
  GeneralManager.get().getViewGLCanvasManager().createAnimator();
  shellIterator=windowMap.values().iterator();
  while (shellIterator.hasNext()) {
    currentShell=shellIterator.next();
    while (!currentShell.isDisposed()) {
      if (!display.readAndDispatch())       display.sleep();
    }
  }
}
Program: 59064
Project: 59064
Buggy source:
public void setProgressBarVisible(final boolean state){
}

Fixed version (ground truth):
public void setProgressBarVisible(final boolean state){
  loadingProgressBarWindow.setVisible(state);
  loadingProgressBar.setVisible(state);
}
Program: 59065
Project: 59065
Buggy source:
public IGraphItem createRelationEdge(final IGraphItem graphItemIn,final IGraphItem graphItemOut,final String sType);

Fixed version (ground truth):
public IGraphItem createRelationEdge(final List<IGraphItem> alGraphItemIn,final List<IGraphItem> alGraphItemOut,final String sType);
Program: 59066
Project: 59066
Buggy source:
public IGraphItem createReactionEdge(final IGraph parentPathway,final String sReactionName,final String sReactionType){
  int iGeneratedId=-1;
  IGraphItem pathwayReactionEdge=new PathwayReactionEdgeGraphItem(iGeneratedId,sReactionName,sReactionType);
  iGeneratedId=-1;
  IGraphItem pathwayReactionEdgeRep=new PathwayReactionEdgeGraphItemRep(iGeneratedId);
  IGraph rootPathway=generalManager.getPathwayManager().getRootPathway();
  rootPathway.addItem(pathwayReactionEdge);
  pathwayReactionEdge.addGraph(rootPathway,EGraphItemHierarchy.GRAPH_PARENT);
  parentPathway.addItem(pathwayReactionEdgeRep);
  pathwayReactionEdgeRep.addGraph(parentPathway,EGraphItemHierarchy.GRAPH_PARENT);
  pathwayReactionEdgeRep.addItem(pathwayReactionEdge,EGraphItemProperty.ALIAS_PARENT);
  pathwayReactionEdge.addItem(pathwayReactionEdgeRep,EGraphItemProperty.ALIAS_CHILD);
  return pathwayReactionEdgeRep;
}

Fixed version (ground truth):
public IGraphItem createReactionEdge(final IGraph parentPathway,final String sReactionName,final String sReactionType){
  IGraphItem pathwayReactionEdge=new PathwayReactionEdgeGraphItem(sReactionName,sReactionType);
  IGraphItem pathwayReactionEdgeRep=new PathwayReactionEdgeGraphItemRep();
  IGraph rootPathway=generalManager.getPathwayManager().getRootPathway();
  rootPathway.addItem(pathwayReactionEdge);
  pathwayReactionEdge.addGraph(rootPathway,EGraphItemHierarchy.GRAPH_PARENT);
  parentPathway.addItem(pathwayReactionEdgeRep);
  pathwayReactionEdgeRep.addGraph(parentPathway,EGraphItemHierarchy.GRAPH_PARENT);
  pathwayReactionEdgeRep.addItem(pathwayReactionEdge,EGraphItemProperty.ALIAS_PARENT);
  pathwayReactionEdge.addItem(pathwayReactionEdgeRep,EGraphItemProperty.ALIAS_CHILD);
  return pathwayReactionEdgeRep;
}
Program: 59067
Project: 59067
Buggy source:
public void createRelationEdgeRep(final IGraph parentPathway,final IGraphItem pathwayRelationEdge,final IGraphItem graphItemIn,final IGraphItem graphItemOut){
  int iGeneratedId=-1;
  IGraphItem pathwayRelationEdgeRep=new PathwayRelationEdgeGraphItemRep(iGeneratedId);
  parentPathway.addItem(pathwayRelationEdgeRep);
  pathwayRelationEdgeRep.addGraph(parentPathway,EGraphItemHierarchy.GRAPH_PARENT);
  pathwayRelationEdgeRep.addItem(pathwayRelationEdge,EGraphItemProperty.ALIAS_PARENT);
  pathwayRelationEdge.addItem(pathwayRelationEdgeRep,EGraphItemProperty.ALIAS_CHILD);
  pathwayRelationEdgeRep.addItemDoubleLinked(graphItemIn,EGraphItemProperty.INCOMING);
  pathwayRelationEdgeRep.addItemDoubleLinked(graphItemOut,EGraphItemProperty.OUTGOING);
}

Fixed version (ground truth):
public void createRelationEdgeRep(final IGraph parentPathway,final IGraphItem pathwayRelationEdge,final IGraphItem graphItemIn,final IGraphItem graphItemOut){
  IGraphItem pathwayRelationEdgeRep=new PathwayRelationEdgeGraphItemRep();
  parentPathway.addItem(pathwayRelationEdgeRep);
  pathwayRelationEdgeRep.addGraph(parentPathway,EGraphItemHierarchy.GRAPH_PARENT);
  pathwayRelationEdgeRep.addItem(pathwayRelationEdge,EGraphItemProperty.ALIAS_PARENT);
  pathwayRelationEdge.addItem(pathwayRelationEdgeRep,EGraphItemProperty.ALIAS_CHILD);
  pathwayRelationEdgeRep.addItemDoubleLinked(graphItemIn,EGraphItemProperty.INCOMING);
  pathwayRelationEdgeRep.addItemDoubleLinked(graphItemOut,EGraphItemProperty.OUTGOING);
}
Program: 59068
Project: 59068
Buggy source:
public IGraphItem createRelationEdge(final IGraphItem graphItemIn,final IGraphItem graphItemOut,final String sType){
  int iGeneratedId=-1;
  IGraphItem pathwayRelationEdge=new PathwayRelationEdgeGraphItem(iGeneratedId,sType);
  IGraph rootPathway=generalManager.getPathwayManager().getRootPathway();
  rootPathway.addItem(pathwayRelationEdge);
  pathwayRelationEdge.addGraph(rootPathway,EGraphItemHierarchy.GRAPH_PARENT);
  pathwayRelationEdge.addItemDoubleLinked(graphItemIn,EGraphItemProperty.INCOMING);
  pathwayRelationEdge.addItemDoubleLinked(graphItemOut,EGraphItemProperty.OUTGOING);
  return pathwayRelationEdge;
}

Fixed version (ground truth):
public IGraphItem createRelationEdge(final List<IGraphItem> alGraphItemIn,final List<IGraphItem> alGraphItemOut,final String sType){
  IGraphItem pathwayRelationEdge=new PathwayRelationEdgeGraphItem(sType);
  IGraph rootPathway=generalManager.getPathwayManager().getRootPathway();
  rootPathway.addItem(pathwayRelationEdge);
  pathwayRelationEdge.addGraph(rootPathway,EGraphItemHierarchy.GRAPH_PARENT);
  for (  IGraphItem graphItemIn : alGraphItemIn) {
    pathwayRelationEdge.addItemDoubleLinked(graphItemIn,EGraphItemProperty.INCOMING);
  }
  for (  IGraphItem graphItemOut : alGraphItemOut) {
    pathwayRelationEdge.addItemDoubleLinked(graphItemOut,EGraphItemProperty.OUTGOING);
  }
  return pathwayRelationEdge;
}
Program: 59071
Project: 59071
Buggy source:
/** 
 * Reacts on the elements of the relation tag. An example relation tag looks like this: <relation entry1="28" entry2="32" type="ECrel">
 */
protected void handleRelationTag(){
  int iSourceVertexId=0;
  int iTargetVertexId=0;
  String sType="String_Node_Str";
  for (int iAttributeIndex=0; iAttributeIndex < attributes.getLength(); iAttributeIndex++) {
    sAttributeName=attributes.getLocalName(iAttributeIndex);
    if ("String_Node_Str".equals(sAttributeName)) {
      sAttributeName=attributes.getQName(iAttributeIndex);
    }
    if (sAttributeName.equals("String_Node_Str"))     sType=attributes.getValue(iAttributeIndex);
 else     if (sAttributeName.equals("String_Node_Str"))     iSourceVertexId=new Integer(attributes.getValue(iAttributeIndex));
 else     if (sAttributeName.equals("String_Node_Str"))     iTargetVertexId=new Integer(attributes.getValue(iAttributeIndex));
  }
  IGraphItem graphItemIn=hashKgmlEntryIdToVertexRepId.get(iSourceVertexId);
  IGraphItem graphItemOut=hashKgmlEntryIdToVertexRepId.get(iTargetVertexId);
  IGraphItem relationEdge=generalManager.getPathwayItemManager().createRelationEdge(((PathwayVertexGraphItemRep)graphItemIn).getPathwayVertexGraphItem(),((PathwayVertexGraphItemRep)graphItemOut).getPathwayVertexGraphItem(),sType);
  generalManager.getPathwayItemManager().createRelationEdgeRep(currentPathway,relationEdge,graphItemIn,graphItemOut);
}

Fixed version (ground truth):
/** 
 * Reacts on the elements of the relation tag. An example relation tag looks like this: <relation entry1="28" entry2="32" type="ECrel">
 */
protected void handleRelationTag(){
  int iSourceVertexId=0;
  int iTargetVertexId=0;
  String sType="String_Node_Str";
  for (int iAttributeIndex=0; iAttributeIndex < attributes.getLength(); iAttributeIndex++) {
    sAttributeName=attributes.getLocalName(iAttributeIndex);
    if ("String_Node_Str".equals(sAttributeName)) {
      sAttributeName=attributes.getQName(iAttributeIndex);
    }
    if (sAttributeName.equals("String_Node_Str"))     sType=attributes.getValue(iAttributeIndex);
 else     if (sAttributeName.equals("String_Node_Str"))     iSourceVertexId=new Integer(attributes.getValue(iAttributeIndex));
 else     if (sAttributeName.equals("String_Node_Str"))     iTargetVertexId=new Integer(attributes.getValue(iAttributeIndex));
  }
  IGraphItem graphItemIn=hashKgmlEntryIdToVertexRepId.get(iSourceVertexId);
  IGraphItem graphItemOut=hashKgmlEntryIdToVertexRepId.get(iTargetVertexId);
  IGraphItem relationEdge=generalManager.getPathwayItemManager().createRelationEdge(((PathwayVertexGraphItemRep)graphItemIn).getAllItemsByProp(EGraphItemProperty.ALIAS_PARENT),((PathwayVertexGraphItemRep)graphItemOut).getAllItemsByProp(EGraphItemProperty.ALIAS_PARENT),sType);
  generalManager.getPathwayItemManager().createRelationEdgeRep(currentPathway,relationEdge,graphItemIn,graphItemOut);
}
Program: 59073
Project: 59073
Buggy source:
public void setParameterHandler(final IParameterHandler parameterHandler){
  super.setParameterHandler(parameterHandler);
}

Fixed version (ground truth):
public void setParameterHandler(final IParameterHandler parameterHandler){
  super.setParameterHandler(parameterHandler);
  String sAttrib1=parameterHandler.getValueString(CommandQueueSaxType.TAG_ATTRIBUTE1.getXmlKey());
  if (sAttrib1.length() > 0) {
    if (sAttrib1.equalsIgnoreCase("String_Node_Str"))     storageType=EManagerObjectType.STORAGE_NOMINAL;
 else     if (sAttrib1.equalsIgnoreCase("String_Node_Str") || sAttrib1.equalsIgnoreCase("String_Node_Str"))     storageType=EManagerObjectType.STORAGE_NUMERICAL;
  }
}
Program: 59074
Project: 59074
Buggy source:
public void setAttributes(int iStorageID){
  iUniqueId=iStorageID;
}

Fixed version (ground truth):
public void setAttributes(int iStorageID,EManagerObjectType stroageType){
  iUniqueId=iStorageID;
  this.storageType=stroageType;
}
Program: 59075
Project: 59075
Buggy source:
/** 
 * Load data from file using a token pattern.
 * @see org.caleydo.core.parser.ascii.microarray.MicroArrayLoader1Storage#loadData()
 * @see org.caleydo.core.command.ICommand#doCommand()
 */
public void doCommand() throws CaleydoRuntimeException {
  IStorageManager storageManager=generalManager.getStorageManager();
  IStorage storage=(IStorage)storageManager.createStorage(EManagerObjectType.STORAGE);
  storage.setId(iUniqueId);
  storage.setLabel(sLabel);
  storageManager.registerItem(storage,storage.getId());
  generalManager.getLogger().log(Level.INFO,"String_Node_Str" + iUniqueId);
  commandManager.runDoCommand(this);
}

Fixed version (ground truth):
/** 
 * Load data from file using a token pattern.
 * @see org.caleydo.core.parser.ascii.microarray.MicroArrayLoader1Storage#loadData()
 * @see org.caleydo.core.command.ICommand#doCommand()
 */
public void doCommand() throws CaleydoRuntimeException {
  IStorageManager storageManager=generalManager.getStorageManager();
  IStorage storage=(IStorage)storageManager.createStorage(storageType);
  storage.setId(iUniqueId);
  storage.setLabel(sLabel);
  storageManager.registerItem(storage,storage.getId());
  generalManager.getLogger().log(Level.INFO,"String_Node_Str" + iUniqueId);
  commandManager.runDoCommand(this);
}
Program: 59076
Project: 59076
Buggy source:
public T get(EDataKind dataKind,int index){
  return null;
}

Fixed version (ground truth):
public T get(EDataKind dataKind,int index){
  return (T)((NominalStringCContainer)(hashCContainers.get(dataKind))).get(index);
}
Program: 59077
Project: 59077
Buggy source:
@SuppressWarnings("String_Node_Str") public void setRawData(ArrayList<T> alData){
  if (bRawDataSet)   throw new CaleydoRuntimeException("String_Node_Str",CaleydoRuntimeExceptionType.DATAHANDLING);
  bRawDataSet=true;
  if (alData.isEmpty()) {
    throw new CaleydoRuntimeException("String_Node_Str",CaleydoRuntimeExceptionType.DATAHANDLING);
  }
 else {
    if (alData.get(0) instanceof String) {
      ArrayList<String> sAlData=(ArrayList<String>)alData;
      NominalStringCContainer sStorage=new NominalStringCContainer(sAlData);
      hashCContainers.put(EDataKind.RAW,sStorage);
    }
 else {
      throw new CaleydoRuntimeException("String_Node_Str" + "String_Node_Str",CaleydoRuntimeExceptionType.DATAHANDLING);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void setRawData(ArrayList<T> alData){
  if (bRawDataSet)   throw new CaleydoRuntimeException("String_Node_Str",CaleydoRuntimeExceptionType.DATAHANDLING);
  bRawDataSet=true;
  if (alData.isEmpty()) {
    throw new CaleydoRuntimeException("String_Node_Str",CaleydoRuntimeExceptionType.DATAHANDLING);
  }
 else {
    if (alData.get(0) instanceof String) {
      rawDataType=ERawDataType.STRING;
      ArrayList<String> sAlData=(ArrayList<String>)alData;
      NominalStringCContainer sStorage=new NominalStringCContainer(sAlData);
      hashCContainers.put(EDataKind.RAW,sStorage);
    }
 else {
      throw new CaleydoRuntimeException("String_Node_Str" + "String_Node_Str",CaleydoRuntimeExceptionType.DATAHANDLING);
    }
  }
}
Program: 59078
Project: 59078
Buggy source:
public IStorage createStorage(final EManagerObjectType useStorageType){
  if (useStorageType.getGroupType() != EManagerType.DATA_STORAGE) {
    throw new CaleydoRuntimeException("String_Node_Str" + useStorageType.name());
  }
  final int iNewId=this.createId(useStorageType);
switch (useStorageType) {
case STORAGE:
    return new NumericalStorage(iNewId,generalManager);
default :
  throw new CaleydoRuntimeException("String_Node_Str" + useStorageType.toString() + "String_Node_Str");
}
}

Fixed version (ground truth):
public IStorage createStorage(final EManagerObjectType useStorageType){
  if (useStorageType.getGroupType() != EManagerType.DATA_STORAGE) {
    throw new CaleydoRuntimeException("String_Node_Str" + useStorageType.name());
  }
  final int iNewId=this.createId(useStorageType);
switch (useStorageType) {
case STORAGE_NUMERICAL:
    return new NumericalStorage(iNewId,generalManager);
case STORAGE_NOMINAL:
  return new NominalStorage<String>(iNewId,generalManager);
default :
throw new CaleydoRuntimeException("String_Node_Str" + useStorageType.toString() + "String_Node_Str");
}
}
Program: 59082
Project: 59082
Buggy source:
protected void handleEvents(EPickingType pickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  if (remoteRenderingGLCanvas.getHierarchyLayerByGLCanvasListenerId(iUniqueId).getCapacity() > 5) {
    return;
  }
  ArrayList<Integer> iAlOldSelection;
switch (pickingType) {
case HEAT_MAP_FIELD_SELECTION:
switch (pickingMode) {
case CLICKED:
      extSelectionManager.clear();
    iAlOldSelection=prepareSelection(verticalSelectionManager,EViewInternalSelectionType.SELECTION);
  verticalSelectionManager.clearSelection(EViewInternalSelectionType.SELECTION);
verticalSelectionManager.addToType(EViewInternalSelectionType.SELECTION,iExternalID);
if (eFieldDataType == EInputDataType.GENE) {
propagateGeneSelection(iExternalID,2,iAlOldSelection);
}
break;
case MOUSE_OVER:
extSelectionManager.clear();
iAlOldSelection=prepareSelection(verticalSelectionManager,EViewInternalSelectionType.SELECTION);
verticalSelectionManager.clearSelection(EViewInternalSelectionType.MOUSE_OVER);
verticalSelectionManager.addToType(EViewInternalSelectionType.MOUSE_OVER,iExternalID);
if (eFieldDataType == EInputDataType.GENE) {
propagateGeneSelection(iExternalID,1,iAlOldSelection);
}
break;
}
bIsDisplayListDirtyLocal=true;
bIsDisplayListDirtyRemote=true;
pickingManager.flushHits(iUniqueId,pickingType);
break;
}
}

Fixed version (ground truth):
protected void handleEvents(EPickingType pickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  if (remoteRenderingGLCanvas != null) {
    if (remoteRenderingGLCanvas.getHierarchyLayerByGLCanvasListenerId(iUniqueId).getCapacity() > 5) {
      return;
    }
  }
  ArrayList<Integer> iAlOldSelection;
switch (pickingType) {
case HEAT_MAP_FIELD_SELECTION:
switch (pickingMode) {
case CLICKED:
      extSelectionManager.clear();
    iAlOldSelection=prepareSelection(verticalSelectionManager,EViewInternalSelectionType.SELECTION);
  verticalSelectionManager.clearSelection(EViewInternalSelectionType.SELECTION);
verticalSelectionManager.addToType(EViewInternalSelectionType.SELECTION,iExternalID);
if (eFieldDataType == EInputDataType.GENE) {
propagateGeneSelection(iExternalID,2,iAlOldSelection);
}
break;
case MOUSE_OVER:
extSelectionManager.clear();
iAlOldSelection=prepareSelection(verticalSelectionManager,EViewInternalSelectionType.SELECTION);
verticalSelectionManager.clearSelection(EViewInternalSelectionType.MOUSE_OVER);
verticalSelectionManager.addToType(EViewInternalSelectionType.MOUSE_OVER,iExternalID);
if (eFieldDataType == EInputDataType.GENE) {
propagateGeneSelection(iExternalID,1,iAlOldSelection);
}
break;
}
bIsDisplayListDirtyLocal=true;
bIsDisplayListDirtyRemote=true;
pickingManager.flushHits(iUniqueId,pickingType);
break;
}
}
Program: 59085
Project: 59085
Buggy source:
public ParserTokenHandler(final StorageType setType,final int iSetIndex){
  this.bArrayListNotVector=true;
  this.iIndex=iSetIndex;
  this.enumStorageType=setType;
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public ParserTokenHandler(final StorageType setType,final int iSetIndex){
  this.bArrayListNotVector=true;
  this.iIndex=iSetIndex;
  this.enumStorageType=setType;
}
Program: 59088
Project: 59088
Buggy source:
public void setupGlyphDictionary(ISet glyphDictionary){
  if (glyphDictionary == null) {
    this.generalManager.getLogger().log(Level.WARNING,"String_Node_Str");
    return;
  }
  HashMap<String,GlyphAttributeType> dataTypes=new HashMap<String,GlyphAttributeType>();
  IStorage storageIDs=glyphDictionary.getStorageByDimAndIndex(0,0);
  IStorage storageDomains=glyphDictionary.getStorageByDimAndIndex(0,1);
  int size=storageDomains.getSize(StorageType.STRING);
  System.out.println(storageDomains.getLabel());
  for (int i=0; i < size; ++i) {
    System.out.println(storageDomains.getArrayString()[i]);
  }
}

Fixed version (ground truth):
public void setupGlyphDictionary(ISet glyphDictionary){
  if (glyphDictionary == null) {
    this.generalManager.getLogger().log(Level.WARNING,"String_Node_Str");
    return;
  }
  HashMap<String,GlyphAttributeType> dataTypes=new HashMap<String,GlyphAttributeType>();
  IStorage storageDomains=glyphDictionary.getStorageByDimAndIndex(0,1);
  IStorage storageNominal=glyphDictionary.getStorageByDimAndIndex(0,2);
  IStorage storageGroup=glyphDictionary.getStorageByDimAndIndex(0,3);
  IStorage storageOrdinal=glyphDictionary.getStorageByDimAndIndex(0,4);
  int size=storageDomains.getSize(StorageType.STRING);
  System.out.println(storageDomains.getLabel());
  for (int i=0; i < size; ++i) {
    System.out.println(storageDomains.getArrayString()[i]);
  }
}
Program: 59090
Project: 59090
Buggy source:
public void init(GL gl){
  grid_=new GLCanvasGlyphGrid();
  grid_.buildGrid(gl);
  for (  ISet tmpSet : alSetData) {
    IStorage storagePatientID=tmpSet.getStorageByDimAndIndex(0,0);
    IStorage storageTestInt=tmpSet.getStorageByDimAndIndex(0,1);
    IStorage storageTestFloat=tmpSet.getStorageByDimAndIndex(0,2);
    IStorage storageTestText=tmpSet.getStorageByDimAndIndex(0,3);
  }
}

Fixed version (ground truth):
public void init(GL gl){
  ISet glyphMapping=null;
  ISet glyphData=null;
  for (  ISet tmpSet : alSetData) {
    System.out.println(tmpSet.getLabel());
    if (tmpSet.getLabel().equals("String_Node_Str"))     glyphMapping=tmpSet;
    if (tmpSet.getLabel().equals("String_Node_Str"))     glyphData=tmpSet;
  }
  grid_=new GLCanvasGlyphGrid();
  grid_.loadGlyphs(gl,glyphMapping,glyphData);
  grid_.buildGrid(gl);
  Iterator<GlyphEntry> git=grid_.getGlyphList().values().iterator();
  while (git.hasNext()) {
    GlyphEntry e=git.next();
    e.generateGLLists(gl);
  }
}
Program: 59091
Project: 59091
Buggy source:
public void displayLocal(GL gl){
  pickingManager.handlePicking(iUniqueId,gl,true);
  display(gl);
  checkForHits(gl);
  pickingTriggerMouseAdapter.resetEvents();
}

Fixed version (ground truth):
public void displayLocal(GL gl){
  gl.glTranslatef(0f,0f,-10f);
  gl.glRotatef(45f,1,0,0);
  gl.glRotatef(80f,-1,0,0);
  pickingManager.handlePicking(iUniqueId,gl,true);
  display(gl);
  checkForHits(gl);
  pickingTriggerMouseAdapter.resetEvents();
}
Program: 59092
Project: 59092
Buggy source:
public void display(GL gl){
  gl.glPushMatrix();
  gl.glRotatef(45f,0,0,1);
  gl.glScalef(0.2f,0.2f,0.2f);
  GLSharedObjects.drawAxis(gl);
  gl.glBegin(GL.GL_POLYGON);
{
    displayList_=gl.glGenLists(1);
    gl.glNewList(displayList_,GL.GL_COMPILE);
    Iterator<GlyphEntry> git=grid_.getGlyphList().values().iterator();
    while (git.hasNext()) {
      GlyphEntry e=git.next();
      Vec2i pos=grid_.getGridPosition(e.getX(),e.getY());
      gl.glTranslatef((float)pos.x(),-(float)pos.y(),0f);
      gl.glPushName(pickingManager.getPickingID(iUniqueId,EPickingType.GLYPH_FIELD_SELECTION,e.getID()));
      gl.glCallList(e.getGlList(gl));
      gl.glPopName();
      gl.glTranslatef(-(float)pos.x(),(float)pos.y(),0f);
    }
    gl.glEndList();
  }
  int g=grid_.getGridLayout();
  if (displayList_ >= 0)   gl.glCallList(displayList_);
  gl.glEnd();
  gl.glPopMatrix();
  if (mouseListener_ != null)   mouseListener_.render();
}

Fixed version (ground truth):
public void display(GL gl){
  if (grid_ == null)   return;
  gl.glPushMatrix();
  gl.glRotatef(45f,0,0,1);
  gl.glScalef(0.15f,0.15f,0.15f);
  GLSharedObjects.drawAxis(gl);
  if (displayList_ < 0 || bRedrawDisplayList_) {
    gl.glDeleteLists(displayList_,1);
    displayList_=gl.glGenLists(1);
    gl.glNewList(displayList_,GL.GL_COMPILE);
    if (grid_.getGlyphList() == null) {
      gl.glPopMatrix();
      return;
    }
    Iterator<GlyphEntry> git=grid_.getGlyphList().values().iterator();
    while (git.hasNext()) {
      GlyphEntry e=git.next();
      Vec2i pos=grid_.getGridPosition(e.getX(),e.getY());
      gl.glTranslatef((float)pos.x(),-(float)pos.y(),0f);
      gl.glPushName(pickingManager.getPickingID(iUniqueId,EPickingType.GLYPH_FIELD_SELECTION,e.getID()));
      gl.glCallList(e.getGlList(gl));
      gl.glPopName();
      gl.glTranslatef(-(float)pos.x(),(float)pos.y(),0f);
    }
    gl.glEndList();
    bRedrawDisplayList_=false;
  }
  if (displayListGrid_ >= 0)   gl.glCallList(displayListGrid_);
  if (displayList_ >= 0)   gl.glCallList(displayList_);
  gl.glPopMatrix();
  if (mouseListener_ != null)   mouseListener_.render();
}
Program: 59093
Project: 59093
Buggy source:
protected void handleEvents(EPickingType pickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  if (pickingType != EPickingType.GLYPH_FIELD_SELECTION)   return;
switch (pickingMode) {
case CLICKED:
    GlyphEntry g=grid_.getGlyph(iExternalID);
  System.out.println("String_Node_Str" + Integer.toString(iExternalID) + "String_Node_Str"+ g.getX()+ "String_Node_Str"+ g.getY());
grid_.deSelectAll();
g.select();
break;
default :
}
pickingManager.flushHits(iUniqueId,pickingType);
}

Fixed version (ground truth):
protected void handleEvents(EPickingType pickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  if (pickingType != EPickingType.GLYPH_FIELD_SELECTION)   return;
switch (pickingMode) {
case CLICKED:
    GlyphEntry g=grid_.getGlyph(iExternalID);
  int patientid=g.getParameter(1);
int stagingT=g.getParameter(2);
System.out.println("String_Node_Str" + Integer.toString(iExternalID) + "String_Node_Str"+ g.getX()+ "String_Node_Str"+ g.getY()+ "String_Node_Str"+ patientid+ "String_Node_Str"+ stagingT);
grid_.deSelectAll();
g.select();
bRedrawDisplayList_=true;
break;
default :
}
pickingManager.flushHits(iUniqueId,pickingType);
}
Program: 59094
Project: 59094
Buggy source:
public void initLocal(GL gl){
  init(gl);
  parentGLCanvas.removeMouseWheelListener(pickingTriggerMouseAdapter);
  parentGLCanvas.addMouseWheelListener(mouseListener_);
}

Fixed version (ground truth):
public void initLocal(GL gl){
  init(gl);
  displayListGrid_=grid_.getGridLayout();
  parentGLCanvas.removeMouseWheelListener(pickingTriggerMouseAdapter);
  parentGLCanvas.addMouseWheelListener(mouseListener_);
}
Program: 59095
Project: 59095
Buggy source:
public void displayRemote(GL gl){
  if (bIsTranslationAnimationActive) {
    doTranslation();
  }
  if (bIsDisplayListDirtyRemote) {
    buildDisplayList(gl,iGLDisplayListIndexRemote);
    bIsDisplayListDirtyRemote=false;
  }
  iGLDisplayListToCall=iGLDisplayListIndexRemote;
  display(gl);
  checkForHits(gl);
}

Fixed version (ground truth):
public void displayRemote(GL gl){
  if (bIsTranslationAnimationActive) {
    bIsDisplayListDirtyRemote=true;
    doTranslation();
  }
  if (bIsDisplayListDirtyRemote) {
    buildDisplayList(gl,iGLDisplayListIndexRemote);
    bIsDisplayListDirtyRemote=false;
  }
  iGLDisplayListToCall=iGLDisplayListIndexRemote;
  display(gl);
  checkForHits(gl);
}
Program: 59098
Project: 59098
Buggy source:
public void mouseDragged(MouseEvent e){
  int x=e.getX();
  int y=e.getY();
  Dimension size=e.getComponent().getSize();
  if (!bMouseRightButtonDown) {
    if (!bMouseMiddleButtonDown) {
      Rotf currentRotX=new Rotf();
      Rotf currentRotY=new Rotf();
      float fpercentX=(float)(x - prevMouseX) / (float)(size.width) * fMouseSensitivityRotation;
      float fpercentY=(float)(y - prevMouseY) / (float)(size.height) * fMouseSensitivityRotation;
      currentRotX.set(new Vec3f(0,1,0),fpercentX * MathUtil.PI);
      currentRotY.set(new Vec3f(1,0,0),fpercentY * MathUtil.PI);
      currentRotX=currentRotX.times(currentRotY);
      prevMouseX=x;
      prevMouseY=y;
      Iterator<AGLCanvasUser> iterGLCanvas=alGlCanvas.iterator();
      while (iterGLCanvas.hasNext()) {
        iterGLCanvas.next().getViewCamera().addCameraRotation(currentRotX);
      }
    }
 else {
      float zoomX=fZoomScale * (float)(x - prevMouseX);
      float zoomY=fZoomScale * (float)(prevMouseY - y);
      if ((zoomX < 0.0f) && (zoomY > 0.0f)) {
        zoomX=-zoomX;
      }
      prevMouseX=x;
      prevMouseY=y;
      Iterator<AGLCanvasUser> iterGLCanvas=alGlCanvas.iterator();
      while (iterGLCanvas.hasNext()) {
        iterGLCanvas.next().getViewCamera().addCameraScale(new Vec3f(0,0,zoomY + zoomX));
      }
    }
  }
 else {
    Vec3f addVec3f=new Vec3f(fPanScale * ((float)(x - prevMouseX) / (float)size.width),fPanScale * ((float)(prevMouseY - y) / (float)size.height),0.0f);
    prevMouseX=x;
    prevMouseY=y;
    Iterator<AGLCanvasUser> iterGLCanvas=alGlCanvas.iterator();
    while (iterGLCanvas.hasNext()) {
      iterGLCanvas.next().getViewCamera().addCameraPosition(addVec3f);
    }
  }
}

Fixed version (ground truth):
public void mouseDragged(MouseEvent e){
  int x=e.getX();
  int y=e.getY();
  Dimension size=e.getComponent().getSize();
  if (!bMouseRightButtonDown) {
    if (!bMouseMiddleButtonDown) {
    }
 else {
      float zoomX=fZoomScale * (float)(x - prevMouseX);
      float zoomY=fZoomScale * (float)(prevMouseY - y);
      if ((zoomX < 0.0f) && (zoomY > 0.0f)) {
        zoomX=-zoomX;
      }
      prevMouseX=x;
      prevMouseY=y;
      Iterator<AGLCanvasUser> iterGLCanvas=alGlCanvas.iterator();
      while (iterGLCanvas.hasNext()) {
        iterGLCanvas.next().getViewCamera().addCameraScale(new Vec3f(0,0,zoomY + zoomX));
      }
    }
  }
 else {
    Vec3f addVec3f=new Vec3f(fPanScale * ((float)(x - prevMouseX) / (float)size.width),fPanScale * ((float)(prevMouseY - y) / (float)size.height),0.0f);
    prevMouseX=x;
    prevMouseY=y;
    Iterator<AGLCanvasUser> iterGLCanvas=alGlCanvas.iterator();
    while (iterGLCanvas.hasNext()) {
      iterGLCanvas.next().getViewCamera().addCameraPosition(addVec3f);
    }
  }
}
Program: 59099
Project: 59099
Buggy source:
public void enable(final boolean bEnableRendering){
  this.bEnableRendering=bEnableRendering;
}

Fixed version (ground truth):
public void enable(final boolean bEnableRendering){
}
Program: 59100
Project: 59100
Buggy source:
public void displayLocal(final GL gl){
  if (pickingTriggerMouseAdapter.wasRightMouseButtonPressed()) {
    bEnableNavigationOverlay=!bEnableNavigationOverlay;
    glConnectionLineRenderer.enableRendering(!bEnableNavigationOverlay);
  }
  pickingManager.handlePicking(iUniqueId,gl,true);
  display(gl);
  if (pickingTriggerMouseAdapter.getPickedPoint() != null)   dragAndDrop.setCurrentMousePos(gl,pickingTriggerMouseAdapter.getPickedPoint());
  checkForHits(gl);
  if (pickingTriggerMouseAdapter.wasMouseReleased())   dragAndDrop.stopDragAction();
  pickingTriggerMouseAdapter.resetEvents();
}

Fixed version (ground truth):
public void displayLocal(final GL gl){
  if (pickingTriggerMouseAdapter.wasRightMouseButtonPressed()) {
    bEnableNavigationOverlay=!bEnableNavigationOverlay;
    glConnectionLineRenderer.enableRendering(!bEnableNavigationOverlay);
  }
  pickingManager.handlePicking(iUniqueId,gl,true);
  display(gl);
  if (pickingTriggerMouseAdapter.getPickedPoint() != null)   dragAndDrop.setCurrentMousePos(gl,pickingTriggerMouseAdapter.getPickedPoint());
  if (pickingTriggerMouseAdapter.wasMouseReleased())   dragAndDrop.stopDragAction();
  checkForHits(gl);
  pickingTriggerMouseAdapter.resetEvents();
}
Program: 59101
Project: 59101
Buggy source:
public void renderMemoPad(final GL gl){
  if (trashCanTexture == null)   return;
  TextureCoords texCoords=trashCanTexture.getImageTexCoords();
  gl.glPushName(generalManager.getSingelton().getViewGLCanvasManager().getPickingManager().getPickingID(iUniqueId,EPickingType.MEMO_PAD_SELECTION,MEMO_PAD_TRASH_CAN_PICKING_ID));
  trashCanTexture.enable();
  trashCanTexture.bind();
  gl.glColor3f(1,1,1);
  gl.glBegin(GL.GL_QUADS);
  gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
  gl.glVertex3f(-0.1f,0.09f,4.1f);
  gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
  gl.glVertex3f(-0.5f,0.09f,4.1f);
  gl.glTexCoord2f(texCoords.right(),texCoords.top());
  gl.glVertex3f(-0.5f,0.455f,4.1f);
  gl.glTexCoord2f(texCoords.left(),texCoords.top());
  gl.glVertex3f(-0.1f,0.455f,4.1f);
  gl.glEnd();
  trashCanTexture.disable();
  gl.glPopName();
  if (textRenderer == null)   return;
  String sTmp="String_Node_Str";
  textRenderer.begin3DRendering();
  textRenderer.setColor(0.7f,0.7f,0.7f,1.0f);
  float fPosition=3f;
  for (int iCharacterIndex=0; iCharacterIndex < sTmp.length(); iCharacterIndex++) {
    textRenderer.draw3D(sTmp.subSequence(iCharacterIndex,iCharacterIndex + 1),-1.03f,fPosition,4.001f,0.003f);
    fPosition-=0.3f;
  }
  sTmp="String_Node_Str";
  fPosition=3f;
  for (int iCharacterIndex=0; iCharacterIndex < sTmp.length(); iCharacterIndex++) {
    textRenderer.draw3D(sTmp.subSequence(iCharacterIndex,iCharacterIndex + 1),4.79f,fPosition,4.001f,0.003f);
    fPosition-=0.3f;
  }
  textRenderer.end3DRendering();
}

Fixed version (ground truth):
public void renderMemoPad(final GL gl){
  if (trashCanTexture == null)   return;
  TextureCoords texCoords=trashCanTexture.getImageTexCoords();
  gl.glPushName(generalManager.getSingelton().getViewGLCanvasManager().getPickingManager().getPickingID(iUniqueId,EPickingType.MEMO_PAD_SELECTION,MEMO_PAD_TRASH_CAN_PICKING_ID));
  trashCanTexture.enable();
  trashCanTexture.bind();
  gl.glColor3f(1,1,1);
  gl.glBegin(GL.GL_QUADS);
  gl.glTexCoord2f(texCoords.left(),texCoords.bottom());
  gl.glVertex3f(-0.15f,0.09f,4.1f);
  gl.glTexCoord2f(texCoords.right(),texCoords.bottom());
  gl.glVertex3f(-0.5f,0.09f,4.1f);
  gl.glTexCoord2f(texCoords.right(),texCoords.top());
  gl.glVertex3f(-0.5f,0.41f,4.1f);
  gl.glTexCoord2f(texCoords.left(),texCoords.top());
  gl.glVertex3f(-0.15f,0.41f,4.1f);
  gl.glEnd();
  trashCanTexture.disable();
  gl.glPopName();
  if (textRenderer == null)   return;
  String sTmp="String_Node_Str";
  textRenderer.begin3DRendering();
  textRenderer.setColor(0.7f,0.7f,0.7f,1.0f);
  float fPosition=3f;
  for (int iCharacterIndex=0; iCharacterIndex < sTmp.length(); iCharacterIndex++) {
    textRenderer.draw3D(sTmp.subSequence(iCharacterIndex,iCharacterIndex + 1),-1.03f,fPosition,4.001f,0.003f);
    fPosition-=0.3f;
  }
  sTmp="String_Node_Str";
  fPosition=3f;
  for (int iCharacterIndex=0; iCharacterIndex < sTmp.length(); iCharacterIndex++) {
    textRenderer.draw3D(sTmp.subSequence(iCharacterIndex,iCharacterIndex + 1),4.79f,fPosition,4.001f,0.003f);
    fPosition-=0.3f;
  }
  textRenderer.end3DRendering();
}
Program: 59103
Project: 59103
Buggy source:
@Override public void displayRemote(GL gl){
  display(gl);
  checkForHits(gl);
  pickingTriggerMouseAdapter.resetEvents();
}

Fixed version (ground truth):
@Override public void displayRemote(GL gl){
  display(gl);
  checkForHits(gl);
}
Program: 59104
Project: 59104
Buggy source:
/** 
 * Unselect all lines that are deselected with the gates
 * @param iAxisNumber
 */
private void handleUnselection(int iAxisNumber){
  ArrayList<Integer> alCurrentGateBlocks=alIsGateBlocking.get(iAxisNumber);
  alCurrentGateBlocks.clear();
  IStorage currentStorage=null;
  for (int iPolylineCount=0; iPolylineCount < horizontalSelectionManager.getNumberOfElements(); iPolylineCount++) {
    int iStorageIndex=0;
    if (bRenderStorageHorizontally) {
      currentStorage=alDataStorages.get(alStorageSelection.get(iPolylineCount));
      iStorageIndex=alContentSelection.get(iAxisNumber);
    }
 else {
      iStorageIndex=alContentSelection.get(iPolylineCount);
      currentStorage=alDataStorages.get(alStorageSelection.get(iAxisNumber));
    }
    float fCurrentValue=currentStorage.getArrayFloat()[iStorageIndex] * renderStyle.getAxisHeight();
    if (fCurrentValue < fArGateTipHeight[iAxisNumber] && fCurrentValue > fArGateBottomHeight[iAxisNumber]) {
      if (horizontalSelectionManager.checkStatus(EViewInternalSelectionType.SELECTION,iPolylineCount))       bRenderInfoArea=false;
      alCurrentGateBlocks.add(alPolylineSelection.get(iPolylineCount));
    }
  }
}

Fixed version (ground truth):
/** 
 * Unselect all lines that are deselected with the gates
 * @param iAxisNumber
 */
private void handleUnselection(int iAxisNumber){
  ArrayList<Integer> alCurrentGateBlocks=alIsGateBlocking.get(iAxisNumber);
  alCurrentGateBlocks.clear();
  IStorage currentStorage=null;
  for (int iPolylineCount=0; iPolylineCount < horizontalSelectionManager.getNumberOfElements(); iPolylineCount++) {
    int iStorageIndex=0;
    if (bRenderStorageHorizontally) {
      currentStorage=alDataStorages.get(alStorageSelection.get(iPolylineCount));
      iStorageIndex=alContentSelection.get(iAxisNumber);
    }
 else {
      iStorageIndex=alContentSelection.get(iPolylineCount);
      currentStorage=alDataStorages.get(alStorageSelection.get(iAxisNumber));
    }
    float fCurrentValue=currentStorage.getArrayFloat()[iStorageIndex] * renderStyle.getAxisHeight();
    if (fCurrentValue <= fArGateTipHeight[iAxisNumber] && fCurrentValue >= fArGateBottomHeight[iAxisNumber]) {
      if (horizontalSelectionManager.checkStatus(EViewInternalSelectionType.SELECTION,iPolylineCount))       bRenderInfoArea=false;
      alCurrentGateBlocks.add(alPolylineSelection.get(iPolylineCount));
    }
  }
}
Program: 59105
Project: 59105
Buggy source:
public void displayRemote(final GL gl){
  if (bIsTranslationActive) {
    doTranslation();
  }
  if (bIsDisplayListDirtyRemote) {
    buildPolyLineDisplayList(gl,iGLDisplayListIndexRemote);
    bIsDisplayListDirtyRemote=false;
  }
  iGLDisplayListToCall=iGLDisplayListIndexRemote;
  display(gl);
  checkForHits(gl);
  pickingTriggerMouseAdapter.resetEvents();
}

Fixed version (ground truth):
public void displayRemote(final GL gl){
  if (bIsTranslationActive) {
    doTranslation();
  }
  if (bIsDisplayListDirtyRemote) {
    buildPolyLineDisplayList(gl,iGLDisplayListIndexRemote);
    bIsDisplayListDirtyRemote=false;
  }
  iGLDisplayListToCall=iGLDisplayListIndexRemote;
  display(gl);
  checkForHits(gl);
}
Program: 59107
Project: 59107
Buggy source:
private void renderSelection(final GL gl,EViewInternalSelectionType eSelectionType){
  Set<Integer> selectedSet=verticalSelectionManager.getElements(eSelectionType);
  float fHeight=0;
  float fXPosition=0;
  float fYPosition=0;
switch (eSelectionType) {
case SELECTION:
    gl.glColor4fv(HeatMapRenderStyle.SELECTED_COLOR,0);
  gl.glLineWidth(HeatMapRenderStyle.SELECTED_LINE_WIDTH);
break;
case MOUSE_OVER:
gl.glColor4fv(HeatMapRenderStyle.MOUSE_OVER_COLOR,0);
gl.glLineWidth(HeatMapRenderStyle.MOUSE_OVER_LINE_WIDTH);
break;
}
for (Integer iCurrentColumn : selectedSet) {
int iColumnIndex=alContentSelection.indexOf(iCurrentColumn);
Vec2f vecFieldWidthAndHeight=renderStyle.getFieldWidthAndHeight(iColumnIndex);
fHeight=alStorageSelection.size() * vecFieldWidthAndHeight.y();
fXPosition=renderStyle.getXDistanceAt(iColumnIndex);
fYPosition=renderStyle.getYCenter() - vecFieldWidthAndHeight.y() * alStorageSelection.size() / 2;
gl.glBegin(GL.GL_LINE_LOOP);
gl.glVertex3f(fXPosition,fYPosition,HeatMapRenderStyle.SELECTION_Z);
gl.glVertex3f(fXPosition + vecFieldWidthAndHeight.x(),fYPosition,HeatMapRenderStyle.SELECTION_Z);
gl.glVertex3f(fXPosition + vecFieldWidthAndHeight.x(),fYPosition + fHeight,HeatMapRenderStyle.SELECTION_Z);
gl.glVertex3f(fXPosition,fYPosition + fHeight,HeatMapRenderStyle.SELECTION_Z);
gl.glEnd();
fHeight=0;
fXPosition=0;
}
}

Fixed version (ground truth):
private void renderSelection(final GL gl,EViewInternalSelectionType eSelectionType){
  Set<Integer> selectedSet=verticalSelectionManager.getElements(eSelectionType);
  float fHeight=0;
  float fXPosition=0;
  float fYPosition=0;
switch (eSelectionType) {
case SELECTION:
    gl.glColor4fv(HeatMapRenderStyle.SELECTED_COLOR,0);
  gl.glLineWidth(HeatMapRenderStyle.SELECTED_LINE_WIDTH);
break;
case MOUSE_OVER:
gl.glColor4fv(HeatMapRenderStyle.MOUSE_OVER_COLOR,0);
gl.glLineWidth(HeatMapRenderStyle.MOUSE_OVER_LINE_WIDTH);
break;
}
for (Integer iCurrentColumn : selectedSet) {
int iColumnIndex=alContentSelection.indexOf(iCurrentColumn);
if (iColumnIndex == -1) continue;
Vec2f vecFieldWidthAndHeight=renderStyle.getFieldWidthAndHeight(iColumnIndex);
fHeight=alStorageSelection.size() * vecFieldWidthAndHeight.y();
fXPosition=renderStyle.getXDistanceAt(iColumnIndex);
fYPosition=renderStyle.getYCenter() - vecFieldWidthAndHeight.y() * alStorageSelection.size() / 2;
gl.glBegin(GL.GL_LINE_LOOP);
gl.glVertex3f(fXPosition,fYPosition,HeatMapRenderStyle.SELECTION_Z);
gl.glVertex3f(fXPosition + vecFieldWidthAndHeight.x(),fYPosition,HeatMapRenderStyle.SELECTION_Z);
gl.glVertex3f(fXPosition + vecFieldWidthAndHeight.x(),fYPosition + fHeight,HeatMapRenderStyle.SELECTION_Z);
gl.glVertex3f(fXPosition,fYPosition + fHeight,HeatMapRenderStyle.SELECTION_Z);
gl.glEnd();
fHeight=0;
fXPosition=0;
}
}
Program: 59108
Project: 59108
Buggy source:
public ArrayList<Integer> getSelectionIdArray(){
  return iAlSelectionID;
}

Fixed version (ground truth):
public ArrayList<Integer> getSelectionIdArray(){
  if (iAlSelectionID == null)   return null;
  ArrayList<Integer> alTmp=new ArrayList<Integer>();
  for (  Integer iCurrent : iAlSelectionID) {
    alTmp.add(iCurrent.intValue());
  }
  return alTmp;
}
Program: 59109
Project: 59109
Buggy source:
public void mergeSelection(ArrayList<Integer> iAlNewSelectionID,ArrayList<Integer> iAlNewSelectionGroup,ArrayList<Integer> iAlNewOptional){
  if (iAlSelectionID == null) {
    iAlSelectionID=new ArrayList<Integer>();
    if (iAlNewSelectionGroup != null) {
      iAlSelectionGroup=new ArrayList<Integer>();
    }
    if (iAlNewOptional != null) {
      iAlSelectionGroup=new ArrayList<Integer>();
    }
  }
  int iCount=0;
  for (  Integer iCurrent : iAlNewSelectionID) {
    if (iAlSelectionID.contains(iCurrent)) {
      int iIndex=iAlSelectionID.indexOf(iCurrent);
      if (iAlNewSelectionGroup.get(iCount) == -1) {
        iAlSelectionID.remove(iIndex);
        if (iAlSelectionGroup != null)         iAlSelectionGroup.remove(iIndex);
        if (iAlSelectionOptionalData != null)         iAlSelectionOptionalData.remove(iIndex);
      }
 else {
        if (iAlSelectionGroup != null) {
          int iBiggerSelection=Math.max(iAlNewSelectionGroup.get(iCount),iAlSelectionGroup.get(iCount));
          iAlSelectionGroup.set(iIndex,iBiggerSelection);
        }
        if (iAlSelectionOptionalData != null)         iAlSelectionOptionalData.set(iIndex,iAlNewOptional.get(iCount));
      }
    }
 else {
      iAlSelectionID.add(iCurrent);
      if (iAlSelectionGroup != null)       iAlSelectionGroup.add(iAlNewSelectionGroup.get(iCount));
      if (iAlSelectionOptionalData != null)       iAlSelectionOptionalData.add(iAlNewSelectionGroup.get(iCount));
    }
    iCount++;
  }
}

Fixed version (ground truth):
public void mergeSelection(ArrayList<Integer> iAlNewSelectionID,ArrayList<Integer> iAlNewSelectionGroup,ArrayList<Integer> iAlNewOptional){
  if (iAlSelectionID == null) {
    iAlSelectionID=new ArrayList<Integer>();
    if (iAlNewSelectionGroup != null) {
      iAlSelectionGroup=new ArrayList<Integer>();
    }
    if (iAlNewOptional != null) {
      iAlSelectionGroup=new ArrayList<Integer>();
    }
  }
  int iCount=0;
  for (  Integer iCurrent : iAlNewSelectionID) {
    if (iAlSelectionID.contains(iCurrent)) {
      int iIndex=iAlSelectionID.indexOf(iCurrent);
      if (iAlNewSelectionGroup.get(iCount) == -1) {
        iAlSelectionID.remove(iIndex);
        if (iAlSelectionGroup != null)         iAlSelectionGroup.remove(iIndex);
        if (iAlSelectionOptionalData != null)         iAlSelectionOptionalData.remove(iIndex);
      }
 else {
        if (iAlSelectionGroup != null) {
          int iBiggerSelection=Math.max(iAlNewSelectionGroup.get(iCount),iAlSelectionGroup.get(iIndex));
          iAlSelectionGroup.set(iIndex,iBiggerSelection);
        }
        if (iAlSelectionOptionalData != null)         iAlSelectionOptionalData.set(iIndex,iAlNewOptional.get(iCount));
      }
    }
 else {
      iAlSelectionID.add(iCurrent);
      if (iAlSelectionGroup != null)       iAlSelectionGroup.add(iAlNewSelectionGroup.get(iCount));
      if (iAlSelectionOptionalData != null)       iAlSelectionOptionalData.add(iAlNewOptional.get(iCount));
    }
    iCount++;
  }
}
Program: 59110
Project: 59110
Buggy source:
public ArrayList<Integer> getGroupArray(){
  return iAlSelectionGroup;
}

Fixed version (ground truth):
public ArrayList<Integer> getGroupArray(){
  if (iAlSelectionGroup == null)   return null;
  ArrayList<Integer> alTmp=new ArrayList<Integer>();
  for (  Integer iCurrent : iAlSelectionGroup) {
    alTmp.add(iCurrent.intValue());
  }
  return alTmp;
}
Program: 59111
Project: 59111
Buggy source:
protected ArrayList<Integer> cleanSelection(ArrayList<Integer> iAlSelection,ArrayList<Integer> iAlGroup){
  ArrayList<Integer> alDelete=new ArrayList<Integer>(1);
  for (int iCount=0; iCount < iAlSelection.size(); iCount++) {
    if (iAlSelection.get(iCount) == -1) {
      alDelete.add(iCount);
      continue;
    }
    iAlSelection.set(iCount,iAlSelection.get(iCount) / 1000);
  }
  for (int iCount=alDelete.size() - 1; iCount >= 0; iCount--) {
    iAlSelection.remove(iCount);
    iAlGroup.remove(iCount);
  }
  return iAlSelection;
}

Fixed version (ground truth):
protected void cleanSelection(ArrayList<Integer> iAlSelection,ArrayList<Integer> iAlGroup){
  ArrayList<Integer> alDelete=new ArrayList<Integer>(1);
  for (int iCount=0; iCount < iAlSelection.size(); iCount++) {
    if (iAlSelection.get(iCount) == -1) {
      alDelete.add(iCount);
      continue;
    }
    iAlSelection.set(iCount,iAlSelection.get(iCount) / 1000);
  }
  for (int iCount=alDelete.size() - 1; iCount >= 0; iCount--) {
    iAlSelection.remove(alDelete.get(iCount).intValue());
    iAlGroup.remove(alDelete.get(iCount).intValue());
  }
}
Program: 59112
Project: 59112
Buggy source:
protected ArrayList<Integer> convertAccessionToExpressionIndices(ArrayList<Integer> iAlSelection){
  ArrayList<Integer> iAlSelectionStorageIndices=new ArrayList<Integer>();
  for (int iCount=0; iCount < iAlSelection.size(); iCount++) {
    int iTmp=generalManager.getSingelton().getGenomeIdManager().getIdIntFromIntByMapping(iAlSelection.get(iCount),EGenomeMappingType.ACCESSION_2_MICROARRAY_EXPRESSION);
    if (iTmp == -1)     continue;
    iAlSelectionStorageIndices.add(iTmp);
  }
  return iAlSelectionStorageIndices;
}

Fixed version (ground truth):
protected ArrayList<Integer> convertAccessionToExpressionIndices(ArrayList<Integer> iAlSelection){
  ArrayList<Integer> iAlSelectionStorageIndices=new ArrayList<Integer>();
  for (int iCount=0; iCount < iAlSelection.size(); iCount++) {
    int iTmp=generalManager.getSingelton().getGenomeIdManager().getIdIntFromIntByMapping(iAlSelection.get(iCount),EGenomeMappingType.ACCESSION_2_MICROARRAY_EXPRESSION);
    iAlSelectionStorageIndices.add(iTmp);
  }
  return iAlSelectionStorageIndices;
}