auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onCommentDeleted(ApiEvent.DeleteComment event) { if (!event.hasError()) { for (Iterator<Comment> it = mComments.iterator(); it.hasNext(); ) { Comment comment = it.next(); if (comment.mCommentid == mCommentToDelete.mCommentid) { it.remove(); break; } else { for (Iterator<Comment> rit = comment.mReplies.iterator(); rit.hasNext(); ) { Comment reply = rit.next(); if (reply.mCommentid == mCommentToDelete.mCommentid) { rit.remove(); break; } } } } mAdapter.setComments(mComments); mAdapter.notifyDataSetChanged(); } else { Toast.makeText(getBaseContext(), R.string.error_deleting_comment, Toast.LENGTH_SHORT).show(); } mCommentToDelete = null; }

Target:
public void onCommentDeleted(ApiEvent.DeleteComment event) { if (!event.hasError()) { int commentIdToDelete = Integer.parseInt(event.getExtraInfo()); for (Iterator<Comment> it = mComments.iterator(); it.hasNext(); ) { Comment comment = it.next(); if (comment.mCommentid == commentIdToDelete) { it.remove(); break; } else { for (Iterator<Comment> rit = comment.mReplies.iterator(); rit.hasNext(); ) { Comment reply = rit.next(); if (reply.mCommentid == commentIdToDelete) { rit.remove(); break; } } } } mAdapter.setComments(mComments); mAdapter.notifyDataSetChanged(); } else { Toast.makeText(getBaseContext(), R.string.error_deleting_comment, Toast.LENGTH_SHORT).show(); } }
Source:
private Map<TopicPartition, OffsetAndMetadata> createOffset(Set<SubscriptionPartitionOffset> partitionOffsets) { Map<TopicPartition, OffsetAndMetadata> offsetsData = new LinkedHashMap<>(); for (SubscriptionPartitionOffset partitionOffset : partitionOffsets) { TopicPartition topicAndPartition = new TopicPartition(partitionOffset.getKafkaTopicName().asString(), partitionOffset.getPartition()); offsetsData.put(topicAndPartition, new OffsetAndMetadata(partitionOffset.getOffset())); } return offsetsData; }

Target:
private Map<TopicPartition, OffsetAndMetadata> createOffset(Set<SubscriptionPartitionOffset> partitionOffsets) { Map<TopicPartition, OffsetAndMetadata> offsetsData = new LinkedHashMap<>(); for (SubscriptionPartitionOffset partitionOffset : partitionOffsets) { TopicPartition topicAndPartition = new TopicPartition( partitionOffset.getKafkaTopicName().asString(), partitionOffset.getPartition()); if (consumer.position(topicAndPartition) >= partitionOffset.getOffset()) { offsetsData.put(topicAndPartition, new OffsetAndMetadata(partitionOffset.getOffset())); } } return offsetsData; }
Source:
public <E> Optional<BlockState> bridge$getStateWithValue(final IBlockState blockState, final Key<? extends BaseValue<E>> key, final E value) { if (key.equals(Keys.CONNECTED_DIRECTIONS)) { return Optional.of((BlockState) DirectionalBlockUtils.applyConnectedDirections(blockState, DIRECTION_TO_PROPERTY_MAPPING, (sourceBlockState, property) -> true, (sourceBlockState, property) -> false, (Set<Direction>) value)); } else if (key.equals(Keys.CONNECTED_EAST)) { return Optional.of((BlockState) blockState.withProperty(BlockFence.EAST, (Boolean) value)); } else if (key.equals(Keys.CONNECTED_NORTH)) { return Optional.of((BlockState) blockState.withProperty(BlockFence.NORTH, (Boolean) value)); } else if (key.equals(Keys.CONNECTED_SOUTH)) { return Optional.of((BlockState) blockState.withProperty(BlockFence.SOUTH, (Boolean) value)); } else if (key.equals(Keys.CONNECTED_WEST)) { return Optional.of((BlockState) blockState.withProperty(BlockFence.WEST, (Boolean) value)); } return super.bridge$getStateWithValue(blockState, key, value); }

Target:
public <E> Optional<BlockState> bridge$getStateWithValue(final IBlockState blockState, final Key<? extends BaseValue<E>> key, final E value) { if (key.equals(Keys.CONNECTED_DIRECTIONS)) { return Optional.of((BlockState) impl$applyConnectedDirections(blockState, (Set<Direction>) value)); } else if (key.equals(Keys.CONNECTED_EAST)) { return Optional.of((BlockState) blockState.withProperty(BlockFence.EAST, (Boolean) value)); } else if (key.equals(Keys.CONNECTED_NORTH)) { return Optional.of((BlockState) blockState.withProperty(BlockFence.NORTH, (Boolean) value)); } else if (key.equals(Keys.CONNECTED_SOUTH)) { return Optional.of((BlockState) blockState.withProperty(BlockFence.SOUTH, (Boolean) value)); } else if (key.equals(Keys.CONNECTED_WEST)) { return Optional.of((BlockState) blockState.withProperty(BlockFence.WEST, (Boolean) value)); } return super.bridge$getStateWithValue(blockState, key, value); }
Source:
public List<EntryUpdateTime> getUserEntries(@ApiParam(hidden = true) @Parameter(hidden = true, name = "user", in = ParameterIn.HEADER) @Auth User authUser, @Parameter(name = "count", description = "Maximum number of entries to return", in = ParameterIn.QUERY) @QueryParam("count") Integer count, @Parameter(name = "filter", description = "Filter paths with matching text", in = ParameterIn.QUERY) @QueryParam("filter") String filter) { final List<EntryLite> entriesLite = new ArrayList<>(); final long userId = authUser.getId(); entriesLite.addAll(toolDAO.findEntryVersions(userId)); entriesLite.addAll(bioWorkflowDAO.findEntryVersions(userId)); entriesLite.addAll(serviceDAO.findEntryVersions(userId)); List<EntryUpdateTime> filteredEntries = entriesLite .stream().map(e -> new EntryUpdateTime(e.getEntryPath(), e.makePrettyPath(e.getEntryPath()), e.getEntryType(), new Timestamp(e.getLastUpdated().getTime()))) .filter((EntryUpdateTime entryUpdateTime) -> filter == null || filter.isBlank() || entryUpdateTime.getPath().toLowerCase().contains(filter.toLowerCase())) .sorted(Comparator.comparing(EntryUpdateTime::getLastUpdateDate, Comparator.nullsLast(Comparator.reverseOrder()))) .collect(Collectors.toList()); if (count != null) { return filteredEntries.subList(0, Math.min(count, filteredEntries.size())); } return filteredEntries; }

Target:
public List<EntryUpdateTime> getUserEntries(@ApiParam(hidden = true) @Parameter(hidden = true, name = "user", in = ParameterIn.HEADER) @Auth User authUser, @Parameter(name = "count", description = "Maximum number of entries to return", in = ParameterIn.QUERY) @QueryParam("count") Integer count, @Parameter(name = "filter", description = "Filter paths with matching text", in = ParameterIn.QUERY) @QueryParam("filter") String filter) { final List<EntryLite> entriesLite = new ArrayList<>(); final long userId = authUser.getId(); entriesLite.addAll(toolDAO.findEntryVersions(userId)); entriesLite.addAll(bioWorkflowDAO.findEntryVersions(userId)); entriesLite.addAll(serviceDAO.findEntryVersions(userId)); List<EntryUpdateTime> filteredEntries = entriesLite .stream().map(e -> new EntryUpdateTime(e.getEntryPath(), e.getPrettyPath(), e.getEntryType(), new Timestamp(e.getLastUpdated().getTime()))) .filter((EntryUpdateTime entryUpdateTime) -> filter == null || filter.isBlank() || entryUpdateTime.getPath().toLowerCase().contains(filter.toLowerCase())) .sorted(Comparator.comparing(EntryUpdateTime::getLastUpdateDate, Comparator.nullsLast(Comparator.reverseOrder()))) .limit(count != null ? count : Integer.MAX_VALUE) .collect(Collectors.toList()); return filteredEntries; }
Source:
public boolean updateLagBetweenReplicas(ReplicaId source, ReplicaId target, long lagInBytes) { boolean updated = false; if (replicaToLagInfos.containsKey(source)) { replicaToLagInfos.get(source).updateLagInfo(target, lagInBytes); logger.debug(replicaToLagInfos.get(source).toString()); updated = true; } return updated; }

Target:
public boolean updateLagBetweenReplicas(ReplicaId source, ReplicaId target, long lagInBytes) { boolean updated = false; if (replicaToLagInfos.containsKey(source)) { replicaToLagInfos.get(source).updateLagInfo(target, lagInBytes); if (logger.isDebugEnabled()) { logger.debug(replicaToLagInfos.get(source).toString()); } updated = true; } return updated; }
Source:
protected void fireSelectionChanged() { for (final ISelectionChangedListener listener : this.selectionChangedListeners) { SafeRunnable.run(new SafeRunnable() { @Override public void run() { listener.selectionChanged( new SelectionChangedEvent(SelectionHistoryManager.this.treeViewer, getSelection())); } }); } }

Target:
protected void fireSelectionChanged() { final SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent( SelectionHistoryManager.this.treeViewer, getSelection()); for (final ISelectionChangedListener listener : this.selectionChangedListeners) { SafeRunnable.run(new SafeRunnable() { @Override public void run() { listener.selectionChanged(selectionChangedEvent); } }); } }
Source:
String doGetRequestForFileAndStore(final String url, final String filePath) throws GeneralException, UnauthorizedException, NotFoundException { HttpURLConnection connection = null; InputStream inputStream = null; try { connection = getConnection(url, null, METHOD_GET); int status = connection.getResponseCode(); if (APIResponse.isSuccessStatus(status)) { inputStream = connection.getInputStream(); } else { inputStream = connection.getErrorStream(); } if (status == HttpURLConnection.HTTP_OK) { return writeInputStreamToFile(inputStream, filePath); } String body = readToEnd(inputStream); handleHttpFailStatuses(status, body); } catch (IOException ioe) { throw new GeneralException(ioe); } finally { saveClose(inputStream); if (connection != null) { connection.disconnect(); } } return null; }

Target:
private String doGetRequestForFileAndStore(final String url, final String filePath) throws GeneralException, UnauthorizedException, NotFoundException { HttpURLConnection connection = null; InputStream inputStream = null; try { connection = getConnection(url, null, METHOD_GET); int status = connection.getResponseCode(); if (APIResponse.isSuccessStatus(status)) { inputStream = connection.getInputStream(); } else { inputStream = connection.getErrorStream(); if (inputStream == null) { throw new GeneralException("Error stream was empty"); } } if (status == HttpURLConnection.HTTP_OK) { return writeInputStreamToFile(inputStream, filePath); } String body = readToEnd(inputStream); handleHttpFailStatuses(status, body); } catch (IOException ioe) { throw new GeneralException(ioe); } finally { saveClose(inputStream); if (connection != null) { connection.disconnect(); } } return null; }
Source:
public void testTransformersEAP700() throws Exception { testEap7Transformer(ModelTestControllerVersion.EAP_7_0_0, ModelVersion.create(3, 0, 0), readResource("/logging_3_0.xml"), new AttributeValueChangerModelFixer(AbstractHandlerDefinition.FORMATTER, "%E", "%e") ); }

Target:
public void testTransformersEAP700() throws Exception { testEap7Transformer(ModelTestControllerVersion.EAP_7_0_0, ModelVersion.create(3, 0, 0), readResource("/logging_3_0.xml") ); }
Source:
public @NonNull TraceSessionComponent[] getSessions() { List<ITraceControlComponent> compenents = getChildren(TraceSessionGroup.class); if (compenents.size() > 0) { TraceSessionGroup group = (TraceSessionGroup)compenents.get(0); List<ITraceControlComponent> sessions = group.getChildren(TraceSessionComponent.class); return sessions.toArray(new @NonNull TraceSessionComponent[sessions.size()]); } return new @NonNull TraceSessionComponent[0]; }

Target:
public @NonNull TraceSessionComponent[] getSessions() { List<ITraceControlComponent> compenents = getChildren(TraceSessionGroup.class); if (compenents.size() > 0) { TraceSessionGroup group = (TraceSessionGroup)compenents.get(0); List<ITraceControlComponent> sessions = group.getChildren(TraceSessionComponent.class); return sessions.toArray(new @NonNull TraceSessionComponent[sessions.size()]); } return new TraceSessionComponent[0]; }
Source:
public Snippet054NativeControlsInViewers(Shell shell) { final TableViewer viewer = new TableViewer(shell, SWT.BORDER | SWT.FULL_SELECTION); viewer.setContentProvider(ArrayContentProvider.getInstance()); viewer.getTable().setLayoutData( new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1)); TableViewerColumn column = createColumnFor(viewer, "Column 1"); column.setLabelProvider(new ColumnLabelProvider() { @Override public String getText(Object element) { return element.toString(); } }); column = createColumnFor(viewer, "Column 2"); column.setLabelProvider(createCellLabelProvider()); MyModel[] model = createModel(10); viewer.setInput(model); viewer.getTable().setLinesVisible(true); viewer.getTable().setHeaderVisible(true); Button b = createButtonFor(shell, "Modify Input"); b.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { viewer.setInput(createModel((int) (Math.random() * 10))); } }); b = createButtonFor(shell, "Refresh"); b.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { viewer.refresh(); } }); }

Target:
public Snippet054NativeControlsInViewers(Shell shell) { final TableViewer viewer = new TableViewer(shell, SWT.BORDER | SWT.FULL_SELECTION); viewer.setContentProvider(ArrayContentProvider.getInstance()); viewer.getTable().setLayoutData( new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1)); TableViewerColumn column = createColumnFor(viewer, "Column 1"); column.setLabelProvider(new ColumnLabelProvider() { @Override public String getText(Object element) { return element.toString(); } }); column = createColumnFor(viewer, "Column 2"); column.setLabelProvider(createCellLabelProvider()); viewer.setInput(createModel(10)); viewer.getTable().setLinesVisible(true); viewer.getTable().setHeaderVisible(true); Button b = createButtonFor(shell, "Modify Input"); b.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { viewer.setInput(createModel((int) (Math.random() * 10))); } }); b = createButtonFor(shell, "Refresh"); b.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { viewer.refresh(); } }); }
Source:
protected void addDiscoveryService(DiscoveryService discoveryService) { if (discoveryService instanceof ExtendedDiscoveryService) { ExtendedDiscoveryService extendedDiscoveryService = (ExtendedDiscoveryService) discoveryService; extendedDiscoveryServices.add(extendedDiscoveryService); if (active.get()) { DiscoveryServiceCallback dsc = this.discoveryServiceCallback; if (dsc != null) { extendedDiscoveryService.setDiscoveryServiceCallback(dsc); } } } }

Target:
protected void addDiscoveryService(DiscoveryService discoveryService) { if (discoveryService instanceof ExtendedDiscoveryService) { ExtendedDiscoveryService extendedDiscoveryService = (ExtendedDiscoveryService) discoveryService; extendedDiscoveryServices.add(extendedDiscoveryService); DiscoveryServiceCallback dsc = discoveryServiceCallback; SafeCaller sc = safeCaller; if (dsc != null && sc != null) { sc.create(extendedDiscoveryService, ExtendedDiscoveryService.class).build() .setDiscoveryServiceCallback(dsc); } } }
Source:
protected IStatus run(IProgressMonitor monitor) { try { monitor.beginTask(ACTION_NAME, 2); for (final Session session : semanticResourcesURIsToDetachPerSession.keySet()) { if (session != null && session.isOpen()) { TransactionalEditingDomain domain = session.getTransactionalEditingDomain(); Set<URI> semanticResourcesURIsToDetach = semanticResourcesURIsToDetachPerSession.get(session); CompoundCommand compoundCommand = new CompoundCommand(); for (final URI semanticResourcesURI : semanticResourcesURIsToDetach) { RunnableWithResult<Resource> resourceGetter = new RunnableWithResult.Impl<Resource>() { @Override public void run() { Resource semanticResource = session.getTransactionalEditingDomain().getResourceSet().getResource(semanticResourcesURI, false); setResult(semanticResource); } }; TransactionUtil.runExclusive(domain, resourceGetter); Command removeSemanticResourceCmd = new RemoveSemanticResourceCommand(session, resourceGetter.getResult(), new SubProgressMonitor(monitor, 1), true); compoundCommand.append(removeSemanticResourceCmd); } monitor.worked(1); session.getTransactionalEditingDomain().getCommandStack().execute(compoundCommand); } } } catch (Exception e) { SiriusPlugin.getDefault().error(e.getMessage(), e); } finally { monitor.done(); } return Status.OK_STATUS; }

Target:
protected IStatus run(IProgressMonitor monitor) { try { monitor.beginTask(ACTION_NAME, 2); for (final Session session : semanticResourcesToDetachURIsPerSession.keySet()) { if (session != null && session.isOpen()) { TransactionalEditingDomain domain = session.getTransactionalEditingDomain(); Set<URI> semanticResourcesToDetachURIs = semanticResourcesToDetachURIsPerSession.get(session); Command detachSemanticResourcesCmd = new DetachSemanticResourcesCmd(session, semanticResourcesToDetachURIs); domain.getCommandStack().execute(detachSemanticResourcesCmd); monitor.worked(1); } } } catch (Exception e) { SiriusPlugin.getDefault().error(e.getMessage(), e); } finally { monitor.done(); } return Status.OK_STATUS; }
Source:
public Map<String, Object> currentState() { Map<String, Object> state = new HashMap<>(); synchronized (this) { state.put("ExpiredEventQueue", expiredEventQueue != null ? expiredEventQueue.getSnapshot() : null); state.put("ResetEvent", resetEvent); } return state; }

Target:
public Map<String, Object> currentState() { Map<String, Object> state = new HashMap<>(); synchronized (this) { if (outputExpectsExpiredEvents) { state.put("ExpiredEventQueue", expiredEventQueue.getSnapshot()); } state.put("ResetEvent", resetEvent); } return state; }
Source:
public Optional<LockTokenV2> lock(LockRequestV2 request) { LockRequest legacyRequest = toLegacyLockRequest(request); LockRefreshToken legacyToken = lockAnonymous(legacyRequest); return Optional.ofNullable(legacyToken).map(LockRefreshTokenV2Adapter::new); }

Target:
public LockResponseV2 lock(LockRequestV2 request) { LockRequest legacyRequest = toLegacyLockRequest(request); LockRefreshToken legacyToken = lockAnonymous(legacyRequest); if (legacyToken == null) { return LockResponseV2.timedOut(); } else { return LockResponseV2.successful(new LockRefreshTokenV2Adapter(legacyToken)); } }
Source:
public static void loadValue(ITimeGraphPresentationProvider presentationProvider, StateItem stateItem) { IPreferenceStore store = getStore(); String fillColorKey = getPreferenceName(presentationProvider, stateItem, ITimeEventStyleStrings.fillColor()); String heightFactorKey = getPreferenceName(presentationProvider, stateItem, ITimeEventStyleStrings.heightFactor()); Map<String, Object> styleMap = stateItem.getStyleMap(); RGB defaultRgb = stateItem.getStateColor(); String defaultString = store.getDefaultString(fillColorKey); if (defaultString.isEmpty()) { store.setDefault(fillColorKey, new RGBAColor(defaultRgb.red, defaultRgb.green, defaultRgb.blue, 255).toString()); } String rgbColor = store.getString(fillColorKey); if (store.getDefaultInt(ITimeEventStyleStrings.heightFactor()) == 0) { float defaultHeightFactor = isLink(stateItem) ? TimeGraphControl.DEFAULT_LINK_WIDTH : TimeGraphControl.DEFAULT_STATE_WIDTH; defaultHeightFactor = (float) styleMap.getOrDefault(ITimeEventStyleStrings.heightFactor(), defaultHeightFactor); store.setDefault(heightFactorKey, defaultHeightFactor); } float heightFactor = store.getFloat(heightFactorKey); RGBAColor rgba = RGBAColor.fromString(rgbColor); if (rgba != null) { styleMap.put(ITimeEventStyleStrings.fillColor(), rgba.toInt()); styleMap.put(ITimeEventStyleStrings.heightFactor(), heightFactor); } }

Target:
public static void loadValue(ITimeGraphPresentationProvider presentationProvider, StateItem stateItem) { IPreferenceStore store = getStore(); String fillColorKey = getPreferenceName(presentationProvider, stateItem, ITimeEventStyleStrings.fillColor()); String heightFactorKey = getPreferenceName(presentationProvider, stateItem, ITimeEventStyleStrings.heightFactor()); Map<String, Object> styleMap = stateItem.getStyleMap(); RGB defaultRgb = stateItem.getStateColor(); String defaultString = store.getDefaultString(fillColorKey); if (defaultString.isEmpty()) { store.setDefault(fillColorKey, new RGBAColor(defaultRgb.red, defaultRgb.green, defaultRgb.blue, 255).toString()); } String rgbColor = store.getString(fillColorKey); if (store.getDefaultFloat(heightFactorKey) == 0.0f) { float defaultHeightFactor = isLink(stateItem) ? TimeGraphControl.DEFAULT_LINK_WIDTH : TimeGraphControl.DEFAULT_STATE_WIDTH; defaultHeightFactor = (float) styleMap.getOrDefault(ITimeEventStyleStrings.heightFactor(), defaultHeightFactor); store.setDefault(heightFactorKey, defaultHeightFactor); } float heightFactor = store.getFloat(heightFactorKey); RGBAColor rgba = RGBAColor.fromString(rgbColor); if (rgba != null) { styleMap.put(ITimeEventStyleStrings.fillColor(), rgba.toInt()); styleMap.put(ITimeEventStyleStrings.heightFactor(), heightFactor); } }
Source:
private void internalStart() { if (eventHandlers != null && !eventHandlers.isEmpty() && (pollingScheduler == null || pollingScheduler.isCancelled())) { pollingScheduler = scheduler.scheduleAtFixedRate(runableListener, 0, config.getEventListenerRefreshinterval(), TimeUnit.MILLISECONDS); logger.debug("internal start EventListener"); } }

Target:
private void internalStart() { if (!eventHandlers.isEmpty() && (pollingScheduler == null || pollingScheduler.isCancelled())) { pollingScheduler = scheduler.scheduleWithFixedDelay(runableListener, 0, config.getEventListenerRefreshinterval(), TimeUnit.MILLISECONDS); logger.debug("internal start EventListener"); } }
Source:
public void findByJugmentId_SupremeCourtJudgment() { int judgmentId = 124; List<JudgmentCorrection> unsortedJc = Lists.newArrayList(); unsortedJc.add(createJcSupremeCourtChamber()); unsortedJc.add(createJcJudgeDelete(scJudgment)); unsortedJc.add(createJcSupremeCourtJudgmentForm()); unsortedJc.add(createJcSupremeCourtJudgment()); List<JudgmentCorrection> expectedJc = Lists.newArrayList(); expectedJc.add(createJcSupremeCourtJudgment()); expectedJc.add(createJcSupremeCourtChamber()); expectedJc.add(createJcSupremeCourtJudgmentForm()); expectedJc.add(createJcJudgeDelete(scJudgment)); when(judgmentCorrectionRepository.findAllByJudgmentId(judgmentId)).thenReturn(unsortedJc); judgmentCorrectionService.setJudgmentCorrectionRepository(judgmentCorrectionRepository); List<JudgmentCorrection> actualJc = judgmentCorrectionService.findByJugmentId(judgmentId); assertEquals(expectedJc, actualJc); }

Target:
public void findByJugmentId_SupremeCourtJudgment() { int judgmentId = 124; List<JudgmentCorrection> unsortedJc = Lists.newArrayList(); unsortedJc.add(createJcSupremeCourtChamber()); unsortedJc.add(createJcJudgeDelete(scJudgment)); unsortedJc.add(createJcSupremeCourtJudgmentForm()); unsortedJc.add(createJcSupremeCourtJudgment()); unsortedJc.add(createJcJudgeUpdate(scJudgment)); List<JudgmentCorrection> expectedJc = Lists.newArrayList(); expectedJc.add(createJcSupremeCourtJudgment()); expectedJc.add(createJcSupremeCourtChamber()); expectedJc.add(createJcSupremeCourtJudgmentForm()); expectedJc.add(createJcJudgeUpdate(scJudgment)); expectedJc.add(createJcJudgeDelete(scJudgment)); when(judgmentCorrectionRepository.findAllByJudgmentId(judgmentId)).thenReturn(unsortedJc); List<JudgmentCorrection> actualJc = judgmentCorrectionService.findAllByJudgmentIdSorted(judgmentId); assertEquals(expectedJc, actualJc); }
Source:
public String generateInitFileName(String toVersion) throws HiveMetaException { if (toVersion == null) { toVersion = getHiveSchemaVersion(); } String initScriptName = INIT_FILE_PREFIX + toVersion + "." + dbType + SQL_FILE_EXTENSION; File file = new File(getMetaStoreScriptDir() + File.separatorChar + initScriptName); if (!(file.exists())) { throw new HiveMetaException("Unknown version specified for initialization: " + toVersion, new NoSuchFileException(file.getAbsolutePath())); } return initScriptName; }

Target:
public String generateInitFileName(String toVersion) throws HiveMetaException { if (toVersion == null) { toVersion = getHiveSchemaVersion(); } String initScriptName = INIT_FILE_PREFIX + toVersion + "." + dbType + SQL_FILE_EXTENSION; File file = new File(getMetaStoreScriptDir() + File.separatorChar + initScriptName); if (!file.exists()) { throw new HiveMetaException("Unknown version specified for initialization: " + toVersion, new NoSuchFileException(file.getAbsolutePath())); } return initScriptName; }
Source:
public ClosableIterator<Tuple> executeBackendQuery(BackendQuery<IgniteQueryDescriptor> backendQuery, QueryParameters queryParameters, TupleContext tupleContext) { IgniteCache<Object, BinaryObject> cache; if ( backendQuery.getSingleEntityMetadataInformationOrNull() != null ) { cache = provider.getEntityCache( backendQuery.getSingleEntityMetadataInformationOrNull().getEntityKeyMetadata() ); } else if ( backendQuery.getQuery().getQuerySpaces().size() > 0 ) { cache = provider.getEntityCache( backendQuery.getQuery().getQuerySpaces().iterator().next() ); } else { throw new IgniteHibernateException( "Can't find cache name" ); } QueryHints hints = ( new QueryHints.Builder( queryParameters.getQueryHints() ) ).build(); SqlFieldsQuery sqlQuery = provider.createSqlFieldsQueryWithLog( backendQuery.getQuery().getSql(), hints, IgniteHqlQueryParser.createParameterList( backendQuery.getQuery().getOriginalSql(), queryParameters.getNamedParameters() ).toArray() ); Iterable<List<?>> result = executeWithHints( cache, sqlQuery, hints ); if ( backendQuery.getQuery().isHasScalar() ) { return new IgniteProjectionResultCursor( result, backendQuery.getQuery().getCustomQueryReturns(), queryParameters.getRowSelection() ); } else { if ( backendQuery.getSingleEntityMetadataInformationOrNull() != null ) { return new IgnitePortableFromProjectionResultCursor( result, queryParameters.getRowSelection(), backendQuery.getSingleEntityMetadataInformationOrNull().getEntityKeyMetadata() ); } else { throw new UnsupportedOperationException( "Not implemented yet" ); } } }

Target:
public ClosableIterator<Tuple> executeBackendQuery(BackendQuery<IgniteQueryDescriptor> backendQuery, QueryParameters queryParameters, TupleContext tupleContext) { IgniteCache<Object, BinaryObject> cache; if ( backendQuery.getSingleEntityMetadataInformationOrNull() != null ) { cache = provider.getEntityCache( backendQuery.getSingleEntityMetadataInformationOrNull().getEntityKeyMetadata() ); } else { throw new UnsupportedOperationException( "Not implemented. Can't find cache name" ); } QueryHints hints = ( new QueryHints.Builder( queryParameters.getQueryHints() ) ).build(); SqlFieldsQuery sqlQuery = provider.createSqlFieldsQueryWithLog( backendQuery.getQuery().getSql(), hints, backendQuery.getQuery().getIndexedParameters() != null ? backendQuery.getQuery().getIndexedParameters().toArray() : null ); Iterable<List<?>> result = executeWithHints( cache, sqlQuery, hints ); if ( backendQuery.getSingleEntityMetadataInformationOrNull() != null ) { return new IgnitePortableFromProjectionResultCursor( result, queryParameters.getRowSelection(), backendQuery.getSingleEntityMetadataInformationOrNull().getEntityKeyMetadata() ); } else if ( backendQuery.getQuery().isHasScalar() ) { throw new NotYetImplementedException(); } else { throw new UnsupportedOperationException( "Not implemented yet" ); } }
Source:
public SSLContext getConfiguredDefault() throws DynamicSSLContextException { if (this.configuredDefaultSSLContext != null) { return this.configuredDefaultSSLContext; } try { return AUTH_CONTEXT_CLIENT.getDefaultSSLContext(AuthenticationContext.captureCurrent()); } catch (GeneralSecurityException e) { throw new DynamicSSLContextException(e); } }

Target:
public SSLContext getConfiguredDefault() throws DynamicSSLContextException { if (this.configuredDefaultSSLContext != null) { return this.configuredDefaultSSLContext; } try { return AUTH_CONTEXT_CLIENT.getDefaultSSLContext(AuthenticationContext.captureCurrent()); } catch (GeneralSecurityException e) { throw ElytronMessages.log.cannotObtainDefaultSSLContext(e); } }
Source:
public List<String> validate() { for (VdsNetworkInterface iface : params.getInterfaces()) { String name = iface.getName(); if (addInterfaceToProcessedList(iface)) { if (isBond(iface)) { extractBondIfModified(iface, name); } else { if (StringUtils.isNotBlank(iface.getBondName())) { extractBondSlave(iface); } if (!getExistingIfaces().containsKey(NetworkUtils.StripVlan(name))) { addViolation(VdcBllMessages.NETWORK_INTERFACES_DONT_EXIST, NetworkUtils.StripVlan(name)); } } if (violations.isEmpty() && StringUtils.isNotBlank(iface.getNetworkName())) { extractNetwork(iface); } } } validateBondSlavesCount(); extractRemovedNetworks(); extractRemovedBonds(); detectSlaveChanges(); return translateViolations(); }

Target:
public List<String> validate() { for (VdsNetworkInterface iface : params.getInterfaces()) { String name = iface.getName(); if (addInterfaceToProcessedList(iface)) { if (isBond(iface)) { extractBondIfModified(iface, name); } else { if (StringUtils.isNotBlank(iface.getBondName())) { extractBondSlave(iface); } String nameWithoutVlanId = NetworkUtils.StripVlan(name); if (!getExistingIfaces().containsKey(nameWithoutVlanId)) { addViolation(VdcBllMessages.NETWORK_INTERFACES_DONT_EXIST, nameWithoutVlanId); } } if (violations.isEmpty() && StringUtils.isNotBlank(iface.getNetworkName())) { extractNetwork(iface); } } } validateBondSlavesCount(); extractRemovedNetworks(); extractRemovedBonds(); detectSlaveChanges(); return translateViolations(); }
Source:
public List<RelationshipType> getRightRelationshipTypes(Context context, Entity entity) throws SQLException { EntityType entityType = this.getType(context, entity); List<RelationshipType> listToReturn = new LinkedList<>(); for (RelationshipType relationshipType : relationshipTypeService.findAll(context)) { if (relationshipType.getRightType() == entityType) { listToReturn.add(relationshipType); } } return listToReturn; }

Target:
public List<RelationshipType> getRightRelationshipTypes(Context context, Entity entity) throws SQLException { EntityType entityType = this.getType(context, entity); List<RelationshipType> listToReturn = new LinkedList<>(); for (RelationshipType relationshipType : relationshipTypeService.findAll(context)) { if (relationshipType.getRightType().getID() == entityType.getID()) { listToReturn.add(relationshipType); } } return listToReturn; }
Source:
public void checkCourseEnrollment(List<EnrolledCoursesResponse> responses) { List<CourseEntry> activeList = new ArrayList<>(); for (EnrolledCoursesResponse response : responses) { if (response.isCourse() && response.isIs_active()) { activeList.add(response.getCourse()); } } if (activeList.isEmpty()) return; UserBasedPrefManager prefManager = UserBasedPrefManager.getInstance(UserBasedPrefManager.UserPrefType.NOTIFICATION); NotificationPreference preference = prefManager.getNotificationPreference(); List<CourseEntry> newCourseList = preference.filterForNewCourses(activeList); for (CourseEntry courseEntry : newCourseList) { EdxLocalParseChannel pc = new EdxLocalParseChannel(courseEntry.getId(), true); subscribeAndUnsubscribeToNotificationServer(pc.getChannelId(), true); preference.add(pc); } List<EdxLocalParseChannel> inactivCourseList = preference.filterForInactiveCourses(activeList); for (EdxLocalParseChannel pc : inactivCourseList) { if (pc.isSubscribed()) { subscribeAndUnsubscribeToNotificationServer(pc.getChannelId(), false); pc.setSubscribed(false); } } if (newCourseList.size() > 0 || inactivCourseList.size() > 0) prefManager.saveNotificationPreference(preference); }

Target:
public void checkCourseEnrollment(List<EnrolledCoursesResponse> responses) { List<CourseEntry> activeList = new ArrayList<>(); for (EnrolledCoursesResponse response : responses) { if (response.isCourse() && response.isIs_active()) { activeList.add(response.getCourse()); } } if (activeList.isEmpty()) return; UserBasedPrefManager prefManager = UserBasedPrefManager.getInstance(UserBasedPrefManager.UserPrefType.NOTIFICATION); NotificationPreference preference = prefManager.getNotificationPreference(); List<CourseEntry> newCourseList = preference.filterForNewCourses(activeList); for (CourseEntry courseEntry : newCourseList) { EdxLocalParseChannel pc = new EdxLocalParseChannel(courseEntry.getId(), true); toggleSubscribeToNotificationServer(pc.getChannelId(), true); preference.add(pc); } List<EdxLocalParseChannel> inactiveCourseList = preference.filterForInactiveCourses(activeList); for (EdxLocalParseChannel pc : inactiveCourseList) { if (pc.isSubscribed()) { toggleSubscribeToNotificationServer(pc.getChannelId(), false); pc.setSubscribed(false); } } if (newCourseList.size() > 0 || inactiveCourseList.size() > 0) prefManager.saveNotificationPreference(preference); }
Source:
private Call<MwCreateAccountResponse> request(@NonNull CreateAccountClient.Callback cb) { return subject.request(service(CreateAccountClient.Service.class), "user", "pass", "pass", "token", "email", "11235813", "fibonacci", cb); }

Target:
private Call<CreateAccountResponse> request(@NonNull CreateAccountClient.Callback cb) { return subject.request(service(CreateAccountClient.Service.class), "user", "pass", "pass", "token", "email", "11235813", "fibonacci", cb); }
Source:
private CompletableFuture<RestResponse> headHandler(RestRequest restRequest) { return CompletableFuture.completedFuture(new NettyRestResponse.Builder().contentType(APPLICATION_JSON).status(OK).build()); }

Target:
private CompletionStage<RestResponse> headHandler(RestRequest restRequest) { return HEAD_RESPONSE; }
Source:
public void subscribe(Subscriber<? super R> subscriber) { delegate.subscribe(new Subscriber<StreamPayload<R>>() { private Subscription subscription; @Override public void onSubscribe(Subscription subscription) { if (subscription == null) { throw new NullPointerException("subscription is null"); } if (this.subscription != null) { subscription.cancel(); } else { this.subscription = subscription; subscriber.onSubscribe(subscription); } } @Override public void onNext(StreamPayload<R> payload) { Throwable error = null; try { subscriber.onNext(payload.getItem()); } catch (Throwable t) { error = t; } if (payload.getCallback() != null) { payload.getCallback().processed(payload.getItem(), error); } } @Override public void onError(Throwable throwable) { subscriber.onError(throwable); } @Override public void onComplete() { subscriber.onComplete(); } }); }

Target:
public void subscribe(Subscriber<? super R> subscriber) { delegate.subscribe(new Subscriber<StreamPayload<R>>() { private Subscription subscription; @Override public void onSubscribe(Subscription newSubscription) { if (newSubscription == null) { throw new NullPointerException("subscription is null"); } else if (newSubscription == this.subscription) { throw new IllegalArgumentException("already subscribed to the subscription: " + newSubscription); } if (this.subscription != null) { newSubscription.cancel(); } else { this.subscription = newSubscription; subscriber.onSubscribe(newSubscription); } } @Override public void onNext(StreamPayload<R> payload) { Throwable error = null; try { subscriber.onNext(payload.getItem()); } catch (Throwable t) { error = t; } if (payload.getCallback() != null) { payload.getCallback().processed(payload.getItem(), error); } } @Override public void onError(Throwable throwable) { subscriber.onError(throwable); } @Override public void onComplete() { subscriber.onComplete(); } }); }
Source:
private void populateSessionDetails(Map<String, Object> innerMap) { masterVolumeName = innerMap.containsKey(VOLUME_NAME) ? innerMap.get(VOLUME_NAME).toString() : null; sessionKey = innerMap.containsKey(SESSION_ID) ? innerMap.get(SESSION_ID).toString() : null; if(innerMap.containsKey(GEO_REP_PAIRS)) { for(Object sessionPair : (Object[]) innerMap.get(GEO_REP_PAIRS)) { GlusterGeoRepSessionDetails details = new GlusterGeoRepSessionDetails(); GlusterGeoRepSession session = new GlusterGeoRepSession(); populatePairDetails((Map<String, Object>) sessionPair, details, session); geoRepDetails.add(details); geoRepSessions.add(session); } } }

Target:
private void populateSessionDetails(Map<String, Object> innerMap) { GlusterGeoRepSession session = getSession(innerMap); if(innerMap.containsKey(GEO_REP_PAIRS)) { for(Object sessionPair : (Object[]) innerMap.get(GEO_REP_PAIRS)) { geoRepDetails.add(populatePairDetails((Map<String, Object>) sessionPair, session)); } } session.setSessionDetails(geoRepDetails); geoRepSessions.add(session); }
Source:
private Interpreter createRemoteRepl(String interpreterPath, String interpreterSessionKey, String className, Properties property, String interpreterSettingId, String userName, Boolean isUserImpersonate, InterpreterRunner interpreterRunner) { int connectTimeout = conf.getInt(ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT); String localRepoPath = conf.getInterpreterLocalRepoPath() + "/" + interpreterSettingId; int maxPoolSize = conf.getInt(ConfVars.ZEPPELIN_INTERPRETER_MAX_POOL_SIZE); String interpreterRunnerPath; if (null != interpreterRunner) { interpreterRunnerPath = Joiner.on(File.separator) .join(interpreterPath, interpreterRunner.getPath()); } else { interpreterRunnerPath = conf.getInterpreterRemoteRunnerPath(); } RemoteInterpreter remoteInterpreter = new RemoteInterpreter(property, interpreterSessionKey, className, interpreterRunnerPath, interpreterPath, localRepoPath, connectTimeout, maxPoolSize, remoteInterpreterProcessListener, appEventListener, userName, isUserImpersonate); remoteInterpreter.addEnv(env); return new LazyOpenInterpreter(remoteInterpreter); }

Target:
Interpreter createRemoteRepl(String interpreterPath, String interpreterSessionKey, String className, Properties property, String interpreterSettingId, String userName, Boolean isUserImpersonate, InterpreterRunner interpreterRunner) { int connectTimeout = conf.getInt(ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT); String localRepoPath = conf.getInterpreterLocalRepoPath() + "/" + interpreterSettingId; int maxPoolSize = conf.getInt(ConfVars.ZEPPELIN_INTERPRETER_MAX_POOL_SIZE); String interpreterRunnerPath; if (null != interpreterRunner) { interpreterRunnerPath = interpreterRunner.getPath(); Path p = Paths.get(interpreterRunnerPath); if (!p.isAbsolute()) { interpreterRunnerPath = Joiner.on(File.separator) .join(interpreterPath, interpreterRunnerPath); } } else { interpreterRunnerPath = conf.getInterpreterRemoteRunnerPath(); } RemoteInterpreter remoteInterpreter = new RemoteInterpreter(property, interpreterSessionKey, className, interpreterRunnerPath, interpreterPath, localRepoPath, connectTimeout, maxPoolSize, remoteInterpreterProcessListener, appEventListener, userName, isUserImpersonate); remoteInterpreter.addEnv(env); return new LazyOpenInterpreter(remoteInterpreter); }
Source:
protected void onUserAction(String userActionName, AssetDisplayInteractor interactor, Object... args) { if (entryId != 0) { interactor.start(entryId); } else if (className != null && !className.equals("") && classPK != 0) { interactor.start(className, classPK); } else { interactor.start(portletItemName); } }

Target:
protected void onUserAction(String userActionName, AssetDisplayInteractor interactor, Object... args) { if (entryId != 0) { interactor.start(entryId); } else if (className != null && !"".equals(className) && classPK != 0) { interactor.start(className, classPK); } else { interactor.start(portletItemName); } }
Source:
public void putBlobs(String key, List<Blob> blobs) { if (absoluteMaxSize > 0 && getStorageSize() > absoluteMaxSize) { doGC(); if (getStorageSize() > absoluteMaxSize) { throw new MaximumTransientSpaceExceeded(); } } removeBlobs(key); KeyValueStore kvs = getKeyValueStore(); BlobProvider bp = getBlobProvider(); long totalSize = 0; int i = 0; for (Blob blob : blobs) { long size = blob.getLength(); if (size >= 0) { totalSize += size; } String blobKey; try { blobKey = bp.writeBlob(blob); } catch (IOException e) { throw new NuxeoException(e); } Map<String, String> blobMap = new HashMap<>(); blobMap.put(KEY, blobKey); blobMap.put(MIMETYPE, blob.getMimeType()); blobMap.put(ENCODING, blob.getEncoding()); blobMap.put(FILENAME, blob.getFilename()); blobMap.put(LENGTH, String.valueOf(size)); blobMap.put(DIGEST, blob.getDigest()); kvs.put(key + DOT_BLOB_DOT + i, mapToJson(blobMap), ttl); i++; } Map<String, String> blobInfoMap = new HashMap<>(); blobInfoMap.put(COUNT, String.valueOf(blobs.size())); blobInfoMap.put(SIZE, String.valueOf(totalSize)); kvs.put(key + DOT_BLOBINFO, mapToJson(blobInfoMap), ttl); addStorageSize(totalSize); markEntryExists(key); }

Target:
public void putBlobs(String key, List<Blob> blobs) { if (absoluteMaxSize > 0 && getStorageSize() > absoluteMaxSize) { doGC(); if (getStorageSize() > absoluteMaxSize) { throw new MaximumTransientSpaceExceeded(); } } removeBlobs(key); KeyValueStore kvs = getKeyValueStore(); BlobProvider bp = getBlobProvider(); long totalSize = 0; int i = 0; for (Blob blob : blobs) { long size = blob.getLength(); if (size >= 0) { totalSize += size; } String blobKey; try { blobKey = bp.writeBlob(blob); } catch (IOException e) { throw new NuxeoException(e); } Map<String, String> blobMap = new HashMap<>(); blobMap.put(KEY, blobKey); blobMap.put(MIMETYPE, blob.getMimeType()); blobMap.put(ENCODING, blob.getEncoding()); blobMap.put(FILENAME, blob.getFilename()); blobMap.put(LENGTH, String.valueOf(size)); blobMap.put(DIGEST, blob.getDigest()); kvs.put(key + DOT_BLOB_DOT + i, toJson(blobMap), ttl); i++; } Map<String, String> blobInfoMap = new HashMap<>(); blobInfoMap.put(COUNT, String.valueOf(blobs.size())); blobInfoMap.put(SIZE, String.valueOf(totalSize)); kvs.put(key + DOT_BLOBINFO, toJson(blobInfoMap), ttl); addStorageSize(totalSize); markEntryExists(key); }
Source:
public boolean equals(Object obj) { if (!(obj instanceof SpiderScanResult)) return false; if (this == obj) return true; SpiderScanResult other = (SpiderScanResult) obj; if (method == null) { if (other.method != null) return false; } else if (!method.equals(other.method)) return false; if (uri == null) { if (other.uri != null) return false; } else if (!uri.equals(other.uri)) return false; return true; }

Target:
public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof SpiderScanResult)) return false; SpiderScanResult other = (SpiderScanResult) obj; if (method == null) { if (other.method != null) return false; } else if (!method.equals(other.method)) return false; if (uri == null) { if (other.uri != null) return false; } else if (!uri.equals(other.uri)) return false; return true; }
Source:
public FormValidation doCheckUploadedKeystore(@QueryParameter String value, @QueryParameter String password) { if (StringUtils.isBlank(value)) { return FormValidation.error(Messages.CertificateCredentialsImpl_NoCertificateUploaded()); } byte[] keystoreBytes; if (value.startsWith("{") && value.endsWith("}")) { SecretBytes secretBytes = SecretBytes.fromString(value); keystoreBytes = secretBytes.getPlainData(); if (keystoreBytes == null || keystoreBytes.length == 0) { return FormValidation.error(Messages.CertificateCredentialsImpl_LoadKeystoreFailed()); } } else { Secret secret = Secret.fromString(value); keystoreBytes = toByteArray(secret); if (keystoreBytes == null || keystoreBytes.length == 0) { return FormValidation.error(Messages.CertificateCredentialsImpl_LoadKeystoreFailed()); } } return validateCertificateKeystore("PKCS12", keystoreBytes, password); }

Target:
public FormValidation doCheckUploadedKeystore(@QueryParameter String value, @QueryParameter String password) { if (StringUtils.isBlank(value)) { return FormValidation.error(Messages.CertificateCredentialsImpl_NoCertificateUploaded()); } SecretBytes secretBytes = SecretBytes.fromString(value); byte[] keystoreBytes = secretBytes.getPlainData(); if (keystoreBytes == null || keystoreBytes.length == 0) { return FormValidation.error(Messages.CertificateCredentialsImpl_LoadKeystoreFailed()); } return validateCertificateKeystore("PKCS12", keystoreBytes, password); }
Source:
@Override public <T> ModuleAdapter<T> getModuleAdapter(Class<? extends T> type, T instance) { try { ModuleAdapter<T> result = GeneratedAdapters.initModuleAdapter(type); if (result == null) { result = ReflectiveModuleAdapter.createAdaptor(type); } result.module = (instance == null) ? result.newModule() : instance; return result; } catch (RuntimeException e) { logNotFound("Module adapter", type.getName(), e); throw e; } }

Target:
@Override public <T> ModuleAdapter<T> getModuleAdapter(Class<? extends T> type, T instance) { ModuleAdapter<T> result = GeneratedAdapters.initModuleAdapter(type); if (result == null) { result = ReflectiveModuleAdapter.create(type); } result.module = (instance != null) ? instance : result.newModule(); return result; }
Source:
public void canGetLeaderTimesForMultipleClients() { Namespace client1 = Namespace.of("client1"); Namespace client2 = Namespace.of("client2"); Set<Namespace> namespaces = ImmutableSet.of(client1, client1, client2); LeaderTimes leaderTimesResponse = Futures.getUnchecked(resource.leaderTimes(AUTH_HEADER, namespaces)); Map<Namespace, LeaderTime> leaderTimes = leaderTimesResponse.getLeaderTimes(); leaderTimes.forEach((namespace, leaderTime) -> { assertThat(leaderTime.id()).isEqualTo(namespaceToLeaderMap.get(namespace.get())); }); Set<UUID> leaders = leaderTimes.values().stream() .map(LeaderTime::id) .map(LeadershipId::id) .collect(Collectors.toSet()); assertThat(leaders).hasSameSizeAs(namespaces); }

Target:
public void canGetLeaderTimesForMultipleClients() { Namespace client1 = Namespace.of("client1"); Namespace client2 = Namespace.of("client2"); Set<Namespace> namespaces = ImmutableSet.of(client1, client2); LeaderTimes leaderTimesResponse = Futures.getUnchecked(resource.leaderTimes(AUTH_HEADER, namespaces)); Map<Namespace, LeaderTime> leaderTimes = leaderTimesResponse.getLeaderTimes(); leaderTimes.forEach((namespace, leaderTime) -> { assertThat(leaderTime.id()).isEqualTo(namespaceToLeaderMap.get(namespace.get())); }); Set<UUID> leaders = leaderTimes.values().stream() .map(LeaderTime::id) .map(LeadershipId::id) .collect(Collectors.toSet()); assertThat(leaders).hasSameSizeAs(namespaces); }
Source:
public abstract <T> T serviceProxy(ClusterGroup prj, String name, Class<? super T> srvcCls, boolean sticky, long timeout) throws IgniteException; public abstract <T> Collection<T> services(String name); public abstract ServiceContextImpl serviceContext(String name); public abstract Map<UUID, Integer> serviceTopology(String name, long timeout) throws IgniteCheckedException; public boolean eventDrivenServiceProcessorEnabled() { return false; }

Target:
public abstract <T> T serviceProxy(ClusterGroup prj, String name, Class<? super T> srvcCls, boolean sticky, long timeout) throws IgniteException; public abstract <T> Collection<T> services(String name); public abstract ServiceContextImpl serviceContext(String name); public abstract Map<UUID, Integer> serviceTopology(String name, long timeout) throws IgniteCheckedException; public void onLocalJoin(DiscoveryEvent evt, DiscoCache discoCache) { }
Source:
private static <T> CompletionStage<T> onExecutor(CompletionStage<T> future, Executor executor) { if (executor == null) { return future; } return future.thenApplyAsync(Function.identity(), executor); }

Target:
private static <T> CompletionStage<T> onExecutor(CompletionStage<T> future, Executor executor) { if (executor == null) { return future; } return future.whenCompleteAsync((result, t) -> { }, executor); }