nus-yam/ex-repair huggingface dataset:
Program: 5155
Project: 5155
Buggy source:
private Configuration(Class<?> mainClass){
  try {
    setDefaultValues(mainClass);
  }
 catch (  ConfigurationException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
private Configuration(Class<?> mainClass){
  try {
    logger.info("String_Node_Str",(mainClass == null ? "String_Node_Str" : "String_Node_Str" + mainClass.getName() + "String_Node_Str"));
    setDefaultValues(mainClass);
  }
 catch (  ConfigurationException e) {
    throw new RuntimeException(e);
  }
}
Program: 5156
Project: 5156
Buggy source:
/** 
 * @return the analysis result as a function string that conforms to theJavaScript syntax
 */
private String getFunctionAsString(){
  String fs=RAdapter.getWrapper().executeRCommandString("String_Node_Str" + getId() + "String_Node_Str");
  fs=fs.replace("String_Node_Str","String_Node_Str");
  fs=fs.replace("String_Node_Str","String_Node_Str");
  fs=fs.replace("String_Node_Str","String_Node_Str");
  fs=fs.replace("String_Node_Str","String_Node_Str");
  fs=fs.replaceAll("String_Node_Str","String_Node_Str");
  return fs;
}

Fixed version (ground truth):
/** 
 * @return the analysis result as a function string that conforms to theJavaScript syntax
 */
private String getFunctionAsString(){
  String fs=RAdapter.getWrapper().executeRCommandString("String_Node_Str" + getId() + "String_Node_Str");
  fs=fs.replace("String_Node_Str","String_Node_Str");
  fs=fs.replace("String_Node_Str","String_Node_Str");
  fs=fs.replace("String_Node_Str","String_Node_Str");
  fs=fs.replace("String_Node_Str","String_Node_Str");
  fs=fs.replaceAll("String_Node_Str","String_Node_Str");
  for (  ParameterDefinition pd : independentParameterDefinitions) {
    fs=fs.replaceAll(pd.getFullName("String_Node_Str") + "String_Node_Str",pd.getFullName("String_Node_Str"));
  }
  return fs;
}
Program: 5157
Project: 5157
Buggy source:
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Integer getNumberOfExperimentsPerIteration(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(NUMBER_OF_EXPERIMENTS_PER_ITERATION);
  if (value != null) {
    return Integer.valueOf(value);
  }
 else {
    return NUMBER_OF_EXPERIMENTS_PER_ITERATION_DEFAULT_VALUE;
  }
}

Fixed version (ground truth):
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Integer getNumberOfExperimentsPerIteration(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(NUMBER_OF_EXPERIMENTS_PER_ITERATION);
  if (value != null && !value.isEmpty()) {
    return Integer.valueOf(value);
  }
 else {
    return NUMBER_OF_EXPERIMENTS_PER_ITERATION_DEFAULT_VALUE;
  }
}
Program: 5158
Project: 5158
Buggy source:
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static DynamicSectorAccuracyScope getDynamicSectorAccuracyScope(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(DYNAMIC_SECTOR_ACCURACY_SCOPE);
  if (value != null) {
    if (value.equalsIgnoreCase(DynamicSectorAccuracyScope.Local.name())) {
      return DynamicSectorAccuracyScope.Local;
    }
 else     if (value.equalsIgnoreCase(DynamicSectorAccuracyScope.Global.name())) {
      return DynamicSectorAccuracyScope.Global;
    }
  }
 else {
    return DYNAMIC_SECTOR_ACCURACY_SCOPE_DEFAULT_VALUE;
  }
  throw new IllegalArgumentException("String_Node_Str" + value);
}

Fixed version (ground truth):
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static DynamicSectorAccuracyScope getDynamicSectorAccuracyScope(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(DYNAMIC_SECTOR_ACCURACY_SCOPE);
  if (value != null && !value.isEmpty()) {
    if (value.equalsIgnoreCase(DynamicSectorAccuracyScope.Local.name())) {
      return DynamicSectorAccuracyScope.Local;
    }
 else     if (value.equalsIgnoreCase(DynamicSectorAccuracyScope.Global.name())) {
      return DynamicSectorAccuracyScope.Global;
    }
  }
 else {
    return DYNAMIC_SECTOR_ACCURACY_SCOPE_DEFAULT_VALUE;
  }
  throw new IllegalArgumentException("String_Node_Str" + value);
}
Program: 5159
Project: 5159
Buggy source:
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Integer getBorderMeasurementDepth(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(BORDER_MEASUREMENT_DEPTH);
  if (value != null) {
    return Integer.valueOf(value);
  }
 else {
    return BORDER_MEASUREMENT_DEPTH_DEFAULT_VALUE;
  }
}

Fixed version (ground truth):
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Integer getBorderMeasurementDepth(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(BORDER_MEASUREMENT_DEPTH);
  if (value != null && !value.isEmpty()) {
    return Integer.valueOf(value);
  }
 else {
    return BORDER_MEASUREMENT_DEPTH_DEFAULT_VALUE;
  }
}
Program: 5160
Project: 5160
Buggy source:
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Integer getNumberOfExperimentsPerSectionSplit(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(NUMBER_OF_EXPERIMENTS_PER_SECTION_SPLIT);
  if (value != null) {
    return Integer.valueOf(value);
  }
 else {
    return NUMBER_OF_EXPERIMENTS_PER_SECTION_SPLIT_DEFAULT_VALUE;
  }
}

Fixed version (ground truth):
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Integer getNumberOfExperimentsPerSectionSplit(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(NUMBER_OF_EXPERIMENTS_PER_SECTION_SPLIT);
  if (value != null && !value.isEmpty()) {
    return Integer.valueOf(value);
  }
 else {
    return NUMBER_OF_EXPERIMENTS_PER_SECTION_SPLIT_DEFAULT_VALUE;
  }
}
Program: 5161
Project: 5161
Buggy source:
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Integer getSizeOfValidationSet(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(SIZE_OF_VALIDATION_SET);
  if (value != null) {
    return Integer.valueOf(value);
  }
 else {
    return SIZE_OF_VALIDATION_SET_DEFAULT_VALUE;
  }
}

Fixed version (ground truth):
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Integer getSizeOfValidationSet(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(SIZE_OF_VALIDATION_SET);
  if (value != null && !value.isEmpty()) {
    return Integer.valueOf(value);
  }
 else {
    return SIZE_OF_VALIDATION_SET_DEFAULT_VALUE;
  }
}
Program: 5162
Project: 5162
Buggy source:
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Integer getNumberOfInitialExperiments(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(NUMBER_OF_INITIAL_EXPERIMENTS);
  if (value != null) {
    return Integer.valueOf(value);
  }
 else {
    return NUMBER_OF_INITIAL_EXPERIMENTS_DEFAULT_VALUE;
  }
}

Fixed version (ground truth):
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Integer getNumberOfInitialExperiments(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(NUMBER_OF_INITIAL_EXPERIMENTS);
  if (value != null && !value.isEmpty()) {
    return Integer.valueOf(value);
  }
 else {
    return NUMBER_OF_INITIAL_EXPERIMENTS_DEFAULT_VALUE;
  }
}
Program: 5163
Project: 5163
Buggy source:
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter, <code>null</code> ifthe parameter is not set
 */
public static Long getMaxExplorationTimeInMin(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(MAX_EXPLORATION_TIME_IN_MIN);
  if (value != null) {
    return Long.valueOf(value);
  }
 else {
    return MAX_EXPLORATION_TIME_IN_MIN_DEFAULT_VALUE;
  }
}

Fixed version (ground truth):
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter, <code>null</code> ifthe parameter is not set
 */
public static Long getMaxExplorationTimeInMin(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(MAX_EXPLORATION_TIME_IN_MIN);
  if (value != null && !value.isEmpty()) {
    return Long.valueOf(value);
  }
 else {
    return MAX_EXPLORATION_TIME_IN_MIN_DEFAULT_VALUE;
  }
}
Program: 5164
Project: 5164
Buggy source:
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Double getIrrelevantParameterThreshold(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(IRRELEVANT_PARAMETER_THRESHOLD);
  if (value != null) {
    return Double.valueOf(value);
  }
 else {
    return IRRELEVANT_PARAMETER_THRESHOLD_DEFAULT_VALUE;
  }
}

Fixed version (ground truth):
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Double getIrrelevantParameterThreshold(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(IRRELEVANT_PARAMETER_THRESHOLD);
  if (value != null && !value.isEmpty()) {
    return Double.valueOf(value);
  }
 else {
    return IRRELEVANT_PARAMETER_THRESHOLD_DEFAULT_VALUE;
  }
}
Program: 5165
Project: 5165
Buggy source:
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Double getDesiredModelAccuracy(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(DESIRED_MODEL_ACCURACY);
  if (value != null) {
    return Double.valueOf(value);
  }
 else {
    return DESIRED_MODEL_ACCURACY_DEFAULT_VALUE;
  }
}

Fixed version (ground truth):
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Double getDesiredModelAccuracy(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(DESIRED_MODEL_ACCURACY);
  if (value != null && !value.isEmpty()) {
    return Double.valueOf(value);
  }
 else {
    return DESIRED_MODEL_ACCURACY_DEFAULT_VALUE;
  }
}
Program: 5166
Project: 5166
Buggy source:
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static AccuracyDetermination getAccuracyDeterminationMethod(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(ACCURACY_DETERMINATION_METHOD);
  if (value != null) {
    if (value.equalsIgnoreCase(AccuracyDetermination.RandomValidationSet.name())) {
      return AccuracyDetermination.RandomValidationSet;
    }
 else     if (value.equalsIgnoreCase(AccuracyDetermination.DynamicSector.name())) {
      return AccuracyDetermination.DynamicSector;
    }
  }
 else {
    return ACCURACY_DETERMINATION_METHOD_DEFAULT_VALUE;
  }
  throw new IllegalArgumentException("String_Node_Str" + value);
}

Fixed version (ground truth):
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static AccuracyDetermination getAccuracyDeterminationMethod(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(ACCURACY_DETERMINATION_METHOD);
  if (value != null && !value.isEmpty()) {
    if (value.equalsIgnoreCase(AccuracyDetermination.RandomValidationSet.name())) {
      return AccuracyDetermination.RandomValidationSet;
    }
 else     if (value.equalsIgnoreCase(AccuracyDetermination.DynamicSector.name())) {
      return AccuracyDetermination.DynamicSector;
    }
  }
 else {
    return ACCURACY_DETERMINATION_METHOD_DEFAULT_VALUE;
  }
  throw new IllegalArgumentException("String_Node_Str" + value);
}
Program: 5167
Project: 5167
Buggy source:
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Double getDiminutionOfValidation(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(DIMINUTION_OF_VALIDATIONS);
  if (value != null) {
    return Double.valueOf(value);
  }
 else {
    return DIMINUTION_OF_VALIDATIONS_DEFAULT_VALUE;
  }
}

Fixed version (ground truth):
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter
 */
public static Double getDiminutionOfValidation(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(DIMINUTION_OF_VALIDATIONS);
  if (value != null && !value.isEmpty()) {
    return Double.valueOf(value);
  }
 else {
    return DIMINUTION_OF_VALIDATIONS_DEFAULT_VALUE;
  }
}
Program: 5168
Project: 5168
Buggy source:
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter, <code>null</code> ifthe parameter is not set
 */
public static Integer getMaxNumberOfExperiments(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(MAX_NUMBER_OF_EXPERIMENTS);
  if (value != null) {
    return Integer.valueOf(value);
  }
 else {
    return MAX_NUMBER_OF_EXPERIMENTS_DEFAULT_VALUE;
  }
}

Fixed version (ground truth):
/** 
 * @param strategyConfig - the configuration of the exploration strategy provided by the users of SoPeCo
 * @return the value of the configuration parameter, <code>null</code> ifthe parameter is not set
 */
public static Integer getMaxNumberOfExperiments(ExplorationStrategy strategyConfig){
  String value=strategyConfig.getConfiguration().get(MAX_NUMBER_OF_EXPERIMENTS);
  if (value != null && !value.isEmpty()) {
    return Integer.valueOf(value);
  }
 else {
    return MAX_NUMBER_OF_EXPERIMENTS_DEFAULT_VALUE;
  }
}
Program: 5169
Project: 5169
Buggy source:
@Override public void prepareExperimentSeries(ExperimentSeriesRun experimentSeriesRun,ParameterCollection<ParameterValue<?>> preparationPVs){
  if (experimentSeriesRun == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  try {
    this.currentExperimentSeriesRun=experimentSeriesRun;
    this.preparationPVs=preparationPVs;
    meController.prepareExperimentSeries(preparationPVs);
    ParameterCollection<ParameterDefinition> observationParams=ParameterCollectionFactory.createParameterDefinitionCollection(meDefinition.getRoot().getObservationParameters());
    meController.setObservationParameters(observationParams);
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void prepareExperimentSeries(ExperimentSeriesRun experimentSeriesRun,ParameterCollection<ParameterValue<?>> preparationPVs){
  if (experimentSeriesRun == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (experimentSeriesRun.getExperimentSeries().getName().equals("String_Node_Str")) {
    boolean x=true;
  }
  try {
    this.currentExperimentSeriesRun=experimentSeriesRun;
    this.preparationPVs=preparationPVs;
    meController.prepareExperimentSeries(preparationPVs);
    ParameterCollection<ParameterDefinition> observationParams=ParameterCollectionFactory.createParameterDefinitionCollection(meDefinition.getRoot().getObservationParameters());
    meController.setObservationParameters(observationParams);
  }
 catch (  RemoteException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 5170
Project: 5170
Buggy source:
public static Object convertValue(Object value,ParameterType type){
switch (type) {
case BOOLEAN:
    if (value instanceof Boolean)     return value;
 else     if (value instanceof Double)     return doubleToBoolean((Double)value);
 else     if (value instanceof Integer)     return integerToBoolean((Integer)value);
 else     if (value instanceof String)     return stringToBoolean((String)value);
  break;
case DOUBLE:
if (value instanceof Double) return value;
 else if (value instanceof Boolean) return booleanToDouble((Boolean)value);
 else if (value instanceof Integer) return ((Integer)value).doubleValue();
 else if (value instanceof String) return Double.parseDouble((String)value);
break;
case INTEGER:
if (value instanceof Integer) return value;
 else if (value instanceof Boolean) return booleanToInteger((Boolean)value);
 else if (value instanceof Double) return ((Double)value).intValue();
 else if (value instanceof String) return Integer.parseInt((String)value);
break;
case STRING:
return value.toString();
default :
break;
}
throw new IllegalArgumentException("String_Node_Str" + value + "String_Node_Str");
}

Fixed version (ground truth):
public static Object convertValue(Object value,ParameterType type){
switch (type) {
case BOOLEAN:
    if (value instanceof Boolean)     return value;
 else     if (value instanceof Double)     return doubleToBoolean((Double)value);
 else     if (value instanceof Integer)     return integerToBoolean((Integer)value);
 else     if (value instanceof String)     return stringToBoolean((String)value);
  break;
case DOUBLE:
if (value instanceof Double) return value;
 else if (value instanceof Boolean) return booleanToDouble((Boolean)value);
 else if (value instanceof Integer) return ((Integer)value).doubleValue();
 else if (value instanceof String) return Double.parseDouble((String)value);
break;
case INTEGER:
if (value instanceof Integer) return value;
 else if (value instanceof Boolean) return booleanToInteger((Boolean)value);
 else if (value instanceof Double) return ((Double)value).intValue();
 else if (value instanceof String) return Integer.parseInt((String)value);
break;
case STRING:
return (String)value;
default :
break;
}
throw new IllegalArgumentException("String_Node_Str" + value + "String_Node_Str");
}
Program: 5171
Project: 5171
Buggy source:
public void extendScenarioInstance(ScenarioDefinition otherSD){
  List<ExperimentSeriesDefinition> esdList=this.getScenarioDefinition().extendBy(otherSD);
  for (  ExperimentSeriesDefinition esd : esdList) {
    ExperimentSeries expSeries=EntityFactory.createExperimentSeries(esd);
    expSeries.setScenarioInstance(this);
    this.getExperimentSeriesList().add(expSeries);
  }
}

Fixed version (ground truth):
public void extendScenarioInstance(ScenarioDefinition otherSD){
  List<ExperimentSeriesDefinition> esdList=this.getScenarioDefinition().extendBy(otherSD);
}
Program: 5172
Project: 5172
Buggy source:
@Override public ParameterValue<?> get(int pos){
  if (pos < values.size()) {
    return ParameterValueFactory.createParameterValue(dynamicValueAssignment.getParameter(),values.get(pos));
  }
 else {
    throw new IndexOutOfBoundsException("String_Node_Str" + pos + "String_Node_Str"+ values.size()+ "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public ParameterValue<?> get(int pos){
  if (pos < values.size()) {
    return ParameterValueFactory.createParameterValue(dynamicValueAssignment.getParameter(),values.get(pos).getValue());
  }
 else {
    throw new IndexOutOfBoundsException("String_Node_Str" + pos + "String_Node_Str"+ values.size()+ "String_Node_Str");
  }
}
Program: 5173
Project: 5173
Buggy source:
protected AbstractBreakdownExplorationExtension(String name){
  NAME=name;
  prepareConfigurationParameterMap();
}

Fixed version (ground truth):
protected AbstractBreakdownExplorationExtension(){
  prepareConfigurationParameterMap();
}
Program: 5174
Project: 5174
Buggy source:
public AdaptiveEquidistantBreakdownExtension(){
  super(BreakdownConfiguration.ADAPTIVE_EQUIDISTANT_BREAKDOWN);
}

Fixed version (ground truth):
public AdaptiveEquidistantBreakdownExtension(){
  super();
}
Program: 5175
Project: 5175
Buggy source:
public AdaptiveRandomBreakdownExtension(){
  super(BreakdownConfiguration.ADAPTIVE_RANDOM_BREAKDOWN);
}

Fixed version (ground truth):
public AdaptiveRandomBreakdownExtension(){
  super();
}
Program: 5176
Project: 5176
Buggy source:
public EquidistantBreakdownExtension(){
  super(BreakdownConfiguration.EQUIDISTANT_BREAKDOWN);
}

Fixed version (ground truth):
public EquidistantBreakdownExtension(){
  super();
}
Program: 5177
Project: 5177
Buggy source:
public RandomBreakdownExtension(){
  super(BreakdownConfiguration.RANDOM_BREAKDOWN);
}

Fixed version (ground truth):
public RandomBreakdownExtension(){
  super();
}
Program: 5178
Project: 5178
Buggy source:
protected AbstractBreakdownExplorationExtension(){
  prepareConfigurationParameterMap();
}

Fixed version (ground truth):
protected AbstractBreakdownExplorationExtension(String name){
  NAME=name;
  prepareConfigurationParameterMap();
}
Program: 5179
Project: 5179
Buggy source:
public AdaptiveEquidistantBreakdownExtension(){
  this.NAME=BreakdownConfiguration.EQUIDISTANT_BREAKDOWN;
}

Fixed version (ground truth):
public AdaptiveEquidistantBreakdownExtension(){
  super(BreakdownConfiguration.ADAPTIVE_EQUIDISTANT_BREAKDOWN);
}
Program: 5180
Project: 5180
Buggy source:
public AdaptiveRandomBreakdownExtension(){
  this.NAME=BreakdownConfiguration.ADAPTIVE_RANDOM_BREAKDOWN;
}

Fixed version (ground truth):
public AdaptiveRandomBreakdownExtension(){
  super(BreakdownConfiguration.ADAPTIVE_RANDOM_BREAKDOWN);
}
Program: 5181
Project: 5181
Buggy source:
public EquidistantBreakdownExtension(){
  this.NAME=BreakdownConfiguration.EQUIDISTANT_BREAKDOWN;
}

Fixed version (ground truth):
public EquidistantBreakdownExtension(){
  super(BreakdownConfiguration.EQUIDISTANT_BREAKDOWN);
}
Program: 5182
Project: 5182
Buggy source:
public RandomBreakdownExtension(){
  this.NAME=BreakdownConfiguration.RANDOM_BREAKDOWN;
}

Fixed version (ground truth):
public RandomBreakdownExtension(){
  super(BreakdownConfiguration.RANDOM_BREAKDOWN);
}
Program: 5183
Project: 5183
Buggy source:
/** 
 * checks if it is time for a validation. The decision is based on the number of elements in the model. We do the following assumptions: <br> 1. Only a few data points in the model means that one new data point influences the prediction of the wide area. Therefore a new data point at the beginning of the measurement series can cause a high prediction error. <br> 2. A lot data points in the model means that one new data point influences the predictio only at it nearest region. Therefore a new data point at the end of the measurement series has a low risk to cause a high prediction error. <br> The conclusion is to decrease the intervals for validation with the number of elements in the model. The number of validations is calculated as a logarithm of the number of Elements in the model with a base given by the attribute   {@link #baseForValidationExecutionCheck}.
 * @return true if a validation should be executed.
 */
protected boolean isTimeForValidation(){
  if (this.baseForValidationExecutionCheck == null) {
    return true;
  }
  Double timestamp=Math.log10(this.cachedEnvironmentAccess.getNumberOfPointsInModel()) / Math.log10(this.baseForValidationExecutionCheck);
  if (timestamp.longValue() > this.lastValidationExecutionTimestamp) {
    this.lastValidationExecutionTimestamp=timestamp.longValue();
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * checks if it is time for a validation. The decision is based on the number of elements in the model. We do the following assumptions: <br> 1. Only a few data points in the model means that one new data point influences the prediction of the wide area. Therefore a new data point at the beginning of the measurement series can cause a high prediction error. <br> 2. A lot data points in the model means that one new data point influences the predictio only at it nearest region. Therefore a new data point at the end of the measurement series has a low risk to cause a high prediction error. <br> The conclusion is to decrease the intervals for validation with the number of elements in the model. The number of validations is calculated as a logarithm of the number of Elements in the model with a base given by the attribute   {@link #baseForValidationExecutionCheck}.
 * @return true if a validation should be executed.
 */
protected boolean isTimeForValidation(){
  if (this.baseForValidationExecutionCheck == null || this.baseForValidationExecutionCheck == 0) {
    return true;
  }
  Double timestamp=Math.log10(this.cachedEnvironmentAccess.getNumberOfPointsInModel()) / Math.log10(this.baseForValidationExecutionCheck);
  if (timestamp.longValue() > this.lastValidationExecutionTimestamp) {
    this.lastValidationExecutionTimestamp=timestamp.longValue();
    return true;
  }
  return false;
}
Program: 5184
Project: 5184
Buggy source:
public void validate(){
  if ((hasNewModelPoints && isTimeForValidation()) || !hasMoreIterations()) {
    if (BreakdownConfiguration.getAccuracyDeterminationMethod(strategyConfig).equals(AccuracyDetermination.RandomValidationSet)) {
      if (validationSetManager == null) {
        validationSetManager=new ValidationSetManager(cachedEnvironmentAccess,allParameters);
        validationSetManager.createRandomValidationSet(BreakdownConfiguration.getSizeOfValidationSet(strategyConfig));
      }
 else {
        double avgRelativePredictionError=validationSetManager.getAvgRelativePredictionError();
        if (avgRelativePredictionError < BreakdownConfiguration.getDesiredModelAccuracy(strategyConfig)) {
          accurateEnoughModel=true;
        }
      }
    }
  }
}

Fixed version (ground truth):
public void validate(){
  if ((hasNewModelPoints && isTimeForValidation()) || !hasMoreIterations()) {
    if (BreakdownConfiguration.getAccuracyDeterminationMethod(strategyConfig).equals(AccuracyDetermination.RandomValidationSet)) {
      if (validationSetManager == null) {
        validationSetManager=new ValidationSetManager(cachedEnvironmentAccess,allParameters);
        validationSetManager.createRandomValidationSet(BreakdownConfiguration.getSizeOfValidationSet(strategyConfig));
      }
      double avgRelativePredictionError=validationSetManager.getAvgRelativePredictionError();
      if (avgRelativePredictionError < BreakdownConfiguration.getDesiredModelAccuracy(strategyConfig)) {
        accurateEnoughModel=true;
      }
    }
  }
}
Program: 5185
Project: 5185
Buggy source:
@Override public void setExtensionRegistry(IExtensionRegistry registry){
  this.extensionRegistry=extensionRegistry;
}

Fixed version (ground truth):
@Override public void setExtensionRegistry(IExtensionRegistry registry){
  this.extensionRegistry=registry;
}
Program: 5186
Project: 5186
Buggy source:
@Override public void runExperimentSeries(ExperimentSeriesRun expSeriesRun,List<IParameterVariation> parameterVariations){
  createBreakdownImplementation(parameterVariations,expSeriesRun);
  breakdownImpl.initialise();
  if (breakdownImpl.reachedStopCondition()) {
    breakdownImpl.finishWork();
    return;
  }
  breakdownImpl.measureBordersOfParameterSpace();
  while (!breakdownImpl.reachedStopCondition()) {
    breakdownImpl.doIteration();
    breakdownImpl.validate();
  }
  breakdownImpl.finishWork();
}

Fixed version (ground truth):
@Override public void runExperimentSeries(ExperimentSeriesRun expSeriesRun,List<IParameterVariation> parameterVariations){
  if (canRun(expSeriesRun.getExperimentSeries().getExperimentSeriesDefinition())) {
    strategyConfig=expSeriesRun.getExperimentSeries().getExperimentSeriesDefinition().getExplorationStrategy();
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + expSeriesRun.getExperimentSeries().getExperimentSeriesDefinition().getExplorationStrategy().getName() + "String_Node_Str");
  }
  createBreakdownImplementation(parameterVariations,expSeriesRun);
  breakdownImpl.initialise();
  if (breakdownImpl.reachedStopCondition()) {
    breakdownImpl.finishWork();
    return;
  }
  breakdownImpl.measureBordersOfParameterSpace();
  while (!breakdownImpl.reachedStopCondition()) {
    breakdownImpl.doIteration();
    breakdownImpl.validate();
  }
  breakdownImpl.finishWork();
}
Program: 5187
Project: 5187
Buggy source:
@Override public void initialise(){
  for (int j=0; j < NUM_INITIAL_MODEL_POINTS; j++) {
    RelativePosition point=createRandomPoint();
    MeasurementCacheResult measuredValue=cachedEnvironmentAccess.measure(point);
    cachedEnvironmentAccess.addToModel(point,measuredValue.value);
  }
}

Fixed version (ground truth):
@Override public void initialise(){
  for (int j=0; j < BreakdownConfiguration.getNumberOfInitialExperiments(); j++) {
    RelativePosition point=createRandomPoint();
    MeasurementCacheResult measuredValue=cachedEnvironmentAccess.measure(point);
    cachedEnvironmentAccess.addToModel(point,measuredValue.value);
  }
}
Program: 5188
Project: 5188
Buggy source:
/** 
 * calculates the real world position based on a relative one.
 * @param position the relative Position
 * @return a list with {@link ParameterValue}s containing the real world position.
 */
public List<ParameterValue<?>> getRealPosition(RelativePosition position){
  List<ParameterValue<?>> returnList=new ArrayList<ParameterValue<?>>(position.size());
  for (  Entry<String,Double> e : position.entrySet()) {
    IParameterVariation paramVariation=this.parameterVariationIdMap.get(e.getKey());
    int indexInVariation=(int)Math.round(paramVariation.size() * e.getValue());
    returnList.add(paramVariation.get(indexInVariation));
  }
  return returnList;
}

Fixed version (ground truth):
/** 
 * calculates the real world position based on a relative one.
 * @param position the relative Position
 * @return a list with {@link ParameterValue}s containing the real world position.
 */
public List<ParameterValue<?>> getRealPosition(RelativePosition position){
  List<ParameterValue<?>> returnList=new ArrayList<ParameterValue<?>>(position.size());
  for (  Entry<String,Double> e : position.entrySet()) {
    IParameterVariation paramVariation=this.parameterVariationIdMap.get(e.getKey());
    int indexInVariation=(int)Math.ceil(paramVariation.size() * e.getValue()) - 1;
    if (indexInVariation == -1) {
      indexInVariation=0;
    }
    returnList.add(paramVariation.get(indexInVariation));
  }
  return returnList;
}
Program: 5189
Project: 5189
Buggy source:
/** 
 * Add a value to the analysis model base. And invalidates the analysisResult from the analyser, because the model was modified.
 * @param the relative position the position which is not used at that time
 * @param value the Environment value which has the position info as part of the runInfo.
 * @throws FrameworkException if the data could not be added to the model for any reason.
 */
public void addToModel(RelativePosition position,AbstractEnvironmentValue value){
  List<ParameterValue<?>> realDataPoint=this.getRealPosition(position);
  realDataPoint.add(value.getValue());
  for (  ParameterValue<?> parameterValue : realDataPoint) {
    AbstractDataSetColumn<?> column=null;
    column=modifier.getColumn(parameterValue.getParameter());
    if (column == null) {
      column=modifier.addColumn(parameterValue.getParameter());
    }
    column.getParameterValues().add(parameterValue);
  }
  this.resultIsInvalid=true;
}

Fixed version (ground truth):
/** 
 * Add a value to the analysis model base. And invalidates the analysisResult from the analyser, because the model was modified.
 * @param the relative position the position which is not used at that time
 * @param value the Environment value which has the position info as part of the runInfo.
 * @throws FrameworkException if the data could not be added to the model for any reason.
 */
public void addToModel(RelativePosition position,AbstractEnvironmentValue value){
  List<ParameterValue<?>> realDataPoint=this.getRealPosition(position);
  realDataPoint.add(value.getValue());
  dataSetBuilder.startRow();
  for (  ParameterValue<?> parameterValue : realDataPoint) {
    if (parameterValue.getParameter().getRole().equals(ParameterRole.INPUT)) {
      dataSetBuilder.addInputParameterValue(parameterValue.getParameter(),parameterValue.getValue());
    }
 else {
      dataSetBuilder.addObservationParameterValue(parameterValue.getParameter(),parameterValue.getValue());
    }
  }
  dataSetBuilder.finishRow();
  this.resultIsInvalid=true;
}
Program: 5190
Project: 5190
Buggy source:
/** 
 * TODO: REMOVE WHEN DATA EXPORT IS AVAILABLE IN THE PERFORMANCE COCKPIT. just for writing the data.
 * @return
 */
public DataSetAggregated getModelDataSet(){
  return this.modifier.getDataSet();
}

Fixed version (ground truth):
/** 
 * TODO: REMOVE WHEN DATA EXPORT IS AVAILABLE IN THE PERFORMANCE COCKPIT. just for writing the data.
 * @return
 */
public DataSetAggregated getModelDataSet(){
  return this.dataSetBuilder.createDataSet();
}
Program: 5191
Project: 5191
Buggy source:
/** 
 * predicts a value with help of the analysis component.
 * @param position position to be predicted.
 * @return the predicted value.
 * @throws FrameworkException
 */
public AbstractEnvironmentValue predictValue(RelativePosition position){
  if (this.resultIsInvalid) {
    this.analyser.analyse(modifier.getDataSet(),this.analysisConfig);
    this.analysisResult=analyser.getPredictionFunctionResult();
    this.resultIsInvalid=false;
  }
  ParameterValue<?> predictedValue;
  predictedValue=this.analysisResult.predictOutputParameter(this.getRealPosition(position));
  return EnvironmentValueFactory.createAbstractEnvironmentValue(predictedValue);
}

Fixed version (ground truth):
/** 
 * predicts a value with help of the analysis component.
 * @param position position to be predicted.
 * @return the predicted value.
 * @throws FrameworkException
 */
public AbstractEnvironmentValue predictValue(RelativePosition position){
  if (this.resultIsInvalid) {
    this.analyser.analyse(dataSetBuilder.createDataSet(),this.analysisConfig);
    this.analysisResult=analyser.getPredictionFunctionResult();
    this.resultIsInvalid=false;
  }
  ParameterValue<?> predictedValue;
  predictedValue=this.analysisResult.predictOutputParameter(this.getRealPosition(position));
  return EnvironmentValueFactory.createAbstractEnvironmentValue(predictedValue);
}
Program: 5192
Project: 5192
Buggy source:
private String createFullNamespaceString(String fullNamespace,ParameterNamespace namespace,String namespaceDelimitter){
  if (namespace != null && namespace.getName() != null && !namespace.getName().isEmpty()) {
    ParameterNamespace parent=(ParameterNamespace)namespace.eContainer();
    fullNamespace=namespace.getName() + namespaceDelimitter + fullNamespace;
    return createFullNamespaceString(fullNamespace,parent,namespaceDelimitter);
  }
  return fullNamespace;
}

Fixed version (ground truth):
private String createFullNamespaceString(String fullNamespace,ParameterNamespace namespace,String namespaceDelimitter){
  if (namespace != null && namespace.getName() != null && !namespace.getName().isEmpty()) {
    fullNamespace=namespace.getName() + namespaceDelimitter + fullNamespace;
    if (namespace.eContainer() instanceof ParameterNamespace) {
      ParameterNamespace parent=(ParameterNamespace)namespace.eContainer();
      return createFullNamespaceString(fullNamespace,parent,namespaceDelimitter);
    }
  }
  return fullNamespace;
}
Program: 5193
Project: 5193
Buggy source:
public void createNamespace(String name){
  ParameterNamespace root=scenarioDefinition.getMeasurementEnvironmentDefinition().getRoot();
  ParameterNamespace namespace=EnvironmentFactory.eINSTANCE.createParameterNamespace();
  namespace.setName(name);
  root.getChildren().add(namespace);
  currentNamespace=namespace;
}

Fixed version (ground truth):
public void createNamespace(String name){
  ParameterNamespace root=scenarioDefinition.getMeasurementEnvironmentDefinition().getRoot();
  ParameterNamespace namespace=EnvironmentFactory.eINSTANCE.createParameterNamespace();
  namespace.setName(name);
  if (currentNamespace == null)   root.getChildren().add(namespace);
 else   currentNamespace.getChildren().add(namespace);
  currentNamespace=namespace;
}
Program: 5194
Project: 5194
Buggy source:
@Override public boolean addAll(Collection<? extends V> collection){
  boolean changed=false;
  boolean singleAdd=false;
  for (  V e : collection) {
    singleAdd=add(e);
    changed=changed || singleAdd;
  }
  return changed;
}

Fixed version (ground truth):
@Override public boolean addAll(Collection<? extends V> collection){
  boolean changed=false;
  boolean singleAdd=false;
  if (collection != null) {
    for (    V e : collection) {
      singleAdd=add(e);
      changed=changed || singleAdd;
    }
  }
  return changed;
}
Program: 5195
Project: 5195
Buggy source:
/** 
 * Creates a parameter value collection based on the given values.
 * @param parameterValueCollection a collection of parameter values
 * @return a parameter value collection that holds the given parameter values
 */
public static ParameterCollection<ParameterValue<?>> createParameterValueCollection(Collection<ParameterValue<?>> parameterValueCollection){
  final ParameterCollection<ParameterValue<?>> result=new ParameterCollection<ParameterValue<?>>();
  result.addAll(parameterValueCollection);
  return result;
}

Fixed version (ground truth):
/** 
 * Creates a parameter value collection based on the given values.
 * @param parameterValueCollection a collection of parameter values
 * @return a parameter value collection that holds the given parameter values
 */
public static ParameterCollection<ParameterValue<?>> createParameterValueCollection(Collection<ParameterValue<?>> parameterValueCollection){
  if (parameterValueCollection == null) {
    return null;
  }
  final ParameterCollection<ParameterValue<?>> result=new ParameterCollection<ParameterValue<?>>();
  result.addAll(parameterValueCollection);
  return result;
}
Program: 5196
Project: 5196
Buggy source:
@Override public void runExperimentSeries(ExperimentSeries expSeries,List<IParameterVariation> parameterVariations){
  initialiseExplorationStrategy(parameterVariations);
  executeExperimentSeries(expSeries.getExperimentSeriesDefinition().getExperimentTerminationCondition());
}

Fixed version (ground truth):
@Override public void runExperimentSeries(ExperimentSeriesRun expSeriesRun,List<IParameterVariation> parameterVariations){
  initialiseExplorationStrategy(parameterVariations);
  executeExperimentSeries(expSeriesRun.getExperimentSeries().getExperimentSeriesDefinition().getExperimentTerminationCondition());
}
Program: 5197
Project: 5197
Buggy source:
@Test public void testRunExperimentSeries(){
  IExtensionRegistry er=engine.getExtensionRegistry();
  IParameterVariation ipv=er.getExtensionArtifact(IParameterVariationExtension.class,VARIATION_NAME);
  assertNotNull(ipv);
  List<IParameterVariation> ipvList=new ArrayList<IParameterVariation>();
  ipvList.add(ipv);
  ExperimentSeries es=new ExperimentSeries();
  es.setName(expSeriesDef.getName());
  fes.runExperimentSeries(es,ipvList);
}

Fixed version (ground truth):
@Test public void testRunExperimentSeries(){
  IExtensionRegistry er=engine.getExtensionRegistry();
  IParameterVariation ipv=er.getExtensionArtifact(IParameterVariationExtension.class,VARIATION_NAME);
  assertNotNull(ipv);
  List<IParameterVariation> ipvList=new ArrayList<IParameterVariation>();
  ipvList.add(ipv);
  ExperimentSeries es=new ExperimentSeries();
  es.setName(expSeriesDef.getName());
  ExperimentSeriesRun esr=new ExperimentSeriesRun();
  esr.setTimestamp(System.nanoTime());
  esr.setExperimentSeries(es);
  es.getExperimentSeriesRuns().add(esr);
  fes.runExperimentSeries(esr,ipvList);
}
Program: 5198
Project: 5198
Buggy source:
@Test public void testFullExplorationStrategy(){
  Map<String,String> config=new HashMap<String,String>();
  config.put("String_Node_Str",String.valueOf(4));
  config.put("String_Node_Str",String.valueOf(28));
  config.put("String_Node_Str",String.valueOf(12));
  dva=builder.createDynamicValueAssignment(VARIATION_NAME,pdef,config);
  IParameterVariation ipv=registry.getExtensionArtifact(IParameterVariationExtension.class,VARIATION_NAME);
  assertNotNull(ipv);
  ipv.initialize(dva);
  List<IParameterVariation> ipvList=new ArrayList<IParameterVariation>();
  ipvList.add(ipv);
  IExplorationStrategy fes=registry.getExtensionArtifact(IExplorationStrategyExtension.class,FULL_EXPLORATION_STRATEGY_NAME);
  assertNotNull(fes);
  fes.setExperimentController(expController);
  ExperimentSeries es=new ExperimentSeries();
  es.setExperimentSeriesDefinition(expSeriesDef);
  es.setName(expSeriesDef.getName());
  fes.runExperimentSeries(es,ipvList);
}

Fixed version (ground truth):
@Test public void testFullExplorationStrategy(){
  Map<String,String> config=new HashMap<String,String>();
  config.put("String_Node_Str",String.valueOf(4));
  config.put("String_Node_Str",String.valueOf(28));
  config.put("String_Node_Str",String.valueOf(12));
  dva=builder.createDynamicValueAssignment(VARIATION_NAME,pdef,config);
  IParameterVariation ipv=registry.getExtensionArtifact(IParameterVariationExtension.class,VARIATION_NAME);
  assertNotNull(ipv);
  ipv.initialize(dva);
  List<IParameterVariation> ipvList=new ArrayList<IParameterVariation>();
  ipvList.add(ipv);
  IExplorationStrategy fes=registry.getExtensionArtifact(IExplorationStrategyExtension.class,FULL_EXPLORATION_STRATEGY_NAME);
  assertNotNull(fes);
  fes.setExperimentController(expController);
  ExperimentSeries es=new ExperimentSeries();
  es.setName(expSeriesDef.getName());
  fes.runExperimentSeries(es,ipvList);
}
Program: 5199
Project: 5199
Buggy source:
@Override public ScenarioInstance run(ScenarioDefinition scenario){
  ScenarioInstance scenarioInstance=new ScenarioInstance();
  scenarioInstance.setMeasurementEnvironmentUrl(getConfiguration().getProperty(IConfiguration.CONF_MEASUREMENT_CONTROLLER_URI).toString());
  scenarioInstance.setName(scenario.getName());
  persistenceProvider.store(scenarioInstance);
  experimentController.initialize(EngineTools.getConstantParameterValues(scenario.getMeasurementSpecification().getInitializationAssignemts()),scenario.getMeasurementEnvironmentDefinition());
  for (  ExperimentSeriesDefinition esd : scenario.getMeasurementSpecification().getExperimentSeriesDefinitions()) {
    ExperimentSeries series=new ExperimentSeries();
    series.setExperimentSeriesDefinition(esd);
    series.setName(esd.getName());
    series.setScenarioInstance(scenarioInstance);
    persistenceProvider.store(series);
    scenarioInstance.getExperimentSeries().add(series);
    experimentSeriesManager.runExperimentSeries(series);
  }
  try {
    ScenarioInstance loadedScenario=persistenceProvider.loadScenarioInstance(scenarioInstance.getPrimaryKey());
    return loadedScenario;
  }
 catch (  DataNotFoundException e) {
    logger.error("String_Node_Str");
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public ScenarioInstance run(ScenarioDefinition scenario){
  ScenarioInstance scenarioInstance=PersistenceProviderFactory.createScenarioInstance(scenario,getConfiguration().getProperty(IConfiguration.CONF_MEASUREMENT_CONTROLLER_URI).toString());
  persistenceProvider.store(scenarioInstance);
  experimentController.initialize(EngineTools.getConstantParameterValues(scenario.getMeasurementSpecification().getInitializationAssignemts()),scenario.getMeasurementEnvironmentDefinition());
  for (  ExperimentSeriesDefinition esd : scenario.getMeasurementSpecification().getExperimentSeriesDefinitions()) {
    ExperimentSeries series=PersistenceProviderFactory.createExperimentSeries(scenarioInstance,esd);
    persistenceProvider.store(series);
    experimentSeriesManager.runExperimentSeries(series);
  }
  try {
    ScenarioInstance loadedScenario=persistenceProvider.loadScenarioInstance(scenarioInstance.getPrimaryKey());
    return loadedScenario;
  }
 catch (  DataNotFoundException e) {
    logger.error("String_Node_Str");
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 5200
Project: 5200
Buggy source:
@Override public void prepareExperimentSeries(ExperimentSeriesRun experimentSeriesRun,Collection<ParameterValue<?>> preparationPVList){
  if (experimentSeriesRun == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.currentExperimentSeriesRun=experimentSeriesRun;
  meController.prepareExperimentSeries(preparationPVList);
  List<ParameterDefinition> observationParameterList=new ArrayList<ParameterDefinition>();
  collectObservationParameters(meDefinition.getRoot(),observationParameterList);
  meController.setObservationParameters(observationParameterList);
}

Fixed version (ground truth):
@Override public void prepareExperimentSeries(ExperimentSeriesRun experimentSeriesRun,Collection<ParameterValue<?>> preparationPVList){
  if (experimentSeriesRun == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.currentExperimentSeriesRun=experimentSeriesRun;
  meController.prepareExperimentSeries(preparationPVList);
  List<ParameterDefinition> observationParameterList=new ArrayList<ParameterDefinition>();
  ScenarioDefinitionUtil.collectObservationParameters(meDefinition.getRoot(),observationParameterList);
  meController.setObservationParameters(observationParameterList);
}
Program: 5201
Project: 5201
Buggy source:
/** 
 * Loads a SoPeCo configuration   {@link EObject} from an XMI representation.
 * @param str the XMI representation 
 * @return an {@link EObject} instance
 * @throws IOException
 */
public static EObject loadFromSting(String str) throws IOException {
  InputStream is=new ByteArrayInputStream(str.getBytes());
  EObject eObject=ModelUtils.load(is,"String_Node_Str",createSoPeCoModelResourceSet());
  return eObject;
}

Fixed version (ground truth):
/** 
 * Loads a SoPeCo configuration   {@link EObject} from an XMI representation.
 * @param str the XMI representation 
 * @return an {@link EObject} instance
 * @throws IOException
 */
public static EObject loadFromSting(String str) throws IOException {
  SoPeCoModelFactoryHandler.initFactories();
  InputStream is=new ByteArrayInputStream(str.getBytes());
  EObject eObject=ModelUtils.load(is,"String_Node_Str",createSoPeCoModelResourceSet());
  return eObject;
}
Program: 5202
Project: 5202
Buggy source:
/** 
 * Loads a SoPeCo scenario definition from the given URI.
 * @param uri URI of the scenario configuration
 * @return an instance of Scenario Definition 
 * @throws IOException 
 */
public static EObject loadFromURI(URI uri) throws IOException {
  return ModelUtils.load(uri,createSoPeCoModelResourceSet());
}

Fixed version (ground truth):
/** 
 * Loads a SoPeCo scenario definition from the given URI.
 * @param uri URI of the scenario configuration
 * @return an instance of Scenario Definition 
 * @throws IOException 
 */
public static EObject loadFromURI(URI uri) throws IOException {
  SoPeCoModelFactoryHandler.initFactories();
  return ModelUtils.load(uri,createSoPeCoModelResourceSet());
}