#vulnerable code 
                              public Toml parse(File file) {
    try {
      return parse(new Scanner(file).useDelimiter("\\Z").next());
    } catch (FileNotFoundException e) {
      throw new RuntimeException(e);
    }
  } 
                            #location 3 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              public Toml parse(File file) {
    Scanner scanner = null;
    try {
      scanner = new Scanner(file);

      return parse(scanner.useDelimiter("\\Z").next());
    } catch (FileNotFoundException e) {
      throw new RuntimeException(e);
    } finally {
      if (scanner != null) {
        scanner.close();
      }
    }
  }