#vulnerable code 
                              void convert(File file, byte[] input) throws IOException {
    ByteArrayInputStream bais = new ByteArrayInputStream(input);
    Reader reader = new InputStreamReader(bais);
    BufferedReader breader = new BufferedReader(reader);
    FileWriter fileWriter = new FileWriter(file);
    while (true) {
      String line = breader.readLine();
      if (line != null) {
        String[] replacement = lineConverter.getReplacement(line);
        writeReplacement(fileWriter, replacement);
      } else {
        fileWriter.close();
        break;
      }
    }
  } 
                            #location 14 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              InplaceFileConverter(RuleSet ruleSet) {
    this.lineConverter = new LineConverter(ruleSet);
    lineTerminator = System.getProperty("line.separator");
  }