Program: 114908
Project: 114908
Buggy source:
/** 
 * This method decompresses API the archive
 * @param sourceFile  The archive containing the API
 * @param destination location of the archive to be extracted
 * @return Name of the extracted directory
 * @throws APIImportException If the decompressing fails
 */
public static String extractArchive(File sourceFile,String destination) throws APIImportException {
  BufferedInputStream inputStream=null;
  InputStream zipInputStream=null;
  FileOutputStream outputStream=null;
  ZipFile zip=null;
  String archiveName=null;
  try {
    zip=new ZipFile(sourceFile);
    Enumeration zipFileEntries=zip.entries();
    int index=0;
    while (zipFileEntries.hasMoreElements()) {
      ZipEntry entry=(ZipEntry)zipFileEntries.nextElement();
      String currentEntry=entry.getName();
      if (index == 0) {
        archiveName=currentEntry.substring(0,currentEntry.indexOf(File.separatorChar));
        --index;
      }
      File destinationFile=new File(destination,currentEntry);
      File destinationParent=destinationFile.getParentFile();
      if (destinationParent.mkdirs()) {
        log.info("String_Node_Str" + destinationParent.getName());
      }
      if (!entry.isDirectory()) {
        zipInputStream=zip.getInputStream(entry);
        inputStream=new BufferedInputStream(zipInputStream);
        outputStream=new FileOutputStream(destinationFile);
        IOUtils.copy(inputStream,outputStream);
      }
    }
    return archiveName;
  }
 catch (  IOException e) {
    String errorMessage="String_Node_Str";
    log.error(errorMessage,e);
    throw new APIImportException(errorMessage,e);
  }
 finally {
    IOUtils.closeQuietly(zipInputStream);
    IOUtils.closeQuietly(inputStream);
    IOUtils.closeQuietly(outputStream);
  }
}

Fixed version (ground truth):
/** 
 * This method decompresses API the archive
 * @param sourceFile  The archive containing the API
 * @param destination location of the archive to be extracted
 * @return Name of the extracted directory
 * @throws APIImportException If the decompressing fails
 */
public static String extractArchive(File sourceFile,String destination) throws APIImportException {
  BufferedInputStream inputStream=null;
  InputStream zipInputStream=null;
  FileOutputStream outputStream=null;
  ZipFile zip=null;
  String archiveName=null;
  try {
    zip=new ZipFile(sourceFile);
    Enumeration zipFileEntries=zip.entries();
    int index=0;
    while (zipFileEntries.hasMoreElements()) {
      ZipEntry entry=(ZipEntry)zipFileEntries.nextElement();
      String currentEntry=entry.getName();
      if (index == 0) {
        archiveName=currentEntry.substring(0,currentEntry.indexOf(APIImportExportConstants.ZIP_FILE_SEPARATOR));
        --index;
      }
      File destinationFile=new File(destination,currentEntry);
      File destinationParent=destinationFile.getParentFile();
      if (destinationParent.mkdirs()) {
        log.info("String_Node_Str" + destinationParent.getName());
      }
      if (!entry.isDirectory()) {
        zipInputStream=zip.getInputStream(entry);
        inputStream=new BufferedInputStream(zipInputStream);
        outputStream=new FileOutputStream(destinationFile);
        IOUtils.copy(inputStream,outputStream);
      }
    }
    return archiveName;
  }
 catch (  IOException e) {
    String errorMessage="String_Node_Str";
    log.error(errorMessage,e);
    throw new APIImportException(errorMessage,e);
  }
 finally {
    IOUtils.closeQuietly(zipInputStream);
    IOUtils.closeQuietly(inputStream);
    IOUtils.closeQuietly(outputStream);
  }
}