Program: 4758
Project: 4758
Buggy source:
public void run(){
  debug("String_Node_Str");
  final String UPDATE="String_Node_Str";
  String ip=c.getOrigHost();
  int port=c.getOrigPort();
  byte[] data=null;
  try {
    URL url=new URL("String_Node_Str",ip,port,UPDATE);
    HttpURLConnection connection=(HttpURLConnection)url.openConnection();
    connection.setUseCaches(false);
    connection.setRequestProperty("String_Node_Str",CommonUtils.getHttpServer());
    connection.setRequestProperty(HTTPHeaderName.CONNECTION.httpStringValue(),"String_Node_Str");
    connection.setRequestProperty("String_Node_Str","String_Node_Str");
    InputStream in=connection.getInputStream();
    int len=connection.getContentLength();
    debug("String_Node_Str" + len);
    data=new byte[len];
    int BUF_LEN=1024;
    byte[] buf=new byte[BUF_LEN];
    int iters=len % BUF_LEN == 0 ? len / BUF_LEN : (len / BUF_LEN) + 1;
    ByteReader byteReader=new ByteReader(in);
    int totalRead=0;
    for (int i=0; i < iters; i++) {
      int left=len - totalRead;
      int a=byteReader.read(buf,0,Math.min(BUF_LEN,left));
      if (a == -1)       break;
      System.arraycopy(buf,0,data,totalRead,a);
      totalRead+=a;
    }
    UpdateMessageVerifier verifier=new UpdateMessageVerifier(data);
    boolean verified=verifier.verifySource();
    if (!verified) {
      debug("String_Node_Str");
      return;
    }
    debug("String_Node_Str");
    String xml=new String(verifier.getMessageBytes(),"String_Node_Str");
    UpdateFileParser parser=new UpdateFileParser(xml);
    debug("String_Node_Str" + parser.getVersion());
    String newVersion=parser.getVersion();
    if (newVersion == null)     return;
    if (isGreaterVersion(newVersion,latestVersion)) {
synchronized (UpdateManager.this) {
        commitVersionFile(data);
        latestVersion=newVersion;
      }
    }
  }
 catch (  Exception e) {
    return;
  }
}

Fixed version (ground truth):
public void run(){
  debug("String_Node_Str");
  final String UPDATE="String_Node_Str";
  String ip=c.getOrigHost();
  int port=c.getOrigPort();
  byte[] data=null;
  try {
    URL url=new URL("String_Node_Str",ip,port,UPDATE);
    HttpURLConnection connection=(HttpURLConnection)url.openConnection();
    connection.setUseCaches(false);
    connection.setRequestProperty("String_Node_Str",CommonUtils.getHttpServer());
    connection.setRequestProperty(HTTPHeaderName.CONNECTION.httpStringValue(),"String_Node_Str");
    connection.setRequestProperty("String_Node_Str","String_Node_Str");
    InputStream in=connection.getInputStream();
    int len=connection.getContentLength();
    debug("String_Node_Str" + len);
    data=new byte[len];
    int BUF_LEN=1024;
    byte[] buf=new byte[BUF_LEN];
    int iters=len % BUF_LEN == 0 ? len / BUF_LEN : (len / BUF_LEN) + 1;
    ByteReader byteReader=new ByteReader(in);
    int totalRead=0;
    for (int i=0; i < iters; i++) {
      int left=len - totalRead;
      int a=byteReader.read(buf,0,Math.min(BUF_LEN,left));
      if (a == -1)       break;
      System.arraycopy(buf,0,data,totalRead,a);
      totalRead+=a;
    }
    UpdateMessageVerifier verifier=new UpdateMessageVerifier(data);
    boolean verified=verifier.verifySource();
    if (!verified) {
      debug("String_Node_Str");
      return;
    }
    debug("String_Node_Str");
    String xml=new String(verifier.getMessageBytes(),"String_Node_Str");
    UpdateFileParser parser=new UpdateFileParser(xml);
    debug("String_Node_Str" + parser.getVersion());
    String newVersion=parser.getVersion();
    if (newVersion == null)     return;
    if (isGreaterVersion(newVersion,latestVersion)) {
      debug("String_Node_Str");
synchronized (UpdateManager.this) {
        commitVersionFile(data);
        latestVersion=newVersion;
        debug("String_Node_Str" + latestVersion);
      }
    }
  }
 catch (  Exception e) {
    return;
  }
}