#fixed code
                                protected void checkComponent() {
        if (downloader == null) {
            this.downloader = new HttpClientDownloader();
        }
        if (pipelines.isEmpty()) {
            pipelines.add(new ConsolePipeline());
        }
        downloader.setThread(threadNum);
    }
#vulnerable code 
                                protected void checkComponent() {
        if (downloader == null) {
            this.downloader = new HttpClientDownloader();
        }
    } 
                            #location 2 
                            #vulnerability type THREAD_SAFETY_VIOLATION