Program: 81478
Project: 81478
Buggy source:
public void run(){
  String header=null;
  HashMap<String,String> headers=new HashMap<String,String>();
  String url=null;
  String method=null;
  try {
    String[] requestLine=this.fromClient.readLine().split("String_Node_Str");
    method=requestLine[0].trim().toUpperCase();
    url=requestLine[1].trim();
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str");
    e.printStackTrace();
    return;
  }
  System.out.println("String_Node_Str" + method + "String_Node_Str"+ url);
  try {
    do {
      header=this.fromClient.readLine().trim();
      int splitPoint=header.indexOf("String_Node_Str");
      if (splitPoint != -1) {
        headers.put(header.substring(0,splitPoint).toLowerCase().trim(),header.substring(splitPoint + 1).trim());
      }
    }
 while (header.length() > 0);
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str");
    e.printStackTrace();
    return;
  }
  Matcher skinMatcher=MineProxy.SKIN_URL.matcher(url);
  Matcher cloakMatcher=MineProxy.CLOAK_URL.matcher(url);
  Matcher getversionMatcher=MineProxy.GETVERSION_URL.matcher(url);
  Matcher joinserverMatcher=MineProxy.JOINSERVER_URL.matcher(url);
  Matcher checkserverMatcher=MineProxy.CHECKSERVER_URL.matcher(url);
  byte[] data=null;
  String params;
  if (skinMatcher.matches()) {
    System.out.println("String_Node_Str");
    String username=skinMatcher.group(1);
    if (this.proxy.skinCache.containsKey(username)) {
      System.out.println("String_Node_Str");
      data=this.proxy.skinCache.get(username);
    }
 else {
      url="String_Node_Str" + MineProxy.authServer + "String_Node_Str"+ username+ "String_Node_Str";
      System.out.println("String_Node_Str" + url);
      data=getRequest(url);
      System.out.println("String_Node_Str" + data.length);
      this.proxy.skinCache.put(username,data);
    }
  }
 else   if (cloakMatcher.matches()) {
    System.out.println("String_Node_Str");
    String username=cloakMatcher.group(1);
    if (this.proxy.cloakCache.containsKey(username)) {
      System.out.println("String_Node_Str");
      data=this.proxy.cloakCache.get(username);
    }
 else {
      url="String_Node_Str" + MineProxy.authServer + "String_Node_Str"+ username;
      System.out.println("String_Node_Str" + url);
      data=getRequest(url);
      System.out.println("String_Node_Str" + data.length);
      this.proxy.cloakCache.put(username,data);
    }
  }
 else   if (getversionMatcher.matches()) {
    System.out.println("String_Node_Str");
    url="String_Node_Str" + MineProxy.authServer + "String_Node_Str"+ this.proxy.version;
    System.out.println("String_Node_Str" + url);
    try {
      int postlen=Integer.parseInt(headers.get("String_Node_Str"));
      char[] postdata=new char[postlen];
      this.fromClient.read(postdata);
      data=postRequest(url,new String(postdata),"String_Node_Str");
    }
 catch (    IOException e) {
      System.out.println("String_Node_Str");
      e.printStackTrace();
    }
  }
 else   if (joinserverMatcher.matches()) {
    System.out.println("String_Node_Str");
    params=joinserverMatcher.group(1);
    url="String_Node_Str" + MineProxy.authServer + "String_Node_Str"+ params;
    System.out.println("String_Node_Str" + url);
    data=getRequest(url);
    System.out.println(data);
  }
 else   if (checkserverMatcher.matches()) {
    System.out.println("String_Node_Str");
    params=checkserverMatcher.group(1);
    url="String_Node_Str" + MineProxy.authServer + "String_Node_Str"+ params;
    System.out.println("String_Node_Str" + url);
    data=getRequest(url);
    System.out.println(data);
  }
 else {
    System.out.println("String_Node_Str");
    try {
      if (!url.startsWith("String_Node_Str") && !url.startsWith("String_Node_Str")) {
        url="String_Node_Str" + url;
      }
      URL u=new URL(url);
      if (method.equals("String_Node_Str")) {
        int port=u.getPort();
        if (port == -1)         port=80;
        Socket sock=new Socket(u.getHost(),port);
        Streams.pipeStreamsActive(sock.getInputStream(),this.toClient);
        Streams.pipeStreamsActive(this.connection.getInputStream(),sock.getOutputStream());
      }
 else       if (method.equals("String_Node_Str")) {
        HttpURLConnection c=(HttpURLConnection)u.openConnection(Proxy.NO_PROXY);
        c.setRequestMethod("String_Node_Str");
        for (        String k : headers.keySet()) {
          c.setRequestProperty(k,headers.get(k));
        }
        String res="String_Node_Str" + c.getResponseCode() + "String_Node_Str"+ c.getResponseMessage()+ "String_Node_Str";
        res+="String_Node_Str";
        java.util.Map<String,java.util.List<String>> h=c.getHeaderFields();
        headerloop:         for (        String k : h.keySet()) {
          if (k == null)           continue;
          k=k.trim();
          for (          String forbiddenHeader : BLACKLISTED_HEADERS) {
            if (k.equalsIgnoreCase(forbiddenHeader))             continue headerloop;
          }
          java.util.List<String> vals=h.get(k);
          for (          String v : vals) {
            res+=k + "String_Node_Str" + v+ "String_Node_Str";
          }
        }
        res+="String_Node_Str";
        this.toClient.writeBytes(res);
        int size=Streams.pipeStreams(c.getInputStream(),this.toClient);
        this.toClient.close();
        this.connection.close();
        System.out.println("String_Node_Str" + size);
      }
 else       if (method.equals("String_Node_Str")) {
        HttpURLConnection c=(HttpURLConnection)u.openConnection(Proxy.NO_PROXY);
        c.setRequestMethod("String_Node_Str");
        for (        String k : headers.keySet()) {
          c.setRequestProperty(k,headers.get(k));
        }
        String res="String_Node_Str" + c.getResponseCode() + "String_Node_Str"+ c.getResponseMessage()+ "String_Node_Str";
        res+="String_Node_Str";
        java.util.Map<String,java.util.List<String>> h=c.getHeaderFields();
        for (        String k : h.keySet()) {
          if (k == null)           continue;
          java.util.List<String> vals=h.get(k);
          for (          String v : vals) {
            res+=k + "String_Node_Str" + v+ "String_Node_Str";
          }
        }
        res+="String_Node_Str";
        this.toClient.writeBytes(res);
        this.toClient.close();
        this.connection.close();
      }
 else {
        System.out.println("String_Node_Str" + method);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return;
  }
  try {
    if (data != null) {
      this.toClient.writeBytes("String_Node_Str" + data.length + "String_Node_Str");
      this.toClient.write(data);
    }
    this.toClient.close();
    this.connection.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void run(){
  HashMap<String,String> headers=new HashMap<String,String>();
  String url=null;
  String method=null;
  String[] requestLine=readLines(fromClient,1)[0].split("String_Node_Str");
  method=requestLine[0].trim().toUpperCase();
  url=requestLine[1].trim();
  System.out.println("String_Node_Str" + method + "String_Node_Str"+ url);
  String header;
  do {
    header=readLines(fromClient,1)[0].trim();
    int splitPoint=header.indexOf(':');
    if (splitPoint != -1) {
      headers.put(header.substring(0,splitPoint).toLowerCase().trim(),header.substring(splitPoint + 1).trim());
    }
  }
 while (header.length() > 0);
  Matcher skinMatcher=MineProxy.SKIN_URL.matcher(url);
  Matcher cloakMatcher=MineProxy.CLOAK_URL.matcher(url);
  Matcher getversionMatcher=MineProxy.GETVERSION_URL.matcher(url);
  Matcher joinserverMatcher=MineProxy.JOINSERVER_URL.matcher(url);
  Matcher checkserverMatcher=MineProxy.CHECKSERVER_URL.matcher(url);
  byte[] data=null;
  String contentType=null;
  String params;
  if (skinMatcher.matches()) {
    System.out.println("String_Node_Str");
    String username=skinMatcher.group(1);
    if (proxy.skinCache.containsKey(username)) {
      System.out.println("String_Node_Str");
      data=proxy.skinCache.get(username);
    }
 else {
      url="String_Node_Str" + MineProxy.authServer + "String_Node_Str"+ username+ "String_Node_Str";
      System.out.println("String_Node_Str" + url);
      data=getRequest(url);
      System.out.println("String_Node_Str" + data.length);
      proxy.skinCache.put(username,data);
    }
  }
 else   if (cloakMatcher.matches()) {
    System.out.println("String_Node_Str");
    String username=cloakMatcher.group(1);
    if (proxy.cloakCache.containsKey(username)) {
      System.out.println("String_Node_Str");
      data=proxy.cloakCache.get(username);
    }
 else {
      url="String_Node_Str" + MineProxy.authServer + "String_Node_Str"+ username;
      System.out.println("String_Node_Str" + url);
      data=getRequest(url);
      System.out.println("String_Node_Str" + data.length);
      proxy.cloakCache.put(username,data);
    }
  }
 else   if (getversionMatcher.matches()) {
    System.out.println("String_Node_Str");
    url="String_Node_Str" + MineProxy.authServer + "String_Node_Str"+ proxy.version;
    System.out.println("String_Node_Str" + url);
    try {
      int postlen=Integer.parseInt(headers.get("String_Node_Str"));
      char[] postdata=new char[postlen];
      InputStreamReader reader=new InputStreamReader(fromClient);
      reader.read(postdata);
      data=postRequest(url,new String(postdata),"String_Node_Str");
    }
 catch (    IOException e) {
      System.out.println("String_Node_Str");
      e.printStackTrace();
    }
  }
 else   if (joinserverMatcher.matches()) {
    System.out.println("String_Node_Str");
    params=joinserverMatcher.group(1);
    url="String_Node_Str" + MineProxy.authServer + "String_Node_Str"+ params;
    System.out.println("String_Node_Str" + url);
    data=getRequest(url);
    contentType="String_Node_Str";
  }
 else   if (checkserverMatcher.matches()) {
    System.out.println("String_Node_Str");
    params=checkserverMatcher.group(1);
    url="String_Node_Str" + MineProxy.authServer + "String_Node_Str"+ params;
    System.out.println("String_Node_Str" + url);
    data=getRequest(url);
  }
 else {
    System.out.println("String_Node_Str");
    try {
      if (!url.startsWith("String_Node_Str") && !url.startsWith("String_Node_Str")) {
        url="String_Node_Str" + url;
      }
      URL u=new URL(url);
      if (method.equals("String_Node_Str")) {
        int port=u.getPort();
        if (port == -1)         port=80;
        Socket sock=new Socket(u.getHost(),port);
        Streams.pipeStreamsActive(sock.getInputStream(),toClient);
        Streams.pipeStreamsActive(connection.getInputStream(),sock.getOutputStream());
      }
 else       if (method.equals("String_Node_Str") || method.equals("String_Node_Str")) {
        HttpURLConnection c=(HttpURLConnection)u.openConnection(Proxy.NO_PROXY);
        c.setRequestMethod(method);
        boolean post=method.equals("String_Node_Str");
        for (        String k : headers.keySet()) {
          c.setRequestProperty(k,headers.get(k));
        }
        if (post) {
          c.setDoInput(true);
          c.setDoOutput(true);
          c.setUseCaches(false);
          c.connect();
          int postlen=Integer.parseInt(headers.get("String_Node_Str"));
          byte[] postdata=new byte[postlen];
          fromClient.read(postdata);
          DataOutputStream os=new DataOutputStream(c.getOutputStream());
          os.write(postdata);
        }
        String res="String_Node_Str" + c.getResponseCode() + "String_Node_Str"+ c.getResponseMessage()+ "String_Node_Str";
        res+="String_Node_Str";
        java.util.Map<String,java.util.List<String>> h=c.getHeaderFields();
        headerloop:         for (        String k : h.keySet()) {
          if (k == null)           continue;
          k=k.trim();
          for (          String forbiddenHeader : BLACKLISTED_HEADERS) {
            if (k.equalsIgnoreCase(forbiddenHeader))             continue headerloop;
          }
          java.util.List<String> vals=h.get(k);
          for (          String v : vals) {
            res+=k + "String_Node_Str" + v+ "String_Node_Str";
          }
        }
        res+="String_Node_Str";
        toClient.writeBytes(res);
        int size=Streams.pipeStreams(c.getInputStream(),toClient);
        toClient.close();
        connection.close();
        System.out.println("String_Node_Str" + size);
      }
 else       if (method.equals("String_Node_Str")) {
        HttpURLConnection c=(HttpURLConnection)u.openConnection(Proxy.NO_PROXY);
        c.setRequestMethod("String_Node_Str");
        for (        String k : headers.keySet()) {
          c.setRequestProperty(k,headers.get(k));
        }
        String res="String_Node_Str" + c.getResponseCode() + "String_Node_Str"+ c.getResponseMessage()+ "String_Node_Str";
        res+="String_Node_Str";
        java.util.Map<String,java.util.List<String>> h=c.getHeaderFields();
        for (        String k : h.keySet()) {
          if (k == null)           continue;
          java.util.List<String> vals=h.get(k);
          for (          String v : vals) {
            res+=k + "String_Node_Str" + v+ "String_Node_Str";
          }
        }
        res+="String_Node_Str";
        toClient.writeBytes(res);
        toClient.close();
        connection.close();
      }
 else {
        System.out.println("String_Node_Str" + method);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return;
  }
  try {
    if (data != null) {
      toClient.writeBytes("String_Node_Str" + data.length + "String_Node_Str");
      if (contentType != null) {
        toClient.writeBytes("String_Node_Str" + contentType);
      }
      toClient.writeBytes("String_Node_Str");
      toClient.write(data);
      toClient.flush();
    }
    fromClient.close();
    toClient.close();
    connection.close();
    System.out.println(data.length);
    System.out.println(new String(data));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}