nus-yam/ex-repair huggingface dataset:
Program: 108796
Project: 108796
Buggy source:
/** 
 * Returns some debug data
 * @param Model The model
 * @return
 */
protected String getData(Model model){
  if (model == null || model.getInputConfig() == null || model.getInputConfig().getInput() == null) {
    return "String_Node_Str";
  }
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(getDebugData(model.getInputConfig().getInput().getDefinition()));
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getInputConfig().getInput().getHandle(),false));
  if (model.getOutput() != null) {
    builder.append("String_Node_Str");
    builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getOutputConfig().getInput().getHandle(),false));
    builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getOutput(),false));
  }
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(model.isVisualizationEnabled()).append("String_Node_Str");
  builder.append("String_Node_Str").append(model.getHideVisualizationAt()).append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  if (eventBuffer.isEmpty()) {
    builder.append("String_Node_Str");
  }
 else {
    for (    String s : eventBuffer) {
      builder.append(s).append("String_Node_Str");
    }
  }
  return builder.toString();
}

Fixed version (ground truth):
/** 
 * Returns some debug data
 * @param Model The model
 * @return
 */
protected String getData(Model model){
  if (model == null || model.getInputConfig() == null || model.getInputConfig().getInput() == null) {
    return "String_Node_Str";
  }
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(getDebugData(model.getInputConfig().getInput().getDefinition()));
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getInputConfig().getInput().getHandle(),false));
  if (model.getOutput() != null) {
    builder.append("String_Node_Str");
    builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getOutputConfig().getInput().getHandle(),false));
    builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getOutput(),false));
  }
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(!model.isVisualizationEnabled()).append("String_Node_Str");
  builder.append("String_Node_Str").append(model.getHideVisualizationAt()).append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  if (eventBuffer.isEmpty()) {
    builder.append("String_Node_Str");
  }
 else {
    for (    String s : eventBuffer) {
      builder.append(s).append("String_Node_Str");
    }
  }
  return builder.toString();
}
Program: 108799
Project: 108799
Buggy source:
/** 
 * Redraws the actual heatmap
 */
public void updateData(String attribute1,String attribute2,StatisticsContingencyTable table){
  this.attribute1=attribute1;
  this.attribute2=attribute2;
  if (attribute1 == null || attribute2 == null || table == null) {
    heatmap=null;
    return;
  }
  BufferedImage heatmap=new BufferedImage(table.values1.length,table.values2.length,BufferedImage.TYPE_INT_ARGB);
  Graphics2D g=(Graphics2D)heatmap.getGraphics();
  Iterator<Entry> iterator=table.iterator;
  while (iterator.hasNext()) {
    Entry entry=iterator.next();
    g.setColor(GRADIENT[(int)(entry.frequency * (GRADIENT.length - 1))]);
    g.fillRect(entry.value1,entry.value2,1,1);
  }
  g.dispose();
  this.heatmap=heatmap;
}

Fixed version (ground truth):
/** 
 * Redraws the actual heatmap
 */
public void updateData(String attribute1,String attribute2,StatisticsContingencyTable table){
  this.attribute1=attribute1;
  this.attribute2=attribute2;
  if (attribute1 == null || attribute2 == null || table == null) {
    heatmap=null;
    return;
  }
  BufferedImage heatmap=new BufferedImage(table.values1.length,table.values2.length,BufferedImage.TYPE_INT_ARGB);
  Graphics2D g=(Graphics2D)heatmap.getGraphics();
  g.setColor(GRADIENT[0]);
  g.fillRect(0,0,heatmap.getWidth(),heatmap.getHeight());
  Iterator<Entry> iterator=table.iterator;
  while (iterator.hasNext()) {
    Entry entry=iterator.next();
    g.setColor(GRADIENT[(int)(entry.frequency * (GRADIENT.length - 1))]);
    g.fillRect(entry.value1,entry.value2,1,1);
  }
  g.dispose();
  this.heatmap=heatmap;
}
Program: 108800
Project: 108800
Buggy source:
/** 
 * Update the data type
 */
private void updateDataType(){
  final DataType<?> dtype=model.getInputConfig().getInput().getDefinition().getDataType(attribute);
  dataTypeCombo.select(getIndexOfDataType(dtype));
  if (dtype instanceof ARXOrderedString || dtype.getDescription().hasFormat()) {
    DataTypeWithFormat dtwf=(DataTypeWithFormat)dtype;
    String format=dtwf.getFormat();
    if (format == null) {
      dataTypeText.setText("String_Node_Str");
    }
 else {
      dataTypeText.setText(format);
    }
  }
 else {
    dataTypeText.setText("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Update the data type
 */
private void updateDataType(){
  final DataType<?> dtype=model.getInputConfig().getInput().getDefinition().getDataType(attribute);
  dataTypeCombo.select(getIndexOfDataType(dtype));
  if (!(dtype instanceof ARXOrderedString) && dtype.getDescription().hasFormat()) {
    DataTypeWithFormat dtwf=(DataTypeWithFormat)dtype;
    String format=dtwf.getFormat();
    if (format == null) {
      dataTypeText.setText("String_Node_Str");
    }
 else {
      dataTypeText.setText(format);
    }
  }
 else {
    dataTypeText.setText("String_Node_Str");
  }
}
Program: 108801
Project: 108801
Buggy source:
@Override public void widgetSelected(final SelectionEvent arg0){
  if ((dataTypeCombo.getSelectionIndex() != -1) && (attribute != null)) {
    if ((model != null) && (model.getInputConfig().getInput() != null)) {
      String label=dataTypeCombo.getItem(dataTypeCombo.getSelectionIndex());
      DataTypeDescription<?> description=getDataType(label);
      DataType<?> type;
      if (description.hasFormat()) {
        final String text1=Resources.getMessage("String_Node_Str");
        final String text2=Resources.getMessage("String_Node_Str");
        final String format=controller.actionShowFormatInputDialog(text1,text2,description,getValues());
        if (format == null) {
          type=DataType.STRING;
          dataTypeCombo.select(getIndexOfDataType(DataType.STRING));
          dataTypeText.setText("String_Node_Str");
        }
 else {
          type=description.newInstance(format);
        }
      }
 else {
        type=description.newInstance();
        if (!isValidDataType(type,getValues())) {
          type=DataType.STRING;
          dataTypeCombo.select(getIndexOfDataType(DataType.STRING));
          dataTypeText.setText("String_Node_Str");
        }
      }
      model.getInputConfig().getInput().getDefinition().setDataType(attribute,type);
      controller.update(new ModelEvent(outer,ModelPart.DATA_TYPE,attribute));
    }
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(final SelectionEvent arg0){
  if ((dataTypeCombo.getSelectionIndex() != -1) && (attribute != null)) {
    if ((model != null) && (model.getInputConfig().getInput() != null)) {
      String label=dataTypeCombo.getItem(dataTypeCombo.getSelectionIndex());
      DataTypeDescription<?> description=getDataType(label);
      DataType<?> type;
      if (description.hasFormat()) {
        final String text1=Resources.getMessage("String_Node_Str");
        final String text2=Resources.getMessage("String_Node_Str");
        final String format=controller.actionShowFormatInputDialog(text1,text2,description,getValues());
        if (format == null) {
          type=DataType.STRING;
        }
 else {
          type=description.newInstance(format);
        }
      }
 else {
        type=description.newInstance();
        if (!isValidDataType(type,getValues())) {
          type=DataType.STRING;
        }
      }
      model.getInputConfig().getInput().getDefinition().setDataType(attribute,type);
      updateDataType();
      controller.update(new ModelEvent(outer,ModelPart.DATA_TYPE,attribute));
    }
  }
}
Program: 108803
Project: 108803
Buggy source:
/** 
 * Updates the view
 */
private void update(){
  Context context=acontext.getContext();
  if (!context.equals(this.context)) {
    this.cache.clear();
    this.context=context;
  }
  if (context.config == null || context.handle == null) {
    return;
  }
  if (!cache.containsKey(attribute)) {
    DataHandle handle=context.handle;
    int column=handle.getColumnIndexOf(attribute);
    if (column >= 0) {
      Hierarchy hierarchy=null;
      if (this.target == ModelPart.OUTPUT)       hierarchy=acontext.getHierarchy(context,attribute);
      double[] frequency=handle.getStatistics().getFrequencyDistribution(column,hierarchy).frequency;
      cache.put(attribute,frequency);
    }
  }
  if (cache.isEmpty() || (cache.get(attribute) == null)) {
    return;
  }
  chart.setRedraw(false);
  final ISeriesSet seriesSet=chart.getSeriesSet();
  final IBarSeries series=(IBarSeries)seriesSet.createSeries(SeriesType.BAR,Resources.getMessage("String_Node_Str"));
  series.getLabel().setVisible(false);
  series.getLabel().setFont(MainWindow.FONT);
  series.setBarColor(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
  series.setYSeries(cache.get(attribute));
  final IAxisSet axisSet=chart.getAxisSet();
  final IAxis yAxis=axisSet.getYAxis(0);
  yAxis.setRange(new Range(0d,1d));
  yAxis.adjustRange();
  final IAxis xAxis=axisSet.getXAxis(0);
  xAxis.adjustRange();
  chart.updateLayout();
  chart.update();
  chart.setRedraw(true);
  chart.redraw();
}

Fixed version (ground truth):
/** 
 * Updates the view
 */
private void update(){
  Context context=acontext.getContext();
  if (!context.equals(this.context)) {
    this.cache.clear();
    this.context=context;
  }
  if (context.config == null || context.handle == null) {
    return;
  }
  if (!cache.containsKey(attribute)) {
    DataHandle handle=context.handle;
    int column=handle.getColumnIndexOf(attribute);
    if (column >= 0) {
      Hierarchy hierarchy=acontext.getHierarchy(context,attribute);
      double[] frequency=handle.getStatistics().getFrequencyDistribution(column,hierarchy).frequency;
      cache.put(attribute,frequency);
    }
  }
  if (cache.isEmpty() || (cache.get(attribute) == null)) {
    return;
  }
  chart.setRedraw(false);
  final ISeriesSet seriesSet=chart.getSeriesSet();
  final IBarSeries series=(IBarSeries)seriesSet.createSeries(SeriesType.BAR,Resources.getMessage("String_Node_Str"));
  series.getLabel().setVisible(false);
  series.getLabel().setFont(MainWindow.FONT);
  series.setBarColor(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
  series.setYSeries(cache.get(attribute));
  final IAxisSet axisSet=chart.getAxisSet();
  final IAxis yAxis=axisSet.getYAxis(0);
  yAxis.setRange(new Range(0d,1d));
  yAxis.adjustRange();
  final IAxis xAxis=axisSet.getXAxis(0);
  xAxis.adjustRange();
  chart.updateLayout();
  chart.update();
  chart.setRedraw(true);
  chart.redraw();
}
Program: 108806
Project: 108806
Buggy source:
/** 
 * Returns statistics about the groups
 * @return
 */
public abstract GroupStatistics[] getGroupStatistics();

Fixed version (ground truth):
/** 
 * Returns statistics about the groups
 * @return
 */
public abstract GroupStatistics getGroupStatistics();
Program: 108807
Project: 108807
Buggy source:
@Override public GroupStatistics[] getGroupStatistics(){
  return currentGroupify.getGroupStatistics();
}

Fixed version (ground truth):
@Override public GroupStatistics getGroupStatistics(){
  return currentGroupify.getGroupStatistics();
}
Program: 108809
Project: 108809
Buggy source:
/** 
 * Creates a new instance
 * @param handle
 * @param averageEquivalenceClassSize
 * @param maximalEquivalenceClassSize
 * @param minimalEquivalenceClassSize
 * @param numberOfGroups
 * @param numberOfOutlyingEquivalenceClasses
 * @param numberOfOutlyingTuples
 */
protected GroupStatistics(double averageEquivalenceClassSize,int maximalEquivalenceClassSize,int minimalEquivalenceClassSize,int numberOfGroups,int numberOfOutlyingEquivalenceClasses,int numberOfOutlyingTuples){
  this.averageEquivalenceClassSize=averageEquivalenceClassSize;
  this.maximalEquivalenceClassSize=maximalEquivalenceClassSize;
  this.minimalEquivalenceClassSize=minimalEquivalenceClassSize;
  this.numberOfGroups=numberOfGroups;
  this.numberOfOutlyingEquivalenceClasses=numberOfOutlyingEquivalenceClasses;
  this.numberOfOutlyingTuples=numberOfOutlyingTuples;
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 * @param handle
 * @param averageEquivalenceClassSize
 * @param maximalEquivalenceClassSize
 * @param minimalEquivalenceClassSize
 * @param averageEquivalenceClassSizeIncludingOutliers
 * @param maximalEquivalenceClassSizeIncludingOutliers
 * @param minimalEquivalenceClassSizeIncludingOutliers
 * @param numberOfGroups
 * @param numberOfOutlyingEquivalenceClasses
 * @param numberOfOutlyingTuples
 */
protected GroupStatistics(double averageEquivalenceClassSize,int maximalEquivalenceClassSize,int minimalEquivalenceClassSize,double averageEquivalenceClassSizeIncludingOutliers,int maximalEquivalenceClassSizeIncludingOutliers,int minimalEquivalenceClassSizeIncludingOutliers,int numberOfGroups,int numberOfOutlyingEquivalenceClasses,int numberOfOutlyingTuples){
  this.averageEquivalenceClassSize=averageEquivalenceClassSize;
  this.maximalEquivalenceClassSize=maximalEquivalenceClassSize;
  this.minimalEquivalenceClassSize=minimalEquivalenceClassSize;
  this.averageEquivalenceClassSize=averageEquivalenceClassSizeIncludingOutliers;
  this.maximalEquivalenceClassSize=maximalEquivalenceClassSizeIncludingOutliers;
  this.minimalEquivalenceClassSize=minimalEquivalenceClassSizeIncludingOutliers;
  this.numberOfGroups=numberOfGroups;
  this.numberOfOutlyingEquivalenceClasses=numberOfOutlyingEquivalenceClasses;
  this.numberOfOutlyingTuples=numberOfOutlyingTuples;
}
Program: 108810
Project: 108810
Buggy source:
/** 
 * Returns statistics about the groups
 * @return
 */
public abstract GroupStatistics[] getGroupStatistics();

Fixed version (ground truth):
/** 
 * Returns statistics about the groups
 * @return
 */
public abstract GroupStatistics getGroupStatistics();
Program: 108812
Project: 108812
Buggy source:
/** 
 * Returns some debug data
 * @param Model The model
 * @return
 */
protected String getData(Model model){
  if (model == null)   return "String_Node_Str";
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(getDebugData(model.getInputConfig().getInput().getDefinition()));
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getInputConfig().getInput().getHandle()));
  if (model.getOutput() != null) {
    builder.append("String_Node_Str");
    builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getOutputConfig().getInput().getHandle()));
    builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getOutput()));
  }
  builder.append("String_Node_Str");
  for (  String s : list) {
    builder.append("String_Node_Str").append(s).append("String_Node_Str");
  }
  return builder.toString();
}

Fixed version (ground truth):
/** 
 * Returns some debug data
 * @param Model The model
 * @return
 */
protected String getData(Model model){
  if (model == null || model.getInputConfig() == null || model.getInputConfig().getInput() == null) {
    return "String_Node_Str";
  }
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(getDebugData(model.getInputConfig().getInput().getDefinition()));
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getInputConfig().getInput().getHandle()));
  if (model.getOutput() != null) {
    builder.append("String_Node_Str");
    builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getOutputConfig().getInput().getHandle()));
    builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getOutput()));
  }
  builder.append("String_Node_Str");
  for (  String s : list) {
    builder.append("String_Node_Str").append(s).append("String_Node_Str");
  }
  return builder.toString();
}
Program: 108814
Project: 108814
Buggy source:
/** 
 * Returns debug data
 * @return
 */
public String getDebugData(){
  return new DebugData(model).getData();
}

Fixed version (ground truth):
/** 
 * Returns debug data
 * @return
 */
public String getDebugData(){
  return this.debug.getData(model);
}
Program: 108815
Project: 108815
Buggy source:
/** 
 * Returns some debug data
 * @return
 */
protected String getData(){
  if (model == null)   return "String_Node_Str";
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(getDebugData(model.getInputConfig().getInput().getDefinition()));
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getInputConfig().getInput().getHandle()));
  if (model.getOutput() != null) {
    builder.append("String_Node_Str");
    builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getOutputConfig().getInput().getHandle()));
    builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getOutput()));
  }
  return builder.toString();
}

Fixed version (ground truth):
/** 
 * Returns some debug data
 * @param Model The model
 * @return
 */
protected String getData(Model model){
  if (model == null)   return "String_Node_Str";
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(getDebugData(model.getInputConfig().getInput().getDefinition()));
  builder.append("String_Node_Str");
  builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getInputConfig().getInput().getHandle()));
  if (model.getOutput() != null) {
    builder.append("String_Node_Str");
    builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getOutputConfig().getInput().getHandle()));
    builder.append("String_Node_Str").append(getDebugData("String_Node_Str",model.getOutput()));
  }
  builder.append("String_Node_Str");
  for (  String s : list) {
    builder.append("String_Node_Str").append(s).append("String_Node_Str");
  }
  return builder.toString();
}
Program: 108817
Project: 108817
Buggy source:
/** 
 * Releases all resources
 */
protected void doRelease(){
  node=null;
  dataIS=null;
  dataQI=null;
  dataSE=null;
  inverseData=null;
  inverseDictionaries=null;
  inverseMap=null;
  map=null;
  quasiIdentifiers=null;
  suppressionString=null;
  registry=null;
  subset=null;
  dataTypes=null;
  definition=null;
  header=null;
  statistics=null;
  node=null;
}

Fixed version (ground truth):
/** 
 * Releases all resources
 */
protected void doRelease(){
  result.releaseBuffer(this);
  node=null;
  dataIS=null;
  dataQI=null;
  dataSE=null;
  inverseData=null;
  inverseDictionaries=null;
  inverseMap=null;
  map=null;
  quasiIdentifiers=null;
  suppressionString=null;
  registry=null;
  subset=null;
  dataTypes=null;
  definition=null;
  header=null;
  statistics=null;
  node=null;
}
Program: 108818
Project: 108818
Buggy source:
/** 
 * Updates the view
 */
private void update(){
  Context context=acontext.getContext();
  if (!context.equals(this.context)) {
    this.cache.clear();
    this.context=context;
  }
  if (context.config == null || context.handle == null) {
    return;
  }
  if (!cache.containsKey(attribute)) {
    DataHandle handle=context.handle;
    int column=handle.getColumnIndexOf(attribute);
    if (column >= 0) {
      Hierarchy hierarchy=acontext.getHierarchy(context,attribute);
      double[] frequency=handle.getStatistics().getFrequencyDistribution(column,hierarchy).frequency;
      cache.put(attribute,frequency);
    }
  }
  if (cache.isEmpty() || (cache.get(attribute) == null)) {
    return;
  }
  chart.setRedraw(false);
  final ISeriesSet seriesSet=chart.getSeriesSet();
  final IBarSeries series=(IBarSeries)seriesSet.createSeries(SeriesType.BAR,Resources.getMessage("String_Node_Str"));
  series.getLabel().setVisible(false);
  series.getLabel().setFont(MainWindow.FONT);
  series.setBarColor(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
  series.setYSeries(cache.get(attribute));
  final IAxisSet axisSet=chart.getAxisSet();
  final IAxis yAxis=axisSet.getYAxis(0);
  yAxis.setRange(new Range(0d,1d));
  yAxis.adjustRange();
  final IAxis xAxis=axisSet.getXAxis(0);
  xAxis.adjustRange();
  chart.updateLayout();
  chart.update();
  chart.setRedraw(true);
  chart.redraw();
}

Fixed version (ground truth):
/** 
 * Updates the view
 */
private void update(){
  Context context=acontext.getContext();
  if (!context.equals(this.context)) {
    this.cache.clear();
    this.context=context;
  }
  if (context.config == null || context.handle == null) {
    return;
  }
  if (!cache.containsKey(attribute)) {
    DataHandle handle=context.handle;
    int column=handle.getColumnIndexOf(attribute);
    if (column >= 0) {
      Hierarchy hierarchy=null;
      if (this.target == ModelPart.OUTPUT)       hierarchy=acontext.getHierarchy(context,attribute);
      double[] frequency=handle.getStatistics().getFrequencyDistribution(column,hierarchy).frequency;
      cache.put(attribute,frequency);
    }
  }
  if (cache.isEmpty() || (cache.get(attribute) == null)) {
    return;
  }
  chart.setRedraw(false);
  final ISeriesSet seriesSet=chart.getSeriesSet();
  final IBarSeries series=(IBarSeries)seriesSet.createSeries(SeriesType.BAR,Resources.getMessage("String_Node_Str"));
  series.getLabel().setVisible(false);
  series.getLabel().setFont(MainWindow.FONT);
  series.setBarColor(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
  series.setYSeries(cache.get(attribute));
  final IAxisSet axisSet=chart.getAxisSet();
  final IAxis yAxis=axisSet.getYAxis(0);
  yAxis.setRange(new Range(0d,1d));
  yAxis.adjustRange();
  final IAxis xAxis=axisSet.getXAxis(0);
  xAxis.adjustRange();
  chart.updateLayout();
  chart.update();
  chart.setRedraw(true);
  chart.redraw();
}
Program: 108819
Project: 108819
Buggy source:
/** 
 * Converter  TODO: Seems to not work
 * @param value
 * @return
 */
private double intToInformationLoss(final int value){
  double min=result.getLattice().getBottom().getMinimumInformationLoss().getValue();
  double max=result.getLattice().getTop().getMaximumInformationLoss().getValue();
  if (value == 0) {
    return min;
  }
 else   if (value >= SCALE_MAX_VALUE - 1) {
    return max;
  }
  double val=min + ((double)value / (double)SCALE_MAX_VALUE * (max - min));
  return (int)val;
}

Fixed version (ground truth):
/** 
 * Converter  TODO: Seems to not work
 * @param value
 * @return
 */
private double intToInformationLoss(final int value){
  double min=result.getLattice().getBottom().getMinimumInformationLoss().getValue();
  double max=result.getLattice().getTop().getMaximumInformationLoss().getValue();
  if (value == 0) {
    return min;
  }
 else   if (value >= SCALE_MAX_VALUE - 1) {
    return max;
  }
  double val=min + (((double)value / (double)SCALE_MAX_VALUE) * (max - min));
  return val;
}
Program: 108820
Project: 108820
Buggy source:
/** 
 * Converter TODO: Seems to not work
 * @param value
 * @return
 */
private int informationLossToInt(final double value){
  Double min=result.getLattice().getBottom().getMinimumInformationLoss().getValue();
  Double max=result.getLattice().getTop().getMaximumInformationLoss().getValue();
  double val=(value - min) / (max - min);
  val=val * SCALE_MAX_VALUE;
  return (int)val;
}

Fixed version (ground truth):
/** 
 * Converter TODO: Seems to not work
 * @param value
 * @return
 */
private int informationLossToInt(final double value){
  double min=result.getLattice().getBottom().getMinimumInformationLoss().getValue();
  double max=result.getLattice().getTop().getMaximumInformationLoss().getValue();
  double val=(value - min) / (max - min);
  val=val * SCALE_MAX_VALUE;
  return (int)val;
}
Program: 108823
Project: 108823
Buggy source:
/** 
 * Creates a new instance
 * @param handle
 * @param averageEquivalenceClassSize
 * @param maximalEquivalenceClassSize
 * @param minimalEquivalenceClassSize
 * @param averageEquivalenceClassSizeIncludingOutliers
 * @param maximalEquivalenceClassSizeIncludingOutliers
 * @param minimalEquivalenceClassSizeIncludingOutliers
 * @param numberOfGroups
 * @param numberOfOutlyingEquivalenceClasses
 * @param numberOfOutlyingTuples
 */
protected GroupStatistics(double averageEquivalenceClassSize,int maximalEquivalenceClassSize,int minimalEquivalenceClassSize,double averageEquivalenceClassSizeIncludingOutliers,int maximalEquivalenceClassSizeIncludingOutliers,int minimalEquivalenceClassSizeIncludingOutliers,int numberOfGroups,int numberOfOutlyingEquivalenceClasses,int numberOfOutlyingTuples){
  this.averageEquivalenceClassSize=averageEquivalenceClassSize;
  this.maximalEquivalenceClassSize=maximalEquivalenceClassSize;
  this.minimalEquivalenceClassSize=minimalEquivalenceClassSize;
  this.averageEquivalenceClassSize=averageEquivalenceClassSizeIncludingOutliers;
  this.maximalEquivalenceClassSize=maximalEquivalenceClassSizeIncludingOutliers;
  this.minimalEquivalenceClassSize=minimalEquivalenceClassSizeIncludingOutliers;
  this.numberOfGroups=numberOfGroups;
  this.numberOfOutlyingEquivalenceClasses=numberOfOutlyingEquivalenceClasses;
  this.numberOfOutlyingTuples=numberOfOutlyingTuples;
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 * @param handle
 * @param averageEquivalenceClassSize
 * @param maximalEquivalenceClassSize
 * @param minimalEquivalenceClassSize
 * @param averageEquivalenceClassSizeIncludingOutliers
 * @param maximalEquivalenceClassSizeIncludingOutliers
 * @param minimalEquivalenceClassSizeIncludingOutliers
 * @param numberOfGroups
 * @param numberOfOutlyingEquivalenceClasses
 * @param numberOfOutlyingTuples
 */
protected GroupStatistics(double averageEquivalenceClassSize,int maximalEquivalenceClassSize,int minimalEquivalenceClassSize,double averageEquivalenceClassSizeIncludingOutliers,int maximalEquivalenceClassSizeIncludingOutliers,int minimalEquivalenceClassSizeIncludingOutliers,int numberOfGroups,int numberOfOutlyingEquivalenceClasses,int numberOfOutlyingTuples){
  this.averageEquivalenceClassSize=averageEquivalenceClassSize;
  this.maximalEquivalenceClassSize=maximalEquivalenceClassSize;
  this.minimalEquivalenceClassSize=minimalEquivalenceClassSize;
  this.averageEquivalenceClassSizeIncludingOutliers=averageEquivalenceClassSizeIncludingOutliers;
  this.maximalEquivalenceClassSizeIncludingOutliers=maximalEquivalenceClassSizeIncludingOutliers;
  this.minimalEquivalenceClassSizeIncludingOutliers=minimalEquivalenceClassSizeIncludingOutliers;
  this.numberOfGroups=numberOfGroups;
  this.numberOfOutlyingEquivalenceClasses=numberOfOutlyingEquivalenceClasses;
  this.numberOfOutlyingTuples=numberOfOutlyingTuples;
}
Program: 108826
Project: 108826
Buggy source:
/** 
 * Creates a new instance
 * @param parent
 * @param controller
 * @param target
 * @param reset
 */
public ViewDistribution(final Composite parent,final Controller controller,final ModelPart target,final ModelPart reset){
  controller.addListener(ModelPart.VIEW_CONFIG,this);
  controller.addListener(ModelPart.SELECTED_ATTRIBUTE,this);
  controller.addListener(ModelPart.ATTRIBUTE_TYPE,this);
  controller.addListener(ModelPart.MODEL,this);
  controller.addListener(target,this);
  this.controller=controller;
  if (reset != null) {
    controller.addListener(reset,this);
  }
  this.reset=reset;
  this.target=target;
  this.parent=parent;
  reset();
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 * @param parent
 * @param controller
 * @param target
 * @param reset
 */
public ViewDistribution(final Composite parent,final Controller controller,final ModelPart target,final ModelPart reset){
  controller.addListener(ModelPart.VIEW_CONFIG,this);
  controller.addListener(ModelPart.SELECTED_ATTRIBUTE,this);
  controller.addListener(ModelPart.ATTRIBUTE_TYPE,this);
  controller.addListener(ModelPart.DATA_TYPE,this);
  controller.addListener(ModelPart.MODEL,this);
  controller.addListener(target,this);
  this.controller=controller;
  if (reset != null) {
    controller.addListener(reset,this);
  }
  this.reset=reset;
  this.target=target;
  this.parent=parent;
  reset();
}
Program: 108827
Project: 108827
Buggy source:
public ModelViewConfig clone(){
  ModelViewConfig result=new ModelViewConfig();
  result.mode=this.mode;
  result.attribute=this.attribute;
  result.subset=this.subset;
  return result;
}

Fixed version (ground truth):
@Override public ModelViewConfig clone(){
  ModelViewConfig result=new ModelViewConfig();
  result.mode=this.mode;
  result.attribute=this.attribute;
  result.subset=this.subset;
  return result;
}
Program: 108828
Project: 108828
Buggy source:
@Override public final boolean equals(final Object obj){
  if (this == obj) {
    return true;
  }
  return Arrays.equals(array,((IntArrayWrapper)obj).array);
}

Fixed version (ground truth):
@Override public final boolean equals(final Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null)   return false;
  return Arrays.equals(array,((IntArrayWrapper)obj).array);
}
Program: 108829
Project: 108829
Buggy source:
@Override public boolean equals(Object obj){
  Entry other=(Entry)obj;
  return Arrays.equals(data,other.data);
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj == null)   return false;
  Entry other=(Entry)obj;
  return Arrays.equals(data,other.data);
}
Program: 108830
Project: 108830
Buggy source:
public RowSet clone(){
  RowSet set=new RowSet(this.length);
  set.size=this.size;
  System.arraycopy(this.array,0,set.array,0,this.array.length);
  return set;
}

Fixed version (ground truth):
@Override public RowSet clone(){
  RowSet set=new RowSet(this.length);
  set.size=this.size;
  System.arraycopy(this.array,0,set.array,0,this.array.length);
  return set;
}
Program: 108832
Project: 108832
Buggy source:
@Override public void widgetSelected(final SelectionEvent e){
  controller.actionMenuHelpAbout();
}

Fixed version (ground truth):
@Override public void widgetSelected(final SelectionEvent e){
  controller.actionMenuHelpDebug();
}
Program: 108835
Project: 108835
Buggy source:
/** 
 * Returns a string representation 
 */
@Override public String toString(){
switch (type) {
case ATTR_TYPE_ID:
    return "String_Node_Str";
case ATTR_TYPE_SE:
  return "String_Node_Str";
case ATTR_TYPE_IS:
return "String_Node_Str";
case ATTR_TYPE_QI:
return "String_Node_Str";
default :
return null;
}
}

Fixed version (ground truth):
/** 
 * Returns a string representation 
 */
@Override public String toString(){
switch (type) {
case ATTR_TYPE_ID:
    return "String_Node_Str";
case ATTR_TYPE_SE:
  return "String_Node_Str";
case ATTR_TYPE_IS:
return "String_Node_Str";
case ATTR_TYPE_QI:
return "String_Node_Str";
default :
return "String_Node_Str";
}
}
Program: 108836
Project: 108836
Buggy source:
/** 
 * Returns the maximal size of an equivalence class
 * @return
 */
public int getAverageEquivalenceClassSize(){
  return groupStatistics.getAverageEquivalenceClassSize();
}

Fixed version (ground truth):
/** 
 * Returns the maximal size of an equivalence class
 * @return
 */
public double getAverageEquivalenceClassSize(){
  return groupStatistics.getAverageEquivalenceClassSize();
}
Program: 108837
Project: 108837
Buggy source:
/** 
 * Returns the maximal size of an equivalence class
 * @return
 */
public int getAverageEquivalenceClassSize(){
  return averageEquivalenceClassSize;
}

Fixed version (ground truth):
/** 
 * Returns the maximal size of an equivalence class
 * @return
 */
public double getAverageEquivalenceClassSize(){
  return averageEquivalenceClassSize;
}
Program: 108838
Project: 108838
Buggy source:
@Override public GroupStatistics getGroupStatistics(){
  int averageEquivalenceClassSize=0;
  int maximalEquivalenceClassSize=Integer.MIN_VALUE;
  int minimalEquivalenceClassSize=Integer.MAX_VALUE;
  int numberOfEquivalenceClasses=this.size();
  int numberOfOutlyingEquivalenceClasses=0;
  int numberOfOutlyingTuples=0;
  HashGroupifyEntry entry=firstEntry;
  while (entry != null) {
    final boolean anonymous=isAnonymous(entry);
    if (!anonymous) {
      numberOfOutlyingEquivalenceClasses++;
      numberOfOutlyingTuples+=entry.count;
    }
 else {
      averageEquivalenceClassSize+=entry.count;
      maximalEquivalenceClassSize=Math.max(maximalEquivalenceClassSize,entry.count);
      minimalEquivalenceClassSize=Math.min(minimalEquivalenceClassSize,entry.count);
    }
    entry=entry.nextOrdered;
  }
  averageEquivalenceClassSize=(int)((double)averageEquivalenceClassSize / (double)(numberOfEquivalenceClasses - numberOfOutlyingEquivalenceClasses));
  return new GroupStatistics(averageEquivalenceClassSize,maximalEquivalenceClassSize,minimalEquivalenceClassSize,numberOfEquivalenceClasses,numberOfOutlyingEquivalenceClasses,numberOfOutlyingTuples);
}

Fixed version (ground truth):
@Override public GroupStatistics getGroupStatistics(){
  double averageEquivalenceClassSize=0;
  int maximalEquivalenceClassSize=Integer.MIN_VALUE;
  int minimalEquivalenceClassSize=Integer.MAX_VALUE;
  int numberOfEquivalenceClasses=this.size();
  int numberOfOutlyingEquivalenceClasses=0;
  int numberOfOutlyingTuples=0;
  HashGroupifyEntry entry=firstEntry;
  while (entry != null) {
    final boolean anonymous=isAnonymous(entry);
    if (!anonymous) {
      numberOfOutlyingEquivalenceClasses++;
      numberOfOutlyingTuples+=entry.count;
    }
 else {
      averageEquivalenceClassSize+=entry.count;
      maximalEquivalenceClassSize=Math.max(maximalEquivalenceClassSize,entry.count);
      minimalEquivalenceClassSize=Math.min(minimalEquivalenceClassSize,entry.count);
    }
    entry=entry.nextOrdered;
  }
  averageEquivalenceClassSize=averageEquivalenceClassSize / (double)(numberOfEquivalenceClasses - numberOfOutlyingEquivalenceClasses);
  return new GroupStatistics(averageEquivalenceClassSize,maximalEquivalenceClassSize,minimalEquivalenceClassSize,numberOfEquivalenceClasses,numberOfOutlyingEquivalenceClasses,numberOfOutlyingTuples);
}
Program: 108839
Project: 108839
Buggy source:
/** 
 * Creates a new instance
 * @param handle
 * @param averageEquivalenceClassSize
 * @param maximalEquivalenceClassSize
 * @param minimalEquivalenceClassSize
 * @param numberOfGroups
 * @param numberOfOutlyingEquivalenceClasses
 * @param numberOfOutlyingTuples
 */
protected GroupStatistics(int averageEquivalenceClassSize,int maximalEquivalenceClassSize,int minimalEquivalenceClassSize,int numberOfGroups,int numberOfOutlyingEquivalenceClasses,int numberOfOutlyingTuples){
  this.averageEquivalenceClassSize=averageEquivalenceClassSize;
  this.maximalEquivalenceClassSize=maximalEquivalenceClassSize;
  this.minimalEquivalenceClassSize=minimalEquivalenceClassSize;
  this.numberOfGroups=numberOfGroups;
  this.numberOfOutlyingEquivalenceClasses=numberOfOutlyingEquivalenceClasses;
  this.numberOfOutlyingTuples=numberOfOutlyingTuples;
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 * @param handle
 * @param averageEquivalenceClassSize
 * @param maximalEquivalenceClassSize
 * @param minimalEquivalenceClassSize
 * @param numberOfGroups
 * @param numberOfOutlyingEquivalenceClasses
 * @param numberOfOutlyingTuples
 */
protected GroupStatistics(double averageEquivalenceClassSize,int maximalEquivalenceClassSize,int minimalEquivalenceClassSize,int numberOfGroups,int numberOfOutlyingEquivalenceClasses,int numberOfOutlyingTuples){
  this.averageEquivalenceClassSize=averageEquivalenceClassSize;
  this.maximalEquivalenceClassSize=maximalEquivalenceClassSize;
  this.minimalEquivalenceClassSize=minimalEquivalenceClassSize;
  this.numberOfGroups=numberOfGroups;
  this.numberOfOutlyingEquivalenceClasses=numberOfOutlyingEquivalenceClasses;
  this.numberOfOutlyingTuples=numberOfOutlyingTuples;
}
Program: 108840
Project: 108840
Buggy source:
@Override public final boolean equals(final Object obj){
  if (this == obj) {
    return true;
  }
  return Arrays.equals(array,((IntArrayWrapper)obj).array);
}

Fixed version (ground truth):
@Override public final boolean equals(final Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null)   return false;
  return Arrays.equals(array,((IntArrayWrapper)obj).array);
}
Program: 108844
Project: 108844
Buggy source:
/** 
 * Converts an information loss into a relative value in percent
 * @param infoLoss
 * @return
 */
private double asRelativeValue(final InformationLoss infoLoss){
  return ((infoLoss.getValue() - result.getLattice().getBottom().getMinimumInformationLoss().getValue()) / result.getLattice().getTop().getMaximumInformationLoss().getValue()) * 100d;
}

Fixed version (ground truth):
/** 
 * Converts an information loss into a relative value in percent
 * @param infoLoss
 * @return
 */
private double asRelativeValue(final InformationLoss infoLoss){
  double min=result.getLattice().getBottom().getMinimumInformationLoss().getValue();
  double max=result.getLattice().getTop().getMaximumInformationLoss().getValue();
  return ((infoLoss.getValue() - min) / (max - min)) * 100d;
}
Program: 108845
Project: 108845
Buggy source:
@Override public void update(final ModelEvent event){
  if (event.part == ModelPart.RESULT) {
    result=(ARXResult)event.data;
    reset();
  }
 else   if (event.part == ModelPart.SELECTED_NODE) {
    if (event.data == null) {
      reset();
    }
 else {
      setSelectedNode((ARXNode)event.data);
      SWTUtil.enable(root);
    }
  }
}

Fixed version (ground truth):
@Override public void update(final ModelEvent event){
  if (event.part == ModelPart.RESULT) {
    result=(ARXResult)event.data;
    reset();
  }
 else   if (event.part == ModelPart.SELECTED_NODE) {
    if (event.data == null) {
      reset();
    }
 else {
      update((ARXNode)event.data);
      SWTUtil.enable(root);
    }
  }
}
Program: 108846
Project: 108846
Buggy source:
public ViewProperties(final Composite parent,final Controller controller){
  controller.addListener(ModelPart.RESULT,this);
  controller.addListener(ModelPart.SELECTED_NODE,this);
  this.controller=controller;
  ComponentTitledBorder border=new ComponentTitledBorder(parent,controller,Resources.getMessage("String_Node_Str"),"String_Node_Str");
  root=new Composite(border.getControl(),SWT.NONE);
  border.setChild(root);
  border.setLayoutData(SWTUtil.createFillGridData());
  final GridLayout groupNodeGridLayout=new GridLayout();
  groupNodeGridLayout.numColumns=1;
  root.setLayout(groupNodeGridLayout);
  createNodeGroup(root);
  reset();
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 * @param parent
 * @param controller
 */
public ViewProperties(final Composite parent,final Controller controller){
  controller.addListener(ModelPart.RESULT,this);
  controller.addListener(ModelPart.SELECTED_NODE,this);
  this.controller=controller;
  ComponentTitledBorder border=new ComponentTitledBorder(parent,controller,Resources.getMessage("String_Node_Str"),"String_Node_Str");
  root=new Composite(border.getControl(),SWT.NONE);
  border.setChild(root);
  border.setLayoutData(SWTUtil.createFillGridData());
  final GridLayout groupNodeGridLayout=new GridLayout();
  groupNodeGridLayout.numColumns=1;
  root.setLayout(groupNodeGridLayout);
  createNodeGroup(root);
  reset();
}
Program: 108847
Project: 108847
Buggy source:
private void createNodeGroup(final Composite groupNode){
  table=new Table(groupNode,SWT.BORDER);
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  final GridData gdata=SWTUtil.createFillGridData();
  table.setLayoutData(gdata);
  TableColumn c=new TableColumn(table,SWT.NONE);
  c.setText(Resources.getMessage("String_Node_Str"));
  columns.add(c);
  c=new TableColumn(table,SWT.NONE);
  c.setText(Resources.getMessage("String_Node_Str"));
  columns.add(c);
  for (  final TableColumn col : columns) {
    col.pack();
  }
}

Fixed version (ground truth):
/** 
 * Creates the required controls
 * @param groupNode
 */
private void createNodeGroup(final Composite groupNode){
  table=new Table(groupNode,SWT.BORDER);
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  final GridData gdata=SWTUtil.createFillGridData();
  table.setLayoutData(gdata);
  TableColumn c=new TableColumn(table,SWT.NONE);
  c.setText(Resources.getMessage("String_Node_Str"));
  columns.add(c);
  c=new TableColumn(table,SWT.NONE);
  c.setText(Resources.getMessage("String_Node_Str"));
  columns.add(c);
  for (  final TableColumn col : columns) {
    col.pack();
  }
}
Program: 108848
Project: 108848
Buggy source:
public void stop(){
  stop=true;
synchronized (monitor) {
    try {
      monitor.wait();
    }
 catch (    final InterruptedException e) {
    }
  }
}

Fixed version (ground truth):
public void stop(){
  stop=true;
synchronized (monitor) {
    try {
      while (synchronizer != null) {
        monitor.wait();
      }
    }
 catch (    final InterruptedException e) {
    }
  }
}
Program: 108849
Project: 108849
Buggy source:
public void stop(){
  stop=true;
synchronized (stop) {
    try {
      stop.wait();
    }
 catch (    final InterruptedException e) {
    }
  }
}

Fixed version (ground truth):
public void stop(){
  stop=true;
synchronized (LayoutAnalyze.this) {
    try {
      LayoutAnalyze.this.wait();
    }
 catch (    final InterruptedException e) {
    }
  }
}
Program: 108850
Project: 108850
Buggy source:
@Override public void run(){
  final long time=System.currentTimeMillis();
  while (!stop && ((System.currentTimeMillis() - time) < 1000)) {
    if ((in != null) && (out != null)) {
      try {
        if (Display.getCurrent() != null) {
          runnable.run();
        }
 else {
          Display.getDefault().syncExec(runnable);
        }
      }
 catch (      final Exception e) {
      }
    }
    try {
      Thread.sleep(10);
    }
 catch (    final InterruptedException e) {
    }
  }
  synchronizer=null;
synchronized (stop) {
    stop.notify();
  }
}

Fixed version (ground truth):
@Override public void run(){
  final long time=System.currentTimeMillis();
  while (!stop && ((System.currentTimeMillis() - time) < 1000)) {
    if ((in != null) && (out != null)) {
      try {
        if (Display.getCurrent() != null) {
          runnable.run();
        }
 else {
          Display.getDefault().syncExec(runnable);
        }
      }
 catch (      final Exception e) {
      }
    }
    try {
      Thread.sleep(10);
    }
 catch (    final InterruptedException e) {
    }
  }
  synchronizer=null;
synchronized (LayoutAnalyze.this) {
    LayoutAnalyze.this.notify();
  }
}
Program: 108851
Project: 108851
Buggy source:
@Override public void reset(){
  if (chart != null) {
    chart.dispose();
  }
  chart=new Chart(parent,SWT.NONE);
  chart.setOrientation(SWT.HORIZONTAL);
  final ITitle graphTitle=chart.getTitle();
  graphTitle.setText("String_Node_Str");
  graphTitle.setFont(MainWindow.FONT);
  chart.setBackground(parent.getBackground());
  if (System.getProperty("String_Node_Str").toLowerCase().contains("String_Node_Str")) {
    int r=chart.getBackground().getRed() - 13;
    int g=chart.getBackground().getGreen() - 13;
    int b=chart.getBackground().getBlue() - 13;
    r=r > 0 ? r : 0;
    r=g > 0 ? g : 0;
    r=b > 0 ? b : 0;
    final org.eclipse.swt.graphics.Color c2=new org.eclipse.swt.graphics.Color(controller.getResources().getDisplay(),r,g,b);
    chart.setBackground(c2);
    chart.addDisposeListener(new DisposeListener(){
      public void widgetDisposed(      DisposeEvent arg0){
        c2.dispose();
      }
    }
);
  }
  final IAxisSet axisSet=chart.getAxisSet();
  final IAxis yAxis=axisSet.getYAxis(0);
  final IAxis xAxis=axisSet.getXAxis(0);
  final ITitle xAxisTitle=xAxis.getTitle();
  xAxisTitle.setText("String_Node_Str");
  xAxis.getTitle().setFont(MainWindow.FONT);
  yAxis.getTitle().setFont(MainWindow.FONT);
  xAxis.getTick().setFont(MainWindow.FONT);
  yAxis.getTick().setFont(MainWindow.FONT);
  final ITitle yAxisTitle=yAxis.getTitle();
  yAxisTitle.setText("String_Node_Str");
  if (chart != null) {
    chart.setEnabled(false);
  }
}

Fixed version (ground truth):
@Override public void reset(){
  if (chart != null) {
    chart.dispose();
  }
  chart=new Chart(parent,SWT.NONE);
  chart.setOrientation(SWT.HORIZONTAL);
  final ITitle graphTitle=chart.getTitle();
  graphTitle.setText("String_Node_Str");
  graphTitle.setFont(MainWindow.FONT);
  chart.setBackground(parent.getBackground());
  if (System.getProperty("String_Node_Str").toLowerCase().contains("String_Node_Str")) {
    int r=chart.getBackground().getRed() - 13;
    int g=chart.getBackground().getGreen() - 13;
    int b=chart.getBackground().getBlue() - 13;
    r=r > 0 ? r : 0;
    r=g > 0 ? g : 0;
    r=b > 0 ? b : 0;
    final org.eclipse.swt.graphics.Color c2=new org.eclipse.swt.graphics.Color(controller.getResources().getDisplay(),r,g,b);
    chart.setBackground(c2);
    chart.addDisposeListener(new DisposeListener(){
      public void widgetDisposed(      DisposeEvent arg0){
        c2.dispose();
      }
    }
);
  }
  final IAxisSet axisSet=chart.getAxisSet();
  final IAxis yAxis=axisSet.getYAxis(0);
  final IAxis xAxis=axisSet.getXAxis(0);
  final ITitle xAxisTitle=xAxis.getTitle();
  xAxisTitle.setText("String_Node_Str");
  xAxis.getTitle().setFont(MainWindow.FONT);
  yAxis.getTitle().setFont(MainWindow.FONT);
  xAxis.getTick().setFont(MainWindow.FONT);
  yAxis.getTick().setFont(MainWindow.FONT);
  final ITitle yAxisTitle=yAxis.getTitle();
  yAxisTitle.setText("String_Node_Str");
  chart.setEnabled(false);
}
Program: 108852
Project: 108852
Buggy source:
public ViewData getIn(){
  return in;
}

Fixed version (ground truth):
/** 
 * Returns the input view
 * @return
 */
public ViewData getIn(){
  return in;
}
Program: 108853
Project: 108853
Buggy source:
public Synchronizer(final ViewData in,final ViewData out){
  this.in=in;
  this.out=out;
  runnable=new Runnable(){
    @Override public void run(){
      out.getViewportLayer().setOriginRowPosition(in.getViewportLayer().getOriginRowPosition());
      out.getViewportLayer().setOriginColumnPosition(in.getViewportLayer().getOriginColumnPosition());
    }
  }
;
  new Thread(this).start();
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 * @param in
 * @param out
 */
public Synchronizer(final ViewData in,final ViewData out){
  this.in=in;
  this.out=out;
  runnable=new Runnable(){
    @Override public void run(){
      ViewportLayer outLayer=out.getViewportLayer();
      ViewportLayer inLayer=in.getViewportLayer();
      outLayer.setOriginRowPosition(inLayer.getOriginRowPosition());
      outLayer.setOriginColumnPosition(inLayer.getOriginColumnPosition());
    }
  }
;
  new Thread(this).start();
}
Program: 108854
Project: 108854
Buggy source:
public void stop(){
  stop=true;
synchronized (LayoutAnalyze.this) {
    try {
      LayoutAnalyze.this.wait();
    }
 catch (    final InterruptedException e) {
    }
  }
}

Fixed version (ground truth):
public void stop(){
  stop=true;
synchronized (monitor) {
    try {
      monitor.wait();
    }
 catch (    final InterruptedException e) {
    }
  }
}