Program: 20766
Project: 20766
Buggy source:
private void getFileFromRepository(String path,ProxiedArtifactRepository repository,String repositoryCachePath,ProxyInfo httpProxy,File target) throws ProxyException {
  boolean connected=false;
  Map checksums=null;
  Wagon wagon=null;
  try {
    String protocol=repository.getRepository().getProtocol();
    wagon=(Wagon)wagons.get(protocol);
    if (wagon == null) {
      throw new ProxyException("String_Node_Str" + protocol);
    }
    checksums=prepareChecksumListeners(wagon);
    connected=connectToRepository(wagon,repository,httpProxy);
    if (connected) {
      File temp=new File(target.getAbsolutePath() + "String_Node_Str");
      temp.deleteOnExit();
      int tries=0;
      boolean success;
      do {
        tries++;
        getLogger().debug("String_Node_Str" + path + "String_Node_Str"+ repository.getName()+ "String_Node_Str");
        if (!target.exists()) {
          wagon.get(path,temp);
        }
 else {
          wagon.getIfNewer(path,temp,target.lastModified());
        }
        success=checkChecksum(checksums,path,wagon,repositoryCachePath);
        if (tries > 1 && !success) {
          throw new TransferFailedException("String_Node_Str" + path);
        }
        if (temp.exists()) {
          moveTempToTarget(temp,target);
        }
      }
 while (!success);
    }
  }
 catch (  TransferFailedException e) {
    String message="String_Node_Str" + repository.getName() + "String_Node_Str"+ e.getMessage();
    processRepositoryFailure(repository,message,e);
  }
catch (  AuthorizationException e) {
    String message="String_Node_Str" + repository.getName() + "String_Node_Str"+ e.getMessage();
    processRepositoryFailure(repository,message,e);
  }
catch (  ResourceDoesNotExistException e) {
    getLogger().debug("String_Node_Str" + repository.getName() + "String_Node_Str"+ e.getMessage());
  }
 finally {
    if (wagon != null && checksums != null) {
      releaseChecksumListeners(wagon,checksums);
    }
    if (connected) {
      disconnectWagon(wagon);
    }
  }
}

Fixed version (ground truth):
private void getFileFromRepository(String path,ProxiedArtifactRepository repository,String repositoryCachePath,ProxyInfo httpProxy,File target) throws ProxyException {
  boolean connected=false;
  Map checksums=null;
  Wagon wagon=null;
  try {
    String protocol=repository.getRepository().getProtocol();
    wagon=(Wagon)wagons.get(protocol);
    if (wagon == null) {
      throw new ProxyException("String_Node_Str" + protocol);
    }
    checksums=prepareChecksumListeners(wagon);
    connected=connectToRepository(wagon,repository,httpProxy);
    if (connected) {
      File temp=new File(target.getAbsolutePath() + "String_Node_Str");
      temp.deleteOnExit();
      int tries=0;
      boolean success;
      do {
        tries++;
        getLogger().debug("String_Node_Str" + path + "String_Node_Str"+ repository.getName()+ "String_Node_Str");
        if (!target.exists()) {
          wagon.get(path,temp);
        }
 else {
          wagon.getIfNewer(path,temp,target.lastModified());
        }
        success=checkChecksum(checksums,path,wagon,repositoryCachePath);
        if (tries > 1 && !success) {
          processRepositoryFailure(repository,"String_Node_Str" + path);
          return;
        }
        if (temp.exists()) {
          moveTempToTarget(temp,target);
        }
      }
 while (!success);
    }
  }
 catch (  TransferFailedException e) {
    processRepositoryFailure(repository,e);
  }
catch (  AuthorizationException e) {
    processRepositoryFailure(repository,e);
  }
catch (  ResourceDoesNotExistException e) {
    getLogger().debug("String_Node_Str" + repository.getName() + "String_Node_Str"+ e.getMessage());
  }
 finally {
    if (wagon != null && checksums != null) {
      releaseChecksumListeners(wagon,checksums);
    }
    if (connected) {
      disconnectWagon(wagon);
    }
  }
}