Program: 139348
Project: 139348
Buggy source:
private boolean checkRange(String inString){
  String[] definedRange=getDefinedRange(inString);
  if (definedRange != null && definedRange.length >= 2) {
    range="String_Node_Str" + definedRange[0] + "String_Node_Str"+ definedRange[1]+ "String_Node_Str";
    ModelElement temp=indicator.getAnalyzedElement();
    int sqltype=temp instanceof TdTable ? Types.INTEGER : ((TdColumn)temp).getJavaType();
    boolean isChildOfRange=IndicatorsPackage.eINSTANCE.getValueIndicator().isSuperTypeOf(indicator.eClass());
    if (Java2SqlType.isDateInSQL(sqltype) && isChildOfRange) {
      try {
        SimpleDateFormat format=new SimpleDateFormat("String_Node_Str");
        Date dValue=format.parse(value);
        if ("String_Node_Str".equals(definedRange[0])) {
          Date max=format.parse(definedRange[1]);
          range="String_Node_Str" + definedRange[1] + "String_Node_Str";
          return dValue.after(max);
        }
 else         if ("String_Node_Str".equals(definedRange[1])) {
          Date min=format.parse(definedRange[0]);
          range="String_Node_Str" + definedRange[0] + "String_Node_Str";
          return dValue.before(min);
        }
 else {
          Date min=format.parse(definedRange[0]);
          Date max=format.parse(definedRange[1]);
          return dValue.after(max) || dValue.before(min);
        }
      }
 catch (      Exception e) {
        log.error(e,e);
        return false;
      }
    }
 else {
      Double min=StringFormatUtil.formatDouble(definedRange[0]);
      Double max=StringFormatUtil.formatDouble(definedRange[1]);
      Double dValue=inString != null ? StringFormatUtil.parseDouble(inString) : Double.NaN;
      if (min == null || Double.isNaN(min)) {
        min=Double.NEGATIVE_INFINITY;
      }
      if (max == null || Double.isNaN(max)) {
        max=Double.POSITIVE_INFINITY;
      }
      return dValue < min || dValue > max;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean checkRange(String inString){
  String[] definedRange=getDefinedRange(inString);
  if (definedRange != null && definedRange.length >= 2) {
    range="String_Node_Str" + definedRange[0] + "String_Node_Str"+ definedRange[1]+ "String_Node_Str";
    ModelElement temp=indicator.getAnalyzedElement();
    int sqltype=temp instanceof TdTable ? Types.INTEGER : ((TdColumn)temp).getJavaType();
    boolean isChildOfRange=IndicatorsPackage.eINSTANCE.getValueIndicator().isSuperTypeOf(indicator.eClass());
    if (Java2SqlType.isDateInSQL(sqltype) && isChildOfRange) {
      try {
        SimpleDateFormat format=new SimpleDateFormat("String_Node_Str");
        Date dValue=format.parse(value);
        if ("String_Node_Str".equals(definedRange[0])) {
          Date max=format.parse(definedRange[1]);
          range="String_Node_Str" + definedRange[1] + "String_Node_Str";
          return dValue.after(max);
        }
 else         if ("String_Node_Str".equals(definedRange[1])) {
          Date min=format.parse(definedRange[0]);
          range="String_Node_Str" + definedRange[0] + "String_Node_Str";
          return dValue.before(min);
        }
 else {
          Date min=format.parse(definedRange[0]);
          Date max=format.parse(definedRange[1]);
          return dValue.after(max) || dValue.before(min);
        }
      }
 catch (      Exception e) {
        log.error(e,e);
        return false;
      }
    }
 else {
      Double min=StringFormatUtil.formatDouble(definedRange[0]);
      Double max=StringFormatUtil.formatDouble(definedRange[1]);
      Double dValue=inString != null ? StringFormatUtil.parseDouble(inString) : Double.NaN;
      if (min == null || Double.isNaN(min)) {
        min=Double.NEGATIVE_INFINITY;
      }
      if (max == null || Double.isNaN(max)) {
        max=Double.POSITIVE_INFINITY;
      }
      if (isPercent) {
        return dValue < min * 100 || dValue > max * 100;
      }
      return dValue < min || dValue > max;
    }
  }
  return false;
}