Program: 4475
Project: 4475
Buggy source:
public void managedRun(){
  LOG.trace("String_Node_Str");
  final String UPDATE="String_Node_Str";
  String ip=c.getAddress();
  int port=c.getPort();
  String connectTo="String_Node_Str" + ip + "String_Node_Str"+ port+ UPDATE;
  HttpMethod get=new GetMethod(connectTo);
  get.addRequestHeader("String_Node_Str","String_Node_Str");
  get.addRequestHeader("String_Node_Str",CommonUtils.getHttpServer());
  get.addRequestHeader(HTTPHeaderName.CONNECTION.httpStringValue(),"String_Node_Str");
  HttpClient client=HttpClientManager.getNewClient();
  try {
    client.executeMethod(get);
    byte[] data=get.getResponseBody();
    if (data == null)     return;
    UpdateMessageVerifier verifier=new UpdateMessageVerifier(data,false);
    if (!verifier.verifySource())     return;
    LOG.trace("String_Node_Str");
    String xml=new String(verifier.getMessageBytes(),"String_Node_Str");
    UpdateFileParser parser=new UpdateFileParser(xml);
    if (LOG.isTraceEnabled())     LOG.trace("String_Node_Str" + parser.getVersion());
    String newVersion=parser.getVersion();
    if (newVersion == null)     return;
    if (isGreaterVersion(newVersion,myversion)) {
      LOG.trace("String_Node_Str");
synchronized (UpdateManager.this) {
        commitVersionFile(data);
        latestVersion=newVersion;
        if (LOG.isTraceEnabled())         LOG.trace("String_Node_Str" + latestVersion);
      }
      String runningVersion=CommonUtils.getLimeWireVersion();
      if (!isGreaterVersion(newVersion,runningVersion))       return;
      RouterService.getCallback().indicateNewVersion();
    }
  }
 catch (  IOException iox) {
    return;
  }
catch (  SAXException sx) {
    return;
  }
catch (  Throwable t) {
    ErrorService.error(t);
  }
 finally {
    if (get != null)     get.releaseConnection();
  }
}

Fixed version (ground truth):
public void managedRun(){
  LOG.trace("String_Node_Str");
  final String UPDATE="String_Node_Str";
  String ip=c.getAddress();
  int port=c.getPort();
  String connectTo="String_Node_Str" + ip + "String_Node_Str"+ port+ UPDATE;
  HttpMethod get=new GetMethod(connectTo);
  get.addRequestHeader("String_Node_Str","String_Node_Str");
  get.addRequestHeader("String_Node_Str",CommonUtils.getHttpServer());
  get.addRequestHeader(HTTPHeaderName.CONNECTION.httpStringValue(),"String_Node_Str");
  HttpClient client=HttpClientManager.getNewClient();
  try {
    client.executeMethod(get);
    byte[] data=get.getResponseBody();
    if (data == null)     return;
    UpdateMessageVerifier verifier=new UpdateMessageVerifier(data,false);
    if (!verifier.verifySource())     return;
    LOG.trace("String_Node_Str");
    String xml=new String(verifier.getMessageBytes(),"String_Node_Str");
    UpdateFileParser parser=new UpdateFileParser(xml);
    if (LOG.isTraceEnabled())     LOG.trace("String_Node_Str" + parser.getVersion());
    String newVersion=parser.getVersion();
    if (newVersion == null)     return;
    if (isGreaterVersion(newVersion,myversion)) {
      LOG.trace("String_Node_Str");
synchronized (UpdateManager.this) {
        commitVersionFile(data);
        latestVersion=newVersion;
        if (LOG.isTraceEnabled())         LOG.trace("String_Node_Str" + latestVersion);
      }
      String runningVersion=CommonUtils.getLimeWireVersion();
      if (!isGreaterVersion(newVersion,runningVersion))       return;
      long makeTime=parser.getTimestamp();
      if (makeTime == -1)       makeTime=System.currentTimeMillis();
      if (System.currentTimeMillis() < makeTime + SEVEN_HOURS) {
        Random rand=new Random();
        long sleep=rand.nextLong() % SEVEN_HOURS;
        if (sleep < 0)         sleep=-1 * sleep;
        try {
          Thread.sleep(sleep);
        }
 catch (        InterruptedException ignored) {
        }
      }
      RouterService.getCallback().indicateNewVersion();
    }
  }
 catch (  IOException iox) {
    return;
  }
catch (  SAXException sx) {
    return;
  }
catch (  Throwable t) {
    ErrorService.error(t);
  }
 finally {
    if (get != null)     get.releaseConnection();
  }
}