Program: 67914
Project: 67914
Buggy source:
private String processPatternAttributes(String pattern){
  if (pattern == null || pattern.length() <= 3)   return pattern;
  int length=pattern.length();
  if (pattern.charAt(length - 1) == '}') {
    int begin=pattern.lastIndexOf('{');
    if (begin >= 0) {
      ArrayList<String> names=new ArrayList<String>();
      ArrayList<String> values=new ArrayList<String>();
      String properties=pattern.substring(begin + 1,length - 1);
      String[] attributes=properties.split("String_Node_Str");
      boolean wellForm=true;
      for (      String attribute : attributes) {
        int delimit=attribute.indexOf('=');
        if (delimit == -1) {
          wellForm=false;
          break;
        }
        names.add(attribute.substring(0,delimit));
        values.add(attribute.substring(delimit + 1));
      }
      if (wellForm) {
        int size=names.size();
        for (int index=0; index < size; index++) {
          if (DIGIT_SUBSTITUTION.equalsIgnoreCase(names.get(index).trim())) {
            String value=values.get(index).trim();
            digitSubstitution=Boolean.valueOf(value);
          }
        }
        if (begin == 0)         return null;
        return pattern.substring(0,begin);
      }
    }
  }
  return pattern;
}

Fixed version (ground truth):
private String processPatternAttributes(String pattern){
  if (pattern == null || pattern.length() <= 3)   return pattern;
  int length=pattern.length();
  if (pattern.charAt(length - 1) == '}') {
    int begin=pattern.lastIndexOf('{');
    if (begin >= 0) {
      ArrayList<String> names=new ArrayList<String>();
      ArrayList<String> values=new ArrayList<String>();
      String properties=pattern.substring(begin + 1,length - 1);
      String[] attributes=properties.split("String_Node_Str");
      boolean wellForm=true;
      for (      String attribute : attributes) {
        int delimit=attribute.indexOf('=');
        if (delimit == -1) {
          wellForm=false;
          break;
        }
        names.add(attribute.substring(0,delimit));
        values.add(attribute.substring(delimit + 1));
      }
      if (wellForm) {
        int size=names.size();
        for (int index=0; index < size; index++) {
          if (DIGIT_SUBSTITUTION.equalsIgnoreCase(names.get(index).trim())) {
            String value=values.get(index).trim();
            digitSubstitution=Boolean.valueOf(value);
          }
          if (ROUNDING_MODE.equalsIgnoreCase(names.get(index).trim())) {
            String value=values.get(index).trim();
            if (value.equalsIgnoreCase("String_Node_Str"))             roundingMode=RoundingMode.HALF_EVEN;
 else             if (value.equalsIgnoreCase("String_Node_Str"))             roundingMode=RoundingMode.HALF_UP;
 else             if (value.equalsIgnoreCase("String_Node_Str"))             roundingMode=RoundingMode.HALF_DOWN;
 else             if (value.equalsIgnoreCase("String_Node_Str"))             roundingMode=RoundingMode.UP;
 else             if (value.equalsIgnoreCase("String_Node_Str"))             roundingMode=RoundingMode.DOWN;
 else             if (value.equalsIgnoreCase("String_Node_Str"))             roundingMode=RoundingMode.FLOOR;
 else             if (value.equalsIgnoreCase("String_Node_Str"))             roundingMode=RoundingMode.CEILING;
 else             if (value.equalsIgnoreCase("String_Node_Str"))             roundingMode=RoundingMode.UNNECESSARY;
          }
        }
        if (begin == 0)         return null;
        return pattern.substring(0,begin);
      }
    }
  }
  return pattern;
}