#vulnerable code 
                                public void downloadProblem(URL url, String message) {
        if (observer == null) {
            return;
        }
        synchronized(observer) {
            itemsPending.remove(url);
            itemsErrored.put(url, message);
            observer.update(this, new RipStatusMessage(STATUS.DOWNLOAD_WARN, url + " : " + message));
            observer.notifyAll();
        }
        checkIfComplete();
    } 
                            #location 11 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                public void downloadProblem(URL url, String message) {
        if (observer == null) {
            return;
        }
        
        itemsPending.remove(url);
        itemsErrored.put(url, message);
        observer.update(this, new RipStatusMessage(STATUS.DOWNLOAD_WARN, url + " : " + message));
            
        
        checkIfComplete();
    }