nus-yam/ex-repair huggingface dataset:
Program: 108276
Project: 108276
Buggy source:
/** 
 * Returns the matching interval.
 * @param index
 * @param type
 * @param tValue
 * @return
 */
@SuppressWarnings("String_Node_Str") private Interval<T> getIntervalUpperSnap(IndexNode index,DataTypeWithRatioScale<T> type,T tValue){
  int shift=(int)Math.floor(type.ratio(type.subtract(tValue,index.min),type.subtract(index.max,index.min)));
  T offset=type.multiply(type.subtract(index.max,index.min),shift);
  T value=type.subtract(tValue,offset);
  Interval<T> interval=null;
  for (int j=0; j < intervals.size(); j++) {
    Interval<T> i=intervals.get(j);
    if (type.compare(i.min,value) <= 0 && type.compare(i.max,value) > 0) {
      if (type.compare(value,i.min) == 0) {
        if (j > 0) {
          interval=intervals.get(j - 1);
          break;
        }
 else {
          interval=intervals.get(intervals.size() - 1);
          offset=type.multiply(type.subtract(index.max,index.min),shift - 1);
          break;
        }
      }
 else {
        interval=i;
        break;
      }
    }
  }
  if (interval == null && intervals.size() == 1) {
    interval=intervals.get(0);
  }
  if (interval == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  T lower=type.add(interval.min,offset);
  T upper=type.add(interval.max,offset);
  return new Interval<T>(this,(DataType<T>)type,lower,upper,interval.function);
}

Fixed version (ground truth):
/** 
 * Returns the matching interval.
 * @param index
 * @param type
 * @param tValue
 * @return
 */
@SuppressWarnings("String_Node_Str") private Interval<T> getIntervalUpperSnap(IndexNode index,DataTypeWithRatioScale<T> type,T tValue){
  double shift=Math.floor(type.ratio(type.subtract(tValue,index.min),type.subtract(index.max,index.min)));
  T offset=type.multiply(type.subtract(index.max,index.min),shift);
  T value=type.subtract(tValue,offset);
  Interval<T> interval=null;
  for (int j=0; j < intervals.size(); j++) {
    Interval<T> i=intervals.get(j);
    if (type.compare(i.min,value) <= 0 && type.compare(i.max,value) > 0) {
      if (type.compare(value,i.min) == 0) {
        if (j > 0) {
          interval=intervals.get(j - 1);
          break;
        }
 else {
          interval=intervals.get(intervals.size() - 1);
          offset=type.multiply(type.subtract(index.max,index.min),shift - 1);
          break;
        }
      }
 else {
        interval=i;
        break;
      }
    }
  }
  if (interval == null && intervals.size() == 1) {
    interval=intervals.get(0);
  }
  if (interval == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  T lower=type.add(interval.min,offset);
  T upper=type.add(interval.max,offset);
  return new Interval<T>(this,(DataType<T>)type,lower,upper,interval.function);
}
Program: 108277
Project: 108277
Buggy source:
/** 
 * Returns the geometric mean.
 * @return
 */
private double getMean(){
  double[] values=getValues();
  double result=1.0d;
  for (int i=0; i < values.length; i++) {
    result*=Math.pow(values[i],1.0d / (double)values.length);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Returns the geometric mean. Handles zero values by adding 1 to each component and subtracting 1 from the result.
 * @return
 */
private double getMean(){
  double[] values=getValues();
  double result=1.0d;
  for (int i=0; i < values.length; i++) {
    result*=Math.pow(values[i] + 1.0d,1.0d / (double)values.length);
  }
  return result - 1d;
}
Program: 108278
Project: 108278
Buggy source:
/** 
 * Main entry point.
 * @param args
 */
public static void main(final String[] args){
  try {
    Display display=new Display();
    Monitor monitor=getMonitor(display);
    splash=new MainSplash(display,monitor);
    splash.show();
    main=new MainWindow(display,monitor);
    main.show();
    if (args.length > 0 && args[0].endsWith("String_Node_Str")) {
      main.onShow(new Runnable(){
        public void run(){
          load(main,args[0]);
        }
      }
);
    }
    while (!main.isDisposed()) {
      try {
        if (!display.readAndDispatch()) {
          display.sleep();
        }
      }
 catch (      final Exception e) {
        main.showErrorDialog(Resources.getMessage("String_Node_Str") + Resources.getMessage("String_Node_Str"),e);
        StringWriter sw=new StringWriter();
        PrintWriter pw=new PrintWriter(sw);
        e.printStackTrace(pw);
        main.getController().getResources().getLogger().info(sw.toString());
      }
    }
    if (!display.isDisposed()) {
      display.dispose();
    }
  }
 catch (  Throwable e) {
    if (splash != null)     splash.hide();
    StringWriter sw=new StringWriter();
    PrintWriter pw=new PrintWriter(sw);
    e.printStackTrace(pw);
    final String trace=sw.toString();
    JOptionPane.showMessageDialog(null,trace,"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    System.exit(1);
  }
}

Fixed version (ground truth):
/** 
 * Main entry point.
 * @param args
 */
public static void main(final String[] args){
  try {
    Display display=new Display();
    Monitor monitor=getMonitor(display);
    splash=new MainSplash(display,monitor);
    splash.show();
    main=new MainWindow(display,monitor);
    if (args.length > 0 && args[0].endsWith("String_Node_Str")) {
      main.onShow(new Runnable(){
        public void run(){
          load(main,args[0]);
        }
      }
);
    }
    main.show();
    while (!main.isDisposed()) {
      try {
        if (!display.readAndDispatch()) {
          display.sleep();
        }
      }
 catch (      final Exception e) {
        main.showErrorDialog(Resources.getMessage("String_Node_Str") + Resources.getMessage("String_Node_Str"),e);
        StringWriter sw=new StringWriter();
        PrintWriter pw=new PrintWriter(sw);
        e.printStackTrace(pw);
        main.getController().getResources().getLogger().info(sw.toString());
      }
    }
    if (!display.isDisposed()) {
      display.dispose();
    }
  }
 catch (  Throwable e) {
    if (splash != null)     splash.hide();
    StringWriter sw=new StringWriter();
    PrintWriter pw=new PrintWriter(sw);
    e.printStackTrace(pw);
    final String trace=sw.toString();
    JOptionPane.showMessageDialog(null,trace,"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    System.exit(1);
  }
}
Program: 108279
Project: 108279
Buggy source:
@Override protected double getAggregate(){
  double[] values=getValues();
  double[] weights=getWeights();
  double result=1.0d;
  for (int i=0; i < values.length; i++) {
    result*=Math.pow(values[i] * weights[i],1.0d / (double)values.length);
  }
  return result;
}

Fixed version (ground truth):
@Override protected double getAggregate(){
  double[] values=getValues();
  double[] weights=getWeights();
  double result=1.0d;
  for (int i=0; i < values.length; i++) {
    result*=Math.pow((values[i] > 0d ? values[i] : 1d) * weights[i],1.0d / (double)values.length);
  }
  return result;
}
Program: 108280
Project: 108280
Buggy source:
/** 
 * Resets the view.
 */
@Override public void reset(){
  tiles.setRedraw(false);
  tiles.setItems(new ArrayList<ARXNode>());
  tiles.setRedraw(true);
  SWTUtil.disable(tiles);
}

Fixed version (ground truth):
/** 
 * Resets the view.
 */
@Override public void reset(){
  tiles.setRedraw(false);
  tiles.setItems(new ArrayList<ARXNode>());
  tiles.setRedraw(true);
  tiles.setFilter(new Filter<ARXNode>(){
    public boolean accepts(    ARXNode arg0){
      return true;
    }
  }
);
  tiles.update();
  SWTUtil.disable(tiles);
}
Program: 108281
Project: 108281
Buggy source:
@Override protected double getAggregate(){
  double[] values=getValues();
  double[] weights=getWeights();
  double result=1.0d;
  for (int i=0; i < values.length; i++) {
    result*=Math.pow((values[i] > 0d ? values[i] : 1d) * weights[i],1.0d / (double)values.length);
  }
  return result;
}

Fixed version (ground truth):
@Override protected double getAggregate(){
  double[] values=getValues();
  double[] weights=getWeights();
  double result=1.0d;
  for (int i=0; i < values.length; i++) {
    result*=Math.pow((values[i] > 0d ? values[i] : Double.MIN_VALUE) * weights[i],1.0d / (double)values.length);
  }
  return result;
}
Program: 108282
Project: 108282
Buggy source:
/** 
 * Creates a new instance.
 * @param maxLevels
 * @param maxNumNodesInitial
 */
@SuppressWarnings("String_Node_Str") public ModelNodeFilter(final int[] maxLevels,final int maxNumNodesInitial){
  this.maxNumNodesInitial=maxNumNodesInitial;
  this.generalizations=new Set[maxLevels.length];
  for (int i=0; i < generalizations.length; i++) {
    generalizations[i]=new HashSet<Integer>();
  }
}

Fixed version (ground truth):
/** 
 * Creates a new instance used for cloning.
 * @param anonymity
 * @param generalizations
 * @param maxNumNodesInitial
 * @param minInformationLoss
 * @param maxInformationLoss
 */
@SuppressWarnings("String_Node_Str") private ModelNodeFilter(Set<Anonymity> anonymity,Set<Integer>[] generalizations,int maxNumNodesInitial,double minInformationLoss,double maxInformationLoss){
  for (  Anonymity element : anonymity) {
    this.anonymity.add(element);
  }
  this.generalizations=new Set[generalizations.length];
  for (int i=0; i < generalizations.length; i++) {
    Set<Integer> current=generalizations[i];
    this.generalizations[i]=new HashSet<Integer>();
    for (    Integer integer : current) {
      this.generalizations[i].add(integer);
    }
  }
  this.maxNumNodesInitial=maxNumNodesInitial;
  this.minInformationLoss=minInformationLoss;
  this.maxInformationLoss=maxInformationLoss;
}
Program: 108283
Project: 108283
Buggy source:
public boolean accepts(ARXNode node){
  return filter.isAllowed(lattice,node);
}

Fixed version (ground truth):
public boolean accepts(ARXNode node){
  return filterClone.isAllowed(lattice,node);
}
Program: 108284
Project: 108284
Buggy source:
/** 
 * Updates the filter
 * @param lattice
 * @param filter
 */
private void updateFilter(final ARXLattice lattice,final ModelNodeFilter filter){
  if (filter == null)   return;
  controller.getResources().getDisplay().asyncExec(new Runnable(){
    public void run(){
      tiles.setFilter(new Filter<ARXNode>(){
        public boolean accepts(        ARXNode node){
          return filter.isAllowed(lattice,node);
        }
      }
);
      tiles.update();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Updates the filter
 * @param lattice
 * @param filter
 */
private void updateFilter(final ARXLattice lattice,final ModelNodeFilter filter){
  if (filter == null)   return;
  final ModelNodeFilter filterClone=filter.clone();
  controller.getResources().getDisplay().asyncExec(new Runnable(){
    public void run(){
      tiles.setFilter(new Filter<ARXNode>(){
        public boolean accepts(        ARXNode node){
          return filterClone.isAllowed(lattice,node);
        }
      }
);
      tiles.update();
    }
  }
);
}
Program: 108285
Project: 108285
Buggy source:
@Override public Color decorate(ARXNode element){
switch (element.getAnonymity()) {
case NOT_ANONYMOUS:
case UNKNOWN:
case PROBABLY_NOT_ANONYMOUS:
    return new Color(tiles.getDisplay(),160,160,160);
default :
  return gradient.getColor(asRelativeValue(element.getMinimumInformationLoss()) / 100d);
}
}

Fixed version (ground truth):
@Override public Color decorate(ARXNode element){
switch (element.getAnonymity()) {
case NOT_ANONYMOUS:
case UNKNOWN:
case PROBABLY_NOT_ANONYMOUS:
    return gray;
default :
  return gradient.getColor(asRelativeValue(element.getMinimumInformationLoss()) / 100d);
}
}
Program: 108286
Project: 108286
Buggy source:
/** 
 * Creates a background decorator
 * @return
 */
private DecoratorColor<ARXNode> createDecoratorBackgroundColor(){
  final Gradient gradient=new GradientHeatscale(tiles);
  DecoratorColor<ARXNode> decorator=new DecoratorColor<ARXNode>(){
    @Override public Color decorate(    ARXNode element){
switch (element.getAnonymity()) {
case NOT_ANONYMOUS:
case UNKNOWN:
case PROBABLY_NOT_ANONYMOUS:
        return new Color(tiles.getDisplay(),160,160,160);
default :
      return gradient.getColor(asRelativeValue(element.getMinimumInformationLoss()) / 100d);
  }
}
}
;
decorator.addDecoratorListener(new DecoratorListener(){
@Override public void disposed(){
  gradient.dispose();
}
}
);
return decorator;
}

Fixed version (ground truth):
/** 
 * Creates a background decorator
 * @return
 */
private DecoratorColor<ARXNode> createDecoratorBackgroundColor(){
  final Gradient gradient=new GradientHeatscale(tiles);
  final Color gray=new Color(tiles.getDisplay(),160,160,160);
  DecoratorColor<ARXNode> decorator=new DecoratorColor<ARXNode>(){
    @Override public Color decorate(    ARXNode element){
switch (element.getAnonymity()) {
case NOT_ANONYMOUS:
case UNKNOWN:
case PROBABLY_NOT_ANONYMOUS:
        return gray;
default :
      return gradient.getColor(asRelativeValue(element.getMinimumInformationLoss()) / 100d);
  }
}
}
;
decorator.addDecoratorListener(new DecoratorListener(){
@Override public void disposed(){
  gradient.dispose();
  gray.dispose();
}
}
);
return decorator;
}
Program: 108287
Project: 108287
Buggy source:
/** 
 * Resets the view.
 */
@Override public void reset(){
  tiles.setRedraw(false);
  tiles.setItems(new ArrayList<ARXNode>());
  tiles.setRedraw(true);
  tiles.setFilter(new Filter<ARXNode>(){
    public boolean accepts(    ARXNode arg0){
      return true;
    }
  }
);
  tiles.update();
  SWTUtil.disable(tiles);
}

Fixed version (ground truth):
/** 
 * Resets the view.
 */
@Override public void reset(){
  tiles.setRedraw(false);
  tiles.setItems(new ArrayList<ARXNode>());
  tiles.setRedraw(true);
  tiles.setFilter(new Filter<ARXNode>(){
    public boolean accepts(    ARXNode arg0){
      return true;
    }
  }
);
  tiles.update();
  final int index=(levels[level].length - 1 - levelsize[level]);
  SWTUtil.disable(tiles);
}
Program: 108288
Project: 108288
Buggy source:
@Override public void disposed(){
  gradient.dispose();
}

Fixed version (ground truth):
@Override public void disposed(){
  gradient.dispose();
  gray.dispose();
}
Program: 108289
Project: 108289
Buggy source:
/** 
 * De-serialization.
 * @param aInputStream
 * @throws ClassNotFoundException
 * @throws IOException
 */
private void readObject(ObjectInputStream aInputStream) throws ClassNotFoundException, IOException {
  aInputStream.defaultReadObject();
  this.metric=Metric.createMetric(this.metric,getDeserializationContext().minLevel,getDeserializationContext().maxLevel);
}

Fixed version (ground truth):
/** 
 * De-serialization.
 * @param aInputStream
 * @throws ClassNotFoundException
 * @throws IOException
 */
private void readObject(ObjectInputStream aInputStream) throws ClassNotFoundException, IOException {
  aInputStream.defaultReadObject();
  this.maximumInformationLoss=InformationLoss.createInformationLoss(this.maximumInformationLoss,metric,getDeserializationContext().minLevel,getDeserializationContext().maxLevel);
  this.minimumInformationLoss=InformationLoss.createInformationLoss(this.minimumInformationLoss,metric,getDeserializationContext().minLevel,getDeserializationContext().maxLevel);
  this.metric=Metric.createMetric(this.metric,getDeserializationContext().minLevel,getDeserializationContext().maxLevel);
}
Program: 108290
Project: 108290
Buggy source:
@Override protected void initializeInternal(DataDefinition definition,Data input,GeneralizationHierarchy[] hierarchies,ARXConfiguration config){
  super.initializeInternal(definition,input,hierarchies,config);
  RowSet subset=null;
  if (config.containsCriterion(DPresence.class)) {
    Set<DPresence> criterion=config.getCriteria(DPresence.class);
    if (criterion.size() > 1) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    subset=criterion.iterator().next().getSubset().getSet();
  }
  this.cardinalities=new Cardinalities(input,subset,hierarchies);
  cache=new double[hierarchies.length][];
  for (int i=0; i < cache.length; i++) {
    cache[i]=new double[hierarchies[i].getArray()[0].length];
    Arrays.fill(cache[i],NOT_AVAILABLE);
  }
  final int[][] data=input.getArray();
  this.hierarchies=new int[data[0].length][][];
  for (int i=0; i < hierarchies.length; i++) {
    this.hierarchies[i]=hierarchies[i].getArray();
  }
  double[] min=new double[hierarchies.length];
  Arrays.fill(min,0d);
  double[] max=new double[hierarchies.length];
  for (int i=0; i < max.length; i++) {
    max[i]=input.getDataLength() * log2(hierarchies[i].getArray().length);
  }
  super.setMax(max);
  super.setMin(min);
}

Fixed version (ground truth):
@Override protected void initializeInternal(DataDefinition definition,Data input,GeneralizationHierarchy[] hierarchies,ARXConfiguration config){
  super.initializeInternal(definition,input,hierarchies,config);
  RowSet subset=null;
  if (config.containsCriterion(DPresence.class)) {
    Set<DPresence> criterion=config.getCriteria(DPresence.class);
    if (criterion.size() > 1) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    subset=criterion.iterator().next().getSubset().getSet();
  }
  this.cardinalities=new Cardinalities(input,subset,hierarchies);
  cache=new double[hierarchies.length][];
  for (int i=0; i < cache.length; i++) {
    cache[i]=new double[hierarchies[i].getArray()[0].length];
    Arrays.fill(cache[i],NOT_AVAILABLE);
  }
  final int[][] data=input.getArray();
  this.hierarchies=new int[data[0].length][][];
  for (int i=0; i < hierarchies.length; i++) {
    this.hierarchies[i]=hierarchies[i].getArray();
  }
  double[] min=new double[hierarchies.length];
  Arrays.fill(min,0d);
  double[] max=new double[hierarchies.length];
  for (int i=0; i < max.length; i++) {
    max[i]=input.getDataLength() * log2(input.getDataLength());
  }
  super.setMax(max);
  super.setMin(min);
}
Program: 108291
Project: 108291
Buggy source:
@Override protected void initializeInternal(DataDefinition definition,Data input,GeneralizationHierarchy[] hierarchies,ARXConfiguration config){
  super.initializeInternal(definition,input,hierarchies,config);
  double[] min=new double[hierarchies.length];
  Arrays.fill(min,0d);
  double[] max=new double[hierarchies.length];
  for (int i=0; i < max.length; i++) {
    max[i]=2d * input.getDataLength() * log2(hierarchies[i].getArray().length);
  }
  super.setMax(max);
  super.setMin(min);
}

Fixed version (ground truth):
@Override protected void initializeInternal(DataDefinition definition,Data input,GeneralizationHierarchy[] hierarchies,ARXConfiguration config){
  super.initializeInternal(definition,input,hierarchies,config);
  double[] min=new double[hierarchies.length];
  Arrays.fill(min,0d);
  double[] max=new double[hierarchies.length];
  for (int i=0; i < max.length; i++) {
    max[i]=2d * input.getDataLength() * log2(input.getDataLength());
  }
  super.setMax(max);
  super.setMin(min);
}
Program: 108292
Project: 108292
Buggy source:
/** 
 * Sets the lower bound
 * @return
 */
public void setLowerBound(final InformationLoss<?> a){
  node.lowerBound=a;
}

Fixed version (ground truth):
/** 
 * Sets the lower bound
 * @return
 */
public void setLowerBound(final InformationLoss<?> a){
  node.lowerBound=InformationLoss.createInformationLoss(a,metric);
}
Program: 108293
Project: 108293
Buggy source:
/** 
 * Sets the minimal information loss
 * @return
 */
public void setMinimumInformationLoss(final InformationLoss<?> a){
  node.minInformationLoss=a;
}

Fixed version (ground truth):
/** 
 * Sets the minimal information loss
 * @return
 */
public void setMinimumInformationLoss(final InformationLoss<?> a){
  node.minInformationLoss=InformationLoss.createInformationLoss(a,metric);
}
Program: 108294
Project: 108294
Buggy source:
/** 
 * Sets the maximal information loss
 * @return
 */
public void setMaximumInformationLoss(final InformationLoss<?> a){
  node.maxInformationLoss=a;
}

Fixed version (ground truth):
/** 
 * Sets the maximal information loss
 * @return
 */
public void setMaximumInformationLoss(final InformationLoss<?> a){
  node.maxInformationLoss=InformationLoss.createInformationLoss(a,metric);
}
Program: 108295
Project: 108295
Buggy source:
/** 
 * Converter method
 * @param other
 * @return
 */
private InformationLossDefault convert(InformationLoss<?> other){
  if (other == null)   return null;
  if (!(other instanceof InformationLossDefault)) {
    throw new IllegalStateException("String_Node_Str");
  }
 else {
    return (InformationLossDefault)other;
  }
}

Fixed version (ground truth):
/** 
 * Converter method
 * @param other
 * @return
 */
private InformationLossDefault convert(InformationLoss<?> other){
  if (other == null)   return null;
  if (!(other instanceof InformationLossDefault)) {
    throw new IllegalStateException("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ other.getClass().getSimpleName());
  }
 else {
    return (InformationLossDefault)other;
  }
}
Program: 108296
Project: 108296
Buggy source:
@Override public double relativeTo(InformationLoss<?> min,InformationLoss<?> max){
  double _min=convert(min).mean;
  double _max=convert(max).mean;
  if (_max - _min == 0d)   return 0d;
 else   return (this.mean - _min) / (_max - _min);
}

Fixed version (ground truth):
@Override public double relativeTo(InformationLoss<?> min,InformationLoss<?> max){
  double _min=convert(min).mean;
  double _max=convert(max).mean;
  if (_max - _min == 0d)   return 0d;
  double result=(this.mean - _min) / (_max - _min);
  return result < 0d ? 0d : (result > 1d ? 1d : result);
}
Program: 108297
Project: 108297
Buggy source:
@Override public void setVisible(boolean value){
  if (value) {
    this.composite.setRedraw(false);
    list.removeAll();
    this.view.setHierarchy(Hierarchy.create());
    if (groups != null) {
      for (      int count : groups) {
        list.add(String.valueOf(count));
      }
    }
    if (hierarchy != null) {
      view.setHierarchy(hierarchy);
    }
    this.composite.setRedraw(true);
    Button load=this.wizard.getLoadButton();
    if (load != null)     load.setEnabled(false);
    Button save=this.wizard.getSaveButton();
    if (save != null)     save.setEnabled(false);
  }
  super.setVisible(value);
}

Fixed version (ground truth):
@Override public void setVisible(boolean value){
  if (value) {
    this.composite.setRedraw(false);
    list.removeAll();
    this.view.setHierarchy(Hierarchy.create());
    if (groups != null) {
      for (      int count : groups) {
        list.add(String.valueOf(count));
      }
    }
    if (hierarchy != null) {
      view.setHierarchy(hierarchy);
    }
    this.composite.layout(true);
    this.composite.setRedraw(true);
    Button load=this.wizard.getLoadButton();
    if (load != null)     load.setEnabled(false);
    Button save=this.wizard.getSaveButton();
    if (save != null)     save.setEnabled(false);
  }
  super.setVisible(value);
}
Program: 108298
Project: 108298
Buggy source:
public void widgetSelected(SelectionEvent arg0){
  double value=knob.getValue();
  label.setText(format.format(value));
  label.setToolTipText(String.valueOf(value));
  if (Double.parseDouble(format.format(value)) == 0d && value > 0d) {
    label.setText("String_Node_Str");
  }
  if (Double.parseDouble(format.format(value)) == 1d && value < 1d) {
    label.setText("String_Node_Str");
  }
  if (model != null && model.getInputConfig() != null) {
    model.getInputConfig().setAttributeWeight(attribute,value);
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent arg0){
  double value=knob.getValue();
  label.setText(format.format(value));
  label.setToolTipText(String.valueOf(value));
  try {
    double parsedValue=format.parse(format.format(value)).doubleValue();
    if (parsedValue == 0d && value > 0d) {
      label.setText("String_Node_Str");
    }
    if (parsedValue == 1d && value < 1d) {
      label.setText("String_Node_Str");
    }
  }
 catch (  ParseException e) {
  }
  if (model != null && model.getInputConfig() != null) {
    model.getInputConfig().setAttributeWeight(attribute,value);
  }
}
Program: 108306
Project: 108306
Buggy source:
@Override public void update(final ModelEvent event){
  if (event.part == ModelPart.MODEL) {
    model=(Model)event.data;
    root.setRedraw(false);
    sliderOutliers.setSelection(SWTUtil.doubleToSlider(0d,0.999d,model.getInputConfig().getAllowedOutliers()));
    labelOutliers.setText(String.valueOf(model.getInputConfig().getAllowedOutliers()));
    buttonPracticalMonotonicity.setSelection(model.getInputConfig().isPracticalMonotonicity());
    updateControlls();
    root.setRedraw(true);
  }
 else   if (event.part == ModelPart.INPUT) {
    SWTUtil.enable(root);
    updateControlls();
  }
 else   if (event.part == ModelPart.SELECTED_ATTRIBUTE || event.part == ModelPart.ATTRIBUTE_TYPE || event.part == ModelPart.CRITERION_DEFINITION || event.part == ModelPart.METRIC) {
    if (model != null) {
      updateControlls();
    }
  }
}

Fixed version (ground truth):
@Override public void update(final ModelEvent event){
  if (event.part == ModelPart.MODEL) {
    model=(Model)event.data;
    sliderOutliers.setSelection(SWTUtil.doubleToSlider(0d,0.999d,model.getInputConfig().getAllowedOutliers()));
    labelOutliers.setText(String.valueOf(model.getInputConfig().getAllowedOutliers()));
    buttonPracticalMonotonicity.setSelection(model.getInputConfig().isPracticalMonotonicity());
    updateControlls();
  }
 else   if (event.part == ModelPart.INPUT) {
    SWTUtil.enable(root);
    updateControlls();
  }
 else   if (event.part == ModelPart.SELECTED_ATTRIBUTE || event.part == ModelPart.ATTRIBUTE_TYPE || event.part == ModelPart.CRITERION_DEFINITION || event.part == ModelPart.METRIC) {
    if (model != null) {
      updateControlls();
    }
  }
}
Program: 108307
Project: 108307
Buggy source:
/** 
 * @return the heights
 */
protected int[] getHeights(){
  return height;
}

Fixed version (ground truth):
/** 
 * @return the heights
 */
protected int[] getHeights(){
  return maxLevels;
}
Program: 108308
Project: 108308
Buggy source:
@Override protected void initializeInternal(final DataDefinition definition,final Data input,final GeneralizationHierarchy[] hierarchies,final ARXConfiguration config){
  super.initializeInternal(definition,input,hierarchies,config);
  height=new int[hierarchies.length];
  for (int j=0; j < height.length; j++) {
    height[j]=hierarchies[j].getArray()[0].length - 1;
  }
}

Fixed version (ground truth):
@Override protected void initializeInternal(final DataDefinition definition,final Data input,final GeneralizationHierarchy[] hierarchies,final ARXConfiguration config){
  super.initializeInternal(definition,input,hierarchies,config);
  maxLevels=new int[hierarchies.length];
  for (int j=0; j < maxLevels.length; j++) {
    maxLevels[j]=hierarchies[j].getArray()[0].length - 1;
  }
}
Program: 108309
Project: 108309
Buggy source:
@Override protected InformationLossWithBound<InformationLossDefault> getInformationLossInternal(final Node node,final IHashGroupify g){
  double result=0;
  final int[] transformation=node.getTransformation();
  for (int i=0; i < transformation.length; i++) {
    double weight=weights != null ? weights[i] : 1d;
    double level=(double)transformation[i];
    result+=height[i] == 0 ? 0 : (level / (double)height[i]) * weight;
  }
  result/=(double)transformation.length;
  return new InformationLossDefaultWithBound(result,result);
}

Fixed version (ground truth):
@Override protected InformationLossWithBound<InformationLossDefault> getInformationLossInternal(final Node node,final IHashGroupify g){
  double result=0;
  final int[] transformation=node.getTransformation();
  for (int i=0; i < transformation.length; i++) {
    double weight=weights != null ? weights[i] : 1d;
    double level=(double)transformation[i];
    result+=maxLevels[i] == 0 ? 0 : (level / (double)maxLevels[i]) * weight;
  }
  result/=(double)transformation.length;
  return new InformationLossDefaultWithBound(result,result);
}
Program: 108310
Project: 108310
Buggy source:
@Override public void update(final ModelEvent event){
  if (event.part == ModelPart.MODEL) {
    model=(Model)event.data;
    root.setRedraw(false);
    sliderOutliers.setSelection(SWTUtil.doubleToSlider(0d,0.999d,model.getInputConfig().getAllowedOutliers()));
    labelOutliers.setText(String.valueOf(model.getInputConfig().getAllowedOutliers()));
    buttonPracticalMonotonicity.setSelection(model.getInputConfig().isPracticalMonotonicity());
    root.setRedraw(true);
    updateControlls();
  }
 else   if (event.part == ModelPart.INPUT) {
    SWTUtil.enable(root);
    updateControlls();
  }
 else   if (event.part == ModelPart.SELECTED_ATTRIBUTE || event.part == ModelPart.ATTRIBUTE_TYPE || event.part == ModelPart.CRITERION_DEFINITION || event.part == ModelPart.METRIC) {
    if (model != null) {
      updateControlls();
    }
  }
}

Fixed version (ground truth):
@Override public void update(final ModelEvent event){
  if (event.part == ModelPart.MODEL) {
    model=(Model)event.data;
    sliderOutliers.setSelection(SWTUtil.doubleToSlider(0d,0.999d,model.getInputConfig().getAllowedOutliers()));
    labelOutliers.setText(String.valueOf(model.getInputConfig().getAllowedOutliers()));
    buttonPracticalMonotonicity.setSelection(model.getInputConfig().isPracticalMonotonicity());
    updateControlls();
  }
 else   if (event.part == ModelPart.INPUT) {
    SWTUtil.enable(root);
    updateControlls();
  }
 else   if (event.part == ModelPart.SELECTED_ATTRIBUTE || event.part == ModelPart.ATTRIBUTE_TYPE || event.part == ModelPart.CRITERION_DEFINITION || event.part == ModelPart.METRIC) {
    if (model != null) {
      updateControlls();
    }
  }
}
Program: 108312
Project: 108312
Buggy source:
@Override public void update(final ModelEvent event){
  if (event.part == ModelPart.MODEL) {
    model=(Model)event.data;
    root.setRedraw(false);
    sliderOutliers.setSelection(SWTUtil.doubleToSlider(0d,0.999d,model.getInputConfig().getAllowedOutliers()));
    labelOutliers.setText(String.valueOf(model.getInputConfig().getAllowedOutliers()));
    buttonPracticalMonotonicity.setSelection(model.getInputConfig().isPracticalMonotonicity());
    updateControlls();
    root.setRedraw(true);
  }
 else   if (event.part == ModelPart.INPUT) {
    SWTUtil.enable(root);
    updateControlls();
  }
 else   if (event.part == ModelPart.SELECTED_ATTRIBUTE || event.part == ModelPart.ATTRIBUTE_TYPE || event.part == ModelPart.CRITERION_DEFINITION || event.part == ModelPart.METRIC) {
    if (model != null) {
      updateControlls();
    }
  }
}

Fixed version (ground truth):
@Override public void update(final ModelEvent event){
  if (event.part == ModelPart.MODEL) {
    model=(Model)event.data;
    root.setRedraw(false);
    sliderOutliers.setSelection(SWTUtil.doubleToSlider(0d,0.999d,model.getInputConfig().getAllowedOutliers()));
    labelOutliers.setText(String.valueOf(model.getInputConfig().getAllowedOutliers()));
    buttonPracticalMonotonicity.setSelection(model.getInputConfig().isPracticalMonotonicity());
    root.setRedraw(true);
    updateControlls();
  }
 else   if (event.part == ModelPart.INPUT) {
    SWTUtil.enable(root);
    updateControlls();
  }
 else   if (event.part == ModelPart.SELECTED_ATTRIBUTE || event.part == ModelPart.ATTRIBUTE_TYPE || event.part == ModelPart.CRITERION_DEFINITION || event.part == ModelPart.METRIC) {
    if (model != null) {
      updateControlls();
    }
  }
}
Program: 108313
Project: 108313
Buggy source:
/** 
 * Creates a new instance
 * @param display
 * @throws IOException
 */
public MainSplash(Display display,Monitor monitor){
  this.version=Resources.getVersion();
  this.splash=Resources.getSplash(display);
  this.shell=new Shell(SWT.ON_TOP | SWT.NO_TRIM);
  this.shell.setImages(Resources.getIconSet(display));
  this.shell.setSize(splash.getBounds().width,splash.getBounds().height);
  SWTUtil.center(shell,monitor);
  shell.addPaintListener(new PaintListener(){
    public void paintControl(    PaintEvent arg0){
      paint(arg0.gc);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 * @param display
 * @throws IOException
 */
public MainSplash(Display display,Monitor monitor){
  this.version=Resources.getVersion();
  this.splash=Resources.getSplash(display);
  this.shell=new Shell(SWT.ON_TOP | (isMac() ? 0 : SWT.NO_TRIM));
  this.shell.setImages(Resources.getIconSet(display));
  this.shell.setSize(splash.getBounds().width,splash.getBounds().height);
  SWTUtil.center(shell,monitor);
  shell.addPaintListener(new PaintListener(){
    public void paintControl(    PaintEvent arg0){
      paint(arg0.gc);
    }
  }
);
}
Program: 108314
Project: 108314
Buggy source:
@Override protected double getAggregate(){
  double[] values=getValues();
  double[] weights=getWeights();
  double result=0d;
  for (int i=0; i < values.length; i++) {
    result+=values[i] * weights[i];
  }
  return result;
}

Fixed version (ground truth):
@Override protected double getAggregate(){
  double[] values=getValues();
  double[] weights=getWeights();
  double result=0d;
  for (int i=0; i < values.length; i++) {
    result+=values[i] * weights[i];
  }
  if (Double.isInfinite(result) || Double.isNaN(result)) {
    result=Double.MAX_VALUE;
  }
  return result;
}
Program: 108316
Project: 108316
Buggy source:
/** 
 * Converts the slider value to an integer
 * @param min
 * @param max
 * @param value
 * @return
 */
public static int sliderToInt(final int min,final int max,final int value){
  int val=(int)Math.round(((double)value / (double)SLIDER_MAX) * max);
  if (val < min) {
    val=min;
  }
  if (val > max) {
    val=max;
  }
  return val;
}

Fixed version (ground truth):
/** 
 * Converts the slider value to an integer
 * @param min
 * @param max
 * @param value
 * @return
 */
public static int sliderToInt(final int min,final int max,final int value){
  return (int)Math.round(sliderToDouble(min,max,value));
}
Program: 108317
Project: 108317
Buggy source:
/** 
 * Converts the double value to a slider selection
 */
public static int doubleToSlider(final double min,final double max,final double value){
  double val=((value - min) / max) * SLIDER_MAX;
  val=Math.round(val * SLIDER_MAX) / (double)SLIDER_MAX;
  if (val < 0) {
    val=0;
  }
  if (val > SLIDER_MAX) {
    val=SLIDER_MAX;
  }
  return (int)val;
}

Fixed version (ground truth):
/** 
 * Converts the double value to a slider selection
 */
public static int doubleToSlider(final double min,final double max,final double value){
  int val=(int)Math.round((value - min) / (max - min) * SLIDER_MAX);
  if (val < 0) {
    val=0;
  }
  if (val > SLIDER_MAX) {
    val=SLIDER_MAX;
  }
  return val;
}
Program: 108318
Project: 108318
Buggy source:
/** 
 * Converts the slider value to a double
 * @param min
 * @param max
 * @param value
 * @return
 */
public static double sliderToDouble(final double min,final double max,final int value){
  double val=((double)value / (double)SLIDER_MAX) * max;
  val=Math.round(val * SLIDER_MAX) / (double)SLIDER_MAX;
  if (val < min) {
    val=min;
  }
  if (val > max) {
    val=max;
  }
  return val;
}

Fixed version (ground truth):
/** 
 * Converts the slider value to a double
 * @param min
 * @param max
 * @param value
 * @return
 */
public static double sliderToDouble(final double min,final double max,final int value){
  double val=((double)value / (double)SLIDER_MAX) * (max - min) + min;
  if (val < min) {
    val=min;
  }
  if (val > max) {
    val=max;
  }
  return val;
}
Program: 108319
Project: 108319
Buggy source:
/** 
 * Converts the integer value to a slider selection
 * @param min
 * @param max
 * @param value
 * @return
 */
public static int intToSlider(final int min,final int max,final int value){
  int val=(int)Math.round(((double)(value - min) / (double)max) * SLIDER_MAX);
  if (val < 0) {
    val=0;
  }
  if (val > SLIDER_MAX) {
    val=SLIDER_MAX;
  }
  return val;
}

Fixed version (ground truth):
/** 
 * Converts the integer value to a slider selection
 * @param min
 * @param max
 * @param value
 * @return
 */
public static int intToSlider(final int min,final int max,final int value){
  return doubleToSlider(min,max,value);
}
Program: 108320
Project: 108320
Buggy source:
@Override public void run(final IProgressMonitor arg0) throws InvocationTargetException, InterruptedException {
  arg0.beginTask(Resources.getMessage("String_Node_Str"),8);
  try {
    final ZipFile zip=zipfile;
    readMetadata(zip);
    arg0.worked(1);
    readModel(zip);
    arg0.worked(1);
    final Map<String,ARXNode> map=readLattice(zip);
    arg0.worked(1);
    readClipboard(map,zip);
    arg0.worked(1);
    readFilter(zip);
    arg0.worked(1);
    readConfiguration(map,zip);
    arg0.worked(1);
    zip.close();
    arg0.worked(1);
  }
 catch (  final Exception e) {
    e.printStackTrace();
    error=e;
    arg0.done();
    return;
  }
  result=model;
  arg0.worked(1);
  arg0.done();
}

Fixed version (ground truth):
@Override public void run(final IProgressMonitor arg0) throws InvocationTargetException, InterruptedException {
  arg0.beginTask(Resources.getMessage("String_Node_Str"),8);
  try {
    final ZipFile zip=zipfile;
    readMetadata(zip);
    arg0.worked(1);
    readModel(zip);
    arg0.worked(1);
    final Map<String,ARXNode> map=readLattice(zip);
    arg0.worked(1);
    readClipboard(map,zip);
    arg0.worked(1);
    readFilter(zip);
    arg0.worked(1);
    readConfiguration(map,zip);
    arg0.worked(1);
    setMonotonicity();
    zip.close();
    arg0.worked(1);
  }
 catch (  final Exception e) {
    e.printStackTrace();
    error=e;
    arg0.done();
    return;
  }
  result=model;
  arg0.worked(1);
  arg0.done();
}
Program: 108323
Project: 108323
Buggy source:
/** 
 * Sets the lower bound
 * @return
 */
public void setLowerBound(final InformationLoss<?> a){
  node.lowerBound=InformationLoss.createInformationLoss(a,metric,DESERIALIZATION_CONTEXT_MIN_LEVEL,DESERIALIZATION_CONTEXT_MAX_LEVEL);
}

Fixed version (ground truth):
/** 
 * Sets the lower bound
 * @return
 */
public void setLowerBound(final InformationLoss<?> a){
  node.lowerBound=InformationLoss.createInformationLoss(a,metric,getDeserializationContext().minLevel,getDeserializationContext().maxLevel);
}
Program: 108324
Project: 108324
Buggy source:
/** 
 * De-serialization
 * @param aInputStream
 * @throws ClassNotFoundException
 * @throws IOException
 */
private void readObject(ObjectInputStream aInputStream) throws ClassNotFoundException, IOException {
  aInputStream.defaultReadObject();
  this.metric=Metric.createMetric(this.metric,DESERIALIZATION_CONTEXT_MIN_LEVEL,DESERIALIZATION_CONTEXT_MAX_LEVEL);
}

Fixed version (ground truth):
/** 
 * De-serialization
 * @param aInputStream
 * @throws ClassNotFoundException
 * @throws IOException
 */
private void readObject(ObjectInputStream aInputStream) throws ClassNotFoundException, IOException {
  aInputStream.defaultReadObject();
  this.metric=Metric.createMetric(this.metric,getDeserializationContext().minLevel,getDeserializationContext().maxLevel);
}
Program: 108325
Project: 108325
Buggy source:
/** 
 * Sets the minimal information loss
 * @return
 */
public void setMinimumInformationLoss(final InformationLoss<?> a){
  node.minInformationLoss=InformationLoss.createInformationLoss(a,metric,DESERIALIZATION_CONTEXT_MIN_LEVEL,DESERIALIZATION_CONTEXT_MAX_LEVEL);
}

Fixed version (ground truth):
/** 
 * Sets the minimal information loss
 * @return
 */
public void setMinimumInformationLoss(final InformationLoss<?> a){
  node.minInformationLoss=InformationLoss.createInformationLoss(a,metric,getDeserializationContext().minLevel,getDeserializationContext().maxLevel);
}
Program: 108326
Project: 108326
Buggy source:
/** 
 * Sets the maximal information loss
 * @return
 */
public void setMaximumInformationLoss(final InformationLoss<?> a){
  node.maxInformationLoss=InformationLoss.createInformationLoss(a,metric,DESERIALIZATION_CONTEXT_MIN_LEVEL,DESERIALIZATION_CONTEXT_MAX_LEVEL);
}

Fixed version (ground truth):
/** 
 * Sets the maximal information loss
 * @return
 */
public void setMaximumInformationLoss(final InformationLoss<?> a){
  node.maxInformationLoss=InformationLoss.createInformationLoss(a,metric,getDeserializationContext().minLevel,getDeserializationContext().maxLevel);
}
Program: 108327
Project: 108327
Buggy source:
@Override protected boolean start(final String uri,final String localName,final String qName,final Attributes attributes) throws SAXException {
  if (vocabulary.isMetadata(localName) || vocabulary.isVersion(localName) || vocabulary.isVocabulary(localName)) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override protected boolean start(final String uri,final String localName,final String qName,final Attributes attributes) throws SAXException {
  if (vocabulary.isLevel(localName)) {
    int level=Integer.valueOf(attributes.getValue(vocabulary.getDepth()));
    result[0]=Math.min(result[0],level);
    result[1]=Math.max(result[1],level);
  }
  return true;
}
Program: 108330
Project: 108330
Buggy source:
@Override protected boolean end(final String uri,final String localName,final String qName) throws SAXException {
  if (vocabulary.isMetadata(localName)) {
    if (vocabularyVersion == null) {
      vocabularyVersion="String_Node_Str";
    }
    WorkerLoad.this.vocabulary=Vocabulary.forVersion(vocabularyVersion);
    WorkerLoad.this.vocabulary.checkVersion(version);
  }
 else   if (vocabulary.isVersion(localName)) {
    version=payload;
  }
 else   if (vocabulary.isVocabulary(localName)) {
    vocabularyVersion=payload;
  }
 else {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override protected boolean end(final String uri,final String localName,final String qName) throws SAXException {
  return true;
}
Program: 108331
Project: 108331
Buggy source:
/** 
 * Sets the lower bound
 * @return
 */
public void setLowerBound(final InformationLoss<?> a){
  node.lowerBound=InformationLoss.createInformationLoss(a,metric);
}

Fixed version (ground truth):
/** 
 * Sets the lower bound
 * @return
 */
public void setLowerBound(final InformationLoss<?> a){
  node.lowerBound=InformationLoss.createInformationLoss(a,metric,DESERIALIZATION_CONTEXT_MIN_LEVEL,DESERIALIZATION_CONTEXT_MAX_LEVEL);
}
Program: 108332
Project: 108332
Buggy source:
/** 
 * De-serialization
 * @param aInputStream
 * @throws ClassNotFoundException
 * @throws IOException
 */
private void readObject(ObjectInputStream aInputStream) throws ClassNotFoundException, IOException {
  aInputStream.defaultReadObject();
  this.metric=Metric.createMetric(this.metric);
}

Fixed version (ground truth):
/** 
 * De-serialization
 * @param aInputStream
 * @throws ClassNotFoundException
 * @throws IOException
 */
private void readObject(ObjectInputStream aInputStream) throws ClassNotFoundException, IOException {
  aInputStream.defaultReadObject();
  this.metric=Metric.createMetric(this.metric,DESERIALIZATION_CONTEXT_MIN_LEVEL,DESERIALIZATION_CONTEXT_MAX_LEVEL);
}
Program: 108333
Project: 108333
Buggy source:
/** 
 * Sets the minimal information loss
 * @return
 */
public void setMinimumInformationLoss(final InformationLoss<?> a){
  node.minInformationLoss=InformationLoss.createInformationLoss(a,metric);
}

Fixed version (ground truth):
/** 
 * Sets the minimal information loss
 * @return
 */
public void setMinimumInformationLoss(final InformationLoss<?> a){
  node.minInformationLoss=InformationLoss.createInformationLoss(a,metric,DESERIALIZATION_CONTEXT_MIN_LEVEL,DESERIALIZATION_CONTEXT_MAX_LEVEL);
}
Program: 108334
Project: 108334
Buggy source:
/** 
 * Sets the maximal information loss
 * @return
 */
public void setMaximumInformationLoss(final InformationLoss<?> a){
  node.maxInformationLoss=InformationLoss.createInformationLoss(a,metric);
}

Fixed version (ground truth):
/** 
 * Sets the maximal information loss
 * @return
 */
public void setMaximumInformationLoss(final InformationLoss<?> a){
  node.maxInformationLoss=InformationLoss.createInformationLoss(a,metric,DESERIALIZATION_CONTEXT_MIN_LEVEL,DESERIALIZATION_CONTEXT_MAX_LEVEL);
}
Program: 108335
Project: 108335
Buggy source:
/** 
 * Converter method, converting information loss from version 1 to information loss from version 2, if necessary
 * @param loss
 * @param metric
 * @return
 */
public static InformationLoss<?> createInformationLoss(InformationLoss<?> loss,Metric<?> metric){
  Metric<?> _metric=Metric.createMetric(metric);
  if (loss instanceof InformationLossDefault) {
    if (_metric instanceof AbstractMetricSingleDimensional) {
      return __MetricV2.createILSingleDimensional(((InformationLossDefault)loss).getValue());
    }
 else     if (_metric instanceof AbstractMetricMultiDimensional) {
      if (_metric instanceof MetricMDNUEntropyPrecomputed) {
        return __MetricV2.createILMultiDimensionalSum(((InformationLossDefault)loss).getValue());
      }
 else       if (_metric instanceof MetricMDHeight) {
        return __MetricV2.createILMultiDimensionalSum(((InformationLossDefault)loss).getValue());
      }
 else       if (_metric instanceof MetricMDNMPrecision) {
        return __MetricV2.createILMultiDimensionalArithmeticMean(((InformationLossDefault)loss).getValue());
      }
    }
  }
  return loss;
}

Fixed version (ground truth):
/** 
 * Converter method, converting information loss from version 1 to information loss from version 2, if necessary
 * @param loss
 * @param metric
 * @param minLevel
 * @param maxLevel
 * @return
 */
public static InformationLoss<?> createInformationLoss(InformationLoss<?> loss,Metric<?> metric,int minLevel,int maxLevel){
  Metric<?> _metric=Metric.createMetric(metric,minLevel,maxLevel);
  if (loss instanceof InformationLossDefault) {
    if (_metric instanceof AbstractMetricSingleDimensional) {
      return __MetricV2.createILSingleDimensional(((InformationLossDefault)loss).getValue());
    }
 else     if (_metric instanceof AbstractMetricMultiDimensional) {
      if (_metric instanceof MetricMDNUEntropyPrecomputed) {
        return __MetricV2.createILMultiDimensionalSum(((InformationLossDefault)loss).getValue());
      }
 else       if (_metric instanceof MetricMDHeight) {
        return __MetricV2.createILMultiDimensionalSum(((InformationLossDefault)loss).getValue());
      }
 else       if (_metric instanceof MetricMDNMPrecision) {
        return __MetricV2.createILMultiDimensionalArithmeticMean(((InformationLossDefault)loss).getValue());
      }
    }
  }
  return loss;
}
Program: 108337
Project: 108337
Buggy source:
@Override public void run(){
  table.setRedraw(false);
  SWTUtil.enable(table);
  for (  final TableItem i : table.getItems()) {
    i.dispose();
  }
  list.clear();
  final ARXLattice l=result.getLattice();
  for (  final ARXNode[] level : l.getLevels()) {
    for (    final ARXNode node : level) {
      if (filter.isAllowed(result.getLattice(),node)) {
        list.add(node);
      }
    }
  }
  Collections.sort(list,new Comparator<ARXNode>(){
    @Override public int compare(    final ARXNode arg0,    final ARXNode arg1){
      return arg0.getMaximumInformationLoss().compareTo(arg1.getMaximumInformationLoss());
    }
  }
);
  if (list.size() > model.getMaxNodesInViewer()) {
    list.clear();
  }
  if (listener != null) {
    table.removeListener(SWT.SetData,listener);
  }
  listener=new Listener(){
    @Override public void handleEvent(    final Event event){
      final TableItem item=(TableItem)event.item;
      final int index=table.indexOf(item);
      createItem(item,index);
    }
  }
;
  table.addListener(SWT.SetData,listener);
  table.setItemCount(list.size());
  table.setRedraw(true);
}

Fixed version (ground truth):
@Override public void run(){
  table.setRedraw(false);
  SWTUtil.enable(table);
  for (  final TableItem i : table.getItems()) {
    i.dispose();
  }
  list.clear();
  final ARXLattice l=result.getLattice();
  for (  final ARXNode[] level : l.getLevels()) {
    for (    final ARXNode node : level) {
      if (filter.isAllowed(result.getLattice(),node)) {
        list.add(node);
      }
    }
  }
  Collections.sort(list,new Comparator<ARXNode>(){
    @Override public int compare(    final ARXNode arg0,    final ARXNode arg1){
      return arg0.getMaximumInformationLoss().compareTo(arg1.getMaximumInformationLoss());
    }
  }
);
  if (list.size() > model.getMaxNodesInViewer()) {
    list.clear();
  }
  if (listener != null) {
    table.removeListener(SWT.SetData,listener);
  }
  listener=new Listener(){
    @Override public void handleEvent(    final Event event){
      final TableItem item=(TableItem)event.item;
      final int index=table.indexOf(item);
      createItem(item,index);
    }
  }
;
  table.addListener(SWT.SetData,listener);
  table.setItemCount(list.size());
  TableColumn[] colums=table.getColumns();
  for (  TableColumn tableColumn : colums) {
    tableColumn.setWidth(120);
  }
  table.setRedraw(true);
}