Program: 140542
Project: 140542
Buggy source:
@Override public boolean performFinish(){
  try {
    IndicatorParameters paramters=indicatorUnit.getIndicator().getParameters();
    if (paramters == null) {
      isDirty=true;
      paramters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
      indicatorUnit.getIndicator().setParameters(paramters);
    }
    TextParameters textParameters=paramters.getTextParameter();
    if (textParameters == null) {
      isDirty=true;
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
      paramters.setTextParameter(textParameters);
    }
    for (    AbstractIndicatorParameter parameter : AbstractIndicatorForm.getParameters()) {
      if (parameter.getFormEnum() == FormEnum.BinsDesignerForm) {
        BinsDesignerParameter tempParam=(BinsDesignerParameter)parameter;
        int numOfBin=tempParam.getNumOfBins();
        int numOfShown=tempParam.getNumOfShown();
        double min=tempParam.getMinValue();
        double max=tempParam.getMaxValue();
        Domain domain=DomainHelper.createContiguousClosedBinsIntoDomain("String_Node_Str",numOfBin,min,max);
        Domain bins=paramters.getBins();
        boolean same=true;
        if (bins != null) {
          EList<RangeRestriction> ranges=bins.getRanges();
          EList<RangeRestriction> ranges2=domain.getRanges();
          if (ranges.size() != ranges2.size()) {
            same=false;
          }
          for (int i=0; i < ranges2.size() && same; i++) {
            RangeRestriction d2=ranges2.get(i);
            RangeRestriction d1=ranges.get(i);
            double v1=((RealNumberValue)d1.getLowerValue()).getValue();
            double v2=((RealNumberValue)d2.getLowerValue()).getValue();
            if (v1 != v2) {
              same=false;
              break;
            }
            v1=((RealNumberValue)d1.getUpperValue()).getValue();
            v2=((RealNumberValue)d2.getUpperValue()).getValue();
            if (v1 != v2) {
              same=false;
              break;
            }
          }
        }
 else         if (!domain.getRanges().isEmpty()) {
          same=false;
        }
        if (paramters.getTopN() != tempParam.getNumOfShown()) {
          same=false;
        }
        if (!same) {
          isDirty=true;
          paramters.setBins(domain);
          paramters.setTopN(numOfShown);
        }
      }
      if (parameter.getFormEnum() == FormEnum.TextParametersForm) {
        TextParameter tempParam=(TextParameter)parameter;
        int numOfShown=paramters.getTopN();
        if (textParameters.isIgnoreCase() != tempParam.isIngoreCase() || numOfShown != tempParam.getNumOfShown()) {
          isDirty=true;
          textParameters.setIgnoreCase(tempParam.isIngoreCase());
          paramters.setTopN(tempParam.getNumOfShown());
        }
      }
      if (parameter.getFormEnum() == FormEnum.TextLengthForm) {
        TextLengthParameter tempParam=(TextLengthParameter)parameter;
        if (textParameters.isUseBlank() != tempParam.isUseBlank()) {
          isDirty=true;
          textParameters.setUseBlank(tempParam.isUseBlank());
        }
        if (textParameters.isUseNulls() != tempParam.isUseNull()) {
          isDirty=true;
          textParameters.setUseNulls(tempParam.isUseNull());
        }
      }
      if (parameter.getFormEnum() == FormEnum.DataThresholdsForm) {
        DataThresholdsParameter tempParam=(DataThresholdsParameter)parameter;
        String min=tempParam.getMinThreshold();
        String max=tempParam.getMaxThreshold();
        isDirty=indicatorUnit.getIndicator().getParameters() == null;
        if (!isDirty) {
          Domain validDomain=paramters.getDataValidDomain();
          isDirty=validDomain == null;
          if (!isDirty) {
            int size=validDomain.getRanges().size();
            isDirty=size != 1;
            if (!isDirty) {
              RangeRestriction rr=validDomain.getRanges().get(0);
              TextValue lv=(TextValue)rr.getLowerValue();
              TextValue uv=(TextValue)rr.getUpperValue();
              if (!min.equals(lv.getValue())) {
                isDirty=true;
              }
              if (!max.equals(uv.getValue())) {
                isDirty=true;
              }
            }
          }
        }
        if (isDirty) {
          IndicatorHelper.setDataThreshold(indicatorUnit.getIndicator(),min,max);
        }
      }
      if (parameter.getFormEnum() == FormEnum.IndicatorThresholdsForm) {
        IndicatorThresholdsParameter tempParam=(IndicatorThresholdsParameter)parameter;
        String min=tempParam.getMinThreshold();
        String max=tempParam.getMaxThreshold();
        isDirty=indicatorUnit.getIndicator().getParameters() == null;
        if (!isDirty) {
          Domain validDomain=paramters.getDataValidDomain();
          isDirty=validDomain == null;
          if (!isDirty) {
            int size=validDomain.getRanges().size();
            isDirty=size != 1;
            if (!isDirty) {
              RangeRestriction rr=validDomain.getRanges().get(0);
              TextValue lv=(TextValue)rr.getLowerValue();
              TextValue uv=(TextValue)rr.getUpperValue();
              if (!min.equals(lv.getValue())) {
                isDirty=true;
              }
              if (!max.equals(uv.getValue())) {
                isDirty=true;
              }
            }
          }
        }
        if (isDirty) {
          IndicatorHelper.setIndicatorThreshold(indicator.getParameters(),min,max);
        }
      }
      if (parameter.getFormEnum() == FormEnum.TimeSlicesForm) {
        DateParameters dateParameters=paramters.getDateParameters();
        if (dateParameters == null) {
          dateParameters=IndicatorsFactory.eINSTANCE.createDateParameters();
          paramters.setDateParameters(dateParameters);
          isDirty=true;
        }
        TimeSlicesParameter tempParam=(TimeSlicesParameter)parameter;
        DateGrain dateGrain=DateGrain.get(tempParam.getDataUnit());
        int numOfShown=paramters.getTopN();
        if (dateGrain.compareTo(dateParameters.getDateAggregationType()) != 0 || numOfShown != tempParam.getNumOfShown()) {
          isDirty=true;
          numOfShown=tempParam.getNumOfShown();
          dateParameters.setDateAggregationType(dateGrain);
          paramters.setTopN(numOfShown);
        }
      }
    }
    return true;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  try {
    IndicatorParameters paramters=indicatorUnit.getIndicator().getParameters();
    if (paramters == null) {
      isDirty=true;
      paramters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
      indicatorUnit.getIndicator().setParameters(paramters);
    }
    TextParameters textParameters=paramters.getTextParameter();
    for (    AbstractIndicatorParameter parameter : AbstractIndicatorForm.getParameters()) {
      if (parameter.getFormEnum() == FormEnum.BinsDesignerForm) {
        BinsDesignerParameter tempParam=(BinsDesignerParameter)parameter;
        int numOfBin=tempParam.getNumOfBins();
        int numOfShown=tempParam.getNumOfShown();
        double min=tempParam.getMinValue();
        double max=tempParam.getMaxValue();
        Domain domain=DomainHelper.createContiguousClosedBinsIntoDomain("String_Node_Str",numOfBin,min,max);
        Domain bins=paramters.getBins();
        boolean same=true;
        if (bins != null) {
          EList<RangeRestriction> ranges=bins.getRanges();
          EList<RangeRestriction> ranges2=domain.getRanges();
          if (ranges.size() != ranges2.size()) {
            same=false;
          }
          for (int i=0; i < ranges2.size() && same; i++) {
            RangeRestriction d2=ranges2.get(i);
            RangeRestriction d1=ranges.get(i);
            double v1=((RealNumberValue)d1.getLowerValue()).getValue();
            double v2=((RealNumberValue)d2.getLowerValue()).getValue();
            if (v1 != v2) {
              same=false;
              break;
            }
            v1=((RealNumberValue)d1.getUpperValue()).getValue();
            v2=((RealNumberValue)d2.getUpperValue()).getValue();
            if (v1 != v2) {
              same=false;
              break;
            }
          }
        }
 else         if (!domain.getRanges().isEmpty()) {
          same=false;
        }
        if (paramters.getTopN() != tempParam.getNumOfShown()) {
          same=false;
        }
        if (!same) {
          isDirty=true;
          paramters.setBins(domain);
          paramters.setTopN(numOfShown);
        }
      }
      if (parameter.getFormEnum() == FormEnum.TextParametersForm) {
        if (textParameters == null) {
          isDirty=true;
          textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
          paramters.setTextParameter(textParameters);
        }
        TextParameter tempParam=(TextParameter)parameter;
        int numOfShown=paramters.getTopN();
        if (textParameters.isIgnoreCase() != tempParam.isIngoreCase() || numOfShown != tempParam.getNumOfShown()) {
          isDirty=true;
          textParameters.setIgnoreCase(tempParam.isIngoreCase());
          paramters.setTopN(tempParam.getNumOfShown());
        }
      }
      if (parameter.getFormEnum() == FormEnum.TextLengthForm) {
        if (textParameters == null) {
          isDirty=true;
          textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
          paramters.setTextParameter(textParameters);
        }
        TextLengthParameter tempParam=(TextLengthParameter)parameter;
        if (textParameters.isUseBlank() != tempParam.isUseBlank()) {
          isDirty=true;
          textParameters.setUseBlank(tempParam.isUseBlank());
        }
        if (textParameters.isUseNulls() != tempParam.isUseNull()) {
          isDirty=true;
          textParameters.setUseNulls(tempParam.isUseNull());
        }
      }
      if (parameter.getFormEnum() == FormEnum.DataThresholdsForm) {
        DataThresholdsParameter tempParam=(DataThresholdsParameter)parameter;
        String min=tempParam.getMinThreshold();
        String max=tempParam.getMaxThreshold();
        isDirty=indicatorUnit.getIndicator().getParameters() == null;
        if (!isDirty) {
          Domain validDomain=paramters.getDataValidDomain();
          isDirty=validDomain == null;
          if (!isDirty) {
            int size=validDomain.getRanges().size();
            isDirty=size != 1;
            if (!isDirty) {
              RangeRestriction rr=validDomain.getRanges().get(0);
              TextValue lv=(TextValue)rr.getLowerValue();
              TextValue uv=(TextValue)rr.getUpperValue();
              if (!min.equals(lv.getValue())) {
                isDirty=true;
              }
              if (!max.equals(uv.getValue())) {
                isDirty=true;
              }
            }
          }
        }
        if (isDirty) {
          IndicatorHelper.setDataThreshold(indicatorUnit.getIndicator(),min,max);
        }
      }
      if (parameter.getFormEnum() == FormEnum.IndicatorThresholdsForm) {
        IndicatorThresholdsParameter tempParam=(IndicatorThresholdsParameter)parameter;
        String min=tempParam.getMinThreshold();
        String max=tempParam.getMaxThreshold();
        isDirty=indicatorUnit.getIndicator().getParameters() == null;
        if (!isDirty) {
          Domain validDomain=paramters.getDataValidDomain();
          isDirty=validDomain == null;
          if (!isDirty) {
            int size=validDomain.getRanges().size();
            isDirty=size != 1;
            if (!isDirty) {
              RangeRestriction rr=validDomain.getRanges().get(0);
              TextValue lv=(TextValue)rr.getLowerValue();
              TextValue uv=(TextValue)rr.getUpperValue();
              if (!min.equals(lv.getValue())) {
                isDirty=true;
              }
              if (!max.equals(uv.getValue())) {
                isDirty=true;
              }
            }
          }
        }
        if (isDirty) {
          IndicatorHelper.setIndicatorThreshold(indicator.getParameters(),min,max);
        }
      }
      if (parameter.getFormEnum() == FormEnum.TimeSlicesForm) {
        DateParameters dateParameters=paramters.getDateParameters();
        if (dateParameters == null) {
          dateParameters=IndicatorsFactory.eINSTANCE.createDateParameters();
          paramters.setDateParameters(dateParameters);
          isDirty=true;
        }
        TimeSlicesParameter tempParam=(TimeSlicesParameter)parameter;
        DateGrain dateGrain=DateGrain.get(tempParam.getDataUnit());
        int numOfShown=paramters.getTopN();
        if (dateGrain.compareTo(dateParameters.getDateAggregationType()) != 0 || numOfShown != tempParam.getNumOfShown()) {
          isDirty=true;
          numOfShown=tempParam.getNumOfShown();
          dateParameters.setDateAggregationType(dateGrain);
          paramters.setTopN(numOfShown);
        }
      }
    }
    return true;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return false;
}