Program: 94424
Project: 94424
Buggy source:
List<String> getInputs(String arg,boolean recurse,final Configuration conf,boolean existsCheck,boolean argIsDir){
  List<String> inputs=new LinkedList<>();
  File f;
  try {
    f=new File(new URI(arg));
  }
 catch (  URISyntaxException|IllegalArgumentException ignored) {
    f=new File(arg);
  }
  if (f.isDirectory()) {
    File[] dir=f.listFiles();
    if (dir != null) {
      for (      File s : dir) {
        try {
          if (s.isFile() || (s.isDirectory() && recurse)) {
            inputs.addAll(getInputs(s.getCanonicalFile().toURI().toString(),recurse,conf,false,s.isDirectory()));
          }
        }
 catch (        IOException ignored) {
        }
      }
    }
  }
 else   if (f.isFile()) {
    try {
      System.out.print("String_Node_Str" + f.getCanonicalPath());
      String name=f.getCanonicalFile().toURI().toString();
      if (skippreprocessing) {
        if (firstInput) {
          firstInput=false;
          Dataset dataset=GDALUtils.open(name);
          if (dataset != null) {
            try {
              calculateMinimalParams(dataset);
            }
  finally {
              GDALUtils.close(dataset);
            }
          }
        }
        inputs.add(name);
        local=true;
        System.out.println("String_Node_Str");
      }
 else {
        Dataset dataset=GDALUtils.open(name);
        if (dataset != null) {
          calculateParams(dataset);
          GDALUtils.close(dataset);
          inputs.add(name);
          local=true;
          System.out.println("String_Node_Str");
        }
 else {
          System.out.println("String_Node_Str");
        }
      }
    }
 catch (    IOException ignored) {
      System.out.println("String_Node_Str");
    }
  }
 else {
    try {
      Path p=new Path(arg);
      FileSystem fs=HadoopFileUtils.getFileSystem(conf,p);
      if (!existsCheck || fs.exists(p)) {
        boolean isADirectory=argIsDir;
        if (existsCheck) {
          FileStatus status=fs.getFileStatus(p);
          isADirectory=status.isDirectory();
        }
        if (isADirectory && recurse) {
          FileStatus[] files=fs.listStatus(p);
          for (          FileStatus file : files) {
            inputs.addAll(getInputs(file.getPath().toUri().toString(),true,conf,false,file.isDirectory()));
          }
        }
 else {
          try {
            System.out.print("String_Node_Str" + p.toString());
            String name=p.toUri().toString();
            if (skippreprocessing) {
              if (firstInput) {
                firstInput=false;
                Dataset dataset=GDALUtils.open(name);
                if (dataset != null) {
                  try {
                    calculateMinimalParams(dataset);
                  }
  finally {
                    GDALUtils.close(dataset);
                  }
                }
              }
              inputs.add(name);
              System.out.println("String_Node_Str");
            }
 else {
              Dataset dataset=GDALUtils.open(name);
              if (dataset != null) {
                calculateParams(dataset);
                GDALUtils.close(dataset);
                inputs.add(name);
                System.out.println("String_Node_Str");
              }
 else {
                System.out.println("String_Node_Str");
              }
            }
          }
 catch (          IOException ignored) {
            System.out.println("String_Node_Str");
          }
        }
      }
    }
 catch (    IOException ignored) {
    }
  }
  return inputs;
}

Fixed version (ground truth):
List<String> getInputs(String arg,boolean recurse,final Configuration conf,boolean existsCheck,boolean argIsDir){
  List<String> inputs=new LinkedList<>();
  File f;
  try {
    f=new File(new URI(arg));
  }
 catch (  URISyntaxException|IllegalArgumentException ignored) {
    f=new File(arg);
  }
  if (f.isDirectory()) {
    File[] dir=f.listFiles();
    if (dir != null) {
      for (      File s : dir) {
        try {
          if (s.isFile() || (s.isDirectory() && recurse)) {
            inputs.addAll(getInputs(s.getCanonicalFile().toURI().toString(),recurse,conf,false,s.isDirectory()));
          }
        }
 catch (        IOException ignored) {
        }
      }
    }
  }
 else   if (f.isFile()) {
    try {
      System.out.print("String_Node_Str" + f.getCanonicalPath());
      String name=f.getCanonicalFile().toURI().toString();
      if (skippreprocessing) {
        if (firstInput) {
          firstInput=false;
          Dataset dataset=GDALUtils.open(name);
          if (dataset != null) {
            try {
              calculateMinimalParams(dataset);
            }
  finally {
              GDALUtils.close(dataset);
            }
          }
        }
        inputs.add(name);
        local=true;
        System.out.println("String_Node_Str");
      }
 else {
        Dataset dataset=GDALUtils.open(name);
        if (dataset != null) {
          calculateParams(dataset);
          GDALUtils.close(dataset);
          inputs.add(name);
          local=true;
          System.out.println("String_Node_Str");
        }
 else {
          System.out.println("String_Node_Str");
        }
      }
    }
 catch (    IOException ignored) {
      System.out.println("String_Node_Str");
    }
  }
 else {
    try {
      Path p=new Path(arg);
      FileSystem fs=HadoopFileUtils.getFileSystem(conf,p);
      if (!existsCheck || fs.exists(p)) {
        boolean isADirectory=argIsDir;
        if (existsCheck) {
          FileStatus status=fs.getFileStatus(p);
          isADirectory=status.isDirectory();
        }
        if (isADirectory && recurse) {
          FileStatus[] files=fs.listStatus(p);
          for (          FileStatus file : files) {
            inputs.addAll(getInputs(file.getPath().toUri().toString(),true,conf,false,file.isDirectory()));
          }
        }
 else {
          System.out.print("String_Node_Str" + p.toString());
          String name=p.toUri().toString();
          if (skippreprocessing) {
            if (firstInput) {
              firstInput=false;
              Dataset dataset=GDALUtils.open(name);
              if (dataset != null) {
                try {
                  calculateMinimalParams(dataset);
                }
  finally {
                  GDALUtils.close(dataset);
                }
              }
            }
            inputs.add(name);
            System.out.println("String_Node_Str");
          }
 else {
            Dataset dataset=GDALUtils.open(name);
            if (dataset != null) {
              calculateParams(dataset);
              GDALUtils.close(dataset);
              inputs.add(name);
              System.out.println("String_Node_Str");
            }
 else {
              System.out.println("String_Node_Str");
            }
          }
        }
      }
    }
 catch (    IOException ignored) {
    }
  }
  return inputs;
}