nus-yam/ex-repair huggingface dataset:
Program: 59005
Project: 59005
Buggy source:
/** 
 * Provides a selection delta that contains all elements in the view, with the appropriate external and internal selection IDs
 * @return the SelectionDelta containing all entries in the selection manager
 */
public SelectionDelta getCompleteDelta(){
  SelectionDelta tempDelta=new SelectionDelta(externalIDType,internalIDType);
  HashMap<Integer,Boolean> tempHash;
  for (  ESelectionType selectionType : alSelectionTypes) {
    tempHash=hashSelectionTypes.get(selectionType);
    for (    Integer iElement : tempHash.keySet()) {
      Integer iExternalID=GeneralManager.get().getGenomeIdManager().getID(internalToExternalMapping,iElement);
      if (iExternalID == null || iExternalID == -1) {
        GeneralManager.get().getLogger().log(Level.WARNING,"String_Node_Str" + iElement);
        continue;
      }
      tempDelta.addSelection(iExternalID,selectionType,iElement);
    }
  }
  return tempDelta;
}

Fixed version (ground truth):
/** 
 * Provides a selection delta that contains all elements in the view, with the appropriate external and internal selection IDs
 * @return the SelectionDelta containing all entries in the selectionmanager
 */
public SelectionDelta getCompleteDelta(){
  SelectionDelta tempDelta=new SelectionDelta(externalIDType,internalIDType);
  HashMap<Integer,Boolean> tempHash;
  for (  ESelectionType selectionType : alSelectionTypes) {
    tempHash=hashSelectionTypes.get(selectionType);
    for (    Integer iElement : tempHash.keySet()) {
      Integer iExternalID=GeneralManager.get().getGenomeIdManager().getID(internalToExternalMapping,iElement);
      if (iExternalID == null || iExternalID == -1) {
        GeneralManager.get().getLogger().log(Level.WARNING,"String_Node_Str" + iElement);
        continue;
      }
      tempDelta.addSelection(iExternalID,selectionType,iElement);
    }
  }
  return tempDelta;
}
Program: 59006
Project: 59006
Buggy source:
/** 
 * Check whether an element is in any selection
 * @param iElementID the element id 
 * @return true if the element exists in the selection manager, else false
 */
public boolean checkStatus(int iElementID){
  for (  ESelectionType type : alSelectionTypes) {
    if (checkStatus(type,iElementID))     return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Check whether an element is in any selection
 * @param iElementID the element id
 * @return true if the element exists in the selection manager, else false
 */
public boolean checkStatus(int iElementID){
  for (  ESelectionType type : alSelectionTypes) {
    if (checkStatus(type,iElementID))     return true;
  }
  return false;
}
Program: 59007
Project: 59007
Buggy source:
/** 
 * Clear one specific selection type. The elements contained in that type are added to the "normal" type
 * @param sSelectionType the selection type to be cleared
 */
public void clearSelection(ESelectionType eSelectionType){
  if (eSelectionType == ESelectionType.REMOVE)   return;
  if (eSelectionType == eNormalType)   throw new IllegalArgumentException("String_Node_Str");
  if (hashSelectionTypes.get(eSelectionType).isEmpty())   return;
  for (  int iSelectionID : hashSelectionTypes.get(eSelectionType).keySet()) {
    selectionDelta.addSelection(iSelectionID,eNormalType);
  }
  hashSelectionTypes.get(eNormalType).putAll(hashSelectionTypes.get(eSelectionType));
  hashSelectionTypes.get(eSelectionType).clear();
}

Fixed version (ground truth):
/** 
 * Clear one specific selection type. The elements contained in that type are added to the "normal" type
 * @param sSelectionType the selection type to be cleared
 */
public void clearSelection(ESelectionType eSelectionType){
  if (eSelectionType == ESelectionType.REMOVE)   return;
  if (eSelectionType == eNormalType)   throw new IllegalArgumentException("String_Node_Str");
  if (hashSelectionTypes.get(eSelectionType) == null || hashSelectionTypes.get(eSelectionType).isEmpty())   return;
  for (  int iSelectionID : hashSelectionTypes.get(eSelectionType).keySet()) {
    selectionDelta.addSelection(iSelectionID,eNormalType);
  }
  hashSelectionTypes.get(eNormalType).putAll(hashSelectionTypes.get(eSelectionType));
  hashSelectionTypes.get(eSelectionType).clear();
}
Program: 59008
Project: 59008
Buggy source:
private void init(int iElementId,RemoteHierarchyLayer originHierarchyLayer,RemoteHierarchyLayer destinationHierarchyLayer){
  this.iElementId=iElementId;
  this.originHierarchyLayer=originHierarchyLayer;
  this.destinationHierarchyLayer=destinationHierarchyLayer;
}

Fixed version (ground truth):
private void init(int iElementId,RemoteHierarchyLevel originHierarchyLayer,RemoteHierarchyLevel destinationHierarchyLayer){
  this.iElementId=iElementId;
  this.originHierarchyLayer=originHierarchyLayer;
  this.destinationHierarchyLayer=destinationHierarchyLayer;
}
Program: 59009
Project: 59009
Buggy source:
/** 
 * Constructor.
 * @param iElementId
 * @param originHierarchyLayer
 * @param destinationHierarchyLayer
 * @param iDestinationPosIndex
 */
public SlerpAction(int iElementId,RemoteHierarchyLayer originHierarchyLayer,RemoteHierarchyLayer destinationHierarchyLayer,int iDestinationPosIndex){
  this.iDestinationPosIndex=iDestinationPosIndex;
  init(iElementId,originHierarchyLayer,destinationHierarchyLayer);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param iElementId
 * @param originHierarchyLayer
 * @param destinationHierarchyLayer
 * @param iDestinationPosIndex
 */
public SlerpAction(int iElementId,RemoteHierarchyLevel originHierarchyLayer,RemoteHierarchyLevel destinationHierarchyLayer,int iDestinationPosIndex){
  this.iDestinationPosIndex=iDestinationPosIndex;
  init(iElementId,originHierarchyLayer,destinationHierarchyLayer);
}
Program: 59010
Project: 59010
Buggy source:
public void start(){
  iOriginPosIndex=originHierarchyLayer.getPositionIndexByElementId(iElementId);
  if (iDestinationPosIndex == -1) {
    this.iDestinationPosIndex=destinationHierarchyLayer.getNextPositionIndex();
  }
  originHierarchyLayer.removeElement(iElementId);
  if (destinationHierarchyLayer.getElementList().size() < destinationHierarchyLayer.getCapacity()) {
    destinationHierarchyLayer.addElement(iElementId);
  }
 else {
    destinationHierarchyLayer.replaceElement(iElementId,iDestinationPosIndex);
  }
}

Fixed version (ground truth):
public void start(){
  iOriginPosIndex=originHierarchyLayer.getPositionIndexByElementId(iElementId);
  if (iOriginPosIndex == -1) {
    throw new IllegalStateException("String_Node_Str" + iElementId + "String_Node_Str"+ originHierarchyLayer);
  }
  if (iDestinationPosIndex == -1) {
    this.iDestinationPosIndex=destinationHierarchyLayer.getNextPositionIndex();
    if (iDestinationPosIndex == -1)     throw new IllegalStateException("String_Node_Str" + iElementId + "String_Node_Str"+ destinationHierarchyLayer);
  }
  originHierarchyLayer.removeElement(iElementId);
  if (destinationHierarchyLayer.getElementList().size() < destinationHierarchyLayer.getCapacity()) {
    destinationHierarchyLayer.addElement(iElementId);
  }
 else {
    destinationHierarchyLayer.replaceElement(iElementId,iDestinationPosIndex);
  }
}
Program: 59011
Project: 59011
Buggy source:
/** 
 * Initialization for gl called by a managing view Has to call init internally!
 * @param gl
 */
public abstract void initRemote(final GL gl,final int iRemoteViewID,final RemoteHierarchyLayer layer,final PickingJoglMouseListener pickingTriggerMouseAdapter,final IGLCanvasRemoteRendering3D remoteRenderingGLCanvas);

Fixed version (ground truth):
/** 
 * Initialization for gl called by a managing view Has to call init internally!
 * @param gl
 */
public abstract void initRemote(final GL gl,final int iRemoteViewID,final RemoteHierarchyLevel layer,final PickingJoglMouseListener pickingTriggerMouseAdapter,final IGLCanvasRemoteRendering3D remoteRenderingGLCanvas);
Program: 59012
Project: 59012
Buggy source:
@Override public void initRemote(final GL gl,final int iRemoteViewID,final RemoteHierarchyLayer layer,final PickingJoglMouseListener pickingTriggerMouseAdapter,final IGLCanvasRemoteRendering3D remoteRenderingGLCanvas){
  bIsLocal=false;
  this.remoteRenderingGLCanvas=remoteRenderingGLCanvas;
  Collection<GLCaleydoCanvas> cc=generalManager.getViewGLCanvasManager().getAllGLCanvasUsers();
  for (  GLCaleydoCanvas c : cc) {
    c.addKeyListener(keyListener_);
  }
  init(gl);
  grid_.setGridSize(30,60);
  grid_.setGlyphPositions(EIconIDs.DISPLAY_SCATTERPLOT);
}

Fixed version (ground truth):
@Override public void initRemote(final GL gl,final int iRemoteViewID,final RemoteHierarchyLevel layer,final PickingJoglMouseListener pickingTriggerMouseAdapter,final IGLCanvasRemoteRendering3D remoteRenderingGLCanvas){
  bIsLocal=false;
  this.remoteRenderingGLCanvas=remoteRenderingGLCanvas;
  Collection<GLCaleydoCanvas> cc=generalManager.getViewGLCanvasManager().getAllGLCanvasUsers();
  for (  GLCaleydoCanvas c : cc) {
    c.addKeyListener(keyListener_);
  }
  init(gl);
  grid_.setGridSize(30,60);
  grid_.setGlyphPositions(EIconIDs.DISPLAY_SCATTERPLOT);
}
Program: 59013
Project: 59013
Buggy source:
@Override public void initRemote(final GL gl,final int iRemoteViewID,final RemoteHierarchyLayer layer,final PickingJoglMouseListener pickingTriggerMouseAdapter,final IGLCanvasRemoteRendering3D remoteRenderingGLCanvas){
  this.pickingTriggerMouseAdapter=pickingTriggerMouseAdapter;
  this.remoteRenderingGLCanvas=remoteRenderingGLCanvas;
  iMaxCols=5;
  init(gl);
}

Fixed version (ground truth):
@Override public void initRemote(final GL gl,final int iRemoteViewID,final RemoteHierarchyLevel layer,final PickingJoglMouseListener pickingTriggerMouseAdapter,final IGLCanvasRemoteRendering3D remoteRenderingGLCanvas){
  this.pickingTriggerMouseAdapter=pickingTriggerMouseAdapter;
  this.remoteRenderingGLCanvas=remoteRenderingGLCanvas;
  iMaxCols=5;
  init(gl);
}
Program: 59014
Project: 59014
Buggy source:
@Override public void initRemote(final GL gl,final int iRemoteViewID,final RemoteHierarchyLayer layer,final PickingJoglMouseListener pickingTriggerMouseAdapter,final IGLCanvasRemoteRendering3D remoteRenderingGLCanvas){
  this.remoteRenderingGLCanvas=remoteRenderingGLCanvas;
  this.pickingTriggerMouseAdapter=pickingTriggerMouseAdapter;
  init(gl);
}

Fixed version (ground truth):
@Override public void initRemote(final GL gl,final int iRemoteViewID,final RemoteHierarchyLevel layer,final PickingJoglMouseListener pickingTriggerMouseAdapter,final IGLCanvasRemoteRendering3D remoteRenderingGLCanvas){
  this.remoteRenderingGLCanvas=remoteRenderingGLCanvas;
  this.pickingTriggerMouseAdapter=pickingTriggerMouseAdapter;
  init(gl);
}
Program: 59015
Project: 59015
Buggy source:
/** 
 * Constructor.
 */
public AGLConnectionLineRenderer(final RemoteHierarchyLayer underInteractionLayer,final RemoteHierarchyLayer stackLayer,final RemoteHierarchyLayer poolLayer){
  this.underInteractionLayer=underInteractionLayer;
  this.stackLayer=stackLayer;
  connectedElementRepManager=GeneralManager.get().getViewGLCanvasManager().getConnectedElementRepresentationManager();
  hashViewToPointLists=new HashMap<Integer,ArrayList<ArrayList<Vec3f>>>();
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public AGLConnectionLineRenderer(final RemoteHierarchyLevel underInteractionLayer,final RemoteHierarchyLevel stackLayer,final RemoteHierarchyLevel poolLayer){
  this.underInteractionLayer=underInteractionLayer;
  this.stackLayer=stackLayer;
  connectedElementRepManager=GeneralManager.get().getViewGLCanvasManager().getConnectedElementRepresentationManager();
  hashViewToPointLists=new HashMap<Integer,ArrayList<ArrayList<Vec3f>>>();
}
Program: 59017
Project: 59017
Buggy source:
@Override public void display(final GL gl){
  clipToFrustum(gl);
  gl.glTranslatef(fXDefaultTranslation + fXTranslation,fYTranslation,0.0f);
  if (bIsDraggingActive)   handleDragging(gl);
  checkUnselection();
  gl.glCallList(iGLDisplayListToCall);
  if (bIsAngularBrushingActive && iSelectedLineID != -1) {
    handleAngularBrushing(gl);
  }
  gl.glTranslatef(-fXDefaultTranslation - fXTranslation,-fYTranslation,0.0f);
  gl.glDisable(GL.GL_STENCIL_TEST);
}

Fixed version (ground truth):
@Override public void display(final GL gl){
  clipToFrustum(gl);
  gl.glTranslatef(fXDefaultTranslation + fXTranslation,fYTranslation,0.0f);
  if (bIsDraggingActive) {
    handleDragging(gl);
    if (pickingTriggerMouseAdapter.wasMouseReleased())     bIsDraggingActive=false;
  }
  checkUnselection();
  gl.glCallList(iGLDisplayListToCall);
  if (bIsAngularBrushingActive && iSelectedLineID != -1) {
    handleAngularBrushing(gl);
  }
  gl.glTranslatef(-fXDefaultTranslation - fXTranslation,-fYTranslation,0.0f);
  gl.glDisable(GL.GL_STENCIL_TEST);
}
Program: 59018
Project: 59018
Buggy source:
@Override public void startAnimator(){
  fpsAnimator.start();
}

Fixed version (ground truth):
@Override public void startAnimator(){
  for (  GLCaleydoCanvas glCanvas : hashGLCanvasID2GLCanvas.values()) {
    fpsAnimator.add(glCanvas);
  }
  fpsAnimator.start();
}
Program: 59019
Project: 59019
Buggy source:
@Override public boolean registerGLCanvas(final GLCaleydoCanvas glCanvas){
  int iGLCanvasID=glCanvas.getID();
  if (hashGLCanvasID2GLCanvas.containsKey(iGLCanvasID)) {
    generalManager.getLogger().log(Level.WARNING,"String_Node_Str" + iGLCanvasID + "String_Node_Str");
    return false;
  }
  hashGLCanvasID2GLCanvas.put(iGLCanvasID,glCanvas);
  fpsAnimator.add(glCanvas);
  return true;
}

Fixed version (ground truth):
@Override public boolean registerGLCanvas(final GLCaleydoCanvas glCanvas){
  int iGLCanvasID=glCanvas.getID();
  if (hashGLCanvasID2GLCanvas.containsKey(iGLCanvasID)) {
    generalManager.getLogger().log(Level.WARNING,"String_Node_Str" + iGLCanvasID + "String_Node_Str");
    return false;
  }
  hashGLCanvasID2GLCanvas.put(iGLCanvasID,glCanvas);
  return true;
}
Program: 59021
Project: 59021
Buggy source:
/** 
 * Constructor
 * @param builder the builder
 */
private GenericSelectionManager(Builder builder){
  this.eNormalType=builder.normalType;
  this.externalToInternalMapping=builder.externalToInternalMapping;
  this.internalToExternalMapping=builder.internalToExternalMapping;
  this.internalIDType=builder.internalIDType;
  this.externalIDType=builder.externalIDType;
  if (builder.alSelectionTypes == null) {
    alSelectionTypes=new ArrayList<ESelectionType>();
    for (    ESelectionType selectionType : ESelectionType.values()) {
      alSelectionTypes.add(selectionType);
    }
  }
  hashSelectionTypes=new EnumMap<ESelectionType,HashMap<Integer,Boolean>>(ESelectionType.class);
  selectionDelta=new SelectionDelta(internalIDType);
  for (  ESelectionType eType : alSelectionTypes) {
    hashSelectionTypes.put(eType,new HashMap<Integer,Boolean>());
  }
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param builder the builder
 */
private GenericSelectionManager(Builder builder){
  this.eNormalType=builder.normalType;
  this.externalToInternalMapping=builder.externalToInternalMapping;
  this.internalToExternalMapping=builder.internalToExternalMapping;
  this.internalIDType=builder.internalIDType;
  this.externalIDType=builder.externalIDType;
  if (builder.alSelectionTypes == null) {
    alSelectionTypes=new ArrayList<ESelectionType>();
    for (    ESelectionType selectionType : ESelectionType.values()) {
      if (selectionType != ESelectionType.ADD)       alSelectionTypes.add(selectionType);
    }
  }
  hashSelectionTypes=new EnumMap<ESelectionType,HashMap<Integer,Boolean>>(ESelectionType.class);
  selectionDelta=new SelectionDelta(internalIDType);
  for (  ESelectionType eType : alSelectionTypes) {
    hashSelectionTypes.put(eType,new HashMap<Integer,Boolean>());
  }
}
Program: 59022
Project: 59022
Buggy source:
@Override public void handleUpdate(IUniqueObject eventTrigger,ISelectionDelta selectionDelta){
  if (selectionDelta.getIDType() != EIDType.DAVID)   return;
  generalManager.getLogger().log(Level.INFO,"String_Node_Str" + eventTrigger.getClass().getSimpleName() + "String_Node_Str"+ this.getClass().getName());
  contentSelectionManager.clearSelections();
  ISelectionDelta internalDelta=contentSelectionManager.setDelta(selectionDelta);
  handleConnectedElementRep(internalDelta);
  checkUnselection();
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void handleUpdate(IUniqueObject eventTrigger,ISelectionDelta selectionDelta){
  if (selectionDelta.getIDType() != EIDType.DAVID)   return;
  generalManager.getLogger().log(Level.INFO,"String_Node_Str" + eventTrigger.getClass().getSimpleName() + "String_Node_Str"+ this.getClass().getName());
  contentSelectionManager.clearSelections();
  ISelectionDelta internalDelta=contentSelectionManager.setDelta(selectionDelta);
  initForAddedElements();
  handleConnectedElementRep(internalDelta);
  checkUnselection();
  setDisplayListDirty();
}
Program: 59023
Project: 59023
Buggy source:
/** 
 * Constructor.
 */
public CmdViewCreateDataEntitySearcher(final ECommandType cmdType){
  super(cmdType);
  iAlViewReceiverID=new ArrayList<Integer>();
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public CmdViewCreateDataEntitySearcher(final ECommandType cmdType){
  super(cmdType);
  iAlViewReceiverIDs=new ArrayList<Integer>();
}
Program: 59024
Project: 59024
Buggy source:
@Override public void setParameterHandler(final IParameterHandler parameterHandler){
  super.setParameterHandler(parameterHandler);
  StringTokenizer receiverToken=new StringTokenizer(sDetail,IGeneralManager.sDelimiter_Parser_DataItems);
  int iReceiverID=-1;
  while (receiverToken.hasMoreTokens()) {
    iReceiverID=StringConversionTool.convertStringToInt(receiverToken.nextToken(),-1);
    if (iReceiverID != -1)     iAlViewReceiverID.add(generalManager.getIDManager().getInternalFromExternalID(iReceiverID));
  }
}

Fixed version (ground truth):
@Override public void setParameterHandler(final IParameterHandler parameterHandler){
  super.setParameterHandler(parameterHandler);
  StringTokenizer receiverToken=new StringTokenizer(sDetail,IGeneralManager.sDelimiter_Parser_DataItems);
  int iReceiverID=-1;
  while (receiverToken.hasMoreTokens()) {
    iReceiverID=StringConversionTool.convertStringToInt(receiverToken.nextToken(),-1);
    if (iReceiverID != -1)     iAlViewReceiverIDs.add(generalManager.getIDManager().getInternalFromExternalID(iReceiverID));
  }
}
Program: 59025
Project: 59025
Buggy source:
@Override public void doCommand() throws CaleydoRuntimeException {
  IViewManager viewManager=generalManager.getViewGLCanvasManager();
  DataEntitySearcherViewRep dataEntitySearcherView=(DataEntitySearcherViewRep)viewManager.createView(EManagedObjectType.VIEW_SWT_DATA_ENTITY_SEARCHER,-1,sLabel);
  viewManager.registerItem(dataEntitySearcherView);
  viewManager.addViewRep(dataEntitySearcherView);
  dataEntitySearcherView.setAttributes(iAlViewReceiverID);
  commandManager.runDoCommand(this);
}

Fixed version (ground truth):
@Override public void doCommand() throws CaleydoRuntimeException {
  IViewManager viewManager=generalManager.getViewGLCanvasManager();
  DataEntitySearcherViewRep dataEntitySearcherView=(DataEntitySearcherViewRep)viewManager.createView(EManagedObjectType.VIEW_SWT_DATA_ENTITY_SEARCHER,-1,sLabel);
  viewManager.registerItem(dataEntitySearcherView);
  viewManager.addViewRep(dataEntitySearcherView);
  dataEntitySearcherView.setAttributes(iAlViewReceiverIDs);
  commandManager.runDoCommand(this);
}
Program: 59026
Project: 59026
Buggy source:
@Override public void startAnimator(){
  for (  GLCaleydoCanvas glCanvas : hashGLCanvasID2GLCanvas.values()) {
    fpsAnimator.add(glCanvas);
  }
  fpsAnimator.start();
}

Fixed version (ground truth):
@Override public void startAnimator(){
  fpsAnimator.start();
}
Program: 59027
Project: 59027
Buggy source:
@Override public boolean registerGLCanvas(final GLCaleydoCanvas glCanvas){
  int iGLCanvasID=glCanvas.getID();
  if (hashGLCanvasID2GLCanvas.containsKey(iGLCanvasID)) {
    generalManager.getLogger().log(Level.WARNING,"String_Node_Str" + iGLCanvasID + "String_Node_Str");
    return false;
  }
  hashGLCanvasID2GLCanvas.put(iGLCanvasID,glCanvas);
  return true;
}

Fixed version (ground truth):
@Override public boolean registerGLCanvas(final GLCaleydoCanvas glCanvas){
  int iGLCanvasID=glCanvas.getID();
  if (hashGLCanvasID2GLCanvas.containsKey(iGLCanvasID)) {
    generalManager.getLogger().log(Level.WARNING,"String_Node_Str" + iGLCanvasID + "String_Node_Str");
    return false;
  }
  hashGLCanvasID2GLCanvas.put(iGLCanvasID,glCanvas);
  fpsAnimator.add(glCanvas);
  return true;
}
Program: 59029
Project: 59029
Buggy source:
@Override public void setActiveGLSubView(AGLEventListener parentGLEventListener,AGLEventListener subGLEventListener){
  AGLViewPart rcpView;
  rcpView=(GLRemoteRenderingView)PlatformUI.getWorkbench().getWorkbenchWindows()[0].getActivePage().getActivePart();
  final IToolBarManager toolBarManager=rcpView.getViewSite().getActionBars().getToolBarManager();
  toolBarManager.removeAll();
  GLRemoteRenderingView.createToolBarItems(parentGLEventListener.getID());
  GLRemoteRenderingView.fillToolBar(toolBarManager);
  toolBarManager.add(new Separator());
  if (parentGLEventListener instanceof GLRemoteRendering) {
    if (subGLEventListener instanceof GLPathway) {
      GLPathwayView.createToolBarItems(subGLEventListener.getID());
      GLPathwayView.fillToolBar(toolBarManager);
    }
 else     if (subGLEventListener instanceof GLHeatMap) {
      GLHeatMapView.createToolBarItems(subGLEventListener.getID());
      GLHeatMapView.fillToolBar(toolBarManager);
    }
 else     if (subGLEventListener instanceof GLParallelCoordinates) {
      GLParCoordsView.createToolBarItems(subGLEventListener.getID());
      GLParCoordsView.fillToolBar(toolBarManager);
    }
  }
  rcpView.getSWTComposite().getDisplay().asyncExec(new Runnable(){
    public void run(){
      toolBarManager.update(true);
    }
  }
);
}

Fixed version (ground truth):
@Override public void setActiveGLSubView(AGLEventListener parentGLEventListener,AGLEventListener subGLEventListener){
  for (  IWorkbenchPage rcpView : PlatformUI.getWorkbench().getWorkbenchWindows()[0].getPages()) {
    if (!(rcpView instanceof GLRemoteRenderingView))     continue;
    GLRemoteRenderingView remoteRenderingRCPView=(GLRemoteRenderingView)rcpView;
    final IToolBarManager toolBarManager=remoteRenderingRCPView.getViewSite().getActionBars().getToolBarManager();
    toolBarManager.removeAll();
    GLRemoteRenderingView.createToolBarItems(parentGLEventListener.getID());
    GLRemoteRenderingView.fillToolBar(toolBarManager);
    toolBarManager.add(new Separator());
    if (parentGLEventListener instanceof GLRemoteRendering) {
      if (subGLEventListener instanceof GLPathway) {
        GLPathwayView.createToolBarItems(subGLEventListener.getID());
        GLPathwayView.fillToolBar(toolBarManager);
      }
 else       if (subGLEventListener instanceof GLHeatMap) {
        GLHeatMapView.createToolBarItems(subGLEventListener.getID());
        GLHeatMapView.fillToolBar(toolBarManager);
      }
 else       if (subGLEventListener instanceof GLParallelCoordinates) {
        GLParCoordsView.createToolBarItems(subGLEventListener.getID());
        GLParCoordsView.fillToolBar(toolBarManager);
      }
    }
    remoteRenderingRCPView.getSWTComposite().getDisplay().asyncExec(new Runnable(){
      public void run(){
        toolBarManager.update(true);
      }
    }
);
  }
}
Program: 59030
Project: 59030
Buggy source:
/** 
 * Start Caleydo core.
 */
public synchronized void start(){
  try {
    parseXmlConfigFile(sFileName);
    if (generalManager.isStandalone()) {
      generalManager.getViewGLCanvasManager().startAnimator();
      swtGUIManager.runApplication();
    }
  }
 catch (  CaleydoRuntimeException gre) {
    generalManager.getLogger().log(Level.SEVERE,"String_Node_Str" + gre.toString());
    generalManager.getGUIBridge().closeApplication();
  }
}

Fixed version (ground truth):
/** 
 * Start Caleydo core.
 */
public synchronized void start(){
  parseXmlConfigFile(sFileName);
  if (generalManager.isStandalone()) {
    generalManager.getViewGLCanvasManager().startAnimator();
    swtGUIManager.runApplication();
  }
}
Program: 59031
Project: 59031
Buggy source:
public void initData(){
  set=null;
  for (  ISet currentSet : alSets) {
    if (currentSet.getSetType() == ESetType.GENE_EXPRESSION_DATA)     set=currentSet;
  }
  if (!mapVAIDs.isEmpty()) {
    for (    EStorageBasedVAType eSelectionType : EStorageBasedVAType.values()) {
      if (mapVAIDs.containsKey(eSelectionType))       set.removeVirtualArray(mapVAIDs.get(eSelectionType));
    }
    iContentVAID=-1;
    iStorageVAID=-1;
    mapVAIDs.clear();
  }
  if (set == null) {
    mapVAIDs.clear();
    contentSelectionManager.resetSelectionManager();
    storageSelectionManager.resetSelectionManager();
    connectedElementRepresentationManager.clear();
    return;
  }
  ArrayList<Integer> alTempList=new ArrayList<Integer>();
  int iVAID=set.createStorageVA(alTempList);
  mapVAIDs.put(EStorageBasedVAType.EXTERNAL_SELECTION,iVAID);
  alTempList=new ArrayList<Integer>();
  for (int iCount=0; iCount < set.size(); iCount++) {
    alTempList.add(iCount);
  }
  iVAID=set.createSetVA(alTempList);
  mapVAIDs.put(EStorageBasedVAType.STORAGE_SELECTION,iVAID);
  initLists();
}

Fixed version (ground truth):
public void initData(){
  set=null;
  for (  ISet currentSet : alSets) {
    if (currentSet.getSetType() == ESetType.GENE_EXPRESSION_DATA)     set=currentSet;
  }
  if (!mapVAIDs.isEmpty()) {
    iContentVAID=-1;
    iStorageVAID=-1;
    mapVAIDs.clear();
  }
  if (set == null) {
    mapVAIDs.clear();
    contentSelectionManager.resetSelectionManager();
    storageSelectionManager.resetSelectionManager();
    connectedElementRepresentationManager.clear();
    return;
  }
  ArrayList<Integer> alTempList=new ArrayList<Integer>();
  int iVAID=set.createStorageVA(alTempList);
  mapVAIDs.put(EStorageBasedVAType.EXTERNAL_SELECTION,iVAID);
  alTempList=new ArrayList<Integer>();
  for (int iCount=0; iCount < set.size(); iCount++) {
    alTempList.add(iCount);
  }
  iVAID=set.createSetVA(alTempList);
  mapVAIDs.put(EStorageBasedVAType.STORAGE_SELECTION,iVAID);
  initLists();
}
Program: 59033
Project: 59033
Buggy source:
@Override protected void initLists(){
  if (bRenderOnlyContext)   iContentVAID=mapVAIDs.get(EStorageBasedVAType.EXTERNAL_SELECTION);
 else {
    if (!mapVAIDs.containsKey(EStorageBasedVAType.COMPLETE_SELECTION))     initCompleteList();
    iContentVAID=mapVAIDs.get(EStorageBasedVAType.COMPLETE_SELECTION);
  }
  iStorageVAID=mapVAIDs.get(EStorageBasedVAType.STORAGE_SELECTION);
  contentSelectionManager.resetSelectionManager();
  storageSelectionManager.resetSelectionManager();
  contentSelectionManager.setVA(set.getVA(iContentVAID));
  if (renderStyle != null) {
    renderStyle.setActiveVirtualArray(iContentVAID);
  }
  int iNumberOfColumns=set.getVA(iContentVAID).size();
  int iNumberOfRows=set.getVA(iStorageVAID).size();
  for (int iRowCount=0; iRowCount < iNumberOfRows; iRowCount++) {
    storageSelectionManager.initialAdd(set.getVA(iStorageVAID).get(iRowCount));
  }
  for (int iColumnCount=0; iColumnCount < iNumberOfColumns; iColumnCount++) {
    contentSelectionManager.initialAdd(set.getVA(iContentVAID).get(iColumnCount));
  }
  renderStyle=new HeatMapRenderStyle(viewFrustum,contentSelectionManager,set,iContentVAID,iStorageVAID,set.getVA(iStorageVAID).size(),bRenderStorageHorizontally);
  vecTranslation=new Vec3f(0,renderStyle.getYCenter() * 2,0);
}

Fixed version (ground truth):
@Override protected void initLists(){
  if (bRenderOnlyContext)   iContentVAID=mapVAIDs.get(EStorageBasedVAType.EXTERNAL_SELECTION);
 else {
    if (!mapVAIDs.containsKey(EStorageBasedVAType.COMPLETE_SELECTION))     initCompleteList();
    iContentVAID=mapVAIDs.get(EStorageBasedVAType.COMPLETE_SELECTION);
  }
  iStorageVAID=mapVAIDs.get(EStorageBasedVAType.STORAGE_SELECTION);
  contentSelectionManager.resetSelectionManager();
  storageSelectionManager.resetSelectionManager();
  contentSelectionManager.setVA(set.getVA(iContentVAID));
  if (renderStyle != null) {
    renderStyle.setActiveVirtualArray(iContentVAID);
  }
  int iNumberOfColumns=set.getVA(iContentVAID).size();
  int iNumberOfRows=set.getVA(iStorageVAID).size();
  for (int iRowCount=0; iRowCount < iNumberOfRows; iRowCount++) {
    storageSelectionManager.initialAdd(set.getVA(iStorageVAID).get(iRowCount));
  }
  for (int iColumnCount=0; iColumnCount < iNumberOfColumns; iColumnCount++) {
    contentSelectionManager.initialAdd(set.getVA(iContentVAID).get(iColumnCount));
  }
  renderStyle=new HeatMapRenderStyle(viewFrustum,contentSelectionManager,set,iContentVAID,iStorageVAID,set.getVA(iStorageVAID).size(),bRenderStorageHorizontally);
  renderStyle.setDetailLevel(detailLevel);
  vecTranslation=new Vec3f(0,renderStyle.getYCenter() * 2,0);
}
Program: 59034
Project: 59034
Buggy source:
/** 
 * Reset all selections and deselections
 */
@Override public void resetSelections(){
  for (int iCount=0; iCount < fArGateTipHeight.length; iCount++) {
    fArGateTipHeight[iCount]=0;
    fArGateBottomHeight[iCount]=renderStyle.getGateYOffset() - renderStyle.getGateTipHeight();
  }
  contentSelectionManager.clearSelections();
  storageSelectionManager.clearSelections();
  bIsAngularBrushingActive=false;
  for (  ArrayList<Integer> alCurrent : alIsAngleBlocking) {
    alCurrent.clear();
  }
  for (  ArrayList<Integer> alCurrent : alIsGateBlocking) {
    alCurrent.clear();
  }
  setDisplayListDirty();
}

Fixed version (ground truth):
/** 
 * Reset all selections and deselections
 */
@Override public void resetSelections(){
  for (int iCount=0; iCount < fArGateTipHeight.length; iCount++) {
    fArGateTipHeight[iCount]=0;
    fArGateBottomHeight[iCount]=renderStyle.getGateYOffset() - renderStyle.getGateTipHeight();
  }
  contentSelectionManager.clearSelections();
  storageSelectionManager.clearSelections();
  bIsAngularBrushingActive=false;
  for (  ArrayList<Integer> alCurrent : alIsAngleBlocking) {
    alCurrent.clear();
  }
  for (  ArrayList<Integer> alCurrent : alIsGateBlocking) {
    alCurrent.clear();
  }
  setDisplayListDirty();
  connectedElementRepresentationManager.clear();
}
Program: 59035
Project: 59035
Buggy source:
public static void startCaleydoCore(){
  if (sCaleydoXMLfile.equals("String_Node_Str")) {
    if (bPathwayViewerMode)     sCaleydoXMLfile=BOOTSTRAP_FILE_PATHWAY_VIEWER_MODE;
 else     sCaleydoXMLfile=BOOTSTRAP_FILE_GENE_EXPRESSION_MODE;
    caleydoCore.setXmlFileName(sCaleydoXMLfile);
    caleydoCore.start();
    Display display=PlatformUI.createDisplay();
    Shell shell=new Shell(display);
    WizardDialog projectWizardDialog=new WizardDialog(shell,new CaleydoProjectWizard(shell));
    if (WizardDialog.CANCEL == projectWizardDialog.open()) {
      bDoExit=true;
    }
    shell.dispose();
  }
 else {
    caleydoCore.setXmlFileName(sCaleydoXMLfile);
    caleydoCore.start();
  }
  if (!bDoExit) {
    new PathwayLoadingProgressIndicatorAction().run(null);
  }
  initializeColorMapping();
  openViewsInRCP();
  PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  GeneralManager.get().getEventPublisher().registerReceiverToMediatorGroup(EMediatorType.SELECTION_MEDIATOR,InfoArea.getInfoArea());
  GeneralManager.get().getViewGLCanvasManager().startAnimator();
}

Fixed version (ground truth):
public static void startCaleydoCore(){
  if (sCaleydoXMLfile.equals("String_Node_Str")) {
    Display display=PlatformUI.createDisplay();
    Shell shell=new Shell(display);
    WizardDialog projectWizardDialog=new WizardDialog(shell,new CaleydoProjectWizard(shell));
    if (WizardDialog.CANCEL == projectWizardDialog.open()) {
      bDoExit=true;
    }
switch (applicationMode) {
case PATHWAY_VIEWER:
      sCaleydoXMLfile=BOOTSTRAP_FILE_PATHWAY_VIEWER_MODE;
    break;
case SAMPLE_DATA:
  sCaleydoXMLfile=BOOTSTRAP_FILE_SAMPLE_DATA_MODE;
break;
default :
sCaleydoXMLfile=BOOTSTRAP_FILE_GENE_EXPRESSION_MODE;
}
caleydoCore.setXmlFileName(sCaleydoXMLfile);
caleydoCore.start();
if (applicationMode == EApplicationMode.STANDARD) {
WizardDialog dataImportWizard=new WizardDialog(shell,new DataImportWizard(shell));
if (WizardDialog.CANCEL == dataImportWizard.open()) {
bDoExit=true;
}
}
shell.dispose();
}
 else {
caleydoCore.setXmlFileName(sCaleydoXMLfile);
caleydoCore.start();
}
if (!bDoExit) {
new PathwayLoadingProgressIndicatorAction().run(null);
}
initializeColorMapping();
openViewsInRCP();
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
GeneralManager.get().getEventPublisher().registerReceiverToMediatorGroup(EMediatorType.SELECTION_MEDIATOR,InfoArea.getInfoArea());
GeneralManager.get().getViewGLCanvasManager().startAnimator();
}
Program: 59036
Project: 59036
Buggy source:
private static void openViewsInRCP(){
  if (bPathwayViewerMode) {
    Iterator<EStartViewType> iterStartViewsType=alStartViews.iterator();
    EStartViewType type;
    while (iterStartViewsType.hasNext()) {
      type=iterStartViewsType.next();
      if (type != EStartViewType.REMOTE && type != EStartViewType.BROWSER) {
        iterStartViewsType.remove();
      }
    }
  }
  try {
    if (alStartViews.contains(EStartViewType.REMOTE)) {
      PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLRemoteRenderingView.ID);
      alStartViews.remove(EStartViewType.REMOTE);
    }
    for (    EStartViewType startViewsMode : alStartViews) {
      PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(startViewsMode.getRCPViewID());
    }
  }
 catch (  PartInitException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private static void openViewsInRCP(){
  if (applicationMode == EApplicationMode.PATHWAY_VIEWER) {
    Iterator<EStartViewType> iterStartViewsType=alStartViews.iterator();
    EStartViewType type;
    while (iterStartViewsType.hasNext()) {
      type=iterStartViewsType.next();
      if (type != EStartViewType.REMOTE && type != EStartViewType.BROWSER) {
        iterStartViewsType.remove();
      }
    }
  }
  try {
    if (alStartViews.contains(EStartViewType.REMOTE)) {
      PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(GLRemoteRenderingView.ID);
      alStartViews.remove(EStartViewType.REMOTE);
    }
    for (    EStartViewType startViewsMode : alStartViews) {
      PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(startViewsMode.getRCPViewID());
    }
  }
 catch (  PartInitException e) {
    e.printStackTrace();
  }
}
Program: 59037
Project: 59037
Buggy source:
public void execute(){
  createData();
  setDataInViews();
  Application.bPathwayViewerMode=false;
}

Fixed version (ground truth):
public void execute(){
  createData();
  setDataInViews();
}
Program: 59038
Project: 59038
Buggy source:
@Override protected final void fillToolBar(){
  if (Application.bPathwayViewerMode) {
    MessageBox alert=new MessageBox(new Shell(),SWT.OK);
    alert.setMessage("String_Node_Str");
    alert.open();
    dispose();
    return;
  }
  createGLCanvas();
  createGLEventListener(ECommandType.CREATE_GL_PARALLEL_COORDINATES_3D,glCanvas.getID());
  createToolBarItems(iGLEventListenerID);
  IToolBarManager toolBarManager=getViewSite().getActionBars().getToolBarManager();
  fillToolBar(toolBarManager);
}

Fixed version (ground truth):
@Override protected final void fillToolBar(){
  if (Application.applicationMode == EApplicationMode.PATHWAY_VIEWER) {
    MessageBox alert=new MessageBox(new Shell(),SWT.OK);
    alert.setMessage("String_Node_Str");
    alert.open();
    dispose();
    return;
  }
  createGLCanvas();
  createGLEventListener(ECommandType.CREATE_GL_PARALLEL_COORDINATES_3D,glCanvas.getID());
  createToolBarItems(iGLEventListenerID);
  IToolBarManager toolBarManager=getViewSite().getActionBars().getToolBarManager();
  fillToolBar(toolBarManager);
}
Program: 59039
Project: 59039
Buggy source:
@Override public void createPartControl(Composite parent){
  super.createPartControl(parent);
  createGLCanvas();
  if (!Application.bPathwayViewerMode) {
    iAlContainedViewIDs.add(createGLEventListener(ECommandType.CREATE_GL_HEAT_MAP_3D,-1));
    iAlContainedViewIDs.add(createGLEventListener(ECommandType.CREATE_GL_PARALLEL_COORDINATES_3D,-1));
  }
  createGLEventListener(ECommandType.CREATE_GL_BUCKET_3D,glCanvas.getID());
  ArrayList<Integer> iAlReceiverIDs=new ArrayList<Integer>();
  iAlReceiverIDs.add(iGLEventListenerID);
  CmdViewCreateDataEntitySearcher cmd=(CmdViewCreateDataEntitySearcher)GeneralManager.get().getCommandManager().createCommandByType(ECommandType.CREATE_VIEW_DATA_ENTITY_SEARCHER);
  cmd.setAttributes(iAlReceiverIDs);
  cmd.doCommand();
  GLRemoteRendering glRemoteRenderedView=((GLRemoteRendering)GeneralManager.get().getViewGLCanvasManager().getGLEventListener(iGLEventListenerID));
  glRemoteRenderedView.setInitialContainedViews(iAlContainedViewIDs);
  glRemoteRenderedView.enableBusyMode(false);
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  super.createPartControl(parent);
  createGLCanvas();
  if (Application.applicationMode != EApplicationMode.PATHWAY_VIEWER) {
    iAlContainedViewIDs.add(createGLEventListener(ECommandType.CREATE_GL_HEAT_MAP_3D,-1));
    iAlContainedViewIDs.add(createGLEventListener(ECommandType.CREATE_GL_PARALLEL_COORDINATES_3D,-1));
  }
  createGLEventListener(ECommandType.CREATE_GL_BUCKET_3D,glCanvas.getID());
  ArrayList<Integer> iAlReceiverIDs=new ArrayList<Integer>();
  iAlReceiverIDs.add(iGLEventListenerID);
  CmdViewCreateDataEntitySearcher cmd=(CmdViewCreateDataEntitySearcher)GeneralManager.get().getCommandManager().createCommandByType(ECommandType.CREATE_VIEW_DATA_ENTITY_SEARCHER);
  cmd.setAttributes(iAlReceiverIDs);
  cmd.doCommand();
  GLRemoteRendering glRemoteRenderedView=((GLRemoteRendering)GeneralManager.get().getViewGLCanvasManager().getGLEventListener(iGLEventListenerID));
  glRemoteRenderedView.setInitialContainedViews(iAlContainedViewIDs);
  glRemoteRenderedView.enableBusyMode(false);
}
Program: 59040
Project: 59040
Buggy source:
public static void startCaleydoCore(){
  if (sCaleydoXMLfile.equals("String_Node_Str")) {
    Display display=PlatformUI.createDisplay();
    Shell shell=new Shell(display);
    WizardDialog projectWizardDialog=new WizardDialog(shell,new CaleydoProjectWizard(shell));
    if (WizardDialog.CANCEL == projectWizardDialog.open()) {
      bDoExit=true;
    }
switch (applicationMode) {
case PATHWAY_VIEWER:
      sCaleydoXMLfile=BOOTSTRAP_FILE_PATHWAY_VIEWER_MODE;
    break;
case SAMPLE_DATA:
  sCaleydoXMLfile=BOOTSTRAP_FILE_SAMPLE_DATA_MODE;
break;
default :
sCaleydoXMLfile=BOOTSTRAP_FILE_GENE_EXPRESSION_MODE;
}
caleydoCore.setXmlFileName(sCaleydoXMLfile);
caleydoCore.start();
if (applicationMode == EApplicationMode.STANDARD) {
WizardDialog dataImportWizard=new WizardDialog(shell,new DataImportWizard(shell));
if (WizardDialog.CANCEL == dataImportWizard.open()) {
bDoExit=true;
}
}
shell.dispose();
}
 else {
caleydoCore.setXmlFileName(sCaleydoXMLfile);
caleydoCore.start();
}
if (!bDoExit) {
new PathwayLoadingProgressIndicatorAction().run(null);
}
initializeColorMapping();
openViewsInRCP();
GeneralManager.get().getEventPublisher().registerReceiverToMediatorGroup(EMediatorType.SELECTION_MEDIATOR,InfoArea.getInfoArea());
}

Fixed version (ground truth):
public static void startCaleydoCore(){
  if (sCaleydoXMLfile.equals("String_Node_Str")) {
    Display display=PlatformUI.createDisplay();
    Shell shell=new Shell(display);
    WizardDialog projectWizardDialog=new WizardDialog(shell,new CaleydoProjectWizard(shell));
    if (WizardDialog.CANCEL == projectWizardDialog.open()) {
      bDoExit=true;
      return;
    }
switch (applicationMode) {
case PATHWAY_VIEWER:
      sCaleydoXMLfile=BOOTSTRAP_FILE_PATHWAY_VIEWER_MODE;
    break;
case SAMPLE_DATA:
  sCaleydoXMLfile=BOOTSTRAP_FILE_SAMPLE_DATA_MODE;
break;
default :
sCaleydoXMLfile=BOOTSTRAP_FILE_GENE_EXPRESSION_MODE;
}
caleydoCore.setXmlFileName(sCaleydoXMLfile);
caleydoCore.start();
if (applicationMode == EApplicationMode.STANDARD) {
WizardDialog dataImportWizard=new WizardDialog(shell,new DataImportWizard(shell));
if (WizardDialog.CANCEL == dataImportWizard.open()) {
bDoExit=true;
}
}
shell.dispose();
}
 else {
caleydoCore.setXmlFileName(sCaleydoXMLfile);
caleydoCore.start();
}
if (!bDoExit) {
new PathwayLoadingProgressIndicatorAction().run(null);
}
initializeColorMapping();
openViewsInRCP();
GeneralManager.get().getEventPublisher().registerReceiverToMediatorGroup(EMediatorType.SELECTION_MEDIATOR,InfoArea.getInfoArea());
}
Program: 59041
Project: 59041
Buggy source:
public boolean remove(KeyType key,ValueType value){
  Set<ValueType> hashTmp=super.get(key);
  if (hashTmp == null)   return false;
  return hashTmp.remove(value);
}

Fixed version (ground truth):
@Override public ValueType remove(Object arg0){
  Set<ValueType> tempSet=internalMap.remove(arg0);
  if (tempSet == null)   return null;
 else   return tempSet.iterator().next();
}
Program: 59042
Project: 59042
Buggy source:
public void put(KeyType key,ValueType value){
  Set<ValueType> hashTmp=super.get(key);
  if (hashTmp == null) {
    hashTmp=new HashSet<ValueType>();
  }
  hashTmp.add(value);
  super.put(key,hashTmp);
}

Fixed version (ground truth):
/** 
 * Behaves similar to a classical hashMap but does not replace the key, it adds it instead. 
 * @return always null
 */
@Override public ValueType put(KeyType key,ValueType value){
  Set<ValueType> tmpSet=internalMap.get(key);
  if (tmpSet == null) {
    tmpSet=new HashSet<ValueType>();
  }
  tmpSet.add(value);
  internalMap.put(key,tmpSet);
  return null;
}
Program: 59044
Project: 59044
Buggy source:
public boolean checkStatus(int iElementID){
  for (  ESelectionType type : alSelectionTypes) {
    if (checkStatus(type,iElementID))     return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Check whether an element is in any selection
 * @param iElementID the element id 
 * @return true if the element exists in the selection manager, else false
 */
public boolean checkStatus(int iElementID){
  for (  ESelectionType type : alSelectionTypes) {
    if (checkStatus(type,iElementID))     return true;
  }
  return false;
}
Program: 59045
Project: 59045
Buggy source:
/** 
 * Constructor.
 */
public IDMappingManager(){
  hashType2Mapping=new HashMap<EMappingType,HashMap<?,?>>();
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public IDMappingManager(){
  hashType2Mapping=new HashMap<EMappingType,Map<?,?>>();
}
Program: 59046
Project: 59046
Buggy source:
public GLCaleydoCanvas(final GLCapabilities glCapabilities){
  super(glCapabilities);
  joglMouseListener=new PickingJoglMouseListener();
  this.iGLCanvasID=GeneralManager.get().getIDManager().createID(EManagedObjectType.VIEW_GL_CANVAS);
  this.addMouseListener(joglMouseListener);
  this.addMouseMotionListener(joglMouseListener);
  this.addMouseWheelListener(joglMouseListener);
}

Fixed version (ground truth):
public GLCaleydoCanvas(final GLCapabilities glCapabilities){
  super(glCapabilities);
  this.getContext().setSynchronized(true);
  joglMouseListener=new PickingJoglMouseListener();
  this.iGLCanvasID=GeneralManager.get().getIDManager().createID(EManagedObjectType.VIEW_GL_CANVAS);
  this.addMouseListener(joglMouseListener);
  this.addMouseMotionListener(joglMouseListener);
  this.addMouseWheelListener(joglMouseListener);
}
Program: 59050
Project: 59050
Buggy source:
/** 
 * @param iNumberOfRandomElements
 */
public final void setNumberOfSamplesToShow(int iNumberOfRandomElements){
  if (iNumberOfRandomElements != this.iNumberOfRandomElements && bUseRandomSampling) {
    this.iNumberOfRandomElements=iNumberOfRandomElements;
    initData();
    return;
  }
  this.iNumberOfRandomElements=iNumberOfRandomElements;
}

Fixed version (ground truth):
/** 
 * Set the number of samples which are shown in the view. The distribution is purely random
 * @param iNumberOfRandomElements the number
 */
public final void setNumberOfSamplesToShow(int iNumberOfRandomElements){
  if (iNumberOfRandomElements != this.iNumberOfRandomElements && bUseRandomSampling) {
    this.iNumberOfRandomElements=iNumberOfRandomElements;
    initData();
    return;
  }
  this.iNumberOfRandomElements=iNumberOfRandomElements;
}
Program: 59052
Project: 59052
Buggy source:
/** 
 * Constructor.
 * @param iViewID
 * @param iGLCanvasID
 * @param sLabel
 * @param viewFrustum
 */
public GLHeatMap(final int iGLCanvasID,final String sLabel,final IViewFrustum viewFrustum){
  super(iGLCanvasID,sLabel,viewFrustum);
  viewType=EManagedObjectType.GL_HEAT_MAP;
  ArrayList<ESelectionType> alSelectionTypes=new ArrayList<ESelectionType>();
  alSelectionTypes.add(ESelectionType.NORMAL);
  alSelectionTypes.add(ESelectionType.MOUSE_OVER);
  alSelectionTypes.add(ESelectionType.SELECTION);
  contentSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPRESSION_INDEX).externalIDType(EIDType.DAVID).mappingType(EMappingType.EXPRESSION_INDEX_2_DAVID,EMappingType.DAVID_2_EXPRESSION_INDEX).build();
  storageSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPRESSION_EXPERIMENT).build();
  colorMapper=ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION);
  colorMappingBar=new GLColorMappingBarMiniView(viewFrustum);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param iViewID
 * @param iGLCanvasID
 * @param sLabel
 * @param viewFrustum
 */
public GLHeatMap(final int iGLCanvasID,final String sLabel,final IViewFrustum viewFrustum){
  super(iGLCanvasID,sLabel,viewFrustum);
  viewType=EManagedObjectType.GL_HEAT_MAP;
  ArrayList<ESelectionType> alSelectionTypes=new ArrayList<ESelectionType>();
  alSelectionTypes.add(ESelectionType.NORMAL);
  alSelectionTypes.add(ESelectionType.MOUSE_OVER);
  alSelectionTypes.add(ESelectionType.SELECTION);
  contentSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPRESSION_INDEX).externalIDType(EIDType.DAVID).mappingType(EMappingType.EXPRESSION_INDEX_2_DAVID,EMappingType.DAVID_2_EXPRESSION_INDEX).build();
  storageSelectionManager=new GenericSelectionManager.Builder(EIDType.EXPRESSION_EXPERIMENT).build();
  colorMapper=ColorMappingManager.get().getColorMapping(EColorMappingType.GENE_EXPRESSION);
  colorMappingBar=new GLColorMappingBarMiniView(viewFrustum);
  iNumberOfRandomElements=generalManager.getPreferenceStore().getInt("String_Node_Str");
}
Program: 59053
Project: 59053
Buggy source:
public static void startCaleydoCore(){
  if (sCaleydoXMLfile.equals("String_Node_Str")) {
    Display display=PlatformUI.createDisplay();
    Shell shell=new Shell(display);
    WizardDialog projectWizardDialog=new WizardDialog(shell,new CaleydoProjectWizard(shell));
    if (WizardDialog.CANCEL == projectWizardDialog.open()) {
      bDoExit=true;
    }
    shell.dispose();
    if (bPathwayViewerMode)     sCaleydoXMLfile=BOOTSTRAP_FILE_PATHWAY_VIEWER_MODE;
 else     sCaleydoXMLfile=BOOTSTRAP_FILE_GENE_EXPRESSION_MODE;
    caleydoCore.setXmlFileName(sCaleydoXMLfile);
    caleydoCore.start();
  }
 else {
    caleydoCore.setXmlFileName(sCaleydoXMLfile);
    caleydoCore.start();
  }
  GeneralManager.get().getViewGLCanvasManager().startAnimator();
  if (!bDoExit) {
    new PathwayLoadingProgressIndicatorAction().run(null);
  }
  openViewsInRCP();
}

Fixed version (ground truth):
public static void startCaleydoCore(){
  if (sCaleydoXMLfile.equals("String_Node_Str")) {
    Display display=PlatformUI.createDisplay();
    Shell shell=new Shell(display);
    WizardDialog projectWizardDialog=new WizardDialog(shell,new CaleydoProjectWizard(shell));
    if (WizardDialog.CANCEL == projectWizardDialog.open()) {
      bDoExit=true;
    }
    shell.dispose();
    if (bPathwayViewerMode)     sCaleydoXMLfile=BOOTSTRAP_FILE_PATHWAY_VIEWER_MODE;
 else     sCaleydoXMLfile=BOOTSTRAP_FILE_GENE_EXPRESSION_MODE;
    caleydoCore.setXmlFileName(sCaleydoXMLfile);
    caleydoCore.start();
  }
 else {
    caleydoCore.setXmlFileName(sCaleydoXMLfile);
    caleydoCore.start();
  }
  if (!bDoExit) {
    new PathwayLoadingProgressIndicatorAction().run(null);
  }
  openViewsInRCP();
  GeneralManager.get().getViewGLCanvasManager().startAnimator();
}
Program: 59056
Project: 59056
Buggy source:
@Override public void run(){
  super.run();
  Iterator<PathwayDatabase> iterPathwayDatabase=pathwayDatabases.iterator();
  while (iterPathwayDatabase.hasNext()) {
    loadAllPathwaysByType(generalManager,iterPathwayDatabase.next());
  }
}

Fixed version (ground truth):
@Override public void run(){
  super.run();
  Iterator<PathwayDatabase> iterPathwayDatabase=pathwayDatabases.iterator();
  while (iterPathwayDatabase.hasNext()) {
    loadAllPathwaysByType(generalManager,iterPathwayDatabase.next());
  }
  generalManager.getPathwayManager().notifyPathwayLoadingFinished(true);
}