nus-yam/ex-repair huggingface dataset:
Program: 64425
Project: 64425
Buggy source:
public void setPreview(Preview preview){
  structureChangeFlag=false;
  if (latestPreview != null && preview == null) {
    names=new ArrayList<>();
    data=new ArrayList<>();
    fireTableStructureChanged();
    structureChangeFlag=true;
  }
 else   if (latestPreview == null && preview != null || latestPreview != null && preview != null && preview.getTaskClass() != currentTaskClass) {
    names=new ArrayList<>();
    for (int measurementNameIdx=0; measurementNameIdx < preview.getMeasurementNameCount(); ++measurementNameIdx) {
      names.add(preview.getMeasurementName(measurementNameIdx));
    }
    fireTableStructureChanged();
    structureChangeFlag=true;
  }
  latestPreview=preview;
  if (preview != null) {
    currentTaskClass=preview.getTaskClass();
    data=preview.getData();
    fireTableDataChanged();
  }
}

Fixed version (ground truth):
public void setPreview(Preview preview){
  structureChangeFlag=false;
  if (preview == null) {
    if (latestPreview != null) {
      System.out.println("String_Node_Str");
      names=new ArrayList<>();
      data=new ArrayList<>();
      structureChangeFlag=true;
    }
  }
 else {
    structureChangeFlag|=latestPreview == null;
    structureChangeFlag|=latestPreview != null && latestPreview.numEntries() == 0 && preview.numEntries() > 0;
    structureChangeFlag|=latestPreview != null && latestPreview.getTaskClass() != preview.getTaskClass();
  }
  latestPreview=preview;
  if (preview != null) {
    data=preview.getData();
    if (structureChangeFlag) {
      copyMeasurementNames(preview);
    }
  }
}
Program: 64426
Project: 64426
Buggy source:
public PreviewTableModel(){
  names=new ArrayList<>();
  data=new ArrayList<>();
  latestPreview=null;
  structureChangeFlag=false;
  currentTaskClass=null;
}

Fixed version (ground truth):
public PreviewTableModel(){
  names=new ArrayList<>();
  data=new ArrayList<>();
  latestPreview=null;
  structureChangeFlag=false;
}
Program: 64427
Project: 64427
Buggy source:
/** 
 * Text representation of a InstanceImpl.
 */
@Override public String toString(){
  double[] aux=this.instanceData.toDoubleArray();
  StringBuilder str=new StringBuilder();
  for (int i=0; i < aux.length; i++) {
    str.append(aux[i]).append("String_Node_Str");
  }
  return str.toString();
}

Fixed version (ground truth):
/** 
 * Text representation of a InstanceImpl.
 */
@Override public String toString(){
  StringBuilder str=new StringBuilder();
  for (int attIndex=0; attIndex < this.numAttributes(); attIndex++) {
    if (this.attribute(attIndex).isNominal()) {
      int valueIndex=(int)this.value(attIndex);
      String stringValue=this.attribute(attIndex).value(valueIndex);
      str.append(stringValue).append("String_Node_Str");
    }
 else     if (this.attribute(attIndex).isNumeric()) {
      str.append(this.value(attIndex)).append("String_Node_Str");
    }
 else     if (this.attribute(attIndex).isDate()) {
      SimpleDateFormat dateFormatter=new SimpleDateFormat("String_Node_Str");
      str.append(dateFormatter.format(this.value(attIndex))).append("String_Node_Str");
    }
  }
  return str.toString();
}
Program: 64428
Project: 64428
Buggy source:
@Override public int branchForInstance(Instance inst){
  int instAttIndex=this.attIndex;
  if (inst.isMissing(instAttIndex)) {
    return -1;
  }
  double v=inst.value(instAttIndex);
  if (v == this.attValue) {
    return this.equalsPassesTest ? 0 : 1;
  }
  return v < this.attValue ? 0 : 1;
}

Fixed version (ground truth):
@Override public int branchForInstance(Instance inst){
  int instAttIndex=this.attIndex;
  if (inst.isMissing(instAttIndex)) {
    return -1;
  }
  double v=inst.valueInputAttribute(instAttIndex);
  if (v == this.attValue) {
    return this.equalsPassesTest ? 0 : 1;
  }
  return v < this.attValue ? 0 : 1;
}
Program: 64429
Project: 64429
Buggy source:
private boolean skipInLevelCount(){
  return false;
}

Fixed version (ground truth):
protected boolean skipInLevelCount(){
  return false;
}
Program: 64430
Project: 64430
Buggy source:
@SuppressWarnings("String_Node_Str") private boolean skipInLevelCount(){
  return true;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected boolean skipInLevelCount(){
  return true;
}
Program: 64431
Project: 64431
Buggy source:
public double getPrediction(Instance inst,FIMTDD tree){
  return children.get(splitTest.branchForInstance(inst)).getPrediction(inst);
}

Fixed version (ground truth):
public double getPrediction(Instance inst){
  return children.get(splitTest.branchForInstance(inst)).getPrediction(inst);
}
Program: 64432
Project: 64432
Buggy source:
@Override public InstanceExample nextInstance(){
  Instance x=(Instance)((Instance)this.inputStream.nextInstance().getData());
  if (dataset == null) {
    System.out.println("String_Node_Str");
    initialize(x);
  }
  System.out.println("String_Node_Str");
  double z_[]=new double[dataset.numAttributes()];
  Instance z=new InstanceImpl(x.weight(),z_);
  int d=x.numAttributes();
  int h=z_.length;
  int j_c=x.classIndex();
  for (int k=0; k < h; k++) {
    double sum_k=0.;
    for (int j=0; j < d; j++) {
      if (j != j_c)       sum_k+=(x.value(j) - c[k]);
    }
    double v=sum_k / Math.pow(r[k],2);
    z.setValue(k,Math.exp(-sum_k));
  }
  z.setDataset(dataset);
  return new InstanceExample(z);
}

Fixed version (ground truth):
@Override public InstanceExample nextInstance(){
  Instance x=(Instance)((Instance)this.inputStream.nextInstance().getData());
  if (dataset == null) {
    System.out.println("String_Node_Str");
    initialize(x);
  }
  double z_[]=new double[dataset.numAttributes()];
  Instance z=new InstanceImpl(x.weight(),z_);
  int d=x.numAttributes();
  int h=numLatentOption.getValue();
  int j_c=x.classIndex();
  for (int k=0; k < h; k++) {
    double sum_k=0.;
    for (int j=0; j < d; j++) {
      sum_k+=(x.value(j) - c[k]);
    }
    double v=sum_k / Math.pow(r[k],2);
    z.setValue(k,Math.exp(-sum_k));
  }
  z.setValue(h,x.classValue());
  z.setDataset(dataset);
  return new InstanceExample(z);
}
Program: 64433
Project: 64433
Buggy source:
private void initialize(Instance instance){
  int h=numLatentOption.getValue();
  c=new double[h];
  r=new double[h];
  for (int j=0; j < h; j++) {
    c[j]=this.random.nextGaussian();
    r[j]=this.random.nextDouble();
  }
  Instances ds=new Instances();
  List<Attribute> v=new ArrayList<Attribute>(h);
  List<Integer> indexValues=new ArrayList<Integer>(h);
  for (int j=0; j < h; j++) {
    v.add(new Attribute("String_Node_Str" + String.valueOf(j)));
    indexValues.add(j);
  }
  v.add(instance.dataset().classAttribute());
  indexValues.add(h);
  ds.setAttributes(v,indexValues);
  Range r=new Range("String_Node_Str");
  ds.setRangeOutputIndices(r);
  dataset=(new InstancesHeader(ds));
  dataset.setClassIndex(h);
  System.out.println("String_Node_Str" + ds);
  System.out.println("String_Node_Str" + dataset.numClasses());
  System.out.println("String_Node_Str" + dataset.numInstances());
  System.out.println("String_Node_Str" + dataset.numAttributes());
}

Fixed version (ground truth):
private void initialize(Instance instance){
  int h=numLatentOption.getValue();
  c=new double[h];
  r=new double[h];
  for (int j=0; j < h; j++) {
    c[j]=this.random.nextGaussian();
    r[j]=this.random.nextDouble();
  }
  Instances ds=new Instances();
  List<Attribute> v=new ArrayList<Attribute>(h);
  List<Integer> indexValues=new ArrayList<Integer>(h);
  for (int j=0; j < h; j++) {
    v.add(new Attribute("String_Node_Str" + String.valueOf(j)));
    indexValues.add(j);
  }
  v.add(instance.dataset().classAttribute());
  indexValues.add(h);
  ds.setAttributes(v,indexValues);
  Range r=new Range("String_Node_Str");
  ds.setRangeOutputIndices(r);
  dataset=(new InstancesHeader(ds));
  dataset.setClassIndex(h);
  System.out.println("String_Node_Str" + dataset);
  System.out.println("String_Node_Str" + dataset.classIndex());
  System.out.println("String_Node_Str" + dataset.numClasses());
  System.out.println("String_Node_Str" + dataset.numInstances());
  System.out.println("String_Node_Str" + dataset.numAttributes());
}
Program: 64434
Project: 64434
Buggy source:
@Override public void trainOnInstanceImpl(MultiLabelInstance instance){
  if (this.hasStarted == false) {
    this.ensemble=new Classifier[instance.numberOutputTargets()];
    Classifier baseLearner=(Classifier)getPreparedClassOption(this.baseLearnerOption);
    baseLearner.resetLearning();
    for (int i=0; i < this.ensemble.length; i++) {
      this.ensemble[i]=baseLearner.copy();
    }
    this.hasStarted=true;
  }
  for (int i=0; i < this.ensemble.length; i++) {
    Instance weightedInst=transformInstance(instance,i);
    this.ensemble[i].trainOnInstance(weightedInst);
  }
}

Fixed version (ground truth):
@Override public void trainOnInstanceImpl(MultiLabelInstance instance){
  if (this.hasStarted == false) {
    this.ensemble=new Classifier[instance.numberOutputTargets()];
    Classifier baseLearner=(Classifier)getPreparedClassOption(this.baseLearnerOption);
    baseLearner.resetLearning();
    for (int i=0; i < this.ensemble.length; i++) {
      this.ensemble[i]=baseLearner.copy();
    }
    this.hasStarted=true;
  }
  for (int i=0; i < this.ensemble.length; i++) {
    Instance weightedInst=transformInstance(instance,i);
    this.ensemble[i].trainOnInstance(weightedInst);
  }
  if (instance.numberOutputTargets() != ensemble.length)   System.out.println("String_Node_Str");
}
Program: 64436
Project: 64436
Buggy source:
@Override public void resetLearningImpl(){
  defaultRule=newDefaultRule();
  defaultRule.setLearner((MultiLabelLearner)((MultiLabelLearner)getPreparedClassOption(learnerOption)).copy());
  setRuleOptions(defaultRule);
  ruleSet=new MultiLabelRuleSet();
  ruleNumberID=1;
  statistics=null;
}

Fixed version (ground truth):
@Override public void resetLearningImpl(){
  defaultRule=newDefaultRule();
  defaultRule.setLearner((MultiLabelLearner)((MultiLabelLearner)getPreparedClassOption(learnerOption)).copy());
  defaultRule.setInstanceTransformer(new NoInstanceTransformation());
  setRuleOptions(defaultRule);
  ruleSet=new MultiLabelRuleSet();
  ruleNumberID=1;
  statistics=null;
}
Program: 64437
Project: 64437
Buggy source:
public Prediction getPredictionForInstance(MultiLabelInstance instance){
  Prediction prediction=null;
  if (learner != null && this.instanceTransformer != null) {
    Instance transfInstance=this.instanceTransformer.sourceInstanceToTarget(instance);
    Prediction targetPrediction=learner.getPredictionForInstance(transfInstance);
    prediction=this.instanceTransformer.targetPredictionToSource(targetPrediction);
  }
  return prediction;
}

Fixed version (ground truth):
public Prediction getPredictionForInstance(MultiLabelInstance instance){
  Prediction prediction=null;
  if (learner != null) {
    Instance transfInstance=this.instanceTransformer.sourceInstanceToTarget(instance);
    Prediction targetPrediction=learner.getPredictionForInstance(transfInstance);
    prediction=this.instanceTransformer.targetPredictionToSource(targetPrediction);
  }
  return prediction;
}
Program: 64440
Project: 64440
Buggy source:
public boolean tryToExpand(double splitConfidence,double tieThresholdOption){
  boolean hasExpanded=learningLiteral.tryToExpand(splitConfidence,tieThresholdOption);
  if (hasExpanded) {
    LearningLiteral otherOutputsLiteral=learningLiteral.getOtherOutputsLearningLiteral();
    if (otherOutputsLiteral != null) {
      otherOutputsRule=new MultiLabelRule();
      otherOutputsRule.instanceInformation=instanceInformation;
      otherOutputsRule.literalList=new LinkedList<Literal>(literalList);
      otherOutputsRule.learningLiteral=otherOutputsLiteral;
    }
    otherBranchRule=new MultiLabelRule(learningLiteral.getOtherBranchLearningLiteral());
    int attribIndex=learningLiteral.getBestSuggestion().getPredicate().getAttributeIndex();
    boolean isEqualOrLess=learningLiteral.getBestSuggestion().getPredicate().isEqualOrLess();
    Iterator<Literal> it=literalList.iterator();
    while (it.hasNext()) {
      Literal l=it.next();
      if (l.predicate.getAttributeIndex() == attribIndex && l.predicate.isEqualOrLess() == isEqualOrLess) {
        it.remove();
        break;
      }
    }
    this.literalList.add(new Literal(learningLiteral.getBestSuggestion().getPredicate()));
    learningLiteral=learningLiteral.getExpandedLearningLiteral();
  }
  return hasExpanded;
}

Fixed version (ground truth):
public boolean tryToExpand(double splitConfidence,double tieThresholdOption){
  boolean hasExpanded=learningLiteral.tryToExpand(splitConfidence,tieThresholdOption);
  if (hasExpanded) {
    LearningLiteral otherOutputsLiteral=learningLiteral.getOtherOutputsLearningLiteral();
    if (otherOutputsLiteral != null && this.literalList.size() > 0) {
      otherOutputsRule=new MultiLabelRule();
      otherOutputsRule.instanceInformation=instanceInformation;
      otherOutputsRule.literalList=new LinkedList<Literal>(this.literalList);
      otherOutputsRule.learningLiteral=otherOutputsLiteral;
    }
    otherBranchRule=new MultiLabelRule((LearningLiteral)learningLiteral.getOtherBranchLearningLiteral());
    int attribIndex=learningLiteral.getBestSuggestion().getPredicate().getAttributeIndex();
    boolean isEqualOrLess=learningLiteral.getBestSuggestion().getPredicate().isEqualOrLess();
    Iterator<Literal> it=literalList.iterator();
    while (it.hasNext()) {
      Literal l=it.next();
      if (l.predicate.getAttributeIndex() == attribIndex && l.predicate.isEqualOrLess() == isEqualOrLess) {
        it.remove();
        break;
      }
    }
    this.literalList.add(new Literal(learningLiteral.getBestSuggestion().getPredicate()));
    learningLiteral=learningLiteral.getExpandedLearningLiteral();
  }
  return hasExpanded;
}
Program: 64441
Project: 64441
Buggy source:
@Override public Prediction computeWeightedVote(){
  int n=votes.size();
  if (n > 0) {
    int numOutputs=outputAttributesCount.length;
    weights=new double[n][numOutputs];
    weightedVote=new MultiLabelPrediction(numOutputs);
    double[] sumError=new double[numOutputs];
    for (int o=0; o < numOutputs; o++) {
      for (int i=0; i < n; i++) {
        if (votes.get(i).hasVotesForAttribute(o) && errors.get(i) != null) {
          weights[i][o]=1.0 / (errors.get(i)[o] + EPS);
          sumError[o]+=weights[i][o];
        }
      }
      int numClasses=votes.get(0).numClasses(o);
      for (int i=0; i < n; i++) {
        if (votes.get(i).hasVotesForAttribute(o)) {
          if (sumError[o] > 0)           weights[i][o]/=sumError[o];
 else           weights[i][o]=1.0 / outputAttributesCount[o];
        }
        for (int j=0; j < numClasses; j++) {
          weightedVote.setVote(o,j,weightedVote.getVote(o,j) + votes.get(i).getVote(o,j) * weights[i][o]);
        }
      }
    }
  }
  return weightedVote;
}

Fixed version (ground truth):
@Override public Prediction computeWeightedVote(){
  int n=votes.size();
  if (n > 0) {
    int numOutputs=outputAttributesCount.length;
    weights=new double[n][numOutputs];
    weightedVote=new MultiLabelPrediction(numOutputs);
    double[] sumError=new double[numOutputs];
    for (int o=0; o < numOutputs; o++) {
      for (int i=0; i < n; i++) {
        if (votes.get(i).hasVotesForAttribute(o) && errors.get(i) != null) {
          weights[i][o]=1.0 / (errors.get(i)[o] + EPS);
          sumError[o]+=weights[i][o];
        }
      }
      for (int i=0; i < n; i++) {
        int numClasses=votes.get(i).numClasses(o);
        if (votes.get(i).hasVotesForAttribute(o)) {
          if (sumError[o] > 0)           weights[i][o]/=sumError[o];
 else           weights[i][o]=1.0 / outputAttributesCount[o];
        }
        for (int j=0; j < numClasses; j++) {
          weightedVote.setVote(o,j,weightedVote.getVote(o,j) + votes.get(i).getVote(o,j) * weights[i][o]);
        }
      }
    }
  }
  return weightedVote;
}
Program: 64442
Project: 64442
Buggy source:
@Override public Prediction computeWeightedVote(){
  int n=votes.size();
  if (n > 0) {
    int numOutputs=outputAttributesCount.length;
    weights=new double[n][numOutputs];
    weightedVote=new MultiLabelPrediction(numOutputs);
    for (int o=0; o < numOutputs; o++) {
      int numClasses=votes.get(0).numClasses(o);
      for (int i=0; i < n; i++) {
        if (votes.get(i).hasVotesForAttribute(o))         weights[i][o]=1.0 / outputAttributesCount[o];
        for (int j=0; j < numClasses; j++) {
          weightedVote.setVote(o,j,weightedVote.getVote(o,j) + votes.get(i).getVote(o,j) * weights[i][o]);
        }
      }
    }
  }
  return weightedVote;
}

Fixed version (ground truth):
@Override public Prediction computeWeightedVote(){
  int n=votes.size();
  if (n > 0) {
    int numOutputs=outputAttributesCount.length;
    weights=new double[n][numOutputs];
    weightedVote=new MultiLabelPrediction(numOutputs);
    for (int o=0; o < numOutputs; o++) {
      for (int i=0; i < n; i++) {
        int numClasses=votes.get(i).numClasses(o);
        if (votes.get(i).hasVotesForAttribute(o))         weights[i][o]=1.0 / outputAttributesCount[o];
        for (int j=0; j < numClasses; j++) {
          weightedVote.setVote(o,j,weightedVote.getVote(o,j) + votes.get(i).getVote(o,j) * weights[i][o]);
        }
      }
    }
  }
  return weightedVote;
}
Program: 64444
Project: 64444
Buggy source:
@Override public Prediction computeWeightedVote(){
  int n=votes.size();
  if (n > 0) {
    int numOutputs=outputAttributesCount.length;
    weights=new double[n][numOutputs];
    weightedVote=new MultiLabelPrediction(numOutputs);
    double[] sumError=new double[numOutputs];
    for (int o=0; o < numOutputs; o++) {
      for (int i=0; i < n; i++) {
        if (votes.get(i).hasVotesForAttribute(o) && errors.get(i) != null) {
          weights[i][o]=1.0 / (errors.get(i)[o] + EPS);
          sumError[o]+=weights[i][o];
        }
      }
      int numClasses=votes.get(0).numClasses(o);
      for (int i=0; i < n; i++) {
        if (votes.get(i).hasVotesForAttribute(o)) {
          if (sumError[o] > 0)           weights[i][o]/=sumError[o];
 else           weights[i][o]=1.0 / outputAttributesCount[o];
        }
        for (int j=0; j < numClasses; j++) {
          weightedVote.setVote(o,j,weightedVote.getVote(o,j) + votes.get(i).getVote(o,j) * weights[i][o]);
        }
      }
    }
  }
  return weightedVote;
}

Fixed version (ground truth):
@Override public Prediction computeWeightedVote(){
  int n=votes.size();
  if (n > 0) {
    int numOutputs=outputAttributesCount.length;
    weights=new double[n][numOutputs];
    weightedVote=new MultiLabelPrediction(numOutputs);
    double[] sumError=new double[numOutputs];
    for (int o=0; o < numOutputs; o++) {
      for (int i=0; i < n; i++) {
        if (votes.get(i).hasVotesForAttribute(o) && errors.get(i) != null) {
          weights[i][o]=1.0 / (errors.get(i)[o] + EPS);
          sumError[o]+=weights[i][o];
        }
      }
      for (int i=0; i < n; i++) {
        if (votes.get(i).hasVotesForAttribute(o)) {
          if (sumError[o] > 0)           weights[i][o]/=sumError[o];
 else           weights[i][o]=1.0 / outputAttributesCount[o];
        }
        weightedVote.setVotes(o,votes.get(i).getVotes(o));
      }
    }
  }
  return weightedVote;
}
Program: 64445
Project: 64445
Buggy source:
@Override public Prediction computeWeightedVote(){
  int n=votes.size();
  if (n > 0) {
    int numOutputs=outputAttributesCount.length;
    weights=new double[n][numOutputs];
    weightedVote=new MultiLabelPrediction(numOutputs);
    for (int o=0; o < numOutputs; o++) {
      int numClasses=votes.get(0).numClasses(o);
      for (int i=0; i < n; i++) {
        if (votes.get(i).hasVotesForAttribute(o))         weights[i][o]=1.0 / outputAttributesCount[o];
        for (int j=0; j < numClasses; j++) {
          weightedVote.setVote(o,j,weightedVote.getVote(o,j) + votes.get(i).getVote(o,j) * weights[i][o]);
        }
      }
    }
  }
  return weightedVote;
}

Fixed version (ground truth):
@Override public Prediction computeWeightedVote(){
  int n=votes.size();
  if (n > 0) {
    int numOutputs=outputAttributesCount.length;
    weights=new double[n][numOutputs];
    weightedVote=new MultiLabelPrediction(numOutputs);
    for (int o=0; o < numOutputs; o++) {
      for (int i=0; i < n; i++) {
        if (votes.get(i).hasVotesForAttribute(o))         weights[i][o]=1.0 / outputAttributesCount[o];
        weightedVote.setVotes(o,votes.get(i).getVotes(o));
      }
    }
  }
  return weightedVote;
}
Program: 64446
Project: 64446
Buggy source:
public double prediction(Instance inst,int classVal){
  double sum=0.0;
  for (int i=0; i < inst.numAttributes() - 1; i++) {
    sum+=weightAttribute[classVal][i] * inst.value(i);
  }
  sum+=weightAttribute[classVal][inst.numAttributes() - 1];
  return 1.0 / (1.0 + Math.exp(-sum));
}

Fixed version (ground truth):
public double prediction(Instance inst,int classVal){
  double sum=0.0;
  for (int i=0; i < inst.numAttributes() - 1; i++) {
    sum+=weightAttribute[classVal][i] * inst.valueInputAttribute(i);
  }
  sum+=weightAttribute[classVal][inst.numAttributes() - 1];
  return 1.0 / (1.0 + Math.exp(-sum));
}
Program: 64447
Project: 64447
Buggy source:
@Override public void trainOnInstanceImpl(Instance inst){
  if (this.reset == true) {
    this.reset=false;
    this.numberAttributes=inst.numAttributes();
    this.numberClasses=inst.numClasses();
    this.weightAttribute=new double[inst.numClasses()][inst.numAttributes()];
    for (int i=0; i < inst.numClasses(); i++) {
      for (int j=0; j < inst.numAttributes(); j++) {
        weightAttribute[i][j]=0.2 * Math.random() - 0.1;
      }
    }
  }
  double[] preds=new double[inst.numClasses()];
  for (int i=0; i < inst.numClasses(); i++) {
    preds[i]=prediction(inst,i);
  }
  double learningRatio=learningRatioOption.getValue();
  int actualClass=(int)inst.classValue();
  for (int i=0; i < inst.numClasses(); i++) {
    double actual=(i == actualClass) ? 1.0 : 0.0;
    double delta=(actual - preds[i]) * preds[i] * (1 - preds[i]);
    for (int j=0; j < inst.numAttributes() - 1; j++) {
      this.weightAttribute[i][j]+=learningRatio * delta * inst.value(j);
    }
    this.weightAttribute[i][inst.numAttributes() - 1]+=learningRatio * delta;
  }
}

Fixed version (ground truth):
@Override public void trainOnInstanceImpl(Instance inst){
  if (this.reset == true) {
    this.reset=false;
    this.numberAttributes=inst.numAttributes();
    this.numberClasses=inst.numClasses();
    this.weightAttribute=new double[inst.numClasses()][inst.numAttributes()];
    for (int i=0; i < inst.numClasses(); i++) {
      for (int j=0; j < inst.numAttributes(); j++) {
        weightAttribute[i][j]=0.2 * this.classifierRandom.nextDouble() - 0.1;
      }
    }
  }
  double[] preds=new double[inst.numClasses()];
  for (int i=0; i < inst.numClasses(); i++) {
    preds[i]=prediction(inst,i);
  }
  double learningRatio=learningRatioOption.getValue();
  int actualClass=(int)inst.classValue();
  for (int i=0; i < inst.numClasses(); i++) {
    double actual=(i == actualClass) ? 1.0 : 0.0;
    double delta=(actual - preds[i]) * preds[i] * (1 - preds[i]);
    for (int j=0; j < inst.numAttributes() - 1; j++) {
      this.weightAttribute[i][j]+=learningRatio * delta * inst.valueInputAttribute(j);
    }
    this.weightAttribute[i][inst.numAttributes() - 1]+=learningRatio * delta;
  }
}
Program: 64448
Project: 64448
Buggy source:
@Override public boolean isRandomizable(){
  return false;
}

Fixed version (ground truth):
@Override public boolean isRandomizable(){
  return true;
}
Program: 64449
Project: 64449
Buggy source:
@Override public Learner[] getSublearners(){
  return null;
}

Fixed version (ground truth):
@Override public Learner[] getSublearners(){
  return getSubClassifiers();
}
Program: 64450
Project: 64450
Buggy source:
/** 
 * Instantiates a new arff loader.
 * @param reader the reader
 * @param range 
 * @param size the size
 * @param classAttribute the class attribute
 */
public ArffLoader(Reader reader,Range range){
  this.range=range;
  BufferedReader br=new BufferedReader(reader);
  streamTokenizer=new StreamTokenizer(br);
  streamTokenizer.resetSyntax();
  streamTokenizer.whitespaceChars(0,' ');
  streamTokenizer.wordChars(' ' + 1,'\u00FF');
  streamTokenizer.whitespaceChars(',',',');
  streamTokenizer.commentChar('%');
  streamTokenizer.quoteChar('"');
  streamTokenizer.quoteChar('\'');
  streamTokenizer.ordinaryChar('{');
  streamTokenizer.ordinaryChar('}');
  streamTokenizer.eolIsSignificant(true);
  this.instanceInformation=this.getHeader();
  if (range != null) {
    this.instanceInformation.setClassIndex(this.instanceInformation.inputInstanceInformation.numAttributes() - 1);
  }
}

Fixed version (ground truth):
/** 
 * Instantiates a new arff loader.
 * @param reader the reader
 * @param range 
 * @param size the size
 * @param classAttribute the class attribute
 */
public ArffLoader(Reader reader,Range range){
  this.range=range;
  BufferedReader br=new BufferedReader(reader);
  streamTokenizer=new StreamTokenizer(br);
  streamTokenizer.resetSyntax();
  streamTokenizer.whitespaceChars(0,' ');
  streamTokenizer.wordChars(' ' + 1,'\u00FF');
  streamTokenizer.whitespaceChars(',',',');
  streamTokenizer.commentChar('%');
  streamTokenizer.quoteChar('"');
  streamTokenizer.quoteChar('\'');
  streamTokenizer.ordinaryChar('{');
  streamTokenizer.ordinaryChar('}');
  streamTokenizer.eolIsSignificant(true);
  this.instanceInformation=this.getHeader();
  if (range != null) {
    this.instanceInformation.setClassIndex(Integer.MAX_VALUE);
  }
}
Program: 64451
Project: 64451
Buggy source:
public void setClassIndex(int classIndex){
  if (outputInstanceInformation.numAttributes() > 0) {
    this.inputInstanceInformation.attributes.add(classIndex,outputInstanceInformation.attributes.get(0));
    outputInstanceInformation.attributes.remove(0);
  }
  Attribute classAtribute=this.inputAttribute(classIndex);
  List<Attribute> listAttribute=new ArrayList<Attribute>();
  listAttribute.add(classAtribute);
  this.outputInstanceInformation.setAttributes(listAttribute);
  this.inputInstanceInformation.attributes.remove(classAtribute);
  this.classIndex=classIndex;
}

Fixed version (ground truth):
public void setClassIndex(int classIndex){
  if (classIndex < Integer.MAX_VALUE) {
    if (outputInstanceInformation.numAttributes() > 0) {
      this.inputInstanceInformation.attributes.add(classIndex,outputInstanceInformation.attributes.get(0));
      outputInstanceInformation.attributes.remove(0);
    }
    Attribute classAtribute=this.inputAttribute(classIndex);
    List<Attribute> listAttribute=new ArrayList<Attribute>();
    listAttribute.add(classAtribute);
    this.outputInstanceInformation.setAttributes(listAttribute);
    this.inputInstanceInformation.attributes.remove(classAtribute);
    this.classIndex=classIndex;
  }
}
Program: 64453
Project: 64453
Buggy source:
@Override protected Measurement[] getModelMeasurementsImpl(){
  Measurement[] baseLearnerMeasurements=((AbstractAMRules)getPreparedClassOption(this.baseLearnerOption)).getModelMeasurements();
  int nMeasurements=baseLearnerMeasurements.length;
  Measurement[] m=new Measurement[nMeasurements + 1];
  for (int i=0; i < baseLearnerMeasurements.length; i++)   m[i + 1]=baseLearnerMeasurements[i];
  int ensembleSize=0;
  if (this.ensemble != null) {
    ensembleSize=this.ensemble.length;
    for (int i=0; i < nMeasurements; i++) {
      double value=0;
      for (int j=0; j < ensembleSize; ++j) {
        value+=baseLearnerMeasurements[i].getValue();
      }
      m[i + 1]=new Measurement("String_Node_Str" + baseLearnerMeasurements[i].getName(),value / nMeasurements);
    }
  }
  m[0]=new Measurement("String_Node_Str",ensembleSize);
  return m;
}

Fixed version (ground truth):
@Override protected Measurement[] getModelMeasurementsImpl(){
  Measurement[] baseLearnerMeasurements=((AbstractAMRules)getPreparedClassOption(this.baseLearnerOption)).getModelMeasurements();
  int nMeasurements=baseLearnerMeasurements.length;
  Measurement[] m=new Measurement[nMeasurements + 1];
  for (int i=0; i < baseLearnerMeasurements.length; i++)   m[i + 1]=baseLearnerMeasurements[i];
  int ensembleSize=0;
  if (this.ensemble != null) {
    ensembleSize=this.ensemble.length;
    for (int i=0; i < nMeasurements; i++) {
      double value=0;
      for (int j=0; j < ensembleSize; ++j) {
        value+=ensemble[j].getModelMeasurements()[i].getValue();
      }
      m[i + 1]=new Measurement("String_Node_Str" + baseLearnerMeasurements[i].getName(),value / ensembleSize);
    }
  }
  m[0]=new Measurement("String_Node_Str",ensembleSize);
  return m;
}
Program: 64454
Project: 64454
Buggy source:
public void setRandomSeed(int randomSeed){
  this.randomSeed=randomSeed;
}

Fixed version (ground truth):
public void setRandomSeed(int randomSeed){
  this.classifierRandom.setSeed(randomSeed);
}
Program: 64455
Project: 64455
Buggy source:
public void learnFromInstance(Instance inst){
  nodeStatistics.addToValue(0,1);
  nodeStatistics.addToValue(1,inst.classValue());
  nodeStatistics.addToValue(2,inst.classValue() * inst.classValue());
  if (attributesMask == null) {
    numAttributesSelected=(int)Math.round((inst.numAttributes() - 1) * this.amRules.getAttributesPercentage()) / 100;
    attributesMask=new boolean[inst.numAttributes()];
    ArrayList<Integer> indices=new ArrayList<Integer>();
    for (int i=0; i < inst.numAttributes() && i != inst.classIndex(); i++)     indices.add(i);
    indices.add(inst.classIndex());
    Collections.shuffle(indices,this.amRules.classifierRandom);
    for (int i=0; i < numAttributesSelected; ++i)     attributesMask[indices.get(i)]=true;
  }
  for (int i=0, ct=0; i < attributesMask.length; i++) {
    if (attributesMask[i]) {
      AttributeClassObserver obs=this.attributeObservers.get(ct);
      if (obs == null) {
        if (inst.attribute(ct).isNumeric()) {
          obs=newNumericClassObserver();
          this.attributeObservers.set(ct,obs);
        }
      }
      if (obs != null) {
        ((FIMTDDNumericAttributeClassObserver)obs).observeAttributeClass(inst.value(i),inst.classValue(),inst.weight());
      }
      ++ct;
    }
  }
}

Fixed version (ground truth):
public void learnFromInstance(Instance inst){
  nodeStatistics.addToValue(0,1);
  nodeStatistics.addToValue(1,inst.classValue());
  nodeStatistics.addToValue(2,inst.classValue() * inst.classValue());
  if (attributesMask == null) {
    numAttributesSelected=(int)Math.round((inst.numAttributes() - 1) * this.amRules.getAttributesPercentage()) / 100;
    attributesMask=new boolean[inst.numAttributes()];
    ArrayList<Integer> indices=new ArrayList<Integer>();
    for (int i=0; i < inst.numAttributes() && i != inst.classIndex(); i++)     indices.add(i);
    Collections.shuffle(indices,this.amRules.classifierRandom);
    indices.add(inst.classIndex());
    for (int i=0; i < numAttributesSelected; ++i)     attributesMask[indices.get(i)]=true;
  }
  for (int i=0, ct=0; i < attributesMask.length; i++) {
    if (attributesMask[i]) {
      AttributeClassObserver obs=this.attributeObservers.get(ct);
      if (obs == null) {
        if (inst.attribute(ct).isNumeric()) {
          obs=newNumericClassObserver();
          this.attributeObservers.set(ct,obs);
        }
      }
      if (obs != null) {
        ((FIMTDDNumericAttributeClassObserver)obs).observeAttributeClass(inst.value(i),inst.classValue(),inst.weight());
      }
      ++ct;
    }
  }
}
Program: 64456
Project: 64456
Buggy source:
@Override public void resetLearningImpl(){
  this.ensemble=new Classifier[this.ensembleSizeOption.getValue()];
  AbstractAMRules baseLearner=(AbstractAMRules)getPreparedClassOption(this.baseLearnerOption);
  baseLearner.setAttributesPercentage(numAttributesPercentageOption.getValue());
  baseLearner.resetLearning();
  for (int i=0; i < this.ensemble.length; i++) {
    this.ensemble[i]=baseLearner.copy();
  }
  this.isRegression=(baseLearner instanceof Regressor);
}

Fixed version (ground truth):
@Override public void resetLearningImpl(){
  this.ensemble=new Classifier[this.ensembleSizeOption.getValue()];
  AbstractAMRules baseLearner=(AbstractAMRules)getPreparedClassOption(this.baseLearnerOption);
  baseLearner.setAttributesPercentage(numAttributesPercentageOption.getValue());
  baseLearner.resetLearning();
  for (int i=0; i < this.ensemble.length; i++) {
    this.ensemble[i]=baseLearner.copy();
    this.ensemble[i].setRandomSeed(this.classifierRandom.nextInt());
  }
  this.isRegression=(baseLearner instanceof Regressor);
}
Program: 64458
Project: 64458
Buggy source:
void drawPointPanels(LinkedList<DataPoint> pointBuffer,int timestamp,double decay_rate,double decay_threshold){
  for (int p=0; p < pointBuffer.size(); p++) {
    PointPanel pointPanel=new PointPanel(pointBuffer.get(p),decay_rate,decay_threshold);
    layerPoints.add(pointPanel);
    pointPanel.updateLocation();
  }
  layerPointCanvas.setVisible(false);
  layerPoints.setVisible(pointsVisible);
}

Fixed version (ground truth):
void drawPointPanels(ArrayList<DataPoint> points,int timestamp,double decay_rate,double decay_threshold){
  for (int p=0; p < points.size(); p++) {
    PointPanel pointPanel=new PointPanel(points.get(p),decay_rate,decay_threshold);
    layerPoints.add(pointPanel);
    pointPanel.updateLocation();
  }
  layerPointCanvas.setVisible(false);
  layerPoints.setVisible(pointsVisible);
}
Program: 64459
Project: 64459
Buggy source:
public GenerateReferenceParetoSetAndFrontFromDoubleSolutions(Experiment<?,?> experimentConfiguration){
  this.experiment=experimentConfiguration;
  experiment.removeDuplicatedAlgorithms();
}

Fixed version (ground truth):
public GenerateReferenceParetoSetAndFrontFromDoubleSolutions(Experiment<?,?> experimentConfiguration){
  this.experiment=experimentConfiguration;
}
Program: 64460
Project: 64460
Buggy source:
/** 
 * The run() method creates de output directory and compute the fronts
 */
@Override public void run() throws IOException {
  String outputDirectoryName=experiment.getReferenceFrontDirectory();
  createOutputDirectory(outputDirectoryName);
  List<String> referenceFrontFileNames=new LinkedList<>();
  for (  ExperimentProblem<?> problem : experiment.getProblemList()) {
    List<DoubleSolution> nonDominatedSolutions=getNonDominatedSolutions(problem);
    referenceFrontFileNames.add(problem.getTag() + "String_Node_Str");
    writeReferenceFrontFile(outputDirectoryName,problem,nonDominatedSolutions);
    writeReferenceSetFile(outputDirectoryName,problem,nonDominatedSolutions);
    writeFilesWithTheSolutionsContributedByEachAlgorithm(outputDirectoryName,problem,nonDominatedSolutions);
  }
}

Fixed version (ground truth):
/** 
 * The run() method creates de output directory and compute the fronts
 */
@Override public void run() throws IOException {
  String outputDirectoryName=experiment.getReferenceFrontDirectory();
  createOutputDirectory(outputDirectoryName);
  List<String> referenceFrontFileNames=new LinkedList<>();
  for (  ExperimentProblem<?> problem : experiment.getProblemList()) {
    List<DoubleSolution> nonDominatedSolutions=getNonDominatedSolutions(problem);
    referenceFrontFileNames.add(problem.getReferenceFront());
    writeReferenceFrontFile(outputDirectoryName,problem,nonDominatedSolutions);
    writeReferenceSetFile(outputDirectoryName,problem,nonDominatedSolutions);
    writeFilesWithTheSolutionsContributedByEachAlgorithm(outputDirectoryName,problem,nonDominatedSolutions);
  }
}
Program: 64462
Project: 64462
Buggy source:
private void writeReferenceFrontFile(String outputDirectoryName,ExperimentProblem<?> problem,List<DoubleSolution> nonDominatedSolutions) throws IOException {
  String referenceFrontFileName=outputDirectoryName + "String_Node_Str" + problem.getTag()+ "String_Node_Str";
  new SolutionListOutput(nonDominatedSolutions).printObjectivesToFile(referenceFrontFileName);
}

Fixed version (ground truth):
private void writeReferenceFrontFile(String outputDirectoryName,ExperimentProblem<?> problem,List<DoubleSolution> nonDominatedSolutions) throws IOException {
  String referenceFrontFileName=outputDirectoryName + "String_Node_Str" + problem.getReferenceFront();
  new SolutionListOutput(nonDominatedSolutions).printObjectivesToFile(referenceFrontFileName);
}
Program: 64463
Project: 64463
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  AbstractGenericSolution<?,?> that=(AbstractGenericSolution<?,?>)o;
  if (!attributes.equals(that.attributes))   return false;
  if (!Arrays.equals(objectives,that.objectives))   return false;
  if (!variables.equals(that.variables))   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (!this.equalsIgnoringAttributes(o)) {
    return false;
  }
  AbstractGenericSolution<?,?> that=(AbstractGenericSolution<?,?>)o;
  if (attributes.size() != that.attributes.size()) {
    return false;
  }
  for (  Object key : attributes.keySet()) {
    Object value=attributes.get(key);
    Object valueThat=that.attributes.get(key);
    if (value != valueThat) {
      if (value == null) {
        return false;
      }
 else       if (valueThat == null) {
        return false;
      }
 else {
        boolean areAttributeValuesEqual;
        if (value instanceof AbstractGenericSolution) {
          areAttributeValuesEqual=((AbstractGenericSolution)value).equalsIgnoringAttributes(valueThat);
        }
 else {
          areAttributeValuesEqual=!value.equals(valueThat);
        }
        if (!areAttributeValuesEqual) {
          return false;
        }
      }
    }
  }
  return true;
}
Program: 64464
Project: 64464
Buggy source:
/** 
 * Constructor 
 */
public ExecuteAlgorithms(Experiment<S,Result> configuration){
  this.experiment=configuration;
}

Fixed version (ground truth):
/** 
 * Constructor
 */
public ExecuteAlgorithms(Experiment<S,Result> configuration){
  this.experiment=configuration;
}
Program: 64465
Project: 64465
Buggy source:
@Override public void run(){
  JMetalLogger.logger.info("String_Node_Str");
  prepareOutputDirectory();
  System.setProperty("String_Node_Str","String_Node_Str" + this.experiment.getNumberOfCores());
  for (int i=0; i < experiment.getIndependentRuns(); i++) {
    final int id=i;
    experiment.getAlgorithmList().parallelStream().forEach(algorithm -> algorithm.runAlgorithm(id,experiment));
  }
}

Fixed version (ground truth):
@Override public void run(){
  JMetalLogger.logger.info("String_Node_Str");
  prepareOutputDirectory();
  System.setProperty("String_Node_Str","String_Node_Str" + this.experiment.getNumberOfCores());
  experiment.getAlgorithmList().parallelStream().forEach(algorithm -> algorithm.runAlgorithm(experiment));
}
Program: 64466
Project: 64466
Buggy source:
public ExperimentAlgorithm(Algorithm<Result> algorithm,String problemTag){
  this(algorithm,algorithm.getName(),problemTag);
}

Fixed version (ground truth):
public ExperimentAlgorithm(Algorithm<Result> algorithm,String problemTag,int runId){
  this(algorithm,algorithm.getName(),problemTag,runId);
}
Program: 64467
Project: 64467
Buggy source:
public void runAlgorithm(int id,Experiment<?,?> experimentData){
  String outputDirectoryName=experimentData.getExperimentBaseDirectory() + "String_Node_Str" + algorithmTag+ "String_Node_Str"+ problemTag;
  File outputDirectory=new File(outputDirectoryName);
  if (!outputDirectory.exists()) {
    boolean result=new File(outputDirectoryName).mkdirs();
    if (result) {
      JMetalLogger.logger.info("String_Node_Str" + outputDirectoryName);
    }
 else {
      JMetalLogger.logger.severe("String_Node_Str" + outputDirectoryName + "String_Node_Str");
    }
  }
  String funFile=outputDirectoryName + "String_Node_Str" + id+ "String_Node_Str";
  String varFile=outputDirectoryName + "String_Node_Str" + id+ "String_Node_Str";
  JMetalLogger.logger.info("String_Node_Str" + algorithmTag + "String_Node_Str"+ problemTag+ "String_Node_Str"+ id+ "String_Node_Str"+ funFile);
  algorithm.run();
  Result population=algorithm.getResult();
  new SolutionListOutput((List<S>)population).setSeparator("String_Node_Str").setVarFileOutputContext(new DefaultFileOutputContext(varFile)).setFunFileOutputContext(new DefaultFileOutputContext(funFile)).print();
}

Fixed version (ground truth):
public void runAlgorithm(Experiment<?,?> experimentData){
  String outputDirectoryName=experimentData.getExperimentBaseDirectory() + "String_Node_Str" + algorithmTag+ "String_Node_Str"+ problemTag;
  File outputDirectory=new File(outputDirectoryName);
  if (!outputDirectory.exists()) {
    boolean result=new File(outputDirectoryName).mkdirs();
    if (result) {
      JMetalLogger.logger.info("String_Node_Str" + outputDirectoryName);
    }
 else {
      JMetalLogger.logger.severe("String_Node_Str" + outputDirectoryName + "String_Node_Str");
    }
  }
  String funFile=outputDirectoryName + "String_Node_Str" + runId+ "String_Node_Str";
  String varFile=outputDirectoryName + "String_Node_Str" + runId+ "String_Node_Str";
  JMetalLogger.logger.info("String_Node_Str" + algorithmTag + "String_Node_Str"+ problemTag+ "String_Node_Str"+ runId+ "String_Node_Str"+ funFile);
  algorithm.run();
  Result population=algorithm.getResult();
  new SolutionListOutput((List<S>)population).setSeparator("String_Node_Str").setVarFileOutputContext(new DefaultFileOutputContext(varFile)).setFunFileOutputContext(new DefaultFileOutputContext(funFile)).print();
}
Program: 64470
Project: 64470
Buggy source:
private void writeReferenceSetFile(String outputDirectoryName,Problem<?> problem,List<DoubleSolution> nonDominatedSolutions) throws IOException {
  String referenceSetFileName=outputDirectoryName + "String_Node_Str" + problem.getName()+ "String_Node_Str";
  new SolutionListOutput(nonDominatedSolutions).printVariablesToFile(referenceSetFileName);
}

Fixed version (ground truth):
private void writeReferenceSetFile(String outputDirectoryName,ExperimentProblem<?> problem,List<DoubleSolution> nonDominatedSolutions) throws IOException {
  String referenceSetFileName=outputDirectoryName + "String_Node_Str" + problem.getTag()+ "String_Node_Str";
  new SolutionListOutput(nonDominatedSolutions).printVariablesToFile(referenceSetFileName);
}
Program: 64471
Project: 64471
Buggy source:
/** 
 * The run() method creates de output directory and compute the fronts
 */
@Override public void run() throws IOException {
  String outputDirectoryName=experiment.getReferenceFrontDirectory();
  createOutputDirectory(outputDirectoryName);
  List<String> referenceFrontFileNames=new LinkedList<>();
  for (  ExperimentProblem<?> problem : experiment.getProblemList()) {
    List<DoubleSolution> nonDominatedSolutions=getNonDominatedSolutions(problem.getProblem());
    referenceFrontFileNames.add(problem.getTag() + "String_Node_Str");
    writeReferenceFrontFile(outputDirectoryName,problem.getProblem(),nonDominatedSolutions);
    writeReferenceSetFile(outputDirectoryName,problem.getProblem(),nonDominatedSolutions);
    writeFilesWithTheSolutionsContributedByEachAlgorithm(outputDirectoryName,problem.getProblem(),nonDominatedSolutions);
  }
  experiment.setReferenceFrontFileNames(referenceFrontFileNames);
}

Fixed version (ground truth):
/** 
 * The run() method creates de output directory and compute the fronts
 */
@Override public void run() throws IOException {
  String outputDirectoryName=experiment.getReferenceFrontDirectory();
  createOutputDirectory(outputDirectoryName);
  List<String> referenceFrontFileNames=new LinkedList<>();
  for (  ExperimentProblem<?> problem : experiment.getProblemList()) {
    List<DoubleSolution> nonDominatedSolutions=getNonDominatedSolutions(problem);
    referenceFrontFileNames.add(problem.getTag() + "String_Node_Str");
    writeReferenceFrontFile(outputDirectoryName,problem,nonDominatedSolutions);
    writeReferenceSetFile(outputDirectoryName,problem,nonDominatedSolutions);
    writeFilesWithTheSolutionsContributedByEachAlgorithm(outputDirectoryName,problem,nonDominatedSolutions);
  }
  experiment.setReferenceFrontFileNames(referenceFrontFileNames);
}
Program: 64472
Project: 64472
Buggy source:
private void writeFilesWithTheSolutionsContributedByEachAlgorithm(String outputDirectoryName,Problem<?> problem,List<DoubleSolution> nonDominatedSolutions) throws IOException {
  GenericSolutionAttribute<DoubleSolution,String> solutionAttribute=new GenericSolutionAttribute<DoubleSolution,String>();
  for (  ExperimentAlgorithm<?,?> algorithm : experiment.getAlgorithmList()) {
    List<DoubleSolution> solutionsPerAlgorithm=new ArrayList<>();
    for (    DoubleSolution solution : nonDominatedSolutions) {
      if (algorithm.getAlgorithmTag().equals(solutionAttribute.getAttribute(solution))) {
        solutionsPerAlgorithm.add(solution);
      }
    }
    new SolutionListOutput(solutionsPerAlgorithm).printObjectivesToFile(outputDirectoryName + "String_Node_Str" + problem.getName()+ "String_Node_Str"+ algorithm.getAlgorithmTag()+ "String_Node_Str");
    new SolutionListOutput(solutionsPerAlgorithm).printVariablesToFile(outputDirectoryName + "String_Node_Str" + problem.getName()+ "String_Node_Str"+ algorithm.getAlgorithmTag()+ "String_Node_Str");
  }
}

Fixed version (ground truth):
private void writeFilesWithTheSolutionsContributedByEachAlgorithm(String outputDirectoryName,ExperimentProblem<?> problem,List<DoubleSolution> nonDominatedSolutions) throws IOException {
  GenericSolutionAttribute<DoubleSolution,String> solutionAttribute=new GenericSolutionAttribute<DoubleSolution,String>();
  for (  ExperimentAlgorithm<?,?> algorithm : experiment.getAlgorithmList()) {
    List<DoubleSolution> solutionsPerAlgorithm=new ArrayList<>();
    for (    DoubleSolution solution : nonDominatedSolutions) {
      if (algorithm.getAlgorithmTag().equals(solutionAttribute.getAttribute(solution))) {
        solutionsPerAlgorithm.add(solution);
      }
    }
    new SolutionListOutput(solutionsPerAlgorithm).printObjectivesToFile(outputDirectoryName + "String_Node_Str" + problem.getTag()+ "String_Node_Str"+ algorithm.getAlgorithmTag()+ "String_Node_Str");
    new SolutionListOutput(solutionsPerAlgorithm).printVariablesToFile(outputDirectoryName + "String_Node_Str" + problem.getTag()+ "String_Node_Str"+ algorithm.getAlgorithmTag()+ "String_Node_Str");
  }
}