#vulnerable code 
                              private static String getLine(File file, int line) throws IOException {
    BufferedReader reader = new BufferedReader(new FileReader(file));

    String msg = "";

    for (int i = 0; i <= line; i++) msg = reader.readLine();

    reader.close();

    return msg;
  } 
                            #location 10 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              private static String getLine(File file, int line) throws IOException {
    BufferedReader reader = Files.newBufferedReader(file.toPath(), Options.encoding);

    String msg = "";

    for (int i = 0; i <= line; i++) msg = reader.readLine();

    reader.close();

    return msg;
  }