#vulnerable code 
                             public void getNewUrlToFetch(NamedItem host, long limit,
			List<UrlItem> urlList) throws SearchLibException, ParseException,
			IOException, SyntaxError, URISyntaxException,
			ClassNotFoundException, InterruptedException,
			InstantiationException, IllegalAccessException {
		SearchRequest searchRequest = client.getNewSearchRequest("urlSearch");
		searchRequest.addFilter("host:\""
				+ SearchRequest.escapeQuery(host.getName()) + "\"");
		searchRequest.setQueryString("*:*");
		filterQueryToFetchNew(searchRequest);
		searchRequest.setRows((int) limit);
		Result result = client.search(searchRequest);
		for (ResultDocument item : result)
			urlList.add(new UrlItem(item));
	} 
                            #location 12 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                             public void getNewUrlToFetch(NamedItem host, long limit,
			List<UrlItem> urlList) throws SearchLibException, ParseException,
			IOException, SyntaxError, URISyntaxException,
			ClassNotFoundException, InterruptedException,
			InstantiationException, IllegalAccessException {
		SearchRequest searchRequest = urlDbClient
				.getNewSearchRequest("urlSearch");
		searchRequest.addFilter("host:\""
				+ SearchRequest.escapeQuery(host.getName()) + "\"");
		searchRequest.setQueryString("*:*");
		filterQueryToFetchNew(searchRequest);
		searchRequest.setRows((int) limit);
		Result result = urlDbClient.search(searchRequest);
		for (ResultDocument item : result)
			urlList.add(new UrlItem(item));
	}