nus-yam/ex-repair huggingface dataset:
Program: 56975
Project: 56975
Buggy source:
/** 
 * Creates the   {@link #previewTable} according to the {@link #dataMatrix}.
 */
@Override public void createTableFromMatrix(List<List<String>> dataMatrix,int numColumns){
  if (dataMatrix == null || dataMatrix.isEmpty())   return;
  columnSelectionStatus=new ArrayList<>(numColumns);
  for (int i=0; i < numColumns; i++) {
    columnSelectionStatus.add(true);
  }
  bodyDataProvider=new MatrixBasedBodyDataProvider(dataMatrix,numColumns);
  buildTable(bodyDataProvider,new ColumnHeaderDataProvider(numColumns),new LineNumberRowHeaderDataProvider(dataMatrix.size()));
}

Fixed version (ground truth):
/** 
 * Creates the   {@link #previewTable} according to the {@link #dataMatrix}.
 */
@Override public void createTableFromMatrix(List<List<String>> dataMatrix,int numColumns){
  if (dataMatrix == null || dataMatrix.isEmpty())   return;
  columnSelectionStatus=new ArrayList<>(numColumns);
  for (int i=0; i < numColumns; i++) {
    columnSelectionStatus.add(true);
  }
  bodyDataProvider.setDataMatrix(dataMatrix);
  bodyDataProvider.setNumColumns(numColumns);
  columnHeaderDataProvider.setNumColumns(numColumns);
  rowHeaderDataProvider.setNumRows(dataMatrix.size());
  table.refresh();
}
Program: 56976
Project: 56976
Buggy source:
@Override public void pageChanged(PageChangedEvent event){
  if (isActive && event.getSelectedPage() == getNextPage()) {
    fillDataSetDescription();
    getWizard().addVisitedPage(this);
  }
  if (event.getSelectedPage() == this) {
    isActive=true;
    pageActivated();
  }
 else {
    isActive=false;
  }
}

Fixed version (ground truth):
@Override public void pageChanged(PageChangedEvent event){
  if (isActive && event.getSelectedPage() == getNextPage()) {
    fillDataSetDescription();
    getWizard().addVisitedPage(this);
  }
  if (event.getSelectedPage() == this) {
    isActive=true;
    pageActivated();
    Point currentSize=parent.getSize();
    Point computedSize=parent.computeSize(SWT.DEFAULT,SWT.DEFAULT);
    Point minSize=null;
    if (currentSize.x >= computedSize.x && currentSize.y >= computedSize.y) {
      minSize=currentSize;
    }
 else     if (currentSize.x <= computedSize.x && currentSize.y <= computedSize.y) {
      minSize=computedSize;
    }
 else     if (currentSize.x >= computedSize.x && currentSize.y <= computedSize.y) {
      minSize=parent.computeSize(currentSize.x,SWT.DEFAULT);
    }
 else {
      minSize=parent.computeSize(SWT.DEFAULT,currentSize.y);
    }
    scrolledComposite.setMinSize(minSize);
  }
 else {
    isActive=false;
  }
}
Program: 56977
Project: 56977
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  parentComposite=new Composite(parent,SWT.NONE);
  parentComposite.setLayout(new GridLayout(1,false));
  parentComposite.setLayoutData(new GridData(800,600));
  Group group=new Group(parentComposite,SWT.SHADOW_ETCHED_IN);
  group.setText("String_Node_Str");
  group.setLayout(new GridLayout(1,true));
  numericalDataButton=new Button(group,SWT.RADIO);
  numericalDataButton.setText("String_Node_Str");
  numericalDataButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      showNumericalDataWidgets();
    }
  }
);
  categoricalDataButton=new Button(group,SWT.RADIO);
  categoricalDataButton.setText("String_Node_Str");
  categoricalDataButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      showCategoricalDataWidgets();
    }
  }
);
  if (numericalProperties != null) {
    numericalDataButton.setSelection(true);
    showNumericalDataWidgets();
  }
 else {
    categoricalDataButton.setSelection(true);
    showCategoricalDataWidgets();
  }
  return parent;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  parentComposite=new Composite(parent,SWT.NONE);
  parentComposite.setLayout(new GridLayout(1,false));
  parentComposite.setLayoutData(new GridData(800,800));
  Group group=new Group(parentComposite,SWT.SHADOW_ETCHED_IN);
  group.setText("String_Node_Str");
  group.setLayout(new GridLayout(1,true));
  numericalDataButton=new Button(group,SWT.RADIO);
  numericalDataButton.setText("String_Node_Str");
  numericalDataButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      showNumericalDataWidgets();
    }
  }
);
  categoricalDataButton=new Button(group,SWT.RADIO);
  categoricalDataButton.setText("String_Node_Str");
  categoricalDataButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      showCategoricalDataWidgets();
    }
  }
);
  if (numericalProperties != null) {
    numericalDataButton.setSelection(true);
    showNumericalDataWidgets();
  }
 else {
    categoricalDataButton.setSelection(true);
    showCategoricalDataWidgets();
  }
  return parent;
}
Program: 56978
Project: 56978
Buggy source:
/** 
 * adds a snapshot of the given column including a separator and a rank column
 * @param model
 */
public void addSnapshot(ARankColumnModel model){
  add(new OrderColumn());
  for (  ARankColumnModel col : config.createAutoSnapshotColumns(this,model))   add(col);
  if (model != null)   add(model.clone());
}

Fixed version (ground truth):
/** 
 * adds a snapshot of the given column including a separator and a rank column
 * @param model
 */
public void addSnapshot(ARankColumnModel model){
  add(new OrderColumn());
  for (  ARankColumnModel col : config.createAutoSnapshotColumns(this,model))   add(col);
  if (model != null) {
    ARankColumnModel clone=model.clone();
    add(clone);
    if (clone instanceof IRankableColumnMixin)     ((IRankableColumnMixin)clone).orderByMe();
  }
}
Program: 56980
Project: 56980
Buggy source:
protected void setFilter(Collection<CATEGORY_TYPE> filter,boolean isGlobalFilter){
  invalidAllFilter();
  Set<CATEGORY_TYPE> bak=new HashSet<>(this.selection);
  this.selection.clear();
  this.selection.addAll(filter);
  if (Sets.difference(bak,this.selection).isEmpty()) {
    setGlobalFilter(isGlobalFilter);
  }
 else {
    this.isGlobalFilter=isGlobalFilter;
    propertySupport.firePropertyChange(PROP_FILTER,bak,this.selection);
  }
}

Fixed version (ground truth):
protected void setFilter(Collection<CATEGORY_TYPE> filter,boolean isGlobalFilter){
  invalidAllFilter();
  Set<CATEGORY_TYPE> bak=new HashSet<>(this.selection);
  this.selection.clear();
  this.selection.addAll(filter);
  if (this.selection.equals(bak)) {
    setGlobalFilter(isGlobalFilter);
  }
 else {
    this.isGlobalFilter=isGlobalFilter;
    propertySupport.firePropertyChange(PROP_FILTER,bak,this.selection);
  }
}
Program: 56981
Project: 56981
Buggy source:
protected void setFilter(Collection<CATEGORY_TYPE> filter,boolean isGlobalFilter){
  invalidAllFilter();
  Set<CATEGORY_TYPE> bak=new HashSet<>(this.selection);
  this.selection.clear();
  this.selection.addAll(filter);
  if (Sets.difference(bak,this.selection).isEmpty()) {
    setGlobalFilter(isGlobalFilter);
  }
 else {
    this.isGlobalFilter=isGlobalFilter;
    propertySupport.firePropertyChange(PROP_FILTER,bak,this.selection);
  }
}

Fixed version (ground truth):
protected void setFilter(Collection<CATEGORY_TYPE> filter,boolean isGlobalFilter){
  invalidAllFilter();
  Set<CATEGORY_TYPE> bak=new HashSet<>(this.selection);
  this.selection.clear();
  this.selection.addAll(filter);
  if (this.selection.equals(bak)) {
    setGlobalFilter(isGlobalFilter);
  }
 else {
    this.isGlobalFilter=isGlobalFilter;
    propertySupport.firePropertyChange(PROP_FILTER,bak,this.selection);
  }
}
Program: 56982
Project: 56982
Buggy source:
/** 
 */
public NumericalDataPropertiesWidget(Composite parent,Listener listener){
  this.parent=parent;
  createScalingGroup(parent);
  createClippingGroup(parent,listener);
  createDataCenterGroup(parent,listener);
}

Fixed version (ground truth):
/** 
 */
public NumericalDataPropertiesWidget(Composite parent,Listener listener){
  this.parent=parent;
  createDataTypeGroup(parent);
  createScalingGroup(parent);
  createClippingGroup(parent,listener);
  createDataCenterGroup(parent,listener);
}
Program: 56983
Project: 56983
Buggy source:
private void createScalingGroup(Composite parent){
  scalingGroup=new Group(parent,SWT.SHADOW_ETCHED_IN);
  scalingGroup.setText("String_Node_Str");
  scalingGroup.setLayout(new GridLayout(2,false));
  scalingGroup.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false));
  Label scalingExplanationLabel=new Label(scalingGroup,SWT.WRAP);
  scalingExplanationLabel.setText("String_Node_Str");
  GridData gridData=new GridData(SWT.FILL,SWT.FILL,true,true,2,1);
  gridData.widthHint=200;
  scalingExplanationLabel.setLayoutData(gridData);
  Label scalingMethodLabel=new Label(scalingGroup,SWT.NONE);
  scalingMethodLabel.setText("String_Node_Str");
  scalingCombo=new Combo(scalingGroup,SWT.DROP_DOWN | SWT.READ_ONLY);
  gridData=new GridData();
  gridData.widthHint=100;
  scalingCombo.setLayoutData(gridData);
  String[] scalingOptions={"String_Node_Str","String_Node_Str","String_Node_Str"};
  scalingCombo.setItems(scalingOptions);
  scalingCombo.setEnabled(true);
  scalingCombo.select(0);
}

Fixed version (ground truth):
private void createScalingGroup(Composite parent){
  scalingGroup=new Group(parent,SWT.SHADOW_ETCHED_IN);
  scalingGroup.setText("String_Node_Str");
  scalingGroup.setLayout(new GridLayout(2,false));
  scalingGroup.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false));
  Label scalingExplanationLabel=new Label(scalingGroup,SWT.WRAP);
  scalingExplanationLabel.setText("String_Node_Str");
  GridData gridData=new GridData(SWT.FILL,SWT.FILL,true,true,2,1);
  gridData.widthHint=200;
  scalingExplanationLabel.setLayoutData(gridData);
  Label scalingMethodLabel=new Label(scalingGroup,SWT.NONE);
  scalingMethodLabel.setText("String_Node_Str");
  scalingCombo=new Combo(scalingGroup,SWT.DROP_DOWN | SWT.READ_ONLY);
  gridData=new GridData();
  gridData.widthHint=120;
  scalingCombo.setLayoutData(gridData);
  String[] scalingOptions={"String_Node_Str","String_Node_Str","String_Node_Str"};
  scalingCombo.setItems(scalingOptions);
  scalingCombo.setEnabled(true);
  scalingCombo.select(0);
}
Program: 56984
Project: 56984
Buggy source:
public void dispose(){
  dataCenterGroup.dispose();
  clippingGroup.dispose();
  scalingGroup.dispose();
}

Fixed version (ground truth):
public void dispose(){
  dataTypeGroup.dispose();
  dataCenterGroup.dispose();
  clippingGroup.dispose();
  scalingGroup.dispose();
}
Program: 56985
Project: 56985
Buggy source:
private void showCategoricalDataWidgets(){
  if (numericalDataPropertiesWidget != null) {
    numericalProperties=numericalDataPropertiesWidget.getNumericalProperties();
    numericalDataPropertiesWidget.dispose();
    parentComposite.layout(true);
    numericalDataPropertiesWidget=null;
  }
  if (categoricalDataPropertiesWidget == null) {
    categoricalDataPropertiesWidget=new CategoricalDataPropertiesWidget(parentComposite);
    if (categoricalClassDescription == null) {
      categoricalDataPropertiesWidget.updateCategories(datasetMatrix,columnIndex);
    }
 else {
      categoricalDataPropertiesWidget.updateCategories(datasetMatrix,columnIndex,categoricalClassDescription);
    }
    parentComposite.layout(true);
  }
}

Fixed version (ground truth):
private void showCategoricalDataWidgets(){
  if (numericalDataPropertiesWidget != null) {
    dataType=numericalDataPropertiesWidget.getDataType();
    numericalProperties=numericalDataPropertiesWidget.getNumericalProperties();
    numericalDataPropertiesWidget.dispose();
    parentComposite.layout(true);
    numericalDataPropertiesWidget=null;
  }
  if (categoricalDataPropertiesWidget == null) {
    categoricalDataPropertiesWidget=new CategoricalDataPropertiesWidget(parentComposite);
    if (categoricalClassDescription == null) {
      categoricalDataPropertiesWidget.updateCategories(datasetMatrix,columnIndex);
    }
 else {
      categoricalDataPropertiesWidget.updateCategories(datasetMatrix,columnIndex,categoricalClassDescription);
    }
    parentComposite.layout(true);
  }
}
Program: 56986
Project: 56986
Buggy source:
private void showNumericalDataWidgets(){
  if (categoricalDataPropertiesWidget != null) {
    categoricalClassDescription=categoricalDataPropertiesWidget.getCategoricalClassDescription();
    categoricalDataPropertiesWidget.dispose();
    parentComposite.layout(true);
    categoricalDataPropertiesWidget=null;
  }
  if (numericalDataPropertiesWidget == null) {
    numericalDataButton.setSelection(true);
    numericalDataPropertiesWidget=new NumericalDataPropertiesWidget(parentComposite,this);
    if (numericalProperties != null) {
      numericalDataPropertiesWidget.updateNumericalProperties(numericalProperties);
    }
    parentComposite.layout(true);
  }
}

Fixed version (ground truth):
private void showNumericalDataWidgets(){
  if (categoricalDataPropertiesWidget != null) {
    categoricalClassDescription=categoricalDataPropertiesWidget.getCategoricalClassDescription();
    categoricalDataPropertiesWidget.dispose();
    parentComposite.layout(true);
    categoricalDataPropertiesWidget=null;
  }
  if (numericalDataPropertiesWidget == null) {
    numericalDataButton.setSelection(true);
    numericalDataPropertiesWidget=new NumericalDataPropertiesWidget(parentComposite,this);
    if (numericalProperties != null) {
      numericalDataPropertiesWidget.updateNumericalProperties(numericalProperties);
      numericalDataPropertiesWidget.setDataType(dataType);
    }
    parentComposite.layout(true);
  }
}
Program: 56987
Project: 56987
Buggy source:
@Override protected void okPressed(){
  if (numericalDataButton.getSelection()) {
    isNumericalData=true;
    numericalProperties=numericalDataPropertiesWidget.getNumericalProperties();
    categoricalClassDescription=null;
  }
 else {
    isNumericalData=false;
    categoricalClassDescription=categoricalDataPropertiesWidget.getCategoricalClassDescription();
    numericalProperties=null;
  }
  super.okPressed();
}

Fixed version (ground truth):
@Override protected void okPressed(){
  if (numericalDataButton.getSelection()) {
    isNumericalData=true;
    dataType=numericalDataPropertiesWidget.getDataType();
    numericalProperties=numericalDataPropertiesWidget.getNumericalProperties();
    categoricalClassDescription=null;
  }
 else {
    isNumericalData=false;
    categoricalClassDescription=categoricalDataPropertiesWidget.getCategoricalClassDescription();
    numericalProperties=null;
  }
  super.okPressed();
}
Program: 56988
Project: 56988
Buggy source:
@SuppressWarnings("String_Node_Str") private void defineColumnProperties(int columnIndex){
  List<ColumnDescription> columnDescriptions=dataSetDescription.getOrCreateParsingPattern();
  ColumnDescription columnDescription=columnDescriptions.get(columnIndex);
  DataImportWizard wizard=getWizard();
  ColumnDataPropertiesDialog dialog;
  if (columnDescription.getDataDescription().getCategoricalClassDescription() != null) {
    dialog=new ColumnDataPropertiesDialog(getShell(),(CategoricalClassDescription<String>)columnDescription.getDataDescription().getCategoricalClassDescription(),wizard.getFilteredDataMatrix(),columnIndex);
  }
 else {
    dialog=new ColumnDataPropertiesDialog(getShell(),columnDescription.getDataDescription().getNumericalProperties(),wizard.getFilteredDataMatrix(),columnIndex);
  }
  int status=dialog.open();
  if (status == Window.OK) {
    if (dialog.isNumericalData()) {
      NumericalProperties numericalProperties=dialog.getNumericalProperties();
      columnDescription.setDataDescription(new DataDescription(EDataClass.REAL_NUMBER,EDataType.FLOAT,numericalProperties));
    }
 else {
      CategoricalClassDescription<String> categoricalClassDescription=dialog.getCategoricalClassDescription();
      columnDescription.setDataDescription(new DataDescription(EDataClass.CATEGORICAL,EDataType.STRING,categoricalClassDescription));
    }
    table.update();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void defineColumnProperties(int columnIndex){
  List<ColumnDescription> columnDescriptions=dataSetDescription.getOrCreateParsingPattern();
  ColumnDescription columnDescription=columnDescriptions.get(columnIndex);
  DataImportWizard wizard=getWizard();
  ColumnDataPropertiesDialog dialog;
  if (columnDescription.getDataDescription().getCategoricalClassDescription() != null) {
    dialog=new ColumnDataPropertiesDialog(getShell(),(CategoricalClassDescription<String>)columnDescription.getDataDescription().getCategoricalClassDescription(),wizard.getFilteredDataMatrix(),columnIndex);
  }
 else {
    dialog=new ColumnDataPropertiesDialog(getShell(),columnDescription.getDataDescription().getNumericalProperties(),columnDescription.getDataDescription().getRawDataType(),wizard.getFilteredDataMatrix(),columnIndex);
  }
  int status=dialog.open();
  if (status == Window.OK) {
    if (dialog.isNumericalData()) {
      NumericalProperties numericalProperties=dialog.getNumericalProperties();
      EDataType dataType=dialog.getDataType();
      columnDescription.setDataDescription(new DataDescription(dataType == EDataType.FLOAT ? EDataClass.REAL_NUMBER : EDataClass.NATURAL_NUMBER,dataType,numericalProperties));
    }
 else {
      CategoricalClassDescription<String> categoricalClassDescription=dialog.getCategoricalClassDescription();
      columnDescription.setDataDescription(new DataDescription(EDataClass.CATEGORICAL,EDataType.STRING,categoricalClassDescription));
    }
    table.update();
  }
}
Program: 56989
Project: 56989
Buggy source:
@Override public void pageActivated(){
  if (initFromDataDescription) {
    numericalDataPropertiesWidget.updateNumericalProperties(dataSetDescription.getDataDescription().getNumericalProperties());
    initFromDataDescription=false;
  }
  getWizard().setChosenDataTypePage(this);
  getWizard().getContainer().updateButtons();
  dataTranspositionWidget.update();
}

Fixed version (ground truth):
@Override public void pageActivated(){
  if (initFromDataDescription) {
    numericalDataPropertiesWidget.updateNumericalProperties(dataSetDescription.getDataDescription().getNumericalProperties());
    numericalDataPropertiesWidget.setDataType(dataSetDescription.getDataDescription().getRawDataType());
    initFromDataDescription=false;
  }
  getWizard().setChosenDataTypePage(this);
  getWizard().getContainer().updateButtons();
  dataTranspositionWidget.update();
}
Program: 56990
Project: 56990
Buggy source:
@Override public void fillDataSetDescription(){
  DataDescription dataDescription=new DataDescription(EDataClass.REAL_NUMBER,EDataType.FLOAT,numericalDataPropertiesWidget.getNumericalProperties());
  dataSetDescription.setDataDescription(dataDescription);
  dataSetDescription.setTransposeMatrix(dataTranspositionWidget.isTransposition());
  ArrayList<ColumnDescription> inputPattern=new ArrayList<ColumnDescription>();
  DataImportWizard wizard=getWizard();
  for (  Integer selected : wizard.getSelectedColumns()) {
    int columnIndex=selected.intValue();
    if (columnIndex == dataSetDescription.getColumnOfRowIds())     continue;
    inputPattern.add(new ColumnDescription(columnIndex,dataDescription));
  }
  dataSetDescription.setParsingPattern(inputPattern);
}

Fixed version (ground truth):
@Override public void fillDataSetDescription(){
  EDataType dataType=numericalDataPropertiesWidget.getDataType();
  DataDescription dataDescription=new DataDescription(dataType == EDataType.FLOAT ? EDataClass.REAL_NUMBER : EDataClass.NATURAL_NUMBER,dataType,numericalDataPropertiesWidget.getNumericalProperties());
  dataSetDescription.setDataDescription(dataDescription);
  dataSetDescription.setTransposeMatrix(dataTranspositionWidget.isTransposition());
  ArrayList<ColumnDescription> inputPattern=new ArrayList<ColumnDescription>();
  DataImportWizard wizard=getWizard();
  for (  Integer selected : wizard.getSelectedColumns()) {
    int columnIndex=selected.intValue();
    if (columnIndex == dataSetDescription.getColumnOfRowIds())     continue;
    inputPattern.add(new ColumnDescription(columnIndex,dataDescription));
  }
  dataSetDescription.setParsingPattern(inputPattern);
}
Program: 56991
Project: 56991
Buggy source:
protected void onOpenFile(){
  FileDialog fileDialog=new FileDialog(new Shell());
  fileDialog.setText("String_Node_Str");
  String[] filterExt={"String_Node_Str","String_Node_Str"};
  fileDialog.setFilterExtensions(filterExt);
  String inputFileName=fileDialog.open().trim();
  if (inputFileName == null)   return;
  label.setText(inputFileName);
  callback.on(inputFileName);
}

Fixed version (ground truth):
protected void onOpenFile(){
  FileDialog fileDialog=new FileDialog(new Shell());
  fileDialog.setText("String_Node_Str");
  String[] filterExt={"String_Node_Str","String_Node_Str"};
  fileDialog.setFilterExtensions(filterExt);
  String inputFileName=fileDialog.open();
  if (inputFileName == null)   return;
  inputFileName=inputFileName.trim();
  label.setText(inputFileName);
  callback.on(inputFileName);
}
Program: 56992
Project: 56992
Buggy source:
/** 
 * @param columns
 */
public void addTemplateColumns(List<Object> columns){
  if (wizardElement == null)   return;
  if (previewIndex < 0)   columns.add(0,wizardElement);
 else {
    int index=previewIndex - stratomex.getBrickColumnManager().getCenterColumnStartIndex();
    columns.add(index + 1,wizardElement);
  }
}

Fixed version (ground truth):
/** 
 * @param columns
 */
public void addTemplateColumns(List<Object> columns){
  if (wizardElement == null)   return;
  if (previewIndex < 0)   columns.add(0,wizardElement);
 else {
    int index=previewIndex - stratomex.getBrickColumnManager().getCenterColumnStartIndex();
    index=Math.min(index + 1,columns.size());
    columns.add(index,wizardElement);
  }
}
Program: 56993
Project: 56993
Buggy source:
@SuppressWarnings("String_Node_Str") @ListenTo(sendToMe=true) private void onExtraInitialScoreQueryReady(ExtraInitialScoreQueryReadyEvent event){
  getPopupLayer().hide(waiting);
  for (  Pair<ADataDomainQuery,List<AScoreRow>> pair : event.getExtras()) {
    ADataDomainQuery q=pair.getFirst();
    System.out.println("String_Node_Str" + q.getDataDomain().getLabel());
    int offset=table.getDataSize();
    table.addData(pair.getSecond());
    List<?> m=table.getDataModifiable();
    q.addData(offset,new CustomSubList<AScoreRow>((List<AScoreRow>)m,offset,m.size() - offset));
  }
  updateMask();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @ListenTo(sendToMe=true) private void onExtraInitialScoreQueryReady(ExtraInitialScoreQueryReadyEvent event){
  getPopupLayer().hide(waiting);
  for (  Pair<ADataDomainQuery,List<AScoreRow>> pair : event.getExtras()) {
    ADataDomainQuery q=pair.getFirst();
    System.out.println("String_Node_Str" + q.getDataDomain().getLabel());
    int offset=table.getDataSize();
    table.addData(pair.getSecond());
    List<?> m=table.getDataModifiable();
    q.addData(offset,new CustomSubList<AScoreRow>((List<AScoreRow>)m,offset,m.size() - offset));
  }
  invalidVisibleScores();
  updateMask();
}
Program: 56994
Project: 56994
Buggy source:
@SuppressWarnings("String_Node_Str") @ListenTo(sendToMe=true) private void onInitialScoreQueryReady(InitialScoreQueryReadyEvent event){
  getPopupLayer().hide(waiting);
  int offset=table.getDataSize();
  ADataDomainQuery q=event.getNewQuery();
  System.out.println("String_Node_Str" + q.getDataDomain().getLabel());
  table.addData(q.getOrCreate());
  List<?> m=table.getDataModifiable();
  q.init(offset,new CustomSubList<AScoreRow>((List<AScoreRow>)m,offset,m.size() - offset));
  q.createSpecificColumns(table);
  updateMask();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @ListenTo(sendToMe=true) private void onInitialScoreQueryReady(InitialScoreQueryReadyEvent event){
  getPopupLayer().hide(waiting);
  int offset=table.getDataSize();
  ADataDomainQuery q=event.getNewQuery();
  System.out.println("String_Node_Str" + q.getDataDomain().getLabel());
  table.addData(q.getOrCreate());
  List<?> m=table.getDataModifiable();
  q.init(offset,new CustomSubList<AScoreRow>((List<AScoreRow>)m,offset,m.size() - offset));
  q.createSpecificColumns(table);
  invalidVisibleScores();
  updateMask();
}
Program: 56995
Project: 56995
Buggy source:
@ListenTo(sendToMe=true) private void onScoreQueryReady(ScoreQueryReadyEvent event){
  getPopupLayer().hide(waiting);
  if (event.getScores() != null) {
    addColumns(event.getScores(),event.isRemoveLeadingScoreColumns());
  }
 else {
    updateMask();
  }
}

Fixed version (ground truth):
@ListenTo(sendToMe=true) private void onScoreQueryReady(ScoreQueryReadyEvent event){
  getPopupLayer().hide(waiting);
  if (event.getScores() != null) {
    addColumns(event.getScores(),event.isRemoveLeadingScoreColumns());
  }
 else {
    invalidVisibleScores();
    updateMask();
  }
}
Program: 56996
Project: 56996
Buggy source:
@Override public void propertyChange(PropertyChangeEvent evt){
switch (evt.getPropertyName()) {
case RankTableModel.PROP_DATA:
    RankTableModel table=getTable();
  if (table != null) {
    @SuppressWarnings("String_Node_Str") Collection<IRow> news=(Collection<IRow>)evt.getNewValue();
    maskInvalid.set(table.getDataSize() - news.size(),table.getDataSize());
  }
break;
}
}

Fixed version (ground truth):
@Override public void propertyChange(PropertyChangeEvent evt){
switch (evt.getPropertyName()) {
case RankTableModel.PROP_DATA:
    RankTableModel table=getTable();
  if (table != null) {
    @SuppressWarnings("String_Node_Str") Collection<IRow> news=(Collection<IRow>)evt.getNewValue();
    maskInvalid.set(table.getDataSize() - news.size(),table.getDataSize());
  }
 else {
    System.err.println();
  }
break;
}
}
Program: 56997
Project: 56997
Buggy source:
/** 
 * @return the table, see {@link #table}
 */
@Override public RankTableModel getTable(){
  return parent.getTable();
}

Fixed version (ground truth):
/** 
 * @return the table, see {@link #table}
 */
@Override public RankTableModel getTable(){
  return parent == null ? null : parent.getTable();
}
Program: 56998
Project: 56998
Buggy source:
@Override protected boolean filterEntry(IRow row){
  if (filterInferredPercentage >= 1)   return super.filterEntry(row);
  if (!super.filterEntry(row))   return false;
  boolean[] inferreds=isValueInferreds(row);
  boolean any=false;
  for (int i=0; i < inferreds.length; ++i) {
    if (inferreds[i]) {
      any=true;
    }
  }
  if (!any)   return true;
  float[] ws=getWeights();
  float inferPercentage=0;
  for (int i=0; i < inferreds.length; ++i) {
    if (inferreds[i])     inferPercentage+=ws[i];
  }
  return inferPercentage < filterInferredPercentage;
}

Fixed version (ground truth):
@Override protected boolean filterEntry(IRow row){
  if (filterInferredPercentage >= 1)   return super.filterEntry(row);
  if (!super.filterEntry(row)) {
    return false;
  }
  boolean[] inferreds=isValueInferreds(row);
  boolean any=false;
  for (int i=0; i < inferreds.length; ++i) {
    if (inferreds[i]) {
      any=true;
    }
  }
  if (!any)   return true;
  float[] ws=getWeights();
  float inferPercentage=0;
  for (int i=0; i < inferreds.length; ++i) {
    if (inferreds[i])     inferPercentage+=ws[i];
  }
  return inferPercentage < filterInferredPercentage;
}
Program: 57000
Project: 57000
Buggy source:
/** 
 * Calculates the probability of the specified list of ids to belong to this IDType.
 * @param idList
 * @return Probability of affiliation as value from 0 to 1. 0 means that none of the specified ids matched thisIDType, wheras 1 means that all matched this IDType.
 */
public float calcProbabilityOfIDTypeAffiliation(List<String> idList){
  if (idList == null || idList.isEmpty())   return 0;
  IDMappingManager idMappingManager=IDMappingManagerRegistry.get().getIDMappingManager(idCategory);
  int numMatchedIDs=0;
  for (  String currentID : idList) {
    if (getDataType().equals(EDataType.INTEGER)) {
      try {
        Integer idInt=Integer.valueOf(currentID);
        if (idMappingManager.doesElementExist(this,idInt)) {
          numMatchedIDs++;
        }
      }
 catch (      NumberFormatException e) {
      }
    }
 else     if (getDataType().equals(EDataType.INTEGER)) {
      if (idMappingManager.doesElementExist(this,currentID)) {
        numMatchedIDs++;
      }
 else       if (getTypeName().equals("String_Node_Str")) {
        if (currentID.contains("String_Node_Str")) {
          if (idMappingManager.doesElementExist(this,currentID.substring(0,currentID.indexOf("String_Node_Str")))) {
            numMatchedIDs++;
          }
        }
      }
    }
  }
  return (float)numMatchedIDs / (float)idList.size();
}

Fixed version (ground truth):
/** 
 * Calculates the probability of the specified list of ids to belong to this IDType.
 * @param idList
 * @return Probability of affiliation as value from 0 to 1. 0 means that none of the specified ids matched thisIDType, wheras 1 means that all matched this IDType.
 */
public float calcProbabilityOfIDTypeAffiliation(List<String> idList){
  if (idList == null || idList.isEmpty())   return 0;
  IDMappingManager idMappingManager=IDMappingManagerRegistry.get().getIDMappingManager(idCategory);
  int numMatchedIDs=0;
  for (  String currentID : idList) {
    if (getDataType().equals(EDataType.INTEGER)) {
      try {
        Integer idInt=Integer.valueOf(currentID);
        if (idMappingManager.doesElementExist(this,idInt)) {
          numMatchedIDs++;
        }
      }
 catch (      NumberFormatException e) {
      }
    }
 else     if (getDataType().equals(EDataType.STRING)) {
      if (idMappingManager.doesElementExist(this,currentID)) {
        numMatchedIDs++;
      }
 else       if (getTypeName().equals("String_Node_Str")) {
        if (currentID.contains("String_Node_Str")) {
          if (idMappingManager.doesElementExist(this,currentID.substring(0,currentID.indexOf("String_Node_Str")))) {
            numMatchedIDs++;
          }
        }
      }
    }
  }
  return (float)numMatchedIDs / (float)idList.size();
}
Program: 57002
Project: 57002
Buggy source:
public void createDataPreviewTableFromFile(){
  parser.parse(dataSetDescription.getDataSourcePath(),dataSetDescription.getDelimiter(),true,MAX_PREVIEW_TABLE_ROWS);
  dataMatrix=parser.getDataMatrix();
  totalNumberOfColumns=parser.getTotalNumberOfColumns();
  totalNumberOfRows=parser.getTotalNumberOfRows();
  page.previewTable.createTableFromMatrix(dataMatrix,totalNumberOfColumns);
  updateWidgetsAccordingToTableChanges();
  determineIDTypes();
  guessNumberOfHeaderRows();
  page.previewTable.updateTableColors(dataSetDescription.getNumberOfHeaderLines(),dataSetDescription.getRowOfColumnIDs(),dataSetDescription.getColumnOfRowIds());
  page.parentComposite.pack();
}

Fixed version (ground truth):
public void createDataPreviewTableFromFile(){
  parser.parse(dataSetDescription.getDataSourcePath(),dataSetDescription.getDelimiter(),true,-1);
  dataMatrix=parser.getDataMatrix();
  totalNumberOfColumns=parser.getTotalNumberOfColumns();
  totalNumberOfRows=parser.getTotalNumberOfRows();
  page.previewTable.createTableFromMatrix(dataMatrix,totalNumberOfColumns);
  updateWidgetsAccordingToTableChanges();
  determineIDTypes();
  guessNumberOfHeaderRows();
  page.previewTable.updateTableColors(dataSetDescription.getNumberOfHeaderLines(),dataSetDescription.getRowOfColumnIDs(),dataSetDescription.getColumnOfRowIds());
}
Program: 57003
Project: 57003
Buggy source:
private void determineIDTypes(){
  List<String> rowIDList=new ArrayList<String>();
  for (int i=0; i < dataMatrix.size() && i < MAX_CONSIDERED_IDS_FOR_ID_TYPE_DETERMINATION; i++) {
    List<String> row=dataMatrix.get(i);
    rowIDList.add(row.get(dataSetDescription.getColumnOfRowIds()));
  }
  List<String> columnIDList=new ArrayList<String>();
  List<String> idRow=dataMatrix.get(dataSetDescription.getRowOfColumnIDs());
  for (int i=0; i < idRow.size() && i < MAX_CONSIDERED_IDS_FOR_ID_TYPE_DETERMINATION; i++) {
    columnIDList.add(idRow.get(i));
  }
  IDType mostProbableRowIDType=determineMostProbableIDType(rowIDList);
  IDType mostProbableColumnIDType=determineMostProbableIDType(columnIDList);
  setMostProbableIDTypes(mostProbableRowIDType,mostProbableColumnIDType);
}

Fixed version (ground truth):
private void determineIDTypes(){
  IDType mostProbableRowIDType=null;
  IDType mostProbableColumnIDType=null;
  IDSpecification rowIDSpec=dataSetDescription.getRowIDSpecification();
  IDSpecification columnIDSpec=dataSetDescription.getColumnIDSpecification();
  if (rowIDSpec != null) {
    mostProbableRowIDType=IDType.getIDType(rowIDSpec.getIdType());
  }
  if (columnIDSpec != null) {
    mostProbableColumnIDType=IDType.getIDType(columnIDSpec.getIdType());
  }
  List<String> rowIDList=new ArrayList<String>();
  for (int i=0; i < dataMatrix.size() && i < MAX_CONSIDERED_IDS_FOR_ID_TYPE_DETERMINATION; i++) {
    List<String> row=dataMatrix.get(i);
    rowIDList.add(row.get(dataSetDescription.getColumnOfRowIds()));
  }
  List<String> columnIDList=new ArrayList<String>();
  List<String> idRow=dataMatrix.get(dataSetDescription.getRowOfColumnIDs());
  for (int i=0; i < idRow.size() && i < MAX_CONSIDERED_IDS_FOR_ID_TYPE_DETERMINATION; i++) {
    columnIDList.add(idRow.get(i));
  }
  if (mostProbableRowIDType == null)   mostProbableRowIDType=determineMostProbableIDType(rowIDList);
  if (mostProbableColumnIDType == null)   mostProbableColumnIDType=determineMostProbableIDType(columnIDList);
  setMostProbableIDTypes(mostProbableRowIDType,mostProbableColumnIDType);
}
Program: 57004
Project: 57004
Buggy source:
@Override public void fillStateMachine(IStateMachine stateMachine,List<TablePerspective> existing,EWizardMode mode,TablePerspective source){
  IState start=stateMachine.get(IStateMachine.ADD_PATHWAY);
  BrowsePathwayState browse=(BrowsePathwayState)stateMachine.get(IStateMachine.BROWSE_PATHWAY);
  if (!existing.isEmpty() && mode == EWizardMode.GLOBAL) {
    IState target=stateMachine.addState("String_Node_Str",new CreateGSEAState(browse,true));
    stateMachine.addTransition(start,new SimpleTransition(target,"String_Node_Str"));
  }
}

Fixed version (ground truth):
@Override public void fillStateMachine(IStateMachine stateMachine,List<TablePerspective> existing,EWizardMode mode,TablePerspective source){
  IState start=stateMachine.get(IStateMachine.ADD_PATHWAY);
  BrowsePathwayState browse=(BrowsePathwayState)stateMachine.get(IStateMachine.BROWSE_PATHWAY);
  if (!existing.isEmpty() && mode == EWizardMode.GLOBAL && hasGoodOnes(existing)) {
    IState target=stateMachine.addState("String_Node_Str",new CreateGSEAState(browse,true));
    stateMachine.addTransition(start,new SimpleTransition(target,"String_Node_Str"));
  }
}
Program: 57005
Project: 57005
Buggy source:
public void setMatches(String matches){
  if (Objects.equals(matches,this.matches))   return;
  this.matches=matches;
  updateFilter();
}

Fixed version (ground truth):
public void setMatches(String matches){
  if (Objects.equals(matches,this.matches))   return;
  if (matches != null && matches.trim().isEmpty())   matches=null;
  this.matches=matches;
  updateFilter();
}
Program: 57006
Project: 57006
Buggy source:
public TableDataDomainElement(StratificationDataDomainQuery model){
  super(model);
  setHasFilter(true);
}

Fixed version (ground truth):
public TableDataDomainElement(StratificationDataDomainQuery model){
  super(model);
}
Program: 57007
Project: 57007
Buggy source:
private void setFilter(String filter){
  getModel().setMatches(filter);
}

Fixed version (ground truth):
private void setFilter(String filter){
  getModel().setMatches(filter);
  setHasFilter(model.hasFilter());
}
Program: 57008
Project: 57008
Buggy source:
@Override public void preWorkbenchOpen(){
  if (!rFile.inCache()) {
    try {
      new ProgressMonitorDialog(new Shell()).run(true,false,rFile);
    }
 catch (    InvocationTargetException|InterruptedException e) {
      e.printStackTrace();
    }
  }
  super.preWorkbenchOpen();
}

Fixed version (ground truth):
@Override public void preWorkbenchOpen(){
  if (!rFile.inCache(false)) {
    try {
      new ProgressMonitorDialog(new Shell()).run(true,false,rFile);
    }
 catch (    InvocationTargetException|InterruptedException e) {
      e.printStackTrace();
    }
  }
  super.preWorkbenchOpen();
}
Program: 57009
Project: 57009
Buggy source:
/** 
 * @return the caught, see {@link #caught}
 */
public Exception getCaught(){
  return caught;
}

Fixed version (ground truth):
/** 
 * the exception caught during   {@link #run(IProgressMonitor)} or null if none occurred
 * @return the caught, see {@link #caught}
 */
public Exception getCaught(){
  return caught;
}
Program: 57010
Project: 57010
Buggy source:
public static RemoteFile of(URL url){
  return new RemoteFile(url);
}

Fixed version (ground truth):
/** 
 * factory for creating a   {@link RemoteFile}
 * @param url
 * @return
 */
public static RemoteFile of(URL url){
  return new RemoteFile(url);
}
Program: 57012
Project: 57012
Buggy source:
/** 
 * @param local
 * @return
 */
private static String toUnique(String path,String suffix){
  Set<String> values=cacheContents.values();
  String test=(path + suffix).toLowerCase();
  if (!values.contains(test) && !cacheContentsFile.getName().equalsIgnoreCase(suffix))   return path + suffix;
  int next=0;
  do {
    test=(path + (next++) + suffix).toLowerCase();
  }
 while (values.contains(test) || cacheContentsFile.getName().equalsIgnoreCase(suffix));
  return test;
}

Fixed version (ground truth):
/** 
 * converts the given path with the given suffix to a unique derivat that doesn't yet exist
 * @param local
 * @return
 */
private static String toUnique(String path,String suffix){
  Set<String> values=cacheContents.values();
  String test=(path + suffix).toLowerCase();
  if (!values.contains(test) && !cacheContentsFile.getName().equalsIgnoreCase(suffix))   return path + suffix;
  int next=0;
  do {
    test=(path + (next++) + suffix).toLowerCase();
  }
 while (values.contains(test) || cacheContentsFile.getName().equalsIgnoreCase(suffix));
  return test;
}
Program: 57013
Project: 57013
Buggy source:
public MultiScore(String label,Color color,Color bgColor){
  setLabel(label);
  this.color=color;
  this.bgColor=bgColor;
}

Fixed version (ground truth):
public MultiScore(String label,Color color,Color bgColor,int combinedType){
  setLabel(label);
  this.color=color;
  this.bgColor=bgColor;
  this.combinedType=combinedType;
}
Program: 57014
Project: 57014
Buggy source:
@Override public void select(TablePerspective strat,Group group,IReactions reactions){
  AGSEAAlgorithm algorithm;
  if (createGSEA)   algorithm=new GSEAAlgorithm(strat.getRecordPerspective(),group,1.0f);
 else   algorithm=new PGSEAAlgorithm(strat.getRecordPerspective(),group);
  IScore gsea=new GeneSetScore(strat.getRecordPerspective().getLabel(),algorithm,false);
  IScore pValue=new GeneSetScore(gsea.getLabel() + "String_Node_Str",algorithm.asPValue(),true);
  reactions.addScoreToTourGuide(EDataDomainQueryMode.PATHWAYS,gsea,pValue);
  target.setUnderlying(strat.getRecordPerspective());
  reactions.switchTo(target);
}

Fixed version (ground truth):
@Override public void select(TablePerspective strat,Group group,IReactions reactions){
  MultiScore score=createScore(strat,group,createGSEA);
  reactions.addScoreToTourGuide(EDataDomainQueryMode.PATHWAYS,score);
  target.setUnderlying(strat.getRecordPerspective());
  reactions.switchTo(target);
}
Program: 57015
Project: 57015
Buggy source:
@Override protected IRegisteredScore createScore(String label,Perspective strat,Group g){
  if (parametricUI.getSelection()) {
    return createPGSEA(label,strat,g);
  }
 else   return createGSEA(label,strat,g);
}

Fixed version (ground truth):
/** 
 * @param strat
 * @param group
 * @param createGSEA
 * @return
 */
public static MultiScore createScore(TablePerspective strat,Group group,boolean createGSEA){
  AGSEAAlgorithm algorithm;
  if (createGSEA)   algorithm=new GSEAAlgorithm(strat.getRecordPerspective(),group,1.0f);
 else   algorithm=new PGSEAAlgorithm(strat.getRecordPerspective(),group);
  IScore gsea=new GeneSetScore(strat.getRecordPerspective().getLabel(),algorithm,false);
  IScore pValue=new GeneSetScore(gsea.getLabel() + "String_Node_Str",algorithm.asPValue(),true);
  MultiScore s=new MultiScore(gsea.getLabel(),color,bgColor,1);
  s.add(gsea);
  s.add(pValue);
  return s;
}
Program: 57016
Project: 57016
Buggy source:
@Override public void onUpdate(UpdateNumericalPreviewEvent event,IReactions adapter){
  TablePerspective numerical=event.getTablePerspective();
  adapter.replaceTemplate(new PreviewRenderer(adapter.createPreview(numerical),adapter.getGLView(),"String_Node_Str"));
  int dimId=numerical.getDimensionPerspective().getVirtualArray().get(0);
  String label=numerical.getLabel();
  LogRankMetric metric=new LogRankMetric(label,dimId,numerical.getDataDomain());
  LogRankPValue pvalue=new LogRankPValue(label + "String_Node_Str",metric);
  adapter.addScoreToTourGuide(STRATIFICATIONS,metric,pvalue);
  adapter.switchTo(target);
}

Fixed version (ground truth):
@Override public void onUpdate(UpdateNumericalPreviewEvent event,IReactions adapter){
  TablePerspective numerical=event.getTablePerspective();
  adapter.replaceTemplate(new PreviewRenderer(adapter.createPreview(numerical),adapter.getGLView(),"String_Node_Str"));
  MultiScore multiScore=createLogRankScore(numerical);
  adapter.addScoreToTourGuide(STRATIFICATIONS,multiScore);
  adapter.switchTo(target);
}
Program: 57017
Project: 57017
Buggy source:
public float compute(Iterable<Integer> a,Iterable<Integer> b,IProgressMonitor monitor){
  Pair<List<Float>,Integer> asp=getValues(a,this.clinicalVariable);
  List<Float> as=asp.getFirst();
  int asurvived=asp.getSecond();
  if (monitor.isCanceled())   return Float.NaN;
  Pair<List<Float>,Integer> bsp=getValues(b,this.clinicalVariable);
  List<Float> bs=bsp.getFirst();
  int bsurvived=bsp.getSecond();
  if (monitor.isCanceled())   return Float.NaN;
  return Statistics.logRank(as,asurvived,bs,bsurvived);
}

Fixed version (ground truth):
public float compute(Iterable<Integer> a,Iterable<Integer> b,IProgressMonitor monitor){
  Pair<List<Float>,Integer> asp=getValues(a,this.clinicalVariable);
  List<Float> as=asp.getFirst();
  int asurvived=asp.getSecond();
  if (monitor.isCanceled())   return Float.NaN;
  Pair<List<Float>,Integer> bsp=getValues(b,this.clinicalVariable);
  List<Float> bs=bsp.getFirst();
  int bsurvived=bsp.getSecond();
  if (monitor.isCanceled())   return Float.NaN;
  float r=Statistics.logRank(as,asurvived,bs,bsurvived);
  if (Float.isInfinite(r))   return Float.NaN;
  return r;
}
Program: 57018
Project: 57018
Buggy source:
public static float getPValue(float logRankScore){
  if (Float.isNaN(logRankScore))   return Float.NaN;
  double r=Statistics.chiSquaredProbability(logRankScore,1);
  return (float)r;
}

Fixed version (ground truth):
public static float getPValue(float logRankScore){
  if (Float.isNaN(logRankScore) || Float.isInfinite(logRankScore))   return Float.NaN;
  double r=Statistics.chiSquaredProbability(logRankScore,1);
  return (float)r;
}
Program: 57019
Project: 57019
Buggy source:
@ListenTo(sendToMe=true) public void onAddColumn(AddScoreColumnEvent event){
  if (event.getScores().isEmpty())   return;
  Collection<IScore> toCompute=new ArrayList<>();
  for (  IScore s : event.getScores()) {
    if (!s.supports(this.mode))     continue;
    if (s instanceof IRegisteredScore)     ((IRegisteredScore)s).onRegistered();
    if (s instanceof MultiScore) {
      MultiScore sm=(MultiScore)s;
      MultiScore tmp=new MultiScore(sm.getLabel(),sm.getColor(),sm.getBGColor());
      for (      IScore s2 : ((MultiScore)s)) {
        if (s2 instanceof IRegisteredScore)         ((IRegisteredScore)s2).onRegistered();
        tmp.add(s2);
      }
      toCompute.add(tmp);
    }
 else     toCompute.add(s);
  }
  if (toCompute.isEmpty())   return;
  scheduleAllOf(toCompute,event.isReplaceLeadingScoreColumns());
}

Fixed version (ground truth):
@ListenTo(sendToMe=true) public void onAddColumn(AddScoreColumnEvent event){
  if (event.getScores().isEmpty())   return;
  Collection<IScore> toCompute=new ArrayList<>();
  for (  IScore s : event.getScores()) {
    if (!s.supports(this.mode))     continue;
    if (s instanceof IRegisteredScore)     ((IRegisteredScore)s).onRegistered();
    if (s instanceof MultiScore) {
      MultiScore sm=(MultiScore)s;
      MultiScore tmp=new MultiScore(sm.getLabel(),sm.getColor(),sm.getBGColor(),sm.getCombinedType());
      for (      IScore s2 : ((MultiScore)s)) {
        if (s2 instanceof IRegisteredScore)         ((IRegisteredScore)s2).onRegistered();
        tmp.add(s2);
      }
      toCompute.add(tmp);
    }
 else     toCompute.add(s);
  }
  if (toCompute.isEmpty())   return;
  scheduleAllOf(toCompute,event.isReplaceLeadingScoreColumns());
}
Program: 57020
Project: 57020
Buggy source:
private void addColumns(Collection<IScore> scores,boolean removeLeadingScoreColumns){
  if (removeLeadingScoreColumns)   removeLeadingScoreColumns();
  for (  IScore s : scores) {
    int lastLabel=findLastLabelColumn();
    if (s instanceof MultiScore) {
      ACompositeRankColumnModel combined=table.getConfig().createNewCombined(0);
      table.add(lastLabel + 1,combined);
      for (      IScore s2 : ((MultiScore)s)) {
        combined.add(new ScoreRankColumnModel(s2));
      }
      if (combined instanceof IRankableColumnMixin)       ((IRankableColumnMixin)combined).orderByMe();
    }
 else {
      ScoreRankColumnModel ss=new ScoreRankColumnModel(s);
      table.add(lastLabel + 1,ss);
      ss.orderByMe();
    }
  }
  TableBodyUI bodyUI=getTableBodyUI();
  if (bodyUI != null)   bodyUI.scrollFirst();
}

Fixed version (ground truth):
private void addColumns(Collection<IScore> scores,boolean removeLeadingScoreColumns){
  if (removeLeadingScoreColumns)   removeLeadingScoreColumns();
  for (  IScore s : scores) {
    int lastLabel=findLastLabelColumn();
    if (s instanceof MultiScore) {
      ACompositeRankColumnModel combined=table.getConfig().createNewCombined(((MultiScore)s).getCombinedType());
      table.add(lastLabel + 1,combined);
      for (      IScore s2 : ((MultiScore)s)) {
        combined.add(new ScoreRankColumnModel(s2));
      }
      if (combined instanceof IRankableColumnMixin)       ((IRankableColumnMixin)combined).orderByMe();
    }
 else {
      ScoreRankColumnModel ss=new ScoreRankColumnModel(s);
      table.add(lastLabel + 1,ss);
      ss.orderByMe();
    }
  }
  TableBodyUI bodyUI=getTableBodyUI();
  if (bodyUI != null)   bodyUI.scrollFirst();
}
Program: 57021
Project: 57021
Buggy source:
@Override public void propertyChange(PropertyChangeEvent evt){
switch (evt.getPropertyName()) {
case RankTableModel.PROP_DATA:
    @SuppressWarnings("String_Node_Str") Collection<IRow> news=(Collection<IRow>)evt.getNewValue();
  maskInvalid.set(getTable().getDataSize() - news.size(),getTable().getDataSize());
break;
}
}

Fixed version (ground truth):
@Override public void propertyChange(PropertyChangeEvent evt){
switch (evt.getPropertyName()) {
case RankTableModel.PROP_DATA:
    RankTableModel table=getTable();
  if (table != null) {
    @SuppressWarnings("String_Node_Str") Collection<IRow> news=(Collection<IRow>)evt.getNewValue();
    maskInvalid.set(table.getDataSize() - news.size(),table.getDataSize());
  }
break;
}
}
Program: 57022
Project: 57022
Buggy source:
private void createWizard(TablePerspective source,boolean independentOne){
  if (source == null) {
    wizard=factory.create(this,stratomex);
    wizardMode=EWizardMode.GLOBAL;
  }
 else   if (independentOne) {
    wizard=factory.createIndepenent(this,stratomex,source);
    wizardMode=EWizardMode.INDEPENDENT;
  }
 else {
    wizard=factory.createDependent(this,stratomex,source);
    wizardMode=EWizardMode.DEPENDENT;
  }
  stratomex.registerEventListener(wizard);
}

Fixed version (ground truth):
private void createWizard(TablePerspective source,boolean independentOne){
  if (source == null) {
    wizard=factory.create(this,stratomex);
    wizardMode=EWizardMode.GLOBAL;
  }
 else   if (independentOne) {
    wizard=factory.createIndepenent(this,stratomex,source);
    wizardMode=EWizardMode.INDEPENDENT;
  }
 else {
    wizard=factory.createDependent(this,stratomex,source);
    wizardMode=EWizardMode.DEPENDENT;
  }
  stratomex.registerEventListener(wizard);
  wizard.prepare();
}