#fixed code
                                private static void processUpload( ResourcesService client, String resources, String out )
        throws IOException, ResourcesException
    {
        if ( StringUtils.isEmpty( resources ) )
        {
            throw new IOException( "resources must be not empty" );
        }
        if ( resources.indexOf( ";" ) == -1 )
        {
            processUpload( client, resources,  new File( out )  );
        }
        else
        {
            // TODO : manage list of uppload
        }

        // String[] resources= s.split( ";" );
        // String[] outs= out.split( ";" );

    }
#vulnerable code 
                                private static void processUpload( ResourcesService client, String resources, String out )
        throws IOException, ResourcesException
    {
        if ( StringUtils.isEmpty( resources ) )
        {
            throw new IOException( "resources must be not empty" );
        }
        if ( resources.indexOf( ";" ) == -1 )
        {
            processUpload( client, resources, IOUtils.toByteArray( new FileInputStream( new File( out ) ) ) );
        }
        else
        {
            // TODO : manage list of uppload
        }

        // String[] resources= s.split( ";" );
        // String[] outs= out.split( ";" );

    } 
                            #location 10 
                            #vulnerability type RESOURCE_LEAK