nus-yam/ex-repair huggingface dataset:
Program: 107989
Project: 107989
Buggy source:
/** 
 * Returns the maximum generalization for the attribute.
 * @param attribute
 * @return
 */
public int getMaximumGeneralization(final String attribute){
  checkQuasiIdentifier(attribute);
  Integer result=maxGeneralization.get(attribute);
  if (result != null)   return result;
  if (this.getHierarchy(attribute) != null) {
    String[][] hierarchy=this.getHierarchy(attribute);
    if (hierarchy.length == 0 || hierarchy[0] == null) {
      return 0;
    }
 else {
      return hierarchy[0].length - 1;
    }
  }
 else {
    throw new IllegalStateException("String_Node_Str" + attribute + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Returns the maximum generalization for the attribute.
 * @param attribute
 * @return
 */
public int getMaximumGeneralization(final String attribute){
  checkQuasiIdentifier(attribute);
  Integer result=maxGeneralization.get(attribute);
  if (result != null)   return result;
  if (this.getHierarchy(attribute) != null) {
    String[][] hierarchy=this.getHierarchy(attribute);
    if (hierarchy.length == 0 || hierarchy[0] == null) {
      return 0;
    }
 else {
      return hierarchy[0].length - 1;
    }
  }
 else {
    return 0;
  }
}
Program: 107993
Project: 107993
Buggy source:
@Override public boolean correct(String clazz){
  if (result == null) {
    return false;
  }
  if (map.get(clazz) == null) {
    System.out.println(clazz);
    System.out.println(map);
    System.exit(0);
  }
  return result.intValue() == map.get(clazz).intValue();
}

Fixed version (ground truth):
@Override public boolean correct(String clazz){
  if (result == null) {
    return false;
  }
  return result.intValue() == map.get(clazz).intValue();
}
Program: 107994
Project: 107994
Buggy source:
/** 
 * Calculates k, based on Poisson distribution.
 * @param lambda
 * @return
 */
private int calculateKPoisson(double lambda){
  final double threshold=1d - this.significanceLevel;
  final PoissonDistribution distribution=new PoissonDistribution(lambda);
  int counter=0;
  double value=0;
  while (value < threshold) {
    value=distribution.cumulativeProbability(counter);
    counter++;
  }
  this.type1Error=1d - value;
  return counter + 1;
}

Fixed version (ground truth):
/** 
 * Calculates k, based on Poisson distribution.
 * @param lambda
 * @return
 */
private int calculateKPoisson(double lambda){
  final double threshold=1d - this.significanceLevel;
  final PoissonDistribution distribution=new PoissonDistribution(lambda);
  int counter=0;
  double value=0;
  while (value < threshold) {
    value=distribution.cumulativeProbability(counter);
    counter++;
    if (counter >= this.k) {
      value=1d;
      break;
    }
  }
  this.type1Error=1d - value;
  return counter + 1;
}
Program: 107995
Project: 107995
Buggy source:
/** 
 * Calculates k, based on Zero-truncated Poisson distribution. https://en.wikipedia.org/wiki/Zero-truncated_Poisson_distribution
 * @param lambda
 * @return
 */
private int calculateKZeroPoisson(double lambda){
  final double threshold=1d - this.significanceLevel;
  final PoissonDistribution distribution=new PoissonDistribution(lambda);
  final double v2=1d - distribution.probability(0);
  int counter=1;
  double value=0d;
  while (value < threshold) {
    value+=distribution.probability(counter) / v2;
    counter++;
  }
  this.type1Error=1d - value;
  return counter;
}

Fixed version (ground truth):
/** 
 * Calculates k, based on Zero-truncated Poisson distribution. https://en.wikipedia.org/wiki/Zero-truncated_Poisson_distribution
 * @param lambda
 * @return
 */
private int calculateKZeroPoisson(double lambda){
  final double threshold=1d - this.significanceLevel;
  final PoissonDistribution distribution=new PoissonDistribution(lambda);
  final double v2=1d - distribution.probability(0);
  int counter=1;
  double value=0d;
  while (value < threshold) {
    value+=distribution.probability(counter) / v2;
    counter++;
    if (counter >= this.k) {
      value=1d;
      break;
    }
  }
  this.type1Error=1d - value;
  return counter;
}
Program: 107997
Project: 107997
Buggy source:
/** 
 * Returns the factor used weight generalized values.
 * @return
 */
public double getGeneralizationFactor(){
  return gFactor;
}

Fixed version (ground truth):
/** 
 * Returns the factor used weight generalized values.
 * @return
 */
public double getGeneralizationFactor(){
  return gFactor != null ? gFactor : 1d;
}
Program: 107998
Project: 107998
Buggy source:
/** 
 * Returns the factor weighting generalization and suppression.
 * @return A factor [0,1] weighting generalization and suppression.The default value is 0.5, which means that generalization and suppression will be treated equally. A factor of 0 will favor suppression, and a factor of 1 will favor generalization. The values in between can be used for balancing both methods.
 */
public double getGeneralizationSuppressionFactor(){
  return gsFactor;
}

Fixed version (ground truth):
/** 
 * Returns the factor weighting generalization and suppression.
 * @return A factor [0,1] weighting generalization and suppression.The default value is 0.5, which means that generalization and suppression will be treated equally. A factor of 0 will favor suppression, and a factor of 1 will favor generalization. The values in between can be used for balancing both methods.
 */
public double getGeneralizationSuppressionFactor(){
  return gsFactor != null ? gsFactor : 0.5d;
}
Program: 107999
Project: 107999
Buggy source:
/** 
 * Returns the factor used to weight suppressed values.
 * @return
 */
public double getSuppressionFactor(){
  return sFactor;
}

Fixed version (ground truth):
/** 
 * Returns the factor used to weight suppressed values.
 * @return
 */
public double getSuppressionFactor(){
  return sFactor != null ? sFactor : 1d;
}
Program: 108001
Project: 108001
Buggy source:
@Override public ModelConfiguration clone(){
  final ModelConfiguration c=new ModelConfiguration();
  c.input=input;
  c.min=new HashMap<String,Integer>(min);
  c.max=new HashMap<String,Integer>(max);
  c.config=config.clone();
  c.hierarchies=new HashMap<String,Hierarchy>(hierarchies);
  if (this.containsCriterion(DPresence.class)) {
    c.researchSubset=this.getCriterion(DPresence.class).getSubset().getSet();
  }
 else   if (this.containsCriterion(KMap.class)) {
    c.researchSubset=this.getCriterion(KMap.class).getSubset().getSet();
  }
 else {
    c.researchSubset=this.researchSubset.clone();
  }
  c.suppressionWeight=this.suppressionWeight;
  c.microAggregationFunctions=new HashMap<String,MicroAggregationFunctionDescription>(microAggregationFunctions);
  c.microAggregationIgnoreMissingData=new HashMap<String,Boolean>(microAggregationIgnoreMissingData);
  c.transformationModes=new HashMap<String,ModelTransformationMode>(transformationModes);
  return c;
}

Fixed version (ground truth):
@Override public ModelConfiguration clone(){
  final ModelConfiguration c=new ModelConfiguration();
  c.input=input;
  c.min=new HashMap<String,Integer>(min);
  c.max=new HashMap<String,Integer>(max);
  c.config=config.clone();
  c.hierarchies=new HashMap<String,Hierarchy>(hierarchies);
  if (this.containsCriterion(DPresence.class)) {
    c.researchSubset=this.getCriterion(DPresence.class).getSubset().getSet();
  }
 else   if (this.containsCriterion(KMap.class) && this.getCriterion(KMap.class).isAccurate()) {
    c.researchSubset=this.getCriterion(KMap.class).getSubset().getSet();
  }
 else {
    c.researchSubset=this.researchSubset.clone();
  }
  c.suppressionWeight=this.suppressionWeight;
  c.microAggregationFunctions=new HashMap<String,MicroAggregationFunctionDescription>(microAggregationFunctions);
  c.microAggregationIgnoreMissingData=new HashMap<String,Boolean>(microAggregationIgnoreMissingData);
  c.transformationModes=new HashMap<String,ModelTransformationMode>(transformationModes);
  return c;
}
Program: 108002
Project: 108002
Buggy source:
/** 
 * Creates a new instance
 * @param k
 */
public ModelKMapCriterion(int k){
  super();
  this.k=k;
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 * @param k
 */
public ModelKMapCriterion(int k){
  super();
  this.k=k;
  this.estimator=null;
}
Program: 108003
Project: 108003
Buggy source:
@Override public PrivacyCriterion getCriterion(Model model){
  DataSubset subset=DataSubset.create(model.getInputConfig().getInput(),model.getInputConfig().getResearchSubset());
  return new KMap(k,subset);
}

Fixed version (ground truth):
@Override public PrivacyCriterion getCriterion(Model model){
  if (estimator == null) {
    DataSubset subset=DataSubset.create(model.getInputConfig().getInput(),model.getInputConfig().getResearchSubset());
    return new KMap(k,subset);
  }
 else {
    ModelRisk riskModel=model.getRiskModel();
    return new KMap(k,significanceLevel,riskModel.getPopulationModel(),estimator);
  }
}
Program: 108004
Project: 108004
Buggy source:
@Override public ModelKMapCriterion clone(){
  ModelKMapCriterion result=new ModelKMapCriterion();
  result.k=this.k;
  result.setEnabled(this.isEnabled());
  return result;
}

Fixed version (ground truth):
@Override public ModelKMapCriterion clone(){
  ModelKMapCriterion result=new ModelKMapCriterion();
  result.k=this.k;
  result.setEnabled(this.isEnabled());
  result.setEstimator(this.estimator);
  return result;
}
Program: 108005
Project: 108005
Buggy source:
@Override public String toString(){
  return SWTUtil.getPrettyString(k) + Resources.getMessage("String_Node_Str");
}

Fixed version (ground truth):
@Override public String toString(){
  String value=SWTUtil.getPrettyString(k) + Resources.getMessage("String_Node_Str");
  if (estimator != null) {
    value+="String_Node_Str" + estimator + "String_Node_Str"+ SWTUtil.getPrettyString(significanceLevel)+ "String_Node_Str";
  }
  return value;
}
Program: 108006
Project: 108006
Buggy source:
@Override public void parse(ModelCriterion criterion,boolean _default){
  if (!(criterion instanceof ModelKMapCriterion)) {
    return;
  }
  ModelKMapCriterion other=(ModelKMapCriterion)criterion;
  this.k=other.k;
  this.setEnabled(other.isEnabled());
}

Fixed version (ground truth):
@Override public void parse(ModelCriterion criterion,boolean _default){
  if (!(criterion instanceof ModelKMapCriterion)) {
    return;
  }
  ModelKMapCriterion other=(ModelKMapCriterion)criterion;
  this.k=other.k;
  this.setEnabled(other.isEnabled());
  this.setEstimator(other.estimator);
  this.significanceLevel=other.significanceLevel;
}
Program: 108007
Project: 108007
Buggy source:
/** 
 * Returns whether local recoding can be applied to the given handle
 * @param handle
 * @return
 */
public boolean isOptimizable(DataHandle handle){
  if (!(handle instanceof DataHandleOutput)) {
    return false;
  }
  DataHandleOutput output=(DataHandleOutput)handle;
  if (output.getInputBuffer() == null || !output.getInputBuffer().equals(this.checker.getInputBuffer())) {
    return false;
  }
  Set<Class<?>> supportedModels=getOptimizablePrivacyModels();
  for (  PrivacyCriterion c : config.getCriteria()) {
    if (!supportedModels.contains(c.getClass())) {
      return false;
    }
  }
  int outliers=0;
  for (int row=0; row < output.getNumRows(); row++) {
    if (output.isOutlier(row)) {
      outliers++;
    }
  }
  if (config.getMinimalGroupSize() != Integer.MAX_VALUE && outliers < config.getMinimalGroupSize()) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Returns whether local recoding can be applied to the given handle
 * @param handle
 * @return
 */
public boolean isOptimizable(DataHandle handle){
  if (!(handle instanceof DataHandleOutput)) {
    return false;
  }
  DataHandleOutput output=(DataHandleOutput)handle;
  if (output.getInputBuffer() == null || !output.getInputBuffer().equals(this.checker.getInputBuffer())) {
    return false;
  }
  Set<Class<?>> supportedModels=getOptimizablePrivacyModels();
  for (  PrivacyCriterion c : config.getCriteria()) {
    if (!supportedModels.contains(c.getClass())) {
      return false;
    }
  }
  int outliers=0;
  for (int row=0; row < output.getNumRows(); row++) {
    if (output.isOutlier(row)) {
      outliers++;
    }
  }
  if (config.getMinimalGroupSize() != Integer.MAX_VALUE && outliers < config.getMinimalGroupSize()) {
    return false;
  }
  if (outliers == 0) {
    return false;
  }
  return true;
}
Program: 108008
Project: 108008
Buggy source:
/** 
 * Clones this config and projects everything onto the given subset.<br> - All privacy models will be cloned<br> - Subsets in d-presence will be projected accordingly<br> - Utility measures will be cloned<br>
 * @param gsFactor 
 * @return
 */
protected ARXConfiguration getSubsetInstance(RowSet rowset,double gsFactor){
  ARXConfiguration result=this.clone();
  result.aCriteria=null;
  HashSet<PrivacyCriterion> criteria=new HashSet<PrivacyCriterion>();
  for (  PrivacyCriterion criterion : result.criteria) {
    PrivacyCriterion clone=null;
    if (criterion instanceof Inclusion) {
      clone=new Inclusion(((Inclusion)criterion).getSubset().getSubsetInstance(rowset));
    }
 else     if (criterion instanceof DPresence) {
      clone=new DPresence(((DPresence)criterion).getDMin(),((DPresence)criterion).getDMax(),((DPresence)criterion).getSubset().getSubsetInstance(rowset));
    }
 else     if (criterion instanceof KMap && ((KMap)criterion).isAccurate()) {
      clone=new KMap(((KMap)criterion).getK(),((KMap)criterion).getSubset().getSubsetInstance(rowset));
    }
 else {
      clone=criterion.clone();
    }
    criteria.add(clone);
  }
  result.criteria=criteria;
  MetricConfiguration utilityConfig=result.getMetric().getConfiguration();
  utilityConfig.setGsFactor(gsFactor);
  result.metric=result.getMetric().getDescription().createInstance(utilityConfig);
  return result;
}

Fixed version (ground truth):
/** 
 * Clones this config and projects everything onto the given subset.<br> - All privacy models will be cloned<br> - Subsets in d-presence will be projected accordingly<br> - Utility measures will be cloned<br> - Replaces estimated k-map with according k-anonymity<br>
 * @param gsFactor 
 * @return
 */
protected ARXConfiguration getSubsetInstance(RowSet rowset,double gsFactor){
  ARXConfiguration result=this.clone();
  result.aCriteria=null;
  HashSet<PrivacyCriterion> criteria=new HashSet<PrivacyCriterion>();
  for (  PrivacyCriterion criterion : result.criteria) {
    PrivacyCriterion clone=null;
    if (criterion instanceof Inclusion) {
      clone=new Inclusion(((Inclusion)criterion).getSubset().getSubsetInstance(rowset));
    }
 else     if (criterion instanceof DPresence) {
      clone=new DPresence(((DPresence)criterion).getDMin(),((DPresence)criterion).getDMax(),((DPresence)criterion).getSubset().getSubsetInstance(rowset));
    }
 else     if (criterion instanceof KMap) {
      if (((KMap)criterion).isAccurate()) {
        clone=new KMap(((KMap)criterion).getK(),((KMap)criterion).getSubset().getSubsetInstance(rowset));
      }
 else {
        clone=new KAnonymity(((KMap)criterion).getDerivedK());
      }
    }
 else {
      clone=criterion.clone();
    }
    criteria.add(clone);
  }
  result.criteria=criteria;
  MetricConfiguration utilityConfig=result.getMetric().getConfiguration();
  utilityConfig.setGsFactor(gsFactor);
  result.metric=result.getMetric().getDescription().createInstance(utilityConfig);
  return result;
}
Program: 108009
Project: 108009
Buggy source:
/** 
 * Creates a new instance
 */
void CellSizeEstimator(String label){
  this.label=label;
}

Fixed version (ground truth):
/** 
 * Creates a new instance 
 */
void CellSizeEstimator(String label){
  this.label=label;
}
Program: 108010
Project: 108010
Buggy source:
/** 
 * Calculates k, based on Zero-truncated Poisson distribution. https://en.wikipedia.org/wiki/Zero-truncated_Poisson_distribution
 * @param lambda
 * @return
 */
private int calculateKZeroPoisson(double lambda){
  final double threshold=1d - this.significanceLevel;
  final PoissonDistribution distribution=new PoissonDistribution(lambda);
  final double v2=1d - distribution.cumulativeProbability(0);
  int counter=0;
  double value=0;
  while (value < threshold) {
    value=distribution.cumulativeProbability(counter) / v2;
    counter++;
  }
  this.type1Error=1d - value;
  return counter + 1;
}

Fixed version (ground truth):
/** 
 * Calculates k, based on Zero-truncated Poisson distribution. https://en.wikipedia.org/wiki/Zero-truncated_Poisson_distribution
 * @param lambda
 * @return
 */
private int calculateKZeroPoisson(double lambda){
  final double threshold=1d - this.significanceLevel;
  final PoissonDistribution distribution=new PoissonDistribution(lambda);
  final double v2=1d - distribution.probability(0);
  int counter=1;
  double value=0d;
  while (value < threshold) {
    value+=distribution.probability(counter) / v2;
    counter++;
  }
  this.type1Error=1d - value;
  return counter;
}
Program: 108011
Project: 108011
Buggy source:
@Override public void reset(){
  if (stack != null)   stack.setLayer(0);
  if (cmbType != null && cmbType.getItemCount() != 0)   cmbType.select(0);
  if (cmbMode != null && cmbMode.getItemCount() != 0)   cmbMode.select(0);
  if (cmbMin != null && cmbMin.getItemCount() != 0)   cmbMin.select(0);
  if (cmbMax != null && cmbMax.getItemCount() != 0)   cmbMax.select(cmbMax.getItemCount() - 1);
  if (cmbFunction != null && cmbFunction.getItemCount() != 0)   cmbFunction.select(0);
  if (hierarchy != null)   hierarchy.actionClear();
  SWTUtil.disable(root);
}

Fixed version (ground truth):
@Override public void reset(){
  if (stack != null)   stack.setLayer(0);
  if (cmbType != null && cmbType.getItemCount() != 0)   cmbType.select(0);
  if (cmbMode != null && cmbMode.getItemCount() != 0)   cmbMode.select(0);
  if (cmbMin != null && cmbMin.getItemCount() != 0)   cmbMin.select(0);
  if (cmbMax != null && cmbMax.getItemCount() != 0)   cmbMax.select(cmbMax.getItemCount() - 1);
  if (cmbFunction != null && cmbFunction.getItemCount() != 0)   cmbFunction.select(0);
  if (hierarchy != null)   hierarchy.actionReset();
  SWTUtil.disable(root);
}
Program: 108014
Project: 108014
Buggy source:
/** 
 * Registers a new view
 * @param view
 * @param helpid
 */
private void registerView(ViewStatistics<?> view,String helpid){
  types.put(view.getParent(),view.getType());
  helpids.put(view.getParent(),helpid);
}

Fixed version (ground truth):
/** 
 * Registers a new view
 * @param view
 * @param helpid
 */
private void registerView(ViewStatisticsBasic view,String helpid){
  types.put(view.getParent(),view.getType());
  helpids.put(view.getParent(),helpid);
}
Program: 108016
Project: 108016
Buggy source:
/** 
 * Creates the view.
 * @param group
 */
private void create(final Composite group){
  final Tree tree=new Tree(group,SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
  tree.setHeaderVisible(true);
  treeViewer=new TreeViewer(tree);
  tree.setMenu(new ClipboardHandlerTree(treeViewer).getMenu());
  final TreeColumn column1=new TreeColumn(tree,SWT.LEFT);
  tree.setLinesVisible(true);
  column1.setAlignment(SWT.LEFT);
  column1.setText(Resources.getMessage("String_Node_Str"));
  column1.setWidth(160);
  final TreeColumn column2=new TreeColumn(tree,SWT.RIGHT);
  column2.setAlignment(SWT.LEFT);
  column2.setText(Resources.getMessage("String_Node_Str"));
  column2.setWidth(100);
  treeViewer.setContentProvider(new OutputContentProvider());
  treeViewer.setLabelProvider(new OutputLabelProvider());
  treeViewer.setInput(roots);
  treeViewer.expandAll();
}

Fixed version (ground truth):
/** 
 * Creates the view.
 * @param root
 */
private void create(final Composite root){
  root.setLayout(new FillLayout());
  final Tree tree=new Tree(root,SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
  tree.setHeaderVisible(true);
  treeViewer=new TreeViewer(tree);
  tree.setMenu(new ClipboardHandlerTree(treeViewer).getMenu());
  final TreeColumn column1=new TreeColumn(tree,SWT.LEFT);
  tree.setLinesVisible(true);
  column1.setAlignment(SWT.LEFT);
  column1.setText(Resources.getMessage("String_Node_Str"));
  column1.setWidth(160);
  final TreeColumn column2=new TreeColumn(tree,SWT.RIGHT);
  column2.setAlignment(SWT.LEFT);
  column2.setText(Resources.getMessage("String_Node_Str"));
  column2.setWidth(100);
  treeViewer.setContentProvider(new OutputContentProvider());
  treeViewer.setLabelProvider(new OutputLabelProvider());
  treeViewer.setInput(roots);
  treeViewer.expandAll();
}
Program: 108017
Project: 108017
Buggy source:
@Override public void reset(){
  if (stack != null)   stack.setLayer(0);
  if (cmbType != null && cmbType.getItemCount() != 0)   cmbType.select(0);
  if (cmbMode != null && cmbMode.getItemCount() != 0)   cmbMode.select(0);
  if (cmbMin != null && cmbMin.getItemCount() != 0)   cmbMin.select(0);
  if (cmbMax != null && cmbMax.getItemCount() != 0)   cmbMax.select(cmbMax.getItemCount() - 1);
  if (cmbFunction != null && cmbFunction.getItemCount() != 0)   cmbFunction.select(0);
  SWTUtil.disable(root);
}

Fixed version (ground truth):
@Override public void reset(){
  if (stack != null)   stack.setLayer(0);
  if (cmbType != null && cmbType.getItemCount() != 0)   cmbType.select(0);
  if (cmbMode != null && cmbMode.getItemCount() != 0)   cmbMode.select(0);
  if (cmbMin != null && cmbMin.getItemCount() != 0)   cmbMin.select(0);
  if (cmbMax != null && cmbMax.getItemCount() != 0)   cmbMax.select(cmbMax.getItemCount() - 1);
  if (cmbFunction != null && cmbFunction.getItemCount() != 0)   cmbFunction.select(0);
  if (hierarchy != null)   hierarchy.actionClear();
  SWTUtil.disable(root);
}
Program: 108018
Project: 108018
Buggy source:
/** 
 * Returns the k-map model.
 * @return
 */
public ModelKMapCriterion getKMapModel(){
  if (kMapModel != null) {
    kMapModel=new ModelKMapCriterion();
  }
  return kMapModel;
}

Fixed version (ground truth):
/** 
 * Returns the k-map model.
 * @return
 */
public ModelKMapCriterion getKMapModel(){
  if (kMapModel == null) {
    kMapModel=new ModelKMapCriterion();
  }
  return kMapModel;
}
Program: 108020
Project: 108020
Buggy source:
/** 
 * For backwards compatibility only.
 * @param dimensions
 */
protected void initialize(int dimensions){
  this.weights=new double[dimensions];
  Arrays.fill(weights,1d);
}

Fixed version (ground truth):
/** 
 * For backwards compatibility only.
 * @param dimensions
 */
protected void initialize(int dimensions){
  this.weights=new double[dimensions];
  Arrays.fill(weights,1d);
  this.dimensions=dimensions;
}
Program: 108021
Project: 108021
Buggy source:
@Override public Entry next(){
  if (_internal == null)   return null;
  Entry e=_internal.next();
  e.frequency=_entries.get(e);
  return e;
}

Fixed version (ground truth):
@Override public Entry next(){
  if (_internal == null)   return null;
  Entry e=_internal.next();
  e.frequency=(double)_entries.get(e) / (double)count;
  return e;
}
Program: 108022
Project: 108022
Buggy source:
/** 
 * Returns a frequency distribution for the values in the given column. The order for string data items is derived from the provided hierarchy
 * @param column The column
 * @param hierarchy The hierarchy, may be null
 * @return
 */
public StatisticsFrequencyDistribution getFrequencyDistribution(int column,Hierarchy hierarchy){
  interrupt=false;
  String[] values=getDistinctValuesOrdered(column,hierarchy);
  double[] frequencies=new double[values.length];
  Map<String,Integer> indexes=new HashMap<String,Integer>();
  for (int i=0; i < values.length; i++) {
    checkInterrupt();
    indexes.put(values[i],i);
  }
  for (int row=0; row < handle.getNumRows(); row++) {
    checkInterrupt();
    String value=handle.getValue(row,column);
    frequencies[indexes.get(value)]++;
  }
  int count=handle.getNumRows();
  for (int i=0; i < frequencies.length; i++) {
    checkInterrupt();
    frequencies[i]/=(double)count;
  }
  return new StatisticsFrequencyDistribution(values,frequencies,count);
}

Fixed version (ground truth):
/** 
 * Returns a frequency distribution for the values in the given column. The order for string data items is derived from the provided hierarchy
 * @param column The column
 * @param hierarchy The hierarchy, may be null
 * @return
 */
public StatisticsFrequencyDistribution getFrequencyDistribution(int column,String[][] hierarchy){
  interrupt=false;
  String[] values=getDistinctValuesOrdered(column,hierarchy);
  double[] frequencies=new double[values.length];
  Map<String,Integer> indexes=new HashMap<String,Integer>();
  for (int i=0; i < values.length; i++) {
    checkInterrupt();
    indexes.put(values[i],i);
  }
  for (int row=0; row < handle.getNumRows(); row++) {
    checkInterrupt();
    String value=handle.getValue(row,column);
    frequencies[indexes.get(value)]++;
  }
  int count=handle.getNumRows();
  for (int i=0; i < frequencies.length; i++) {
    checkInterrupt();
    frequencies[i]/=(double)count;
  }
  return new StatisticsFrequencyDistribution(values,frequencies,count);
}
Program: 108024
Project: 108024
Buggy source:
/** 
 * Returns a contingency table for the given columns. This method assumes that the order of string data items can (and should) be derived from the hierarchies provided in the data definition (if any)
 * @param column1 The first column
 * @param size1 The maximal size in this dimension
 * @param column2 The second column
 * @param size2 The maximal size in this dimension
 * @return
 */
public StatisticsContingencyTable getContingencyTable(int column1,int size1,int column2,int size2){
  return getContingencyTable(column1,size1,true,column2,size2,true);
}

Fixed version (ground truth):
/** 
 * Returns a contingency table for the given columns. The order for string data items is derived from the provided hierarchies
 * @param column1 The first column
 * @param hierarchy1 The hierarchy for the first column, may be null
 * @param column2 The second column
 * @param hierarchy2 The hierarchy for the second column, may be null
 * @return
 */
public StatisticsContingencyTable getContingencyTable(int column1,String[][] hierarchy1,int column2,String[][] hierarchy2){
  interrupt=false;
  String[] values1=getDistinctValuesOrdered(column1,hierarchy1);
  String[] values2=getDistinctValuesOrdered(column2,hierarchy2);
  Map<String,Integer> indexes1=new HashMap<String,Integer>();
  for (int i=0; i < values1.length; i++) {
    checkInterrupt();
    indexes1.put(values1[i],i);
  }
  Map<String,Integer> indexes2=new HashMap<String,Integer>();
  for (int i=0; i < values2.length; i++) {
    checkInterrupt();
    indexes2.put(values2[i],i);
  }
  int max=Integer.MIN_VALUE;
  final Map<Entry,Integer> entries=new HashMap<Entry,Integer>();
  for (int row=0; row < handle.getNumRows(); row++) {
    checkInterrupt();
    int index1=indexes1.get(handle.getValue(row,column1));
    int index2=indexes2.get(handle.getValue(row,column2));
    Entry entry=new Entry(index1,index2);
    Integer previous=entries.get(entry);
    int value=previous != null ? previous + 1 : 1;
    max=Math.max(max,value);
    entries.put(entry,value);
  }
  final int count=handle.getNumRows();
  final Iterator<Entry> internal=entries.keySet().iterator();
  final Iterator<Entry> iterator=new Iterator<Entry>(){
    private Map<Entry,Integer> _entries=entries;
    private Iterator<Entry> _internal=internal;
    @Override public boolean hasNext(){
      if (_internal == null)       return false;
      boolean result=_internal.hasNext();
      if (!result) {
        _internal=null;
        _entries=null;
      }
      return result;
    }
    @Override public Entry next(){
      if (_internal == null)       return null;
      Entry e=_internal.next();
      e.frequency=(double)_entries.get(e) / (double)count;
      return e;
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
  return new StatisticsContingencyTable(values1,values2,count,(double)max / (double)count,iterator);
}
Program: 108025
Project: 108025
Buggy source:
/** 
 * Returns a summary statistics object for the given attribute
 * @param generalization
 * @param dataType
 * @param baseDataType
 * @param hierarchy
 * @return
 */
private <U,V>StatisticsSummaryOrdinal getSummaryStatisticsOrdinal(final int generalization,final DataType<U> dataType,final DataType<V> baseDataType,final Hierarchy hierarchy){
  if (generalization == 0 || !(dataType instanceof ARXString)) {
    return new StatisticsSummaryOrdinal(dataType);
  }
 else   if (baseDataType instanceof ARXString) {
    return new StatisticsSummaryOrdinal(dataType);
  }
 else   if (hierarchy == null) {
    return new StatisticsSummaryOrdinal(dataType);
  }
 else {
    final String[][] array=hierarchy.getHierarchy();
    final Map<String,String> map=new HashMap<String,String>();
    for (int i=0; i < array.length; i++) {
      map.put(array[i][generalization],array[i][0]);
    }
    return new StatisticsSummaryOrdinal(new Comparator<String>(){
      public int compare(      String o1,      String o2){
        V _o1=null;
        try {
          _o1=baseDataType.parse(map.get(o1));
        }
 catch (        Exception e) {
        }
        V _o2=null;
        try {
          _o2=baseDataType.parse(map.get(o2));
        }
 catch (        Exception e) {
        }
        try {
          return baseDataType.compare(_o1,_o2);
        }
 catch (        Exception e) {
          return 0;
        }
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * Returns a summary statistics object for the given attribute
 * @param generalization
 * @param dataType
 * @param baseDataType
 * @param hierarchy
 * @return
 */
private <U,V>StatisticsSummaryOrdinal getSummaryStatisticsOrdinal(final int generalization,final DataType<U> dataType,final DataType<V> baseDataType,final String[][] hierarchy){
  if (generalization == 0 || !(dataType instanceof ARXString)) {
    return new StatisticsSummaryOrdinal(dataType);
  }
 else   if (baseDataType instanceof ARXString) {
    return new StatisticsSummaryOrdinal(dataType);
  }
 else   if (hierarchy == null) {
    return new StatisticsSummaryOrdinal(dataType);
  }
 else {
    final Map<String,String> map=new HashMap<String,String>();
    for (int i=0; i < hierarchy.length; i++) {
      map.put(hierarchy[i][generalization],hierarchy[i][0]);
    }
    return new StatisticsSummaryOrdinal(new Comparator<String>(){
      public int compare(      String o1,      String o2){
        V _o1=null;
        try {
          _o1=baseDataType.parse(map.get(o1));
        }
 catch (        Exception e) {
        }
        V _o2=null;
        try {
          _o2=baseDataType.parse(map.get(o2));
        }
 catch (        Exception e) {
        }
        try {
          return baseDataType.compare(_o1,_o2);
        }
 catch (        Exception e) {
          return 0;
        }
      }
    }
);
  }
}
Program: 108026
Project: 108026
Buggy source:
/** 
 * Returns the appropriate hierarchy, if any.
 * @param column
 * @param orderFromDefinition
 * @return
 */
private Hierarchy getHierarchy(int column,boolean orderFromDefinition){
  final String attribute=handle.getAttributeName(column);
  final AttributeType type=handle.getDefinition().getAttributeType(attribute);
  final DataType<?> datatype=handle.getDataType(attribute);
  final Hierarchy hierarchy;
  if (orderFromDefinition && datatype instanceof ARXString && type instanceof Hierarchy) {
    hierarchy=((Hierarchy)type);
  }
 else {
    hierarchy=null;
  }
  return hierarchy;
}

Fixed version (ground truth):
/** 
 * Returns the appropriate hierarchy, if any.
 * @param column
 * @param orderFromDefinition
 * @return
 */
private String[][] getHierarchy(int column,boolean orderFromDefinition){
  final String attribute=handle.getAttributeName(column);
  final String[][] hierarchy=handle.getDefinition().getHierarchy(attribute);
  final DataType<?> datatype=handle.getDataType(attribute);
  if (orderFromDefinition && datatype instanceof ARXString && hierarchy != null) {
    return hierarchy;
  }
 else {
    return null;
  }
}
Program: 108027
Project: 108027
Buggy source:
public int compare(ARXNode o1,ARXNode o2){
  boolean unknown2=o2.getMinimumInformationLoss().compareTo(o2.getMaximumInformationLoss()) != 0 && asRelativeValue(o2.getMinimumInformationLoss()) == 0d;
  boolean unknown1=o1.getMinimumInformationLoss().compareTo(o1.getMaximumInformationLoss()) != 0 && asRelativeValue(o1.getMinimumInformationLoss()) == 0d;
  if (unknown1 && unknown2)   return 0;
 else   if (unknown1 && !unknown2)   return +1;
 else   if (!unknown1 && unknown2)   return -1;
 else {
    int c1=o1.getMinimumInformationLoss().compareTo(o2.getMinimumInformationLoss());
    return c1 != 0 ? c1 : o1.getMaximumInformationLoss().compareTo(o2.getMaximumInformationLoss());
  }
}

Fixed version (ground truth):
public int compare(ARXNode o1,ARXNode o2){
  boolean unknown2=o2.getMinimumInformationLoss().compareTo(o2.getMaximumInformationLoss()) != 0 && asRelativeValue(o2.getMinimumInformationLoss()) == 0d;
  boolean unknown1=o1.getMinimumInformationLoss().compareTo(o1.getMaximumInformationLoss()) != 0 && asRelativeValue(o1.getMinimumInformationLoss()) == 0d;
  if (unknown1 && unknown2)   return 0;
 else   if (unknown1 && !unknown2)   return +1;
 else   if (!unknown1 && unknown2)   return -1;
 else {
    try {
      int c1=o1.getMinimumInformationLoss().compareTo(o2.getMinimumInformationLoss());
      return c1 != 0 ? c1 : o1.getMaximumInformationLoss().compareTo(o2.getMaximumInformationLoss());
    }
 catch (    Exception e) {
      return 0;
    }
  }
}
Program: 108029
Project: 108029
Buggy source:
/** 
 * Returns the d-disclosure privacy model.
 * @return
 */
public Map<String,ModelDDisclosurePrivacyCriterion> getDDisclosurePrivacyModel(){
  if (this.dDisclosurePrivacyModel == null) {
    this.dDisclosurePrivacyModel=new HashMap<String,ModelDDisclosurePrivacyCriterion>();
  }
  return dDisclosurePrivacyModel;
}

Fixed version (ground truth):
/** 
 * Returns the d-disclosure privacy model.
 * @return
 */
public Map<String,ModelDDisclosurePrivacyCriterion> getDDisclosurePrivacyModel(){
  if (this.dDisclosurePrivacyModel == null) {
    this.dDisclosurePrivacyModel=new HashMap<String,ModelDDisclosurePrivacyCriterion>();
    DataHandle handle=inputConfig.getInput().getHandle();
    for (int col=0; col < handle.getNumColumns(); col++) {
      String attribute=handle.getAttributeName(col);
      dDisclosurePrivacyModel.put(attribute,new ModelDDisclosurePrivacyCriterion(attribute));
    }
  }
  return dDisclosurePrivacyModel;
}
Program: 108031
Project: 108031
Buggy source:
/** 
 * Creates a new instance.
 * @param parent
 * @param controller
 */
public ViewAttributeWeights(final Composite parent,final Controller controller){
  this.controller=controller;
  this.controller.addListener(ModelPart.ATTRIBUTE_TYPE,this);
  this.controller.addListener(ModelPart.MODEL,this);
  this.controller.addListener(ModelPart.INPUT,this);
  this.defaultColorProfile=KnobColorProfile.createDefaultSystemProfile(parent.getDisplay());
  this.focusedColorProfile=KnobColorProfile.createFocusedBlueRedProfile(parent.getDisplay());
  this.root=new ScrolledComposite(parent,SWT.H_SCROLL);
  this.root.addDisposeListener(new DisposeListener(){
    @Override public void widgetDisposed(    DisposeEvent arg0){
      if (defaultColorProfile != null && !defaultColorProfile.isDisposed()) {
        defaultColorProfile.dispose();
      }
      if (focusedColorProfile != null && !focusedColorProfile.isDisposed()) {
        focusedColorProfile.dispose();
      }
    }
  }
);
  root.pack();
}

Fixed version (ground truth):
/** 
 * Creates a new instance.
 * @param parent
 * @param controller
 */
public ViewAttributeWeights(final Composite parent,final Controller controller){
  this.controller=controller;
  this.controller.addListener(ModelPart.ATTRIBUTE_TYPE,this);
  this.controller.addListener(ModelPart.MODEL,this);
  this.controller.addListener(ModelPart.INPUT,this);
  this.defaultColorProfile=KnobColorProfile.createDefaultSystemProfile(parent.getDisplay());
  this.focusedColorProfile=KnobColorProfile.createFocusedBlueRedProfile(parent.getDisplay());
  this.root=new ScrolledComposite(parent,SWT.H_SCROLL);
  this.root.addDisposeListener(new DisposeListener(){
    @Override public void widgetDisposed(    DisposeEvent arg0){
      if (defaultColorProfile != null && !defaultColorProfile.isDisposed()) {
        defaultColorProfile.dispose();
      }
      if (focusedColorProfile != null && !focusedColorProfile.isDisposed()) {
        focusedColorProfile.dispose();
      }
    }
  }
);
  this.root.getHorizontalBar().addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent arg0){
      root.redraw();
    }
  }
);
  root.pack();
}
Program: 108032
Project: 108032
Buggy source:
/** 
 * A negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. It uses the specified data types for comparison if no generalization was applied, otherwise it uses string comparison.
 * @param row1 the row1
 * @param row2 the row2
 * @param columns the columns
 * @param ascending the ascending
 * @return the int
 */
@Override protected int internalCompare(final int row1,final int row2,final int[] columns,final boolean ascending){
  for (  final int index : columns) {
    final int key=index * 2;
    final int attributeType=inverseMap[key];
    final int indexMap=inverseMap[key + 1];
    if (attributeType == AttributeTypeInternal.IDENTIFYING)     return 0;
    int cmp=0;
    try {
      String s1=internalGetValue(row1,index);
      String s2=internalGetValue(row2,index);
      cmp=(s1 == suppressionString && s2 == suppressionString) ? 0 : (s1 == suppressionString ? +1 : (s2 == suppressionString ? -1 : dataTypes[attributeType][indexMap].compare(s1,s2)));
    }
 catch (    final Exception e) {
      throw new RuntimeException(e);
    }
    if (cmp != 0) {
      return ascending ? cmp : -cmp;
    }
  }
  return 0;
}

Fixed version (ground truth):
/** 
 * A negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. It uses the specified data types for comparison if no generalization was applied, otherwise it uses string comparison.
 * @param row1 the row1
 * @param row2 the row2
 * @param columns the columns
 * @param ascending the ascending
 * @return the int
 */
@Override protected int internalCompare(final int row1,final int row2,final int[] columns,final boolean ascending){
  for (  final int index : columns) {
    final int key=index * 2;
    final int attributeType=inverseMap[key];
    final int indexMap=inverseMap[key + 1];
    if (attributeType == AttributeTypeInternal.IDENTIFYING) {
      continue;
    }
    int cmp=0;
    try {
      String s1=internalGetValue(row1,index);
      String s2=internalGetValue(row2,index);
      cmp=(s1 == suppressionString && s2 == suppressionString) ? 0 : (s1 == suppressionString ? +1 : (s2 == suppressionString ? -1 : dataTypes[attributeType][indexMap].compare(s1,s2)));
    }
 catch (    final Exception e) {
      throw new RuntimeException(e);
    }
    if (cmp != 0) {
      return ascending ? cmp : -cmp;
    }
  }
  return 0;
}
Program: 108033
Project: 108033
Buggy source:
/** 
 * Returns a new instance that is projected onto the given subset
 * @param rowset
 * @return
 */
public Data getSubsetInstance(RowSet rowset){
  List<int[]> newdata=new ArrayList<int[]>();
  for (int row=0; row < this.data.length; row++) {
    if (rowset.contains(row)) {
      newdata.add(data[row]);
    }
  }
  int[][] array=new int[newdata.size()][];
  for (int i=0; i < newdata.size(); i++) {
    array[i]=newdata.get(i);
  }
  return new Data(array,header,map,dictionary);
}

Fixed version (ground truth):
/** 
 * Returns a new instance that is projected onto the given subset
 * @param rowset
 * @return
 */
public Data getSubsetInstance(RowSet rowset){
  int[][] array=null;
  if (this.data != null) {
    List<int[]> newdata=new ArrayList<int[]>();
    for (int row=0; row < this.data.length; row++) {
      if (rowset.contains(row)) {
        newdata.add(data[row]);
      }
    }
    array=new int[newdata.size()][];
    for (int i=0; i < newdata.size(); i++) {
      array[i]=newdata.get(i);
    }
  }
  return new Data(array,header,map,dictionary);
}
Program: 108034
Project: 108034
Buggy source:
/** 
 * Applies local recoding
 */
public void actionLocalRecoding(){
  final WorkerLocalRecode worker=new WorkerLocalRecode(model);
  main.showProgressDialog(Resources.getMessage("String_Node_Str"),worker);
  if (worker.getError() != null) {
    Throwable t=worker.getError();
    if (worker.getError() instanceof InvocationTargetException) {
      t=worker.getError().getCause();
    }
    if (t instanceof OutOfMemoryError) {
      main.showInfoDialog(main.getShell(),Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"));
    }
 else     if (t instanceof NullPointerException) {
      main.showErrorDialog(main.getShell(),Resources.getMessage("String_Node_Str"),t);
    }
 else {
      main.showInfoDialog(main.getShell(),Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str") + t.getMessage());
    }
    return;
  }
  update(new ModelEvent(this,ModelPart.OUTPUT,model.getOutput()));
  if (model.getMaximalSizeForComplexOperations() == 0 || model.getInputConfig().getInput().getHandle().getNumRows() <= model.getMaximalSizeForComplexOperations()) {
    this.model.getViewConfig().setMode(Mode.GROUPED);
    this.updateViewConfig(true);
  }
 else {
    this.model.getViewConfig().setMode(Mode.UNSORTED);
    this.updateViewConfig(true);
  }
  this.update(new ModelEvent(this,ModelPart.SELECTED_VIEW_CONFIG,model.getOutput()));
}

Fixed version (ground truth):
/** 
 * Applies local recoding
 */
public void actionLocalRecoding(){
  final WorkerLocalRecode worker=new WorkerLocalRecode(model);
  main.showProgressDialog(Resources.getMessage("String_Node_Str"),worker);
  if (worker.getError() != null) {
    Throwable t=worker.getError();
    if (worker.getError() instanceof InvocationTargetException) {
      t=worker.getError().getCause();
    }
    if (t instanceof RollbackRequiredException) {
      this.actionApplySelectedTransformation();
    }
 else     if (t instanceof OutOfMemoryError) {
      main.showInfoDialog(main.getShell(),Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"));
    }
 else     if (t instanceof NullPointerException) {
      main.showErrorDialog(main.getShell(),Resources.getMessage("String_Node_Str"),t);
    }
 else {
      main.showInfoDialog(main.getShell(),Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str") + t.getMessage());
    }
    return;
  }
  update(new ModelEvent(this,ModelPart.OUTPUT,model.getOutput()));
  if (model.getMaximalSizeForComplexOperations() == 0 || model.getInputConfig().getInput().getHandle().getNumRows() <= model.getMaximalSizeForComplexOperations()) {
    this.model.getViewConfig().setMode(Mode.GROUPED);
    this.updateViewConfig(true);
  }
 else {
    this.model.getViewConfig().setMode(Mode.UNSORTED);
    this.updateViewConfig(true);
  }
  this.update(new ModelEvent(this,ModelPart.SELECTED_VIEW_CONFIG,model.getOutput()));
}
Program: 108036
Project: 108036
Buggy source:
/** 
 * Instantiates.
 * @param ignoreMissingData
 */
public DistributionAggregateFunctionGeometricMean(boolean ignoreMissingData){
  super(ignoreMissingData,true);
}

Fixed version (ground truth):
/** 
 * Clone constructor
 * @param ignoreMissingData
 * @param minimum
 * @param maximum
 * @param descriptiveStatistics
 */
private DistributionAggregateFunctionGeometricMean(boolean ignoreMissingData,double minimum,double maximum,DescriptiveStatistics descriptiveStatistics){
  this(ignoreMissingData);
  this.minimum=minimum;
  this.maximum=maximum;
  this.stats=descriptiveStatistics;
}
Program: 108037
Project: 108037
Buggy source:
/** 
 * Instantiates.
 * @param ignoreMissingData
 */
public DistributionAggregateFunctionArithmeticMean(boolean ignoreMissingData){
  super(ignoreMissingData,true);
}

Fixed version (ground truth):
/** 
 * Clone constructor
 * @param ignoreMissingData
 * @param minimum
 * @param maximum
 * @param descriptiveStatistics
 */
private DistributionAggregateFunctionArithmeticMean(boolean ignoreMissingData,double minimum,double maximum,DescriptiveStatistics descriptiveStatistics){
  this(ignoreMissingData);
  this.minimum=minimum;
  this.maximum=maximum;
  this.stats=descriptiveStatistics;
}
Program: 108038
Project: 108038
Buggy source:
/** 
 * Instantiates.
 * @param ignoreMissingData
 */
public DistributionAggregateFunctionMode(boolean ignoreMissingData){
  super(ignoreMissingData,true);
}

Fixed version (ground truth):
/** 
 * Clone constructor
 * @param ignoreMissingData
 * @param minimum
 * @param maximum
 */
private DistributionAggregateFunctionMode(boolean ignoreMissingData,double minimum,double maximum){
  this(ignoreMissingData);
  this.minimum=minimum;
  this.maximum=maximum;
}
Program: 108039
Project: 108039
Buggy source:
/** 
 * Instantiates.
 * @param ignoreMissingData
 */
public DistributionAggregateFunctionMedian(boolean ignoreMissingData){
  super(ignoreMissingData,true);
}

Fixed version (ground truth):
/** 
 * Clone constructor
 * @param ignoreMissingData
 * @param minimum
 * @param maximum
 */
private DistributionAggregateFunctionMedian(boolean ignoreMissingData,double minimum,double maximum){
  this(ignoreMissingData);
  this.minimum=minimum;
  this.maximum=maximum;
}
Program: 108041
Project: 108041
Buggy source:
/** 
 * Clone constructor
 * @param ignoreMissingData
 * @param minimum
 * @param maximum
 * @param descriptiveStatistics
 */
private DistributionAggregateFunctionGeometricMean(boolean ignoreMissingData,double minimum,double maximum,DescriptiveStatistics descriptiveStatistics){
  this(ignoreMissingData);
  this.minimum=minimum;
  this.maximum=maximum;
  this.stats=descriptiveStatistics;
}

Fixed version (ground truth):
/** 
 * Clone constructor
 * @param ignoreMissingData
 * @param minimum
 * @param maximum
 */
private DistributionAggregateFunctionGeometricMean(boolean ignoreMissingData,Double minimum,Double maximum){
  this(ignoreMissingData);
  this.minimum=minimum;
  this.maximum=maximum;
}
Program: 108042
Project: 108042
Buggy source:
/** 
 * Clone constructor
 * @param ignoreMissingData
 * @param minimum
 * @param maximum
 * @param descriptiveStatistics
 */
private DistributionAggregateFunctionArithmeticMean(boolean ignoreMissingData,double minimum,double maximum,DescriptiveStatistics descriptiveStatistics){
  this(ignoreMissingData);
  this.minimum=minimum;
  this.maximum=maximum;
  this.stats=descriptiveStatistics;
}

Fixed version (ground truth):
/** 
 * Clone constructor
 * @param ignoreMissingData
 * @param minimum
 * @param maximum
 */
private DistributionAggregateFunctionArithmeticMean(boolean ignoreMissingData,Double minimum,Double maximum){
  this(ignoreMissingData);
  this.minimum=minimum;
  this.maximum=maximum;
}
Program: 108043
Project: 108043
Buggy source:
/** 
 * Clone constructor
 * @param ignoreMissingData
 * @param minimum
 * @param maximum
 */
private DistributionAggregateFunctionMedian(boolean ignoreMissingData,double minimum,double maximum){
  this(ignoreMissingData);
  this.minimum=minimum;
  this.maximum=maximum;
}

Fixed version (ground truth):
/** 
 * Clone constructor
 * @param ignoreMissingData
 * @param minimum
 * @param maximum
 */
private DistributionAggregateFunctionMedian(boolean ignoreMissingData,Double minimum,Double maximum){
  this(ignoreMissingData);
  this.minimum=minimum;
  this.maximum=maximum;
}