#fixed code
                                public void bind() {
        bind(false);
    }
#vulnerable code 
                                public void bind() {
        if (bound) throw new IllegalStateException("Already bound to " + assignedThread);
        bound = true;
        assignedThread = Thread.currentThread();
        AffinitySupport.setAffinity(1L << id);
        if (LOGGER.isLoggable(Level.INFO))
            LOGGER.info("Assigning cpu " + id + " to " + assignedThread);
    } 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION