Program: 45690
Project: 45690
Buggy source:
public void decode() throws AndrolibException, IOException {
  File outDir=getOutDir();
  if (!mForceDelete && outDir.exists()) {
    throw new OutDirExistsException();
  }
  if (!mApkFile.isFile() || !mApkFile.canRead()) {
    throw new InFileNotFoundException();
  }
  try {
    OS.rmdir(outDir);
  }
 catch (  BrutException ex) {
    throw new AndrolibException(ex);
  }
  outDir.mkdirs();
  if (hasSources()) {
switch (mDecodeSources) {
case DECODE_SOURCES_NONE:
      mAndrolib.decodeSourcesRaw(mApkFile,outDir,mDebug);
    break;
case DECODE_SOURCES_SMALI:
  mAndrolib.decodeSourcesSmali(mApkFile,outDir,mDebug,mBakDeb);
break;
case DECODE_SOURCES_JAVA:
mAndrolib.decodeSourcesJava(mApkFile,outDir,mDebug);
break;
}
}
if (hasResources()) {
ZipExtFile zef=new ZipExtFile(mApkFile.getAbsolutePath());
ZipArchiveEntry ze=zef.getEntry("String_Node_Str");
if (ze != null) {
int compression=ze.getMethod();
mCompressResources=(compression != ZipEntry.STORED) && (compression == ZipEntry.DEFLATED);
}
zef.close();
switch (mDecodeResources) {
case DECODE_RESOURCES_NONE:
mAndrolib.decodeResourcesRaw(mApkFile,outDir);
break;
case DECODE_RESOURCES_FULL:
mAndrolib.decodeResourcesFull(mApkFile,outDir,getResTable());
break;
}
}
 else {
if (hasManifest()) {
switch (mDecodeResources) {
case DECODE_RESOURCES_NONE:
mAndrolib.decodeManifestRaw(mApkFile,outDir);
break;
case DECODE_RESOURCES_FULL:
mAndrolib.decodeManifestFull(mApkFile,outDir,getResTable());
break;
}
}
}
mAndrolib.decodeRawFiles(mApkFile,outDir);
mAndrolib.decodeUnknownFiles(mApkFile,outDir,mResTable);
mAndrolib.writeOriginalFiles(mApkFile,outDir);
writeMetaFile();
}

Fixed version (ground truth):
public void decode() throws AndrolibException, IOException {
  File outDir=getOutDir();
  if (!mForceDelete && outDir.exists()) {
    throw new OutDirExistsException();
  }
  if (!mApkFile.isFile() || !mApkFile.canRead()) {
    throw new InFileNotFoundException();
  }
  try {
    OS.rmdir(outDir);
  }
 catch (  BrutException ex) {
    throw new AndrolibException(ex);
  }
  outDir.mkdirs();
  if (hasSources()) {
switch (mDecodeSources) {
case DECODE_SOURCES_NONE:
      mAndrolib.decodeSourcesRaw(mApkFile,outDir,mDebug);
    break;
case DECODE_SOURCES_SMALI:
  mAndrolib.decodeSourcesSmali(mApkFile,outDir,mDebug,mDebugLinePrefix,mBakDeb);
break;
case DECODE_SOURCES_JAVA:
mAndrolib.decodeSourcesJava(mApkFile,outDir,mDebug);
break;
}
}
if (hasResources()) {
ZipExtFile zef=new ZipExtFile(mApkFile.getAbsolutePath());
ZipArchiveEntry ze=zef.getEntry("String_Node_Str");
if (ze != null) {
int compression=ze.getMethod();
mCompressResources=(compression != ZipEntry.STORED) && (compression == ZipEntry.DEFLATED);
}
zef.close();
switch (mDecodeResources) {
case DECODE_RESOURCES_NONE:
mAndrolib.decodeResourcesRaw(mApkFile,outDir);
break;
case DECODE_RESOURCES_FULL:
mAndrolib.decodeResourcesFull(mApkFile,outDir,getResTable());
break;
}
}
 else {
if (hasManifest()) {
switch (mDecodeResources) {
case DECODE_RESOURCES_NONE:
mAndrolib.decodeManifestRaw(mApkFile,outDir);
break;
case DECODE_RESOURCES_FULL:
mAndrolib.decodeManifestFull(mApkFile,outDir,getResTable());
break;
}
}
}
mAndrolib.decodeRawFiles(mApkFile,outDir);
mAndrolib.decodeUnknownFiles(mApkFile,outDir,mResTable);
mAndrolib.writeOriginalFiles(mApkFile,outDir);
writeMetaFile();
}