nus-yam/ex-repair huggingface dataset:
Program: 54674
Project: 54674
Buggy source:
private void batchGradientDescent(Dataframe trainingData,Map<Object,Object> previousThitaMapping,Map<Object,Double> newWeights,Map<Object,Double> newThitas,double learningRate){
  ModelParameters modelParameters=kb().getModelParameters();
  double multiplier=-learningRate / modelParameters.getN();
  Map<Object,Double> weights=modelParameters.getWeights();
  Map<Object,Double> thitas=modelParameters.getThitas();
  streamExecutor.forEach(StreamMethods.stream(trainingData.stream(),isParallelized()),r -> {
    Object rClass=r.getY();
    Object rPreviousClass=previousThitaMapping.get(rClass);
    double xTw=xTw(r.getX(),weights);
    double gOfCurrent=g(xTw - thitas.get(rClass));
    double gOfPrevious=0.0;
    if (rPreviousClass != null) {
      gOfPrevious=g(thitas.get(rPreviousClass) - xTw);
    }
    double dtG_multiplier=(gOfCurrent - gOfPrevious) * multiplier;
synchronized (newWeights) {
      for (      Map.Entry<Object,Object> entry : r.getX().entrySet()) {
        Object column=entry.getKey();
        Double xij=TypeInference.toDouble(entry.getValue());
        newWeights.put(column,newWeights.get(column) + xij * dtG_multiplier);
      }
    }
synchronized (newThitas) {
      newThitas.put(rClass,newThitas.get(rClass) + multiplier * (-gOfCurrent));
      if (rPreviousClass != null) {
        newThitas.put(rPreviousClass,newThitas.get(rPreviousClass) + multiplier * gOfPrevious);
      }
    }
  }
);
}

Fixed version (ground truth):
private void batchGradientDescent(Dataframe trainingData,Map<Object,Object> previousThitaMapping,Map<Object,Double> newWeights,Map<Object,Double> newThitas,double learningRate){
  ModelParameters modelParameters=kb().getModelParameters();
  double multiplier=-learningRate / modelParameters.getN();
  Map<Object,Double> weights=modelParameters.getWeights();
  Map<Object,Double> thitas=modelParameters.getThitas();
  streamExecutor.forEach(StreamMethods.stream(trainingData.stream(),isParallelized()),r -> {
    Object rClass=r.getY();
    Object rPreviousClass=previousThitaMapping.get(rClass);
    double xTw=xTw(r.getX(),weights);
    double gOfCurrent=g(xTw - thitas.get(rClass));
    double gOfPrevious=0.0;
    if (rPreviousClass != null) {
      gOfPrevious=g(thitas.get(rPreviousClass) - xTw);
    }
    double dtG_multiplier=(gOfCurrent - gOfPrevious) * multiplier;
    for (    Map.Entry<Object,Object> entry : r.getX().entrySet()) {
      Object column=entry.getKey();
      Double xij=TypeInference.toDouble(entry.getValue());
      double xij_dtG_multiplier=xij * dtG_multiplier;
synchronized (newWeights) {
        newWeights.put(column,newWeights.get(column) + xij_dtG_multiplier);
      }
    }
synchronized (newThitas) {
      newThitas.put(rClass,newThitas.get(rClass) + multiplier * (-gOfCurrent));
      if (rPreviousClass != null) {
        newThitas.put(rPreviousClass,newThitas.get(rPreviousClass) + multiplier * gOfPrevious);
      }
    }
  }
);
}
Program: 54675
Project: 54675
Buggy source:
private void batchGradientDescent(Dataframe trainingData,Map<List<Object>,Double> newThitas,double learningRate){
  ModelParameters modelParameters=kb().getModelParameters();
  double multiplier=learningRate / modelParameters.getN();
  Map<List<Object>,Double> thitas=modelParameters.getThitas();
  Set<Object> classesSet=modelParameters.getClasses();
  streamExecutor.forEach(StreamMethods.stream(trainingData.stream(),isParallelized()),r -> {
    AssociativeArray classProbabilities=hypothesisFunction(r.getX(),thitas);
    for (    Object theClass : classesSet) {
      double error;
      double score=classProbabilities.getDouble(theClass);
      if (r.getY().equals(theClass)) {
        error=1 - score;
      }
 else {
        error=-score;
      }
      double errorMultiplier=multiplier * error;
synchronized (newThitas) {
        List<Object> featureClassTuple=Arrays.<Object>asList(Dataframe.COLUMN_NAME_CONSTANT,theClass);
        newThitas.put(featureClassTuple,newThitas.get(featureClassTuple) + errorMultiplier);
        for (        Map.Entry<Object,Object> entry : r.getX().entrySet()) {
          Double value=TypeInference.toDouble(entry.getValue());
          Object feature=entry.getKey();
          featureClassTuple=Arrays.<Object>asList(feature,theClass);
          Double thitaWeight=newThitas.get(featureClassTuple);
          if (thitaWeight != null) {
            newThitas.put(featureClassTuple,thitaWeight + errorMultiplier * value);
          }
        }
      }
    }
  }
);
}

Fixed version (ground truth):
private void batchGradientDescent(Dataframe trainingData,Map<List<Object>,Double> newThitas,double learningRate){
  ModelParameters modelParameters=kb().getModelParameters();
  double multiplier=learningRate / modelParameters.getN();
  Map<List<Object>,Double> thitas=modelParameters.getThitas();
  Set<Object> classesSet=modelParameters.getClasses();
  streamExecutor.forEach(StreamMethods.stream(trainingData.stream(),isParallelized()),r -> {
    AssociativeArray classProbabilities=hypothesisFunction(r.getX(),thitas);
    for (    Object theClass : classesSet) {
      double error;
      double score=classProbabilities.getDouble(theClass);
      if (r.getY().equals(theClass)) {
        error=1 - score;
      }
 else {
        error=-score;
      }
      double errorMultiplier=multiplier * error;
      List<Object> featureClassTuple=Arrays.<Object>asList(Dataframe.COLUMN_NAME_CONSTANT,theClass);
synchronized (newThitas) {
        newThitas.put(featureClassTuple,newThitas.get(featureClassTuple) + errorMultiplier);
      }
      for (      Map.Entry<Object,Object> entry : r.getX().entrySet()) {
        Double value=TypeInference.toDouble(entry.getValue());
        Object feature=entry.getKey();
        featureClassTuple=Arrays.<Object>asList(feature,theClass);
synchronized (newThitas) {
          newThitas.put(featureClassTuple,newThitas.get(featureClassTuple) + errorMultiplier * value);
        }
      }
    }
  }
);
}
Program: 54676
Project: 54676
Buggy source:
private double hypothesisFunction(AssociativeArray x,Map<Object,Double> thitas){
  double sum=thitas.get(Dataframe.COLUMN_NAME_CONSTANT);
  for (  Map.Entry<Object,Object> entry : x.entrySet()) {
    Object feature=entry.getKey();
    Double thitaWeight=thitas.get(feature);
    if (thitaWeight != null) {
      Double xj=TypeInference.toDouble(entry.getValue());
      sum+=thitaWeight * xj;
    }
  }
  return sum;
}

Fixed version (ground truth):
private double hypothesisFunction(AssociativeArray x,Map<Object,Double> thitas){
  double sum=thitas.get(Dataframe.COLUMN_NAME_CONSTANT);
  for (  Map.Entry<Object,Object> entry : x.entrySet()) {
    Object feature=entry.getKey();
    Double xj=TypeInference.toDouble(entry.getValue());
    sum+=thitas.get(feature) * xj;
  }
  return sum;
}
Program: 54677
Project: 54677
Buggy source:
private void batchGradientDescent(Dataframe trainingData,Map<Object,Double> newThitas,double learningRate){
  ModelParameters modelParameters=kb().getModelParameters();
  double multiplier=learningRate / modelParameters.getN();
  Map<Object,Double> thitas=modelParameters.getThitas();
  streamExecutor.forEach(StreamMethods.stream(trainingData.stream(),isParallelized()),r -> {
    double error=TypeInference.toDouble(r.getY()) - hypothesisFunction(r.getX(),thitas);
    double errorMultiplier=multiplier * error;
synchronized (newThitas) {
      newThitas.put(Dataframe.COLUMN_NAME_CONSTANT,newThitas.get(Dataframe.COLUMN_NAME_CONSTANT) + errorMultiplier);
      for (      Map.Entry<Object,Object> entry : r.getX().entrySet()) {
        Object feature=entry.getKey();
        Double thitaWeight=newThitas.get(feature);
        if (thitaWeight != null) {
          Double value=TypeInference.toDouble(entry.getValue());
          newThitas.put(feature,thitaWeight + errorMultiplier * value);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
private void batchGradientDescent(Dataframe trainingData,Map<Object,Double> newThitas,double learningRate){
  ModelParameters modelParameters=kb().getModelParameters();
  double multiplier=learningRate / modelParameters.getN();
  Map<Object,Double> thitas=modelParameters.getThitas();
  streamExecutor.forEach(StreamMethods.stream(trainingData.stream(),isParallelized()),r -> {
    double error=TypeInference.toDouble(r.getY()) - hypothesisFunction(r.getX(),thitas);
    double errorMultiplier=multiplier * error;
synchronized (newThitas) {
      newThitas.put(Dataframe.COLUMN_NAME_CONSTANT,newThitas.get(Dataframe.COLUMN_NAME_CONSTANT) + errorMultiplier);
    }
    for (    Map.Entry<Object,Object> entry : r.getX().entrySet()) {
      Object feature=entry.getKey();
      Double value=TypeInference.toDouble(entry.getValue());
      double errorMultiplier_value=errorMultiplier * value;
synchronized (newThitas) {
        newThitas.put(feature,newThitas.get(feature) + errorMultiplier_value);
      }
    }
  }
);
}
Program: 54678
Project: 54678
Buggy source:
private double calculateError(Dataframe trainingData,Map<Object,Double> thitas){
  double error=streamExecutor.sum(StreamMethods.stream(trainingData.entries(),isParallelized()).mapToDouble(e -> {
    Integer rId=e.getKey();
    Record r=e.getValue();
    double yPredicted=hypothesisFunction(r.getX(),thitas);
    trainingData._unsafe_set(rId,new Record(r.getX(),r.getY(),yPredicted,r.getYPredictedProbabilities()));
    return Math.pow(TypeInference.toDouble(r.getY()) - yPredicted,2);
  }
));
  return error;
}

Fixed version (ground truth):
private double calculateError(Dataframe trainingData,Map<Object,Double> thitas){
  double error=streamExecutor.sum(StreamMethods.stream(trainingData.values(),isParallelized()).mapToDouble(r -> {
    double yPredicted=hypothesisFunction(r.getX(),thitas);
    return Math.pow(TypeInference.toDouble(r.getY()) - yPredicted,2);
  }
));
  return error;
}
Program: 54680
Project: 54680
Buggy source:
/** 
 * {@inheritDoc} 
 */
@Override protected void updateClusterParameters(){
  int kappa_n=kappa0 + size;
  int nu=nu0 + size;
  RealVector mu=xi_sum.mapDivide(size);
  RealVector mu_mu0=mu.subtract(mu0);
  RealMatrix C=xi_square_sum.subtract((mu.outerProduct(mu)).scalarMultiply(size));
  RealMatrix psi=psi0.add(C.add((mu_mu0.outerProduct(mu_mu0)).scalarMultiply(kappa0 * size / (double)kappa_n)));
  mean=(mu0.mapMultiply(kappa0)).add(mu.mapMultiply(size)).mapDivide(kappa_n);
  covariance=psi.scalarMultiply((kappa_n + 1.0) / (kappa_n * (nu - dimensions + 1.0)));
  meanError=calculateMeanError(psi,kappa_n,nu);
  meanDf=nu - dimensions + 1;
  cache_covariance_determinant=null;
  cache_covariance_inverse=null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override protected void updateClusterParameters(){
  int kappa_n=kappa0 + size;
  int nu=nu0 + size;
  RealVector mu=xi_sum.mapDivide(size);
  RealVector mu_mu0=mu.subtract(mu0);
  RealMatrix C=xi_square_sum.subtract((mu.outerProduct(mu)).scalarMultiply(size));
  RealMatrix psi=psi0.add(C.add((mu_mu0.outerProduct(mu_mu0)).scalarMultiply(kappa0 * size / (double)kappa_n)));
  mean=(mu0.mapMultiply(kappa0)).add(mu.mapMultiply(size)).mapDivide(kappa_n);
synchronized (this) {
    covariance=psi.scalarMultiply((kappa_n + 1.0) / (kappa_n * (nu - dimensions + 1.0)));
    cache_covariance_determinant=null;
    cache_covariance_inverse=null;
  }
  meanError=calculateMeanError(psi,kappa_n,nu);
  meanDf=nu - dimensions + 1;
}
Program: 54682
Project: 54682
Buggy source:
/** 
 * Returns the number of clusters.
 * @return 
 */
public Integer getC(){
  return clusterMap.size();
}

Fixed version (ground truth):
/** 
 * Returns the number of clusters.
 * @return 
 */
public Integer getC(){
  if (clusterMap == null) {
    return 0;
  }
  return clusterMap.size();
}
Program: 54683
Project: 54683
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54684
Project: 54684
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54685
Project: 54685
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected InMemoryConnector(String database,InMemoryConfiguration dbConf){
  super();
  this.dbConf=dbConf;
  this.database=database;
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.common.persistentstorage.AutoCloseConnector#AutoCloseConnector()   
 */
protected InMemoryConnector(String database,InMemoryConfiguration dbConf){
  super();
  this.dbConf=dbConf;
  this.database=database;
}
Program: 54686
Project: 54686
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected MapDBConnector(String database,MapDBConfiguration dbConf){
  super();
  this.dbConf=dbConf;
  this.database=database;
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.common.persistentstorage.AutoCloseConnector#AutoCloseConnector()   
 */
protected MapDBConnector(String database,MapDBConfiguration dbConf){
  super();
  this.dbConf=dbConf;
  this.database=database;
}
Program: 54687
Project: 54687
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54688
Project: 54688
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54689
Project: 54689
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54690
Project: 54690
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54691
Project: 54691
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54692
Project: 54692
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54693
Project: 54693
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54694
Project: 54694
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54695
Project: 54695
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected Cluster(Integer clusterId){
  super(clusterId);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.mlmodels.BaseMLclusterer.Cluster
 */
protected Cluster(Integer clusterId){
  super(clusterId);
}
Program: 54696
Project: 54696
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54697
Project: 54697
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected Cluster(int clusterId){
  super(clusterId);
  centroid=new Record(new AssociativeArray(),null);
  xi_sum=new AssociativeArray();
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.mlmodels.BaseMLclusterer.Cluster 
 */
protected Cluster(int clusterId){
  super(clusterId);
  centroid=new Record(new AssociativeArray(),null);
  xi_sum=new AssociativeArray();
}
Program: 54698
Project: 54698
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54699
Project: 54699
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected Cluster(int clusterId){
  super(clusterId);
  centroid=new Record(new AssociativeArray(),null);
  xi_sum=new AssociativeArray();
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.mlmodels.BaseMLclusterer.Cluster 
 */
protected Cluster(int clusterId){
  super(clusterId);
  centroid=new Record(new AssociativeArray(),null);
  xi_sum=new AssociativeArray();
}
Program: 54700
Project: 54700
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54701
Project: 54701
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected Cluster(Integer clusterId){
  super(clusterId);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.mlmodels.BaseMLclusterer.Cluster 
 */
protected Cluster(Integer clusterId){
  super(clusterId);
}
Program: 54702
Project: 54702
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54703
Project: 54703
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected BaseBoostingBagging(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass,Class<VM> vmClass){
  super(dbName,dbConf,mpClass,tpClass,vmClass,new ClassifierValidation<>());
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseTrainable#BaseTrainable(java.lang.String,com.datumbox.common.persistentstorage.interfaces.DatabaseConfiguration,java.lang.Class,java.lang.Class)  
 */
protected BaseBoostingBagging(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass,Class<VM> vmClass){
  super(dbName,dbConf,mpClass,tpClass,vmClass,new ClassifierValidation<>());
}
Program: 54704
Project: 54704
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54705
Project: 54705
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected Cluster(Integer clusterId){
  super(clusterId);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.mlmodels.BaseMLclusterer.Cluster 
 */
protected Cluster(Integer clusterId){
  super(clusterId);
}
Program: 54706
Project: 54706
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected BaseDPMM(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass,Class<VM> vmClass){
  super(dbName,dbConf,mpClass,tpClass,vmClass,new ClustererValidation<>());
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseTrainable#BaseTrainable(java.lang.String,com.datumbox.common.persistentstorage.interfaces.DatabaseConfiguration,java.lang.Class,java.lang.Class)  
 */
protected BaseDPMM(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass,Class<VM> vmClass){
  super(dbName,dbConf,mpClass,tpClass,vmClass,new ClustererValidation<>());
}
Program: 54707
Project: 54707
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54708
Project: 54708
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected BaseLinearRegression(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass,Class<VM> vmClass){
  super(dbName,dbConf,mpClass,tpClass,vmClass,new LinearRegressionValidation<>());
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseTrainable#BaseTrainable(java.lang.String,com.datumbox.common.persistentstorage.interfaces.DatabaseConfiguration,java.lang.Class,java.lang.Class)  
 */
protected BaseLinearRegression(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass,Class<VM> vmClass){
  super(dbName,dbConf,mpClass,tpClass,vmClass,new LinearRegressionValidation<>());
}
Program: 54709
Project: 54709
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54710
Project: 54710
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected BaseNaiveBayes(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass,Class<VM> vmClass){
  super(dbName,dbConf,mpClass,tpClass,vmClass,new ClassifierValidation<>());
  isBinarized=false;
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseTrainable#BaseTrainable(java.lang.String,com.datumbox.common.persistentstorage.interfaces.DatabaseConfiguration,java.lang.Class,java.lang.Class)  
 */
protected BaseNaiveBayes(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass,Class<VM> vmClass){
  super(dbName,dbConf,mpClass,tpClass,vmClass,new ClassifierValidation<>());
  isBinarized=false;
}
Program: 54711
Project: 54711
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54712
Project: 54712
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected BaseDummyMinMaxTransformer(String dbName,DatabaseConfiguration dbConf){
  super(dbName,dbConf,BaseDummyMinMaxTransformer.ModelParameters.class,BaseDummyMinMaxTransformer.TrainingParameters.class);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseTrainable#BaseTrainable(java.lang.String,com.datumbox.common.persistentstorage.interfaces.DatabaseConfiguration,java.lang.Class,java.lang.Class)  
 */
protected BaseDummyMinMaxTransformer(String dbName,DatabaseConfiguration dbConf){
  super(dbName,dbConf,BaseDummyMinMaxTransformer.ModelParameters.class,BaseDummyMinMaxTransformer.TrainingParameters.class);
}
Program: 54713
Project: 54713
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54714
Project: 54714
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected DataTransformer(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass){
  super(dbName,dbConf,mpClass,tpClass);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseTrainable#BaseTrainable(java.lang.String,com.datumbox.common.persistentstorage.interfaces.DatabaseConfiguration,java.lang.Class,java.lang.Class)  
 */
protected DataTransformer(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass){
  super(dbName,dbConf,mpClass,tpClass);
}
Program: 54715
Project: 54715
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54716
Project: 54716
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected CategoricalFeatureSelection(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass){
  super(dbName,dbConf,mpClass,tpClass);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseTrainable#BaseTrainable(java.lang.String,com.datumbox.common.persistentstorage.interfaces.DatabaseConfiguration,java.lang.Class,java.lang.Class)  
 */
protected CategoricalFeatureSelection(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass){
  super(dbName,dbConf,mpClass,tpClass);
}
Program: 54717
Project: 54717
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseModelParameters#BaseModelParameters(com.datumbox.common.persistentstorage.interfaces.DatabaseConnector) 
 */
protected ModelParameters(DatabaseConnector dbc){
  super(dbc);
}
Program: 54718
Project: 54718
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected ContinuousFeatureSelection(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass){
  super(dbName,dbConf,mpClass,tpClass);
}

Fixed version (ground truth):
/** 
 * @see com.datumbox.framework.machinelearning.common.bases.baseobjects.BaseTrainable#BaseTrainable(java.lang.String,com.datumbox.common.persistentstorage.interfaces.DatabaseConfiguration,java.lang.Class,java.lang.Class)  
 */
protected ContinuousFeatureSelection(String dbName,DatabaseConfiguration dbConf,Class<MP> mpClass,Class<TP> tpClass){
  super(dbName,dbConf,mpClass,tpClass);
}
Program: 54719
Project: 54719
Buggy source:
/** 
 * Transforms the categorical variables into dummy (boolean) variables.
 * @param data
 * @param referenceLevels 
 */
protected static void transformDummy(Dataset data,Map<Object,Object> referenceLevels){
  Map<Object,TypeInference.DataType> columnTypes=data.getXDataTypes();
  for (  Integer rId : data) {
    Record r=data.get(rId);
    AssociativeArray xData=r.getX().copy();
    boolean modified=false;
    for (    Object column : r.getX().keySet()) {
      if (covert2dummy(columnTypes.get(column)) == false) {
        continue;
      }
      Object value=xData.get(column);
      xData.remove(column);
      modified=true;
      Object referenceLevel=referenceLevels.get(column);
      if (referenceLevel != null && !referenceLevel.equals(value)) {
        List<Object> newColumn=Arrays.<Object>asList(column,value);
        xData.put(newColumn,true);
      }
    }
    if (modified) {
      r=new Record(xData,r.getY(),r.getYPredicted(),r.getYPredictedProbabilities());
      data.set(rId,r);
    }
  }
  data.recalculateMeta();
}

Fixed version (ground truth):
/** 
 * Transforms the categorical variables into dummy (boolean) variables.
 * @param data
 * @param referenceLevels 
 */
protected static void transformDummy(Dataset data,Map<Object,Object> referenceLevels){
  Map<Object,TypeInference.DataType> columnTypes=data.getXDataTypes();
  for (  Integer rId : data) {
    Record r=data.get(rId);
    AssociativeArray xData=r.getX().copy();
    boolean modified=false;
    for (    Object column : r.getX().keySet()) {
      if (covert2dummy(columnTypes.get(column)) == false) {
        continue;
      }
      Object value=xData.get(column);
      xData.remove(column);
      modified=true;
      Object referenceLevel=referenceLevels.get(column);
      if (referenceLevel != null && !referenceLevel.equals(value)) {
        List<Object> newColumn=Arrays.<Object>asList(column,value);
        xData.put(newColumn,true);
      }
    }
    if (modified) {
      r=new Record(xData,r.getY(),r.getYPredicted(),r.getYPredictedProbabilities());
      data._set(rId,r);
    }
  }
  data.recalculateMeta();
}
Program: 54720
Project: 54720
Buggy source:
@Override protected void _denormalize(Dataset data){
  Map<Object,Double> minColumnValues=knowledgeBase.getModelParameters().getMinColumnValues();
  Map<Object,Double> maxColumnValues=knowledgeBase.getModelParameters().getMaxColumnValues();
  BaseDummyMinMaxTransformer.normalizeX(data,minColumnValues,maxColumnValues);
}

Fixed version (ground truth):
@Override protected void _denormalize(Dataset data){
  Map<Object,Double> minColumnValues=knowledgeBase.getModelParameters().getMinColumnValues();
  Map<Object,Double> maxColumnValues=knowledgeBase.getModelParameters().getMaxColumnValues();
  BaseDummyMinMaxTransformer.denormalizeX(data,minColumnValues,maxColumnValues);
}
Program: 54721
Project: 54721
Buggy source:
@Override protected void _denormalize(Dataset data){
  Map<Object,Double> minColumnValues=knowledgeBase.getModelParameters().getMinColumnValues();
  Map<Object,Double> maxColumnValues=knowledgeBase.getModelParameters().getMaxColumnValues();
  BaseDummyMinMaxTransformer.normalizeX(data,minColumnValues,maxColumnValues);
}

Fixed version (ground truth):
@Override protected void _denormalize(Dataset data){
  Map<Object,Double> minColumnValues=knowledgeBase.getModelParameters().getMinColumnValues();
  Map<Object,Double> maxColumnValues=knowledgeBase.getModelParameters().getMaxColumnValues();
  BaseDummyMinMaxTransformer.denormalizeX(data,minColumnValues,maxColumnValues);
}
Program: 54722
Project: 54722
Buggy source:
@Override public void dropDatabase(){
  if (!existsDatabase()) {
    return;
  }
  try {
    Files.delete(filepath);
  }
 catch (  IOException ex) {
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
@Override public void dropDatabase(){
  if (!existsDatabase()) {
    return;
  }
  try {
    Files.deleteIfExists(filepath);
  }
 catch (  IOException ex) {
    throw new RuntimeException(ex);
  }
}
Program: 54723
Project: 54723
Buggy source:
@Override public void dropDatabase(){
  if (!existsDatabase()) {
    return;
  }
  try {
    db.close();
    Files.delete(filepath);
    Files.delete(Paths.get(filepath.toString() + "String_Node_Str"));
    Files.delete(Paths.get(filepath.toString() + "String_Node_Str"));
  }
 catch (  IOException ex) {
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
@Override public void dropDatabase(){
  if (!existsDatabase()) {
    return;
  }
  try {
    if (isDBopen()) {
      db.close();
    }
    Files.deleteIfExists(filepath);
    Files.deleteIfExists(Paths.get(filepath.toString() + "String_Node_Str"));
  }
 catch (  IOException ex) {
    throw new RuntimeException(ex);
  }
}
Program: 54724
Project: 54724
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public <KB extends KnowledgeBase>KB load(Class<KB> klass){
  ConcurrentNavigableMap<Integer,KB> map=db.getTreeMap("String_Node_Str");
  KB knowledgeBaseObject=map.get(0);
  return knowledgeBaseObject;
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public <KB extends KnowledgeBase>KB load(Class<KB> klass){
  openDB();
  Atomic.Var<KB> knowledgeBaseVar=db.getAtomicVar("String_Node_Str");
  return knowledgeBaseVar.get();
}
Program: 54725
Project: 54725
Buggy source:
@Override public <T extends Map>void dropBigMap(String name,T map){
  map.clear();
  db.delete(name);
}

Fixed version (ground truth):
@Override public <T extends Map>void dropBigMap(String name,T map){
  map.clear();
  if (isDBopen()) {
    db.delete(name);
  }
}
Program: 54726
Project: 54726
Buggy source:
@Override public <KB extends KnowledgeBase>void save(KB knowledgeBaseObject){
  db.commit();
  db.compact();
  ConcurrentNavigableMap<Integer,KB> map=db.getTreeMap("String_Node_Str");
  map.put(0,knowledgeBaseObject);
  db.commit();
}

Fixed version (ground truth):
@Override public <KB extends KnowledgeBase>void save(KB knowledgeBaseObject){
  openDB();
  Atomic.Var<KB> knowledgeBaseVar=db.getAtomicVar("String_Node_Str");
  knowledgeBaseVar.set(knowledgeBaseObject);
  db.commit();
  db.compact();
}
Program: 54727
Project: 54727
Buggy source:
@Override public boolean existsDatabase(){
  return Files.exists(filepath) && db.exists("String_Node_Str");
}

Fixed version (ground truth):
@Override public boolean existsDatabase(){
  if (Files.exists(filepath) || db == null) {
    return true;
  }
  if (db.isClosed()) {
    return true;
  }
  if (db.getCatalog().size() > 0) {
    return true;
  }
  return false;
}
Program: 54728
Project: 54728
Buggy source:
@Override public <K,V>Map<K,V> getBigMap(String name){
  return db.getHashMap(name);
}

Fixed version (ground truth):
@Override public <K,V>Map<K,V> getBigMap(String name){
  openDB();
  return db.createHashMap(name).counterEnable().makeOrGet();
}
Program: 54729
Project: 54729
Buggy source:
public MapDBConnector(String database,MapDBConfiguration dbConf){
  this.dbConf=dbConf;
  String rootDbFolder=this.dbConf.getDbRootFolder();
  if (rootDbFolder.isEmpty()) {
    filepath=FileSystems.getDefault().getPath(database);
  }
 else {
    filepath=Paths.get(rootDbFolder + File.separator + database);
  }
  db=DBMaker.newFileDB(filepath.toFile()).compressionEnable().cacheSize(this.dbConf.getCacheSize()).closeOnJvmShutdown().make();
}

Fixed version (ground truth):
public MapDBConnector(String database,MapDBConfiguration dbConf){
  this.dbConf=dbConf;
  String rootDbFolder=this.dbConf.getDbRootFolder();
  if (rootDbFolder.isEmpty()) {
    filepath=FileSystems.getDefault().getPath(database);
  }
 else {
    filepath=Paths.get(rootDbFolder + File.separator + database);
  }
  openDB();
}
Program: 54730
Project: 54730
Buggy source:
private static Route attrs(final Route route,final Route[] routes,final int i){
  Map<String,Object> attrs=new HashMap<>(16);
  for (int t=i; t < routes.length; t++) {
    attrs.putAll(routes[t].attributes());
  }
  return new Route.Forwarding(route){
    @Override public Map<String,Object> attributes(){
      return attrs;
    }
  }
;
}

Fixed version (ground truth):
private static Route attrs(final Route route,final Route[] routes,final int i){
  Map<String,Object> attrs=new HashMap<>(16);
  for (int t=i; t < routes.length; t++) {
    routes[t].attributes().forEach((name,value) -> attrs.putIfAbsent(name,value));
  }
  return new Route.Forwarding(route){
    @Override public <T>T attr(    String name){
      return (T)attrs.get(name);
    }
    @Override public Map<String,Object> attributes(){
      return attrs;
    }
  }
;
}
Program: 54732
Project: 54732
Buggy source:
private static List<Map<String,Object>> executors(final ConfigValue candidate,final boolean daemon,final int priority,final int n){
  if (candidate.valueType() == ConfigValueType.STRING) {
    Map<String,Object> options=executor("String_Node_Str",daemon,priority,n,candidate.unwrapped());
    return ImmutableList.of(options);
  }
  ConfigObject conf=(ConfigObject)candidate;
  List<Map<String,Object>> result=new ArrayList<>();
  for (  Entry<String,ConfigValue> executor : conf.entrySet()) {
    String name=executor.getKey();
    Object value=executor.getValue().unwrapped();
    Map<String,Object> options=new HashMap<>();
    options.putAll(executor(name,daemon,priority,n,value));
    result.add(options);
  }
  return result;
}

Fixed version (ground truth):
private static List<Map<String,Object>> executors(final ConfigValue candidate,final boolean daemon,final int priority,final int n){
  if (candidate.valueType() == ConfigValueType.STRING) {
    Map<String,Object> options=executor("String_Node_Str",daemon,priority,n,candidate.unwrapped());
    return ImmutableList.of(options);
  }
  ConfigObject conf=(ConfigObject)candidate;
  List<Map<String,Object>> result=new ArrayList<>();
  for (  Entry<String,ConfigValue> executor : conf.entrySet()) {
    String name=executor.getKey();
    Object value=executor.getValue().unwrapped();
    Map<String,Object> options=new HashMap<>(executor(name,daemon,priority,n,value));
    result.add(options);
  }
  return result;
}
Program: 54734
Project: 54734
Buggy source:
@Override public List<String> params(final String name){
  Builder<String> builder=ImmutableList.builder();
  Deque<String> query=exchange.getQueryParameters().get(name);
  if (query != null) {
    query.stream().forEach(builder::add);
  }
  Optional.ofNullable(parseForm().get(name)).ifPresent(values -> {
    values.stream().forEach(value -> {
      if (!value.isFile()) {
        builder.add(value.getValue());
      }
    }
);
  }
);
  return builder.build();
}

Fixed version (ground truth):
@Override public List<String> params(final String name){
  Builder<String> builder=ImmutableList.builder();
  Deque<String> query=exchange.getQueryParameters().get(name);
  if (query != null) {
    query.forEach(builder::add);
  }
  Optional.ofNullable(parseForm().get(name)).ifPresent(values -> values.forEach(value -> {
    if (!value.isFile()) {
      builder.add(value.getValue());
    }
  }
));
  return builder.build();
}
Program: 54735
Project: 54735
Buggy source:
@Override public List<String> paramNames(){
  ImmutableList.Builder<String> builder=ImmutableList.<String>builder();
  builder.addAll(exchange.getQueryParameters().keySet());
  FormData formdata=parseForm();
  formdata.forEach(v -> {
    if (!formdata.getFirst(v).isFile()) {
      builder.add(v);
    }
  }
);
  return builder.build();
}

Fixed version (ground truth):
@Override public List<String> paramNames(){
  ImmutableList.Builder<String> builder=ImmutableList.builder();
  builder.addAll(exchange.getQueryParameters().keySet());
  FormData formdata=parseForm();
  formdata.forEach(v -> {
    if (!formdata.getFirst(v).isFile()) {
      builder.add(v);
    }
  }
);
  return builder.build();
}
Program: 54736
Project: 54736
Buggy source:
@Override public void end(){
  NativeWebSocket ws=exchange.getAttachment(UndertowRequest.SOCKET);
  if (ws != null) {
    try {
      Handlers.websocket((wsExchange,channel) -> {
        ((UndertowWebSocket)ws).connect(channel);
      }
).handleRequest(exchange);
    }
 catch (    Exception ex) {
      LoggerFactory.getLogger(NativeResponse.class).error("String_Node_Str",ex);
    }
 finally {
      exchange.removeAttachment(UndertowRequest.SOCKET);
    }
  }
  if (endExchange) {
    exchange.endExchange();
  }
}

Fixed version (ground truth):
@Override public void end(){
  NativeWebSocket ws=exchange.getAttachment(UndertowRequest.SOCKET);
  if (ws != null) {
    try {
      Handlers.websocket((wsExchange,channel) -> ((UndertowWebSocket)ws).connect(channel)).handleRequest(exchange);
    }
 catch (    Exception ex) {
      LoggerFactory.getLogger(NativeResponse.class).error("String_Node_Str",ex);
    }
 finally {
      exchange.removeAttachment(UndertowRequest.SOCKET);
    }
  }
  if (endExchange) {
    exchange.endExchange();
  }
}
Program: 54737
Project: 54737
Buggy source:
@SuppressWarnings("String_Node_Str") static Builder configure(final Config config,final Builder builder){
  Config $undertow=config.getConfig("String_Node_Str");
  set($undertow,"String_Node_Str",name -> {
    int value=$undertow.getBytes(name).intValue();
    log.debug("String_Node_Str",value);
    builder.setBufferSize(value);
  }
);
  set($undertow,"String_Node_Str",name -> {
    boolean value=$undertow.getBoolean(name);
    log.debug("String_Node_Str",value);
    builder.setDirectBuffers(value);
  }
);
  set($undertow,"String_Node_Str",name -> {
    int value=$undertow.getInt(name);
    log.debug("String_Node_Str",value);
    builder.setIoThreads(value);
  }
);
  set($undertow,"String_Node_Str",name -> {
    int value=$undertow.getInt(name);
    log.debug("String_Node_Str",value);
    builder.setWorkerThreads(value);
  }
);
  $undertow.getConfig("String_Node_Str").root().entrySet().forEach(setOption($undertow,"String_Node_Str",(option,value) -> builder.setServerOption(option,value)));
  $undertow.getConfig("String_Node_Str").root().entrySet().forEach(setOption($undertow,"String_Node_Str",(option,value) -> builder.setWorkerOption(option,value)));
  $undertow.getConfig("String_Node_Str").root().entrySet().forEach(setOption($undertow,"String_Node_Str",(option,value) -> builder.setSocketOption(option,value)));
  return builder;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") static Builder configure(final Config config,final Builder builder){
  Config $undertow=config.getConfig("String_Node_Str");
  set($undertow,"String_Node_Str",name -> {
    int value=$undertow.getBytes(name).intValue();
    log.debug("String_Node_Str",value);
    builder.setBufferSize(value);
  }
);
  set($undertow,"String_Node_Str",name -> {
    boolean value=$undertow.getBoolean(name);
    log.debug("String_Node_Str",value);
    builder.setDirectBuffers(value);
  }
);
  set($undertow,"String_Node_Str",name -> {
    int value=$undertow.getInt(name);
    log.debug("String_Node_Str",value);
    builder.setIoThreads(value);
  }
);
  set($undertow,"String_Node_Str",name -> {
    int value=$undertow.getInt(name);
    log.debug("String_Node_Str",value);
    builder.setWorkerThreads(value);
  }
);
  $undertow.getConfig("String_Node_Str").root().entrySet().forEach(setOption($undertow,"String_Node_Str",builder::setServerOption));
  $undertow.getConfig("String_Node_Str").root().entrySet().forEach(setOption($undertow,"String_Node_Str",builder::setWorkerOption));
  $undertow.getConfig("String_Node_Str").root().entrySet().forEach(setOption($undertow,"String_Node_Str",builder::setSocketOption));
  return builder;
}
Program: 54738
Project: 54738
Buggy source:
@SuppressWarnings("String_Node_Str") private static Optional<ObservableAdapter> toAdapter(final Function<Observable,Observable> fn){
  return Optional.of(new ObservableAdapter(){
    @SuppressWarnings("String_Node_Str") @Override public <T>Observable<T> adapt(    final Observable<T> observable){
      return fn.apply(observable);
    }
  }
);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static Optional<ObservableAdapter> toAdapter(final Function<Observable,Observable> fn){
  return Optional.of(fn::apply);
}
Program: 54739
Project: 54739
Buggy source:
@Override public void configure(final Env env,final Config config,final Binder binder){
  HibernateValidatorConfiguration configuration=byProvider(HibernateValidator.class).configure();
  if (config.hasPath("String_Node_Str")) {
    config.getConfig("String_Node_Str").root().forEach((k,v) -> {
      configuration.addProperty("String_Node_Str" + k,v.unwrapped().toString());
    }
);
  }
  if (configurer != null) {
    configurer.accept(configuration,config);
  }
  binder.bind(HibernateValidatorConfiguration.class).toInstance(configuration);
  binder.bind(Validator.class).toProvider(HbvFactory.class).asEagerSingleton();
  env.lifeCycle(HbvFactory.class);
  Multibinder.newSetBinder(binder,Parser.class).addBinding().toInstance(new HbvParser(predicate));
}

Fixed version (ground truth):
@Override public void configure(final Env env,final Config config,final Binder binder){
  HibernateValidatorConfiguration configuration=byProvider(HibernateValidator.class).configure();
  if (config.hasPath("String_Node_Str")) {
    config.getConfig("String_Node_Str").root().forEach((k,v) -> configuration.addProperty("String_Node_Str" + k,v.unwrapped().toString()));
  }
  if (configurer != null) {
    configurer.accept(configuration,config);
  }
  binder.bind(HibernateValidatorConfiguration.class).toInstance(configuration);
  binder.bind(Validator.class).toProvider(HbvFactory.class).asEagerSingleton();
  env.lifeCycle(HbvFactory.class);
  Multibinder.newSetBinder(binder,Parser.class).addBinding().toInstance(new HbvParser(predicate));
}
Program: 54741
Project: 54741
Buggy source:
@SuppressWarnings("String_Node_Str") private String toSpec(final Object spec){
  if (spec instanceof Map) {
    Map<String,Object> m=(Map<String,Object>)spec;
    return m.entrySet().stream().map(e -> e.getKey() + "String_Node_Str" + e.getValue()).collect(Collectors.joining("String_Node_Str")).toString();
  }
  return spec.toString();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private String toSpec(final Object spec){
  if (spec instanceof Map) {
    Map<String,Object> m=(Map<String,Object>)spec;
    return m.entrySet().stream().map(e -> e.getKey() + "String_Node_Str" + e.getValue()).collect(Collectors.joining("String_Node_Str"));
  }
  return spec.toString();
}
Program: 54742
Project: 54742
Buggy source:
/** 
 * Creates a new   {@link CaffeineCache} with {@link String} and {@link Object} types as key/value.
 * @return A new {@link CaffeineCache}.
 */
public static final CaffeineCache<String,Object> newCache(){
  return new CaffeineCache<String,Object>(){
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link CaffeineCache} with {@link String} and {@link Object} types as key/value.
 * @return A new {@link CaffeineCache}.
 */
public static CaffeineCache<String,Object> newCache(){
  return new CaffeineCache<String,Object>(){
  }
;
}