Program: 55207
Project: 55207
Buggy source:
private boolean transferLibraries(SopremoPlan plan,ProgressListener progressListener){
  final JobID dummyKey=JobID.generate();
  List<String> requiredLibraries=new ArrayList<String>(plan.getRequiredPackages());
  try {
    progressListener.progressUpdate(ExecutionState.SETUP,"String_Node_Str");
    List<Path> libraryPaths=new ArrayList<Path>();
    for (    String library : requiredLibraries) {
      final Input dis=new Input(new FileInputStream(library));
      final Path libraryPath=new Path(library);
      LibraryCacheManager.addLibrary(dummyKey,libraryPath,(int)new File(library).length(),dis);
      dis.close();
      libraryPaths.add(libraryPath);
    }
    LibraryCacheManager.register(dummyKey,libraryPaths.toArray(new Path[libraryPaths.size()]));
    LibraryCacheProfileRequest request=new LibraryCacheProfileRequest();
    final String[] internalJarNames=LibraryCacheManager.getRequiredJarFiles(dummyKey);
    request.setRequiredLibraries(internalJarNames);
    LibraryCacheProfileResponse response=null;
    response=this.executor.getLibraryCacheProfile(request);
    for (int k=0; k < internalJarNames.length; k++)     if (!response.isCached(k)) {
      final String library=internalJarNames[k];
      progressListener.progressUpdate(ExecutionState.SETUP,"String_Node_Str" + requiredLibraries.get(k));
      LibraryCacheUpdate update=new LibraryCacheUpdate(library);
      this.executor.updateLibraryCache(update);
    }
    for (int index=0; index < internalJarNames.length; index++)     requiredLibraries.set(index,internalJarNames[index]);
    plan.setRequiredPackages(requiredLibraries);
    return true;
  }
 catch (  IOException e) {
    dealWithError(progressListener,e,"String_Node_Str");
    return false;
  }
 finally {
    try {
      LibraryCacheManager.unregister(dummyKey);
    }
 catch (    IOException e) {
    }
  }
}

Fixed version (ground truth):
private boolean transferLibraries(SopremoPlan plan,ProgressListener progressListener){
  final JobID dummyKey=JobID.generate();
  List<String> requiredLibraries=new ArrayList<String>(plan.getRequiredPackages());
  try {
    progressListener.progressUpdate(ExecutionState.SETUP,"String_Node_Str");
    List<Path> libraryPaths=new ArrayList<Path>();
    for (    String library : requiredLibraries) {
      final Input dis=new Input(new FileInputStream(library));
      final Path libraryPath=new Path(library);
      LibraryCacheManager.addLibrary(dummyKey,libraryPath,(int)new File(library).length(),dis);
      dis.close();
      libraryPaths.add(libraryPath);
    }
    LibraryCacheManager.register(dummyKey,libraryPaths.toArray(new Path[libraryPaths.size()]));
    LibraryCacheProfileRequest request=new LibraryCacheProfileRequest();
    final String[] internalJarNames=LibraryCacheManager.getRequiredJarFiles(dummyKey);
    request.setRequiredLibraries(internalJarNames);
    LibraryCacheProfileResponse response=null;
    response=this.executor.getLibraryCacheProfile(request);
    for (int k=0; k < internalJarNames.length; k++)     if (!response.isCached(k)) {
      final String library=internalJarNames[k];
      progressListener.progressUpdate(ExecutionState.SETUP,"String_Node_Str" + requiredLibraries.get(k));
      LibraryCacheUpdate update=new LibraryCacheUpdate(library);
      this.executor.updateLibraryCache(update);
    }
    for (int index=0; index < internalJarNames.length; index++)     requiredLibraries.set(index,internalJarNames[index]);
    plan.setRequiredPackages(requiredLibraries);
    return true;
  }
 catch (  Exception e) {
    dealWithError(progressListener,e,"String_Node_Str");
    return false;
  }
 finally {
    try {
      LibraryCacheManager.unregister(dummyKey);
    }
 catch (    IOException e) {
    }
  }
}