#fixed code
                                protected final void writeFile( File outFile, StringBuffer input )
        throws IOException
    {
        Writer writer = WriterFactory.newXmlWriter( outFile );
        try
        {
            IOUtil.copy( input.toString(), writer );
        }
        finally
        {
            IOUtil.close( writer );
        }
    }
#vulnerable code 
                                protected final void writeFile( File outFile, StringBuffer input )
        throws IOException
    {
        OutputStream out = new BufferedOutputStream( new FileOutputStream( outFile ) );
        out.write( input.toString().getBytes( PomHelper.POM_ENCODING ) );
        out.close();
    } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK