nus-yam/ex-repair huggingface dataset:
Program: 108467
Project: 108467
Buggy source:
@Override public void handleEvent(Event event){
  IAxisSet axisSet=chart.getAxisSet();
  if (axisSet != null) {
    IAxis xAxis=axisSet.getXAxis(0);
    if (xAxis != null) {
      String[] series=xAxis.getCategorySeries();
      ISeries[] data=chart.getSeriesSet().getSeries();
      if (data != null && data.length > 0 && series != null) {
        int x=(int)Math.round(xAxis.getDataCoordinate(event.x));
        if (x >= 0 && x <= series.length) {
          chart.getPlotArea().setToolTipText("String_Node_Str" + series[x] + "String_Node_Str"+ data[0].getYSeries()[x]+ "String_Node_Str");
          return;
        }
      }
    }
  }
  chart.getPlotArea().setToolTipText(null);
}

Fixed version (ground truth):
@Override public void handleEvent(Event event){
  IAxisSet axisSet=chart.getAxisSet();
  if (axisSet != null) {
    IAxis xAxis=axisSet.getXAxis(0);
    if (xAxis != null) {
      String[] series=xAxis.getCategorySeries();
      ISeries[] data=chart.getSeriesSet().getSeries();
      if (data != null && data.length > 0 && series != null) {
        int x=(int)Math.round(xAxis.getDataCoordinate(event.x));
        if (x >= 0 && x < series.length) {
          chart.getPlotArea().setToolTipText("String_Node_Str" + series[x] + "String_Node_Str"+ data[0].getYSeries()[x]+ "String_Node_Str");
          return;
        }
      }
    }
  }
  chart.getPlotArea().setToolTipText(null);
}
Program: 108469
Project: 108469
Buggy source:
/** 
 * Scales the given string array
 * @param values
 * @param factor
 * @return
 */
private String[] getScaledValues(String[] values,double factor){
  AggregateFunction<String> function=AggregateFunction.forType(DataType.STRING).createSetFunction();
  String[] result=new String[(int)Math.round(factor * (double)values.length)];
  int previous=-1;
  List<String> toAggregate=new ArrayList<String>();
  for (int i=0; i < values.length; i++) {
    int index=(int)Math.round((double)i * factor);
    if (index == previous) {
      toAggregate.add(values[i]);
    }
 else     if (previous != -1) {
      result[previous]=function.aggregate(toAggregate.toArray(new String[toAggregate.size()]));
      toAggregate.clear();
      previous=index;
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Scales the given string array
 * @param values
 * @param length The resulting length
 * @return
 */
private String[] getScaledValues(String[] values,int length){
  AggregateFunction<String> function=AggregateFunction.forType(DataType.STRING).createSetFunction();
  double factor=(double)length / (double)values.length;
  String[] result=new String[length];
  int previous=0;
  List<String> toAggregate=new ArrayList<String>();
  for (int i=0; i < values.length; i++) {
    int index=(int)Math.round((double)i * factor);
    index=index < length ? index : length - 1;
    if (index != previous) {
      result[previous]=function.aggregate(toAggregate.toArray(new String[toAggregate.size()]));
      toAggregate.clear();
      previous=index;
    }
    toAggregate.add(values[i]);
  }
  return result;
}
Program: 108472
Project: 108472
Buggy source:
/** 
 * Scales the given string array
 * @param values
 * @param length The resulting length
 * @return
 */
private String[] getScaledValues(String[] values,int length){
  AggregateFunction<String> function=AggregateFunction.forType(DataType.STRING).createSetFunction();
  double factor=(double)length / (double)values.length;
  String[] result=new String[length];
  int previous=0;
  List<String> toAggregate=new ArrayList<String>();
  for (int i=0; i < values.length; i++) {
    int index=(int)Math.round((double)i * factor);
    index=index < length ? index : length - 1;
    if (index != previous) {
      result[previous]=function.aggregate(toAggregate.toArray(new String[toAggregate.size()]));
      toAggregate.clear();
      previous=index;
    }
    toAggregate.add(values[i]);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Scales the given string array
 * @param values
 * @param length The resulting length
 * @return
 */
private String[] getScaledValues(String[] values,int length){
  AggregateFunction<String> function=AggregateFunction.forType(DataType.STRING).createSetFunction();
  double factor=(double)length / (double)values.length;
  String[] result=new String[length];
  int previous=0;
  List<String> toAggregate=new ArrayList<String>();
  for (int i=0; i < values.length; i++) {
    int index=(int)Math.round((double)i * factor);
    index=index < length ? index : length - 1;
    if (index != previous) {
      result[previous]=function.aggregate(toAggregate.toArray(new String[toAggregate.size()]));
      toAggregate.clear();
      previous=index;
    }
    toAggregate.add(values[i]);
  }
  result[length - 1]=function.aggregate(toAggregate.toArray(new String[toAggregate.size()]));
  return result;
}
Program: 108473
Project: 108473
Buggy source:
/** 
 * Sets the transformation
 * @param transformation
 */
protected void setTransformation(final int[] transformation,final int level){
  this.transformation=transformation;
  this.level=level;
}

Fixed version (ground truth):
/** 
 * Sets the transformation
 * @param transformation
 */
public void setTransformation(final int[] transformation,final int level){
  this.transformation=transformation;
  this.level=level;
}
Program: 108476
Project: 108476
Buggy source:
@Test public void testSubset5() throws IllegalArgumentException, IOException {
  Data data=Data.create("String_Node_Str",';');
  data.getDefinition().setAttributeType("String_Node_Str",Hierarchy.create("String_Node_Str",';'));
  data.getDefinition().setAttributeType("String_Node_Str",Hierarchy.create("String_Node_Str",';'));
  data.getDefinition().setAttributeType("String_Node_Str",AttributeType.INSENSITIVE_ATTRIBUTE);
  DataSelector selector=DataSelector.create(data).field("String_Node_Str").equals("String_Node_Str");
  DataSubset subset=DataSubset.create(data,selector);
  final ARXAnonymizer anonymizer=new ARXAnonymizer();
  final ARXConfiguration config=ARXConfiguration.create();
  config.addCriterion(new Inclusion(subset));
  ARXResult result=anonymizer.anonymize(data,config);
  data.getHandle().sort(true,0,1,2);
  ARXNode n=result.getLattice().getLevels()[2][1];
  DataHandle h=result.getOutput(n,false);
  String[][] given=iteratorToArray(h.getView().iterator());
  String[][] expected={{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"}};
  assertTrue(Arrays.deepEquals(given,expected));
}

Fixed version (ground truth):
@Test public void testSubset5() throws IllegalArgumentException, IOException {
  Data data=Data.create("String_Node_Str",';');
  data.getDefinition().setAttributeType("String_Node_Str",Hierarchy.create("String_Node_Str",';'));
  data.getDefinition().setAttributeType("String_Node_Str",Hierarchy.create("String_Node_Str",';'));
  data.getDefinition().setAttributeType("String_Node_Str",AttributeType.INSENSITIVE_ATTRIBUTE);
  DataSelector selector=DataSelector.create(data).field("String_Node_Str").equals("String_Node_Str");
  DataSubset subset=DataSubset.create(data,selector);
  final ARXAnonymizer anonymizer=new ARXAnonymizer();
  final ARXConfiguration config=ARXConfiguration.create();
  config.addCriterion(new Inclusion(subset));
  ARXResult result=anonymizer.anonymize(data,config);
  data.getHandle().sort(false,0,1,2);
  ARXNode n=result.getLattice().getLevels()[2][1];
  DataHandle h=result.getOutput(n,false);
  String[][] given=iteratorToArray(h.getView().iterator());
  String[][] expected={{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"}};
  assertTrue(Arrays.deepEquals(given,expected));
}
Program: 108477
Project: 108477
Buggy source:
@Test public void testSubset3() throws IllegalArgumentException, IOException {
  Data data=Data.create("String_Node_Str",';');
  data.getDefinition().setAttributeType("String_Node_Str",Hierarchy.create("String_Node_Str",';'));
  data.getDefinition().setAttributeType("String_Node_Str",AttributeType.INSENSITIVE_ATTRIBUTE);
  data.getDefinition().setAttributeType("String_Node_Str",AttributeType.INSENSITIVE_ATTRIBUTE);
  DataSelector selector=DataSelector.create(data).field("String_Node_Str").equals("String_Node_Str");
  DataSubset subset=DataSubset.create(data,selector);
  final ARXAnonymizer anonymizer=new ARXAnonymizer();
  final ARXConfiguration config=ARXConfiguration.create();
  config.addCriterion(new KAnonymity(2));
  config.addCriterion(new Inclusion(subset));
  final ARXResult result=anonymizer.anonymize(data,config);
  final DataHandle outHandle=result.getOutput(false);
  data.getHandle().sort(true,0);
  String[][] given=iteratorToArray(outHandle.getView().iterator());
  String[][] expected={{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"}};
  assertTrue(Arrays.deepEquals(given,expected));
}

Fixed version (ground truth):
@Test public void testSubset3() throws IllegalArgumentException, IOException {
  Data data=Data.create("String_Node_Str",';');
  data.getDefinition().setAttributeType("String_Node_Str",Hierarchy.create("String_Node_Str",';'));
  data.getDefinition().setAttributeType("String_Node_Str",AttributeType.INSENSITIVE_ATTRIBUTE);
  data.getDefinition().setAttributeType("String_Node_Str",AttributeType.INSENSITIVE_ATTRIBUTE);
  DataSelector selector=DataSelector.create(data).field("String_Node_Str").equals("String_Node_Str");
  DataSubset subset=DataSubset.create(data,selector);
  final ARXAnonymizer anonymizer=new ARXAnonymizer();
  final ARXConfiguration config=ARXConfiguration.create();
  config.addCriterion(new KAnonymity(2));
  config.addCriterion(new Inclusion(subset));
  final ARXResult result=anonymizer.anonymize(data,config);
  final DataHandle outHandle=result.getOutput(false);
  data.getHandle().sort(false,0);
  String[][] given=iteratorToArray(outHandle.getView().iterator());
  String[][] expected={{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"}};
  assertTrue(Arrays.deepEquals(given,expected));
}
Program: 108478
Project: 108478
Buggy source:
@Test public void testSubset2() throws IllegalArgumentException, IOException {
  provider.createDataDefinition();
  final ARXAnonymizer anonymizer=new ARXAnonymizer();
  anonymizer.setSuppressionString("String_Node_Str");
  provider.getData().getDefinition().setAttributeType("String_Node_Str",AttributeType.IDENTIFYING_ATTRIBUTE);
  DataSelector selector=DataSelector.create(provider.getData()).field("String_Node_Str").equals("String_Node_Str").or().equals("String_Node_Str");
  DataSubset subset=DataSubset.create(provider.getData(),selector);
  final ARXConfiguration config=ARXConfiguration.create();
  config.addCriterion(new KAnonymity(2));
  config.addCriterion(new DPresence(0,1,subset));
  config.setMaxOutliers(0d);
  final ARXResult result=anonymizer.anonymize(provider.getData(),config);
  final DataHandle outHandle=result.getOutput(false);
  outHandle.sort(false,2);
  outHandle.getView().sort(true,0);
  String[][] given=iteratorToArray(outHandle.getView().iterator());
  String[][] expected={{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"}};
  assertTrue(Arrays.deepEquals(given,expected));
}

Fixed version (ground truth):
@Test public void testSubset2() throws IllegalArgumentException, IOException {
  provider.createDataDefinition();
  final ARXAnonymizer anonymizer=new ARXAnonymizer();
  anonymizer.setSuppressionString("String_Node_Str");
  provider.getData().getDefinition().setAttributeType("String_Node_Str",AttributeType.IDENTIFYING_ATTRIBUTE);
  DataSelector selector=DataSelector.create(provider.getData()).field("String_Node_Str").equals("String_Node_Str").or().equals("String_Node_Str");
  DataSubset subset=DataSubset.create(provider.getData(),selector);
  final ARXConfiguration config=ARXConfiguration.create();
  config.addCriterion(new KAnonymity(2));
  config.addCriterion(new DPresence(0,1,subset));
  config.setMaxOutliers(0d);
  final ARXResult result=anonymizer.anonymize(provider.getData(),config);
  final DataHandle outHandle=result.getOutput(false);
  outHandle.sort(true,2);
  outHandle.getView().sort(false,0);
  String[][] given=iteratorToArray(outHandle.getView().iterator());
  String[][] expected={{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"}};
  assertTrue(Arrays.deepEquals(given,expected));
}
Program: 108479
Project: 108479
Buggy source:
@Test public void testSubset1() throws IllegalArgumentException, IOException {
  provider.createDataDefinition();
  final ARXAnonymizer anonymizer=new ARXAnonymizer();
  anonymizer.setSuppressionString("String_Node_Str");
  final DataHandle inHandle=provider.getData().getHandle();
  provider.getData().getDefinition().setAttributeType("String_Node_Str",AttributeType.IDENTIFYING_ATTRIBUTE);
  DataSelector selector=DataSelector.create(provider.getData()).field("String_Node_Str").equals("String_Node_Str").or().equals("String_Node_Str");
  DataSubset subset=DataSubset.create(provider.getData(),selector);
  final ARXConfiguration config=ARXConfiguration.create();
  config.addCriterion(new KAnonymity(2));
  config.addCriterion(new DPresence(0,1,subset));
  config.setMaxOutliers(0d);
  final ARXResult result=anonymizer.anonymize(provider.getData(),config);
  final DataHandle outHandle=result.getOutput(false);
  outHandle.sort(false,2);
  outHandle.getView().sort(true,0);
  String[][] given=iteratorToArray(inHandle.getView().iterator());
  String[][] expected={{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"}};
  assertTrue(Arrays.deepEquals(given,expected));
}

Fixed version (ground truth):
@Test public void testSubset1() throws IllegalArgumentException, IOException {
  provider.createDataDefinition();
  final ARXAnonymizer anonymizer=new ARXAnonymizer();
  anonymizer.setSuppressionString("String_Node_Str");
  final DataHandle inHandle=provider.getData().getHandle();
  provider.getData().getDefinition().setAttributeType("String_Node_Str",AttributeType.IDENTIFYING_ATTRIBUTE);
  DataSelector selector=DataSelector.create(provider.getData()).field("String_Node_Str").equals("String_Node_Str").or().equals("String_Node_Str");
  DataSubset subset=DataSubset.create(provider.getData(),selector);
  final ARXConfiguration config=ARXConfiguration.create();
  config.addCriterion(new KAnonymity(2));
  config.addCriterion(new DPresence(0,1,subset));
  config.setMaxOutliers(0d);
  final ARXResult result=anonymizer.anonymize(provider.getData(),config);
  final DataHandle outHandle=result.getOutput(false);
  outHandle.sort(true,2);
  outHandle.getView().sort(false,0);
  String[][] given=iteratorToArray(inHandle.getView().iterator());
  String[][] expected={{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"}};
  assertTrue(Arrays.deepEquals(given,expected));
}
Program: 108481
Project: 108481
Buggy source:
public double getSuppressionWeight(){
  return suppressionWeight;
}

Fixed version (ground truth):
public double getSuppressionWeight(){
  if (this.suppressionWeight == null) {
    this.suppressionWeight=0.5d;
  }
  return suppressionWeight;
}
Program: 108482
Project: 108482
Buggy source:
protected MetricAECS(){
  super(true,false);
}

Fixed version (ground truth):
protected MetricAECS(){
  super(false,false);
}
Program: 108483
Project: 108483
Buggy source:
/** 
 * Converts an information loss into a relative value in percent  TODO: Code duplicate from NodePropertiesView
 * @param infoLoss
 * @return
 */
protected double asRelativeValue(final InformationLoss<?> infoLoss,final ARXResult result){
  return infoLoss.relativeTo(model.getResult().getLattice().getBottom().getMinimumInformationLoss(),model.getResult().getLattice().getTop().getMaximumInformationLoss()) * 100d;
}

Fixed version (ground truth):
/** 
 * Converts an information loss into a relative value in percent  TODO: Code duplicate from NodePropertiesView
 * @param infoLoss
 * @return
 */
protected double asRelativeValue(final InformationLoss<?> infoLoss,final ARXResult result){
  return infoLoss.relativeTo(model.getResult().getLattice().getMinimumInformationLoss(),model.getResult().getLattice().getMaximumInformationLoss()) * 100d;
}
Program: 108484
Project: 108484
Buggy source:
/** 
 * Converts an information loss into a relative value in percent
 * @param infoLoss
 * @return
 */
private double asRelativeValue(final InformationLoss<?> infoLoss){
  if (model != null && model.getResult() != null && model.getResult().getLattice() != null && model.getResult().getLattice().getBottom() != null && model.getResult().getLattice().getTop() != null) {
    return infoLoss.relativeTo(model.getResult().getLattice().getBottom().getMinimumInformationLoss(),model.getResult().getLattice().getTop().getMaximumInformationLoss()) * 100d;
  }
 else {
    return 0;
  }
}

Fixed version (ground truth):
/** 
 * Converts an information loss into a relative value in percent
 * @param infoLoss
 * @return
 */
private double asRelativeValue(final InformationLoss<?> infoLoss){
  if (model != null && model.getResult() != null && model.getResult().getLattice() != null && model.getResult().getLattice().getBottom() != null && model.getResult().getLattice().getTop() != null) {
    return infoLoss.relativeTo(model.getResult().getLattice().getMinimumInformationLoss(),model.getResult().getLattice().getMaximumInformationLoss()) * 100d;
  }
 else {
    return 0;
  }
}
Program: 108485
Project: 108485
Buggy source:
/** 
 * Converts an information loss into a relative value in percent
 * @param infoLoss
 * @return
 */
private double asRelativeValue(final InformationLoss<?> infoLoss){
  if (result == null)   return 0;
  return infoLoss.relativeTo(result.getLattice().getBottom().getMinimumInformationLoss(),result.getLattice().getTop().getMaximumInformationLoss()) * 100d;
}

Fixed version (ground truth):
/** 
 * Converts an information loss into a relative value in percent
 * @param infoLoss
 * @return
 */
private double asRelativeValue(final InformationLoss<?> infoLoss){
  if (result == null)   return 0;
  return infoLoss.relativeTo(result.getLattice().getMinimumInformationLoss(),result.getLattice().getMaximumInformationLoss()) * 100d;
}
Program: 108486
Project: 108486
Buggy source:
/** 
 * Estimates minimal information loss
 */
private void estimateMonotonicMinLoss(){
  if (bottom.getMinimumInformationLoss() == null) {
    bottom.access().setMinimumInformationLoss(metric.createMinInformationLoss());
  }
  for (int i=0; i < levels.length; i++) {
    final ARXNode[] level=levels[i];
    for (    final ARXNode node : level) {
      final InformationLoss<?> a=node.getMinimumInformationLoss();
      for (      final ARXNode n : node.getSuccessors()) {
        if (n.getMinimumInformationLoss() == null) {
          n.access().setMinimumInformationLoss(metric.createMinInformationLoss());
        }
        if (n.getMinimumInformationLoss() != n.getMaximumInformationLoss()) {
          n.getMinimumInformationLoss().max(a);
        }
      }
    }
  }
  this.minimumInformationLoss=this.getTop().getMinimumInformationLoss().clone();
}

Fixed version (ground truth):
/** 
 * Estimates minimal information loss
 */
private void estimateMonotonicMinLoss(){
  if (bottom.getMinimumInformationLoss() == null) {
    bottom.access().setMinimumInformationLoss(metric.createMinInformationLoss());
  }
  for (int i=0; i < levels.length; i++) {
    final ARXNode[] level=levels[i];
    for (    final ARXNode node : level) {
      final InformationLoss<?> a=node.getMinimumInformationLoss();
      for (      final ARXNode n : node.getSuccessors()) {
        if (n.getMinimumInformationLoss() == null) {
          n.access().setMinimumInformationLoss(metric.createMinInformationLoss());
        }
        if (n.getMinimumInformationLoss() != n.getMaximumInformationLoss()) {
          n.getMinimumInformationLoss().max(a);
        }
      }
    }
  }
  this.minimumInformationLoss=this.getBottom().getMinimumInformationLoss().clone();
}
Program: 108487
Project: 108487
Buggy source:
/** 
 * Estimates minimal information loss
 */
private void estimateNonMonotonicLoss(){
  InformationLoss<?> min=null;
  InformationLoss<?> max=null;
  for (int i=0; i < levels.length; i++) {
    final ARXNode[] level=levels[i];
    for (    final ARXNode node : level) {
      InformationLoss<?> nodeMin=node.getMinimumInformationLoss();
      InformationLoss<?> nodeMax=node.getMaximumInformationLoss();
      if (node.isChecked()) {
        if (min == null || min.compareTo(nodeMin) > 0) {
          min=nodeMin;
        }
        if (max == null || max.compareTo(nodeMax) < 0) {
          max=nodeMax;
        }
      }
    }
  }
  for (int i=0; i < levels.length; i++) {
    final ARXNode[] level=levels[i];
    for (    final ARXNode node : level) {
      if (!node.isChecked()) {
        node.maxInformationLoss=max.clone();
        node.minInformationLoss=min.clone();
      }
    }
  }
  this.minimumInformationLoss=min.clone();
  this.maximumInformationLoss=max.clone();
}

Fixed version (ground truth):
/** 
 * Estimates minimal information loss
 */
private void estimateNonMonotonicLoss(){
  InformationLoss<?> min=null;
  InformationLoss<?> max=null;
  for (int i=0; i < levels.length; i++) {
    final ARXNode[] level=levels[i];
    for (    final ARXNode node : level) {
      InformationLoss<?> nodeMin=node.getMinimumInformationLoss();
      InformationLoss<?> nodeMax=node.getMaximumInformationLoss();
      if (node.isChecked()) {
        if (min == null || min.compareTo(nodeMin) > 0) {
          min=nodeMin.clone();
        }
        if (max == null || max.compareTo(nodeMax) < 0) {
          max=nodeMax.clone();
        }
      }
    }
  }
  for (int i=0; i < levels.length; i++) {
    final ARXNode[] level=levels[i];
    for (    final ARXNode node : level) {
      if (!node.isChecked()) {
        node.maxInformationLoss=max.clone();
        node.minInformationLoss=min.clone();
      }
    }
  }
  this.minimumInformationLoss=min.clone();
  this.maximumInformationLoss=max.clone();
}
Program: 108488
Project: 108488
Buggy source:
@Override public double relativeTo(InformationLoss<?> min,InformationLoss<?> max){
  if (min == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else   if (max == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  InformationLossDefault _min=convert(min);
  InformationLossDefault _max=convert(max);
  return (this.value - _min.getValue()) / (_max.getValue() - _min.getValue());
}

Fixed version (ground truth):
@Override public double relativeTo(InformationLoss<?> min,InformationLoss<?> max){
  if (min == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else   if (max == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  InformationLossDefault _min=convert(min);
  InformationLossDefault _max=convert(max);
  if (_max.value - _min.value == 0d)   return 0d;
 else   return (this.value - _min.value) / (_max.value - _min.value);
}
Program: 108489
Project: 108489
Buggy source:
@Override protected InformationLossDefault evaluateInternal(final Node node,final IHashGroupify g){
  int groups=0;
  int tuples=0;
  boolean suppressed=false;
  HashGroupifyEntry m=g.getFirstEntry();
  while (m != null) {
    if (m.count > 0) {
      tuples+=m.count;
      groups+=m.isNotOutlier ? 1 : 0;
      suppressed|=!m.isNotOutlier;
    }
    m=m.nextOrdered;
  }
  groups+=suppressed ? 1 : 0;
  return new InformationLossDefault((double)tuples / (double)groups);
}

Fixed version (ground truth):
@Override protected InformationLossDefault evaluateInternal(final Node node,final IHashGroupify g){
  int groups=0;
  int tuples=0;
  boolean suppressed=false;
  HashGroupifyEntry m=g.getFirstEntry();
  while (m != null) {
    if (m.count > 0) {
      tuples+=m.count;
      if (m.isNotOutlier || !node.isAnonymous()) {
        groups++;
      }
 else {
        suppressed=true;
      }
    }
    m=m.nextOrdered;
  }
  groups+=suppressed ? 1 : 0;
  return new InformationLossDefault((double)tuples / (double)groups);
}
Program: 108490
Project: 108490
Buggy source:
@Override protected InformationLossRCE evaluateInternal(Node node,IHashGroupify g){
  int[] transformation=node.getTransformation();
  int dimensions=transformation.length;
  double[] scores=new double[dimensions];
  HashGroupifyEntry m=g.getFirstEntry();
  while (m != null) {
    if (m.count > 0) {
      if (m.isNotOutlier) {
        for (int dimension=0; dimension < dimensions; dimension++) {
          int value=m.key[dimension];
          scores[dimension]+=(double)m.count * frequencies[dimension][transformation[dimension]][value];
        }
      }
 else {
        for (int dimension=0; dimension < dimensions; dimension++) {
          scores[dimension]+=(double)m.count;
        }
      }
    }
    m=m.nextOrdered;
  }
  for (int dimension=0; dimension < dimensions; dimension++) {
    scores[dimension]=normalize(scores[dimension],dimension);
  }
  return new InformationLossRCE(scores);
}

Fixed version (ground truth):
@Override protected InformationLossRCE evaluateInternal(Node node,IHashGroupify g){
  int[] transformation=node.getTransformation();
  int dimensions=transformation.length;
  double[] scores=new double[dimensions];
  HashGroupifyEntry m=g.getFirstEntry();
  while (m != null) {
    if (m.count > 0) {
      if (m.isNotOutlier || !node.isAnonymous()) {
        for (int dimension=0; dimension < dimensions; dimension++) {
          int value=m.key[dimension];
          scores[dimension]+=(double)m.count * frequencies[dimension][transformation[dimension]][value];
        }
      }
 else {
        for (int dimension=0; dimension < dimensions; dimension++) {
          scores[dimension]+=(double)m.count;
        }
      }
    }
    m=m.nextOrdered;
  }
  for (int dimension=0; dimension < dimensions; dimension++) {
    scores[dimension]=normalize(scores[dimension],dimension);
  }
  return new InformationLossRCE(scores);
}
Program: 108491
Project: 108491
Buggy source:
@Override @SuppressWarnings("String_Node_Str") protected InformationLossDefault evaluateInternal(final Node node,final IHashGroupify g){
  final InformationLossDefault originalInfoLossDefault=super.evaluateInternal(node,g);
  if (!node.isAnonymous())   return originalInfoLossDefault;
  final double originalInfoLoss=originalInfoLossDefault.getValue();
  double suppressedTuples=0;
  double additionalInfoLoss=0;
  int key;
  Integer val;
  final Map<Integer,Integer>[] original=new Map[node.getTransformation().length];
  for (int i=0; i < original.length; i++) {
    original[i]=new HashMap<Integer,Integer>();
  }
  HashGroupifyEntry m=g.getFirstEntry();
  while (m != null) {
    if (!m.isNotOutlier && m.count > 0) {
      suppressedTuples+=m.count;
      for (int i=0; i < original.length; i++) {
        key=m.key[i];
        val=original[i].get(key);
        if (val == null) {
          original[i].put(key,m.count);
        }
 else {
          original[i].put(key,m.count + val);
        }
      }
    }
    m=m.nextOrdered;
  }
  if (suppressedTuples != 0) {
    for (int i=0; i < original.length; i++) {
      for (      final double count : original[i].values()) {
        additionalInfoLoss+=count * MetricEntropy.log2(count / suppressedTuples);
      }
    }
  }
  return new InformationLossDefault(originalInfoLoss - additionalInfoLoss);
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") protected InformationLossDefault evaluateInternal(final Node node,final IHashGroupify g){
  final InformationLossDefault originalInfoLossDefault=super.evaluateInternal(node,g);
  if (!node.isAnonymous())   return originalInfoLossDefault;
  final double originalInfoLoss=originalInfoLossDefault.getValue();
  double suppressedTuples=0;
  double additionalInfoLoss=0;
  int key;
  Integer val;
  final Map<Integer,Integer>[] original=new Map[node.getTransformation().length];
  for (int i=0; i < original.length; i++) {
    original[i]=new HashMap<Integer,Integer>();
  }
  if (node.isAnonymous()) {
    HashGroupifyEntry m=g.getFirstEntry();
    while (m != null) {
      if (!m.isNotOutlier && m.count > 0) {
        suppressedTuples+=m.count;
        for (int i=0; i < original.length; i++) {
          key=m.key[i];
          val=original[i].get(key);
          if (val == null) {
            original[i].put(key,m.count);
          }
 else {
            original[i].put(key,m.count + val);
          }
        }
      }
      m=m.nextOrdered;
    }
  }
  if (suppressedTuples != 0) {
    for (int i=0; i < original.length; i++) {
      for (      final double count : original[i].values()) {
        additionalInfoLoss+=count * MetricEntropy.log2(count / suppressedTuples);
      }
    }
  }
  return new InformationLossDefault(originalInfoLoss - additionalInfoLoss);
}
Program: 108492
Project: 108492
Buggy source:
protected MetricAECS(){
  super(true,false);
}

Fixed version (ground truth):
protected MetricAECS(){
  super(false,false);
}
Program: 108493
Project: 108493
Buggy source:
@Override protected InformationLossDefault evaluateInternal(final Node node,final IHashGroupify g){
  int size=0;
  if (dPresence) {
    HashGroupifyEntry m=g.getFirstEntry();
    while (m != null) {
      if (m.count > 0) {
        size++;
      }
      m=m.nextOrdered;
    }
  }
 else {
    size=g.size();
  }
  final double value=total / size;
  return new InformationLossDefault(value);
}

Fixed version (ground truth):
@Override protected InformationLossDefault evaluateInternal(final Node node,final IHashGroupify g){
  int groups=0;
  int tuples=0;
  boolean suppressed=false;
  HashGroupifyEntry m=g.getFirstEntry();
  while (m != null) {
    if (m.count > 0) {
      tuples+=m.count;
      groups+=m.isNotOutlier ? 1 : 0;
      suppressed|=!m.isNotOutlier;
    }
    m=m.nextOrdered;
  }
  groups+=suppressed ? 1 : 0;
  return new InformationLossDefault((double)tuples / (double)groups);
}
Program: 108494
Project: 108494
Buggy source:
@Override protected void initializeInternal(final DataDefinition definition,final Data input,final GeneralizationHierarchy[] ahierarchies,final ARXConfiguration config){
  if (config.containsCriterion(DPresence.class)) {
    dPresence=true;
    Set<DPresence> crits=config.getCriteria(DPresence.class);
    if (crits.size() > 1) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    for (    DPresence dPresence : crits) {
      total=dPresence.getSubset().getArray().length;
    }
  }
 else {
    total=input.getDataLength();
  }
}

Fixed version (ground truth):
@Override protected void initializeInternal(final DataDefinition definition,final Data input,final GeneralizationHierarchy[] ahierarchies,final ARXConfiguration config){
}
Program: 108495
Project: 108495
Buggy source:
@Override protected InformationLossDefault evaluateInternal(final Node node,final IHashGroupify g){
  int size=0;
  if (dPresence) {
    HashGroupifyEntry m=g.getFirstEntry();
    while (m != null) {
      if (m.count > 0) {
        size++;
      }
      m=m.nextOrdered;
    }
  }
 else {
    size=g.size();
  }
  final double value=total / size;
  return new InformationLossDefault(value);
}

Fixed version (ground truth):
@Override protected InformationLossDefault evaluateInternal(final Node node,final IHashGroupify g){
  int groups=0;
  int tuples=0;
  boolean suppressed=false;
  HashGroupifyEntry m=g.getFirstEntry();
  while (m != null) {
    if (m.count > 0) {
      tuples+=m.count;
      groups+=m.isNotOutlier ? 1 : 0;
      suppressed|=!m.isNotOutlier;
    }
    m=m.nextOrdered;
  }
  groups+=suppressed ? 1 : 0;
  return new InformationLossDefault((double)tuples / (double)groups);
}
Program: 108497
Project: 108497
Buggy source:
@Override public void min(final InformationLoss<?> other){
  InformationLossRCE o=convert(other);
  if (other == null) {
    return;
  }
  if (o.compareTo(this) < 0) {
    value=o.value;
    ints=o.ints;
  }
}

Fixed version (ground truth):
@Override public void min(final InformationLoss<?> other){
  InformationLossRCE o=convert(other);
  if (other == null) {
    return;
  }
  if (o.compareTo(this) < 0) {
    value=o.value;
    ints=o.ints;
    string=o.string;
  }
}
Program: 108498
Project: 108498
Buggy source:
/** 
 * Creates a new instance
 * @param value
 */
InformationLossRCE(final double[] value){
  this.value=value;
  Arrays.sort(value);
  for (int i=0; i < value.length / 2; i++) {
    int other=value.length - (i + 1);
    double temp=value[i];
    value[i]=value[other];
    value[other]=temp;
  }
  StringBuilder digits=new StringBuilder();
  for (  double v : value) {
    long ival=(long)Math.round(v * MULTIPLIER);
    StringBuilder sval=new StringBuilder();
    sval.append(ival);
    while (sval.length() != PRECISION) {
      sval.insert(0,"String_Node_Str");
    }
    digits.append(sval);
  }
  this.ints=new BigInteger(digits.toString());
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 * @param value
 */
InformationLossRCE(final double[] value){
  this.value=value;
  Arrays.sort(value);
  for (int i=0; i < value.length / 2; i++) {
    int other=value.length - (i + 1);
    double temp=value[i];
    value[i]=value[other];
    value[other]=temp;
  }
  StringBuilder digits=new StringBuilder();
  for (  double v : value) {
    long ival=(long)Math.round(v * MULTIPLIER);
    StringBuilder sval=new StringBuilder();
    sval.append(ival);
    while (sval.length() < (PRECISION + 1)) {
      sval.insert(0,"String_Node_Str");
    }
    digits.append(sval);
  }
  this.ints=new BigInteger(digits.toString());
  digits.setLength(0);
  digits.append("String_Node_Str");
  for (  double v : value) {
    long ival=(long)Math.round(v * MULTIPLIER_STRING);
    digits.append(ival);
    digits.append("String_Node_Str");
  }
  digits.setCharAt(digits.length() - 1,']');
  this.string=digits.toString();
}
Program: 108499
Project: 108499
Buggy source:
@Override public void max(final InformationLoss<?> other){
  InformationLossRCE o=convert(other);
  if (other == null) {
    return;
  }
  if (o.compareTo(this) > 0) {
    value=o.value;
    ints=o.ints;
  }
}

Fixed version (ground truth):
@Override public void max(final InformationLoss<?> other){
  InformationLossRCE o=convert(other);
  if (other == null) {
    return;
  }
  if (o.compareTo(this) > 0) {
    value=o.value;
    ints=o.ints;
    string=o.string;
  }
}
Program: 108500
Project: 108500
Buggy source:
@Override public InformationLoss<double[]> clone(){
  return new InformationLossRCE(value,ints);
}

Fixed version (ground truth):
@Override public InformationLoss<double[]> clone(){
  return new InformationLossRCE(value,ints,string);
}
Program: 108501
Project: 108501
Buggy source:
@Override public String toString(){
  return Arrays.toString(this.value);
}

Fixed version (ground truth):
@Override public String toString(){
  return string;
}
Program: 108502
Project: 108502
Buggy source:
@Override public double relativeTo(InformationLoss<?> min,InformationLoss<?> max){
  if (min == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else   if (max == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  InformationLossRCE _min=convert(min);
  InformationLossRCE _max=convert(max);
  BigDecimal a=new BigDecimal(this.ints.subtract(_min.ints),PRECISION);
  BigDecimal b=new BigDecimal(_max.ints.subtract(_min.ints),PRECISION);
  return a.divide(b).doubleValue();
}

Fixed version (ground truth):
@Override public double relativeTo(InformationLoss<?> min,InformationLoss<?> max){
  if (min == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else   if (max == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  InformationLossRCE _min=convert(min);
  InformationLossRCE _max=convert(max);
  BigDecimal a=new BigDecimal(this.ints.subtract(_min.ints));
  BigDecimal b=new BigDecimal(_max.ints.subtract(_min.ints));
  return a.divide(b,MathContext.DECIMAL64).doubleValue();
}
Program: 108504
Project: 108504
Buggy source:
public DataDefinition getInputDefinition(){
  return inputConfig.getInput().getDefinition();
}

Fixed version (ground truth):
public DataDefinition getInputDefinition(){
  if (inputConfig == null)   return null;
 else   if (inputConfig.getInput() == null)   return null;
 else   return inputConfig.getInput().getDefinition();
}
Program: 108506
Project: 108506
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,Resources.getVersion());
  }
 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 {
  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;
}
Program: 108507
Project: 108507
Buggy source:
public abstract void checkVersion(String file,String current) throws SAXException ;

Fixed version (ground truth):
public abstract void checkVersion(String version) throws SAXException ;
Program: 108508
Project: 108508
Buggy source:
@Override public void checkVersion(String file,String current) throws SAXException {
  if (!file.equals("String_Node_Str")) {
    throw new SAXException(Resources.getMessage("String_Node_Str") + file);
  }
}

Fixed version (ground truth):
@Override public void checkVersion(String version) throws SAXException {
  if (!version.equals("String_Node_Str")) {
    throw new SAXException(Resources.getMessage("String_Node_Str") + version);
  }
}
Program: 108509
Project: 108509
Buggy source:
@Override public void checkVersion(String file,String current) throws SAXException {
  if (!compareVersion(current,file)) {
    throw new SAXException(Resources.getMessage("String_Node_Str") + file);
  }
}

Fixed version (ground truth):
@Override public void checkVersion(String version) throws SAXException {
  if (!(version.equals("String_Node_Str") || version.startsWith("String_Node_Str"))) {
    throw new SAXException(Resources.getMessage("String_Node_Str") + version);
  }
}
Program: 108510
Project: 108510
Buggy source:
/** 
 * Normalizes the aggregate
 * @param aggregate
 * @param dimension
 * @return
 */
private double normalize(double aggregate,int dimension){
  double min=datasetSize / domainSizes[dimension];
  double max=datasetSize;
  return (aggregate - min) / (max - min);
}

Fixed version (ground truth):
/** 
 * Normalizes the aggregate
 * @param aggregate
 * @param dimension
 * @return
 */
private double normalize(double aggregate,int dimension){
  double min=datasetSize / domainSizes[dimension];
  double max=datasetSize;
  double result=(aggregate - min) / (max - min);
  return result >= 0d ? result : 0d;
}
Program: 108511
Project: 108511
Buggy source:
@Override public void min(final InformationLoss<?> other){
  InformationLossRCE o=convert(other);
  if (other == null) {
    return;
  }
  if (o.compareTo(this) < 0) {
    value=o.value;
    ints=o.ints;
    string=o.string;
  }
}

Fixed version (ground truth):
@Override public void min(final InformationLoss<?> other){
  InformationLossRCE o=convert(other);
  if (other == null) {
    return;
  }
  if (o.compareTo(this) < 0) {
    value=o.value;
    ints=o.ints;
    string=o.string;
    perc=o.perc;
  }
}
Program: 108512
Project: 108512
Buggy source:
/** 
 * Creates a new instance
 * @param value
 */
InformationLossRCE(final double[] value){
  this.value=value;
  Arrays.sort(value);
  for (int i=0; i < value.length / 2; i++) {
    int other=value.length - (i + 1);
    double temp=value[i];
    value[i]=value[other];
    value[other]=temp;
  }
  StringBuilder digits=new StringBuilder();
  for (  double v : value) {
    long ival=(long)Math.round(v * MULTIPLIER);
    StringBuilder sval=new StringBuilder();
    sval.append(ival);
    while (sval.length() < (PRECISION + 1)) {
      sval.insert(0,"String_Node_Str");
    }
    digits.append(sval);
  }
  this.ints=new BigInteger(digits.toString());
  digits.setLength(0);
  digits.append("String_Node_Str");
  for (  double v : value) {
    long ival=(long)Math.round(v * MULTIPLIER_STRING);
    digits.append(ival);
    digits.append("String_Node_Str");
  }
  digits.setCharAt(digits.length() - 1,']');
  this.string=digits.toString();
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 * @param value
 */
InformationLossRCE(final double[] value){
  this.value=value;
  Arrays.sort(value);
  for (int i=0; i < value.length / 2; i++) {
    int other=value.length - (i + 1);
    double temp=value[i];
    value[i]=value[other];
    value[other]=temp;
  }
  StringBuilder digits=new StringBuilder();
  for (  double v : value) {
    long ival=(long)Math.round(v * MULTIPLIER);
    StringBuilder sval=new StringBuilder();
    sval.append(ival);
    while (sval.length() < (PRECISION + 1)) {
      sval.insert(0,"String_Node_Str");
    }
    digits.append(sval);
  }
  this.ints=new BigInteger(digits.toString());
  digits.setLength(0);
  digits.append("String_Node_Str");
  for (  double v : value) {
    long ival=(long)Math.round(v * MULTIPLIER_STRING);
    digits.append(ival);
    digits.append("String_Node_Str");
  }
  digits.setCharAt(digits.length() - 1,']');
  this.string=digits.toString();
  double mean=getMean(value);
  this.perc=mean + getStandardDeviation(mean,value);
}
Program: 108513
Project: 108513
Buggy source:
@Override public void max(final InformationLoss<?> other){
  InformationLossRCE o=convert(other);
  if (other == null) {
    return;
  }
  if (o.compareTo(this) > 0) {
    value=o.value;
    ints=o.ints;
    string=o.string;
  }
}

Fixed version (ground truth):
@Override public void max(final InformationLoss<?> other){
  InformationLossRCE o=convert(other);
  if (other == null) {
    return;
  }
  if (o.compareTo(this) > 0) {
    value=o.value;
    ints=o.ints;
    string=o.string;
    perc=o.perc;
  }
}
Program: 108514
Project: 108514
Buggy source:
@Override public double relativeTo(InformationLoss<?> min,InformationLoss<?> max){
  if (min == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else   if (max == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  InformationLossRCE _min=convert(min);
  InformationLossRCE _max=convert(max);
  BigDecimal a=new BigDecimal(this.ints.subtract(_min.ints));
  BigDecimal b=new BigDecimal(_max.ints.subtract(_min.ints));
  return a.divide(b,MathContext.DECIMAL64).doubleValue();
}

Fixed version (ground truth):
@Override public double relativeTo(InformationLoss<?> min,InformationLoss<?> max){
  if (min == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else   if (max == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  InformationLossRCE _min=convert(min);
  InformationLossRCE _max=convert(max);
  return (perc - _min.perc) / (_max.perc - _min.perc);
}
Program: 108515
Project: 108515
Buggy source:
@Override public InformationLoss<double[]> clone(){
  return new InformationLossRCE(value,ints,string);
}

Fixed version (ground truth):
@Override public InformationLoss<double[]> clone(){
  return new InformationLossRCE(value,ints,string,perc);
}
Program: 108517
Project: 108517
Buggy source:
/** 
 * Returns the name
 * @return
 */
public String getName(){
  return name;
}

Fixed version (ground truth):
/** 
 * Returns the name
 * @return
 */
public String getName(){
  return attribute;
}
Program: 108518
Project: 108518
Buggy source:
/** 
 * Creates a new empty generalization hierarchy from the given dictionary
 * @param name
 * @param dimension
 * @param dictionary
 */
public GeneralizationHierarchy(final String name,final int dimension,final Dictionary dictionary){
  this.name=name;
  final int uniqueIn=dictionary.getNumUniqueUnfinalizedValues(dimension);
  map=new int[uniqueIn][1];
  for (int i=0; i < map.length; i++) {
    map[i][0]=i;
  }
  distinctValues=new int[1];
  distinctValues[0]=uniqueIn;
}

Fixed version (ground truth):
/** 
 * Creates a new empty generalization hierarchy from the given dictionary
 * @param name
 * @param dimension
 * @param dictionary
 */
public GeneralizationHierarchy(final String name,final int dimension,final Dictionary dictionary){
  this.attribute=name;
  final int uniqueIn=dictionary.getNumUniqueUnfinalizedValues(dimension);
  map=new int[uniqueIn][1];
  for (int i=0; i < map.length; i++) {
    map[i][0]=i;
  }
  distinctValues=new int[1];
  distinctValues[0]=uniqueIn;
}
Program: 108519
Project: 108519
Buggy source:
@Override public void checkVersion(String version) throws SAXException {
  if (!(version.equals("String_Node_Str") || version.equals("String_Node_Str"))) {
    throw new SAXException(Resources.getMessage("String_Node_Str") + version);
  }
}

Fixed version (ground truth):
@Override public void checkVersion(String version) throws SAXException {
  if (!(version.equals("String_Node_Str") || version.startsWith("String_Node_Str"))) {
    throw new SAXException(Resources.getMessage("String_Node_Str") + version);
  }
}
Program: 108520
Project: 108520
Buggy source:
/** 
 * Shows an error dialog
 * @param header
 * @param message
 * @param t
 */
public void showErrorDialog(final Shell shell,final String message,final Throwable t){
  StringWriter sw=new StringWriter();
  PrintWriter pw=new PrintWriter(sw);
  t.printStackTrace(pw);
  final String trace=sw.toString();
  final DialogError dialog=new DialogError(shell,controller,message,trace);
  dialog.create();
  dialog.open();
}

Fixed version (ground truth):
/** 
 * Shows an error dialog
 * @param header
 * @param message
 * @param t
 */
public void showErrorDialog(final Shell shell,final String message,final Throwable t){
  StringWriter sw=new StringWriter();
  PrintWriter pw=new PrintWriter(sw);
  if (t != null)   t.printStackTrace(pw);
  final String trace=sw.toString();
  final DialogError dialog=new DialogError(shell,controller,message,trace);
  dialog.create();
  dialog.open();
}