Program: 140405
Project: 140405
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 numOfBin=tempParam.getNumOfBins();
      int numOfShown=tempParam.getNumOfShown();
    double min=tempParam.getMinValue();
  double max=tempParam.getMaxValue();
Domain domain=tempParam.getUserDomian();
if (domain == null) {
domain=DomainHelper.createContiguousClosedBinsIntoDomain("String_Node_Str",numOfBin,min,max);
}
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();
IndicatorHelper.setDataThreshold(indicator,min1,max1);
IndicatorHelper.propagateDataThresholdsInChildren(indicator);
break;
case IndicatorThresholdsForm:
IndicatorThresholdsParameter indiParam=(IndicatorThresholdsParameter)formParam;
String min2=indiParam.getMinThreshold();
String max2=indiParam.getMaxThreshold();
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(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();
IndicatorHelper.setDataThreshold(indicator,min1,max1);
IndicatorHelper.propagateDataThresholdsInChildren(indicator);
break;
case IndicatorThresholdsForm:
IndicatorThresholdsParameter indiParam=(IndicatorThresholdsParameter)formParam;
String min2=indiParam.getMinThreshold();
String max2=indiParam.getMaxThreshold();
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;
}