#fixed code
                                public WriteBucket addPrecommitHook(NamedFunction preCommitHook) {
        httpOnly(client.getTransport(), Constants.FL_SCHEMA_PRECOMMIT);
        if(preCommitHook != null) {
            if(precommitHooks == null) {
                precommitHooks = new ArrayList<NamedFunction>();
            }
            precommitHooks.add(preCommitHook);
        }
        return this;
    }
#vulnerable code 
                                public WriteBucket addPrecommitHook(NamedFunction preCommitHook) {
        httpOnly(client.getTransport(), Constants.FL_SCHEMA_PRECOMMIT);
        builder.addPrecommitHook(preCommitHook);
        return this;
    } 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION