#vulnerable code 
                              private String readFile(File input) throws IOException {
    BufferedReader bufferedReader = new BufferedReader(new FileReader(input));

    StringBuilder w = new StringBuilder();
    String line = bufferedReader.readLine();
    while (line != null) {
      w.append(line).append('\n');
      line = bufferedReader.readLine();
    }

    return w.toString();
  } 
                            #location 11 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              private String readFile(File input) throws IOException {
    BufferedReader bufferedReader = new BufferedReader(new FileReader(input));

    try {
      StringBuilder w = new StringBuilder();
      String line = bufferedReader.readLine();
      while (line != null) {
        w.append(line).append('\n');
        line = bufferedReader.readLine();
      }

      return w.toString();
    } finally {
      bufferedReader.close();
    }
  }