Source:
<code>private List<ReplicaThread> createThreadPool(String datacenter, int numberOfThreads, boolean startThread) { nextReplicaThreadIndex.put(datacenter, new AtomicInteger(0)); List<ReplicaThread> replicaThreads = new ArrayList<>(); <START> if (numberOfThreads <= 0) { <END> logger.warn("Number of replica threads is smaller or equal to 0, not starting any replica threads for ", datacenter); return null; } logger.info("Number of replica threads to replicate from {}: {}", datacenter, numberOfThreads); ResponseHandler responseHandler = new ResponseHandler(clusterMap); for (int i = 0; i < numberOfThreads; i++) { boolean replicatingOverSsl = sslEnabledDatacenters.contains(datacenter); String threadIdentity = (startThread ? "Vcr" : "") + "ReplicaThread-" + (dataNodeId.getDatacenterName().equals(datacenter) ? "Intra-" : "Inter-") + i + "-" + datacenter; try { StoreKeyConverter threadSpecificKeyConverter = storeKeyConverterFactory.getStoreKeyConverter(); Transformer threadSpecificTransformer = Utils.getObj(transformerClassName, storeKeyFactory, threadSpecificKeyConverter); ReplicaThread replicaThread = new ReplicaThread(threadIdentity, factory, clusterMap, correlationIdGenerator, dataNodeId, connectionPool, replicationConfig, replicationMetrics, notification, threadSpecificKeyConverter, threadSpecificTransformer, metricRegistry, replicatingOverSsl, datacenter, responseHandler, SystemTime.getInstance()); replicaThreads.add(replicaThread); if (startThread) { Thread thread = Utils.newThread(replicaThread.getName(), replicaThread, false); thread.start(); logger.info("Started replica thread " + thread.getName()); } } catch (Exception e) { throw new RuntimeException("Encountered exception instantiating ReplicaThread", e); } } replicationMetrics.trackLiveThreadsCount(replicaThreads, datacenter); replicationMetrics.populateSingleColoMetrics(datacenter); return replicaThreads; }</code><technical_language>numberOfThreads < 0 throw IllegalArgumentException</technical_language>

Target:
private List<ReplicaThread> createThreadPool(String datacenter, int numberOfThreads, boolean startThread) { nextReplicaThreadIndexByDc.put(datacenter, new AtomicInteger(0)); List<ReplicaThread> replicaThreads = new ArrayList<>(); logger.info("Number of replica threads to replicate from {}: {}", datacenter, numberOfThreads); ResponseHandler responseHandler = new ResponseHandler(clusterMap); for (int i = 0; i < numberOfThreads; i++) { boolean replicatingOverSsl = sslEnabledDatacenters.contains(datacenter); String threadIdentity = (startThread ? "Vcr" : "") + "ReplicaThread-" + (dataNodeId.getDatacenterName().equals(datacenter) ? "Intra-" : "Inter-") + i + "-" + datacenter; try { StoreKeyConverter threadSpecificKeyConverter = storeKeyConverterFactory.getStoreKeyConverter(); Transformer threadSpecificTransformer = Utils.getObj(transformerClassName, storeKeyFactory, threadSpecificKeyConverter); ReplicaThread replicaThread = new ReplicaThread(threadIdentity, factory, clusterMap, correlationIdGenerator, dataNodeId, connectionPool, replicationConfig, replicationMetrics, notification, threadSpecificKeyConverter, threadSpecificTransformer, metricRegistry, replicatingOverSsl, datacenter, responseHandler, SystemTime.getInstance()); replicaThreads.add(replicaThread); if (startThread) { Thread thread = Utils.newThread(replicaThread.getName(), replicaThread, false); thread.start(); logger.info("Started replica thread " + thread.getName()); } } catch (Exception e) { throw new RuntimeException("Encountered exception instantiating ReplicaThread", e); } } replicationMetrics.trackLiveThreadsCount(replicaThreads, datacenter); replicationMetrics.populateSingleColoMetrics(datacenter); return replicaThreads; }