#fixed code
                                protected void clearState() {

        setConnection(null);

        activeSenders.clear();
        activeRequestResponseClients.clear();
        failAllCreationRequests();
        // make sure we make configured number of attempts to re-connect
        connectAttempts = new AtomicInteger(0);
    }
#vulnerable code 
                                protected void clearState() {

        setConnection(null);
        offeredCapabilities = Collections.emptyList();

        activeSenders.clear();
        activeRequestResponseClients.clear();
        failAllCreationRequests();
        // make sure we make configured number of attempts to re-connect
        connectAttempts = new AtomicInteger(0);
    } 
                            #location 4 
                            #vulnerability type THREAD_SAFETY_VIOLATION