auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void impl(@Nonnull CorfuRuntime runtime) throws Exception { runtime.invalidateLayout(); Layout layout = runtime.getLayoutView().getLayout(); PrefixTrimRedundancyCalculator redundancyCalculator = new PrefixTrimRedundancyCalculator(currentNode, runtime); StateTransferManager transferManager = new StateTransferManager(streamLog, runtime.getParameters().getBulkReadSize()); LogUnitClientMap map = (CorfuRuntime rt) -> { Layout currentLayout = rt.getLayoutView().getLayout(); Set<String> allActiveServers = currentLayout.getAllActiveServers(); return allActiveServers.stream() .map(server -> { RuntimeLayout runtimeLayout = rt.getLayoutView().getRuntimeLayout(); return new Tuple<>(server, runtimeLayout.getLogUnitClient(server)); }) .collect(Collectors.toMap(tuple -> tuple.first, tuple -> tuple.second)); }; ImmutableList<TransferSegment> stateList = redundancyCalculator.createStateList(layout); log.info("State transfer on {}: Initial state list: {}", currentNode, stateList); while (RedundancyCalculator.requiresRedundancyRestoration(layout, currentNode) || RedundancyCalculator.requiresMerge(layout, currentNode)) { ProtocolBatchProcessor batchProcessor = ProtocolBatchProcessor .builder() .addressSpaceView(runtime.getAddressSpaceView()) .streamLog(streamLog) .build(); stateList = transferManager.handleTransfer(stateList, batchProcessor); RestoreStatus restoreStatus = restoreWithBackOff(stateList, runtime); if (restoreStatus == RESTORED) { log.info("State transfer on {}: Updating status map.", currentNode); layout = runtime.invalidateLayout().join(); ImmutableList<TransferSegment> newLayoutStateList = redundancyCalculator.createStateList(layout); stateList = redundancyCalculator.mergeLists(stateList, newLayoutStateList); } } log.info("State transfer on {}: Restored.", currentNode); }

Target:
public void impl(@Nonnull CorfuRuntime runtime) throws Exception { runtime.invalidateLayout(); Layout layout = runtime.getLayoutView().getLayout(); LogUnitClient logUnitClient = runtime.getLayoutView().getRuntimeLayout(layout).getLogUnitClient(currentNode); ProtocolBatchProcessor batchProcessor = ProtocolBatchProcessor .builder() .addressSpaceView(runtime.getAddressSpaceView()) .logUnitClient(logUnitClient) .build(); StateTransferManager transferManager = StateTransferManager .builder() .logUnitClient(logUnitClient) .batchSize(runtime.getParameters().getBulkReadSize()) .batchProcessor(batchProcessor) .build(); while (RedundancyCalculator.canRestoreRedundancyOrMergeSegments(layout, currentNode)) { layout = restoreWithBackOff(runtime, transferManager); } log.info("State transfer on {}: Restored.", currentNode); }
Source:
public static Color getSystemForegroundColor() { ColorRegistry colorRegistry = JFaceResources.getColorRegistry(); Color foreground = colorRegistry.get(JFacePreferences.INFORMATION_FOREGROUND_COLOR); if (foreground == null) { return JFaceColors.getInformationViewerForegroundColor(Display.getDefault()); } return foreground; }

Target:
private static Color getSystemForegroundColor() { ColorRegistry colorRegistry = JFaceResources.getColorRegistry(); Color foreground = colorRegistry.get(JFacePreferences.INFORMATION_FOREGROUND_COLOR); if (foreground == null) { return JFaceColors.getInformationViewerForegroundColor(Display.getDefault()); } return foreground; }
Source:
public Map<String, Object> calculateInputVariables(DelegateExecution execution) { ActivitExpressionParser parser = new ActivitExpressionParser(execution); ProcessExtensionModel extensions = processExtensionService.getExtensionsForId(execution.getProcessDefinitionId()); Map<String, Object> constants = parser.resolveExpressionsMap(calculateConstants(execution, extensions)); if (extensions.getExtensions().hasEmptyInputsMapping(execution.getCurrentActivityId())) { return constants; } Map<String, Object> inboudVariables; if (!extensions.getExtensions().hasMapping(execution.getCurrentActivityId())) { inboudVariables = execution.getVariables(); } else { inboudVariables = calculateInputVariables(execution, extensions); } inboudVariables = parser.resolveExpressionsMap(inboudVariables); inboudVariables.putAll(constants); return inboudVariables; }

Target:
public Map<String, Object> calculateInputVariables(DelegateExecution execution) { ProcessExtensionModel extensions = processExtensionService.getExtensionsForId(execution.getProcessDefinitionId()); Map<String, Object> constants = calculateConstants(execution, extensions); if (extensions.getExtensions().hasEmptyInputsMapping(execution.getCurrentActivityId())) { return constants; } Map<String, Object> inboudVariables; if (!extensions.getExtensions().hasMapping(execution.getCurrentActivityId())) { inboudVariables = execution.getVariables(); } else { inboudVariables = calculateInputVariables(execution, extensions); } inboudVariables = expressionResolver.resolveExpressionsMap(execution,inboudVariables); inboudVariables.putAll(constants); return inboudVariables; }
Source:
public boolean apply(final LineRange range) { return range != null && range.within(this.proposed); }

Target:
public boolean apply(final LineRange range) { return range != null && range.within(this.given); }
Source:
private boolean readyForAutosave(BibDatabaseContext context) { return ((context.getLocation() == DatabaseLocation.SHARED) || ((context.getLocation() == DatabaseLocation.LOCAL) && preferences.getBoolean(JabRefPreferences.LOCAL_AUTO_SAVE))) && context.getDatabasePath().isPresent(); }

Target:
private boolean readyForAutosave(BibDatabaseContext context) { return ((context.getLocation() == DatabaseLocation.SHARED) || ((context.getLocation() == DatabaseLocation.LOCAL) && preferences.shouldAutosave())) && context.getDatabasePath().isPresent(); }
Source:
public static Swap of(SwapLeg... legs) { ArgChecker.notNull(legs, "legs"); return Swap.builder() .legs(ImmutableList.copyOf(legs)) .build(); }

Target:
public static Swap of(SwapLeg... legs) { ArgChecker.notEmpty(legs, "legs"); return new Swap(ImmutableSet.copyOf(legs)); }
Source:
private void addShortcut(LayoutElementParcelable path) { final Context ctx = getActivity().getApplicationContext(); if (!ShortcutManagerCompat.isRequestPinShortcutSupported(ctx)) { Toast.makeText(getActivity(), getString(R.string.addshortcut_not_supported_by_launcher), Toast.LENGTH_SHORT).show(); return; } Intent shortcutIntent = new Intent(ctx, MainActivity.class); shortcutIntent.putExtra("path", path.desc); shortcutIntent.setAction(Intent.ACTION_MAIN); shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); ShortcutInfoCompat info = new ShortcutInfoCompat.Builder(ctx, path.desc) .setActivity(getMainActivity().getComponentName()) .setIcon(IconCompat.createWithResource(ctx, R.mipmap.ic_launcher)) .setIntent(shortcutIntent) .setLongLabel(path.desc) .setShortLabel(new File(path.desc).getName()) .build(); ShortcutManagerCompat.requestPinShortcut(ctx, info, null); }

Target:
private void addShortcut(LayoutElementParcelable path) { final Context ctx = getContext(); if (!ShortcutManagerCompat.isRequestPinShortcutSupported(ctx)) { Toast.makeText(getActivity(), getString(R.string.addshortcut_not_supported_by_launcher), Toast.LENGTH_SHORT).show(); return; } Intent shortcutIntent = new Intent(ctx, MainActivity.class); shortcutIntent.putExtra("path", path.desc); shortcutIntent.setAction(Intent.ACTION_MAIN); shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); ShortcutInfoCompat info = new ShortcutInfoCompat.Builder(ctx, path.desc) .setActivity(getMainActivity().getComponentName()) .setIcon(IconCompat.createWithResource(ctx, R.mipmap.ic_launcher)) .setIntent(shortcutIntent) .setLongLabel(path.desc) .setShortLabel(new File(path.desc).getName()) .build(); ShortcutManagerCompat.requestPinShortcut(ctx, info, null); }
Source:
private static void checkGeometryToBingTilesLimits(Geometry geometry, boolean pointOrRectangle, long tileCount) { if (pointOrRectangle) { checkCondition(tileCount <= 1_000_000, "The number of input tiles is too large (more than 1M) to compute a set of covering Bing tiles."); } else { checkCondition((int) tileCount == tileCount, "The zoom level is too high to compute a set of covering Bing tiles."); long complexity = 0; try { complexity = Math.multiplyExact(tileCount, getPointCount(geometry)); } catch (ArithmeticException e) { checkCondition(false, "The zoom level is too high or the geometry is too complex to compute a set of covering Bing tiles. " + "Please use a lower zoom level or convert the geometry to its bounding box using the ST_Envelope function."); } checkCondition(complexity <= 25_000_000, "The zoom level is too high or the geometry is too complex to compute a set of covering Bing tiles. " + "Please use a lower zoom level or convert the geometry to its bounding box using the ST_Envelope function."); } }

Target:
private static void checkGeometryToBingTilesLimits(Geometry geometry, boolean pointOrRectangle, long tileCount) { if (pointOrRectangle) { checkCondition(tileCount <= 1_000_000, "The number of input tiles is too large (more than 1M) to compute a set of covering Bing tiles."); } else { checkCondition((int) tileCount == tileCount, "The zoom level is too high to compute a set of covering Bing tiles."); long complexity = 0; try { complexity = multiplyExact(tileCount, getPointCount(geometry)); } catch (ArithmeticException e) { checkCondition(false, "The zoom level is too high or the geometry is too complex to compute a set of covering Bing tiles. " + "Please use a lower zoom level or convert the geometry to its bounding box using the ST_Envelope function."); } checkCondition(complexity <= 25_000_000, "The zoom level is too high or the geometry is too complex to compute a set of covering Bing tiles. " + "Please use a lower zoom level or convert the geometry to its bounding box using the ST_Envelope function."); } }
Source:
public String toString() { return toStringHelper() .add("clientId", clientId) .add("clientSecret", clientSecret) .add("refreshToken", refreshToken) .add("tokenServerUri", tokenServerUri) .add("transportFactoryClassName", transportFactoryClassName) .toString(); }

Target:
public String toString() { return toStringHelper() .add("clientId", clientId) .add("refreshToken", refreshToken) .add("tokenServerUri", tokenServerUri) .add("transportFactoryClassName", transportFactoryClassName) .toString(); }
Source:
@Test public void testDigestChallengeWithStrictRfc2617Header() { Headers headers = new Headers.Builder() .add("WWW-Authenticate", "Digest realm=\"myrealm\", nonce=\"fjalskdflwejrlaskdfjlaskdjflaks" + "jdflkasdf\", qop=\"auth\", stale=\"FALSE\"") .build(); List<Challenge> challenges = HttpHeadersKt.parseChallenges(headers, "WWW-Authenticate"); assertThat(challenges.size()).isEqualTo(1); assertThat(challenges.get(0).scheme()).isEqualTo("Digest"); assertThat(challenges.get(0).realm()).isEqualTo("myrealm"); Map<String, String> expectedAuthParams = new LinkedHashMap<>(); expectedAuthParams.put("realm", "myrealm"); expectedAuthParams.put("nonce", "fjalskdflwejrlaskdfjlaskdjflaksjdflkasdf"); expectedAuthParams.put("qop", "auth"); expectedAuthParams.put("stale", "FALSE"); assertThat(challenges.get(0).authParams()).isEqualTo(expectedAuthParams); }

Target:
@Test public void testDigestChallengeWithStrictRfc2617Header() { Headers headers = new Headers.Builder() .add("WWW-Authenticate", "Digest realm=\"myrealm\", nonce=\"fjalskdflwejrlaskdfjlaskdjflaks" + "jdflkasdf\", qop=\"auth\", stale=\"FALSE\"") .build(); List<Challenge> challenges = HttpHeaders.parseChallenges(headers, "WWW-Authenticate"); assertThat(challenges.size()).isEqualTo(1); assertThat(challenges.get(0).scheme()).isEqualTo("Digest"); assertThat(challenges.get(0).realm()).isEqualTo("myrealm"); Map<String, String> expectedAuthParams = new LinkedHashMap<>(); expectedAuthParams.put("realm", "myrealm"); expectedAuthParams.put("nonce", "fjalskdflwejrlaskdfjlaskdjflaksjdflkasdf"); expectedAuthParams.put("qop", "auth"); expectedAuthParams.put("stale", "FALSE"); assertThat(challenges.get(0).authParams()).isEqualTo(expectedAuthParams); }
Source:
public void changeBrand(Brand brand) { $("body").removeClass(); $("body").addClass(getStyle(brand)); setHomeHref(brand); setProductsHref(brand); }

Target:
public void changeBrand(Brand brand) { $(body).removeClass().addClass(getStyle(brand)); setHomeHref(brand); setProductsHref(brand); }
Source:
public void getPosition(Vector3f output) { LocationComponent location = entity.getComponent(LocationComponent.class); if (location == null) { output.x = 0; output.y = 0; output.z = 0; } else { location.getWorldPosition(output); } }

Target:
public Vector3f getPosition(Vector3f output) { LocationComponent location = entity.getComponent(LocationComponent.class); if (location == null) { output.x = 0; output.y = 0; output.z = 0; } else { location.getWorldPosition(output); } return output; }
Source:
private void processPMMLImport(DMNModelImpl model, Import i) { URI pmmlURI = null; try { pmmlURI = resolveRelativeURI(model, i.getLocationURI()); } catch (Exception e) { logger.warn("Error inspecting the imported PMML model", e); } if (pmmlURI == null) { return; } InputStream pmmlIS = null; try { pmmlIS = pmmlURI.isAbsolute() ? pmmlURI.toURL().openStream() : ((DMNCompilerConfigurationImpl) dmnCompilerConfig).getRootClassLoader().getResourceAsStream(pmmlURI.toString()); } catch (IOException e) { logger.warn("Error inspecting the imported PMML model", e); } Either<Exception, DMNImportPMMLInfo> pmml = DMNImportPMMLInfo.from(pmmlIS, model, i).cata(x -> { logger.warn("Error inspecting the imported PMML model", x); return null; }, x -> { model.addPMMLImportInfo(x); return null; }); }

Target:
private void processPMMLImport(DMNModelImpl model, Import i) { URL pmmlURL = pmmlImportURL(((DMNCompilerConfigurationImpl) dmnCompilerConfig).getRootClassLoader(), model, i, i); if (pmmlURL == null) { return; } try (InputStream pmmlIS = pmmlURL.openStream();) { DMNImportPMMLInfo.from(pmmlIS, model, i).consume(x -> new PMMLImportErrConsumer(model, i), model::addPMMLImportInfo); } catch (IOException e) { new PMMLImportErrConsumer(model, i).accept(e); } }
Source:
public ClientBuilder disableSSLAuthentication() { if(authenticatedModeSSLSocketFactory == null) { this.isSSLAuthenticationDisabled = true; } else { throw new IllegalStateException("SSLSocketFactory is not null. Please " + "create a ClientBuilder without a custom SSLSocketFactory."); } return this; }

Target:
public ClientBuilder disableSSLAuthentication() { if(authenticatedModeSSLSocketFactory == null) { this.isSSLAuthenticationDisabled = true; } else { throw new IllegalStateException("Cannot disable SSL authentication when a " + "custom SSLSocketFactory has been set."); } return this; }
Source:
private void copySaveDirectoryToRecordingLibrary(String gameTitle) { File saveDirectory = new File(PathManager.getInstance().getSavePath(gameTitle).toString()); Path destinationPath = PathManager.getInstance().getRecordingPath(gameTitle); File destDirectory = new File(destinationPath.toString()); try { FileUtils.copyDirectoryStructure(saveDirectory, destDirectory); } catch (Exception e) { logger.error(e.getMessage()); } }

Target:
private void copySaveDirectoryToRecordingLibrary(String gameTitle) { File saveDirectory = new File(PathManager.getInstance().getSavePath(gameTitle).toString()); Path destinationPath = PathManager.getInstance().getRecordingPath(gameTitle); File destDirectory = new File(destinationPath.toString()); try { FileUtils.copyDirectoryStructure(saveDirectory, destDirectory); } catch (Exception e) { logger.error("Error trying to copy the save directory:", e); } }
Source:
public Definition addProgramModule(Definition d) { Module programsModule = gen.getProgramsGrammar(d.mainSyntaxModule()).module(); java.util.Set<Module> allModules = mutable(d.modules()); allModules.add(programsModule); return Definition(d.mainModule(), programsModule, immutable(allModules)); }

Target:
public Definition addProgramModule(Definition d) { Module programsModule = gen.getProgramsGrammar(d.mainSyntaxModule()); java.util.Set<Module> allModules = mutable(d.modules()); allModules.add(programsModule); return Definition(d.mainModule(), programsModule, immutable(allModules)); }
Source:
private static CommandLine parseArgs(String[] args) { Options options = new Options(); options.addOption("p", "port", true, "Zookeeper port number to use"); options.addOption("l", "logDir", true, "Zookeeper logDir"); options.addOption("s", "snapshotDir", true, "Zookeeper snapshotDir"); CommandLineParser parser = new BasicParser(); CommandLine commandLine; try { commandLine = parser.parse(options, args); } catch (Exception e) { commandLine = null; LOG.error(e.getMessage()); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("EmbeddedZookeeper", "Start EmbeddedZookeeper for testing.", options, "go/datastream", true); } return commandLine; }

Target:
private static CommandLine parseArgs(String[] args) { Options options = new Options(); options.addOption("p", "port", true, "Zookeeper port number to use"); options.addOption("l", "logDir", true, "Zookeeper logDir"); options.addOption("s", "snapshotDir", true, "Zookeeper snapshotDir"); CommandLineParser parser = new BasicParser(); CommandLine commandLine; try { commandLine = parser.parse(options, args); } catch (Exception e) { commandLine = null; LOG.error(e.getMessage()); } return commandLine; }
Source:
private void checkResourceAccessible(Long accountId, Long domainId, String exceptionMessage) { Account caller = CallContext.current().getCallingAccount(); if ((domainId != null) && (domainId == -1)) { throw new CloudRuntimeException("Invalid DomainId : -1"); } if (accountId != null) { _accountMgr.checkAccess(caller, null, false, _accountMgr.getAccount(accountId)); } else if (domainId != null && !_accountMgr.isNormalUser(caller.getId())) { _accountMgr.checkAccess(caller, _domainMgr.getDomain(domainId)); } else { throw new PermissionDeniedException(exceptionMessage); } }

Target:
private void checkResourceAccessible(Long accountId, Long domainId, String exceptionMessage) { Account caller = CallContext.current().getCallingAccount(); if (Objects.equals(domainId, -1)) { throw new CloudRuntimeException("Invalid DomainId: -1"); } if (accountId != null) { _accountMgr.checkAccess(caller, null, false, _accountMgr.getAccount(accountId)); } else if (domainId != null && !_accountMgr.isNormalUser(caller.getId())) { _accountMgr.checkAccess(caller, _domainMgr.getDomain(domainId)); } else { throw new PermissionDeniedException(exceptionMessage); } }
Source:
public MockMethodInvocation(Object targetObject, Class clazz, String methodName, Class[] parameterTypes, Object[] arguments) throws NoSuchMethodException { this.method = clazz.getMethod(methodName, parameterTypes); this.targetObject = targetObject; this.arguments = arguments; }

Target:
public MockMethodInvocation(Object targetObject, Class clazz, String methodName, Class[] parameterTypes, Object[] arguments) throws NoSuchMethodException { this(targetObject, clazz, methodName, parameterTypes); this.arguments = arguments; }
Source:
public static ReplicationPeerConfig updateReplicationBasePeerConfigs(Configuration conf, ReplicationPeerConfig receivedPeerConfig) { String removeBasePeerConfigs = conf.get(HBASE_REPLICATION_PEER_REMOVE_BASE_CONFIG, ""); ReplicationPeerConfigBuilder copiedPeerConfigBuilder = ReplicationPeerConfig. newBuilder(receivedPeerConfig); if (removeBasePeerConfigs.length() != 0) { List<String> removeBasePeerConfigList = Splitter.on(';').trimResults() .omitEmptyStrings().splitToList(removeBasePeerConfigs); for (String peerConfigToRemove : removeBasePeerConfigList) { copiedPeerConfigBuilder.removeConfiguration(peerConfigToRemove); } } Map<String, String> receivedPeerConfigMap = receivedPeerConfig.getConfiguration(); String basePeerConfigs = conf.get(HBASE_REPLICATION_PEER_BASE_CONFIG, ""); if (basePeerConfigs.length() != 0) { Map<String, String> basePeerConfigMap = Splitter.on(';').trimResults().omitEmptyStrings() .withKeyValueSeparator("=").split(basePeerConfigs); for (Map.Entry<String, String> entry : basePeerConfigMap.entrySet()) { String configName = entry.getKey(); String configValue = entry.getValue(); if (!receivedPeerConfigMap.getOrDefault(configName, "").equals(configValue)) { copiedPeerConfigBuilder.putConfiguration(configName, configValue); } } } return copiedPeerConfigBuilder.build(); }

Target:
public static ReplicationPeerConfig updateReplicationBasePeerConfigs(Configuration conf, ReplicationPeerConfig receivedPeerConfig) { ReplicationPeerConfigBuilder copiedPeerConfigBuilder = ReplicationPeerConfig. newBuilder(receivedPeerConfig); Map<String, String> receivedPeerConfigMap = receivedPeerConfig.getConfiguration(); String basePeerConfigs = conf.get(HBASE_REPLICATION_PEER_BASE_CONFIG, ""); if (basePeerConfigs.length() != 0) { Map<String, String> basePeerConfigMap = Splitter.on(';').trimResults().omitEmptyStrings() .withKeyValueSeparator("=").split(basePeerConfigs); for (Map.Entry<String, String> entry : basePeerConfigMap.entrySet()) { String configName = entry.getKey(); String configValue = entry.getValue(); if (Strings.isNullOrEmpty(configValue)) { copiedPeerConfigBuilder.removeConfiguration(configName); } else if (!receivedPeerConfigMap.getOrDefault(configName, "").equals(configValue)) { copiedPeerConfigBuilder.putConfiguration(configName, configValue); } } } return copiedPeerConfigBuilder.build(); }
Source:
public void testHasPublicAccess() throws Exception { when(inheritedAclFactory.getPatronAccess(any(PID.class))).thenReturn(PatronAccess.everyone); filter.filter(dip); verify(idb).setStatus(listCaptor.capture()); assertTrue(listCaptor.getValue().contains(FacetConstants.PUBLIC_ACCESS)); }

Target:
public void testHasPublicAccess() throws Exception { principalRoles.put(AccessPrincipalConstants.PUBLIC_PRINC, new HashSet<String>()); when(inheritedAclFactory.getPrincipalRoles(any(PID.class))).thenReturn(principalRoles); filter.filter(dip); verify(idb).setStatus(listCaptor.capture()); assertTrue(listCaptor.getValue().contains(FacetConstants.PUBLIC_ACCESS)); assertFalse(listCaptor.getValue().contains(FacetConstants.STAFF_ONLY_ACCESS)); }
Source:
private static String getLoginFilePath() { String loginFile = PASchedulerProperties.SCHEDULER_LOGIN_FILENAME.getValueAsString(); if (!(new File(loginFile).isAbsolute())) { loginFile = PASchedulerProperties.SCHEDULER_HOME.getValueAsString() + File.separator + loginFile; } return loginFile; }

Target:
private static String getLoginFilePath() { return getSchedulerFile(PASchedulerProperties.SCHEDULER_LOGIN_FILENAME.getValueAsString()); }
Source:
public void visitArrayAssignmentPatternElement(ArrayAssignmentPatternElementTree tree) { visitAssignedVariable(tree.variable()); super.visitArrayAssignmentPatternElement(tree); }

Target:
public void visitArrayAssignmentPatternElement(ArrayAssignmentPatternElementTree tree) { if (visitAssignedVariable(tree.variable())) { Tree key = tree.key(); if (key != null) { visitAssignedVariable(key); } } else { super.visitArrayAssignmentPatternElement(tree); } }
Source:
public ListenableFuture<LookupSourceProvider> createLookupSourceProvider() { lock.writeLock().lock(); try { checkState(!destroyed.isDone(), "PartitionedLookupSourceFactory has been destroyed"); if (lookupSourceSupplier != null) { return immediateFuture(new SpillAwareLookupSourceProvider()); } SettableFuture<LookupSourceProvider> lookupSourceFuture = SettableFuture.create(); lookupSourceFutures.add(lookupSourceFuture); return lookupSourceFuture; } finally { lock.writeLock().unlock(); } }

Target:
public ListenableFuture<LookupSourceProvider> createLookupSourceProvider() { lock.writeLock().lock(); try { checkState(!destroyed.isDone(), "already destroyed"); if (lookupSourceSupplier != null) { return immediateFuture(new SpillAwareLookupSourceProvider()); } SettableFuture<LookupSourceProvider> lookupSourceFuture = SettableFuture.create(); lookupSourceFutures.add(lookupSourceFuture); return lookupSourceFuture; } finally { lock.writeLock().unlock(); } }
Source:
public void testScheduleAndDisableCompaction() throws Exception { MockDataNodeId dataNode = clusterMap.getDataNodes().get(0); List<ReplicaId> replicas = clusterMap.getReplicaIds(dataNode); List<MockDataNodeId> dataNodes = new ArrayList<>(); dataNodes.add(dataNode); MockPartitionId invalidPartition = new MockPartitionId(Long.MAX_VALUE, dataNodes, 0); List<? extends ReplicaId> replicaIds = invalidPartition.getReplicaIds(); StorageManager storageManager = createStorageManager(replicas, metricRegistry); storageManager.start(); replicas.add(replicaIds.get(0)); for (int i = 0; i < replicas.size() - 1; i++) { ReplicaId replica = replicas.get(i); PartitionId id = replica.getPartitionId(); assertTrue("Schedule compaction should succeed", storageManager.scheduleNextForCompaction(id)); if (i == replicas.size() - 1) { assertFalse("Schedule compaction should fail", storageManager.scheduleNextForCompaction(id)); assertFalse("Disable compaction should fail", storageManager.disableCompactionForBlobStore(id)); } } ReplicaId replica = replicas.get(0); PartitionId id = replica.getPartitionId(); assertTrue("Disable compaction should succeed", storageManager.disableCompactionForBlobStore(id)); assertFalse("Schedule compaction should fail", storageManager.scheduleNextForCompaction(id)); replica = replicas.get(1); id = replica.getPartitionId(); assertTrue("Schedule compaction should succeed", storageManager.scheduleNextForCompaction(id)); replicas.remove(replicas.size() - 1); shutdownAndAssertStoresInaccessible(storageManager, replicas); }

Target:
public void testScheduleAndDisableCompaction() throws Exception { MockDataNodeId dataNode = clusterMap.getDataNodes().get(0); List<ReplicaId> replicas = clusterMap.getReplicaIds(dataNode); List<MockDataNodeId> dataNodes = new ArrayList<>(); dataNodes.add(dataNode); MockPartitionId invalidPartition = new MockPartitionId(Long.MAX_VALUE, dataNodes, 0); List<? extends ReplicaId> invalidPartitionReplicas = invalidPartition.getReplicaIds(); StorageManager storageManager = createStorageManager(replicas, metricRegistry); storageManager.start(); replicas.add(invalidPartitionReplicas.get(0)); for (int i = 0; i < replicas.size() - 1; i++) { ReplicaId replica = replicas.get(i); PartitionId id = replica.getPartitionId(); assertTrue("Schedule compaction should succeed", storageManager.scheduleNextForCompaction(id)); if (i == replicas.size() - 1) { assertFalse("Schedule compaction should fail", storageManager.scheduleNextForCompaction(id)); assertFalse("Disable compaction should fail", storageManager.disableCompactionForBlobStore(id)); } } ReplicaId replica = replicas.get(0); PartitionId id = replica.getPartitionId(); assertTrue("Disable compaction should succeed", storageManager.disableCompactionForBlobStore(id)); assertFalse("Schedule compaction should fail", storageManager.scheduleNextForCompaction(id)); replica = replicas.get(1); id = replica.getPartitionId(); assertTrue("Schedule compaction should succeed", storageManager.scheduleNextForCompaction(id)); replicas.remove(replicas.size() - 1); shutdownAndAssertStoresInaccessible(storageManager, replicas); }
Source:
public OperationFuture<LoadBalancerPool> update(LoadBalancerPool loadBalancerPool, LoadBalancerPoolConfig config) { LoadBalancer loadBalancer = config.getLoadBalancer(); loadBalancerPoolClient.update( fetchDataCenterId(loadBalancer.getDataCenter()), fetchLoadBalancerId(loadBalancer), findByRef(loadBalancerPool).getId(), new LoadBalancerPoolRequest() .method(config.getMethod()) .persistence(config.getPersistence()) ); return new OperationFuture<>( loadBalancerPool, new NoWaitingJobFuture() ); }

Target:
public OperationFuture<LoadBalancerPool> update(LoadBalancerPool loadBalancerPool, LoadBalancerPoolConfig config) { LoadBalancerPoolMetadata loadBalancerPoolMetadata = findByRef(loadBalancerPool); loadBalancerPoolClient.update( loadBalancerPoolMetadata.getDataCenterId(), loadBalancerPoolMetadata.getLoadBalancerId(), loadBalancerPoolMetadata.getId(), new LoadBalancerPoolRequest() .method(config.getMethod()) .persistence(config.getPersistence()) ); return new OperationFuture<>( loadBalancerPool, new NoWaitingJobFuture() ); }
Source:
public void testWithDeclaration() throws Exception { ApplicationXMLFormatter xmlFormatter = new ApplicationXMLFormatter(); MessageContext messageContext = new MessageContext(); messageContext.setProperty("WRITE_XML_DECLARATION", "true"); createPayload(messageContext); OMOutputFormat format = new OMOutputFormat(); format.setCharSetEncoding(StandardCharsets.UTF_8.toString()); ByteArrayOutputStream baos = new ByteArrayOutputStream(); xmlFormatter.writeTo(messageContext, format, baos, true); String output = new String(baos.toByteArray()); assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" ?><hello>world</hello>", output); }

Target:
public void testWithDeclaration() throws Exception { ApplicationXMLFormatter xmlFormatter = new ApplicationXMLFormatter(); MessageContext messageContext = new MessageContext(); messageContext.setProperty("WRITE_XML_DECLARATION", "true"); createPayload(messageContext); OMOutputFormat format = new OMOutputFormat(); format.setCharSetEncoding(StandardCharsets.UTF_8.toString()); ByteArrayOutputStream baos = new ByteArrayOutputStream(); xmlFormatter.writeTo(messageContext, format, baos, true); String output = new String(baos.toByteArray()); assertEquals("Compare payload with default XML declaration", "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><hello>world</hello>", output); }
Source:
public static ClientChatMode of(int data) { ClientChatMode mode = dataToMode.get(data); if (mode == null) throw new IllegalArgumentException("no client chat mode with id=" + data); return mode; }

Target:
public static ClientChatMode of(int data) { ClientChatMode mode = dataToMode.get(data); if (mode == null) { throw new IllegalArgumentException("no client chat mode with id=" + data); } return mode; }
Source:
public File newFolder(String... paths) throws IOException { File root = getRoot(); for (String path : paths) { if (new File(path).isAbsolute()) { throw new IOException("folder path \'" + path + "\' is not a relative path"); } } File relativePath = null; File file = root; boolean lastMkdirsCallSuccessful = true; for (int i = 0; i < paths.length; i++) { relativePath = relativePath == null ? new File(paths[i]) : new File(relativePath, paths[i]); file = new File(root, relativePath.getPath()); lastMkdirsCallSuccessful = file.mkdirs(); if (!lastMkdirsCallSuccessful && !file.isDirectory()) { throw new IOException( "could not create a folder with the path \'" + relativePath.getPath() + "\'"); } } if (!lastMkdirsCallSuccessful) { throw new IOException( "a folder with the path \'" + relativePath.getPath() + "\' already exists"); } return file; }

Target:
public File newFolder(String... paths) throws IOException { if (paths.length == 0) { throw new IllegalArgumentException("must pass at least one path"); } File root = getRoot(); for (String path : paths) { if (new File(path).isAbsolute()) { throw new IOException("folder path \'" + path + "\' is not a relative path"); } } File relativePath = null; File file = root; boolean lastMkdirsCallSuccessful = true; for (int i = 0; i < paths.length; i++) { relativePath = new File(relativePath, paths[i]); file = new File(root, relativePath.getPath()); lastMkdirsCallSuccessful = file.mkdirs(); if (!lastMkdirsCallSuccessful && !file.isDirectory()) { throw new IOException( "could not create a folder with the path \'" + relativePath.getPath() + "\'"); } } if (!lastMkdirsCallSuccessful) { throw new IOException( "a folder with the path \'" + relativePath.getPath() + "\' already exists"); } return file; }
Source:
public final void aggregateEndOfStream(EndOfStreamMessage eos, SystemStreamPartition ssp, MessageCollector collector, TaskCoordinator coordinator) { LOG.info("Received end-of-stream message from task in {}", eos.getTaskName(), ssp); eosStates.update(eos, ssp); SystemStream stream = ssp.getSystemStream(); if (eosStates.isEndOfStream(stream)) { LOG.info("Input reaches the end for task {}", stream.toString(), taskName.getTaskName()); if (eos.getTaskName() != null) { controlMessageSender.broadcast(new EndOfStreamMessage(), ssp, collector); } onEndOfStream(collector, coordinator); if (eosStates.allEndOfStream()) { LOG.info("All input streams have reached the end for task {}", taskName.getTaskName()); coordinator.commit(TaskCoordinator.RequestScope.CURRENT_TASK); coordinator.shutdown(TaskCoordinator.RequestScope.CURRENT_TASK); } } }

Target:
public final void aggregateEndOfStream(EndOfStreamMessage eos, SystemStreamPartition ssp, MessageCollector collector, TaskCoordinator coordinator) { LOG.info("Received end-of-stream message from task in {}", eos.getTaskName(), ssp); eosStates.update(eos, ssp); SystemStream stream = ssp.getSystemStream(); if (eosStates.isEndOfStream(stream)) { LOG.info("Input reaches the end for task {}", stream.toString(), taskName.getTaskName()); if (eos.getTaskName() != null) { controlMessageSender.broadcastToOtherPartitions(new EndOfStreamMessage(), ssp, collector); } onEndOfStream(collector, coordinator); if (eosStates.allEndOfStream()) { LOG.info("All input streams have reached the end for task {}", taskName.getTaskName()); coordinator.commit(TaskCoordinator.RequestScope.CURRENT_TASK); coordinator.shutdown(TaskCoordinator.RequestScope.CURRENT_TASK); } } }
Source:
public <T> Match<T> matchWith(WithPattern<T> withPattern, Object object, Captures captures) { Function<? super T, Optional<?>> property = withPattern.getProperty(); Optional<?> propValue = property.apply((T) object); Optional<?> resolvedValue = propValue .map(value -> value instanceof GroupReference ? lookup.resolve(((GroupReference) value)) : value); Match<?> propertyMatch = resolvedValue .map(value -> match(withPattern.getPattern(), value, captures)) .orElse(Match.empty()); return propertyMatch.map(ignored -> (T) object); }

Target:
public <T> Match<T> matchWith(WithPattern<T> withPattern, Object object, Captures captures) { Function<? super T, Optional<?>> property = withPattern.getProperty(); Optional<?> propertyValue = property.apply((T) object); Optional<?> resolvedValue = propertyValue .map(value -> value instanceof GroupReference ? lookup.resolve(((GroupReference) value)) : value); Match<?> propertyMatch = resolvedValue .map(value -> match(withPattern.getPattern(), value, captures)) .orElse(Match.empty()); return propertyMatch.map(ignored -> (T) object); }
Source:
private void verifyHBound(H h) { Truth.assertThat(h.button1).isNotNull(); Truth.assertThat(h.button2).isNotNull(); Truth.assertThat(h.button3).isNotNull(); }

Target:
private void verifyHBound(H h) { assertThat(h.button1).isNotNull(); assertThat(h.button2).isNotNull(); assertThat(h.button3).isNotNull(); }
Source:
private JavaRDD<AffMatchResult> doMatch(JavaSparkContext sc, JavaRDD<AffMatchAffiliation> normalizedAffiliations, JavaRDD<AffMatchOrganization> normalizedOrganizations) { JavaPairRDD<String, AffMatchResult> allMatchedAffOrgsWithKey = sc.parallelizePairs(new ArrayList<>()); for (AffOrgMatcher affOrgMatcher : affOrgMatchers) { JavaRDD<AffMatchResult> matchedAffOrgs = affOrgMatcher.match(normalizedAffiliations, normalizedOrganizations); JavaPairRDD<String, AffMatchResult> matchedAffOrgsWithKey = matchedAffOrgs .keyBy(x -> x.getAffiliation().getId() + AFF_ORG_ID_SEPARATOR + x.getOrganization().getId()); allMatchedAffOrgsWithKey = allMatchedAffOrgsWithKey.union(matchedAffOrgsWithKey); } JavaRDD<AffMatchResult> allMatchedAffOrgs = allMatchedAffOrgsWithKey .reduceByKey((r1, r2) -> affMatchResultChooser.chooseBetter(r1, r2)) .values(); return allMatchedAffOrgs; }

Target:
private JavaRDD<AffMatchResult> doMatch(JavaSparkContext sc, JavaRDD<AffMatchAffiliation> normalizedAffiliations, JavaRDD<AffMatchOrganization> normalizedOrganizations) { JavaPairRDD<Tuple2<String, String>, AffMatchResult> allMatchedAffOrgsWithKey = sc.parallelizePairs(new ArrayList<>()); for (AffOrgMatcher affOrgMatcher : affOrgMatchers) { JavaRDD<AffMatchResult> matchedAffOrgs = affOrgMatcher.match(normalizedAffiliations, normalizedOrganizations); JavaPairRDD<Tuple2<String, String>, AffMatchResult> matchedAffOrgsWithKey = matchedAffOrgs .keyBy(x -> new Tuple2<>(x.getAffiliation().getId(), x.getOrganization().getId())); allMatchedAffOrgsWithKey = allMatchedAffOrgsWithKey.union(matchedAffOrgsWithKey); } JavaRDD<AffMatchResult> allMatchedAffOrgs = allMatchedAffOrgsWithKey .reduceByKey((r1, r2) -> affMatchResultChooser.chooseBetter(r1, r2)) .values(); return allMatchedAffOrgs; }
Source:
private void send(final Iterable<String> xemblies) throws IOException { final StringBuilder bodyBuilder = new StringBuilder("Action=SendMessageBatch&Version=2011-10-01&"); final List<String> postMessages = new ArrayList<String>(); final List<String> messages = this.jsonMessages(xemblies); for (int identifier = 0; identifier < messages.size(); ++identifier) { postMessages.add( String.format( "SendMessageBatchRequestEntry.%1$d.Id=%1$d&SendMessageBatchRequestEntry.%1$d.MessageBody=%2$s", identifier + 1, URLEncoder.encode( messages.get(identifier), CharEncoding.UTF_8 ) ) ); } bodyBuilder.append(StringUtils.join(postMessages, '&')); final String body = bodyBuilder.toString(); try { final List<String> idsNotSent = this.queue .header(HttpHeaders.CONTENT_ENCODING, CharEncoding.UTF_8) .header( HttpHeaders.CONTENT_LENGTH, body.getBytes(CharEncoding.UTF_8).length ) .header( HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED ) .post( String.format( "sending %d lines to stand SQS queue", messages.size() ), body ) .assertStatus(HttpURLConnection.HTTP_OK) .xpath("/SendMessageBatchResponse/BatchResultError/BatchResultErrorEntry/Id/text()"); if ((idsNotSent != null) && !idsNotSent.isEmpty()) { throw new IOException( String.format( "Problem sending %d messages", idsNotSent.size() ) ); } } catch (AssertionError ex) { throw new IOException(ex); } }

Target:
private void send(final Iterable<String> xemblies) throws IOException { final StringBuilder builder = new StringBuilder("Action=SendMessageBatch&Version=2011-10-01&"); final List<String> postMessages = new ArrayList<String>(); final List<String> messages = this.jsons(xemblies); for (int identifier = 0; identifier < messages.size(); ++identifier) { postMessages.add( String.format( "SendMessageBatchRequestEntry.%d.Id=%<d&SendMessageBatchRequestEntry.%<d.MessageBody=%s", identifier + 1, URLEncoder.encode( messages.get(identifier), CharEncoding.UTF_8 ) ) ); } builder.append(StringUtils.join(postMessages, '&')); final String body = builder.toString(); try { final List<String> missed = this.entry.get() .header(HttpHeaders.CONTENT_ENCODING, CharEncoding.UTF_8) .header( HttpHeaders.CONTENT_LENGTH, body.getBytes(CharEncoding.UTF_8).length ) .header( HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED ) .post( String.format( "sending %d lines to stand SQS queue", messages.size() ), body ) .assertStatus(HttpURLConnection.HTTP_OK) .xpath("/SendMessageBatchResponse/BatchResultError/BatchResultErrorEntry/Id/text()"); if (!missed.isEmpty()) { throw new IOException( String.format( "Problem sending %d messages", missed.size() ) ); } } catch (AssertionError ex) { throw new IOException(ex); } }
Source:
public final void setConf(final Configuration conf) { checkNotNull(conf); if (!init) { try { this.conf = conf; useOptimal = ConfigUtils.getUseOptimalPCJ(conf); if(conf instanceof MongoDBRdfConfiguration) { final MongoDBRdfConfiguration mongoConf = new MongoDBRdfConfiguration(conf); final MongoClient client; if(mongoConf.getMongoClient() == null) { client = MongoConnectorFactory.getMongoClient(mongoConf); mongoConf.setMongoClient(client); } provider = new MongoPcjIndexSetProvider(mongoConf, mongoConf.getMongoClient()); } else { provider = new AccumuloIndexSetProvider(conf); } } catch (final Exception e) { throw new Error(e); } init = true; } }

Target:
public final void setConf(final Configuration conf) { checkNotNull(conf); if (!init) { try { this.conf = conf; useOptimal = ConfigUtils.getUseOptimalPCJ(conf); if (conf instanceof StatefulMongoDBRdfConfiguration) { final StatefulMongoDBRdfConfiguration mongoConf = (StatefulMongoDBRdfConfiguration) conf; provider = new MongoPcjIndexSetProvider(mongoConf); } else { provider = new AccumuloIndexSetProvider(conf); } } catch (final Exception e) { throw new Error(e); } init = true; } }
Source:
private String decrypt(String value) { try { return sHelper.decrypt(value); } catch (Exception e) { Logger.e(TAG, "Decryption failure", "", ADALError.ENCRYPTION_FAILED, e); Logger.v(TAG, String.format("Decryption error for key: '%s'. Item will be removed", value)); removeItem(value); Logger.v(TAG, String.format("Item removed for key: '%s'", value)); } return null; }

Target:
private String decrypt(String value) { try { return sHelper.decrypt(value); } catch (Exception e) { Logger.e(TAG, "Decryption failure", "", ADALError.ENCRYPTION_FAILED, e); if (!StringExtensions.IsNullOrBlank(value)) { Logger.v(TAG, String.format("Decryption error for key: '%s'. Item will be removed", value)); removeItem(value); Logger.v(TAG, String.format("Item removed for key: '%s'", value)); } } return null; }
Source:
protected void failAttempt(RaftMemberContext member, RaftRequest request, Throwable error) { super.failAttempt(member, request, error); if (member.getFailureCount() >= 3 && System.currentTimeMillis() - Math.max(getHeartbeatTime(), leaderTime) > raft.getElectionTimeout().toMillis() * 2) { log.warn("Suspected network partition. Stepping down"); raft.setLeader(null); raft.transition(RaftServer.Role.FOLLOWER); } }

Target:
protected void failAttempt(RaftMemberContext member, RaftRequest request, Throwable error) { super.failAttempt(member, request, error); failHeartbeat(); if (member.getFailureCount() >= MIN_STEP_DOWN_FAILURE_COUNT && System.currentTimeMillis() - Math.max(computeHeartbeatTime(), leaderTime) > electionTimeout * 2) { log.warn("Suspected network partition. Stepping down"); raft.setLeader(null); raft.transition(RaftServer.Role.FOLLOWER); } }
Source:
public void handleMessage(SoapMessage msg) throws Fault { BundleContext context = getContext(); PhaseInterceptor anonIntercep = null; ServiceReference anonIntercepRef = context.getServiceReference(PhaseInterceptor.class.getName()); if (anonIntercepRef != null) { anonIntercep = (PhaseInterceptor) context.getService(anonIntercepRef); } if (anonIntercep != null) { anonIntercep.handleMessage(msg); } else { LOGGER.debug("Anonymous Interceptor is not installed, ignoring"); } }

Target:
public void handleMessage(SoapMessage msg) throws Fault { BundleContext context = getContext(); PhaseInterceptor anonIntercep = null; Collection<ServiceReference<PhaseInterceptor>> anonIntercepRefs = null; if (context != null) { try { anonIntercepRefs = context.getServiceReferences(PhaseInterceptor.class, "(interceptor=anonymous)"); } catch (InvalidSyntaxException e) { } if (anonIntercepRefs != null && anonIntercepRefs.size() > 0) { Iterator<ServiceReference<PhaseInterceptor>> iterator = anonIntercepRefs.iterator(); anonIntercep = context.getService(iterator.next()); } if (anonIntercep != null) { anonIntercep.handleMessage(msg); } else { LOGGER.debug("Anonymous Interceptor is not installed, ignoring"); } } else { LOGGER.debug("Unable to acquire bundle context for anonymous interceptor"); } }
Source:
public static void tearDownClass() throws Exception { InstrumentationRegistry.getInstrumentation().getUiAutomation() .executeShellCommand("svc wifi enable"); }

Target:
public static void tearDownClass() throws Exception { if (!isSupported()) return; InstrumentationRegistry.getInstrumentation().getUiAutomation() .executeShellCommand("svc wifi enable"); }
Source:
public InvokableBuilder<ResultValue> inline(Boolean value) { inline = true; return this; }

Target:
public InvokableBuilder<ResultValue> inline(Boolean value) { inline = value; return this; }
Source:
private void logSuccessResponseObject(Object object, String url, long callDelay) { LogLevel logLevel = restAdapter.logLevel; RestAdapter.Log log = restAdapter.log; Converter converter = restAdapter.converter; if (logLevel.log()) { log.log(String.format("<--- MOCK 200 %s (%sms)", url, callDelay)); if (logLevel.ordinal() >= LogLevel.FULL.ordinal()) { if (object == null) { log.log("null"); } else if (converter instanceof LoggingConverter) { LoggingConverter loggingConverter = (LoggingConverter) converter; if (mockRxSupport != null) { object = mockRxSupport.maybeUnwrap(object); } log.log(loggingConverter.bodyToString(object)); } else { log.log("(converter unable to log)"); } log.log("<--- END MOCK"); } } }

Target:
private void logSuccessResponseObject(Object object, String url, long callDelay) { LogLevel logLevel = restAdapter.logLevel; RestAdapter.Log log = restAdapter.log; Converter converter = restAdapter.converter; if (logLevel.log()) { log.log(String.format("<--- MOCK 200 %s (%sms)", url, callDelay)); if (logLevel.ordinal() >= LogLevel.FULL.ordinal()) { if (object == null) { log.log("null"); } else if (converter instanceof LoggingConverter) { LoggingConverter loggingConverter = (LoggingConverter) converter; if (mockRxSupport != null) { object = mockRxSupport.maybeUnwrap(object); } log.log(loggingConverter.bodyToLogString(object)); } else { log.log("(converter unable to log)"); } log.log("<--- END MOCK"); } } }
Source:
public Startpoint fromBytes(byte[] bytes) { try { LinkedHashMap<String, String> deserialized = mapper.readValue(bytes, LinkedHashMap.class); return mapper.readValue(deserialized.get(STARTPOINT_OBJ), registry.get(deserialized.get(STARTPOINT_CLASS))); } catch (Exception e) { throw new SamzaException(String.format("Exception in de-serializing startpoint bytes: %s", Arrays.toString(bytes)), e); } }

Target:
public Startpoint fromBytes(byte[] bytes) { try { LinkedHashMap<String, String> deserialized = mapper.readValue(bytes, LinkedHashMap.class); Class<? extends Startpoint> startpointClass = (Class<? extends Startpoint>) Class.forName(deserialized.get(STARTPOINT_CLASS)); return mapper.readValue(deserialized.get(STARTPOINT_OBJ), startpointClass); } catch (Exception e) { throw new SamzaException(String.format("Exception in de-serializing startpoint bytes: %s", Arrays.toString(bytes)), e); } }
Source:
public void testNonGetterValidationDoesNotOccur() throws Exception { try { assertNull( repeater.repeat( null ) ); } catch ( ConstraintViolationException e ) { fail( "CDI method interceptor should not thrown an exception" ); } }

Target:
public void testNonGetterValidationDoesNotOccur() throws Exception { try { assertNull( repeater.repeat( null ) ); } catch ( ConstraintViolationException e ) { fail( "CDI method interceptor should not throw an exception" ); } }
Source:
public void traceClosed(@Nullable TmfTraceClosedSignal signal) { cancelUpdate(); super.traceClosed(signal); setDataProvider(null); if (signal != null) { fXYPresentationProvider.remove(signal.getTrace().getUUID()); } }

Target:
public void traceClosed(@Nullable TmfTraceClosedSignal signal) { cancelUpdate(); super.traceClosed(signal); setDataProvider(null); if (signal != null) { fXYPresentationProvider.remove(signal.getTrace()); } }
Source:
public ByteBuffer compress(IteratorSetting[] iterators) { UnsynchronizedBuffer.Writer out = new UnsynchronizedBuffer.Writer(iterators.length * 8); out.writeVInt(iterators.length); for (IteratorSetting is : iterators) { out.writeVInt(getSymbolID(is.getName())); out.writeVInt(getSymbolID(is.getIteratorClass())); out.writeVInt(is.getPriority()); Map<String,String> opts = is.getOptions(); out.writeVInt(opts.size()); if (!opts.isEmpty()) { opts.forEach((k, v) -> { out.writeVInt(getSymbolID(k)); out.writeVInt(getSymbolID(v)); }); } } return out.toByteBuffer(); }

Target:
public ByteBuffer compress(IteratorSetting[] iterators) { UnsynchronizedBuffer.Writer out = new UnsynchronizedBuffer.Writer(iterators.length * 8); out.writeVInt(iterators.length); for (IteratorSetting is : iterators) { out.writeVInt(getSymbolID(is.getName())); out.writeVInt(getSymbolID(is.getIteratorClass())); out.writeVInt(is.getPriority()); Map<String,String> opts = is.getOptions(); out.writeVInt(opts.size()); opts.forEach((key, value) -> { out.writeVInt(getSymbolID(key)); out.writeVInt(getSymbolID(value)); }); } return out.toByteBuffer(); }