Program: 88770
Project: 88770
Buggy source:
public Path extractDriver(Driver driver,Path fileToExtract) throws MojoExecutionException {
  log.info("String_Node_Str" + fileToExtract);
  String fileExtension=FilenameUtils.getExtension(fileToExtract.toString());
  try {
switch (fileExtension) {
case "String_Node_Str":
      String extractedFilename=FilenameUtils.getBaseName(fileToExtract.toString());
    Path extractedFile=Paths.get(tempDirectory.getPath(),extractedFilename);
  try (FileInputStream fin=new FileInputStream(fileToExtract.toFile())){
    try (BufferedInputStream bin=new BufferedInputStream(fin)){
      try (BZip2CompressorInputStream input=new BZip2CompressorInputStream(bin)){
        FileUtils.copyInputStreamToFile(input,extractedFile.toFile());
      }
     }
   }
 if (keepDownloadedWebdrivers && !fileToExtract.toString().contains(Paths.get("String_Node_Str","String_Node_Str").toString())) {
  FileUtils.forceDelete(fileToExtract.toFile());
}
return extractDriver(driver,extractedFile);
case "String_Node_Str":
case "String_Node_Str":
Path extractToDirectory=Paths.get(tempDirectory.getPath(),FilenameUtils.getBaseName(fileToExtract.toString()));
if (!extractToDirectory.toFile().mkdirs()) {
throw new MojoExecutionException("String_Node_Str" + extractToDirectory + "String_Node_Str");
}
Pattern pattern=null;
if (null != driver.getFileMatchInside()) {
pattern=Pattern.compile(driver.getFileMatchInside());
}
try (FileInputStream fin=new FileInputStream(fileToExtract.toFile())){
try (BufferedInputStream bin=new BufferedInputStream(fin)){
try (ArchiveInputStream aiStream=new ArchiveStreamFactory().createArchiveInputStream(fileExtension,bin)){
ArchiveEntry entry;
while ((entry=aiStream.getNextEntry()) != null) {
String name=entry.getName();
if (pattern != null && entry.isDirectory()) {
}
 else if (entry.isDirectory()) {
File directory=new File(extractToDirectory.toFile(),name);
if (!directory.mkdirs()) {
throw new MojoExecutionException("String_Node_Str" + directory);
}
}
 else {
File file=null;
if (entry instanceof TarArchiveEntry) {
TarArchiveEntry archiveEntry=(TarArchiveEntry)entry;
if (archiveEntry.isFile()) {
  file=new File(extractToDirectory.toFile(),name);
}
}
 else if (entry instanceof ZipArchiveEntry) {
ZipArchiveEntry archiveEntry=(ZipArchiveEntry)entry;
if (!archiveEntry.isUnixSymlink()) {
  file=new File(extractToDirectory.toFile(),name);
}
}
if (pattern != null) {
if (pattern.matcher(name).matches()) {
  file=new File(extractToDirectory.toFile(),FilenameUtils.getName(name));
}
 else {
  file=null;
}
}
if (file != null) {
try (OutputStream out=new FileOutputStream(file)){
  IOUtils.copy(aiStream,out);
}
 }
}
}
if (keepDownloadedWebdrivers && !fileToExtract.toString().contains(Paths.get("String_Node_Str","String_Node_Str").toString())) {
FileUtils.forceDelete(fileToExtract.toFile());
}
return extractToDirectory;
}
 catch (ArchiveException e) {
throw new MojoExecutionException(e.getMessage(),e);
}
}
 }
 default :
throw new MojoExecutionException("String_Node_Str" + fileExtension);
}
}
 catch (MojoExecutionException e) {
log.info("String_Node_Str" + e.getMessage() + "String_Node_Str"+ driver,e);
throw e;
}
catch (Exception e) {
log.info("String_Node_Str" + e.getMessage() + "String_Node_Str"+ driver,e);
throw new MojoExecutionException("String_Node_Str" + e.getMessage() + "String_Node_Str"+ driver,e);
}
}

Fixed version (ground truth):
public Path extractDriver(Driver driver,Path fileToExtract) throws MojoExecutionException {
  log.info("String_Node_Str" + fileToExtract);
  String fileExtension=FilenameUtils.getExtension(fileToExtract.toString());
  try {
switch (fileExtension) {
case "String_Node_Str":
      String extractedFilename=FilenameUtils.getBaseName(fileToExtract.toString());
    Path extractedFile=Paths.get(tempDirectory.getPath(),extractedFilename);
  try (FileInputStream fin=new FileInputStream(fileToExtract.toFile())){
    try (BufferedInputStream bin=new BufferedInputStream(fin)){
      try (BZip2CompressorInputStream input=new BZip2CompressorInputStream(bin)){
        FileUtils.copyInputStreamToFile(input,extractedFile.toFile());
      }
     }
   }
 if (!fileToExtract.toString().contains(Paths.get("String_Node_Str","String_Node_Str").toString())) {
  FileUtils.forceDelete(fileToExtract.toFile());
}
return extractDriver(driver,extractedFile);
case "String_Node_Str":
case "String_Node_Str":
Path extractToDirectory=Paths.get(tempDirectory.getPath(),FilenameUtils.getBaseName(fileToExtract.toString()));
if (!extractToDirectory.toFile().mkdirs()) {
throw new MojoExecutionException("String_Node_Str" + extractToDirectory + "String_Node_Str");
}
Pattern pattern=null;
if (null != driver.getFileMatchInside()) {
pattern=Pattern.compile(driver.getFileMatchInside());
}
try (FileInputStream fin=new FileInputStream(fileToExtract.toFile())){
try (BufferedInputStream bin=new BufferedInputStream(fin)){
try (ArchiveInputStream aiStream=new ArchiveStreamFactory().createArchiveInputStream(fileExtension,bin)){
ArchiveEntry entry;
while ((entry=aiStream.getNextEntry()) != null) {
String name=entry.getName();
if (pattern != null && entry.isDirectory()) {
}
 else if (entry.isDirectory()) {
File directory=new File(extractToDirectory.toFile(),name);
if (!directory.mkdirs()) {
throw new MojoExecutionException("String_Node_Str" + directory);
}
}
 else {
File file=null;
if (entry instanceof TarArchiveEntry) {
TarArchiveEntry archiveEntry=(TarArchiveEntry)entry;
if (archiveEntry.isFile()) {
  file=new File(extractToDirectory.toFile(),name);
}
}
 else if (entry instanceof ZipArchiveEntry) {
ZipArchiveEntry archiveEntry=(ZipArchiveEntry)entry;
if (!archiveEntry.isUnixSymlink()) {
  file=new File(extractToDirectory.toFile(),name);
}
}
if (pattern != null) {
if (pattern.matcher(name).matches()) {
  file=new File(extractToDirectory.toFile(),FilenameUtils.getName(name));
}
 else {
  file=null;
}
}
if (file != null) {
try (OutputStream out=new FileOutputStream(file)){
  IOUtils.copy(aiStream,out);
}
 }
}
}
if (!fileToExtract.toString().contains(Paths.get("String_Node_Str","String_Node_Str").toString())) {
FileUtils.forceDelete(fileToExtract.toFile());
}
return extractToDirectory;
}
 catch (ArchiveException e) {
throw new MojoExecutionException(e.getMessage(),e);
}
}
 }
 default :
throw new MojoExecutionException("String_Node_Str" + fileExtension);
}
}
 catch (MojoExecutionException e) {
log.info("String_Node_Str" + e.getMessage() + "String_Node_Str"+ driver,e);
throw e;
}
catch (Exception e) {
log.info("String_Node_Str" + e.getMessage() + "String_Node_Str"+ driver,e);
throw new MojoExecutionException("String_Node_Str" + e.getMessage() + "String_Node_Str"+ driver,e);
}
}