Program: 21291
Project: 21291
Buggy source:
/** 
 * Sucht alle Links heraus
 * @param data ist der Quelltext einer Html-Datei
 * @param url der Link von dem der Quelltext stammt (um die base automatisch zu setzen)
 * @return Linkliste aus data extrahiert
 */
public static String[] getHttpLinks(String data,String url){
  String[] protocols=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String protocolPattern="String_Node_Str";
  for (int i=0; i < protocols.length; i++) {
    protocolPattern+=protocols[i] + (i + 1 == protocols.length ? "String_Node_Str" : "String_Node_Str");
  }
  url=url == null ? "String_Node_Str" : url;
  Matcher m;
  String link;
  String basename="String_Node_Str";
  String host="String_Node_Str";
  LinkedList<String> set=new LinkedList<String>();
  Pattern[] basePattern=new Pattern[]{Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)};
  for (  Pattern element : basePattern) {
    m=element.matcher(data);
    if (m.find()) {
      url=Encoding.htmlDecode(m.group(1));
      break;
    }
  }
  if (url != null) {
    url=url.replace("String_Node_Str","String_Node_Str");
    int dot=url.lastIndexOf('/');
    if (dot != -1) {
      basename=url.substring(0,dot + 1);
    }
 else {
      basename="String_Node_Str" + url + "String_Node_Str";
    }
    dot=url.indexOf('/');
    if (dot != -1) {
      host="String_Node_Str" + url.substring(0,dot);
    }
 else {
      host="String_Node_Str" + url;
    }
    url="String_Node_Str" + url;
  }
 else {
    url="String_Node_Str";
  }
  Pattern[] linkAndFormPattern=new Pattern[]{Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)};
  for (  Pattern element : linkAndFormPattern) {
    m=element.matcher(data);
    while (m.find()) {
      link=Encoding.htmlDecode(m.group(1));
      link=link.replaceAll(protocols[0] + "String_Node_Str","String_Node_Str");
      if (link.length() > 6 && link.substring(0,7).equals("String_Node_Str")) {
        ;
      }
 else       if (link.length() > 0) {
        if (link.length() > 2 && link.substring(0,3).equals("String_Node_Str")) {
          link="String_Node_Str" + link;
        }
        if (link.charAt(0) == '/') {
          link=host + link;
        }
 else         if (link.charAt(0) == '#') {
          link=url + link;
        }
 else {
          link=basename + link;
        }
      }
      if (!set.contains(link)) {
        set.add(link);
      }
    }
  }
  data=data.replaceAll("String_Node_Str","String_Node_Str");
  data=data.replaceAll("String_Node_Str","String_Node_Str");
  m=Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE).matcher(data);
  while (m.find()) {
    link="String_Node_Str" + m.group(0);
    link=Encoding.htmlDecode(link);
    link=link.replaceAll(protocols[0] + "String_Node_Str","String_Node_Str");
    if (!set.contains(link)) {
      set.add(link);
    }
  }
  m=Pattern.compile(protocolPattern + "String_Node_Str",Pattern.CASE_INSENSITIVE).matcher(data);
  while (m.find()) {
    link=m.group(0);
    link=Encoding.htmlDecode(link);
    link=link.replaceAll(protocols[0] + "String_Node_Str","String_Node_Str");
    if (!set.contains(link)) {
      set.add(link);
    }
  }
  return set.toArray(new String[set.size()]);
}

Fixed version (ground truth):
/** 
 * Sucht alle Links heraus
 * @param data ist der Quelltext einer Html-Datei
 * @param url der Link von dem der Quelltext stammt (um die base automatisch zu setzen)
 * @return Linkliste aus data extrahiert
 */
public static String[] getHttpLinks(String data,String url){
  data=data.trim();
  String[] protocols=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String protocolPattern="String_Node_Str";
  for (int i=0; i < protocols.length; i++) {
    protocolPattern+=protocols[i] + (i + 1 == protocols.length ? "String_Node_Str" : "String_Node_Str");
  }
  url=url == null ? "String_Node_Str" : url;
  Matcher m;
  String link;
  String basename="String_Node_Str";
  String host="String_Node_Str";
  LinkedList<String> set=new LinkedList<String>();
  Pattern[] basePattern=new Pattern[]{Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)};
  for (  Pattern element : basePattern) {
    m=element.matcher(data);
    if (m.find()) {
      url=Encoding.htmlDecode(m.group(1));
      break;
    }
  }
  if (url != null) {
    url=url.replace("String_Node_Str","String_Node_Str");
    int dot=url.lastIndexOf('/');
    if (dot != -1) {
      basename=url.substring(0,dot + 1);
    }
 else {
      basename="String_Node_Str" + url + "String_Node_Str";
    }
    dot=url.indexOf('/');
    if (dot != -1) {
      host="String_Node_Str" + url.substring(0,dot);
    }
 else {
      host="String_Node_Str" + url;
    }
    url="String_Node_Str" + url;
  }
 else {
    url="String_Node_Str";
  }
  Pattern[] linkAndFormPattern=new Pattern[]{Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE),Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)};
  for (  Pattern element : linkAndFormPattern) {
    m=element.matcher(data);
    while (m.find()) {
      link=Encoding.htmlDecode(m.group(1));
      link=link.replaceAll(protocols[0] + "String_Node_Str","String_Node_Str");
      if (link.length() > 6 && link.substring(0,7).equals("String_Node_Str")) {
        ;
      }
 else       if (link.length() > 0) {
        if (link.length() > 2 && link.substring(0,3).equals("String_Node_Str")) {
          link="String_Node_Str" + link;
        }
        if (link.charAt(0) == '/') {
          link=host + link;
        }
 else         if (link.charAt(0) == '#') {
          link=url + link;
        }
 else {
          link=basename + link;
        }
      }
      link=link.trim();
      if (!set.contains(link)) {
        set.add(link);
      }
    }
  }
  data=data.replaceAll("String_Node_Str","String_Node_Str");
  data=data.replaceAll("String_Node_Str","String_Node_Str");
  m=Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE).matcher(data);
  while (m.find()) {
    link="String_Node_Str" + m.group(0);
    link=Encoding.htmlDecode(link);
    link=link.replaceAll(protocols[0] + "String_Node_Str","String_Node_Str");
    link=link.trim();
    if (!set.contains(link)) {
      set.add(link);
    }
  }
  m=Pattern.compile(protocolPattern + "String_Node_Str",Pattern.CASE_INSENSITIVE).matcher(data);
  while (m.find()) {
    link=m.group(0);
    link=Encoding.htmlDecode(link);
    link=link.replaceAll(protocols[0] + "String_Node_Str","String_Node_Str");
    link=link.trim();
    if (!set.contains(link)) {
      set.add(link);
    }
  }
  return set.toArray(new String[set.size()]);
}