Program: 94767
Project: 94767
Buggy source:
private void sendBug(ID roomID,String target,String number,String comment){
  String urlString=BUG_DATABASE_PREFIX + number;
  if (comment != null) {
    urlString=urlString + "String_Node_Str" + comment;
  }
  if (target == null) {
    try {
      HttpURLConnection hURL=(HttpURLConnection)new URL(BUG_DATABASE_PREFIX + number + BUG_DATABASE_POSTFIX).openConnection();
      hURL.setAllowUserInteraction(true);
      hURL.connect();
      BufferedReader reader=new BufferedReader(new InputStreamReader(hURL.getInputStream()));
      StringBuffer buffer=new StringBuffer();
      try {
        if (hURL.getResponseCode() != HttpURLConnection.HTTP_OK) {
          sendMessage(roomID,NLS.bind(CustomMessages.Bug,number,urlString));
          return;
        }
        String input=reader.readLine();
        buffer.append(input);
        while (input.indexOf(SUM_CLOSE_TAG) == -1) {
          input=reader.readLine();
          buffer.append(input);
        }
        hURL.disconnect();
      }
 catch (      EOFException e) {
        hURL.disconnect();
        sendMessage(roomID,NLS.bind(CustomMessages.Bug,number,urlString));
        e.printStackTrace();
        return;
      }
      String webPage=buffer.toString();
      int summaryStartIndex=webPage.indexOf(SUM_OPEN_TAG);
      int summaryEndIndex=webPage.indexOf(SUM_CLOSE_TAG,summaryStartIndex);
      if (summaryStartIndex != -1 & summaryEndIndex != -1) {
        String summary=webPage.substring(summaryStartIndex + SUM_OPEN_TAG.length(),summaryEndIndex);
        sendMessage(roomID,NLS.bind(CustomMessages.getString(CustomMessages.BugContent),new Object[]{number,xmlDecode(summary),urlString}));
      }
 else {
        sendMessage(roomID,NLS.bind(CustomMessages.getString(CustomMessages.BugContent),new Object[]{number,urlString}));
      }
    }
 catch (    IOException e) {
      sendMessage(roomID,NLS.bind(CustomMessages.getString(CustomMessages.Bug),new Object[]{number,urlString}));
      e.printStackTrace();
    }
  }
 else {
    try {
      HttpURLConnection hURL=(HttpURLConnection)new URL(BUG_DATABASE_PREFIX + number + BUG_DATABASE_POSTFIX).openConnection();
      hURL.setAllowUserInteraction(true);
      hURL.connect();
      BufferedReader reader=new BufferedReader(new InputStreamReader(hURL.getInputStream()));
      StringBuffer buffer=new StringBuffer();
      try {
        if (hURL.getResponseCode() != HttpURLConnection.HTTP_OK) {
          sendMessage(roomID,NLS.bind(CustomMessages.getString(CustomMessages.Bug_Reply),new Object[]{target,number,urlString}));
          return;
        }
        String input=reader.readLine();
        buffer.append(input);
        while (input.indexOf(SUM_CLOSE_TAG) == -1) {
          input=reader.readLine();
          buffer.append(input);
        }
        hURL.disconnect();
      }
 catch (      EOFException e) {
        hURL.disconnect();
        sendMessage(roomID,NLS.bind(CustomMessages.getString(CustomMessages.Bug_Reply),new Object[]{target,number,urlString}));
        return;
      }
      String webPage=buffer.toString();
      int summaryStartIndex=webPage.indexOf(SUM_OPEN_TAG);
      int summaryEndIndex=webPage.indexOf(SUM_CLOSE_TAG,summaryStartIndex);
      if (summaryStartIndex != -1 & summaryEndIndex != -1) {
        String summary=webPage.substring(summaryStartIndex + SUM_OPEN_TAG.length(),summaryEndIndex);
        sendMessage(roomID,NLS.bind(CustomMessages.getString(CustomMessages.BugContent_Reply),new Object[]{target,number,xmlDecode(summary),urlString}));
      }
 else {
        sendMessage(roomID,NLS.bind(CustomMessages.getString(CustomMessages.BugContent_Reply),new Object[]{target,number,urlString}));
      }
    }
 catch (    IOException e) {
      sendMessage(roomID,NLS.bind(CustomMessages.getString(CustomMessages.getString(CustomMessages.Bug_Reply)),new Object[]{target,number,urlString}));
    }
  }
}

Fixed version (ground truth):
private void sendBug(ID roomID,String target,String number,String comment){
  String urlString=BUG_DATABASE_PREFIX + number;
  if (comment != null) {
    urlString=urlString + "String_Node_Str" + comment;
  }
  try {
    HttpURLConnection hURL=(HttpURLConnection)new URL(BUG_DATABASE_PREFIX + number + BUG_DATABASE_POSTFIX).openConnection();
    hURL.setAllowUserInteraction(true);
    hURL.connect();
    BufferedReader reader=new BufferedReader(new InputStreamReader(hURL.getInputStream()));
    StringBuffer buffer=new StringBuffer();
    try {
      if (hURL.getResponseCode() != HttpURLConnection.HTTP_OK) {
        sendMessage(roomID,(target != null ? target + "String_Node_Str" : "String_Node_Str") + NLS.bind(CustomMessages.Bug,number,urlString));
        return;
      }
      String input=reader.readLine();
      buffer.append(input);
      while (input != null && input.indexOf(SUM_CLOSE_TAG) == -1) {
        if (input.indexOf(BUG_NOT_FOUND_TAG) >= 0) {
          sendMessage(roomID,(target != null ? target + "String_Node_Str" : "String_Node_Str") + NLS.bind(CustomMessages.getString(CustomMessages.Bug_Not_Found),number));
          return;
        }
        input=reader.readLine();
        buffer.append(input);
      }
      hURL.disconnect();
    }
 catch (    EOFException e) {
      hURL.disconnect();
      sendMessage(roomID,(target != null ? target + "String_Node_Str" : "String_Node_Str") + NLS.bind(CustomMessages.Bug,number,urlString));
      e.printStackTrace();
      return;
    }
    String webPage=buffer.toString();
    int summaryStartIndex=webPage.indexOf(SUM_OPEN_TAG);
    int summaryEndIndex=webPage.indexOf(SUM_CLOSE_TAG,summaryStartIndex);
    if (summaryStartIndex != -1 & summaryEndIndex != -1) {
      String summary=webPage.substring(summaryStartIndex + SUM_OPEN_TAG.length(),summaryEndIndex);
      sendMessage(roomID,(target != null ? target + "String_Node_Str" : "String_Node_Str") + NLS.bind(CustomMessages.getString(CustomMessages.BugContent),new Object[]{number,xmlDecode(summary),urlString}));
    }
 else {
      sendMessage(roomID,(target != null ? target + "String_Node_Str" : "String_Node_Str") + NLS.bind(CustomMessages.getString(CustomMessages.BugContent),new Object[]{number,urlString}));
    }
  }
 catch (  IOException e) {
    sendMessage(roomID,(target != null ? target + "String_Node_Str" : "String_Node_Str") + NLS.bind(CustomMessages.getString(CustomMessages.Bug),new Object[]{number,urlString}));
    e.printStackTrace();
  }
}