nus-yam/ex-repair huggingface dataset:
Program: 57442
Project: 57442
Buggy source:
@Override protected void renderContent(GL2 gl){
  pushNames(gl);
  gl.glBegin(GL2.GL_QUADS);
  gl.glColor4f(1,1,1,0);
  gl.glVertex3f(0,0,0);
  gl.glVertex3f(x,0,0);
  gl.glVertex3f(x,y,0);
  gl.glVertex3f(0,y,0);
  gl.glEnd();
  popNames(gl);
}

Fixed version (ground truth):
@Override protected void renderContent(GL2 gl){
  pushNames(gl);
  gl.glBegin(GL2.GL_QUADS);
  gl.glColor4f(1,1,1,0);
  gl.glVertex3f(0,0,-0.01f);
  gl.glVertex3f(x,0,-0.01f);
  gl.glVertex3f(x,y,-0.01f);
  gl.glVertex3f(0,y,-0.01f);
  gl.glEnd();
  popNames(gl);
}
Program: 57443
Project: 57443
Buggy source:
protected static String clean(String id){
  return id.replace("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
protected static String clean(String id){
  return id == null ? null : id.replace("String_Node_Str","String_Node_Str");
}
Program: 57444
Project: 57444
Buggy source:
@Override protected void extractArguments(JSAPResult config,TCGAQCSettings settings,JSAP jsap){
  super.extractArguments(config,settings,jsap);
  analysisRuns=config.getStringArray("String_Node_Str");
  tcgaServerURL=config.getString("String_Node_Str");
}

Fixed version (ground truth):
@Override protected void extractArguments(JSAPResult config,TCGAQCSettings settings,JSAP jsap){
  super.extractArguments(config,settings,jsap);
  settings.setRuns(config.getStringArray("String_Node_Str"));
  settings.setTcgaServerURL(config.getString("String_Node_Str"));
}
Program: 57445
Project: 57445
Buggy source:
public void setRuns(String[] analysisRuns,String[] dataRuns){
  this.analysisRuns=analysisRuns;
  this.dataRuns=dataRuns;
}

Fixed version (ground truth):
public void setRuns(String[] analysisRuns){
  this.analysisRuns=analysisRuns;
}
Program: 57446
Project: 57446
Buggy source:
@Override public void display(GL2 gl){
  if (!isRendered) {
    maxNodeWidthPixels=Integer.MIN_VALUE;
    maxNodeHeightPixels=Integer.MIN_VALUE;
    for (    IDVINode node : dataGraph.getNodes()) {
      node.recalculateNodeSize();
      if (node.getHeightPixels() > maxNodeHeightPixels)       maxNodeHeightPixels=node.getHeightPixels();
      if (node.getWidthPixels() > maxNodeWidthPixels)       maxNodeWidthPixels=node.getWidthPixels();
    }
  }
  if (isDisplayListDirty && !(!isMinSizeApplied && waitForMinSizeApplication)) {
    buildDisplayList(gl,displayListIndex);
    isDisplayListDirty=false;
    waitForMinSizeApplication=false;
  }
  gl.glCallList(displayListIndex);
  if (!lazyMode)   checkForHits(gl);
  dragAndDropController.handleDragging(gl,glMouseListener);
  isRendered=true;
}

Fixed version (ground truth):
@Override public void display(GL2 gl){
  if (!isRendered) {
    maxNodeWidthPixels=Integer.MIN_VALUE;
    maxNodeHeightPixels=Integer.MIN_VALUE;
    for (    IDVINode node : dataGraph.getNodes()) {
      node.recalculateNodeSize();
      if (node.getHeightPixels() > maxNodeHeightPixels)       maxNodeHeightPixels=node.getHeightPixels();
      if (node.getWidthPixels() > maxNodeWidthPixels)       maxNodeWidthPixels=node.getWidthPixels();
    }
  }
  if (isDisplayListDirty && !(!isMinSizeApplied && waitForMinSizeApplication)) {
    buildDisplayList(gl,displayListIndex);
    isDisplayListDirty=false;
    waitForMinSizeApplication=false;
    if (!isRendered) {
      for (      ViewNode viewNode : viewNodes) {
        if (viewNode instanceof MultiTablePerspectiveViewNode) {
          viewNode.update();
        }
      }
    }
  }
  gl.glCallList(displayListIndex);
  if (!lazyMode)   checkForHits(gl);
  dragAndDropController.handleDragging(gl,glMouseListener);
  isRendered=true;
}
Program: 57448
Project: 57448
Buggy source:
@Override public void configure(DetailBrickLayoutTemplate layoutTemplate){
  HashSet<EContainedViewType> validViewTypes=new HashSet<EContainedViewType>();
  validViewTypes.add(EContainedViewType.KAPLAN_MEIER_VIEW);
  layoutTemplate.setValidViewTypes(validViewTypes);
  layoutTemplate.setDefaultViewType(EContainedViewType.KAPLAN_MEIER_VIEW);
  ArrayList<ElementLayout> toolBarElements=new ArrayList<ElementLayout>();
  toolBarElements.add(createCaptionLayout(layoutTemplate,layoutTemplate.getBrick(),EPickingType.BRICK,layoutTemplate.getBrick().getID(),layoutTemplate.getBrick()));
  toolBarElements.add(createSpacingLayout(layoutTemplate,true));
  layoutTemplate.setToolBarElements(toolBarElements);
  layoutTemplate.showFooterBar(false);
}

Fixed version (ground truth):
@Override public void configure(DetailBrickLayoutTemplate layoutTemplate){
  HashSet<EContainedViewType> validViewTypes=new HashSet<EContainedViewType>();
  validViewTypes.add(EContainedViewType.KAPLAN_MEIER_VIEW);
  layoutTemplate.setValidViewTypes(validViewTypes);
  layoutTemplate.setDefaultViewType(EContainedViewType.KAPLAN_MEIER_VIEW);
  ArrayList<ElementLayout> toolBarElements=new ArrayList<ElementLayout>();
  ElementLayout leftPaddingLayout=new ElementLayout("String_Node_Str");
  leftPaddingLayout.setPixelSizeY(CAPTION_HEIGHT_PIXELS);
  toolBarElements.add(leftPaddingLayout);
  toolBarElements.add(createSpacingLayout(layoutTemplate,true));
  layoutTemplate.setToolBarElements(toolBarElements);
  layoutTemplate.showFooterBar(false);
}
Program: 57449
Project: 57449
Buggy source:
/** 
 * Constructor.
 * @param glCanvas
 * @param viewLabel
 * @param viewFrustum
 */
public VendingMachine(GLCanvas glCanvas,Composite parentComposite,ViewFrustum viewFrustum){
  super(glCanvas,parentComposite,viewFrustum,VIEW_TYPE,VIEW_NAME);
  glKeyListener=new VendingMachineKeyListener(this);
  parentComposite.getDisplay().syncExec(new Runnable(){
    @Override public void run(){
      parentGLCanvas.removeMouseWheelListener(glMouseListener);
      parentGLCanvas.addMouseWheelListener(glMouseWheelListener);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param glCanvas
 * @param viewLabel
 * @param viewFrustum
 */
public VendingMachine(GLCanvas glCanvas,Composite parentComposite,ViewFrustum viewFrustum){
  super(glCanvas,parentComposite,viewFrustum,VIEW_TYPE,VIEW_NAME);
  glKeyListener=new VendingMachineKeyListener(this);
  parentGLCanvas.removeMouseWheelListener(glMouseListener);
  parentGLCanvas.addMouseWheelListener(glMouseWheelListener);
}
Program: 57450
Project: 57450
Buggy source:
private void createJaccardRankedElement(Collection<TablePerspective> a,Collection<TablePerspective> b){
  for (  Triple<TablePerspective,TablePerspective,JaccardIndexScores> scores : JaccardIndex.createScores(a,b)) {
    TablePerspective referenceTablePerspective=scores.getFirst();
    TablePerspective against=scores.getFirst();
    for (    JaccardIndexScorePair entry : scores.getThird()) {
      RankedElement tmpRankedElement=new RankedElement(entry.getSecond(),against,entry.getFirst(),referenceTablePerspective);
      rankedElements.add(tmpRankedElement);
    }
  }
}

Fixed version (ground truth):
private void createJaccardRankedElement(Collection<TablePerspective> a,Collection<TablePerspective> b){
  for (  Triple<TablePerspective,TablePerspective,JaccardIndexScores> scores : JaccardIndex.createScores(a,b)) {
    TablePerspective referenceTablePerspective=scores.getFirst();
    TablePerspective against=scores.getSecond();
    for (    JaccardIndexScorePair entry : scores.getThird()) {
      RankedElement tmpRankedElement=new RankedElement(entry.getSecond(),against,entry.getFirst(),referenceTablePerspective);
      rankedElements.add(tmpRankedElement);
    }
  }
}
Program: 57451
Project: 57451
Buggy source:
/** 
 * Constructor.
 * @param glCanvas
 * @param viewLabel
 * @param viewFrustum
 */
public VendingMachine(GLCanvas glCanvas,Composite parentComposite,ViewFrustum viewFrustum){
  super(glCanvas,parentComposite,viewFrustum,VIEW_TYPE,VIEW_NAME);
  glKeyListener=new VendingMachineKeyListener(this);
  parentGLCanvas.removeMouseWheelListener(glMouseListener);
  parentGLCanvas.addMouseWheelListener(glMouseWheelListener);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param glCanvas
 * @param viewLabel
 * @param viewFrustum
 */
public VendingMachine(GLCanvas glCanvas,Composite parentComposite,ViewFrustum viewFrustum){
  super(glCanvas,parentComposite,viewFrustum,VIEW_TYPE,VIEW_NAME);
  glKeyListener=new VendingMachineKeyListener(this);
  parentComposite.getDisplay().syncExec(new Runnable(){
    @Override public void run(){
      parentGLCanvas.removeMouseWheelListener(glMouseListener);
      parentGLCanvas.addMouseWheelListener(glMouseWheelListener);
    }
  }
);
}
Program: 57454
Project: 57454
Buggy source:
@Override public Object execute(ExecutionEvent event) throws ExecutionException {
  try {
    HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().showView(GLPathway.VIEW_TYPE);
    HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().showView(GLEnRoutePathway.VIEW_TYPE);
  }
 catch (  PartInitException e) {
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
@Override public Object execute(ExecutionEvent event) throws ExecutionException {
  try {
    IWorkbenchWindow activeWindows=HandlerUtil.getActiveWorkbenchWindow(event);
    activeWindows.getActivePage().showView(GLPathway.VIEW_TYPE);
    activeWindows.getActivePage().showView(GLEnRoutePathway.VIEW_TYPE);
  }
 catch (  PartInitException e) {
    e.printStackTrace();
  }
  return null;
}
Program: 57455
Project: 57455
Buggy source:
@Override public IDataSupportDefinition getDataSupportDefinition(){
  return new EnRouteDataSupportDefinition();
}

Fixed version (ground truth):
@Override public IDataSupportDefinition getDataSupportDefinition(){
  return new GeneticDataSupportDefinition();
}
Program: 57456
Project: 57456
Buggy source:
/** 
 * @param view
 */
public ACompoundNodeMode(GLEnRoutePathway view){
  super(view);
  this.pixelGLConverter=view.getPixelGLConverter();
}

Fixed version (ground truth):
/** 
 * @param view
 */
public ACompoundNodeMode(GLEnRoutePathway view){
  super(view);
  this.pixelGLConverter=view.getPixelGLConverter();
  colorCalculator=new SelectionColorCalculator(new Color(DEFAULT_BACKGROUND_COLOR));
}
Program: 57457
Project: 57457
Buggy source:
@Override protected void determineBackgroundColor(EventBasedSelectionManager selectionManager){
  ArrayList<SelectionType> selectionTypes=selectionManager.getSelectionTypes(node.getPathwayVertexRep().getName().hashCode());
  backgroundColor=DEFAULT_BACKGROUND_COLOR;
  Collections.sort(selectionTypes);
  Collections.reverse(selectionTypes);
  for (  SelectionType selectionType : selectionTypes) {
    if (!selectionType.equals(SelectionType.NORMAL))     backgroundColor=selectionType.getColor();
    break;
  }
}

Fixed version (ground truth):
@Override protected void determineBackgroundColor(EventBasedSelectionManager selectionManager){
  ArrayList<SelectionType> selectionTypes=selectionManager.getSelectionTypes(node.getPathwayVertexRep().getName().hashCode());
  Collections.sort(selectionTypes);
  Collections.reverse(selectionTypes);
  colorCalculator.calculateColors(selectionTypes);
  backgroundColor=colorCalculator.getPrimaryColor().getRGBA();
}
Program: 57458
Project: 57458
Buggy source:
/** 
 * @param view
 */
public AGeneNodeMode(GLEnRoutePathway view){
  super(view);
}

Fixed version (ground truth):
/** 
 * @param view
 */
public AGeneNodeMode(GLEnRoutePathway view){
  super(view);
  backgroundColor=DEFAULT_BACKGROUND_COLOR;
  colorCalculator=new SelectionColorCalculator(new Color(DEFAULT_BACKGROUND_COLOR));
}
Program: 57459
Project: 57459
Buggy source:
@Override protected void determineBackgroundColor(EventBasedSelectionManager selectionManager){
  List<SelectionType> allSelectionTypes=new ArrayList<SelectionType>();
  for (  Integer davidId : node.getPathwayVertexRep().getDavidIDs()) {
    ArrayList<SelectionType> selectionTypes=selectionManager.getSelectionTypes(davidId);
    for (    SelectionType selectionType : selectionTypes) {
      if (!allSelectionTypes.contains(selectionType)) {
        allSelectionTypes.add(selectionType);
      }
    }
  }
  Collections.sort(allSelectionTypes);
  Collections.reverse(allSelectionTypes);
  backgroundColor=DEFAULT_BACKGROUND_COLOR;
  if (allSelectionTypes.size() > 0) {
    SelectionType selectionType=allSelectionTypes.get(0);
    if (!selectionType.equals(SelectionType.NORMAL))     backgroundColor=selectionType.getColor();
    gradientColor=null;
    if (allSelectionTypes.size() > 1) {
      selectionType=allSelectionTypes.get(1);
      if (!selectionType.equals(SelectionType.NORMAL))       gradientColor=selectionType.getColor();
    }
  }
}

Fixed version (ground truth):
@Override protected void determineBackgroundColor(EventBasedSelectionManager selectionManager){
  List<SelectionType> allSelectionTypes=new ArrayList<SelectionType>();
  for (  Integer davidId : node.getPathwayVertexRep().getDavidIDs()) {
    ArrayList<SelectionType> selectionTypes=selectionManager.getSelectionTypes(davidId);
    for (    SelectionType selectionType : selectionTypes) {
      if (!allSelectionTypes.contains(selectionType)) {
        allSelectionTypes.add(selectionType);
      }
    }
  }
  Collections.sort(allSelectionTypes);
  Collections.reverse(allSelectionTypes);
  colorCalculator.calculateColors(allSelectionTypes);
  backgroundColor=colorCalculator.getPrimaryColor().getRGBA();
  gradientColor=colorCalculator.getSecondaryColor().getRGBA();
}
Program: 57460
Project: 57460
Buggy source:
public void selectElementsByConnectionBandID(int connectionBandID){
  recordSelectionManager.clearSelections();
  ClearSelectionsEvent cse=new ClearSelectionsEvent();
  cse.setSender(this);
  eventPublisher.triggerEvent(cse);
  recordSelectionManager.clearSelection(recordSelectionManager.getSelectionType());
  volatileBandSelectionType=new SelectionType("String_Node_Str",recordSelectionManager.getSelectionType().getColor(),1,true,true,1);
  volatileBandSelectionType.setManaged(false);
  SelectionTypeEvent selectionTypeEvent=new SelectionTypeEvent(volatileBandSelectionType);
  GeneralManager.get().getEventPublisher().triggerEvent(selectionTypeEvent);
  BrickConnection connectionBand=hashConnectionBandIDToRecordVA.get(connectionBandID);
  RecordVirtualArray recordVA=connectionBand.getSharedRecordVirtualArray();
  for (  Integer recordID : recordVA) {
    recordSelectionManager.addToType(recordSelectionManager.getSelectionType(),recordVA.getIdType(),recordID);
  }
  SelectionUpdateEvent event=new SelectionUpdateEvent();
  event.setSender(this);
  SelectionDelta delta=recordSelectionManager.getDelta();
  event.setSelectionDelta(delta);
  event.setDataDomainID(connectionBand.getLeftBrick().getDataDomain().getDataDomainID());
  eventPublisher.triggerEvent(event);
  updateConnectionLinesBetweenDimensionGroups();
}

Fixed version (ground truth):
public void selectElementsByConnectionBandID(int connectionBandID){
  recordSelectionManager.clearSelection(recordSelectionManager.getSelectionType());
  volatileBandSelectionType=new SelectionType("String_Node_Str",recordSelectionManager.getSelectionType().getColor(),1,true,true,1);
  volatileBandSelectionType.setManaged(false);
  SelectionTypeEvent selectionTypeEvent=new SelectionTypeEvent(volatileBandSelectionType);
  GeneralManager.get().getEventPublisher().triggerEvent(selectionTypeEvent);
  BrickConnection connectionBand=hashConnectionBandIDToRecordVA.get(connectionBandID);
  RecordVirtualArray recordVA=connectionBand.getSharedRecordVirtualArray();
  for (  Integer recordID : recordVA) {
    recordSelectionManager.addToType(recordSelectionManager.getSelectionType(),recordVA.getIdType(),recordID);
  }
  SelectionUpdateEvent event=new SelectionUpdateEvent();
  event.setSender(this);
  SelectionDelta delta=recordSelectionManager.getDelta();
  event.setSelectionDelta(delta);
  event.setDataDomainID(connectionBand.getLeftBrick().getDataDomain().getDataDomainID());
  eventPublisher.triggerEvent(event);
  updateConnectionLinesBetweenDimensionGroups();
}
Program: 57461
Project: 57461
Buggy source:
/** 
 * Reinitializes all widgets according to the   {@link #dataSetDescription}.
 */
public void pageActivated(){
  if (!dataSourcePath.equals(dataSetDescription.getDataSourcePath())) {
    guiCreated();
    DataImportWizard wizard=(DataImportWizard)page.getWizard();
    int totalNumberOfColumns=wizard.getTotalNumberOfColumns();
    int totalNumberOfRows=wizard.getTotalNumberOfRows();
    IDCategory tcgaSampleCategory=IDCategory.getIDCategory("String_Node_Str");
    if (totalNumberOfColumns > 100 && totalNumberOfColumns > totalNumberOfRows || (dataSetDescription.getColumnIDSpecification().getIdCategory().equals(tcgaSampleCategory.getCategoryName()))) {
      page.swapRowsWithColumnsButton.setSelection(true);
    }
 else {
      page.swapRowsWithColumnsButton.setSelection(false);
    }
    updateColumnCountWarning();
  }
  dataSourcePath=dataSetDescription.getDataSourcePath();
}

Fixed version (ground truth):
/** 
 * Reinitializes all widgets according to the   {@link #dataSetDescription}.
 */
public void pageActivated(){
  if (!dataSourcePath.equals(dataSetDescription.getDataSourcePath())) {
    guiCreated();
    DataImportWizard wizard=(DataImportWizard)page.getWizard();
    int totalNumberOfColumns=wizard.getTotalNumberOfColumns();
    int totalNumberOfRows=wizard.getTotalNumberOfRows();
    IDCategory tcgaSampleCategory=IDCategory.getIDCategory("String_Node_Str");
    if (totalNumberOfColumns > 100 && totalNumberOfColumns > totalNumberOfRows || (tcgaSampleCategory != null && (dataSetDescription.getColumnIDSpecification().getIdCategory().equals(tcgaSampleCategory.getCategoryName())))) {
      page.swapRowsWithColumnsButton.setSelection(true);
    }
 else {
      page.swapRowsWithColumnsButton.setSelection(false);
    }
    updateColumnCountWarning();
  }
  dataSourcePath=dataSetDescription.getDataSourcePath();
}
Program: 57462
Project: 57462
Buggy source:
/** 
 * Adapts the view height to the maximum of the specified minimum view heights, if necessary.
 * @param minViewWidth Minimum width required.
 * @param minViewHeightRequiredByPath View height in pixels required by the linearized path and its rows.
 * @param minViewHeightRequiredByBranchNodes View height in pixels required by branch nodes.
 */
private void adaptViewSize(int minViewWidth,int minViewHeightRequiredByPath,int minViewHeightRequiredByBranchNodes){
  int minViewHeightPixels=0;
  boolean isViewHeightCurrentlyDeterminedByPath;
  if (minViewHeightRequiredByBranchNodes > minViewHeightRequiredByPath) {
    minViewHeightPixels=minViewHeightRequiredByBranchNodes;
    isViewHeightCurrentlyDeterminedByPath=false;
  }
 else {
    minViewHeightPixels=minViewHeightRequiredByPath;
    isViewHeightCurrentlyDeterminedByPath=true;
  }
  boolean updateWidth=minViewWidth > parentGLCanvas.getWidth();
  boolean updateHeight=false;
  if (isNewPath || (isViewHeightCurrentlyDeterminedByPath != isViewHeightDeterminedByPath) || parentGLCanvas.getHeight() < minViewHeightPixels) {
    isNewPath=false;
    updateHeight=true;
  }
  isViewHeightDeterminedByPath=isViewHeightCurrentlyDeterminedByPath;
  if (updateWidth || updateHeight) {
    setMinViewSize(updateWidth ? minViewWidth + 3 : BRANCH_COLUMN_WIDTH_PIXELS + PATHWAY_COLUMN_WIDTH_PIXELS + DATA_COLUMN_WIDTH_PIXELS,minViewHeightPixels + 3);
  }
}

Fixed version (ground truth):
/** 
 * Adapts the view height to the maximum of the specified minimum view heights, if necessary.
 * @param minViewWidth Minimum width required.
 * @param minViewHeightRequiredByPath View height in pixels required by the linearized path and its rows.
 * @param minViewHeightRequiredByBranchNodes View height in pixels required by branch nodes.
 */
private void adaptViewSize(int minViewWidth,int minViewHeightRequiredByPath,int minViewHeightRequiredByBranchNodes){
  int minViewHeightPixels=0;
  boolean isViewHeightCurrentlyDeterminedByPath;
  if (minViewHeightRequiredByBranchNodes > minViewHeightRequiredByPath) {
    minViewHeightPixels=minViewHeightRequiredByBranchNodes;
    isViewHeightCurrentlyDeterminedByPath=false;
  }
 else {
    minViewHeightPixels=minViewHeightRequiredByPath;
    isViewHeightCurrentlyDeterminedByPath=true;
  }
  boolean updateWidth=minViewWidth > parentGLCanvas.getWidth() || (minViewWidth < parentGLCanvas.getWidth() && (minViewWidth > currentMinWidth || minViewWidth + 3 < currentMinWidth));
  boolean updateHeight=false;
  if (isNewPath || (isViewHeightCurrentlyDeterminedByPath != isViewHeightDeterminedByPath) || parentGLCanvas.getHeight() < minViewHeightPixels) {
    isNewPath=false;
    updateHeight=true;
  }
  isViewHeightDeterminedByPath=isViewHeightCurrentlyDeterminedByPath;
  if (updateWidth || updateHeight) {
    currentMinWidth=updateWidth ? minViewWidth + 3 : BRANCH_COLUMN_WIDTH_PIXELS + PATHWAY_COLUMN_WIDTH_PIXELS + DATA_COLUMN_WIDTH_PIXELS;
    setMinViewSize(currentMinWidth,minViewHeightPixels + 3);
  }
}
Program: 57463
Project: 57463
Buggy source:
public void clearAllSelections(){
  recordSelectionManager.clearSelections();
  updateConnectionLinesBetweenDimensionGroups();
}

Fixed version (ground truth):
public void clearAllSelections(){
  if (recordSelectionManager != null)   recordSelectionManager.clearSelections();
  updateConnectionLinesBetweenDimensionGroups();
}
Program: 57465
Project: 57465
Buggy source:
@Override public void display(GL2 gl){
  if (bUpdateColorPointPosition || bUpdateLeftSpread || bUpdateRightSpread)   updateColorPointPosition(gl);
  if (isDisplayListDirty) {
    buildDisplayList(gl,displayListIndex);
    isDisplayListDirty=false;
  }
  gl.glCallList(displayListIndex);
  if (!lazyMode)   checkForHits(gl);
}

Fixed version (ground truth):
@Override public void display(GL2 gl){
  if (bUpdateColorPointPosition || bUpdateLeftSpread || bUpdateRightSpread)   updateColorPointPosition(gl);
  if (true) {
    buildDisplayList(gl,displayListIndex);
    isDisplayListDirty=false;
  }
  gl.glCallList(displayListIndex);
  if (!lazyMode)   checkForHits(gl);
}
Program: 57468
Project: 57468
Buggy source:
@Override public void createPartControl(Composite parent){
  parentComposite=new Composite(parent,SWT.NULL);
  parentComposite.setLayout(new GridLayout(1,false));
  GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
  infoComposite=new Composite(parentComposite,SWT.NULL);
  infoComposite.setLayout(new GridLayout(1,false));
  infoComposite.setLayoutData(gridData);
  nameLabel=new Label(infoComposite,SWT.NONE);
  nameLabel.setText("String_Node_Str");
  if (dataDomain == null) {
    setDataDomain((ATableBasedDataDomain)DataDomainManager.get().getDataDomainByID(((ASerializedSingleTablePerspectiveBasedView)serializedView).getDataDomainID()));
  }
  parent.layout();
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  parentComposite=new Composite(parent,SWT.NULL);
  parentComposite.setLayout(new GridLayout(1,false));
  GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
  infoComposite=new Composite(parentComposite,SWT.NULL);
  infoComposite.setLayout(new GridLayout(1,false));
  infoComposite.setLayoutData(gridData);
  nameLabel=new Label(infoComposite,SWT.NONE);
  nameLabel.setText("String_Node_Str");
  nameLabel.setLayoutData(gridData);
  if (dataDomain == null) {
    setDataDomain((ATableBasedDataDomain)DataDomainManager.get().getDataDomainByID(((ASerializedSingleTablePerspectiveBasedView)serializedView).getDataDomainID()));
  }
  parent.layout();
}
Program: 57470
Project: 57470
Buggy source:
/** 
 * Register a new   {@link RecordPerspective} with this DataTable
 * @param recordPerspective
 */
public void registerRecordPerspective(RecordPerspective recordPerspective){
  if (recordPerspective.getPerspectiveID() == null)   throw new IllegalStateException("String_Node_Str" + recordPerspective);
  if (!recordPerspective.getIdType().equals(dataDomain.getRecordIDType()))   throw new IllegalStateException("String_Node_Str" + recordPerspective.getIdType());
  hashRecordPerspectives.put(recordPerspective.getPerspectiveID(),recordPerspective);
  if (recordPerspective.isDefault()) {
    if (defaultRecordPerspective != null)     throw new IllegalStateException("String_Node_Str");
    defaultRecordPerspective=recordPerspective;
  }
  DataDomainUpdateEvent event=new DataDomainUpdateEvent(dataDomain);
  event.setSender(this);
  GeneralManager.get().getEventPublisher().triggerEvent(event);
}

Fixed version (ground truth):
/** 
 * Register a new   {@link RecordPerspective} with this DataTable
 * @param recordPerspective
 * @param flat determines whether a datadomain update event is triggered
 */
public void registerRecordPerspective(RecordPerspective recordPerspective,boolean triggerUpdate){
  if (recordPerspective.getPerspectiveID() == null)   throw new IllegalStateException("String_Node_Str" + recordPerspective);
  if (!recordPerspective.getIdType().equals(dataDomain.getRecordIDType()))   throw new IllegalStateException("String_Node_Str" + recordPerspective.getIdType());
  hashRecordPerspectives.put(recordPerspective.getPerspectiveID(),recordPerspective);
  if (recordPerspective.isDefault()) {
    if (defaultRecordPerspective != null)     throw new IllegalStateException("String_Node_Str");
    defaultRecordPerspective=recordPerspective;
  }
  if (triggerUpdate) {
    DataDomainUpdateEvent event=new DataDomainUpdateEvent(dataDomain);
    event.setSender(this);
    GeneralManager.get().getEventPublisher().triggerEvent(event);
  }
}
Program: 57471
Project: 57471
Buggy source:
/** 
 * Switch the representation of the data. When this is called the data in normalized is replaced with data calculated from the mode specified.
 * @param externalDataRep Determines how the data is visualized. For options see {@link EDataTransformation}
 * @param isTableHomogeneous Determines whether a set is homogeneous or not. Homogeneous means that the sat has a global maximum and minimum, meaning that all dimensions in the set contain equal data. If false, each dimension is treated separately, has it's own min and max etc. Sets that contain nominal data MUST be inhomogeneous.
 */
void setExternalDataRepresentation(EDataTransformation externalDataRep,boolean isTableHomogeneous){
  this.isTableHomogeneous=isTableHomogeneous;
  if (externalDataRep == this.externalDataTrans)   return;
  this.externalDataTrans=externalDataRep;
  for (  AColumn dimension : hashColumns.values()) {
    if (dimension instanceof NumericalColumn) {
      ((NumericalColumn)dimension).setExternalDataRepresentation(externalDataRep);
    }
  }
  if (isTableHomogeneous) {
switch (externalDataRep) {
case NONE:
      normalization.normalizeGlobally();
    break;
case LOG10:
  normalization.log10();
normalization.normalizeGlobally();
break;
case LOG2:
normalization.log2();
normalization.normalizeGlobally();
break;
}
}
 else {
switch (externalDataRep) {
case NONE:
normalization.normalizeLocally();
break;
case LOG10:
normalization.log10();
normalization.normalizeLocally();
break;
case LOG2:
normalization.log2();
normalization.normalizeLocally();
break;
}
}
}

Fixed version (ground truth):
/** 
 * Switch the representation of the data. When this is called the data in normalized is replaced with data calculated from the mode specified.
 * @param externalDataRep Determines how the data is visualized. For optionssee  {@link EDataTransformation}
 * @param isTableHomogeneous Determines whether a set is homogeneous or not.Homogeneous means that the sat has a global maximum and minimum, meaning that all dimensions in the set contain equal data. If false, each dimension is treated separately, has it's own min and max etc. Sets that contain nominal data MUST be inhomogeneous.
 */
void setExternalDataRepresentation(EDataTransformation externalDataRep,boolean isTableHomogeneous){
  this.isTableHomogeneous=isTableHomogeneous;
  if (externalDataRep == this.externalDataTrans)   return;
  this.externalDataTrans=externalDataRep;
  for (  AColumn dimension : hashColumns.values()) {
    if (dimension instanceof NumericalColumn) {
      ((NumericalColumn)dimension).setExternalDataRepresentation(externalDataRep);
    }
  }
  if (isTableHomogeneous) {
switch (externalDataRep) {
case NONE:
      normalization.normalizeGlobally();
    break;
case LOG10:
  normalization.log10();
normalization.normalizeGlobally();
break;
case LOG2:
normalization.log2();
normalization.normalizeGlobally();
break;
}
}
 else {
switch (externalDataRep) {
case NONE:
normalization.normalizeLocally();
break;
case LOG10:
normalization.log10();
normalization.normalizeLocally();
break;
case LOG2:
normalization.log2();
normalization.normalizeLocally();
break;
}
}
}
Program: 57472
Project: 57472
Buggy source:
/** 
 * Register a new   {@link DimensionPerspective} with this DataTable
 * @param dimensionPerspective
 */
public void registerDimensionPerspective(DimensionPerspective dimensionPerspective){
  if (dimensionPerspective.getPerspectiveID() == null)   throw new IllegalStateException("String_Node_Str" + dimensionPerspective);
  hashDimensionPerspectives.put(dimensionPerspective.getPerspectiveID(),dimensionPerspective);
  if (dimensionPerspective.isDefault()) {
    if (defaultDimensionPerspective != null)     throw new IllegalStateException("String_Node_Str");
    defaultDimensionPerspective=dimensionPerspective;
  }
  DataDomainUpdateEvent event=new DataDomainUpdateEvent(dataDomain);
  event.setSender(this);
  GeneralManager.get().getEventPublisher().triggerEvent(event);
}

Fixed version (ground truth):
/** 
 * Register a new   {@link DimensionPerspective} with this DataTable
 * @param dimensionPerspective
 * @param flat determines whether a datadomain update event is triggered
 */
public void registerDimensionPerspective(DimensionPerspective dimensionPerspective,boolean triggerUpdate){
  if (dimensionPerspective.getPerspectiveID() == null)   throw new IllegalStateException("String_Node_Str" + dimensionPerspective);
  hashDimensionPerspectives.put(dimensionPerspective.getPerspectiveID(),dimensionPerspective);
  if (dimensionPerspective.isDefault()) {
    if (defaultDimensionPerspective != null)     throw new IllegalStateException("String_Node_Str");
    defaultDimensionPerspective=dimensionPerspective;
  }
  if (triggerUpdate) {
    DataDomainUpdateEvent event=new DataDomainUpdateEvent(dataDomain);
    event.setSender(this);
    GeneralManager.get().getEventPublisher().triggerEvent(event);
  }
}
Program: 57474
Project: 57474
Buggy source:
/** 
 * Calculates the position for a single branch node.
 * @param summaryNode
 * @return
 */
private int calculateBranchNodePosition(BranchSummaryNode summaryNode){
  boolean isIncomingNode=linearizedNodesToIncomingBranchSummaryNodesMap.get(summaryNode.getAssociatedLinearizedNode()) == summaryNode;
  ALinearizableNode linearizedNode=summaryNode.getAssociatedLinearizedNode();
  Vec3f linearizedNodePosition=linearizedNode.getPosition();
  float sideSpacing=pixelGLConverter.getGLHeightForPixelHeight(BRANCH_AREA_SIDE_SPACING_PIXELS);
  float branchSummaryNodeToLinearizedNodeDistance=pixelGLConverter.getGLHeightForPixelHeight(BRANCH_SUMMARY_NODE_TO_LINEARIZED_NODE_VERTICAL_DISTANCE_PIXELS);
  float width=summaryNode.getWidth();
  float titleAreaHeight=pixelGLConverter.getGLHeightForPixelHeight(summaryNode.getTitleAreaHeightPixels());
  float nodePositionY=linearizedNodePosition.y() + (isIncomingNode ? branchSummaryNodeToLinearizedNodeDistance : -branchSummaryNodeToLinearizedNodeDistance) - (summaryNode.getHeight() / 2.0f) + titleAreaHeight / 2.0f;
  summaryNode.setPosition(new Vec3f(sideSpacing + width / 2.0f,nodePositionY,(summaryNode.isCollapsed() ? 0 : 0.2f)));
  float bottomPositionY=nodePositionY - (summaryNode.getHeight() / 2.0f);
  int minViewHeightPixels=0;
  if (viewFrustum.getBottom() > bottomPositionY) {
    minViewHeightPixels=pixelGLConverter.getPixelHeightForGLHeight(viewFrustum.getBottom() - bottomPositionY) + parentGLCanvas.getHeight();
    setMinSize(minViewHeightPixels + 3);
  }
  return minViewHeightPixels;
}

Fixed version (ground truth):
/** 
 * Calculates the position for a single branch node.
 * @param summaryNode
 * @return
 */
private int calculateBranchNodePosition(BranchSummaryNode summaryNode){
  boolean isIncomingNode=linearizedNodesToIncomingBranchSummaryNodesMap.get(summaryNode.getAssociatedLinearizedNode()) == summaryNode;
  ALinearizableNode linearizedNode=summaryNode.getAssociatedLinearizedNode();
  Vec3f linearizedNodePosition=linearizedNode.getPosition();
  float sideSpacing=pixelGLConverter.getGLHeightForPixelHeight(BRANCH_AREA_SIDE_SPACING_PIXELS);
  float branchSummaryNodeToLinearizedNodeDistance=pixelGLConverter.getGLHeightForPixelHeight(BRANCH_SUMMARY_NODE_TO_LINEARIZED_NODE_VERTICAL_DISTANCE_PIXELS);
  float width=summaryNode.getWidth();
  float titleAreaHeight=pixelGLConverter.getGLHeightForPixelHeight(summaryNode.getTitleAreaHeightPixels());
  float nodePositionY=linearizedNodePosition.y() + (isIncomingNode ? branchSummaryNodeToLinearizedNodeDistance : -branchSummaryNodeToLinearizedNodeDistance) - (summaryNode.getHeight() / 2.0f) + titleAreaHeight / 2.0f;
  summaryNode.setPosition(new Vec3f(sideSpacing + width / 2.0f,nodePositionY,(summaryNode.isCollapsed() ? 0 : 0.2f)));
  float bottomPositionY=nodePositionY - (summaryNode.getHeight() / 2.0f);
  int minViewHeightPixels=0;
  minViewHeightPixels=pixelGLConverter.getPixelHeightForGLHeight(viewFrustum.getBottom() - bottomPositionY) + parentGLCanvas.getHeight();
  return minViewHeightPixels;
}
Program: 57475
Project: 57475
Buggy source:
@Override public void createPartControl(Composite parent){
  if (dataDomain == null) {
    dataDomain=(ATableBasedDataDomain)DataDomainManager.get().getDataDomainByID(((ASerializedSingleTablePerspectiveBasedView)serializedView).getDataDomainID());
  }
  parentComposite=new Composite(parent,SWT.NULL);
  parentComposite.setLayout(new GridLayout(1,false));
  GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
  infoComposite=new Composite(parentComposite,SWT.NULL);
  infoComposite.setLayout(new GridLayout(1,false));
  infoComposite.setLayoutData(gridData);
  nameLabel=new Label(infoComposite,SWT.NONE);
  nameLabel.setText("String_Node_Str");
  parent.layout();
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  parentComposite=new Composite(parent,SWT.NULL);
  parentComposite.setLayout(new GridLayout(1,false));
  GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
  infoComposite=new Composite(parentComposite,SWT.NULL);
  infoComposite.setLayout(new GridLayout(1,false));
  infoComposite.setLayoutData(gridData);
  nameLabel=new Label(infoComposite,SWT.NONE);
  nameLabel.setText("String_Node_Str");
  if (dataDomain == null) {
    setDataDomain((ATableBasedDataDomain)DataDomainManager.get().getDataDomainByID(((ASerializedSingleTablePerspectiveBasedView)serializedView).getDataDomainID()));
  }
  parent.layout();
}
Program: 57476
Project: 57476
Buggy source:
@Override public void setDataDomain(ATableBasedDataDomain dataDomain){
  if (dataDomain == this.dataDomain)   return;
  this.dataDomain=dataDomain;
  ASerializedSingleTablePerspectiveBasedView dcSerializedView=(ASerializedSingleTablePerspectiveBasedView)serializedView;
  dcSerializedView.setDataDomainID(dataDomain.getDataDomainID());
  TablePerspective container=dataDomain.getDefaultTablePerspective();
  dcSerializedView.setTablePerspectiveKey(container.getTablePerspectiveKey());
  parentComposite.dispose();
  createPartControl(parent);
}

Fixed version (ground truth):
@Override public void setDataDomain(ATableBasedDataDomain dataDomain){
  if (dataDomain == this.dataDomain)   return;
  this.dataDomain=dataDomain;
  ASerializedSingleTablePerspectiveBasedView dcSerializedView=(ASerializedSingleTablePerspectiveBasedView)serializedView;
  dcSerializedView.setDataDomainID(dataDomain.getDataDomainID());
  TablePerspective container=dataDomain.getDefaultTablePerspective();
  dcSerializedView.setTablePerspectiveKey(container.getTablePerspectiveKey());
  updateDataSetInfo();
}
Program: 57478
Project: 57478
Buggy source:
private void setMinSize(int minHeightPixels){
  SetMinViewSizeEvent event=new SetMinViewSizeEvent();
  event.setMinViewSize(BRANCH_COLUMN_WIDTH_PIXELS + PATHWAY_COLUMN_WIDTH_PIXELS + DATA_COLUMN_WIDTH_PIXELS,minHeightPixels);
  event.setView(this);
  eventPublisher.triggerEvent(event);
  System.out.println("String_Node_Str" + minHeightPixels);
  setLayoutDirty();
}

Fixed version (ground truth):
private void setMinSize(int minHeightPixels){
  SetMinViewSizeEvent event=new SetMinViewSizeEvent();
  event.setMinViewSize(BRANCH_COLUMN_WIDTH_PIXELS + PATHWAY_COLUMN_WIDTH_PIXELS + DATA_COLUMN_WIDTH_PIXELS,minHeightPixels);
  event.setView(this);
  eventPublisher.triggerEvent(event);
  setLayoutDirty();
}
Program: 57479
Project: 57479
Buggy source:
@Override public void init(GL2 gl){
  displayListIndex=gl.glGenLists(1);
  textRenderer=new CaleydoTextRenderer(24);
  super.renderStyle=renderStyle;
  detailLevel=EDetailLevel.HIGH;
  path=new ArrayList<PathwayVertexRep>();
  for (  PathwayGraph graph : PathwayManager.get().getAllItems()) {
    if (graph.getType() == EPathwayDatabaseType.KEGG && graph.getTitle().startsWith("String_Node_Str")) {
      pathway=graph;
      break;
    }
  }
  PathwayVertexRep currentVertex=null;
  for (  PathwayVertexRep vertex : pathway.vertexSet()) {
    currentVertex=vertex;
    break;
  }
  for (int i=0; i < 6; i++) {
    path.add(currentVertex);
    for (    DefaultEdge edge : pathway.edgesOf(currentVertex)) {
      PathwayVertexRep v2=pathway.getEdgeTarget(edge);
      currentVertex=v2;
    }
  }
  setPath(pathway,path);
  setMappedDataRendererGeometry();
}

Fixed version (ground truth):
@Override public void init(GL2 gl){
  displayListIndex=gl.glGenLists(1);
  textRenderer=new CaleydoTextRenderer(24);
  super.renderStyle=renderStyle;
  detailLevel=EDetailLevel.HIGH;
  path=new ArrayList<PathwayVertexRep>();
  for (  PathwayGraph graph : PathwayManager.get().getAllItems()) {
    if (graph.getType() == EPathwayDatabaseType.KEGG && graph.getTitle().startsWith("String_Node_Str")) {
      pathway=graph;
      break;
    }
  }
  PathwayVertexRep currentVertex=null;
  for (  PathwayVertexRep vertex : pathway.vertexSet()) {
    currentVertex=vertex;
    break;
  }
  for (int i=0; i < 6; i++) {
    path.add(currentVertex);
    for (    DefaultEdge edge : pathway.edgesOf(currentVertex)) {
      PathwayVertexRep v2=pathway.getEdgeTarget(edge);
      currentVertex=v2;
    }
  }
  setPath(pathway,path);
}
Program: 57480
Project: 57480
Buggy source:
@Override public void addTablePerspectives(List<TablePerspective> newTablePerspectives){
  mappedDataRenderer.addTablePerspectives(newTablePerspectives);
  for (  ALinearizableNode node : linearizedNodes) {
    setMappedDavidIds(node);
  }
  for (  ANode node : branchNodes) {
    if (node instanceof ALinearizableNode) {
      setMappedDavidIds((ALinearizableNode)node);
      ((ALinearizableNode)node).update();
    }
  }
  for (  TablePerspective tablePerspective : newTablePerspectives) {
    dataDomains.add(tablePerspective.getDataDomain());
  }
  setMappedDataRendererGeometry();
  TablePerspectivesChangedEvent event=new TablePerspectivesChangedEvent(this);
  event.setSender(this);
  GeneralManager.get().getEventPublisher().triggerEvent(event);
  setLayoutDirty();
}

Fixed version (ground truth):
@Override public void addTablePerspectives(List<TablePerspective> newTablePerspectives){
  mappedDataRenderer.addTablePerspectives(newTablePerspectives);
  for (  ALinearizableNode node : linearizedNodes) {
    setMappedDavidIds(node);
  }
  for (  ANode node : branchNodes) {
    if (node instanceof ALinearizableNode) {
      setMappedDavidIds((ALinearizableNode)node);
      ((ALinearizableNode)node).update();
    }
  }
  for (  TablePerspective tablePerspective : newTablePerspectives) {
    dataDomains.add(tablePerspective.getDataDomain());
  }
  TablePerspectivesChangedEvent event=new TablePerspectivesChangedEvent(this);
  event.setSender(this);
  GeneralManager.get().getEventPublisher().triggerEvent(event);
  setLayoutDirty();
}
Program: 57481
Project: 57481
Buggy source:
@Override public void reshape(GLAutoDrawable drawable,int x,int y,int width,int height){
  super.reshape(drawable,x,y,width,height);
  setLayoutDirty();
  System.out.println("String_Node_Str" + x + "String_Node_Str"+ y+ "String_Node_Str"+ width+ "String_Node_Str"+ height);
  setMappedDataRendererGeometry();
}

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);
  setLayoutDirty();
}
Program: 57482
Project: 57482
Buggy source:
@Override public void addTablePerspective(TablePerspective newTablePerspective){
  mappedDataRenderer.addTablePerspective(newTablePerspective);
  for (  ALinearizableNode node : linearizedNodes) {
    setMappedDavidIds(node);
  }
  for (  ANode node : branchNodes) {
    if (node instanceof ALinearizableNode) {
      setMappedDavidIds((ALinearizableNode)node);
      ((ALinearizableNode)node).update();
    }
  }
  dataDomains.add(newTablePerspective.getDataDomain());
  setMappedDataRendererGeometry();
  setLayoutDirty();
}

Fixed version (ground truth):
@Override public void addTablePerspective(TablePerspective newTablePerspective){
  mappedDataRenderer.addTablePerspective(newTablePerspective);
  for (  ALinearizableNode node : linearizedNodes) {
    setMappedDavidIds(node);
  }
  for (  ANode node : branchNodes) {
    if (node instanceof ALinearizableNode) {
      setMappedDavidIds((ALinearizableNode)node);
      ((ALinearizableNode)node).update();
    }
  }
  dataDomains.add(newTablePerspective.getDataDomain());
  setLayoutDirty();
}
Program: 57484
Project: 57484
Buggy source:
/** 
 * Same as   {@link #addTablePerspective(TablePerspective)} but for multiple datacontainers
 */
public void addTablePerspectives(List<TablePerspective> newTablePerspectives){
  tablePerspectives.addAll(newTablePerspectives);
  resolveSubTablePerspectives(newTablePerspectives);
}

Fixed version (ground truth):
/** 
 * Same as   {@link #addTablePerspective(TablePerspective)} but for multipledata containers
 */
public void addTablePerspectives(List<TablePerspective> newTablePerspectives){
  tablePerspectives.addAll(newTablePerspectives);
  resolveSubTablePerspectives(newTablePerspectives);
}
Program: 57485
Project: 57485
Buggy source:
/** 
 * @return the resolvedTablePerspectives, see {@link #resolvedTablePerspectives}
 */
public ArrayList<TablePerspective> getResolvedTablePerspectives(){
  return resolvedTablePerspectives;
}

Fixed version (ground truth):
/** 
 * @return the resolvedTablePerspectives, see{@link #resolvedTablePerspectives}
 */
public ArrayList<TablePerspective> getResolvedTablePerspectives(){
  return resolvedTablePerspectives;
}
Program: 57486
Project: 57486
Buggy source:
private static RecordPerspective binRecords(int nrBins,Integer dimensionID,RecordPerspective recordPerspective,ATableBasedDataDomain dataDomain,String label,ArrayList<String> groupLabels){
  ArrayList<ArrayList<Integer>> bins=new ArrayList<ArrayList<Integer>>(nrBins);
  for (int count=0; count < nrBins; count++) {
    bins.add(new ArrayList<Integer>());
  }
  DataTable table=dataDomain.getTable();
  for (  Integer recordID : recordPerspective.getVirtualArray()) {
    float value=table.getFloat(DataRepresentation.NORMALIZED,recordID,dimensionID);
    int bin=(int)(value * nrBins);
    if (bin == nrBins)     bin=nrBins - 1;
    bins.get(bin).add(recordID);
  }
  ArrayList<Integer> binnedIDList=new ArrayList<Integer>();
  ArrayList<Integer> clusterSizes=new ArrayList<Integer>(nrBins);
  ArrayList<Integer> sampleElements=new ArrayList<Integer>(nrBins);
  for (  ArrayList<Integer> bin : bins) {
    binnedIDList.addAll(bin);
    clusterSizes.add(bin.size());
    sampleElements.add(0);
  }
  PerspectiveInitializationData data=new PerspectiveInitializationData();
  data.setData(binnedIDList,clusterSizes,sampleElements,groupLabels);
  RecordPerspective binnedPerspective=new RecordPerspective(dataDomain);
  binnedPerspective.init(data);
  binnedPerspective.setLabel(label,false);
  binnedPerspective.setPrivate(true);
  table.registerRecordPerspective(binnedPerspective,false);
  return binnedPerspective;
}

Fixed version (ground truth):
private static RecordPerspective binRecords(int nrBins,Integer dimensionID,RecordPerspective recordPerspective,ATableBasedDataDomain dataDomain,String label,ArrayList<String> groupLabels,boolean isTablePerspectivePrivate){
  ArrayList<ArrayList<Integer>> bins=new ArrayList<ArrayList<Integer>>(nrBins);
  for (int count=0; count < nrBins; count++) {
    bins.add(new ArrayList<Integer>());
  }
  DataTable table=dataDomain.getTable();
  for (  Integer recordID : recordPerspective.getVirtualArray()) {
    float value=table.getFloat(DataRepresentation.NORMALIZED,recordID,dimensionID);
    int bin=(int)(value * nrBins);
    if (bin == nrBins)     bin=nrBins - 1;
    bins.get(bin).add(recordID);
  }
  ArrayList<Integer> binnedIDList=new ArrayList<Integer>();
  ArrayList<Integer> clusterSizes=new ArrayList<Integer>(nrBins);
  ArrayList<Integer> sampleElements=new ArrayList<Integer>(nrBins);
  for (  ArrayList<Integer> bin : bins) {
    binnedIDList.addAll(bin);
    clusterSizes.add(bin.size());
    sampleElements.add(0);
  }
  PerspectiveInitializationData data=new PerspectiveInitializationData();
  data.setData(binnedIDList,clusterSizes,sampleElements,groupLabels);
  RecordPerspective binnedPerspective=new RecordPerspective(dataDomain);
  binnedPerspective.init(data);
  binnedPerspective.setLabel(label,false);
  binnedPerspective.setPrivate(isTablePerspectivePrivate);
  table.registerRecordPerspective(binnedPerspective,false);
  return binnedPerspective;
}
Program: 57488
Project: 57488
Buggy source:
private void createContextMenuItemsForDataDomain(Menu menu,final TableItem tableItem,final GeneticDataDomain dataDomain){
  MenuItem makeCategoryOfGene=new MenuItem(menu,SWT.PUSH);
  makeCategoryOfGene.setText("String_Node_Str" + dataDomain.getLabel());
  makeCategoryOfGene.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      new CategoricalTablePerspectiveCreator().createTablePerspeciveByRowID(dataDomain,(Integer)tableItem.getData(),davidIDType,false);
      try {
        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("String_Node_Str");
      }
 catch (      PartInitException e1) {
        e1.printStackTrace();
      }
    }
  }
);
}

Fixed version (ground truth):
private void createContextMenuItemsForDataDomain(Menu menu,final TableItem tableItem,final GeneticDataDomain dataDomain){
  MenuItem makeCategoryOfGene=new MenuItem(menu,SWT.PUSH);
  makeCategoryOfGene.setText("String_Node_Str" + dataDomain.getLabel());
  makeCategoryOfGene.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      new CategoricalTablePerspectiveCreator().createTablePerspeciveByRowID(dataDomain,(Integer)tableItem.getData(),davidIDType,false);
      DataDomainUpdateEvent event=new DataDomainUpdateEvent(dataDomain);
      event.setSender(this);
      GeneralManager.get().getEventPublisher().triggerEvent(event);
      try {
        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("String_Node_Str");
      }
 catch (      PartInitException e1) {
        e1.printStackTrace();
      }
    }
  }
);
}
Program: 57489
Project: 57489
Buggy source:
@Override protected void handleKeyPressedEvent(KeyEvent event){
  if (event.stateMask == SWT.CTRL || event.stateMask == SWT.ALT || event.stateMask == SWT.SHIFT)   return;
switch (event.keyCode) {
case SWT.ARROW_UP:
    vendingMachine.highlightNextPreviousVisBrick(false);
  break;
case SWT.ARROW_DOWN:
vendingMachine.highlightNextPreviousVisBrick(true);
break;
case SWT.CR:
vendingMachine.selectChoice();
break;
}
}

Fixed version (ground truth):
@Override protected void handleKeyPressedEvent(KeyEvent event){
  if (event.stateMask == SWT.CTRL || event.stateMask == SWT.ALT || event.stateMask == SWT.SHIFT)   return;
switch (event.keyCode) {
case SWT.ARROW_UP:
    vendingMachine.highlightRankedElement(false);
  break;
case SWT.ARROW_DOWN:
vendingMachine.highlightRankedElement(true);
break;
case SWT.CR:
vendingMachine.selectChoice();
break;
}
}