Program: 129286
Project: 129286
Buggy source:
/** 
 * cli Comment method "retrieveSchemaPatternForAS400". bug 12179
 */
public static String retrieveSchemaPatternForAS400(String url){
  String libsPattern="String_Node_Str";
  Pattern regex=Pattern.compile(libsPattern + "String_Node_Str",Pattern.CANON_EQ | Pattern.CASE_INSENSITIVE);
  Matcher regexMatcher=regex.matcher(url);
  Set<String> libs=new HashSet<String>();
  while (regexMatcher.find()) {
    String str=regexMatcher.group();
    if (str != null && !"String_Node_Str".equals(str.trim())) {
      Pattern libP=Pattern.compile(libsPattern + "String_Node_Str");
      Matcher libMatcher=libP.matcher(str.trim());
      if (libMatcher.find()) {
        String libStr=libMatcher.group(1);
        if (libStr != null) {
          libStr=libStr.trim();
          if (libStr.endsWith("String_Node_Str")) {
            libStr=libStr.substring(0,libStr.length() - 1);
          }
          libStr=libStr.trim();
          if (!libStr.equals("String_Node_Str")) {
            String[] multiSchems=getMultiSchems(libStr);
            if (multiSchems != null) {
              for (              String s : multiSchems) {
                if (s != null) {
                  libs.add(s.trim());
                }
              }
            }
          }
        }
      }
    }
  }
  if (!libs.isEmpty()) {
    StringBuffer sb=new StringBuffer();
    int index=0;
    for (    String lib : libs) {
      sb.append(lib);
      if (index < libs.size() - 1) {
        sb.append(SPLIT_CHAR);
      }
      index++;
    }
    return sb.toString();
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * cli Comment method "retrieveSchemaPatternForAS400". bug 12179
 */
public static String retrieveSchemaPatternForAS400(String url){
  if (url == null || "String_Node_Str".equals(url)) {
    return null;
  }
  String libsPattern="String_Node_Str";
  Pattern regex=Pattern.compile(libsPattern + "String_Node_Str",Pattern.CANON_EQ | Pattern.CASE_INSENSITIVE);
  Matcher regexMatcher=regex.matcher(url);
  Set<String> libs=new HashSet<String>();
  while (regexMatcher.find()) {
    String str=regexMatcher.group();
    if (str != null && !"String_Node_Str".equals(str.trim())) {
      Pattern libP=Pattern.compile(libsPattern + "String_Node_Str");
      Matcher libMatcher=libP.matcher(str.trim());
      if (libMatcher.find()) {
        String libStr=libMatcher.group(1);
        if (libStr != null) {
          libStr=libStr.trim();
          if (libStr.endsWith("String_Node_Str")) {
            libStr=libStr.substring(0,libStr.length() - 1);
          }
          libStr=libStr.trim();
          if (!libStr.equals("String_Node_Str")) {
            String[] multiSchems=getMultiSchems(libStr);
            if (multiSchems != null) {
              for (              String s : multiSchems) {
                if (s != null) {
                  libs.add(s.trim());
                }
              }
            }
          }
        }
      }
    }
  }
  if (!libs.isEmpty()) {
    StringBuffer sb=new StringBuffer();
    int index=0;
    for (    String lib : libs) {
      sb.append(lib);
      if (index < libs.size() - 1) {
        sb.append(SPLIT_CHAR);
      }
      index++;
    }
    return sb.toString();
  }
 else {
    return null;
  }
}