nus-yam/ex-repair huggingface dataset:
Program: 57610
Project: 57610
Buggy source:
/** 
 * Handle view exceptions.
 * @param exception
 */
public void handleViewException(RuntimeException exception,final AGLView glEventListener){
  Logger.log(new Status(IStatus.ERROR,this.toString(),"String_Node_Str" + exception.getMessage(),exception));
  glEventListener.getParentComposite().getDisplay().asyncExec(new Runnable(){
    @Override public void run(){
      MessageBox messageBox=new MessageBox(glEventListener.getParentComposite().getShell(),SWT.OK);
      messageBox.setText("String_Node_Str");
      messageBox.setMessage("String_Node_Str" + glEventListener.getViewName() + "String_Node_Str");
      messageBox.open();
    }
  }
);
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      IViewPart viewToClose=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(glEventListener.getViewType());
      PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().hideView(viewToClose);
    }
  }
);
  GeneralManager.get().getViewManager().unregisterGLCanvas(glEventListener.getParentGLCanvas());
}

Fixed version (ground truth):
/** 
 * Handle view exceptions.
 * @param exception
 */
public void handleViewException(RuntimeException exception,final AGLView glEventListener){
  Logger.log(new Status(IStatus.ERROR,this.toString(),"String_Node_Str" + exception.getMessage(),exception));
  glEventListener.getParentComposite().getDisplay().asyncExec(new Runnable(){
    @Override public void run(){
      MessageBox messageBox=new MessageBox(glEventListener.getParentComposite().getShell(),SWT.OK);
      messageBox.setText("String_Node_Str");
      messageBox.setMessage("String_Node_Str" + glEventListener.getViewName() + "String_Node_Str");
      messageBox.open();
    }
  }
);
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      IViewPart viewToClose=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(glEventListener.getViewType());
      PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().hideView(viewToClose);
    }
  }
);
}
Program: 57611
Project: 57611
Buggy source:
/** 
 * Destroys this view by removing data common in all views and calling  {@link #destroyViewSpecificContent(GL2)}.
 * @param gl
 */
public final void destroy(GL2 gl){
  this.broadcastElements(EVAOperation.REMOVE_ELEMENT);
  pickingManager.removeViewSpecificData(uniqueID);
  generalManager.getViewManager().getConnectedElementRepresentationManager().clearAll();
  unregisterEventListeners();
  destroyViewSpecificContent(gl);
}

Fixed version (ground truth):
/** 
 * Destroys this view by removing data common in all views and calling  {@link #destroyViewSpecificContent(GL2)}.
 * @param gl
 */
public final void destroy(GL2 gl){
  System.out.println("String_Node_Str" + label);
  this.broadcastElements(EVAOperation.REMOVE_ELEMENT);
  pickingManager.removeViewSpecificData(uniqueID);
  generalManager.getViewManager().getConnectedElementRepresentationManager().clearAll();
  unregisterEventListeners();
  destroyViewSpecificContent(gl);
}
Program: 57612
Project: 57612
Buggy source:
@Override public void dispose(GLAutoDrawable drawable){
  GL2 gl=drawable.getGL().getGL2();
  ViewManager.get().destroyRemoteViews(gl,this);
  ViewManager.get().unregisterGLView(this);
  destroy(gl);
}

Fixed version (ground truth):
@Override public void dispose(GLAutoDrawable drawable){
  System.out.println("String_Node_Str" + label);
  GL2 gl=drawable.getGL().getGL2();
  ViewManager.get().destroyRemoteViews(gl,this);
  ViewManager.get().unregisterGLView(this);
  destroy(gl);
}
Program: 57613
Project: 57613
Buggy source:
public void updateView(AGLView view){
  if (view.isRenderedRemote())   return;
  ViewNode viewNode=null;
  for (  ViewNode node : viewNodes) {
    if (node.getRepresentedView() == view) {
      viewNode=node;
      break;
    }
  }
  if (viewNode == null)   return;
  Set<IDataDomain> dataDomainsOfView=view.getDataDomains();
  if (dataDomainsOfView != null) {
    updateGraphEdgesOfViewNode(viewNode);
    viewNode.update();
  }
}

Fixed version (ground truth):
public void updateView(AGLView view){
  if (view.isRenderedRemote())   return;
  ViewNode viewNode=null;
  for (  ViewNode node : viewNodes) {
    if (node.getRepresentedView() == view) {
      viewNode=node;
      break;
    }
  }
  if (viewNode == null)   return;
  Set<IDataDomain> dataDomainsOfView=view.getDataDomains();
  if (dataDomainsOfView != null) {
    viewNode.update();
    updateGraphEdgesOfViewNode(viewNode);
  }
}
Program: 57614
Project: 57614
Buggy source:
@Override public void update(){
  retrieveDataContainers();
  dataContainerListRenderer.setDataContainers(getDataContainers());
  recalculateNodeSize();
  graphLayout.fitNodesToDrawingArea(view.calculateGraphDrawingArea());
  view.setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void update(){
  dataDomains=representedView.getDataDomains();
  retrieveDataContainers();
  dataContainerListRenderer.setDataContainers(getDataContainers());
  recalculateNodeSize();
  graphLayout.fitNodesToDrawingArea(view.calculateGraphDrawingArea());
  view.setDisplayListDirty();
}
Program: 57615
Project: 57615
Buggy source:
@Override public void update(){
  recalculateNodeSize();
}

Fixed version (ground truth):
@Override public void update(){
  dataDomains=representedView.getDataDomains();
  recalculateNodeSize();
}
Program: 57617
Project: 57617
Buggy source:
@Override public void dispose(GLAutoDrawable drawable){
  System.out.println("String_Node_Str" + label);
  GL2 gl=drawable.getGL().getGL2();
  ViewManager.get().destroyRemoteViews(gl,this);
  ViewManager.get().unregisterGLView(this);
  destroy(gl);
}

Fixed version (ground truth):
@Override public void dispose(GLAutoDrawable drawable){
  if (PlatformUI.getWorkbench().isClosing())   return;
  System.out.println("String_Node_Str" + label);
  GL2 gl=drawable.getGL().getGL2();
  ViewManager.get().destroyRemoteViews(gl,this);
  ViewManager.get().unregisterGLView(this);
  destroy(gl);
}
Program: 57618
Project: 57618
Buggy source:
@Override protected void destroyViewSpecificContent(GL2 gl){
  layoutManager.destroy(gl);
}

Fixed version (ground truth):
@Override protected void destroyViewSpecificContent(GL2 gl){
  if (layoutManager != null)   layoutManager.destroy(gl);
}
Program: 57619
Project: 57619
Buggy source:
protected void retrieveDataContainers(){
  dataContainers=new ArrayList<DataContainer>();
  List<DataContainer> containers=((IDataContainerBasedView)representedView).getDataContainers();
  if (containers == null)   return;
  Set<IDataDomain> dataDomains=new HashSet<IDataDomain>();
  for (  DataContainer container : containers) {
    if (container instanceof PathwayDataContainer) {
      dataDomains.add(((PathwayDataContainer)container).getPathwayDataDomain());
    }
 else {
      dataDomains.add(container.getDataDomain());
    }
  }
  List<Pair<Float,ADataNode>> sortedDataNodes=new ArrayList<Pair<Float,ADataNode>>();
  for (  IDataDomain dataDomain : dataDomains) {
    ADataNode dataNode=view.getDataNode(dataDomain);
    if (dataNode != null) {
      sortedDataNodes.add(new Pair<Float,ADataNode>((float)dataNode.getPosition().getX(),dataNode));
    }
  }
  Collections.sort(sortedDataNodes);
  for (  Pair<Float,ADataNode> dataNodePair : sortedDataNodes) {
    ADataNode dataNode=dataNodePair.getSecond();
    List<DataContainer> sortedNodeDataContainers=dataNode.getDataContainers();
    for (    DataContainer nodeContainer : sortedNodeDataContainers) {
      for (      DataContainer container : containers) {
        if (nodeContainer == container) {
          dataContainers.add(container);
          break;
        }
      }
    }
  }
}

Fixed version (ground truth):
protected void retrieveDataContainers(){
  dataContainers=new ArrayList<DataContainer>(((IDataContainerBasedView)representedView).getDataContainers());
  if (dataContainers == null) {
    dataContainers=new ArrayList<DataContainer>();
    return;
  }
  Set<IDataDomain> dataDomains=new HashSet<IDataDomain>();
  for (  DataContainer container : dataContainers) {
    if (container instanceof PathwayDataContainer) {
      dataDomains.add(((PathwayDataContainer)container).getPathwayDataDomain());
    }
 else {
      dataDomains.add(container.getDataDomain());
    }
  }
  sortDataContainers();
}
Program: 57620
Project: 57620
Buggy source:
@Override public void handleDrop(GL2 gl,Set<IDraggable> draggables,float mouseCoordinateX,float mouseCoordinateY,DragAndDropController dragAndDropController){
  ArrayList<DataContainer> dataContainers=new ArrayList<DataContainer>();
  for (  IDraggable draggable : draggables) {
    if (draggable instanceof DimensionGroupRenderer) {
      DimensionGroupRenderer dimensionGroupRenderer=(DimensionGroupRenderer)draggable;
      dataContainers.add(dimensionGroupRenderer.getDataContainer());
    }
  }
  if (!dataContainers.isEmpty()) {
    DataContainer dataContainer=dataContainers.get(0);
    AddDataContainersEvent event=new AddDataContainersEvent(dataContainer);
    event.setReceiver(representedView);
    event.setSender(this);
    GeneralManager.get().getEventPublisher().triggerEvent(event);
    getDataContainers().add(dataContainer);
    dataDomains.add(dataContainer.getDataDomain());
    dataContainerListRenderer.setDataContainers(getDataContainers());
    view.updateGraphEdgesOfViewNode(this);
    recalculateNodeSize();
    graphLayout.fitNodesToDrawingArea(view.calculateGraphDrawingArea());
    view.setDisplayListDirty();
  }
}

Fixed version (ground truth):
@Override public void handleDrop(GL2 gl,Set<IDraggable> draggables,float mouseCoordinateX,float mouseCoordinateY,DragAndDropController dragAndDropController){
  ArrayList<DataContainer> dataContainers=new ArrayList<DataContainer>();
  for (  IDraggable draggable : draggables) {
    if (draggable instanceof DimensionGroupRenderer) {
      DimensionGroupRenderer dimensionGroupRenderer=(DimensionGroupRenderer)draggable;
      dataContainers.add(dimensionGroupRenderer.getDataContainer());
    }
  }
  if (!dataContainers.isEmpty()) {
    DataContainer dataContainer=dataContainers.get(0);
    AddDataContainersEvent event=new AddDataContainersEvent(dataContainer);
    event.setReceiver(representedView);
    event.setSender(this);
    GeneralManager.get().getEventPublisher().triggerEvent(event);
    if (dataContainer instanceof PathwayDataContainer) {
      dataDomains.add(((PathwayDataContainer)dataContainer).getPathwayDataDomain());
    }
 else {
      dataDomains.add(dataContainer.getDataDomain());
    }
    getDataContainers().add(dataContainer);
    sortDataContainers();
    dataContainerListRenderer.setDataContainers(getDataContainers());
    view.updateGraphEdgesOfViewNode(this);
    recalculateNodeSize();
    graphLayout.fitNodesToDrawingArea(view.calculateGraphDrawingArea());
    view.setDisplayListDirty();
  }
}
Program: 57621
Project: 57621
Buggy source:
@Override public void registerEventListeners(){
  addSelectionTypeListener=new SelectionTypeListener();
  addSelectionTypeListener.setHandler(this);
  GeneralManager.get().getEventPublisher().addListener(SelectionTypeEvent.class,addSelectionTypeListener);
  removeManagedSelectionTypesListener=new RemoveManagedSelectionTypesListener();
  removeManagedSelectionTypesListener.setHandler(this);
  GeneralManager.get().getEventPublisher().addListener(RemoveManagedSelectionTypesEvent.class,removeManagedSelectionTypesListener);
}

Fixed version (ground truth):
@Override public synchronized void registerEventListeners(){
  addSelectionTypeListener=new SelectionTypeListener();
  addSelectionTypeListener.setHandler(this);
  GeneralManager.get().getEventPublisher().addListener(SelectionTypeEvent.class,addSelectionTypeListener);
  removeManagedSelectionTypesListener=new RemoveManagedSelectionTypesListener();
  removeManagedSelectionTypesListener.setHandler(this);
  GeneralManager.get().getEventPublisher().addListener(RemoveManagedSelectionTypesEvent.class,removeManagedSelectionTypesListener);
}
Program: 57622
Project: 57622
Buggy source:
/** 
 * Changes the current selection type. By default the selection type is set to SelectionType.SELECTION. Should only be called via a  {@link SelectionTypeEvent}.
 * @param selectionType
 */
public void setSelectionType(SelectionType selectionType){
  this.selectionType=selectionType;
}

Fixed version (ground truth):
/** 
 * Changes the current selection type. By default the selection type is set to SelectionType.SELECTION. Should only be called via a  {@link SelectionTypeEvent}.
 * @param selectionType
 */
public synchronized void setSelectionType(SelectionType selectionType){
  this.selectionType=selectionType;
}
Program: 57623
Project: 57623
Buggy source:
/** 
 * Returns the current selection type. By default this is SelectionType.SELECTION.
 * @return
 */
public SelectionType getSelectionType(){
  return selectionType;
}

Fixed version (ground truth):
/** 
 * Returns the current selection type. By default this is SelectionType.SELECTION.
 * @return
 */
public synchronized SelectionType getSelectionType(){
  return selectionType;
}
Program: 57624
Project: 57624
Buggy source:
@Override public void unregisterEventListeners(){
  if (addSelectionTypeListener != null) {
    GeneralManager.get().getEventPublisher().removeListener(addSelectionTypeListener);
    addSelectionTypeListener=null;
  }
  if (removeManagedSelectionTypesListener != null) {
    GeneralManager.get().getEventPublisher().removeListener(removeManagedSelectionTypesListener);
    removeManagedSelectionTypesListener=null;
  }
}

Fixed version (ground truth):
@Override public synchronized void unregisterEventListeners(){
  if (addSelectionTypeListener != null) {
    GeneralManager.get().getEventPublisher().removeListener(addSelectionTypeListener);
    addSelectionTypeListener=null;
  }
  if (removeManagedSelectionTypesListener != null) {
    GeneralManager.get().getEventPublisher().removeListener(removeManagedSelectionTypesListener);
    removeManagedSelectionTypesListener=null;
  }
}
Program: 57625
Project: 57625
Buggy source:
/** 
 * Removes a custom selection type from the selection manager. Should only be called via a   {@link SelectionTypeEvent}
 */
void removeSelectionType(SelectionType selectionType){
  hashSelectionTypes.remove(selectionType);
  selectionTypes.remove(selectionType);
}

Fixed version (ground truth):
/** 
 * Removes a custom selection type from the selection manager. Should only be called via a   {@link SelectionTypeEvent}
 */
synchronized void removeSelectionType(SelectionType selectionType){
  hashSelectionTypes.remove(selectionType);
  selectionTypes.remove(selectionType);
}
Program: 57627
Project: 57627
Buggy source:
@Override public String toString(){
  String result="String_Node_Str" + idType + "String_Node_Str";
  for (  SelectionType selectionType : hashSelectionTypes.keySet()) {
    result=result + "String_Node_Str" + selectionType+ "String_Node_Str"+ hashSelectionTypes.get(selectionType).size()+ "String_Node_Str";
  }
  return result;
}

Fixed version (ground truth):
@Override public synchronized String toString(){
  String result="String_Node_Str" + idType + "String_Node_Str";
  for (  SelectionType selectionType : hashSelectionTypes.keySet()) {
    result=result + "String_Node_Str" + selectionType+ "String_Node_Str"+ hashSelectionTypes.get(selectionType).size()+ "String_Node_Str";
  }
  return result;
}
Program: 57628
Project: 57628
Buggy source:
public void createPathwayResourceLoader(PathwayDatabaseType type){
  IExtensionRegistry reg=Platform.getExtensionRegistry();
  if (type == PathwayDatabaseType.KEGG) {
    IExtensionPoint ep=reg.getExtensionPoint("String_Node_Str");
    IExtension ext=ep.getExtension("String_Node_Str");
    IConfigurationElement[] ce=ext.getConfigurationElements();
    try {
      keggPathwayResourceLoader=(IPathwayResourceLoader)ce[0].createExecutableExtension("String_Node_Str");
    }
 catch (    Exception ex) {
      throw new RuntimeException("String_Node_Str",ex);
    }
  }
 else   if (type == PathwayDatabaseType.BIOCARTA) {
    IExtensionPoint ep=reg.getExtensionPoint("String_Node_Str");
    IExtension ext=ep.getExtension("String_Node_Str");
    IConfigurationElement[] ce=ext.getConfigurationElements();
    try {
      biocartaPathwayResourceLoader=(IPathwayResourceLoader)ce[0].createExecutableExtension("String_Node_Str");
    }
 catch (    Exception ex) {
      throw new RuntimeException("String_Node_Str",ex);
    }
  }
 else {
    throw new IllegalStateException("String_Node_Str" + type);
  }
}

Fixed version (ground truth):
public void createPathwayResourceLoader(PathwayDatabaseType type){
  IExtensionRegistry reg=Platform.getExtensionRegistry();
  try {
    if (type == PathwayDatabaseType.KEGG) {
      IExtensionPoint ep=reg.getExtensionPoint("String_Node_Str");
      IExtension ext=ep.getExtension("String_Node_Str");
      IConfigurationElement[] ce=ext.getConfigurationElements();
      keggPathwayResourceLoader=(IPathwayResourceLoader)ce[0].createExecutableExtension("String_Node_Str");
    }
 else     if (type == PathwayDatabaseType.BIOCARTA) {
      IExtensionPoint ep=reg.getExtensionPoint("String_Node_Str");
      IExtension ext=ep.getExtension("String_Node_Str");
      IConfigurationElement[] ce=ext.getConfigurationElements();
      biocartaPathwayResourceLoader=(IPathwayResourceLoader)ce[0].createExecutableExtension("String_Node_Str");
    }
 else {
      throw new IllegalStateException("String_Node_Str" + type);
    }
  }
 catch (  Exception ex) {
    Logger.log(new Status(IStatus.INFO,"String_Node_Str","String_Node_Str" + type.getName() + "String_Node_Str"));
  }
}
Program: 57630
Project: 57630
Buggy source:
/** 
 * Constructor. If the glCanvas object is null - then the view is rendered remote.
 * @param viewType TODO
 * @param viewName TODO
 */
protected AGLView(GLCanvas glCanvas,Composite parentComposite,final ViewFrustum viewFrustum,String viewType,String viewName){
  super(GeneralManager.get().getIDCreator().createID(ManagedObjectType.GL_VIEW),parentComposite,viewType,viewName);
  GeneralManager.get().getViewManager().registerGLView(this);
  parentGLCanvas=glCanvas;
  glMouseListener=new GLMouseListener();
  glMouseListener.setNavigationModes(false,false,false);
  parentComposite.addKeyListener(new GLFPSKeyListener(this));
  glCanvas.addMouseListener(glMouseListener);
  glCanvas.addMouseMotionListener(glMouseListener);
  glCanvas.addMouseWheelListener(glMouseListener);
  idPickingListeners=new HashMap<String,HashMap<Integer,Set<IPickingListener>>>();
  typePickingListeners=new HashMap<String,Set<IPickingListener>>();
  this.viewFrustum=viewFrustum;
  viewCamera=new ViewCameraBase(uniqueID);
  pickingManager=generalManager.getViewManager().getPickingManager();
  textureManager=new TextureManager();
  glMouseWheelListener=new GLMouseWheelListener(this);
  pixelGLConverter=new PixelGLConverter(viewFrustum,parentGLCanvas);
  mouseWheelListeners=new HashSet<IMouseWheelHandler>();
}

Fixed version (ground truth):
/** 
 * Constructor. If the glCanvas object is null - then the view is rendered remote.
 * @param viewType TODO
 * @param viewName TODO
 */
protected AGLView(GLCanvas glCanvas,final Composite parentComposite,final ViewFrustum viewFrustum,String viewType,String viewName){
  super(GeneralManager.get().getIDCreator().createID(ManagedObjectType.GL_VIEW),parentComposite,viewType,viewName);
  GeneralManager.get().getViewManager().registerGLView(this);
  parentGLCanvas=glCanvas;
  glMouseListener=new GLMouseListener();
  glMouseListener.setNavigationModes(false,false,false);
  glCanvas.addMouseListener(glMouseListener);
  glCanvas.addMouseMotionListener(glMouseListener);
  glCanvas.addMouseWheelListener(glMouseListener);
  idPickingListeners=new HashMap<String,HashMap<Integer,Set<IPickingListener>>>();
  typePickingListeners=new HashMap<String,Set<IPickingListener>>();
  this.viewFrustum=viewFrustum;
  viewCamera=new ViewCameraBase(uniqueID);
  pickingManager=generalManager.getViewManager().getPickingManager();
  textureManager=new TextureManager();
  glMouseWheelListener=new GLMouseWheelListener(this);
  pixelGLConverter=new PixelGLConverter(viewFrustum,parentGLCanvas);
  mouseWheelListeners=new HashSet<IMouseWheelHandler>();
}
Program: 57631
Project: 57631
Buggy source:
@Override public void partActivated(IWorkbenchPartReference partRef){
  IWorkbenchPart activePart=partRef.getPart(false);
  if (!(activePart instanceof CaleydoRCPViewPart)) {
    return;
  }
  CaleydoRCPViewPart viewPart=(CaleydoRCPViewPart)activePart;
  if (viewPart.getSWTComposite() != null)   viewPart.getSWTComposite().forceFocus();
  drawInlineToolBar(viewPart);
  updateSupportViews(viewPart);
}

Fixed version (ground truth):
@Override public void partActivated(IWorkbenchPartReference partRef){
  IWorkbenchPart activePart=partRef.getPart(false);
  if (!(activePart instanceof CaleydoRCPViewPart)) {
    return;
  }
  CaleydoRCPViewPart viewPart=(CaleydoRCPViewPart)activePart;
  drawInlineToolBar(viewPart);
  updateSupportViews(viewPart);
  if (viewPart.getSWTComposite() != null) {
    viewPart.getSWTComposite().forceFocus();
  }
}
Program: 57632
Project: 57632
Buggy source:
/** 
 * Set whether this view is visible.
 * @param isVisible true if the view is visible
 */
public void setVisible(boolean isVisible){
  this.isVisible=isVisible;
}

Fixed version (ground truth):
/** 
 * Set whether this view is visible.
 * @param isVisible true if the view is visible
 */
public void setVisible(boolean isVisible){
  this.isVisible=isVisible;
  if (!isVisible) {
    focusGained=false;
  }
}
Program: 57633
Project: 57633
Buggy source:
/** 
 * Constructor. If the glCanvas object is null - then the view is rendered remote.
 * @param viewType TODO
 * @param viewName TODO
 */
protected AGLView(GLCanvas glCanvas,final Composite parentComposite,final ViewFrustum viewFrustum,String viewType,String viewName){
  super(GeneralManager.get().getIDCreator().createID(ManagedObjectType.GL_VIEW),parentComposite,viewType,viewName);
  GeneralManager.get().getViewManager().registerGLView(this);
  parentGLCanvas=glCanvas;
  glMouseListener=new GLMouseListener();
  glMouseListener.setNavigationModes(false,false,false);
  glCanvas.addMouseListener(glMouseListener);
  glCanvas.addMouseMotionListener(glMouseListener);
  glCanvas.addMouseWheelListener(glMouseListener);
  idPickingListeners=new HashMap<String,HashMap<Integer,Set<IPickingListener>>>();
  typePickingListeners=new HashMap<String,Set<IPickingListener>>();
  this.viewFrustum=viewFrustum;
  viewCamera=new ViewCameraBase(uniqueID);
  pickingManager=generalManager.getViewManager().getPickingManager();
  textureManager=new TextureManager();
  glMouseWheelListener=new GLMouseWheelListener(this);
  pixelGLConverter=new PixelGLConverter(viewFrustum,parentGLCanvas);
  mouseWheelListeners=new HashSet<IMouseWheelHandler>();
}

Fixed version (ground truth):
/** 
 * Constructor. If the glCanvas object is null - then the view is rendered remote.
 * @param viewType TODO
 * @param viewName TODO
 */
protected AGLView(GLCanvas glCanvas,final Composite parentComposite,final ViewFrustum viewFrustum,String viewType,String viewName){
  super(GeneralManager.get().getIDCreator().createID(ManagedObjectType.GL_VIEW),parentComposite,viewType,viewName);
  GeneralManager.get().getViewManager().registerGLView(this);
  parentGLCanvas=glCanvas;
  glMouseListener=new GLMouseListener();
  glMouseListener.setNavigationModes(false,false,false);
  glCanvas.addMouseListener(glMouseListener);
  glCanvas.addMouseMotionListener(glMouseListener);
  glCanvas.addMouseWheelListener(glMouseListener);
  glCanvas.addFocusListener(new FocusListener(){
    @Override public void focusLost(    FocusEvent e){
    }
    @Override public void focusGained(    FocusEvent e){
      focusGained=true;
    }
  }
);
  idPickingListeners=new HashMap<String,HashMap<Integer,Set<IPickingListener>>>();
  typePickingListeners=new HashMap<String,Set<IPickingListener>>();
  this.viewFrustum=viewFrustum;
  viewCamera=new ViewCameraBase(uniqueID);
  pickingManager=generalManager.getViewManager().getPickingManager();
  textureManager=new TextureManager();
  glMouseWheelListener=new GLMouseWheelListener(this);
  pixelGLConverter=new PixelGLConverter(viewFrustum,parentGLCanvas);
  mouseWheelListeners=new HashSet<IMouseWheelHandler>();
}
Program: 57634
Project: 57634
Buggy source:
public final boolean wasMouseDoubleClicked(){
  return mouseDoubleClick;
}

Fixed version (ground truth):
public final boolean wasMouseDoubleClicked(){
  boolean bTmp=mouseDoubleClick;
  mouseDoubleClick=false;
  return bTmp;
}
Program: 57635
Project: 57635
Buggy source:
@Override public void run(){
  parentComposite.addKeyListener(glKeyListener);
}

Fixed version (ground truth):
@Override public void run(){
  parentComposite.addKeyListener(fpsKeyListener);
}
Program: 57636
Project: 57636
Buggy source:
public void loadWorkbenchData(String dirName){
  try {
    FileOperations.deleteDirectory(ProjectSaver.WORKBENCH_MEMENTO_FOLDER + ProjectSaver.WORKBENCH_MEMENTO_FILE);
    File workbenchFile=new File(dirName + ProjectSaver.WORKBENCH_MEMENTO_FILE);
    if (!workbenchFile.exists()) {
      Logger.log(new Status(Status.INFO,this.toString(),"String_Node_Str" + workbenchFile));
      return;
    }
    FileOperations.copyFolder(new File(dirName + ProjectSaver.WORKBENCH_MEMENTO_FILE),new File(ProjectSaver.WORKBENCH_MEMENTO_FOLDER + ProjectSaver.WORKBENCH_MEMENTO_FILE));
  }
 catch (  IOException e) {
    Logger.log(new Status(Status.INFO,this.toString(),"String_Node_Str" + dirName,e));
  }
}

Fixed version (ground truth):
public void loadWorkbenchData(String dirName){
  try {
    FileOperations.deleteDirectory(ProjectSaver.WORKBENCH_MEMENTO_FOLDER + ProjectSaver.WORKBENCH_MEMENTO_FILE);
    File workbenchFile=new File(dirName + ProjectSaver.WORKBENCH_MEMENTO_FILE);
    if (!workbenchFile.exists()) {
      Logger.log(new Status(Status.INFO,this.toString(),"String_Node_Str" + workbenchFile));
      return;
    }
    File f=new File(ProjectSaver.WORKBENCH_MEMENTO_FOLDER);
    if (f.exists() == false) {
      f.mkdirs();
    }
    FileOperations.copyFolder(new File(dirName + ProjectSaver.WORKBENCH_MEMENTO_FILE),new File(ProjectSaver.WORKBENCH_MEMENTO_FOLDER + ProjectSaver.WORKBENCH_MEMENTO_FILE));
  }
 catch (  IOException e) {
    Logger.log(new Status(Status.INFO,this.toString(),"String_Node_Str" + dirName,e));
  }
}
Program: 57637
Project: 57637
Buggy source:
@Override public void rightClicked(Pick pick){
  hideToolTip();
}

Fixed version (ground truth):
@Override public void rightClicked(Pick pick){
  triggerToolTipHide();
}
Program: 57638
Project: 57638
Buggy source:
@Override public void mouseOver(Pick pick){
  if (labelProvider != null) {
    toolTipMessage=labelProvider.getLabel();
  }
  thread=new ToolTipThread();
  Runnable runnable=new Runnable(){
    @Override public void run(){
      view.getParentComposite().getDisplay().asyncExec(thread);
    }
  }
;
  Thread timerThread=new Thread(runnable);
  timerThread.start();
}

Fixed version (ground truth):
@Override public void mouseOver(Pick pick){
  if (labelProvider != null) {
    toolTipMessage=labelProvider.getLabel();
  }
  triggerToolTipCreation();
}
Program: 57639
Project: 57639
Buggy source:
@Override public void run(){
  if (thread != null)   thread.hideToolTip();
}

Fixed version (ground truth):
@Override public void run(){
  hideToolTip();
}
Program: 57640
Project: 57640
Buggy source:
@Override public void clicked(Pick pick){
  hideToolTip();
}

Fixed version (ground truth):
@Override public void clicked(Pick pick){
  triggerToolTipHide();
}
Program: 57641
Project: 57641
Buggy source:
private synchronized void createToolTip(){
  if (hideToolTip)   return;
  System.out.println("String_Node_Str");
  PointerInfo pointerInfo=MouseInfo.getPointerInfo();
  swingTip=new ToolTipp(toolTipMessage,new JFrame());
  swingTip.setLocation(pointerInfo.getLocation().x,pointerInfo.getLocation().y + MOUSE_POSITION_TOOLTIP_SPACING_PIXELS);
  swingTip.setVisible(true);
}

Fixed version (ground truth):
private synchronized void createToolTip(){
  if (toolTipThread.hideToolTip)   return;
  toolTipThread.create();
}
Program: 57642
Project: 57642
Buggy source:
public ToolTipp(String message,JFrame frame){
  super(frame);
  setType(Type.POPUP);
  FlowLayout layout=new FlowLayout(FlowLayout.CENTER);
  layout.setHgap(0);
  layout.setVgap(0);
  setLayout(layout);
  JLabel label=new JLabel(message);
  JPanel panel=new JPanel();
  panel.setBorder(BorderFactory.createLineBorder(Color.black));
  FlowLayout panelLayout=new FlowLayout(FlowLayout.CENTER);
  panelLayout.setHgap(2);
  panelLayout.setVgap(1);
  panel.setLayout(panelLayout);
  panel.add(label);
  getContentPane().add(panel);
  getContentPane().setBackground(new Color(225,225,225));
  getContentPane().setFocusable(false);
  pack();
}

Fixed version (ground truth):
public ToolTipp(String message,JFrame frame){
  super(frame);
  FlowLayout layout=new FlowLayout(FlowLayout.CENTER);
  layout.setHgap(0);
  layout.setVgap(0);
  setLayout(layout);
  JLabel label=new JLabel(message);
  JPanel panel=new JPanel();
  panel.setBorder(BorderFactory.createLineBorder(Color.black));
  FlowLayout panelLayout=new FlowLayout(FlowLayout.CENTER);
  panelLayout.setHgap(2);
  panelLayout.setVgap(1);
  panel.setLayout(panelLayout);
  panel.add(label);
  getContentPane().add(panel);
  getContentPane().setBackground(new Color(225,225,225));
  getContentPane().setFocusable(false);
  pack();
}
Program: 57643
Project: 57643
Buggy source:
@Override public void mouseOut(Pick pick){
  hideToolTip();
}

Fixed version (ground truth):
@Override public void mouseOut(Pick pick){
  triggerToolTipHide();
}
Program: 57644
Project: 57644
Buggy source:
public ToolTipPickingListener(AGLView view,String toolTipTitle,String toolTipMessage){
  this.view=view;
  this.toolTipTitle=toolTipTitle;
  this.toolTipMessage=toolTipMessage;
}

Fixed version (ground truth):
public ToolTipPickingListener(AGLView view,ILabelProvider labelProvider){
  this.view=view;
  this.labelProvider=labelProvider;
}
Program: 57645
Project: 57645
Buggy source:
private void hideToolTip(){
  view.getParentComposite().getDisplay().asyncExec(new Runnable(){
    @Override public void run(){
      if (thread != null)       thread.hideToolTip();
    }
  }
);
}

Fixed version (ground truth):
private synchronized void hideToolTip(){
  if (toolTipThread != null) {
    toolTipThread.hide();
  }
  toolTipThread=null;
}
Program: 57646
Project: 57646
Buggy source:
private void createPickingListeners(){
  RecordVirtualArray recordVA=dataContainer.getRecordPerspective().getVirtualArray();
  for (  Group group : recordVA.getGroupList()) {
    ToolTipPickingListener toolTipPickingListener=new ToolTipPickingListener(this,group.getLabel());
    addIDPickingListener(toolTipPickingListener,EPickingType.KM_CURVE.name(),group.getID());
  }
}

Fixed version (ground truth):
private void createPickingListeners(){
  RecordVirtualArray recordVA=dataContainer.getRecordPerspective().getVirtualArray();
  for (  Group group : recordVA.getGroupList()) {
    ToolTipPickingListener toolTipPickingListener=new ToolTipPickingListener(this,group.getLabel());
    addIDPickingListener(toolTipPickingListener,EPickingType.KM_CURVE.name(),group.getID());
  }
  addTypePickingListener(new APickingListener(){
    @Override public void mouseOver(    Pick pick){
      if (mouseOverGroupID != pick.getObjectID()) {
        mouseOverGroupID=pick.getObjectID();
        setDisplayListDirty();
      }
    }
    @Override public void mouseOut(    Pick pick){
      if (mouseOverGroupID == pick.getObjectID()) {
        mouseOverGroupID=-1;
        setDisplayListDirty();
      }
    }
  }
,EPickingType.KM_CURVE.name());
}
Program: 57647
Project: 57647
Buggy source:
private void drawFilledCurve(GL2 gl,ArrayList<Float> dataVector){
  float plotHeight=getPlotHeight();
  float plotWidth=getPlotWidth();
  float bottomAxisSpacing=(detailLevel == EDetailLevel.HIGH ? pixelGLConverter.getGLWidthForPixelWidth(BOTTOM_AXIS_SPACING_PIXELS) : 0);
  float leftAxisSpacing=(detailLevel == EDetailLevel.HIGH ? pixelGLConverter.getGLWidthForPixelWidth(LEFT_AXIS_SPACING_PIXELS) : 0);
  float TIME_BINS=maxAxisTime;
  float timeBinStepSize=1 / TIME_BINS;
  float currentTimeBin=0;
  int remainingItemCount=dataVector.size();
  float ySingleSampleSize=plotHeight / dataVector.size();
  for (int binIndex=0; binIndex < TIME_BINS; binIndex++) {
    while (dataVector.size() > 0 && dataVector.get(0) <= currentTimeBin) {
      dataVector.remove(0);
      remainingItemCount--;
    }
    float y=(float)remainingItemCount * ySingleSampleSize;
    gl.glBegin(GL2.GL_QUADS);
    gl.glVertex3f(leftAxisSpacing + currentTimeBin * plotWidth,bottomAxisSpacing,0);
    gl.glVertex3f(leftAxisSpacing + currentTimeBin * plotWidth,bottomAxisSpacing + y,0);
    currentTimeBin+=timeBinStepSize;
    gl.glVertex3f(leftAxisSpacing + currentTimeBin * plotWidth,bottomAxisSpacing + y,0);
    gl.glVertex3f(leftAxisSpacing + currentTimeBin * plotWidth,bottomAxisSpacing,0);
    gl.glEnd();
  }
}

Fixed version (ground truth):
private void drawFilledCurve(GL2 gl,ArrayList<Float> dataVector){
  float plotHeight=getPlotHeight();
  float plotWidth=getPlotWidth();
  float bottomAxisSpacing=(detailLevel == EDetailLevel.HIGH ? pixelGLConverter.getGLWidthForPixelWidth(BOTTOM_AXIS_SPACING_PIXELS) : 0);
  float leftAxisSpacing=(detailLevel == EDetailLevel.HIGH ? pixelGLConverter.getGLWidthForPixelWidth(LEFT_AXIS_SPACING_PIXELS) : 0);
  float timeBinStepSize=1 / maxAxisTime;
  float currentTimeBin=0;
  int remainingItemCount=dataVector.size();
  float ySingleSampleSize=plotHeight / dataVector.size();
  for (int binIndex=0; binIndex < maxAxisTime; binIndex++) {
    while (dataVector.size() > 0 && dataVector.get(0) <= currentTimeBin) {
      dataVector.remove(0);
      remainingItemCount--;
    }
    float y=(float)remainingItemCount * ySingleSampleSize;
    gl.glBegin(GL2.GL_QUADS);
    gl.glVertex3f(leftAxisSpacing + currentTimeBin * plotWidth,bottomAxisSpacing,0);
    gl.glVertex3f(leftAxisSpacing + currentTimeBin * plotWidth,bottomAxisSpacing + y,0);
    currentTimeBin+=timeBinStepSize;
    gl.glVertex3f(leftAxisSpacing + currentTimeBin * plotWidth,bottomAxisSpacing + y,0);
    gl.glVertex3f(leftAxisSpacing + currentTimeBin * plotWidth,bottomAxisSpacing,0);
    gl.glEnd();
  }
}
Program: 57648
Project: 57648
Buggy source:
private void buildDisplayList(final GL2 gl,int displayListIndex){
  gl.glNewList(displayListIndex,GL2.GL_COMPILE);
  RecordVirtualArray recordVA=dataContainer.getRecordPerspective().getVirtualArray();
  boolean fillCurve=recordVA.getGroupList().size() > 1 ? false : true;
  List<Color> colors=ColorManager.get().getColorList(ColorManager.QUALITATIVE_COLORS);
  for (  Group group : recordVA.getGroupList()) {
    List<Integer> recordIDs=recordVA.getIDsOfGroup(group.getGroupIndex());
    int colorIndex=0;
    if (dataContainer.getRecordGroup() != null)     colorIndex=dataContainer.getRecordGroup().getGroupIndex();
 else     colorIndex=group.getGroupIndex();
    colorIndex=colorIndex % 10;
    int lineWidth=1;
    if (recordGroupSelectionManager.getElements(SelectionType.SELECTION).size() == 1 && (Integer)recordGroupSelectionManager.getElements(SelectionType.SELECTION).toArray()[0] == group.getID()) {
      lineWidth=2;
    }
    if (detailLevel == EDetailLevel.HIGH)     lineWidth*=2;
    gl.glLineWidth(lineWidth);
    renderSingleKaplanMeierCurve(gl,recordIDs,colors.get(colorIndex),fillCurve,group.getID());
  }
  if (detailLevel == EDetailLevel.HIGH) {
    renderAxes(gl);
  }
  gl.glEndList();
}

Fixed version (ground truth):
private void buildDisplayList(final GL2 gl,int displayListIndex){
  gl.glNewList(displayListIndex,GL2.GL_COMPILE);
  RecordVirtualArray recordVA=dataContainer.getRecordPerspective().getVirtualArray();
  boolean fillCurve=recordVA.getGroupList().size() > 1 ? false : true;
  List<Color> colors=ColorManager.get().getColorList(ColorManager.QUALITATIVE_COLORS);
  for (  Group group : recordVA.getGroupList()) {
    List<Integer> recordIDs=recordVA.getIDsOfGroup(group.getGroupIndex());
    int colorIndex=0;
    if (dataContainer.getRecordGroup() != null)     colorIndex=dataContainer.getRecordGroup().getGroupIndex();
 else     colorIndex=group.getGroupIndex();
    colorIndex=colorIndex % 10;
    int lineWidth=1;
    if ((recordGroupSelectionManager.getElements(SelectionType.SELECTION).size() == 1 && (Integer)recordGroupSelectionManager.getElements(SelectionType.SELECTION).toArray()[0] == group.getID()) || (group.getID() == mouseOverGroupID)) {
      lineWidth=2;
    }
    if (detailLevel == EDetailLevel.HIGH)     lineWidth*=2;
    gl.glLineWidth(lineWidth);
    renderSingleKaplanMeierCurve(gl,recordIDs,colors.get(colorIndex),fillCurve,group.getID());
  }
  if (detailLevel == EDetailLevel.HIGH) {
    renderAxes(gl);
  }
  gl.glEndList();
}
Program: 57649
Project: 57649
Buggy source:
@Override public void display(GL2 gl){
  buildDisplayList(gl,displayListIndex);
  isDisplayListDirty=false;
  gl.glCallList(displayListIndex);
  checkForHits(gl);
}

Fixed version (ground truth):
@Override public void display(GL2 gl){
  if (isDisplayListDirty) {
    buildDisplayList(gl,displayListIndex);
    isDisplayListDirty=false;
  }
  gl.glCallList(displayListIndex);
  checkForHits(gl);
}
Program: 57650
Project: 57650
Buggy source:
private void drawCurve(GL2 gl,ArrayList<Float> dataVector){
  float plotHeight=getPlotHeight();
  float plotWidth=getPlotWidth();
  float bottomAxisSpacing=(detailLevel == EDetailLevel.HIGH ? pixelGLConverter.getGLWidthForPixelWidth(BOTTOM_AXIS_SPACING_PIXELS) : 0);
  float leftAxisSpacing=(detailLevel == EDetailLevel.HIGH ? pixelGLConverter.getGLWidthForPixelWidth(LEFT_AXIS_SPACING_PIXELS) : 0);
  float TIME_BINS=maxAxisTime;
  float timeBinStepSize=1 / TIME_BINS;
  float currentTimeBin=0;
  int remainingItemCount=dataVector.size();
  float ySingleSampleSize=plotHeight / dataVector.size();
  gl.glBegin(GL2.GL_LINE_STRIP);
  gl.glVertex3f(leftAxisSpacing,bottomAxisSpacing + plotHeight,1);
  for (int binIndex=0; binIndex < TIME_BINS; binIndex++) {
    while (dataVector.size() > 0 && dataVector.get(0) <= currentTimeBin) {
      dataVector.remove(0);
      remainingItemCount--;
    }
    float y=(float)remainingItemCount * ySingleSampleSize;
    gl.glVertex3f(leftAxisSpacing + currentTimeBin * plotWidth,bottomAxisSpacing + y,1);
    currentTimeBin+=timeBinStepSize;
    gl.glVertex3f(leftAxisSpacing + currentTimeBin * plotWidth,bottomAxisSpacing + y,1);
  }
  gl.glEnd();
}

Fixed version (ground truth):
private void drawCurve(GL2 gl,ArrayList<Float> dataVector){
  float plotHeight=getPlotHeight();
  float plotWidth=getPlotWidth();
  float bottomAxisSpacing=(detailLevel == EDetailLevel.HIGH ? pixelGLConverter.getGLWidthForPixelWidth(BOTTOM_AXIS_SPACING_PIXELS) : 0);
  float leftAxisSpacing=(detailLevel == EDetailLevel.HIGH ? pixelGLConverter.getGLWidthForPixelWidth(LEFT_AXIS_SPACING_PIXELS) : 0);
  float timeBinStepSize=1 / maxAxisTime;
  float currentTimeBin=0;
  int remainingItemCount=dataVector.size();
  float ySingleSampleSize=plotHeight / dataVector.size();
  gl.glBegin(GL2.GL_LINE_STRIP);
  gl.glVertex3f(leftAxisSpacing,bottomAxisSpacing + plotHeight,1);
  for (int binIndex=0; binIndex < maxAxisTime; binIndex++) {
    while (dataVector.size() > 0 && dataVector.get(0) <= currentTimeBin) {
      dataVector.remove(0);
      remainingItemCount--;
    }
    float y=(float)remainingItemCount * ySingleSampleSize;
    gl.glVertex3f(leftAxisSpacing + currentTimeBin * plotWidth,bottomAxisSpacing + y,1);
    currentTimeBin+=timeBinStepSize;
    gl.glVertex3f(leftAxisSpacing + currentTimeBin * plotWidth,bottomAxisSpacing + y,1);
  }
  gl.glEnd();
}
Program: 57651
Project: 57651
Buggy source:
public void open(final AGLView view){
  if (view.isRenderedRemote())   this.view=(AGLView)view.getRemoteRenderingGLView();
 else   this.view=view;
  this.parent=view.getParentComposite();
  final ContextMenuCreator menuCreator=this;
  final JPopupMenu popup=menuCreator.create();
  view.getParentGLCanvas().addMouseListener(new MouseAdapter(){
    @Override public void mouseReleased(    MouseEvent e){
      if (SwingUtilities.isRightMouseButton(e) || e.isPopupTrigger()) {
        int cursorLocationX=MouseInfo.getPointerInfo().getLocation().x - view.getParentGLCanvas().getLocationOnScreen().x;
        int cursorLocationY=MouseInfo.getPointerInfo().getLocation().y - view.getParentGLCanvas().getLocationOnScreen().y;
        popup.show(view.getParentGLCanvas().getParent(),cursorLocationX,cursorLocationY);
      }
    }
  }
);
}

Fixed version (ground truth):
public void open(final AGLView view){
  if (view.isRenderedRemote())   this.view=(AGLView)view.getRemoteRenderingGLView();
 else   this.view=view;
  this.parent=view.getParentComposite();
  final ContextMenuCreator menuCreator=this;
  final JPopupMenu popup=menuCreator.create();
  int cursorLocationX=MouseInfo.getPointerInfo().getLocation().x - view.getParentGLCanvas().getLocationOnScreen().x;
  int cursorLocationY=MouseInfo.getPointerInfo().getLocation().y - view.getParentGLCanvas().getLocationOnScreen().y;
  popup.show(view.getParentGLCanvas().getParent(),cursorLocationX,cursorLocationY);
}
Program: 57652
Project: 57652
Buggy source:
/** 
 * Check whether we had a picking hit somewhere during the previous run
 * @param gl
 */
protected final void checkForHits(final GL2 gl){
  Set<String> hitTypes=pickingManager.getHitTypes(uniqueID);
  if (hitTypes == null)   return;
  contextMenuCreator.clear();
  for (  String pickingType : hitTypes) {
    ArrayList<Pick> alHits=null;
    alHits=pickingManager.getHits(uniqueID,pickingType);
    if (alHits != null && alHits.size() != 0) {
      for (int iCount=0; iCount < alHits.size(); iCount++) {
        Pick tempPick=alHits.get(iCount);
        int pickedObjectID=tempPick.getObjectID();
        if (pickedObjectID == -1) {
          continue;
        }
        PickingMode ePickingMode=tempPick.getPickingMode();
        handlePicking(pickingType,ePickingMode,pickedObjectID,tempPick);
        try {
          PickingType type=PickingType.valueOf(pickingType);
          try {
            handlePickingEvents(type,ePickingMode,pickedObjectID,tempPick);
          }
 catch (          Exception e) {
            Logger.log(new Status(Status.ERROR,this.toString(),"String_Node_Str",e));
          }
        }
 catch (        IllegalArgumentException e) {
        }
      }
      pickingManager.flushHits(uniqueID,pickingType);
    }
  }
  if (contextMenuCreator.hasMenuItems())   contextMenuCreator.open(this);
}

Fixed version (ground truth):
/** 
 * Check whether we had a picking hit somewhere during the previous run
 * @param gl
 */
protected final void checkForHits(final GL2 gl){
  contextMenuCreator.clear();
  Set<String> hitTypes=pickingManager.getHitTypes(uniqueID);
  if (hitTypes == null)   return;
  for (  String pickingType : hitTypes) {
    ArrayList<Pick> alHits=null;
    alHits=pickingManager.getHits(uniqueID,pickingType);
    if (alHits != null && alHits.size() != 0) {
      for (int iCount=0; iCount < alHits.size(); iCount++) {
        Pick tempPick=alHits.get(iCount);
        int pickedObjectID=tempPick.getObjectID();
        if (pickedObjectID == -1) {
          continue;
        }
        PickingMode ePickingMode=tempPick.getPickingMode();
        handlePicking(pickingType,ePickingMode,pickedObjectID,tempPick);
        try {
          PickingType type=PickingType.valueOf(pickingType);
          try {
            handlePickingEvents(type,ePickingMode,pickedObjectID,tempPick);
          }
 catch (          Exception e) {
            Logger.log(new Status(Status.ERROR,this.toString(),"String_Node_Str",e));
          }
        }
 catch (        IllegalArgumentException e) {
        }
      }
      pickingManager.flushHits(uniqueID,pickingType);
    }
  }
  if (contextMenuCreator.hasMenuItems())   contextMenuCreator.open(this);
}
Program: 57653
Project: 57653
Buggy source:
/** 
 * Sets the   {@link ABrickLayoutConfiguration} for this brick, specifying itsappearance. If the specified view type is valid, it will be set, otherwise the default view type will be set.
 * @param newBrickLayout
 * @param viewType
 */
public void setBrickLayoutTemplate(ABrickLayoutConfiguration newBrickLayout,EContainedViewType viewType){
  if (brickLayoutConfiguration != null && brickLayoutConfiguration != newBrickLayout)   brickLayoutConfiguration.destroy();
  brickLayoutConfiguration=newBrickLayout;
  if ((brickLayoutConfiguration instanceof CollapsedBrickLayoutTemplate) || (brickLayoutConfiguration instanceof CompactHeaderBrickLayoutTemplate))   isInOverviewMode=true;
 else   isInOverviewMode=false;
  if (layoutManager != null) {
    if (brickLayoutConfiguration.isViewTypeValid(viewType)) {
      setBrickViewTypeAndConfigureSize(viewType);
    }
 else {
      setBrickViewTypeAndConfigureSize(brickLayoutConfiguration.getDefaultViewType());
    }
  }
}

Fixed version (ground truth):
/** 
 * Sets the   {@link ABrickLayoutConfiguration} for this brick, specifying itsappearance. If the specified view type is valid, it will be set, otherwise the default view type will be set.
 * @param newBrickLayout
 * @param viewType
 */
public void setBrickLayoutTemplate(ABrickLayoutConfiguration newBrickLayout,EContainedViewType viewType){
  if (brickLayoutConfiguration != null && brickLayoutConfiguration != newBrickLayout)   brickLayoutConfiguration.destroy();
  brickLayoutConfiguration=newBrickLayout;
  if ((brickLayoutConfiguration instanceof CollapsedBrickLayoutTemplate) || (brickLayoutConfiguration instanceof CompactHeaderBrickLayoutTemplate))   isInOverviewMode=true;
 else   isInOverviewMode=false;
  if (layoutManager != null) {
    layoutManager.setStaticLayoutConfiguration(brickLayoutConfiguration);
    if (brickLayoutConfiguration.isViewTypeValid(viewType)) {
      setBrickViewTypeAndConfigureSize(viewType);
    }
 else {
      setBrickViewTypeAndConfigureSize(brickLayoutConfiguration.getDefaultViewType());
    }
  }
}
Program: 57658
Project: 57658
Buggy source:
@Override public void dragged(Pick pick){
  if (dragAndDropController.isDragging() && dragAndDropController.getDraggingMode() != null && dragAndDropController.getDraggingMode().equals("String_Node_Str")) {
    dragAndDropController.setDropArea(dimensionGroupManager.getDimensionGroupSpacers().get(pick.getObjectID()));
  }
 else {
    if (dragAndDropController.isDragging()) {
      int i=0;
    }
  }
}

Fixed version (ground truth):
@Override public void dragged(Pick pick){
  if (dragAndDropController.isDragging() && dragAndDropController.getDraggingMode() != null && dragAndDropController.getDraggingMode().equals("String_Node_Str")) {
    dragAndDropController.setDropArea(dimensionGroupManager.getDimensionGroupSpacers().get(pick.getObjectID()));
  }
 else {
    if (dragAndDropController.isDragging()) {
    }
  }
}
Program: 57660
Project: 57660
Buggy source:
@Override public void reshape(GLAutoDrawable drawable,int x,int y,int width,int height){
  super.reshape(drawable,x,y,width,height);
  if (!waitForMinSizeApplication && isRendered) {
    int drawingAreaWidth=pixelGLConverter.getPixelWidthForGLWidth(viewFrustum.getWidth()) - 2 * BOUNDS_SPACING_PIXELS;
    int drawingAreaHeight=pixelGLConverter.getPixelHeightForGLHeight(viewFrustum.getHeight()) - 2 * BOUNDS_SPACING_PIXELS;
    for (    IDVINode node : dataGraph.getNodes()) {
      Pair<Float,Float> relativePosition=relativeNodePositions.get(node);
      graphLayout.setNodePosition(node,new Point2D.Double(relativePosition.getFirst() * drawingAreaWidth,relativePosition.getSecond() * drawingAreaHeight));
    }
  }
}

Fixed version (ground truth):
@Override public void reshape(GLAutoDrawable drawable,int x,int y,int width,int height){
  super.reshape(drawable,x,y,width,height);
  if (!waitForMinSizeApplication && isRendered) {
    Rectangle2D drawingArea=calculateGraphDrawingArea();
    graphLayout.applyIncrementalLayout(drawingArea);
  }
}