#vulnerable code 
                                private static void processUpload( ResourcesService client, String resourceId, File out )
        throws ResourcesException, IOException
    {

    	FileInputStream input= new FileInputStream(out);

    	byte[] content=IOUtils.toByteArray(input);
      //  BinaryData data = new BinaryData( content, out.getName() );
        BinaryData data = new BinaryData( );
        data.setContent(input);
        data.setFileName(out.getName());
        data.setResourceId( resourceId );
        client.upload( data );

    } 
                            #location 13 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                private static void processUpload( ResourcesService client, String resourceId, File out )
        throws ResourcesException, IOException
    {

    	FileInputStream input= new FileInputStream(out);

    	byte[] content=IOUtils.toByteArray(input);
      //  BinaryData data = new BinaryData( content, out.getName() );
        BinaryData data = new BinaryData( );
        data.setContent(content);
        data.setFileName(out.getName());
        data.setResourceId( resourceId );
        client.upload( data );

    }