#vulnerable code 
                                public void directlyUploadObject(UploadInstructions uploadInstructions) {
        new UploadObjectCommand(getAccount(), getClient(), getAccess(), this, uploadInstructions).call();
    } 
                            #location 2 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public void directlyUploadObject(UploadInstructions uploadInstructions) {
        commandFactory.createUploadObjectCommand(getAccount(), getClient(), getAccess(), this, uploadInstructions).call();
    }