auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public synchronized void disableProxy() { if (socks5Proxy == null) { SmackConfiguration.setLocalSocks5ProxyEnabled(false); return; } Socks5Proxy.getSocks5Proxy().stop(); SmackConfiguration.setLocalSocks5ProxyEnabled(false); socks5Proxy = null; if (socks5ProxyPort < 0) return; log.info("stopped Socks5 proxy on port: " + socks5ProxyPort); boolean wasInterrupted = false; while (true) { try { addressRetrieval.acquire(2); break; } catch (InterruptedException e) { wasInterrupted = true; } } try { if (device == null) return; if (!upnpService.isMapped(device, socks5ProxyPort, IUPnPService.TCP)) return; if (!upnpService.deletePortMapping(device, socks5ProxyPort, IUPnPService.TCP)) { log.warn( "failed to delete port mapping on device: " + device.getFriendlyName() + " [" + socks5ProxyPort + "|" + IUPnPService.TCP + "]"); } log.info( "removed port mapping on device: " + device.getFriendlyName() + " [" + socks5ProxyPort + "|" + IUPnPService.TCP + "]"); } finally { addressRetrieval.release(2); device = null; if (wasInterrupted) Thread.currentThread().interrupt(); } }

Target:
public synchronized void disableProxy() { if (socks5Proxy == null) { SmackConfiguration.setLocalSocks5ProxyEnabled(false); return; } socks5Proxy.stop(); SmackConfiguration.setLocalSocks5ProxyEnabled(false); socks5Proxy = null; log.info("stopped Socks5 proxy on port: " + socks5ProxyPort); if (socks5ProxyPort > 0 && device != null) { assert upnpService != null; unmapPort(upnpService, device, socks5ProxyPort); } socks5ProxyPort = 0; device = null; }
Source:
public ExprEval apply(List<Expr> args, Expr.ObjectBinding bindings) { if (args.size() != 3) { throw new IAE("function '%s' needs 3 arguments", name()); } final String arg = args.get(0).eval(bindings).asString(); final String pattern = args.get(1).eval(bindings).asString(); final String replacement = args.get(2).eval(bindings).asString(); return ExprEval.of( Strings.nullToEmpty(arg).replace(Strings.nullToEmpty(pattern), Strings.nullToEmpty(replacement)) ); }

Target:
public ExprEval apply(List<Expr> args, Expr.ObjectBinding bindings) { if (args.size() != 3) { throw new IAE("Function[%s] needs 3 arguments", name()); } final String arg = args.get(0).eval(bindings).asString(); final String pattern = args.get(1).eval(bindings).asString(); final String replacement = args.get(2).eval(bindings).asString(); return ExprEval.of( Strings.nullToEmpty(arg).replace(Strings.nullToEmpty(pattern), Strings.nullToEmpty(replacement)) ); }
Source:
public void testEventFailed() { EventApi eventApi = EasyMock.createMock(EventApi.class); DigitalOceanApi api = EasyMock.createMock(DigitalOceanApi.class); expect(eventApi.get(anyInt())).andReturn(event(Status.ERROR)); expect(api.getEventApi()).andReturn(eventApi); replay(eventApi); replay(api); EventDonePredicate predicate = new EventDonePredicate(api); try { predicate.apply(1); fail("Method should have thrown an IllegalStateException"); } catch (IllegalStateException ex) { assertEquals(ex.getMessage(), "Resource is in invalid status: ERROR"); verify(eventApi); verify(api); } }

Target:
public void testEventFailed() { EventApi eventApi = EasyMock.createMock(EventApi.class); DigitalOceanApi api = EasyMock.createMock(DigitalOceanApi.class); expect(eventApi.get(anyInt())).andReturn(event(Status.ERROR)); expect(api.getEventApi()).andReturn(eventApi); replay(eventApi, api); EventDonePredicate predicate = new EventDonePredicate(api); try { predicate.apply(1); fail("Method should have thrown an IllegalStateException"); } catch (IllegalStateException ex) { assertEquals(ex.getMessage(), "Resource is in invalid status: ERROR"); } }
Source:
public void testLunDiskValid() { VDS vds = mockVds(); LunDisk disk = createISCSILunDisk(); command.getParameters().setDiskInfo(disk); command.getParameters().setVdsId(vds.getId()); command.setVds(vds); Guid storageId = Guid.newGuid(); command.getParameters().setStorageDomainId(storageId); mockStorageDomain(storageId); mockVm(); mockMaxPciSlots(); mockInterfaceList(); List<LUNs> luns = Collections.singletonList(disk.getLun()); doReturn(luns).when(command).executeGetDeviceList(any(), any(), any()); ValidateTestUtils.runAndAssertValidateSuccess(command); }

Target:
public void testLunDiskValid() { VDS vds = mockVds(); LunDisk disk = createISCSILunDisk(); command.getParameters().setDiskInfo(disk); command.getParameters().setVdsId(vds.getId()); command.setVds(vds); Guid storageId = Guid.newGuid(); mockStorageDomain(storageId); mockVm(); mockMaxPciSlots(); mockInterfaceList(); List<LUNs> luns = Collections.singletonList(disk.getLun()); doReturn(luns).when(command).executeGetDeviceList(any(), any(), any()); ValidateTestUtils.runAndAssertValidateSuccess(command); }
Source:
protected void waitUntilContainerStarted() { logger().info("Waiting for database connection to become available at using query '{}'", getJdbcUrl(), getTestQueryString()); await().ignoreExceptionsMatching(e -> ! (e instanceof NoDriverFoundException)) .timeout(startupTimeoutSeconds, SECONDS) .until(() -> { if (!isRunning()) { return false; } try (Connection connection = createConnection("")) { boolean success = connection.createStatement().execute(JdbcDatabaseContainer.this.getTestQueryString()); if (success) { logger().info("Obtained a connection to container ({})", JdbcDatabaseContainer.this.getJdbcUrl()); return true; } else { return false; } } }); }

Target:
protected void waitUntilContainerStarted() { logger().info("Waiting for database connection to become available at using query '{}'", getJdbcUrl(), getTestQueryString()); long start = System.currentTimeMillis(); try { while (System.currentTimeMillis() < start + (1000 * startupTimeoutSeconds)) { try { if (!isRunning()) { Thread.sleep(100L); continue; } try (Connection connection = createConnection("")) { boolean testQuerySucceeded = connection.createStatement().execute(this.getTestQueryString()); if (testQuerySucceeded) { break; } } } catch (NoDriverFoundException e) { throw e; } catch (Exception e) { logger().debug("Failure when trying test query", e); Thread.sleep(100L); } } } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new ContainerLaunchException("Container startup wait was interrupted", e); } logger().info("Container is started (JDBC URL: {})", JdbcDatabaseContainer.this.getJdbcUrl()); }
Source:
private StringBuilder addPDFViewer(StringBuilder parsedContent, Map<String, Boolean> savedLinks) { for (Map.Entry<String, Boolean> linkPath : savedLinks.entrySet()) { if (linkPath.getKey().toLowerCase().contains(".pdf")) { String pat = "(href=)+(\"|')?(/group/" + siteId + "/)(" + linkPath.getKey() + ")(\"|')?([ a-z0-9=\"'-]*)(>)"; Pattern target = Pattern.compile(pat, Pattern.CASE_INSENSITIVE); Matcher matcher = target.matcher(parsedContent); if (matcher.find()) { parsedContent.insert(matcher.end(4), "?canvas_download=1&amp;canvas_qs_wrap=1"); parsedContent.insert(matcher.start(), " class=\"instructure_file_link instructure_scribd_file\" "); } } } return parsedContent; }

Target:
StringBuilder addPDFViewer(StringBuilder parsedContent, Map<String, Boolean> savedLinks) { for (Map.Entry<String, Boolean> linkPath : savedLinks.entrySet()) { if (linkPath.getKey().toLowerCase().contains(".pdf")) { String pat = "(href=)+(\"|')?(/group/" + siteId + "/)(" + linkPath.getKey() + ")(\"|')?([_ a-z0-9=\"'-]*)(>)"; Pattern target = Pattern.compile(pat, Pattern.CASE_INSENSITIVE); Matcher matcher = target.matcher(parsedContent); String urlAddition = "?canvas_download=1&amp;canvas_qs_wrap=1"; String cssAddition = "class=\"instructure_file_link instructure_scribd_file\" "; while (matcher.find()) { parsedContent.insert(matcher.end(4), urlAddition); parsedContent.insert(matcher.start(), cssAddition); matcher.region(matcher.end() + urlAddition.length() + cssAddition.length(), parsedContent.length()); } } } return parsedContent; }
Source:
protected void onCreate(Bundle savedInstance) { super.onCreate(savedInstance); if (savedInstance == null || !savedInstance.getBoolean(ExtraConstants.HAS_EXISTING_INSTANCE)) { if (!hasNetworkConnection()) { Log.d(TAG, "No network connection"); finish(ErrorCodes.NO_NETWORK, IdpResponse.getErrorCodeIntent(ErrorCodes.NO_NETWORK)); return; } GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance(); Dialog errorDialog = apiAvailability.getErrorDialog( this, apiAvailability.isGooglePlayServicesAvailable(this), RC_PLAY_SERVICES, new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { finish(ResultCodes.CANCELED, IdpResponse.getErrorCodeIntent(ErrorCodes.UNKNOWN_ERROR)); } }); if (errorDialog == null) { SignInDelegate.delegate(KickoffActivity.this, mActivityHelper.getFlowParams()); } else { errorDialog.show(); mIsWaitingForPlayServices = true; } } }

Target:
protected void onCreate(Bundle savedInstance) { super.onCreate(savedInstance); if (savedInstance == null || savedInstance.getBoolean(IS_WAITING_FOR_PLAY_SERVICES)) { if (isOffline()) { Log.d(TAG, "No network connection"); finish(ErrorCodes.NO_NETWORK, IdpResponse.getErrorCodeIntent(ErrorCodes.NO_NETWORK)); return; } boolean isPlayServicesAvailable = PlayServicesHelper.makePlayServicesAvailable( this, RC_PLAY_SERVICES, new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { finish(ResultCodes.CANCELED, IdpResponse.getErrorCodeIntent( ErrorCodes.UNKNOWN_ERROR)); } }); if (isPlayServicesAvailable) { SignInDelegate.delegate(KickoffActivity.this, mActivityHelper.getFlowParams()); } else { mIsWaitingForPlayServices = true; } } }
Source:
public SequencerServerCache(int cacheSize, long maxConflictNewSequencer) { this.cacheSize = cacheSize; cacheConflictKeys = new HashMap<> (); cacheEntries = new PriorityQueue<> (cacheSize, Comparator.comparingLong((ConflictTxStream a) -> a.txVersion)); cacheEntriesBytes = 0; maxConflictWildcard = maxConflictNewSequencer; this.maxConflictNewSequencer = maxConflictNewSequencer; }

Target:
public SequencerServerCache(int cacheSize, long maxConflictNewSequencer) { this.cacheSize = cacheSize; conflictKeys = new HashMap(); cacheEntries = new PriorityQueue(cacheSize, Comparator.comparingLong (a -> ((ConflictTxStream)a).txVersion)); maxConflictWildcard = maxConflictNewSequencer; this.maxConflictNewSequencer = maxConflictNewSequencer; }
Source:
public HelixNotifier(HelixPropertyStoreConfig storeConfig, HelixPropertyStoreFactory<ZNRecord> storeFactory) { if (storeFactory == null) { throw new IllegalArgumentException("storeFactory cannot be null."); } List<String> subscribedPaths = new ArrayList<>(); subscribedPaths.add(storeConfig.rootPath + TOPIC_PATH); helixStore = storeFactory.getHelixPropertyStore(storeConfig, subscribedPaths); logger.info("HelixNotifier started, topicPath={}", storeConfig.rootPath + TOPIC_PATH); }

Target:
public HelixNotifier(HelixPropertyStoreConfig storeConfig, HelixPropertyStoreFactory<ZNRecord> storeFactory) { if (storeFactory == null) { throw new IllegalArgumentException("storeFactory cannot be null."); } List<String> subscribedPaths = Collections.singletonList(storeConfig.rootPath + TOPIC_PATH); helixStore = storeFactory.getHelixPropertyStore(storeConfig, subscribedPaths); logger.info("HelixNotifier started, topicPath={}", storeConfig.rootPath + TOPIC_PATH); }
Source:
public void setSpliterator() { Spliterator<String> spliterator = IterableView.of(ImmutableSortedSet.of("a", "b")).spliterator(); assertThat(spliterator.estimateSize()).isEqualTo(2); int characteristics = spliterator.characteristics(); assertThat(characteristics).isNotEqualTo(0); assertThat(characteristics & Spliterator.CONCURRENT).isEqualTo(0); assertThat(characteristics & Spliterator.DISTINCT).isEqualTo(Spliterator.DISTINCT); assertThat(characteristics & Spliterator.IMMUTABLE).isEqualTo(Spliterator.IMMUTABLE); assertThat(characteristics & Spliterator.NONNULL).isEqualTo(Spliterator.NONNULL); assertThat(characteristics & Spliterator.SIZED).isEqualTo(Spliterator.SIZED); assertThat(characteristics & Spliterator.SORTED).isEqualTo(Spliterator.SORTED); assertThat(characteristics & Spliterator.SUBSIZED).isEqualTo(Spliterator.SUBSIZED); }

Target:
public void setSpliterator() { Spliterator<String> spliterator = IterableView.of(ImmutableSortedSet.of("a", "b")).spliterator(); assertThat(spliterator.estimateSize()).isEqualTo(2); assertThat(spliterator.characteristics()).isNotZero(); assertThat(spliterator.hasCharacteristics(Spliterator.DISTINCT)).isTrue(); assertThat(spliterator.hasCharacteristics(Spliterator.SIZED)).isTrue(); assertThat(spliterator.hasCharacteristics(Spliterator.SUBSIZED)).isTrue(); assertThat(StreamSupport.stream(spliterator, false)).containsExactly("a", "b"); }
Source:
private KalturaLiveEntry onClientConnect(WMSProperties properties, HashMap<String, String> requestParams) throws KalturaApiException, ClientConnectException, Exception { if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_ENTRY_ID)){ throw new ClientConnectException("Missing argument: entryId"); } if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_TOKEN)){ throw new ClientConnectException("Missing argument: token"); } if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_PARTNER_ID)){ throw new ClientConnectException("Missing argument: partnerId"); } if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_SERVER_INDEX)){ throw new ClientConnectException("Missing argument: server index"); } int partnerId = Integer.parseInt(requestParams.get(Constants.REQUEST_PROPERTY_PARTNER_ID)); String entryId = requestParams.get(Constants.REQUEST_PROPERTY_ENTRY_ID); String token = requestParams.get(Constants.REQUEST_PROPERTY_TOKEN); KalturaEntryServerNodeType serverIndex = KalturaEntryServerNodeType.get(requestParams.get(Constants.REQUEST_PROPERTY_SERVER_INDEX)); KalturaLiveEntry liveEntry = KalturaAPI.getKalturaAPI().authenticate(entryId, partnerId, token, serverIndex); Utils.addEntry(entryId, liveEntry); synchronized(properties) { properties.setProperty(Constants.CLIENT_PROPERTY_SERVER_INDEX, requestParams.get(Constants.REQUEST_PROPERTY_SERVER_INDEX)); properties.setProperty(Constants.CLIENT_PROPERTY_KALTURA_LIVE_ENTRY, liveEntry); } logger.info("Entry added [" + entryId + "]"); return liveEntry; }

Target:
private KalturaLiveEntry onClientConnect(WMSProperties properties, HashMap<String, String> requestParams) throws KalturaApiException, ClientConnectException, Exception { if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_ENTRY_ID)){ throw new ClientConnectException("Missing argument: entryId"); } if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_TOKEN)){ throw new ClientConnectException("Missing argument: token"); } if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_PARTNER_ID)){ throw new ClientConnectException("Missing argument: partnerId"); } if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_SERVER_INDEX)){ throw new ClientConnectException("Missing argument: server index"); } int partnerId = Integer.parseInt(requestParams.get(Constants.REQUEST_PROPERTY_PARTNER_ID)); String entryId = requestParams.get(Constants.REQUEST_PROPERTY_ENTRY_ID); String token = requestParams.get(Constants.REQUEST_PROPERTY_TOKEN); KalturaEntryServerNodeType serverIndex = KalturaEntryServerNodeType.get(requestParams.get(Constants.REQUEST_PROPERTY_SERVER_INDEX)); KalturaLiveEntry liveEntry = KalturaAPI.getKalturaAPI().authenticate(entryId, partnerId, token, serverIndex); KalturaEntryIdKey key = KalturaEntryDataPersistence.setProperty(entryId, Constants.CLIENT_PROPERTY_KALTURA_LIVE_ENTRY, liveEntry); synchronized (properties) { properties.setProperty(Constants.KALTURA_ENTRY_DATA_PERSISTENCY_KEY, key); } logger.info("Entry added [" + entryId + "]"); return liveEntry; }
Source:
public void addToOrderBook(Order order) { if (BuyOrder.class.isInstance(order)){ if (this.buyOrders.containsKey(order.getStockSymbol())){ ArrayList<Order> list =buyOrders.get(order.getStockSymbol()); list.add(order); } else{ ArrayList<Order> list = new ArrayList<Order>(); list.add(order); this.buyOrders.put(order.getStockSymbol(), list); } } else{ if (this.sellOrders.containsKey(order.getStockSymbol())){ ArrayList<Order> list =sellOrders.get(order.getStockSymbol()); list.add(order); } else{ ArrayList<Order> list = new ArrayList<Order>(); list.add(order); this.sellOrders.put(order.getStockSymbol(), list); } } }

Target:
public void addToOrderBook(Order order) { if (BuyOrder.class.isInstance(order)){ addBuyOrder(order); } else{ addSellOrder(order); } }
Source:
protected Option[] configurePaxExam() { return options( logLevel(LogLevelOption.LogLevel.WARN), useOwnExamBundlesStartLevel(100), systemTimeout(GENERIC_TIMEOUT_MILLISECONDS), when(Boolean.getBoolean("keepRuntimeFolder")).useOptions(keepRuntimeFolder()), cleanCaches(true), KarafDistributionOption.debugConfiguration()); }

Target:
protected Option[] configurePaxExam() { return options( logLevel(LogLevelOption.LogLevel.WARN), useOwnExamBundlesStartLevel(100), systemTimeout(GENERIC_TIMEOUT_MILLISECONDS), when(Boolean.getBoolean("keepRuntimeFolder")).useOptions(keepRuntimeFolder()), cleanCaches(true)); }
Source:
public <T> T lookup(Class<T> serviceClass) { Collection<Object> registered = services.get(serviceClass); if (registered == null || registered.isEmpty()) { ServiceLoader<T> loader = ServiceLoader.load(serviceClass); List<T> services = new ArrayList<>(); for (Iterator<T> iterator = loader.iterator(); iterator .hasNext();) { services.add(iterator.next()); } if (services.size() > 1) { throw new IllegalStateException(SEVERAL_IMPLS + serviceClass + SPI + services + ONE_IMPL_REQUIRED); } else if (services.size() == 1) { return services.get(0); } return null; } else if (registered.size() > 1) { throw new IllegalStateException(SEVERAL_IMPLS + serviceClass + SPI + registered + ONE_IMPL_REQUIRED); } else { return serviceClass.cast(registered.iterator().next()); } }

Target:
public <T> T lookup(Class<T> serviceClass) { Collection<Object> registered = serviceMap.get(serviceClass); if (registered == null || registered.isEmpty()) { ServiceLoader<T> loader = ServiceLoader.load(serviceClass); List<T> services = new ArrayList<>(); for (Iterator<T> iterator = loader.iterator(); iterator .hasNext();) { services.add(iterator.next()); } if (services.size() > 1) { throw new IllegalStateException(SEVERAL_IMPLS + serviceClass + SPI + services + ONE_IMPL_REQUIRED); } else if (services.size() == 1) { return services.get(0); } return null; } else if (registered.size() > 1) { throw new IllegalStateException(SEVERAL_IMPLS + serviceClass + SPI + registered + ONE_IMPL_REQUIRED); } else { return serviceClass.cast(registered.iterator().next()); } }
Source:
protected static Stream<Arguments> messagingEntityWithSessions() { return Stream.of( Arguments.of(MessagingEntityType.QUEUE, false), Arguments.of(MessagingEntityType.SUBSCRIPTION, false) Arguments.of(MessagingEntityType.QUEUE, true), Arguments.of(MessagingEntityType.SUBSCRIPTION, true) ); }

Target:
protected static Stream<Arguments> messagingEntityWithSessions() { return Stream.of( Arguments.of(MessagingEntityType.QUEUE, false), Arguments.of(MessagingEntityType.SUBSCRIPTION, false), Arguments.of(MessagingEntityType.QUEUE, true), Arguments.of(MessagingEntityType.SUBSCRIPTION, true) ); }
Source:
public void parseAndCreateHCatClients() throws Exception { if (isHCatEnabled) { try { String hcatCientsRaio = System.getProperty(HCAT_CLIENTS_RATIO, "1/5"); String ratioStr = hcatCientsRaio.split("/")[1]; int numServices = services.size(); int ratio = Integer.parseInt(ratioStr); if (numServices > 0 && ratio > 0) { numOfHCatClients = (numServices / ratio); if (numOfHCatClients <= 0) { numOfHCatClients = 1; } } else { LOG.info("no services or ratio is invalid"); } } catch(Exception e) { LOG.error("Exception occured while calcluating the number" + " of hcatClients ", e); numOfHCatClients = 10; } createHCatClients(); } }

Target:
public void parseAndCreateHCatClients() throws Exception { if (isHCatEnabled) { try { String hcatCientsRaio = System.getProperty(HCAT_CLIENTS_RATIO, "1/5"); String ratioSplits = hcatCientsRaio.split("/"); int numServices = services.size(); boolean isValidRatio = isValidRatio(ratioSplits); if (numServices > 0 && isValidRatio) { numOfHCatClients = (int) Math.ceil( (numServices * Integer.parseInt(ratioSplits[0])) / Integer.parseInt(ratioSplits[1])); if (numOfHCatClients <= 0) { numOfHCatClients = 1; } } else { LOG.info("no services or ratio is invalid." + " Starts with " + numOfHCatClients + " hcatclients"); } } catch(Exception e) { LOG.error("Exception occured while calcluating the number" + " of hcatClients ", e); numOfHCatClients = 10; } createHCatClients(); } }
Source:
public static boolean isFramework270OrHigher (String version) { return StringUtils.isNotEmpty(version); }

Target:
public static boolean isFramework270OrHigher (String version) { if (StringUtils.isEmpty(version)) { return false; } if (getIntVersion(version) >= 2070000) { return true; } return false; }
Source:
TransactionInput(NetworkParameters params, Transaction parentTransaction, TransactionOutput output) { super(params); long outputIndex = output.getIndex(); try { outpoint = new TransactionOutPoint(params, outputIndex, output.getParentTransaction()); } catch (NullPointerException e) { outpoint = new TransactionOutPoint(params, output); } scriptBytes = EMPTY_ARRAY; sequence = NO_SEQUENCE; setParent(parentTransaction); this.value = output.getValue(); length = 41; }

Target:
TransactionInput(NetworkParameters params, Transaction parentTransaction, TransactionOutput output) { super(params); long outputIndex = output.getIndex(); if(output.getParentTransaction() != null ) { outpoint = new TransactionOutPoint(params, outputIndex, output.getParentTransaction()); } else { outpoint = new TransactionOutPoint(params, output); } scriptBytes = EMPTY_ARRAY; sequence = NO_SEQUENCE; setParent(parentTransaction); this.value = output.getValue(); length = 41; }
Source:
private List<JSONObject> removeStreetDuplicates(List<JSONObject> results, String lang) { List<JSONObject> filteredItems = Lists.newArrayListWithCapacity(results.size()); final HashSet<String> keys = Sets.newHashSet(); for(JSONObject result : results) { final JSONObject properties = result.getJSONObject(Tags.KEY_PROPERTIES); if(properties.has(Tags.KEY_OSM_KEY) && "highway".equals(properties.getString(Tags.KEY_OSM_KEY))) { if(properties.has(OSMTags.KEY_POSTCODE) && properties.has(OSMTags.KEY_NAME)) { String postcode = properties.getString(OSMTags.KEY_POSTCODE); String name = properties.getString(OSMTags.KEY_NAME); String key = postcode + ":" + name; if(keys.contains(key)) { continue; } else if (lang.equals("nl")) { String letterlessPostcode = Utils.stripNonDigits(postcode); int postcodeNumbers; try { postcodeNumbers = Integer.parseInt(letterlessPostcode); } catch (NumberFormatException e) { continue; } boolean foundMatch = false; for (String keyString : keys) { String letterlessKey = Utils.stripNonDigits(keyString); int keyPostcode; try { keyPostcode = Integer.parseInt(letterlessKey); } catch (NumberFormatException e) { continue; } String keyName = keyString.split(":")[1]; if (postcodeNumbers == keyPostcode && keyName.equals(name)) { foundMatch = true; break; } } if (foundMatch) { continue; } } keys.add(key); } } filteredItems.add(result); } return filteredItems; }

Target:
private List<JSONObject> removeStreetDuplicates(List<JSONObject> results, String lang) { List<JSONObject> filteredItems = Lists.newArrayListWithCapacity(results.size()); final HashSet<String> keys = Sets.newHashSet(); for(JSONObject result : results) { final JSONObject properties = result.getJSONObject(Tags.KEY_PROPERTIES); if(properties.has(Tags.KEY_OSM_KEY) && "highway".equals(properties.getString(Tags.KEY_OSM_KEY))) { if(properties.has(OSMTags.KEY_POSTCODE) && properties.has(OSMTags.KEY_NAME)) { String postcode = properties.getString(OSMTags.KEY_POSTCODE); String onlyDigitsPostcode = Utils.stripNonDigits(postcode); String name = properties.getString(OSMTags.KEY_NAME); String key; if(lang.equals("nl")) { key = onlyDigitsPostcode + ":" + name; } else { key = postcode + ":" + name; } if(keys.contains(key)) { continue; } keys.add(key); } } filteredItems.add(result); } return filteredItems; }
Source:
private void readExecutionData(File jacocoExecutionData, SensorContext context) { if (jacocoExecutionData == null || !jacocoExecutionData.isFile()) { JaCoCoExtensions.LOG.info("Project coverage is set to 0% as no JaCoCo execution data has been dumped: {}", jacocoExecutionData); jacocoExecutionData = null; } ExecutionDataVisitor executionDataVisitor = new ExecutionDataVisitor(); try { jacocoReportReader = new JacocoReportReader(jacocoExecutionData).readJacocoReport(executionDataVisitor, executionDataVisitor); } catch (IOException e) { throw new SonarException("An error occured while reading JaCoCo report", e); } boolean collectedCoveragePerTest = readCoveragePerTests(context, executionDataVisitor); CoverageBuilder coverageBuilder = jacocoReportReader.analyzeFiles(executionDataVisitor.getMerged(), classFilesCache.values()); int analyzedResources = 0; for (ISourceFileCoverage coverage : coverageBuilder.getSourceFiles()) { Resource resource = getResource(coverage, context); if (resource != null) { CoverageMeasuresBuilder builder = analyzeFile(resource, coverage); saveMeasures(context, resource, builder.createMeasures()); analyzedResources++; } } if (analyzedResources == 0) { JaCoCoExtensions.LOG.warn("Coverage information was not collected. Perhaps you forget to include debug information into compiled classes?"); } else if (collectedCoveragePerTest) { JaCoCoExtensions.LOG.info("Information about coverage per test has been collected."); } else if (jacocoExecutionData != null) { JaCoCoExtensions.LOG.info("No information about coverage per test."); } }

Target:
private void readExecutionData(File jacocoExecutionData, SensorContext context) { if (jacocoExecutionData == null || !jacocoExecutionData.isFile()) { JaCoCoExtensions.LOG.info("Project coverage is set to 0% as no JaCoCo execution data has been dumped: {}", jacocoExecutionData); jacocoExecutionData = null; } ExecutionDataVisitor executionDataVisitor = new ExecutionDataVisitor(); jacocoReportReader = new JacocoReportReader(jacocoExecutionData).readJacocoReport(executionDataVisitor, executionDataVisitor); boolean collectedCoveragePerTest = readCoveragePerTests(context, executionDataVisitor); CoverageBuilder coverageBuilder = jacocoReportReader.analyzeFiles(executionDataVisitor.getMerged(), classFilesCache.values()); int analyzedResources = 0; for (ISourceFileCoverage coverage : coverageBuilder.getSourceFiles()) { Resource resource = getResource(coverage, context); if (resource != null) { CoverageMeasuresBuilder builder = analyzeFile(resource, coverage); saveMeasures(context, resource, builder.createMeasures()); analyzedResources++; } } if (analyzedResources == 0) { JaCoCoExtensions.LOG.warn("Coverage information was not collected. Perhaps you forget to include debug information into compiled classes?"); } else if (collectedCoveragePerTest) { JaCoCoExtensions.LOG.info("Information about coverage per test has been collected."); } else if (jacocoExecutionData != null) { JaCoCoExtensions.LOG.info("No information about coverage per test."); } }
Source:
public Stream<DiscoveryResult> stream() { return this.discoveryResultStorage.getValues().stream().filter(discoveryResult -> discoveryResult == null); }

Target:
public Stream<DiscoveryResult> stream() { return this.discoveryResultStorage.getValues().stream().filter(Objects::nonNull); }
Source:
public DictionaryPage readDictionaryPage(ColumnDescriptor descriptor) { if (rowGroup != null) { return rowGroup.readDictionaryPage(descriptor); } String dotPath = String.join(".", descriptor.getPath()); ColumnChunkMetaData column = columns.get(dotPath); if (column == null) { throw new ParquetDecodingException( "Failed to load dictionary, unknown column: " + dotPath); } return cache.computeIfAbsent(dotPath, key -> { try { final DictionaryPage dict = hasDictionaryPage(column) ? reader.readDictionary(column) : null; return (dict != null) ? Optional.of(reusableCopy(dict)) : Optional.empty(); } catch (IOException e) { throw new ParquetDecodingException("Failed to read dictionary", e); } }).orElse(null); }

Target:
public DictionaryPage readDictionaryPage(ColumnDescriptor descriptor) { if (rowGroup != null) { return rowGroup.readDictionaryPage(descriptor); } String dotPath = Strings.join(descriptor.getPath(), "."); ColumnChunkMetaData column = columns.get(dotPath); if (column == null) { throw new ParquetDecodingException( "Failed to load dictionary, unknown column: " + dotPath); } return dictionaryPageCache.computeIfAbsent(dotPath, key -> { try { final DictionaryPage dict = hasDictionaryPage(column) ? reader.readDictionary(column) : null; return (dict != null) ? Optional.of(reusableCopy(dict)) : Optional.empty(); } catch (IOException e) { throw new ParquetDecodingException("Failed to read dictionary", e); } }).orElse(null); }
Source:
public Object execute(JobExecutionContext context) throws JobExecutionException { JobArguments args = context.getJobArguments(); String principalName = context.getPrincipalName(); String ownerKey = args.getAsString(OWNER_KEY); Owner owner = this.ownerCurator.lockAndLoadByKey(ownerKey); if (owner == null) { log.debug("Owner no longer exists: {}", ownerKey); return String.format("Nothing to do; owner no longer exists: %s", ownerKey); } String displayName = owner.getDisplayName(); ExporterMetadata metadata = this.exportCurator .getByTypeAndOwner(ExporterMetadata.TYPE_PER_USER, owner); if (metadata == null) { log.debug("No imports exist for owner {}", displayName); return String.format("Nothing to do; imports no longer exist for owner: %s", displayName); } log.info("Deleting all pools originating from manifests for owner/org: {}", displayName); List<Pool> pools = this.poolManager.listPoolsByOwner(owner).list(); for (Pool pool : pools) { if (this.poolManager.isManaged(pool)) { this.poolManager.deletePool(pool); } } UpstreamConsumer uc = owner.getUpstreamConsumer(); owner.setUpstreamConsumer(null); this.ownerCurator.merge(owner); this.ownerCurator.flush(); this.exportCurator.delete(metadata); this.recordManifestDeletion(owner, principalName, uc); this.ownerCurator.evict(owner); return String.format("Imported pools removed for owner: %s", displayName); }

Target:
public Object execute(JobExecutionContext context) throws JobExecutionException { JobArguments args = context.getJobArguments(); String principalName = context.getPrincipalName(); String ownerKey = args.getAsString(OWNER_KEY); Owner owner = this.ownerCurator.lockAndLoadByKey(ownerKey); if (owner == null) { log.debug("Owner no longer exists: {}", ownerKey); return String.format("Nothing to do; owner no longer exists: %s", ownerKey); } String displayName = owner.getDisplayName(); ExporterMetadata metadata = this.exportCurator .getByTypeAndOwner(ExporterMetadata.TYPE_PER_USER, owner); if (metadata == null) { log.debug("No imports exist for owner {}", displayName); return String.format("Nothing to do; imports no longer exist for owner: %s", displayName); } log.info("Deleting all pools originating from manifests for owner/org: {}", displayName); List<Pool> pools = this.poolManager.listPoolsByOwner(owner).list(); for (Pool pool : pools) { if (this.poolManager.isManaged(pool)) { this.poolManager.deletePool(pool); } } UpstreamConsumer uc = owner.getUpstreamConsumer(); owner.setUpstreamConsumer(null); owner = this.ownerCurator.merge(owner); this.ownerCurator.flush(); this.exportCurator.delete(metadata); this.recordManifestDeletion(owner, principalName, uc); return String.format("Imported pools removed for owner: %s", displayName); }
Source:
private RequestPayment(Builder builder) { super(builder); if (builder.moneySources == null) { throw new NullPointerException("moneySources is null"); } this.moneySources = Collections.unmodifiableList(builder.moneySources); this.cscRequired = builder.cscRequired != null && builder.cscRequired; this.balance = builder.balance; this.recipientAccountStatus = builder.recipientAccountStatus; this.recipientAccountType = builder.recipientAccountType; this.protectionCode = builder.protectionCode; this.accountUnblockUri = builder.accountUnblockUri; this.extActionUri = builder.extActionUri; }

Target:
private RequestPayment(Builder builder) { super(builder); checkNotNull(builder.moneySources, "moneySource"); switch (status) { case SUCCESS: checkNotNull(builder.balance, "balance"); break; case REFUSED: if (error == Error.ACCOUNT_BLOCKED) { checkNotNull(builder.accountUnblockUri, "accountUnblockUri"); } if (error == Error.EXT_ACTION_REQUIRED) { checkNotNull(builder.extActionUri, "extActionUri"); } break; } this.moneySources = Collections.unmodifiableList(builder.moneySources); this.cscRequired = builder.cscRequired; this.balance = builder.balance; this.recipientAccountStatus = builder.recipientAccountStatus; this.recipientAccountType = builder.recipientAccountType; this.protectionCode = builder.protectionCode; this.accountUnblockUri = builder.accountUnblockUri; this.extActionUri = builder.extActionUri; }
Source:
public ServiceDiscoveringAtlasSupplier( KeyValueServiceConfig config, java.util.function.Supplier<Optional<KeyValueServiceRuntimeConfig>> runtimeConfig, Optional<LeaderConfig> leaderConfig, Optional<String> namespace, Optional<TableReference> timestampTable, boolean initializeAsync, QosClient qosClient, LongSupplier timestampSupplier) { this.config = config; this.leaderConfig = leaderConfig; AtlasDbFactory atlasFactory = createAtlasFactoryOfCorrectType(config); keyValueService = Suppliers.memoize( () -> atlasFactory.createRawKeyValueService( config, runtimeConfig, leaderConfig, namespace, initializeAsync, qosClient, timestampSupplier)); timestampService = () -> atlasFactory.createTimestampService(getKeyValueService(), timestampTable, initializeAsync); timestampStoreInvalidator = () -> atlasFactory.createTimestampStoreInvalidator(getKeyValueService()); }

Target:
public ServiceDiscoveringAtlasSupplier( KeyValueServiceConfig config, java.util.function.Supplier<Optional<KeyValueServiceRuntimeConfig>> runtimeConfig, Optional<LeaderConfig> leaderConfig, Optional<String> namespace, Optional<TableReference> timestampTable, boolean initializeAsync, QosClient qosClient, LongSupplier timestampSupplier) { this.config = config; this.leaderConfig = leaderConfig; AtlasDbFactory atlasFactory = createAtlasFactoryOfCorrectType(config); keyValueService = Suppliers.memoize( () -> atlasFactory.createRawKeyValueService( config, runtimeConfig, leaderConfig, namespace, timestampSupplier, initializeAsync, qosClient)); timestampService = () -> atlasFactory.createTimestampService(getKeyValueService(), timestampTable, initializeAsync); timestampStoreInvalidator = () -> atlasFactory.createTimestampStoreInvalidator(getKeyValueService()); }
Source:
public static boolean isPhantomActive(EntityPlayer entity) { for (int i = 0; i < entity.inventory.getSizeInventory(); i++) { ItemStack stack = entity.inventory.getStackInSlot(i); if (stack.getItem() instanceof ItemSigilPhantomBridge) return NBTHelper.checkNBT(stack).getTagCompound().getBoolean(Constants.NBT.ACTIVATED); if (stack.getItem() instanceof ItemSigilHolding){ List<ItemStack> inv = ItemSigilHolding.getInternalInventory(stack); for (int j = 0; i < ItemSigilHolding.inventorySize; i++) { ItemStack invStack = inv.get(i); if (invStack.getItem() instanceof ItemSigilPhantomBridge) return NBTHelper.checkNBT(invStack).getTagCompound().getBoolean(Constants.NBT.ACTIVATED); } } } return false; }

Target:
public static boolean isPhantomActive(EntityPlayer entity) { for (int i = 0; i < entity.inventory.getSizeInventory(); i++) { ItemStack stack = entity.inventory.getStackInSlot(i); if (stack.getItem() instanceof ItemSigilPhantomBridge) return NBTHelper.checkNBT(stack).getTagCompound().getBoolean(Constants.NBT.ACTIVATED); if (stack.getItem() instanceof ItemSigilHolding) { List<ItemStack> inv = ItemSigilHolding.getInternalInventory(stack); for (int j = 0; j < ItemSigilHolding.inventorySize; j++) { ItemStack invStack = inv.get(j); if (invStack.getItem() instanceof ItemSigilPhantomBridge) return NBTHelper.checkNBT(invStack).getTagCompound().getBoolean(Constants.NBT.ACTIVATED); } } } return false; }
Source:
<I, E extends Entity<I, ?>> void registerAndAssertRepository(Class<E> cls) { boundedContext.register(DefaultRepository.of(cls)); assertThat(boundedContext.hasRepositoryOf(cls)) .isTrue(); }

Target:
<I, E extends Entity<I, ?>> void registerAndAssertRepository(Class<E> cls) { boundedContext.register(DefaultRepository.of(cls)); assertTrue(boundedContext.hasEntitiesOfType(cls)); }
Source:
public Mono<Void> shutdown() { return Mono.defer(() -> { sink.complete(); return cluster != null ? Mono.fromFuture(cluster.shutdown()) : Mono.empty(); }); }

Target:
public Mono<Void> shutdown() { return Mono.defer( () -> { sink.complete(); return Optional.ofNullable(cluster) .map(cluster1 -> Mono.fromFuture(cluster1.shutdown())) .orElse(Mono.empty()); }); }
Source:
private Element disseminateElement(DisseminationCrosswalk crosswalk, DSpaceObject dso) throws CrosswalkException, IOException, SQLException, AuthorizeException { Element dissemination; if (crosswalk instanceof METSRightsCrosswalk) { dissemination = ((METSRightsCrosswalk)crosswalk).disseminateElement(context,dso); } else { dissemination = crosswalk.disseminateElement(dso); } return dissemination; }

Target:
private Element disseminateElement(DisseminationCrosswalk crosswalk, DSpaceObject dso) throws CrosswalkException, IOException, SQLException, AuthorizeException { Element dissemination; if(crosswalk instanceof ContextAwareDisseminationCrosswalk) { ((ContextAwareDisseminationCrosswalk)crosswalk).setContext(context); } dissemination = crosswalk.disseminateElement(dso); return dissemination; }
Source:
private DataSegment createDataSegment(String dataSource) { return new DataSegment( dataSource, new Interval("0/3000"), new DateTime().toString(), Maps.<String, Object>newHashMap(), Lists.<String>newArrayList(), Lists.<String>newArrayList(), NoneShardSpec.instance(), 0, 0 ); }

Target:
private DataSegment createDataSegment(String dataSource) { return new DataSegment( dataSource, new Interval("0/3000"), new DateTime().toString(), Maps.newHashMap(), Lists.newArrayList(), Lists.newArrayList(), NoneShardSpec.instance(), 0, 0 ); }
Source:
public HWDiskStore() { name = ""; model = ""; serial = ""; size = 0L; reads = 0L; readBytes = 0L; writes = 0L; writeBytes = 0L; currentQueueLength = 0L; transferTime = 0L; partitions = new HWPartition[0]; timeStamp = 0L; }

Target:
public HWDiskStore() { }
Source:
private void decrementReferenceCounts(PlanNode fromNode, int fromGroup) { Set<Integer> references = getAllReferences(fromNode); for (int group : references) { Group childGroup = groups.get(group); checkState(childGroup.references.remove(fromGroup), "Reference to remove not found"); if (childGroup.references.isEmpty()) { deleteGroup(group); } } }

Target:
private void decrementReferenceCounts(PlanNode fromNode, int fromGroup) { Set<Integer> references = getAllReferences(fromNode); for (int group : references) { Group childGroup = groups.get(group); checkState(childGroup.incomingReferences.remove(fromGroup), "Reference to remove not found"); if (childGroup.incomingReferences.isEmpty()) { deleteGroup(group); } } }
Source:
public String getDetailedStatus() { return _detailedStatus; }

Target:
public DetailedStatus getDetailedStatus() { return _detailedStatus; }
Source:
private static int parseConnectionValue(String value) { try { return CoordinateConverter.INSTANCE.convertFrom1499XML(value); } catch (Exception ex) { return 0; } }

Target:
private static int parseConnectionValue(String value) { try { return CoordinateConverter.INSTANCE.convertFrom1499XML(value); } catch (NumberFormatException ex) { return 0; } }
Source:
protected SynchronizedConfigurationListener getConfigListener(String pid) { return new SynchronizedConfigurationListener(pid); }

Target:
SynchronizedConfigurationListener getConfigListener(String pid) { return new SynchronizedConfigurationListener(pid); }
Source:
private synchronized void init(TxnView txn, boolean reinit){ try { SpliceTransactionResourceImpl txnResource = impl.get(); if (txnResource != null && activation != null) return; txnResource = new SpliceTransactionResourceImpl(); txnResource.marshallTransaction(txn); impl.set(txnResource); activation = soi.getActivation(this, txnResource.getLcc()); EmbedConnection internalConnection = (EmbedConnection)EngineDriver.driver().getInternalConnection(); new EmbedConnectionContext(ContextService.getService().getCurrentContextManager(), internalConnection); if (reinit) { SpliceOperationContext context = SpliceOperationContext.newContext(activation); for (SpliceOperation so : operationsList) { so.init(context); } } } catch (Exception e) { throw new RuntimeException(e); } }

Target:
private void init(TxnView txn, boolean reinit){ try { SpliceTransactionResourceImpl txnResource = impl.get(); if (txnResource != null && activation != null) return; txnResource = new SpliceTransactionResourceImpl(); txnResource.marshallTransaction(txn); impl.set(txnResource); activation = soi.getActivation(this, txnResource.getLcc()); EmbedConnection internalConnection = (EmbedConnection)EngineDriver.driver().getInternalConnection(); new EmbedConnectionContext(ContextService.getService().getCurrentContextManager(), internalConnection); if (reinit) { SpliceOperationContext context = SpliceOperationContext.newContext(activation); for (SpliceOperation so : operationsList) { so.init(context); } } } catch (Exception e) { throw new RuntimeException(e); } }
Source:
public synchronized void afterDisconnect(SlaveComputer slaveComputer, TaskListener listener) { if (connection != null) { boolean connectionLost = reportTransportLoss(connection, listener); if (session!=null) { try { listener.getLogger().println(getSessionOutcomeMessage(session,connectionLost)); session.getStdout().close(); session.close(); } catch (Throwable t) { t.printStackTrace(listener.error(Messages.SSHLauncher_ErrorWhileClosingConnection())); } session = null; } Slave n = slaveComputer.getNode(); if (n != null && !connectionLost) { String workingDirectory = getWorkingDirectory(n); String fileName = workingDirectory + "/slave.jar"; SFTPv3Client sftpClient = null; try { sftpClient = new SFTPv3Client(connection); sftpClient.rm(fileName); } catch (Exception e) { if (sftpClient == null) { try { connection.exec("rm " + fileName, listener.getLogger()); } catch (Throwable x) { x.printStackTrace(listener.error(Messages.SSHLauncher_ErrorDeletingFile(getTimestamp()))); } } else { e.printStackTrace(listener.error(Messages.SSHLauncher_ErrorDeletingFile(getTimestamp()))); } } finally { if (sftpClient != null) { sftpClient.close(); } } } PluginImpl.unregister(connection); cleanupConnection(listener); } }

Target:
public synchronized void afterDisconnect(SlaveComputer slaveComputer, TaskListener listener) { if (connection != null) { boolean connectionLost = reportTransportLoss(connection, listener); if (session!=null) { try { listener.getLogger().println(getSessionOutcomeMessage(session,connectionLost)); session.getStdout().close(); session.close(); } catch (Throwable t) { t.printStackTrace(listener.error(Messages.SSHLauncher_ErrorWhileClosingConnection())); } session = null; } Slave n = slaveComputer.getNode(); if (n != null && !connectionLost) { String workingDirectory = getWorkingDirectory(n); String fileName = workingDirectory + "/slave.jar"; SFTPv3Client sftpClient = null; try { sftpClient = new SFTPv3Client(connection); sftpClient.rm(fileName); } catch (Exception e) { if (sftpClient == null) { try { connection.exec("rm " + fileName, listener.getLogger()); } catch (Error error) { throw error; } catch (Throwable x) { x.printStackTrace(listener.error(Messages.SSHLauncher_ErrorDeletingFile(getTimestamp()))); } } else { e.printStackTrace(listener.error(Messages.SSHLauncher_ErrorDeletingFile(getTimestamp()))); } } finally { if (sftpClient != null) { sftpClient.close(); } } } PluginImpl.unregister(connection); cleanupConnection(listener); } }
Source:
public static void addNextRow( final Supplier<Committer> committerSupplier, final Firehose firehose, final Plumber plumber, final boolean reportParseExceptions, final FireDepartmentMetrics metrics ) { final InputRow inputRow; try { inputRow = firehose.nextRow(); } catch (ParseException | IOException e) { if (e instanceof ParseException && reportParseExceptions) { throw (ParseException) e; } else { log.debug(e, "Discarded row due to exception, considering unparseable."); metrics.incrementUnparseable(); return; } } if (inputRow == null) { log.debug("Discarded null row, considering thrownAway."); metrics.incrementThrownAway(); return; } final IncrementalIndexAddResult addResult; try { addResult = plumber.add(inputRow, committerSupplier); } catch (IndexSizeExceededException e) { throw new ISE(e, "WTF?! Index size exceeded, this shouldn't happen. Bad Plumber!"); } if (addResult.getRowCount() == -1) { metrics.incrementThrownAway(); log.debug("Discarded row[%s], considering thrownAway due to %s.", inputRow, addResult.getReasonOfNotAdded()); return; } if (addResult.getRowCount() == -2) { metrics.incrementDedup(); log.debug("Discarded row[%s], considering duplication.", inputRow); return; } metrics.incrementProcessed(); }

Target:
public static void addNextRow( final Supplier<Committer> committerSupplier, final Firehose firehose, final Plumber plumber, final boolean reportParseExceptions, final FireDepartmentMetrics metrics ) throws IOException { final InputRow inputRow; try { inputRow = firehose.nextRow(); } catch (ParseException e) { if (reportParseExceptions) { throw e; } else { log.debug(e, "Discarded row due to exception, considering unparseable."); metrics.incrementUnparseable(); return; } } if (inputRow == null) { log.debug("Discarded null row, considering thrownAway."); metrics.incrementThrownAway(); return; } final IncrementalIndexAddResult addResult; try { addResult = plumber.add(inputRow, committerSupplier); } catch (IndexSizeExceededException e) { throw new ISE(e, "WTF?! Index size exceeded, this shouldn't happen. Bad Plumber!"); } if (addResult.getRowCount() == -1) { metrics.incrementThrownAway(); log.debug("Discarded row[%s], considering thrownAway due to %s.", inputRow, addResult.getReasonOfNotAdded()); return; } if (addResult.getRowCount() == -2) { metrics.incrementDedup(); log.debug("Discarded row[%s], considering duplication.", inputRow); return; } metrics.incrementProcessed(); }