nus-yam/ex-repair huggingface dataset:
Program: 57661
Project: 57661
Buggy source:
/** 
 * Constructor.
 */
public GLDataViewIntegrator(GLCanvas glCanvas,Composite parentComposite,ViewFrustum viewFrustum){
  super(glCanvas,parentComposite,viewFrustum,VIEW_TYPE,VIEW_NAME);
  connectionBandRenderer=new ConnectionBandRenderer();
  VIEW_TYPE=GLDataViewIntegrator.VIEW_TYPE;
  glKeyListener=new GLDVIKeyListener();
  relativeNodePositions=new HashMap<IDVINode,Pair<Float,Float>>();
  dragAndDropController=new DragAndDropController(this);
  dataNodes=new HashSet<ADataNode>();
  viewNodes=new HashSet<ViewNode>();
  viewNodesOfDataDomains=new HashMap<IDataDomain,Set<ViewNode>>();
  dataNodesOfDataDomains=new HashMap<IDataDomain,ADataNode>();
  nodeCreator=new NodeCreator();
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public GLDataViewIntegrator(GLCanvas glCanvas,Composite parentComposite,ViewFrustum viewFrustum){
  super(glCanvas,parentComposite,viewFrustum,VIEW_TYPE,VIEW_NAME);
  connectionBandRenderer=new ConnectionBandRenderer();
  VIEW_TYPE=GLDataViewIntegrator.VIEW_TYPE;
  glKeyListener=new GLDVIKeyListener();
  dragAndDropController=new DragAndDropController(this);
  dataNodes=new HashSet<ADataNode>();
  viewNodes=new HashSet<ViewNode>();
  viewNodesOfDataDomains=new HashMap<IDataDomain,Set<ViewNode>>();
  dataNodesOfDataDomains=new HashMap<IDataDomain,ADataNode>();
  nodeCreator=new NodeCreator();
}
Program: 57662
Project: 57662
Buggy source:
/** 
 * Builds the display list for a given display list index.
 * @param gl Instance of GL2.
 * @param iGLDisplayListIndex Index of the display list.
 */
private void buildDisplayList(final GL2 gl,int iGLDisplayListIndex){
  gl.glNewList(iGLDisplayListIndex,GL2.GL_COMPILE);
  int drawingAreaWidth=pixelGLConverter.getPixelWidthForGLWidth(viewFrustum.getWidth()) - 2 * BOUNDS_SPACING_PIXELS;
  int drawingAreaHeight=pixelGLConverter.getPixelHeightForGLHeight(viewFrustum.getHeight()) - 2 * BOUNDS_SPACING_PIXELS;
  if (applyAutomaticLayout) {
    for (    IDVINode node : dataGraph.getNodes()) {
      node.setCustomPosition(false);
    }
    for (    Edge edge : dataGraph.getAllEdges()) {
      AEdgeRenderer edgeRenderer=graphLayout.getLayoutSpecificEdgeRenderer(edge);
      edge.setEdgeRenderer(edgeRenderer);
    }
    Rectangle2D rect=new Rectangle();
    rect.setFrame(BOUNDS_SPACING_PIXELS,BOUNDS_SPACING_PIXELS,drawingAreaWidth,drawingAreaHeight);
    graphLayout.clearNodePositions();
    graphLayout.layout(rect);
    updateMinWindowSize(true);
  }
 else {
  }
  for (  IDVINode node : dataGraph.getNodes()) {
    Point2D position=graphLayout.getNodePosition(node);
    node.render(gl);
    float relativePosX=(float)position.getX() / drawingAreaWidth;
    float relativePosY=(float)position.getY() / drawingAreaHeight;
    relativeNodePositions.put(node,new Pair<Float,Float>(relativePosX,relativePosY));
  }
  renderEdges(gl);
  gl.glEndList();
  applyAutomaticLayout=false;
  nodePositionsUpdated=false;
}

Fixed version (ground truth):
/** 
 * Builds the display list for a given display list index.
 * @param gl Instance of GL2.
 * @param iGLDisplayListIndex Index of the display list.
 */
private void buildDisplayList(final GL2 gl,int iGLDisplayListIndex){
  gl.glNewList(iGLDisplayListIndex,GL2.GL_COMPILE);
  Rectangle2D drawingArea=calculateGraphDrawingArea();
  if (applyAutomaticLayout) {
    for (    IDVINode node : dataGraph.getNodes()) {
      node.setCustomPosition(false);
    }
    for (    Edge edge : dataGraph.getAllEdges()) {
      AEdgeRenderer edgeRenderer=graphLayout.getLayoutSpecificEdgeRenderer(edge);
      edge.setEdgeRenderer(edgeRenderer);
    }
    graphLayout.clearNodePositions();
    graphLayout.layout(drawingArea);
    updateMinWindowSize(true);
  }
 else {
  }
  for (  IDVINode node : dataGraph.getNodes()) {
    node.render(gl);
  }
  renderEdges(gl);
  gl.glEndList();
  applyAutomaticLayout=false;
  nodePositionsUpdated=false;
}
Program: 57664
Project: 57664
Buggy source:
@Override public void init(GL2 gl){
  displayListIndex=gl.glGenLists(1);
  textRenderer=new CaleydoTextRenderer(18);
}

Fixed version (ground truth):
@Override public void init(GL2 gl){
  displayListIndex=gl.glGenLists(1);
  textRenderer=new CaleydoTextRenderer(18);
  createPickingListeners();
}
Program: 57665
Project: 57665
Buggy source:
@Override public void reshape(GLAutoDrawable drawable,int x,int y,int width,int height){
  super.reshape(drawable,x,y,width,height);
}

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) {
    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));
    }
  }
}
Program: 57666
Project: 57666
Buggy source:
/** 
 * Register a new IDType. Checks whether whether the columnType is legal. If the typeName is already registered, a check is conducted whether the registered and the new one match, and if they do, the previously registered type is returned. Else an exception is thrown.
 * @param typeName see  {@link #typeName}
 * @param idCategory see  {@link #idCategory}
 * @param columnType see  {@link #columnType}
 * @return the created ID Type
 */
public static IDType registerType(String typeName,IDCategory idCategory,EColumnType columnType){
  if (!(columnType == EColumnType.STRING || columnType == EColumnType.INT))   throw new IllegalStateException("String_Node_Str" + columnType);
  IDType idType=registeredTypes.get(typeName);
  if (idType != null) {
    if (!idType.getIDCategory().equals(idCategory) || !idType.getColumnType().equals(columnType))     throw new IllegalStateException("String_Node_Str" + typeName + "String_Node_Str"+ idCategory+ "String_Node_Str"+ columnType+ "String_Node_Str"+ "String_Node_Str"+ idType+ "String_Node_Str"+ idType.getIDCategory()+ "String_Node_Str"+ idType.getColumnType());
  }
 else {
    idType=new IDType(typeName,idCategory,columnType);
    registeredTypes.put(typeName,idType);
    Logger.log(new Status(Status.INFO,"String_Node_Str","String_Node_Str" + typeName));
  }
  return idType;
}

Fixed version (ground truth):
/** 
 * Register a new IDType. Checks whether whether the columnType is legal. If the typeName is already registered, a check is conducted whether the registered and the new one match, and if they do, the previously registered type is returned. Else an exception is thrown.
 * @param typeName see {@link #typeName}
 * @param idCategory see {@link #idCategory}
 * @param columnType see {@link #columnType}
 * @return the created ID Type
 */
public static IDType registerType(String typeName,IDCategory idCategory,EColumnType columnType){
  if (!(columnType == EColumnType.STRING || columnType == EColumnType.INT))   throw new IllegalStateException("String_Node_Str" + columnType);
  IDType idType=registeredTypes.get(typeName);
  if (idType != null) {
    if (!idType.getIDCategory().equals(idCategory) || !idType.getColumnType().equals(columnType))     throw new IllegalStateException("String_Node_Str" + typeName + "String_Node_Str"+ idCategory+ "String_Node_Str"+ columnType+ "String_Node_Str"+ "String_Node_Str"+ idType+ "String_Node_Str"+ idType.getIDCategory()+ "String_Node_Str"+ idType.getColumnType());
  }
 else {
    idType=new IDType(typeName,idCategory,columnType);
    registeredTypes.put(typeName,idType);
    idCategory.addIDType(idType);
    Logger.log(new Status(Status.INFO,"String_Node_Str","String_Node_Str" + typeName));
  }
  return idType;
}
Program: 57667
Project: 57667
Buggy source:
/** 
 * @param isInternalType setter, see  {@link #isInternalType}
 */
public void setInternalType(boolean isInternalType){
  this.isInternalType=isInternalType;
}

Fixed version (ground truth):
/** 
 * @param isInternalType setter, see {@link #isInternalType}
 */
public void setInternalType(boolean isInternalType){
  this.isInternalType=isInternalType;
}
Program: 57668
Project: 57668
Buggy source:
/** 
 * Unregister an IDType. Checks whether the IDType is registered.
 * @param idType see  {@link #idType}
 */
public static void unregisterType(IDType idType){
  if (idType == null)   return;
  if (registeredTypes.containsKey(idType.getTypeName())) {
    Logger.log(new Status(Status.INFO,"String_Node_Str","String_Node_Str" + idType.getTypeName()));
    registeredTypes.remove(idType.getTypeName());
    idType.setTypeName("String_Node_Str");
  }
 else {
    Logger.log(new Status(Status.INFO,"String_Node_Str","String_Node_Str" + idType.getTypeName() + "String_Node_Str"));
  }
}

Fixed version (ground truth):
/** 
 * Unregister an IDType. Checks whether the IDType is registered.
 * @param idType see {@link #idType}
 */
public static void unregisterType(IDType idType){
  if (idType == null)   return;
  if (registeredTypes.containsKey(idType.getTypeName())) {
    Logger.log(new Status(Status.INFO,"String_Node_Str","String_Node_Str" + idType.getTypeName()));
    registeredTypes.remove(idType.getTypeName());
    idType.setTypeName("String_Node_Str");
    idType.getIDCategory().removeIDType(idType);
  }
 else {
    Logger.log(new Status(Status.INFO,"String_Node_Str","String_Node_Str" + idType.getTypeName() + "String_Node_Str"));
  }
}
Program: 57669
Project: 57669
Buggy source:
/** 
 * @param typeName setter, see  {@link #typeName}
 */
public void setTypeName(String typeName){
  this.typeName=typeName;
}

Fixed version (ground truth):
/** 
 * @param typeName setter, see {@link #typeName}
 */
public void setTypeName(String typeName){
  this.typeName=typeName;
}
Program: 57670
Project: 57670
Buggy source:
private void fillDimensionIDTypeCombo(){
  HashSet<IDType> tempIDTypes=IDMappingManagerRegistry.get().getIDMappingManager(dimensionIDCategory).getIDTypes();
  dimensionIDTypes.clear();
  for (  IDType idType : tempIDTypes) {
    if (!idType.isInternalType())     dimensionIDTypes.add(idType);
  }
  String[] idTypesAsString=new String[dimensionIDTypes.size()];
  int index=0;
  for (  IDType idType : dimensionIDTypes) {
    idTypesAsString[index]=idType.getTypeName();
    index++;
  }
  dimensionIDCombo.setItems(idTypesAsString);
  dimensionIDCombo.setEnabled(true);
  dimensionIDCombo.select(0);
}

Fixed version (ground truth):
private void fillDimensionIDTypeCombo(){
  ArrayList<IDType> tempIDTypes=dimensionIDCategory.getIdTypes();
  dimensionIDTypes.clear();
  for (  IDType idType : tempIDTypes) {
    if (!idType.isInternalType())     dimensionIDTypes.add(idType);
  }
  String[] idTypesAsString=new String[dimensionIDTypes.size()];
  int index=0;
  for (  IDType idType : dimensionIDTypes) {
    idTypesAsString[index]=idType.getTypeName();
    index++;
  }
  dimensionIDCombo.setItems(idTypesAsString);
  dimensionIDCombo.setEnabled(true);
  dimensionIDCombo.select(0);
}
Program: 57671
Project: 57671
Buggy source:
/** 
 * Reads the min and max values (if set) from the dialog
 */
private void fillLoadDataParameters(){
  if (txtMin.getEnabled() && !txtMin.getText().isEmpty()) {
    float fMin=Float.parseFloat(txtMin.getText());
    if (!Float.isNaN(fMin)) {
      dataSetDescription.setMin(fMin);
    }
  }
  if (txtMax.getEnabled() && !txtMax.getText().isEmpty()) {
    float fMax=Float.parseFloat(txtMax.getText());
    if (!Float.isNaN(fMax)) {
      dataSetDescription.setMax(fMax);
    }
  }
  IDSpecification rowIDSpecification=new IDSpecification();
  IDType rowIDType=recordIDTypes.get(recordIDCombo.getSelectionIndex());
  rowIDSpecification.setIdType(rowIDType.toString());
  if (rowIDType.getTypeName().equalsIgnoreCase("String_Node_Str")) {
    rowIDSpecification.setSubStringExpression("String_Node_Str");
  }
  dataSetDescription.setRowIDSpecification(rowIDSpecification);
  dataSetDescription.setMathFilterMode(mathFilterMode);
  dataSetDescription.setDataHomogeneous(buttonHomogeneous.getSelection());
  dataSetDescription.setTransposeMatrix(buttonSwapRowsWithColumns.getSelection());
  dataSetDescription.setDataSetName(txtDataSetLabel.getText());
}

Fixed version (ground truth):
/** 
 * Reads the min and max values (if set) from the dialog
 */
private void fillLoadDataParameters(){
  if (txtMin.getEnabled() && !txtMin.getText().isEmpty()) {
    float fMin=Float.parseFloat(txtMin.getText());
    if (!Float.isNaN(fMin)) {
      dataSetDescription.setMin(fMin);
    }
  }
  if (txtMax.getEnabled() && !txtMax.getText().isEmpty()) {
    float fMax=Float.parseFloat(txtMax.getText());
    if (!Float.isNaN(fMax)) {
      dataSetDescription.setMax(fMax);
    }
  }
  IDSpecification rowIDSpecification=new IDSpecification();
  IDType rowIDType=recordIDTypes.get(recordIDCombo.getSelectionIndex());
  rowIDSpecification.setIdType(rowIDType.toString());
  rowIDSpecification.setIdCategory(rowIDType.getIDCategory().toString());
  if (rowIDType.getTypeName().equalsIgnoreCase("String_Node_Str")) {
    rowIDSpecification.setSubStringExpression("String_Node_Str");
  }
  IDSpecification columnIDSpecification=new IDSpecification();
  IDType columnIDType=dimensionIDTypes.get(dimensionIDCombo.getSelectionIndex());
  columnIDSpecification.setIdType(columnIDType.toString());
  columnIDSpecification.setIdCategory(rowIDType.getIDCategory().toString());
  dataSetDescription.setRowIDSpecification(rowIDSpecification);
  dataSetDescription.setMathFilterMode(mathFilterMode);
  dataSetDescription.setDataHomogeneous(buttonHomogeneous.getSelection());
  dataSetDescription.setTransposeMatrix(buttonSwapRowsWithColumns.getSelection());
  dataSetDescription.setDataSetName(txtDataSetLabel.getText());
}
Program: 57673
Project: 57673
Buggy source:
@Override protected void okPressed(){
  ATableBasedDataDomain dataDomain=(ATableBasedDataDomain)DataDomainManager.get().createDataDomain("String_Node_Str");
  fillLoadDataParameters();
  IDSpecification recordIDSpecification=new IDSpecification();
  recordIDSpecification.setIDTypeGene(true);
  recordIDSpecification.setIdType("String_Node_Str");
  dataSetDescription.setRowIDSpecification(recordIDSpecification);
  IDSpecification dimensionIDSpecification=new IDSpecification();
  dimensionIDSpecification.setIdType("String_Node_Str");
  dataDomain.setDataSetDescription(dataSetDescription);
  boolean success=readDimensionDefinition();
  if (success) {
    DataTableUtils.loadData(dataDomain,dataSetDescription,true,true);
  }
  try {
    String secondaryID=UUID.randomUUID().toString();
    RCPViewInitializationData rcpViewInitData=new RCPViewInitializationData();
    rcpViewInitData.setDataDomainID(dataDomain.getDataDomainID());
    RCPViewManager.get().addRCPView(secondaryID,rcpViewInitData);
    if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
      PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(dataDomain.getDefaultStartViewType(),secondaryID,IWorkbenchPage.VIEW_ACTIVATE);
    }
  }
 catch (  PartInitException e) {
    e.printStackTrace();
  }
  super.okPressed();
}

Fixed version (ground truth):
@Override protected void okPressed(){
  if (txtFileName.getText().isEmpty()) {
    MessageDialog.openError(new Shell(),"String_Node_Str","String_Node_Str");
    return;
  }
  if (recordIDCombo.getSelectionIndex() == -1) {
    MessageDialog.openError(new Shell(),"String_Node_Str","String_Node_Str");
    return;
  }
  if (dimensionIDCombo.getSelectionIndex() == -1) {
    MessageDialog.openError(new Shell(),"String_Node_Str","String_Node_Str");
    return;
  }
  ATableBasedDataDomain dataDomain=(ATableBasedDataDomain)DataDomainManager.get().createDataDomain("String_Node_Str");
  fillLoadDataParameters();
  IDSpecification recordIDSpecification=new IDSpecification();
  recordIDSpecification.setIDTypeGene(true);
  recordIDSpecification.setIdType("String_Node_Str");
  dataSetDescription.setRowIDSpecification(recordIDSpecification);
  IDSpecification dimensionIDSpecification=new IDSpecification();
  dimensionIDSpecification.setIdType("String_Node_Str");
  dataDomain.setDataSetDescription(dataSetDescription);
  boolean success=readDimensionDefinition();
  if (success) {
    DataTableUtils.loadData(dataDomain,dataSetDescription,true,true);
    try {
      String secondaryID=UUID.randomUUID().toString();
      RCPViewInitializationData rcpViewInitData=new RCPViewInitializationData();
      rcpViewInitData.setDataDomainID(dataDomain.getDataDomainID());
      RCPViewManager.get().addRCPView(secondaryID,rcpViewInitData);
      if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(dataDomain.getDefaultStartViewType(),secondaryID,IWorkbenchPage.VIEW_ACTIVATE);
      }
    }
 catch (    PartInitException e) {
      e.printStackTrace();
    }
    super.okPressed();
  }
}
Program: 57674
Project: 57674
Buggy source:
private void fillRecordIDTypeCombo(){
  HashSet<IDType> tempIDTypes=IDMappingManagerRegistry.get().getIDMappingManager(recordIDCategory).getIDTypes();
  recordIDTypes.clear();
  for (  IDType idType : tempIDTypes) {
    if (!idType.isInternalType())     recordIDTypes.add(idType);
  }
  String[] idTypesAsString=new String[recordIDTypes.size()];
  int index=0;
  for (  IDType idType : recordIDTypes) {
    idTypesAsString[index]=idType.getTypeName();
    index++;
  }
  recordIDCombo.setItems(idTypesAsString);
  recordIDCombo.setEnabled(true);
  recordIDCombo.select(0);
  recordIDCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      TableColumn idColumn=previewTable.getColumn(1);
      idColumn.setText(recordIDCombo.getText());
    }
  }
);
}

Fixed version (ground truth):
private void fillRecordIDTypeCombo(){
  ArrayList<IDType> tempIDTypes=recordIDCategory.getIdTypes();
  recordIDTypes.clear();
  for (  IDType idType : tempIDTypes) {
    if (!idType.isInternalType())     recordIDTypes.add(idType);
  }
  String[] idTypesAsString=new String[recordIDTypes.size()];
  int index=0;
  for (  IDType idType : recordIDTypes) {
    idTypesAsString[index]=idType.getTypeName();
    index++;
  }
  recordIDCombo.setItems(idTypesAsString);
  recordIDCombo.setEnabled(true);
  recordIDCombo.select(0);
  recordIDCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      TableColumn idColumn=previewTable.getColumn(1);
      idColumn.setText(recordIDCombo.getText());
    }
  }
);
}
Program: 57677
Project: 57677
Buggy source:
@Override protected Control createContents(Composite parent){
  Control control=super.createContents(parent);
  getButton(IDialogConstants.OK_ID).setEnabled(false);
  return control;
}

Fixed version (ground truth):
@Override protected Control createContents(Composite parent){
  Control control=super.createContents(parent);
  if (dataDomain == null)   getButton(IDialogConstants.OK_ID).setEnabled(false);
  return control;
}
Program: 57678
Project: 57678
Buggy source:
@Override public void dataOK(){
  dataDomain=dataChooser.getDataDomain();
  recordPerspective=dataChooser.getRecordPerspective();
  dimensionPerspective=dataChooser.getDimensionPerspective();
  typeOptions[0]=dataDomain.getRecordDenomination(true,false);
  typeOptions[1]=dataDomain.getDimensionDenomination(true,false);
  clusterTypeCombo.setItems(typeOptions);
  clusterTypeCombo.select(0);
  clusterTypeCombo.setEnabled(true);
  clusterTargetName=typeOptions[0];
  parent.dataOK();
}

Fixed version (ground truth):
@Override public void dataOK(){
  dataDomain=dataChooser.getDataDomain();
  recordPerspective=dataChooser.getRecordPerspective();
  dimensionPerspective=dataChooser.getDimensionPerspective();
  setDataDependendStuff();
}
Program: 57679
Project: 57679
Buggy source:
/** 
 * Constructor.
 */
public StartClusteringDialogAction(IDataOKListener parent,final Composite parentComposite,ATableBasedDataDomain dataDomain,DimensionPerspective dimensionPerspective,RecordPerspective recordPerspective){
  super(TEXT);
  setId(ID);
  setToolTipText(TEXT);
  setImageDescriptor(ImageDescriptor.createFromImage(new ResourceLoader().getImage(PlatformUI.getWorkbench().getDisplay(),ICON)));
  this.parent=parent;
  this.parentComposite=parentComposite;
  if (dataDomain == null) {
    ArrayList<ATableBasedDataDomain> availableDomains=DataDomainManager.get().getDataDomainsByType(ATableBasedDataDomain.class);
    ArrayList<ATableBasedDataDomain> tableBasedDataDomains=new ArrayList<ATableBasedDataDomain>();
    for (    ATableBasedDataDomain tempDataDomain : availableDomains) {
      tableBasedDataDomains.add(tempDataDomain);
    }
    DataConfiguration config=DataConfigurationChooser.determineDataConfiguration(tableBasedDataDomains,"String_Node_Str",false);
    this.dataDomain=config.getDataDomain();
    dimensionPerspective=config.getDimensionPerspective();
    recordPerspective=config.getRecordPerspective();
  }
  this.dimensionPerspective=dimensionPerspective;
  this.recordPerspective=recordPerspective;
  if (this.dataDomain != null) {
    typeOptions[0]=this.dataDomain.getRecordDenomination(true,false);
    typeOptions[1]=this.dataDomain.getDimensionDenomination(true,false);
  }
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public StartClusteringDialogAction(IDataOKListener parent,final Composite parentComposite,ATableBasedDataDomain dataDomain,DimensionPerspective dimensionPerspective,RecordPerspective recordPerspective){
  super(TEXT);
  setId(ID);
  setToolTipText(TEXT);
  setImageDescriptor(ImageDescriptor.createFromImage(new ResourceLoader().getImage(PlatformUI.getWorkbench().getDisplay(),ICON)));
  this.parent=parent;
  this.parentComposite=parentComposite;
  if (dataDomain == null) {
    ArrayList<ATableBasedDataDomain> availableDomains=DataDomainManager.get().getDataDomainsByType(ATableBasedDataDomain.class);
    ArrayList<ATableBasedDataDomain> tableBasedDataDomains=new ArrayList<ATableBasedDataDomain>();
    for (    ATableBasedDataDomain tempDataDomain : availableDomains) {
      tableBasedDataDomains.add(tempDataDomain);
    }
    DataConfiguration config=DataConfigurationChooser.determineDataConfiguration(tableBasedDataDomains,"String_Node_Str",false);
    this.dataDomain=config.getDataDomain();
    dimensionPerspective=config.getDimensionPerspective();
    recordPerspective=config.getRecordPerspective();
  }
 else {
    this.dataDomain=dataDomain;
  }
  this.dimensionPerspective=dimensionPerspective;
  this.recordPerspective=recordPerspective;
  if (this.dataDomain != null) {
    typeOptions[0]=this.dataDomain.getRecordDenomination(true,false);
    typeOptions[1]=this.dataDomain.getDimensionDenomination(true,false);
  }
}
Program: 57680
Project: 57680
Buggy source:
@Override public void handleRecordVAUpdate(String recordPerspectiveID){
  if (dataContainer.hasRecordPerspective(recordPerspectiveID)) {
    reactOnRecordVAChanges();
    setDisplayListDirty();
  }
}

Fixed version (ground truth):
@Override public void handleRecordVAUpdate(String recordPerspectiveID){
  if (dataContainer != null && dataContainer.hasRecordPerspective(recordPerspectiveID)) {
    reactOnRecordVAChanges();
    setDisplayListDirty();
  }
}
Program: 57681
Project: 57681
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) {
    layoutManager.setStaticLayoutConfiguration(brickLayoutConfiguration);
    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) {
    if (brickLayoutConfiguration.isViewTypeValid(viewType)) {
      setBrickViewTypeAndConfigureSize(viewType);
    }
 else {
      setBrickViewTypeAndConfigureSize(brickLayoutConfiguration.getDefaultViewType());
    }
  }
}
Program: 57682
Project: 57682
Buggy source:
@Override public void init(GL2 gl){
  textRenderer=new CaleydoTextRenderer(24);
  baseDisplayListIndex=gl.glGenLists(1);
  layoutManager=new LayoutManager(viewFrustum,pixelGLConverter);
  if (brickLayoutConfiguration == null) {
    brickLayoutConfiguration=new DefaultBrickLayoutTemplate(this,stratomex,dimensionGroup,brickConfigurer);
  }
  brickConfigurer.setBrickViews(this,gl,glMouseListener,brickLayoutConfiguration);
  currentViewType=brickLayoutConfiguration.getDefaultViewType();
  setBrickLayoutTemplate(brickLayoutConfiguration,currentViewType);
  brickLayoutConfiguration.setViewRenderer(containedViewRenderers.get(currentViewType));
  currentRemoteView=views.get(currentViewType);
  if (brickLayoutConfiguration.getViewRenderer() instanceof IMouseWheelHandler) {
    stratomex.registerMouseWheelListener((IMouseWheelHandler)brickLayoutConfiguration.getViewRenderer());
  }
  layoutManager.setStaticLayoutConfiguration(brickLayoutConfiguration);
  dimensionGroup.updateLayout();
  isInitialized=true;
}

Fixed version (ground truth):
@Override public void init(GL2 gl){
  textRenderer=new CaleydoTextRenderer(24);
  baseDisplayListIndex=gl.glGenLists(1);
  layoutManager=new LayoutManager(viewFrustum,pixelGLConverter);
  if (brickLayoutConfiguration == null) {
    brickLayoutConfiguration=new DefaultBrickLayoutTemplate(this,stratomex,dimensionGroup,brickConfigurer);
  }
  brickConfigurer.setBrickViews(this,gl,glMouseListener,brickLayoutConfiguration);
  currentViewType=brickLayoutConfiguration.getDefaultViewType();
  setBrickLayoutTemplate(brickLayoutConfiguration,currentViewType);
  brickLayoutConfiguration.setViewRenderer(containedViewRenderers.get(currentViewType));
  currentRemoteView=views.get(currentViewType);
  if (brickLayoutConfiguration.getViewRenderer() instanceof IMouseWheelHandler) {
    stratomex.registerMouseWheelListener((IMouseWheelHandler)brickLayoutConfiguration.getViewRenderer());
  }
  dimensionGroup.updateLayout();
  isInitialized=true;
}
Program: 57684
Project: 57684
Buggy source:
/** 
 * <p> Set the spacing of the arch in pixel. </p> <p> This is only used if the group is not collapsed. If it is collapsed, the values are irrelevant. </p>
 * @param archHeight the pixel height of the arch
 */
public void setArchHeight(int archHeight){
  if (headerBrick != null)   headerBrick.setStaticBrickHeight(archHeight);
}

Fixed version (ground truth):
/** 
 * <p> Set the spacing of the arch in pixel. </p> <p> This is only used if the group is not collapsed. If it is collapsed, the values are irrelevant. </p>
 * @param archHeight the pixel height of the arch
 */
public void setArchHeight(int archHeight){
  if (headerBrick != null) {
    headerBrick.setStaticBrickHeight(archHeight);
    headerBrick.setBrickHeigthMode(EBrickHeightMode.STATIC);
  }
}
Program: 57686
Project: 57686
Buggy source:
@Override public void mouseOver(Pick pick){
  if (labelProvider != null) {
    toolTipMessage=labelProvider.getLabel();
  }
  System.out.println("String_Node_Str");
  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();
  }
  System.out.println("String_Node_Str");
  thread=new ToolTipThread(new Point(pick.getPickedPoint().x,pick.getPickedPoint().y));
  Runnable runnable=new Runnable(){
    @Override public void run(){
      view.getParentComposite().getDisplay().asyncExec(thread);
    }
  }
;
  Thread timerThread=new Thread(runnable);
  timerThread.start();
}
Program: 57687
Project: 57687
Buggy source:
private synchronized void createToolTip(){
  if (hideToolTip)   return;
  System.out.println("String_Node_Str");
  toolTip=new ToolTip(new Shell(),0);
  toolTip.setText(toolTipTitle == null ? "String_Node_Str" : toolTipTitle);
  toolTip.setMessage(toolTipMessage == null ? "String_Node_Str" : toolTipMessage);
  toolTip.setAutoHide(true);
  toolTip.setVisible(true);
}

Fixed version (ground truth):
private synchronized void createToolTip(){
  if (hideToolTip)   return;
  System.out.println("String_Node_Str");
  toolTip=new ToolTip(new Shell(),0);
  toolTip.setText(toolTipTitle == null ? "String_Node_Str" : toolTipTitle);
  toolTip.setMessage(toolTipMessage == null ? "String_Node_Str" : toolTipMessage);
  PointerInfo pointerInfo=MouseInfo.getPointerInfo();
  toolTip.setLocation(pointerInfo.getLocation().x,pointerInfo.getLocation().y + MOUSE_POSITION_TOOLTIP_SPACING_PIXELS);
  toolTip.setAutoHide(true);
  toolTip.setVisible(true);
}
Program: 57688
Project: 57688
Buggy source:
private void createPickingListeners(){
  RecordVirtualArray recordVA=dataContainer.getRecordPerspective().getVirtualArray();
  for (  Group group : recordVA.getGroupList()) {
    ToolTipPickingListener toolTipPickingListener=new ToolTipPickingListener(this,"String_Node_Str");
    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());
  }
}
Program: 57691
Project: 57691
Buggy source:
/** 
 * This method is called by the   {@link ForeignSelectionUpdateListener}, signaling that a selection form another dataDomain is available. If possible, it is converted to be compatible with the local dataDomain and then sent out via a   {@link SelectionUpdateEvent}.
 * @param dataDomainType the type of the dataDomain for which thisselectionUpdate is intended
 * @param delta
 * @param scrollToSelection
 * @param info
 */
public void handleForeignSelectionUpdate(String dataDomainType,SelectionDelta delta){
}

Fixed version (ground truth):
/** 
 * This method is called by the   {@link ForeignSelectionUpdateListener}, signaling that a selection form another dataDomain is available. If possible, it is converted to be compatible with the local dataDomain and then sent out via a   {@link SelectionUpdateEvent}.
 * @param dataDomainType the type of the dataDomain for which this selectionUpdate is intended
 * @param delta
 * @param scrollToSelection
 * @param info
 */
public void handleForeignSelectionUpdate(String dataDomainType,SelectionDelta delta){
}
Program: 57692
Project: 57692
Buggy source:
/** 
 * @param colorMapper setter, see {@link #colorMapper}
 */
public void setColorMapper(ColorMapper colorMapper){
  this.colorMapper=colorMapper;
}

Fixed version (ground truth):
/** 
 * @param colorMapper setter, see  {@link #colorMapper}
 */
public void setColorMapper(ColorMapper colorMapper){
  this.colorMapper=colorMapper;
}
Program: 57693
Project: 57693
Buggy source:
/** 
 * Returns the denomination for the records. For genetic data for example this would be "Gene"
 * @param capitalized if true, the label is returned capitalized, e.g.,"Gene", if false it would be "gene"
 * @param plural if true, the label is returned in the plural form of theword, e.g., "genes" instead of the singular form, e.g., "gene"
 * @return the denomination formatted according to the parameters passed
 */
public String getRecordDenomination(boolean capitalized,boolean plural){
  String recordDenomination;
  if (plural)   recordDenomination=recordDenominationPlural;
 else   recordDenomination=recordDenominationSingular;
  if (capitalized) {
    recordDenomination=recordDenomination.substring(0,1).toUpperCase() + recordDenomination.substring(1,recordDenomination.length());
  }
  return recordDenomination;
}

Fixed version (ground truth):
/** 
 * Returns the denomination for the records. For genetic data for example this would be "Gene"
 * @param capitalized if true, the label is returned capitalized, e.g., "Gene", if false it would be "gene"
 * @param plural if true, the label is returned in the plural form of the word, e.g., "genes" instead of the singular form, e.g., "gene"
 * @return the denomination formatted according to the parameters passed
 */
public String getRecordDenomination(boolean capitalized,boolean plural){
  String recordDenomination;
  if (plural)   recordDenomination=recordDenominationPlural;
 else   recordDenomination=recordDenominationSingular;
  if (capitalized) {
    recordDenomination=recordDenomination.substring(0,1).toUpperCase() + recordDenomination.substring(1,recordDenomination.length());
  }
  return recordDenomination;
}
Program: 57694
Project: 57694
Buggy source:
/** 
 * @param configuration setter, see {@link #configuration}
 */
public void setConfiguration(DataDomainConfiguration configuration){
  this.configuration=configuration;
}

Fixed version (ground truth):
/** 
 * @param configuration setter, see  {@link #configuration}
 */
public void setConfiguration(DataDomainConfiguration configuration){
  this.configuration=configuration;
}
Program: 57695
Project: 57695
Buggy source:
void calculateSimilarity(){
  for (int vaIndex=group.getStartIndex(); vaIndex < group.getStartIndex() + group.getSize(); vaIndex++) {
    Integer id=va1.get(vaIndex);
    Integer origianlID=id;
    if (va1.getIdType() != va2.getIdType()) {
      IDMappingManager idMappingManager=IDMappingManagerRegistry.get().getIDMappingManager(va1.getIdType().getIDCategory());
      id=idMappingManager.getID(va1.getIdType(),va2.getIdType(),id);
    }
    List<Group> groups2=va2.getGroupOf(id);
    if (groups2.size() > 1) {
      System.out.println("String_Node_Str" + groups2.size());
    }
    for (    Group group2 : groups2) {
      scores[group2.getGroupIndex()]+=1;
      if (createSimilarityVAs) {
        similarityVAs.get(group2.getGroupIndex()).append(id);
      }
    }
  }
  int sum=0;
  similarities=new float[scores.length];
  for (int count=0; count < scores.length; count++) {
    sum+=scores[count];
    similarities[count]=((float)scores[count]) / group.getSize();
  }
  if (sum != group.getSize()) {
    System.out.println("String_Node_Str" + sum + "String_Node_Str"+ group.getSize());
  }
}

Fixed version (ground truth):
void calculateSimilarity(){
  for (int vaIndex=group.getStartIndex(); vaIndex < group.getStartIndex() + group.getSize(); vaIndex++) {
    Integer id=va1.get(vaIndex);
    if (va1.getIdType() != va2.getIdType()) {
      IDMappingManager idMappingManager=IDMappingManagerRegistry.get().getIDMappingManager(va1.getIdType().getIDCategory());
      Set<Integer> ids=idMappingManager.getIDAsSet(va1.getIdType(),va2.getIdType(),id);
      id=ids.iterator().next();
      if (ids.size() > 2) {
        System.out.println("String_Node_Str");
      }
    }
    List<Group> groups2=va2.getGroupOf(id);
    if (groups2.size() > 1) {
      System.out.println("String_Node_Str" + groups2.size());
    }
    for (    Group group2 : groups2) {
      scores[group2.getGroupIndex()]+=1;
      if (createSimilarityVAs) {
        similarityVAs.get(group2.getGroupIndex()).append(id);
      }
    }
  }
  int sum=0;
  similarities=new float[scores.length];
  for (int count=0; count < scores.length; count++) {
    sum+=scores[count];
    similarities[count]=((float)scores[count]) / group.getSize();
  }
  if (sum != group.getSize()) {
    System.out.println("String_Node_Str" + sum + "String_Node_Str"+ group.getSize());
  }
}
Program: 57698
Project: 57698
Buggy source:
void calculateSimilarity(){
  for (int vaIndex=group.getStartIndex(); vaIndex < group.getStartIndex() + group.getSize(); vaIndex++) {
    Integer id=va1.get(vaIndex);
    if (va1.getIdType() != va2.getIdType()) {
      IDMappingManager idMappingManager=IDMappingManagerRegistry.get().getIDMappingManager(va1.getIdType().getIDCategory());
      Set<Integer> ids=idMappingManager.getIDAsSet(va1.getIdType(),va2.getIdType(),id);
      id=ids.iterator().next();
      if (ids.size() > 2) {
        System.out.println("String_Node_Str");
      }
    }
    List<Group> groups2=va2.getGroupOf(id);
    if (groups2.size() > 1) {
      System.out.println("String_Node_Str" + groups2.size());
    }
    for (    Group group2 : groups2) {
      scores[group2.getGroupIndex()]+=1;
      if (createSimilarityVAs) {
        similarityVAs.get(group2.getGroupIndex()).append(id);
      }
    }
  }
  int sum=0;
  similarities=new float[scores.length];
  for (int count=0; count < scores.length; count++) {
    sum+=scores[count];
    similarities[count]=((float)scores[count]) / group.getSize();
  }
  if (sum != group.getSize()) {
    System.out.println("String_Node_Str" + sum + "String_Node_Str"+ group.getSize());
  }
}

Fixed version (ground truth):
void calculateSimilarity(){
  for (int vaIndex=group.getStartIndex(); vaIndex < group.getStartIndex() + group.getSize(); vaIndex++) {
    Integer id=va1.get(vaIndex);
    if (va1.getIdType() != va2.getIdType()) {
      IDMappingManager idMappingManager=IDMappingManagerRegistry.get().getIDMappingManager(va1.getIdType().getIDCategory());
      Set<Integer> ids=idMappingManager.getIDAsSet(va1.getIdType(),va2.getIdType(),id);
      if (ids != null) {
        id=ids.iterator().next();
        if (ids.size() > 2) {
          System.out.println("String_Node_Str");
        }
      }
    }
    List<Group> groups2=va2.getGroupOf(id);
    if (groups2.size() > 1) {
      System.out.println("String_Node_Str" + groups2.size());
    }
    for (    Group group2 : groups2) {
      scores[group2.getGroupIndex()]+=1;
      if (createSimilarityVAs) {
        similarityVAs.get(group2.getGroupIndex()).append(id);
      }
    }
  }
  int sum=0;
  similarities=new float[scores.length];
  for (int count=0; count < scores.length; count++) {
    sum+=scores[count];
    similarities[count]=((float)scores[count]) / group.getSize();
  }
  if (sum != group.getSize()) {
    System.out.println("String_Node_Str" + sum + "String_Node_Str"+ group.getSize());
  }
}
Program: 57699
Project: 57699
Buggy source:
protected void renderLabel(GL2 gl,Vec3f centerPoint){
  PixelGLConverter pixelGLConverter=view.getPixelGLConverter();
  CaleydoTextRenderer textRenderer=view.getTextRenderer();
  float height=pixelGLConverter.getGLHeightForPixelHeight(14);
  float requiredWidth=textRenderer.getRequiredTextWidth(label,height);
  textRenderer.renderTextInBounds(gl,label,centerPoint.x() - (requiredWidth / 2.0f),centerPoint.y() - (height / 2.0f),centerPoint.z() + 0.1f,requiredWidth,height);
}

Fixed version (ground truth):
protected void renderLabel(GL2 gl,Vec3f centerPoint){
  PixelGLConverter pixelGLConverter=view.getPixelGLConverter();
  CaleydoTextRenderer textRenderer=view.getTextRenderer();
  float height=pixelGLConverter.getGLHeightForPixelHeight(14);
  float requiredWidth=textRenderer.getRequiredTextWidth(label,height);
  textRenderer.renderTextInBounds(gl,label,centerPoint.x() - (requiredWidth / 2.0f),centerPoint.y() - (height / 2.0f),centerPoint.z() + 0.1f,requiredWidth + pixelGLConverter.getGLWidthForPixelWidth(1),height);
}
Program: 57703
Project: 57703
Buggy source:
/** 
 * Constructor
 * @param color the color of the connection band
 */
public RelationshipRenderer(float[] color){
  this.color=color;
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param color the color of the connection band
 */
public RelationshipRenderer(float[] color,GLLinearizedPathway view){
  this.color=color;
  this.view=view;
}
Program: 57704
Project: 57704
Buggy source:
/** 
 * Renders a connection band based on the provided coordinates 
 */
public void render(GL2 gl){
  if (connectionBandRenderer == null) {
    init(gl);
  }
  float lineWidthCompensation=0.005f;
  topRight[0]=topRightLayout.getTranslateX();
  topRight[1]=topRightLayout.getTranslateY() + topRightLayout.getSizeScaledY() - lineWidthCompensation;
  bottomRight[0]=bottomRightLayout.getTranslateX();
  bottomRight[1]=bottomRightLayout.getTranslateY() + lineWidthCompensation;
  connectionBandRenderer.renderSingleBand(gl,topLeft,bottomLeft,topRight,bottomRight,false,0.07f,0,color);
}

Fixed version (ground truth):
/** 
 * Renders a connection band based on the provided coordinates 
 */
public void render(GL2 gl){
  if (connectionBandRenderer == null) {
    init(gl);
  }
  float lineWidthCompensation=0.005f;
  topRight[0]=topRightLayout.getTranslateX();
  topRight[1]=topRightLayout.getTranslateY() + topRightLayout.getSizeScaledY() - lineWidthCompensation;
  bottomRight[0]=bottomRightLayout.getTranslateX();
  bottomRight[1]=bottomRightLayout.getTranslateY() + lineWidthCompensation;
  float xOffset=view.getPixelGLConverter().getGLWidthForPixelWidth(20);
  connectionBandRenderer.renderSingleBand(gl,topLeft,bottomLeft,topRight,bottomRight,false,xOffset,0,color);
}
Program: 57705
Project: 57705
Buggy source:
private void registerPickingListener(){
  groupPickingListener=new APickingListener(){
    @Override public void clicked(    Pick pick){
      parent.sampleGroupSelectionManager.clearSelection(SelectionType.SELECTION);
      parent.sampleGroupSelectionManager.addToType(SelectionType.SELECTION,pick.getObjectID());
      parent.sampleGroupSelectionManager.triggerSelectionUpdateEvent();
      parent.sampleSelectionManager.clearSelection(SelectionType.SELECTION);
      parent.sampleSelectionManager.addToType(SelectionType.SELECTION,samplePerspective.getIdType(),samplePerspective.getVirtualArray().getIDs());
      parent.sampleGroupSelectionManager.triggerSelectionUpdateEvent();
      parentView.setDisplayListDirty();
    }
    @Override public void mouseOver(    Pick pick){
      parent.sampleGroupSelectionManager.addToType(SelectionType.MOUSE_OVER,pick.getObjectID());
      parent.sampleGroupSelectionManager.triggerSelectionUpdateEvent();
      parentView.setDisplayListDirty();
    }
    @Override public void mouseOut(    Pick pick){
      parent.sampleGroupSelectionManager.removeFromType(SelectionType.MOUSE_OVER,pick.getObjectID());
      parent.sampleGroupSelectionManager.triggerSelectionUpdateEvent();
      parentView.setDisplayListDirty();
    }
  }
;
  parentView.addIDPickingListener(groupPickingListener,PickingType.SAMPLE_GROUP.name(),group.getID());
}

Fixed version (ground truth):
private void registerPickingListener(){
  groupPickingListener=new APickingListener(){
    @Override public void clicked(    Pick pick){
      parent.sampleGroupSelectionManager.clearSelection(SelectionType.SELECTION);
      parent.sampleGroupSelectionManager.addToType(SelectionType.SELECTION,pick.getObjectID());
      parent.sampleGroupSelectionManager.triggerSelectionUpdateEvent();
      parent.sampleSelectionManager.clearSelection(SelectionType.SELECTION);
      parent.sampleSelectionManager.addToType(SelectionType.SELECTION,samplePerspective.getIdType(),samplePerspective.getVirtualArray().getIDs());
      parent.sampleSelectionManager.triggerSelectionUpdateEvent();
      parentView.setDisplayListDirty();
    }
    @Override public void mouseOver(    Pick pick){
      parent.sampleGroupSelectionManager.addToType(SelectionType.MOUSE_OVER,pick.getObjectID());
      parent.sampleGroupSelectionManager.triggerSelectionUpdateEvent();
      parentView.setDisplayListDirty();
    }
    @Override public void mouseOut(    Pick pick){
      parent.sampleGroupSelectionManager.removeFromType(SelectionType.MOUSE_OVER,pick.getObjectID());
      parent.sampleGroupSelectionManager.triggerSelectionUpdateEvent();
      parentView.setDisplayListDirty();
    }
  }
;
  parentView.addIDPickingListener(groupPickingListener,PickingType.SAMPLE_GROUP.name(),group.getID());
}
Program: 57706
Project: 57706
Buggy source:
@Override public void clicked(Pick pick){
  parent.sampleGroupSelectionManager.clearSelection(SelectionType.SELECTION);
  parent.sampleGroupSelectionManager.addToType(SelectionType.SELECTION,pick.getObjectID());
  parent.sampleGroupSelectionManager.triggerSelectionUpdateEvent();
  parent.sampleSelectionManager.clearSelection(SelectionType.SELECTION);
  parent.sampleSelectionManager.addToType(SelectionType.SELECTION,samplePerspective.getIdType(),samplePerspective.getVirtualArray().getIDs());
  parent.sampleGroupSelectionManager.triggerSelectionUpdateEvent();
  parentView.setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void clicked(Pick pick){
  parent.sampleGroupSelectionManager.clearSelection(SelectionType.SELECTION);
  parent.sampleGroupSelectionManager.addToType(SelectionType.SELECTION,pick.getObjectID());
  parent.sampleGroupSelectionManager.triggerSelectionUpdateEvent();
  parent.sampleSelectionManager.clearSelection(SelectionType.SELECTION);
  parent.sampleSelectionManager.addToType(SelectionType.SELECTION,samplePerspective.getIdType(),samplePerspective.getVirtualArray().getIDs());
  parent.sampleSelectionManager.triggerSelectionUpdateEvent();
  parentView.setDisplayListDirty();
}
Program: 57707
Project: 57707
Buggy source:
@Override public void addDataContainers(List<DataContainer> newDataContainers){
  mappedDataRenderer.addDataContainers(newDataContainers);
  for (  ALinearizableNode node : linearizedNodes) {
    setMappedDavidIds(node);
  }
  for (  ANode node : branchNodes) {
    if (node instanceof ALinearizableNode) {
      setMappedDavidIds((ALinearizableNode)node);
      ((ALinearizableNode)node).update();
    }
  }
  setMappedDataRendererGeometry();
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void addDataContainers(List<DataContainer> newDataContainers){
  mappedDataRenderer.addDataContainers(newDataContainers);
  for (  ALinearizableNode node : linearizedNodes) {
    setMappedDavidIds(node);
  }
  for (  ANode node : branchNodes) {
    if (node instanceof ALinearizableNode) {
      setMappedDavidIds((ALinearizableNode)node);
      ((ALinearizableNode)node).update();
    }
  }
  for (  DataContainer dataContainer : newDataContainers) {
    dataDomains.add(dataContainer.getDataDomain());
  }
  setMappedDataRendererGeometry();
  DataContainersChangedEvent event=new DataContainersChangedEvent(this);
  event.setSender(this);
  GeneralManager.get().getEventPublisher().triggerEvent(event);
  setDisplayListDirty();
}
Program: 57708
Project: 57708
Buggy source:
@Override public void addDataContainer(DataContainer newDataContainer){
  mappedDataRenderer.addDataContainer(newDataContainer);
  for (  ALinearizableNode node : linearizedNodes) {
    setMappedDavidIds(node);
  }
  for (  ANode node : branchNodes) {
    if (node instanceof ALinearizableNode) {
      setMappedDavidIds((ALinearizableNode)node);
      ((ALinearizableNode)node).update();
    }
  }
  setMappedDataRendererGeometry();
  setDisplayListDirty();
}

Fixed version (ground truth):
@Override public void addDataContainer(DataContainer newDataContainer){
  mappedDataRenderer.addDataContainer(newDataContainer);
  for (  ALinearizableNode node : linearizedNodes) {
    setMappedDavidIds(node);
  }
  for (  ANode node : branchNodes) {
    if (node instanceof ALinearizableNode) {
      setMappedDavidIds((ALinearizableNode)node);
      ((ALinearizableNode)node).update();
    }
  }
  dataDomains.add(newDataContainer.getDataDomain());
  setMappedDataRendererGeometry();
  setDisplayListDirty();
}