output: #fixed code
                                  CppGenerator(String name, ArrayList<JFile> ilist, ArrayList<JRecord> rlist,
              File outputDirectory)
       {
          this.outputDirectory = outputDirectory;
          mName = (new File(name)).getName();
          mInclFiles = ilist;
          mRecList = rlist;
      }
input: #vulnerable code 
                                  void genCode() throws IOException {
          outputDirectory.mkdirs();
          FileWriter cc = new FileWriter(new File(outputDirectory, mName+".cc"));
          FileWriter hh = new FileWriter(new File(outputDirectory, mName+".hh"));
          hh.write("#ifndef __"+mName.toUpperCase().replace('.','_')+"__\n");
          hh.write("#define __"+mName.toUpperCase().replace('.','_')+"__\n");
          
          hh.write("#include \"recordio.hh\"\n");
          for (Iterator i = mInclFiles.iterator(); i.hasNext();) {
              JFile f = (JFile) i.next();
              hh.write("#include \""+f.getName()+".hh\"\n");
          }
          cc.write("#include \""+mName+".hh\"\n");
          
          for (Iterator i = mRecList.iterator(); i.hasNext();) {
              JRecord jr = (JRecord) i.next();
              jr.genCppCode(hh, cc);
          }
          
          hh.write("#endif //"+mName.toUpperCase().replace('.','_')+"__\n");
          
          hh.close();
          cc.close();
      } 
                              #location 12 
                              #vulnerability type RESOURCE_LEAK