Program: 140248
Project: 140248
Buggy source:
@Override public boolean performFinish(){
  try {
    IndicatorParameters parameters=indicator.getParameters();
    if (parameters == null) {
      isDirty=true;
      parameters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
      indicator.setParameters(parameters);
    }
    DateParameters dateParameters=parameters.getDateParameters();
    TextParameters textParameters=parameters.getTextParameter();
    for (    AbstractIndicatorParameter formParam : AbstractIndicatorForm.getParameters()) {
      if (!ParamCompareFactory.compare(parameters,formParam)) {
        isDirty=true;
switch (formParam.getFormEnum()) {
case BinsDesignerForm:
          BinsDesignerParameter tempParam=(BinsDesignerParameter)formParam;
        int numOfShown=tempParam.getNumOfShown();
      Domain domain=tempParam.getUserDomian();
    if (domain.getRanges().size() == 0) {
      parameters.setBins(null);
    }
 else {
      parameters.setBins(domain);
    }
  parameters.setTopN(numOfShown);
break;
case TextParametersForm:
if (textParameters == null) {
textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
parameters.setTextParameter(textParameters);
}
TextParameter textParam=(TextParameter)formParam;
textParameters.setIgnoreCase(textParam.isIngoreCase());
parameters.setTopN(textParam.getNumOfShown());
break;
case TextLengthForm:
if (textParameters == null) {
textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
parameters.setTextParameter(textParameters);
}
TextLengthParameter lengthParam=(TextLengthParameter)formParam;
textParameters.setUseBlank(lengthParam.isUseBlank());
textParameters.setUseNulls(lengthParam.isUseNull());
break;
case DataThresholdsForm:
DataThresholdsParameter dataParam=(DataThresholdsParameter)formParam;
String min1=dataParam.getMinThreshold();
String max1=dataParam.getMaxThreshold();
if ("String_Node_Str".equals(min1) && "String_Node_Str".equals(max1)) {
parameters.setDataValidDomain(null);
}
 else {
IndicatorHelper.setDataThreshold(indicator,min1,max1);
IndicatorHelper.propagateDataThresholdsInChildren(indicator);
}
break;
case IndicatorThresholdsForm:
IndicatorThresholdsParameter indiParam=(IndicatorThresholdsParameter)formParam;
String min2=indiParam.getMinThreshold();
String max2=indiParam.getMaxThreshold();
if ("String_Node_Str".equals(min2) && "String_Node_Str".equals(max2)) {
parameters.setIndicatorValidDomain(null);
}
 else {
IndicatorHelper.setIndicatorThreshold(parameters,min2,max2);
}
break;
case TimeSlicesForm:
TimeSlicesParameter timeParam=(TimeSlicesParameter)formParam;
DateGrain dateGrain=DateGrain.get(timeParam.getDataUnit());
dateParameters.setDateAggregationType(dateGrain);
parameters.setTopN(timeParam.getNumOfShown());
break;
case NumbericNominalForm:
NumbericNominalParameter numbParam=(NumbericNominalParameter)formParam;
parameters.setTopN(numbParam.getNumberOfShown());
break;
case ExpectedValueForm:
ExpectedValueParameter expectedParam=(ExpectedValueParameter)formParam;
IndicatorHelper.setIndicatorExpectedValue(parameters,expectedParam.getExpectedValue());
default :
}
}
}
return true;
}
 catch (Exception e) {
e.printStackTrace();
}
return false;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  try {
    IndicatorParameters parameters=indicator.getParameters();
    if (parameters == null) {
      isDirty=true;
      parameters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
      indicator.setParameters(parameters);
    }
    DateParameters dateParameters=parameters.getDateParameters();
    TextParameters textParameters=parameters.getTextParameter();
    for (    AbstractIndicatorParameter formParam : AbstractIndicatorForm.getParameters()) {
      if (!ParamCompareFactory.compare(parameters,formParam)) {
        isDirty=true;
switch (formParam.getFormEnum()) {
case BinsDesignerForm:
          BinsDesignerParameter tempParam=(BinsDesignerParameter)formParam;
        int numOfShown=tempParam.getNumOfShown();
      Domain domain=tempParam.getUserDomian();
    if (domain.getRanges().size() == 0) {
      parameters.setBins(null);
    }
 else {
      parameters.setBins(domain);
    }
  parameters.setTopN(numOfShown);
break;
case TextParametersForm:
if (textParameters == null) {
textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
parameters.setTextParameter(textParameters);
}
TextParameter textParam=(TextParameter)formParam;
textParameters.setIgnoreCase(textParam.isIngoreCase());
parameters.setTopN(textParam.getNumOfShown());
break;
case TextLengthForm:
if (textParameters == null) {
textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
parameters.setTextParameter(textParameters);
}
TextLengthParameter lengthParam=(TextLengthParameter)formParam;
textParameters.setUseBlank(lengthParam.isUseBlank());
textParameters.setUseNulls(lengthParam.isUseNull());
break;
case DataThresholdsForm:
DataThresholdsParameter dataParam=(DataThresholdsParameter)formParam;
String min1=dataParam.getMinThreshold();
String max1=dataParam.getMaxThreshold();
if ("String_Node_Str".equals(min1) && "String_Node_Str".equals(max1)) {
parameters.setDataValidDomain(null);
}
 else {
IndicatorHelper.setDataThreshold(indicator,min1,max1);
IndicatorHelper.propagateDataThresholdsInChildren(indicator);
}
break;
case IndicatorThresholdsForm:
IndicatorThresholdsParameter indiParam=(IndicatorThresholdsParameter)formParam;
String min2=indiParam.getMinThreshold();
String max2=indiParam.getMaxThreshold();
if ("String_Node_Str".equals(min2) && "String_Node_Str".equals(max2)) {
parameters.setIndicatorValidDomain(null);
}
 else {
IndicatorHelper.setIndicatorThreshold(parameters,min2,max2);
}
break;
case TimeSlicesForm:
TimeSlicesParameter timeParam=(TimeSlicesParameter)formParam;
DateGrain dateGrain=DateGrain.get(timeParam.getDataUnit());
dateParameters.setDateAggregationType(dateGrain);
parameters.setTopN(timeParam.getNumOfShown());
break;
case NumbericNominalForm:
NumbericNominalParameter numbParam=(NumbericNominalParameter)formParam;
parameters.setTopN(numbParam.getNumberOfShown());
break;
case ExpectedValueForm:
ExpectedValueParameter expectedParam=(ExpectedValueParameter)formParam;
IndicatorHelper.setIndicatorExpectedValue(parameters,expectedParam.getExpectedValue());
break;
default :
}
}
}
return true;
}
 catch (Exception e) {
e.printStackTrace();
}
return false;
}