auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public List<NameValuePair> getTopTokenRealOwners(int n) { Map<String, Integer> tokenOwnerMap = new HashMap<>(); for (TokenIdent id : currentTokens.keySet()) { String realUser; if (id.getRealUser() != null && !id.getRealUser().toString().isEmpty()) { realUser = id.getRealUser().toString(); } else { realUser = id.getUser().getUserName(); } tokenOwnerMap.put(realUser, tokenOwnerMap.getOrDefault(realUser, 0)+1); } n = Math.min(n, tokenOwnerMap.size()); if (n == 0) { return new LinkedList<>(); } TopN topN = new TopN(n); for (Map.Entry<String, Integer> entry : tokenOwnerMap.entrySet()) { topN.offer(new NameValuePair( entry.getKey(), entry.getValue())); } List<NameValuePair> list = new LinkedList<>(); while (!topN.isEmpty()) { list.add(topN.poll()); } Collections.reverse(list); return list; }

Target:
public List<NameValuePair> getTopTokenRealOwners(int n) { n = Math.min(n, tokenOwnerStats.size()); if (n == 0) { return new ArrayList<>(); } TopN topN = new TopN(n); for (Map.Entry<String, Long> entry : tokenOwnerStats.entrySet()) { topN.offer(new NameValuePair( entry.getKey(), entry.getValue())); } List<NameValuePair> list = new ArrayList<>(); while (!topN.isEmpty()) { list.add(topN.poll()); } Collections.reverse(list); return list; }
Source:
private static void asyncRemoveFromBatchlog(ReplicaPlan.ForTokenWrite replicaPlan, UUID uuid) { MessageOut<UUID> message = new MessageOut<>(MessagingService.Verb.BATCH_REMOVE, uuid, UUIDSerializer.serializer); for (Replica target : replicaPlan.contacts()) { if (logger.isTraceEnabled()) logger.trace("Sending batchlog remove request to {}", uuid, target); if (target.isLocal()) performLocally(Stage.MUTATION, target, () -> BatchlogManager.remove(uuid)); else MessagingService.instance().sendOneWay(message, target.endpoint()); } }

Target:
private static void asyncRemoveFromBatchlog(ReplicaPlan.ForTokenWrite replicaPlan, UUID uuid) { MessageOut<UUID> message = new MessageOut<>(MessagingService.Verb.BATCH_REMOVE, uuid, UUIDSerializer.serializer); for (Replica target : replicaPlan.contacts()) { if (logger.isTraceEnabled()) logger.trace("Sending batchlog remove request to {}", uuid, target); if (target.isSelf()) performLocally(Stage.MUTATION, target, () -> BatchlogManager.remove(uuid)); else MessagingService.instance().sendOneWay(message, target.endpoint()); } }
Source:
protected IRunnableWithProgress createOperation(final IStatus[] errorStatus) { return monitor -> { IResource[] resources = getActionResources() .toArray(new IResource[getActionResources().size()]); if (resources.length == 1) { IWorkspaceRoot workspaceRoot = resources[0].getWorkspace() .getRoot(); IResource newResource = workspaceRoot.findMember(newPath); boolean go = true; if (newResource != null) { go = checkOverwrite(getShell(), newResource); } if (go) { MoveResourcesOperation op = new MoveResourcesOperation(resources[0], newPath, IDEWorkbenchMessages.RenameResourceAction_operationTitle); op.setModelProviderIds(getModelProviderIds()); try { PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(op, monitor, WorkspaceUndoUtil.getUIInfoAdapter(getShell())); } catch (ExecutionException e) { IDEWorkbenchPlugin.log(e.toString()); if (e.getCause() instanceof CoreException) { errorStatus[0] = ((CoreException) e.getCause()) .getStatus(); } else { errorStatus[0] = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, getProblemsMessage(), e); } } } } }; }

Target:
protected IRunnableWithProgress createOperation(final IStatus[] errorStatus) { return monitor -> { IResource[] resources = getActionResources() .toArray(new IResource[getActionResources().size()]); if (resources.length == 1) { IWorkspaceRoot workspaceRoot = resources[0].getWorkspace() .getRoot(); IResource newResource = workspaceRoot.findMember(newPath); boolean go = true; if (newResource != null) { go = checkOverwrite(getShell(), newResource); } if (go) { MoveResourcesOperation op = new MoveResourcesOperation(resources[0], newPath, IDEWorkbenchMessages.RenameResourceAction_operationTitle); op.setModelProviderIds(getModelProviderIds()); try { PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(op, monitor, WorkspaceUndoUtil.getUIInfoAdapter(getShell())); } catch (ExecutionException e) { IDEWorkbenchPlugin.log(e.getMessage(), e); if (e.getCause() instanceof CoreException) { errorStatus[0] = ((CoreException) e.getCause()) .getStatus(); } else { errorStatus[0] = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, getProblemsMessage(), e); } } } } }; }
Source:
private FileRepository newTestRepositoryWithOnePackfile() throws Exception { FileRepository repository = createBareRepository(); TestRepository<FileRepository> testRepository = new TestRepository(repository); testRepository.commit(); testRepository.packAndPrune(); FileBasedConfig repoConfig = repository.getConfig(); repoConfig.setBoolean(ConfigConstants.CONFIG_CORE_SECTION,null, ConfigConstants.CONFIG_KEY_TRUSTFOLDERSTAT, trustFolderStats); repoConfig.save(); return repository; }

Target:
private FileRepository newTestRepositoryWithOnePackfile() throws Exception { FileRepository repository = createBareRepository(); TestRepository<FileRepository> testRepository = new TestRepository<FileRepository>(repository); testRepository.commit(); testRepository.packAndPrune(); FileBasedConfig repoConfig = repository.getConfig(); repoConfig.setBoolean(ConfigConstants.CONFIG_CORE_SECTION,null, ConfigConstants.CONFIG_KEY_TRUSTFOLDERSTAT, trustFolderStats.booleanValue()); repoConfig.save(); return repository; }
Source:
private void generateIntermediateList(List<Node> orderedNodes) { intermediateList.clear(); for (Node node : orderedNodes) { node.setTaskListGenerator(this); intermediateList.addAll(node.getDesiredStateChanges()); intermediateList.add(node); for (StateChange stateChange : node.getDesiredStateChanges()) { StateChange defaultInstance = stateChange.getDefaultInstance(); if (defaultInstance != null) { intermediateList.add(defaultInstance); } } } logList("-- Intermediate List --", intermediateList); }

Target:
private void generateIntermediateList(List<Node> orderedNodes) { intermediateList.clear(); for (Node node : orderedNodes) { node.setTaskListGenerator(this); if (node.isEnabled()) { intermediateList.addAll(node.getDesiredStateChanges()); intermediateList.add(node); for (StateChange stateChange : node.getDesiredStateChanges()) { intermediateList.add(stateChange.getDefaultInstance()); } } } logList("-- Intermediate List --", intermediateList); }
Source:
public String getCascadedResource(String resourceName) { List<BrandingTheme> brandingThemes = getBrandingThemes(); for (int i = brandingThemes.size() - 1; i >= 0; i--) { String resourcePath = brandingThemes.get(i).getResourcePath(resourceName); if (resourcePath != null) { return resourcePath; } } return null; }

Target:
public String getCascadedResource(String resourceName) { if (resourceName != null) { List<BrandingTheme> brandingThemes = getBrandingThemes(); for (int i = brandingThemes.size() - 1; i >= 0; i--) { String resourcePath = brandingThemes.get(i).getResourcePath(resourceName); if (resourcePath != null) { return resourcePath; } } } return null; }
Source:
private TileMatrixSet determineTileMatrixSetToUse(List<TileMatrixSet> possibleTileMatrixSets) throws IllegalArgumentException { JSONObject useThisTileMatrixSetInstead = layerService.find(layer.getId()).getOptions().optJSONObject("useThisAlternativeTileMatrixSet"); if (useThisTileMatrixSetInstead == null) { return possibleTileMatrixSets.get(0); } TileMatrixSet setToReturn = null; for (TileMatrixSet tms : possibleTileMatrixSets) { String tileMatrixSetName = tms.getTileMatrixMap().keySet().iterator().next(); for (int i = 0; i < useThisTileMatrixSetInstead.length(); i++) { String key = (String) useThisTileMatrixSetInstead.keys().next(); if (tileMatrixSetName.contains(useThisTileMatrixSetInstead.optString(key, "Something not in tmsName."))) { setToReturn = tms; break; } } } if (setToReturn != null) { return setToReturn; } throw new IllegalArgumentException("Could not find TileMatrixSet for the requested crs"); }

Target:
private TileMatrixSet determineTileMatrixSetToUse(List<TileMatrixSet> possibleTileMatrixSets) throws IllegalArgumentException { JSONObject useThisTileMatrixSetInstead = layerService.find(layer.getId()).getAttributes().optJSONObject("preferredTileMatrix"); if (useThisTileMatrixSetInstead == null) { return possibleTileMatrixSets.get(0); } String id = useThisTileMatrixSetInstead.optString(srs); if (id == null) { return possibleTileMatrixSets.get(0); } for (TileMatrixSet tms : possibleTileMatrixSets) { if (tms.getId().equals(id)) { return tms; } } throw new IllegalArgumentException("Could not find TileMatrixSet with id " + id + " for layer " + layer.getId()); }
Source:
public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } GlowWorld other = (GlowWorld) obj; return getUID() == other.getUID(); }

Target:
public boolean equals(Object obj) { return obj == this; }
Source:
public void run() { if (WatchDogUtils.isEmpty(preferences.getUserid())) { displayUserRegistrationWizard(); } if (!WatchDogUtils.isEmpty(preferences.getUserid()) && !userRegistrationCancelled) { checkWorkspaceRegistration(); savePreferenceStoreIfNeeded(); } }

Target:
public void run() { checkWhetherToDisplayUserProjectRegistrationWizard(); savePreferenceStoreIfNeeded(); if (WatchDogUtils.isEmpty(preferences.getUserid()) || userProjectRegistrationCancelled) { return; } checkIsWorkspaceAlreadyRegistered(); checkWhetherToDisplayProjectWizard(); checkWhetherToStartWatchDog(); }
Source:
protected void createTitle(Composite parent) { label = new Label(parent, SWT.WRAP); GridData data = new GridData(SWT.FILL, SWT.BEGINNING, true, false, 1, 1); label.setLayoutData(data); fFilterText = new Text(parent, SWT.BORDER | SWT.SINGLE | SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCEL); fFilterText.setMessage("type filter text"); fFilterText.setToolTipText("Filter by name"); fFilterText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); fFilterText.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { String text = fFilterText.getText(); fViewerFilter.setMatchingText(text); } }); }

Target:
protected void createTitle(Composite parent) { label = new Label(parent, SWT.WRAP); GridData data = new GridData(SWT.FILL, SWT.BEGINNING, true, false, 1, 1); label.setLayoutData(data); fFilterText = new Text(parent, SWT.BORDER | SWT.SINGLE | SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCEL); fFilterText.setMessage(Messages.GmonView_type_filter_text); fFilterText.setToolTipText(Messages.GmonView_filter_by_name); fFilterText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); fFilterText.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { String text = fFilterText.getText(); fViewerFilter.setMatchingText(text); } }); }
Source:
public static <T> Vector<T> of(T... elements) { return ofAll(List.of(elements)); }

Target:
public static <T> Vector<T> of(T... elements) { return ofAll(Iterator.of(elements)); }
Source:
public void didChange(DidChangeTextDocumentParams params) { this.input = params.getContentChanges().get(0).getText(); PublishDiagnosticsParams pd = new PublishDiagnosticsParams(); List<Diagnostic> diagnostics = pd.getDiagnostics(); String diagMsg = new String(); Range range = params.getContentChanges().get(0).getRange(); FilterCu inputValidity = FilterCu.compile(this.input); if (inputValidity != null) { diagMsg = "VALID"; } else { diagMsg = "INVALID"; } diagnostics.add(new Diagnostic(range, diagMsg)); pd.setDiagnostics(diagnostics); this.clients.get(0).publishDiagnostics(pd); }

Target:
public void didChange(DidChangeTextDocumentParams params) throws NullPointerException { TextDocumentContentChangeEvent contentChange = params.getContentChanges().get(0); if (contentChange == null) { throw new NullPointerException("Event change param cannot be null"); } fInput = params.getContentChanges().get(0).getText() + "\n"; try { List<Diagnostic> diagnostics = Validation.validate(fInput); PublishDiagnosticsParams pd = new PublishDiagnosticsParams(); pd.setDiagnostics(diagnostics); LanguageClient client = fClients.get(0); if (client == null) { throw new NullPointerException("Client cannot be null"); } fClients.get(0).publishDiagnostics(pd); } catch (RecognitionException error) { error.printStackTrace(); } catch (IOException error) { error.printStackTrace(); } }
Source:
private boolean setDocumentContent(IDocument document, IEditorInput input) throws CoreException { Reader reader = null; try { if (input instanceof FileStoreEditorInput){ reader = new InputStreamReader(((FileStoreEditorInput)input).getURI().toURL().openStream()); } else if (input instanceof IPathEditorInput){ reader= new FileReader(((IPathEditorInput)input).getPath().toFile()); } else { return false; } } catch (FileNotFoundException e) { return true; } catch (MalformedURLException e) { throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.linuxtools.systemtap.ui.editor", "Incorrect URL", e)); } catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.linuxtools.systemtap.ui.editor", "Error reading file", e)); } try { setDocumentContent(document, reader); return true; } catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.linuxtools.systemtap.ui.editor", IStatus.OK, "error reading file", e)); } }

Target:
private boolean setDocumentContent(IDocument document, IEditorInput input) throws CoreException { Reader reader = null; try { if (input instanceof FileStoreEditorInput){ reader = new InputStreamReader(((FileStoreEditorInput)input).getURI().toURL().openStream()); } else if (input instanceof IPathEditorInput){ reader= new FileReader(((IPathEditorInput)input).getPath().toFile()); } else { return false; } } catch (FileNotFoundException e) { return true; } catch (MalformedURLException e) { throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.linuxtools.systemtap.ui.editor",Localization.getString("SimpleDocumentProvider.incorrectURL"), e)); } catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.linuxtools.systemtap.ui.editor", Localization.getString("SimpleDocumentProvider.errorCreatingFile"), e)); } try { setDocumentContent(document, reader); return true; } catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.linuxtools.systemtap.ui.editor", IStatus.OK, Localization.getString("SimpleDocumentProvider.errorCreatingFile"), e)); } }
Source:
public void saveOrUpdateShouldNotDeleteOldestPasswordWhenPasswordHistoryShorterThanLimit() { List<PasswordHistoryEntity> passwordHistoryEntityList = getPasswordHistoryEntitylistWithElements(PASSWORD_HISTORY_LIMIT - 1); given(this.userRepository.findOne(USER_ID)).willReturn(userEntityWithId); given(this.passwordHistoryRepository.save(passwordHistoryEntityWithUserEntity)).willReturn(passwordHistoryEntityWithUserEntity); given(this.passwordHistoryRepository.findByUserEntity(userEntityWithId)).willReturn(passwordHistoryEntityList); given(this.passwordHistoryRepository.findOldestPassword(USER_ID)).willReturn(passwordHistoryEntityList.get(0)); this.passwordChangeService.saveOrUpdate(passwordHistoryDtoWithUserId); then(this.passwordHistoryRepository).should(never()).delete(passwordHistoryEntityList.get(0)); }

Target:
public void saveOrUpdateShouldNotDeleteOldestPasswordWhenPasswordHistoryShorterThanLimit() { List<PasswordHistoryEntity> passwordHistoryEntityList = getPasswordHistoryEntitylistWithElements(PASSWORD_HISTORY_LIMIT - 1); given(this.userRepository.findOne(USER_ID)).willReturn(userEntityWithId); given(this.passwordHistoryRepository.save(passwordHistoryEntityWithUserEntity)).willReturn(passwordHistoryEntityWithUserEntity); given(this.passwordHistoryRepository.findByUserEntity(userEntityWithId)).willReturn(passwordHistoryEntityList); this.passwordChangeService.saveOrUpdate(passwordHistoryDtoWithUserId); then(this.passwordHistoryRepository).should(never()).delete(passwordHistoryEntityList.get(0)); then(this.userRepository).should().findOne(USER_ID); then(this.passwordHistoryRepository).should().save(passwordHistoryEntityWithUserEntity); then(this.passwordHistoryRepository).should().findByUserEntity(userEntityWithId); }
Source:
private String getLabelProviderContextForTreeFillingConfiguration(final Table table, final Object listenObject) { if (listenObject instanceof EStructuralFeature) { return Constants.HEADER_LABEL_PROVIDER_TREE_FILLING_FEATURE_CONFIGURATION_CONTEXT; } else if (listenObject instanceof EOperation) { return Constants.HEADER_LABEL_PROVIDER_TREE_FILLING_OPERATION_CONFIGURATION_CONTEXT; } else { return ""; } }

Target:
private String getLabelProviderContextForTreeFillingConfiguration(final Table table, final Object listenObject) { String result = ""; if (listenObject instanceof EStructuralFeature) { result = Constants.HEADER_LABEL_PROVIDER_TREE_FILLING_FEATURE_CONFIGURATION_CONTEXT; } else if (listenObject instanceof EOperation) { result = Constants.HEADER_LABEL_PROVIDER_TREE_FILLING_OPERATION_CONFIGURATION_CONTEXT; } return result; }
Source:
public static Account create(String userName, String fullName, String firstName, String lastName, String emailAddress, List<RoleType> roles, AccountPhoneNumber phone, String department, String customDefined1, String customDefined2, AccountOrganization organization, String state) { return builder().userName(userName).fullName(fullName).firstName(firstName).lastName(lastName) .emailAddress(emailAddress) .roles(roles == null ? ImmutableList.<RoleType>of() : ImmutableList.copyOf(roles)).phone(phone) .department(department).customDefined1(customDefined1).customDefined2(customDefined2) .organization(organization).state(state).build(); }

Target:
public static Account create(String userName, String fullName, String firstName, String lastName, String emailAddress, List<RoleType> roles, AccountPhoneNumber phone, String department, String customDefined1, String customDefined2, AccountOrganization organization, String state) { return builder().userName(userName).fullName(fullName).firstName(firstName).lastName(lastName) .emailAddress(emailAddress).roles(roles).phone(phone).department(department).customDefined1(customDefined1) .customDefined2(customDefined2).organization(organization).state(state).build(); }
Source:
public void should_get_labels_json() throws Exception { HttpRequest request = server.client().GET("/api/i18n/labels.json"); assertThat(request.code()).isEqualTo(200); assertThat(replaceNewLine(request.body())).isEqualTo("{\n" + " \"key1\" : \"value1\",\n" + " \"key2\" : \"hello {{test}}\"\n" + "}\n"); }

Target:
public void should_get_labels_json() throws Exception { HttpRequest request = server.client().GET("/api/i18n/labels.json"); assertThat(request.code()).isEqualTo(200); assertThat(request.body()).isEqualTo(String.format("{%n" + " \"key1\" : \"value1\",\n" + " \"key2\" : \"hello {{test}}\"\n" + "}%n")); }
Source:
protected void dispatchToEntity(I id, Message eventMessage, EventContext context) { final P projection = loadOrCreate(id); projection.handle(eventMessage, context); store(projection); final Timestamp eventTime = context.getTimestamp(); if (ongoingOperation != null && ongoingOperation.isInProgress()) { scheduledStore(projection, eventTime); } else { immediateStore(projection, eventTime); } standFunnel.post(projection); }

Target:
protected void dispatchToEntity(I id, Message eventMessage, EventContext context) { final P projection = loadOrCreate(id); projection.handle(eventMessage, context); final Timestamp eventTime = context.getTimestamp(); if (isBulkWriteInProgress()) { storePostponed(projection, eventTime); } else { storeNow(projection, eventTime); } standFunnel.post(projection); }
Source:
private CompletableFuture<Boolean> detect(Detector detector, InetAddress inetAddress, String location) { CompletableFuture<Boolean> future = new CompletableFuture<>(); try { Map<String, String> attributes = detector.getParameters().stream() .collect(Collectors.toMap(Parameter::getKey, Parameter::getValue)); CompletableFuture<Boolean> result = getLocationAwareDetectorClient().detect() .withAddress(inetAddress) .withClassName(detector.getClassName()) .withLocation(location) .withAttributes(attributes) .execute(); result.whenComplete((response, ex) -> { if (ex != null) { LOG.error("Exception while detecting service on IP Address at location ", detector.getName(), inetAddress.getHostAddress(), location, ex); future.complete(false); } else { LOG.info("Detected service on IP Address at location {}", detector.getName(), inetAddress.getHostAddress(), location); future.complete(response); } }); } catch (Exception e) { LOG.error("Exception while detecting service on IP Address at location ", detector.getName(), inetAddress.getHostAddress(), location, e); future.complete(false); } return future; }

Target:
private CompletableFuture<Boolean> detect(Detector detector, InetAddress inetAddress, String location) { CompletableFuture<Boolean> future = new CompletableFuture<>(); try { LOG.info("Attemping to detect '{}' service on IP Address at location {}", detector.getName(), inetAddress.getHostAddress(), location); Map<String, String> attributes = detector.getParameters().stream() .collect(Collectors.toMap(Parameter::getKey, Parameter::getValue)); CompletableFuture<Boolean> result = getLocationAwareDetectorClient().detect() .withAddress(inetAddress) .withClassName(detector.getClassName()) .withLocation(location) .withAttributes(attributes) .execute(); result.whenComplete((response, ex) -> { Logging.withPrefix(Discovery.getLoggingCategory(), new Runnable() { @Override public void run() { if (ex != null) { LOG.error("Exception while detecting '{}' service on IP Address at location ", detector.getName(), inetAddress.getHostAddress(), location, ex); future.complete(false); } else { LOG.info("Service Detection for service '{}' on IP Address at location {}", response ? "succeeded" : "failed", detector.getName(), inetAddress.getHostAddress(), location); future.complete(response); } } }); }); } catch (Exception e) { LOG.error("Exception while detecting service on IP Address at location ", detector.getName(), inetAddress.getHostAddress(), location, e); future.complete(false); } return future; }
Source:
public Counter counter(String metricName) { return new CounterImpl(registry.counter(prefix + metricName)); }

Target:
public Counter counter(String metricName) { validateName(metricName); return new CounterImpl(registry.counter(prefix + metricName)); }
Source:
public ReadBuffer(ByteBuffer byteBuffer) { this(byteBuffer, byteBuffer.position() + byteBuffer.capacity()); }

Target:
public ReadBuffer(ByteBuffer byteBuffer) { this(byteBuffer, byteBuffer.remaining()); }
Source:
private RepositoryGroup getSelectedGroup(ExecutionEvent event) throws ExecutionException { List<RepositoryTreeNode> elements = getSelectedNodes(event); if (elements.size() == 1 && elements.get(0) instanceof RepositoryGroupNode) { return ((RepositoryGroupNode) elements.get(0)).getGroup(); } else { throw new ExecutionException( "can rename only a single repository group"); } }

Target:
private RepositoryGroup getSelectedGroup(ExecutionEvent event) throws ExecutionException { List<RepositoryTreeNode> elements = getSelectedNodes(event); if (elements.size() == 1 && elements.get(0) instanceof RepositoryGroupNode) { return ((RepositoryGroupNode) elements.get(0)).getGroup(); } else { throw new ExecutionException( UIText.RepositoriesView_RepoGroup_Rename_IllegalSelection); } }
Source:
private static void verifyDomainGettersSetters(TraceDomainComponent domain) { DomainEnum tmpDomain = domain.getDomain(); domain.setDomain(DomainEnum.KERNEL); assertEquals(domain.getDomain(), DomainEnum.KERNEL); domain.setDomain(DomainEnum.UST); assertEquals(domain.getDomain(), DomainEnum.UST); domain.setDomain(DomainEnum.JUL); assertEquals(domain.getDomain(), DomainEnum.JUL); ITraceControlComponent[] children = domain.getChildren(); TraceChannelComponent[] channels = domain.getChannels(); assertEquals(children.length, channels.length); for (int i = 0; i < channels.length; i++) { assertEquals(channels[i].getName(), children[i].getName()); } String nodeName = domain.getTargetNode().getName(); assertEquals(TARGET_NODE_NAME, nodeName); domain.setDomain(tmpDomain); }

Target:
private static void verifyDomainGettersSetters(TraceDomainComponent domain) { DomainEnum tmpDomain = domain.getDomain(); domain.setDomain(DomainEnum.KERNEL); assertEquals(domain.getDomain(), DomainEnum.KERNEL); domain.setDomain(DomainEnum.UST); assertEquals(domain.getDomain(), DomainEnum.UST); domain.setDomain(DomainEnum.JUL); assertEquals(domain.getDomain(), DomainEnum.JUL); domain.setDomain(DomainEnum.LOG4J); assertEquals(domain.getDomain(), DomainEnum.LOG4J); domain.setDomain(DomainEnum.PYTHON); assertEquals(domain.getDomain(), DomainEnum.PYTHON); domain.setDomain(DomainEnum.UNKNOWN); assertEquals(domain.getDomain(), DomainEnum.UNKNOWN); ITraceControlComponent[] children = domain.getChildren(); TraceChannelComponent[] channels = domain.getChannels(); assertEquals(children.length, channels.length); for (int i = 0; i < channels.length; i++) { assertEquals(channels[i].getName(), children[i].getName()); } String nodeName = domain.getTargetNode().getName(); assertEquals(TARGET_NODE_NAME, nodeName); domain.setDomain(tmpDomain); }
Source:
public void init() { super.init(); if(userLayerDbService == null) { setUserLayerDbService(OskariComponentManager.getComponentOfType(UserLayerDbService.class)); } }

Target:
public void init() { userLayerDbService = OskariComponentManager.getComponentOfType(UserLayerDbService.class); }
Source:
private InputStream simulateSendAndReceive(ByteArrayOutputStream baos) throws IOException { byte[] bytes = baos.toByteArray(); baos.reset(); int testMessageNo = 1; PacketFormat format = new PacketFormat(testMessageNo, bytes); format.serialize(baos); return new ByteArrayInputStream(baos.toByteArray()); }

Target:
private InputStream simulateSendAndReceive(ByteArrayOutputStream baos) throws IOException { return new ByteArrayInputStream(baos.toByteArray()); }
Source:
public void deserialize(byte[] message, Collector<RowData> out) throws IOException { GenericRowData row = (GenericRowData) jsonDeserializer.deserialize(message); GenericRowData payload; if (schemaInclude) { payload = (GenericRowData) row.getField(0); } else { payload = row; } GenericRowData before = (GenericRowData) payload.getField(0); GenericRowData after = (GenericRowData) payload.getField(1); String op = payload.getField(2).toString(); if (OP_CREATE.equals(op) && after != null) { after.setRowKind(RowKind.INSERT); out.collect(after); } else if (OP_UPDATE.equals(op) && (before != null && after != null)) { before.setRowKind(RowKind.UPDATE_BEFORE); after.setRowKind(RowKind.UPDATE_AFTER); out.collect(before); out.collect(after); } else if (OP_DELETE.equals(op) && before != null) { before.setRowKind(RowKind.DELETE); out.collect(before); } else { if (!ignoreParseErrors) { throw new IOException(format("Failed to deserialize Debezium JSON '%s'.", new String(message))); } } }

Target:
public void deserialize(byte[] message, Collector<RowData> out) throws IOException { try { GenericRowData row = (GenericRowData) jsonDeserializer.deserialize(message); GenericRowData payload; if (schemaInclude) { payload = (GenericRowData) row.getField(0); } else { payload = row; } GenericRowData before = (GenericRowData) payload.getField(0); GenericRowData after = (GenericRowData) payload.getField(1); String op = payload.getField(2).toString(); if (OP_CREATE.equals(op) || OP_READ.equals(op)) { after.setRowKind(RowKind.INSERT); out.collect(after); } else if (OP_UPDATE.equals(op)) { before.setRowKind(RowKind.UPDATE_BEFORE); after.setRowKind(RowKind.UPDATE_AFTER); out.collect(before); out.collect(after); } else if (OP_DELETE.equals(op)) { before.setRowKind(RowKind.DELETE); out.collect(before); } else { if (!ignoreParseErrors) { throw new IOException(format( "Unknown \"op\" value \"%s\". The Debezium JSON message is '%s'", op, new String(message))); } } } catch (Throwable t) { if (!ignoreParseErrors) { throw new IOException(format( "Corrupt Debezium JSON message '%s'.", new String(message)), t); } } }
Source:
private int update(final Talk talk, final int max) throws IOException { final List<String> requests = talk.read().xpath(" final List<XML> logs = talk.read().nodes(ARCHIVE_LOG); int newmax = max; int index = this.max(talk); if (index < 1) { index = max; } if (requests.isEmpty() && !logs.isEmpty()) { talk.modify( new Directives().xpath(" .attr(INDEX, Integer.toString(index + 1)) .attr("id", this.createRequestId()) .add("type").set(INDEX) .up() .add("args") ); newmax += 1; } return newmax; }

Target:
private int update(final Talk talk, final int max) throws IOException { final List<XML> logs = talk.read().nodes(" int newmax = max; int index = this.max(talk); if (index < 1) { index = max; } final List<XML> nodes = talk.read() .nodes(" if (!nodes.isEmpty() && !logs.isEmpty()) { talk.modify(new Directives() .xpath("( .attr("index", Integer.toString(index + 1))); newmax += 1; } return newmax; }
Source:
public ModelAndView question(@PathVariable long questionId, @RequestParam(value = "index", defaultValue = "1", required = false) int index) { QuestionDto question = questionService.getQuestion(LoginUserInfo.getLoginName(), questionId); if (question == null) { ModelAndView modelAndView = new ModelAndView("error/404"); modelAndView.addObject("errorPage","true"); return modelAndView; } ModelAndView modelAndView = new ModelAndView("/question", "questionId", questionId); modelAndView.addObject("isQuestionOwner", !StringUtils.isEmpty(question.getMobile()) && question.getMobile().equalsIgnoreCase(LoginUserInfo.getMobile())); modelAndView.addObject("question", question); modelAndView.addObject("bestAnswer", answerService.getBestAnswer(LoginUserInfo.getLoginName(), questionId)); modelAndView.addObject("answers", answerService.getNotBestAnswers(LoginUserInfo.getLoginName(), questionId, index, 10)); return modelAndView; }

Target:
public ModelAndView question(@PathVariable long questionId, @RequestParam(value = "index", defaultValue = "1", required = false) int index) { QuestionDto question = questionService.getQuestion(LoginUserInfo.getLoginName(), questionId); if (question == null) { ModelAndView modelAndView = new ModelAndView("/error/404"); modelAndView.addObject("errorPage","true"); return modelAndView; } ModelAndView modelAndView = new ModelAndView("/question", "questionId", questionId); modelAndView.addObject("isQuestionOwner", !StringUtils.isEmpty(question.getMobile()) && question.getMobile().equalsIgnoreCase(LoginUserInfo.getMobile())); modelAndView.addObject("question", question); modelAndView.addObject("bestAnswer", answerService.getBestAnswer(LoginUserInfo.getLoginName(), questionId)); modelAndView.addObject("answers", answerService.getNotBestAnswers(LoginUserInfo.getLoginName(), questionId, index, 10)); return modelAndView; }
Source:
public void activate(final Subscription subscription, final StreamObserver<SubscriptionUpdate> responseObserver) { log().debug("Activating the subscription: {}", subscription); try { final BoundedContext boundedContext = selectBoundedContext(subscription); final Stand.StandUpdateCallback updateCallback = new Stand.StandUpdateCallback() { @Override public void onEntityStateUpdate(Any newEntityState) { Preconditions.checkNotNull(subscription); final SubscriptionUpdate update = SubscriptionUpdate.newBuilder() .setSubscription(subscription) .setResponse(Responses.ok()) .addUpdates(newEntityState) .build(); responseObserver.onNext(update); } }; boundedContext.getStand().activate(subscription, updateCallback); } catch (@SuppressWarnings("OverlyBroadCatchBlock") Exception e) { log().error("Error activating the subscription", e); responseObserver.onError(e); responseObserver.onCompleted(); } }

Target:
public void activate(final Subscription subscription, final StreamObserver<SubscriptionUpdate> responseObserver) { log().debug("Activating the subscription: {}", subscription); try { final BoundedContext boundedContext = selectBoundedContext(subscription); final Stand.EntityUpdateCallback updateCallback = new Stand.EntityUpdateCallback() { @Override public void onStateChanged(Any newEntityState) { checkNotNull(subscription); final SubscriptionUpdate update = SubscriptionUpdate.newBuilder() .setSubscription(subscription) .setResponse(Responses.ok()) .addUpdates(newEntityState) .build(); responseObserver.onNext(update); } }; final Stand targetStand = boundedContext.getStand(); targetStand.activate(subscription, updateCallback); } catch (@SuppressWarnings("OverlyBroadCatchBlock") Exception e) { log().error("Error activating the subscription", e); responseObserver.onError(e); } }
Source:
public void run() { try { while (watchService != null) { WatchKey key = watchService.take(); Path watchedPath = (Path) key.watchable(); Map<String, List<Store>> pathRegistration = watchedPaths.get(watchedPath); if (pathRegistration != null) { for (WatchEvent<?> event : key.pollEvents()) { if (StandardWatchEventKinds.ENTRY_CREATE.equals(event.kind()) || StandardWatchEventKinds.ENTRY_MODIFY.equals(event.kind())) { Path context = (Path) event.context(); String name = context.getFileName().toString(); List<Store> stores = pathRegistration.get(name); if (stores != null) { for (Store current : stores) { executor.execute(new Notifier(current)); } } } else if (StandardWatchEventKinds.OVERFLOW.equals(event.kind())) { for (List<Store> stores : pathRegistration.values()) { for (Store current : stores) { executor.execute(new Notifier(current)); } } } } } key.reset(); } } catch (ClosedWatchServiceException | InterruptedException e) { } }

Target:
public void run() { try { WatchService watchService = KeyStoreWatcher.this.watchService; while (watchService != null) { WatchKey key = watchService.take(); Path watchedPath = (Path) key.watchable(); System.out.println("Path " + watchedPath.toString()); Map<String, List<Store>> pathRegistration = watchedPaths.get(watchedPath); Set<Store> toNotify = new HashSet<Store>(); if (pathRegistration != null) { for (WatchEvent<?> event : key.pollEvents()) { System.out.println("Event Name " + event.kind().name()); if (StandardWatchEventKinds.ENTRY_CREATE.equals(event.kind()) || StandardWatchEventKinds.ENTRY_MODIFY.equals(event.kind())) { Path context = (Path) event.context(); String name = context.getFileName().toString(); System.out.println("File Name " + name); List<Store> stores = pathRegistration.get(name); if (stores != null) { for (Store current : stores) { toNotify.add(current); } } } else if (StandardWatchEventKinds.OVERFLOW.equals(event.kind())) { for (List<Store> stores : pathRegistration.values()) { for (Store current : stores) { toNotify.add(current); } } } } } key.reset(); for (Store current : toNotify) { current.modified(); } } } catch (ClosedWatchServiceException | InterruptedException e) { } }
Source:
public void newFolderWithGivenPathThrowsIOExceptionIfFolderNamesConsistOfMultiplePathComponents() throws IOException { thrown.expect(IOException.class); thrown.expectMessage("name cannot consist of multiple path components"); tempFolder.create(); tempFolder.newFolder("temp1", "temp2", "temp3/temp4"); }

Target:
public void newFolderWithGivenPathThrowsIOExceptionIfFolderNamesConsistOfMultiplePathComponents() throws IOException { tempFolder.create(); thrown.expect(IOException.class); thrown.expectMessage("name cannot consist of multiple path components"); tempFolder.newFolder("temp1", "temp2", "temp3/temp4"); }
Source:
public static void setInForeground(boolean inForeground) { OneSignal.inForeground = inForeground; logger.debug("Foreground set to: " + inForeground); }

Target:
static void setInForeground(boolean inForeground) { OneSignal.inForeground = inForeground; }
Source:
public Compressor getCompressor(Algorithm compressionAlgorithm) throws IOException { Preconditions.checkNotNull(compressionAlgorithm, "Algorithm cannot be null"); try { return compressorPool.borrowObject(compressionAlgorithm); } catch (Exception e) { LOG.warn("Could not borrow compressor; creating instead", e); return compressionAlgorithm.getCodec().createCompressor(); } }

Target:
public Compressor getCompressor(Algorithm compressionAlgorithm) throws IOException { Objects.requireNonNull(compressionAlgorithm, "Algorithm cannot be null"); try { return compressorPool.borrowObject(compressionAlgorithm); } catch (Exception e) { LOG.warn("Could not borrow compressor; creating instead", e); return compressionAlgorithm.getCodec().createCompressor(); } }
Source:
public long size() throws IOException { flushIfNeeded(0); return writeOutBytes; }

Target:
public long size() { return writeOutBytes; }
Source:
public int getNumberOfEntries() { int totalEntries = 0; for (String cn : cm.getCacheNames()) { if (cm.cacheExists(cn)) { Stats stats = cm.getCache(cn).getAdvancedCache().getStats(); totalEntries += stats.getTotalNumberOfEntries(); } } return totalEntries; }

Target:
public int getNumberOfEntries() { int totalEntries = 0; for (String cn : cm.getCacheNames()) { if (cm.cacheExists(cn)) { Stats stats = cm.getCache(cn).getAdvancedCache().getStats(); int numberOfEntries = stats.getCurrentNumberOfEntries(); if (numberOfEntries > -1) { totalEntries += numberOfEntries; } } } return totalEntries; }
Source:
public IStatus run(IProgressMonitor monitor) { HybridProject hybridProject = HybridProject.getHybridProject(project); if(hybridProject != null){ try{ if(hybridProject.getEngineManager().getActiveEngines().length != 0) { hybridProject.prepare(monitor); } }catch(CoreException e){ return e.getStatus(); } } return Status.OK_STATUS; }

Target:
public IStatus run(IProgressMonitor monitor) { HybridProject hybridProject = HybridProject.getHybridProject(project); if(hybridProject != null){ try{ if(hybridProject.getEngineManager().hasActiveEngine()) { hybridProject.prepare(monitor); } }catch(CoreException e){ return e.getStatus(); } } return Status.OK_STATUS; }
Source:
static void parameterValue(JSONObject param, StringBuilder sb) { Object value = param.get("value"); Object type = param.get("type"); if ("submissionParameter".equals(type)) { JSONObject jo = (JSONObject) value; String splType = (String) jo.get("splType"); String name = SPLGenerator.stringLiteral((String) jo.get("name")); String defaultValue = (String) jo.get("defaultValue"); if (defaultValue == null) sb.append(String.format("(%s) getSubmissionTimeValue(%s)", splType, name)); else { defaultValue = SPLGenerator.stringLiteral(defaultValue); sb.append(String.format("(%s) getSubmissionTimeValue(%s, %s)", splType, name, defaultValue)); } return; } else if (value instanceof String && !PARAM_TYPES_TOSTRING.contains(type)) { SPLGenerator.stringLiteral(sb, value.toString()); return; } else if (value instanceof JSONArray) { JSONArray a = (JSONArray) value; for (int i = 0; i < a.size(); i++) { if (i != 0) sb.append(", "); String sv = (String) a.get(i); SPLGenerator.stringLiteral(sb, sv); } return; } else if (value instanceof Number) { SPLGenerator.numberLiteral(sb, (Number) value); return; } sb.append(value); }

Target:
static void parameterValue(JSONObject param, StringBuilder sb) { Object value = param.get("value"); Object type = param.get("type"); if ("submissionParameter".equals(type)) { SubmissionTimeValue.generateRef((JSONObject) value, sb); return; } else if (value instanceof String && !PARAM_TYPES_TOSTRING.contains(type)) { if ("ustring".equals(type)) sb.append("(ustring)"); SPLGenerator.stringLiteral(sb, value.toString()); return; } else if (value instanceof JSONArray) { JSONArray a = (JSONArray) value; for (int i = 0; i < a.size(); i++) { if (i != 0) sb.append(", "); String sv = (String) a.get(i); SPLGenerator.stringLiteral(sb, sv); } return; } else if (value instanceof Number) { SPLGenerator.numberLiteral(sb, (Number) value, "unsigned".equals(type)); return; } sb.append(value); }
Source:
private List<VirtualGuestBlockDevice> getBlockDevices(List<Integer> blockDeviceCapacities, String diskType) { List<VirtualGuestBlockDevice> blockDevices = Lists.newArrayList(); int devicePosition = 0; for (int i = 0; i < blockDeviceCapacities.size(); i++) { if (i > 0) { devicePosition = i + 1; } blockDevices.add(VirtualGuestBlockDevice.builder() .device(devicePosition + "") .diskImage(VirtualDiskImage.builder() .capacity(blockDeviceCapacities.get(i)) .typeId(Type.valueOf(diskType).ordinal()) .build()) .build()); } return blockDevices; }

Target:
private static List<VirtualGuestBlockDevice> getBlockDevices(List<Integer> blockDeviceCapacities, String diskType) { ImmutableList.Builder<VirtualGuestBlockDevice> blockDevicesBuilder = ImmutableList.builder(); int devicePosition = 0; for (int i = 0; i < blockDeviceCapacities.size(); i++) { if (i > 0) { devicePosition = i + 1; } blockDevicesBuilder.add(VirtualGuestBlockDevice.builder() .device(devicePosition + "") .diskImage(VirtualDiskImage.builder() .capacity(blockDeviceCapacities.get(i)) .typeId(Type.valueOf(diskType).ordinal()) .build()) .build()); } return blockDevicesBuilder.build(); }
Source:
public Settings(String serverURI, String username, String password) { if (serverURI.endsWith("/")) { this.serverURI = serverURI.substring(0, serverURI.length() - 1); } else { this.serverURI = serverURI; } this.username = username; this.password = password; }

Target:
public Settings(String serverURI, String username, String password) { this.serverURI = serverURI; this.username = username; this.password = password; }
Source:
public void setBlock(int x, int y, int z, BlockState block) { net.minecraft.world.World world = ((net.minecraft.world.World) (Object) this); if (block instanceof IBlockState) { world.setBlockState(new BlockPos(x, y, z), (IBlockState) block, 0); } else { throw new UnsupportedOperationException(); } }

Target:
public void setBlock(int x, int y, int z, BlockState block) { SpongeHooks.setBlockState(((net.minecraft.world.World) (Object) this), x, y, z, block); }
Source:
public void aggregate(ByteBuffer buf, int position) { if (buf.get(position) == BYTE_FLAG_IS_NOT_SET) { buf.putDouble(position + Byte.BYTES, valueSelector.getDouble()); buf.put(position, BYTE_FLAG_IS_SET); } }

Target:
public void aggregate(ByteBuffer buf, int position) { if (buf.get(position) == BYTE_FLAG_IS_NOT_SET) { buf.put(position, BYTE_FLAG_IS_SET); buf.putDouble(position + Byte.BYTES, valueSelector.getDouble()); } }
Source:
private LuceneBackendResources(LuceneBackendResources previous) { this.indexManager = previous.indexManager; this.indexName = previous.indexName; this.errorHandler = previous.errorHandler; this.workspace = previous.workspace; this.maxQueueLength = previous.maxQueueLength; this.asyncIndexingExecutor = previous.asyncIndexingExecutor; this.indexmodificationReadLock = previous.indexmodificationReadLock; this.indexmodificationWriteLock = previous.indexmodificationWriteLock; this.executorStateReadLock = previous.executorStateReadLock; this.executorStateWriteLock = previous.executorStateWriteLock; }

Target:
private LuceneBackendResources(LuceneBackendResources previous) { this.indexManager = previous.indexManager; this.indexName = previous.indexName; this.errorHandler = previous.errorHandler; this.workspace = previous.workspace; this.readLock = previous.readLock; this.writeLock = previous.writeLock; this.asynchExecutor = previous.asynchExecutor; }
Source:
private static int getOffset() { if (testMode == TestMode.PLAYBACK) { return -1; } LocalDate today = LocalDate.now(ZoneId.systemDefault()); return (today.getDayOfWeek().getValue() + getPlatFormOffset()) % PLATFORM_COUNT; }

Target:
private static int getOffset() { if (testMode == TestMode.PLAYBACK) { return 0; } LocalDate today = LocalDate.now(ZoneId.systemDefault()); return (today.getDayOfWeek().getValue() + getPlatFormOffset()) % PLATFORM_LIST.size(); }
Source:
private boolean shouldShowPicturesInCurrentNetwork(boolean onlyShowViaWiFi) { if (!onlyShowViaWiFi) { return true; } final ConnectivityManager connectivityManager = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE); NetworkType networkType = NetworkType.fromConnectivityManagerType(connectivityManager.getActiveNetworkInfo().getType()); return networkType == NetworkType.WIFI; }

Target:
private boolean shouldShowPicturesInCurrentNetwork(boolean onlyShowViaWiFi) { return !onlyShowViaWiFi || !NetworkHelper.isActiveNetworkMeteredCompat(); }
Source:
void verifyQueryBehavior(@Nullable TestItem actualItem) { verify(storIOSQLite).get(); verify(getResolver).performGet(storIOSQLite, query); verify(getResolver, times(1)).mapFromCursor(cursor); verify(cursor).getCount(); verify(cursor, times(1)).moveToNext(); verify(cursor, times(1)).close(); assertThat(actualItem).isEqualTo(item); if (withTypeMapping) { verify(storIOSQLite).internal(); verify(internal).typeMapping(TestItem.class); verify(typeMapping).getResolver(); } verifyNoMoreInteractions(storIOSQLite, internal, cursor); }

Target:
void verifyQueryBehavior(@Nullable TestItem actualItem) { verify(storIOSQLite).get(); verify(getResolver).performGet(storIOSQLite, query); verify(getResolver).mapFromCursor(cursor); verify(cursor).getCount(); verify(cursor).moveToNext(); verify(cursor).close(); assertThat(actualItem).isEqualTo(item); if (withTypeMapping) { verify(storIOSQLite).internal(); verify(internal).typeMapping(TestItem.class); verify(typeMapping).getResolver(); } verifyNoMoreInteractions(storIOSQLite, internal, cursor); }
Source:
public final void send(final RawData msg) { if (msg == null) { throw new NullPointerException("Message must not be null"); } else if (!running.get()) { throw new IllegalStateException("connector must be started before sending messages is possible"); } else if (msg.getBytes().length > MAX_PLAINTEXT_FRAGMENT_LENGTH) { throw new IllegalArgumentException("Message data must not exceed " + MAX_PLAINTEXT_FRAGMENT_LENGTH + " bytes"); } else { if (0 <= pendingOutboundMessages.decrementAndGet()) { executor.execute(new StripedRunnable() { @Override public Object getStripe() { return msg.getEndpointContext().getPeerAddress(); } @Override public void run() { try { pendingOutboundMessages.incrementAndGet(); if (running.get()) { sendMessage(msg); } } catch (Exception e) { if (running.get()) { LOGGER.debug("Exception thrown by executor thread [{}]", Thread.currentThread().getName(), e); } } finally { pendingOutboundMessages.incrementAndGet(); } } }); } else { pendingOutboundMessages.incrementAndGet(); LOGGER.warn("Outbound message overflow! Dropping outbound message to peer [{}]", msg.getInetSocketAddress()); } } }

Target:
public final void send(final RawData msg) { if (msg == null) { throw new NullPointerException("Message must not be null"); } else if (!running.get()) { throw new IllegalStateException("connector must be started before sending messages is possible"); } else if (msg.getBytes().length > MAX_PLAINTEXT_FRAGMENT_LENGTH) { throw new IllegalArgumentException("Message data must not exceed " + MAX_PLAINTEXT_FRAGMENT_LENGTH + " bytes"); } else { if (pendingOutboundMessages.decrementAndGet() >= 0) { executor.execute(new StripedRunnable() { @Override public Object getStripe() { return msg.getEndpointContext().getPeerAddress(); } @Override public void run() { try { pendingOutboundMessages.incrementAndGet(); if (running.get()) { sendMessage(msg); } } catch (Exception e) { if (running.get()) { LOGGER.debug("Exception thrown by executor thread [{}]", Thread.currentThread().getName(), e); } } finally { pendingOutboundMessages.incrementAndGet(); } } }); } else { pendingOutboundMessages.incrementAndGet(); LOGGER.warn("Outbound message overflow! Dropping outbound message to peer [{}]", msg.getInetSocketAddress()); } } }
Source:
public Regions getRegions () { return regions; }

Target:
public Regions getRegions () { return this.regions; }