auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void onCommentDeleted(ApiEvent.DeleteComment event) { if (!event.hasError()) { for (Iterator<Comment> it = mComments.iterator(); it.hasNext(); ) { <START> Comment comment = it.next(); <END> 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; }</code><technical_language>Oh, Iterator.remove() remove elements. Carry on</technical_language>

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:
<code>private Map<TopicPartition, OffsetAndMetadata> createOffset(Set<SubscriptionPartitionOffset> partitionOffsets) { Map<TopicPartition, OffsetAndMetadata> offsetsData = new LinkedHashMap<>(); for (SubscriptionPartitionOffset partitionOffset : partitionOffsets) { <START> TopicPartition topicAndPartition = new TopicPartition(partitionOffset.getKafkaTopicName().asString(), partitionOffset.getPartition()); <END> offsetsData.put(topicAndPartition, new OffsetAndMetadata(partitionOffset.getOffset())); } return offsetsData; }</code><technical_language>[Checkstyle] INFO: Line is longer 140 characters (found 146)</technical_language>

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:
<code>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, <START> DIRECTION_TO_PROPERTY_MAPPING, <END> (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); }</code><technical_language>this. indent align</technical_language>

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:
<code>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(); <START> entriesLite.addAll(toolDAO.findEntryVersions(userId)); <END> 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; }</code><technical_language>fast right matter, ideally pass count a parameter, filter is null</technical_language>

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:
<code>public boolean updateLagBetweenReplicas(ReplicaId source, ReplicaId target, long lagInBytes) { boolean updated = false; if (replicaToLagInfos.containsKey(source)) { replicaToLagInfos.get(source).updateLagInfo(target, lagInBytes); <START> logger.debug(replicaToLagInfos.get(source).toString()); <END> updated = true; } return updated; }</code><technical_language>need suround this a "if (Logger.isDebugEnabled())" check, expensive toString() method get called logger level is checked</technical_language>

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:
<code><START> protected void fireSelectionChanged() { <END> for (final ISelectionChangedListener listener : this.selectionChangedListeners) { SafeRunnable.run(new SafeRunnable() { @Override public void run() { listener.selectionChanged( new SelectionChangedEvent(SelectionHistoryManager.this.treeViewer, getSelection())); } }); } }</code><technical_language>please elaborate need a concurrent list a SafeRunner in this case</technical_language>

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:
<code><START> String doGetRequestForFileAndStore(final String url, final String filePath) throws GeneralException, UnauthorizedException, NotFoundException { <END> 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; }</code><technical_language>set access modifier private</technical_language>

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:
<code>public void testTransformersEAP700() throws Exception { testEap7Transformer(ModelTestControllerVersion.EAP_7_0_0, ModelVersion.create(3, 0, 0), readResource("/logging_3_0.xml"), <START> new AttributeValueChangerModelFixer(AbstractHandlerDefinition.FORMATTER, "%E", "%e") <END> ); }</code><technical_language>@jamezp correct this a transformer</technical_language>

Target:
public void testTransformersEAP700() throws Exception { testEap7Transformer(ModelTestControllerVersion.EAP_7_0_0, ModelVersion.create(3, 0, 0), readResource("/logging_3_0.xml") ); }
Source:
<code>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 <START> @NonNull TraceSessionComponent[0]; <END> }</code><technical_language>this change for me</technical_language>

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:
<code>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()); <START> MyModel[] model = createModel(10); <END> 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(); } }); }</code><technical_language>List</technical_language>

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:
<code><START> protected void addDiscoveryService(DiscoveryService discoveryService) { <END> if (discoveryService instanceof ExtendedDiscoveryService) { ExtendedDiscoveryService extendedDiscoveryService = (ExtendedDiscoveryService) discoveryService; extendedDiscoveryServices.add(extendedDiscoveryService); if (active.get()) { DiscoveryServiceCallback dsc = this.discoveryServiceCallback; if (dsc != null) { extendedDiscoveryService.setDiscoveryServiceCallback(dsc); } } } }</code><technical_language>depend DiscoveryServices require extended services register specifically interface? Ok, this breaking, ExtendedDiscoveryService extend DiscoveryService, this simply feels wrong here</technical_language>

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:
<code>protected IStatus run(IProgressMonitor monitor) { try { monitor.beginTask(ACTION_NAME, 2); for (final Session session : semanticResourcesURIsToDetachPerSession.keySet()) { if (session != null && session.isOpen()) { <START> 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); <END> } } } catch (Exception e) { SiriusPlugin.getDefault().error(e.getMessage(), e); } finally { monitor.done(); } return Status.OK_STATUS; }</code><technical_language>reworked do work in a single transaction. is open N exclusive transations execute "resourceGetter", a final RW remove semantic resources session. happen in between, do of this atomically</technical_language>

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:
<code>public Map<String, Object> currentState() { Map<String, Object> state = new HashMap<>(); synchronized (this) { <START> state.put("ExpiredEventQueue", expiredEventQueue != null ? expiredEventQueue.getSnapshot() : null); <END> state.put("ResetEvent", resetEvent); } return state; }</code><technical_language>discussed offline, instead of checking null check outputExpectsExpiredEvents boolean variable</technical_language>

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:
<code>public Optional<LockTokenV2> lock(LockRequestV2 request) { LockRequest legacyRequest = toLegacyLockRequest(request); LockRefreshToken legacyToken = lockAnonymous(legacyRequest); <START> return Optional.ofNullable(legacyToken).map(LockRefreshTokenV2Adapter::new); <END> }</code><technical_language>Sanity check: this Optional.empty() if if timed out</technical_language>

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:
<code>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()) == <START> 0) { <END> 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); } }</code><technical_language>0.0f</technical_language>

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:
<code>private void internalStart() { <START> if (eventHandlers != null && !eventHandlers.isEmpty() <END> && (pollingScheduler == null || pollingScheduler.isCancelled())) { pollingScheduler = scheduler.scheduleAtFixedRate(runableListener, 0, config.getEventListenerRefreshinterval(), TimeUnit.MILLISECONDS); logger.debug("internal start EventListener"); } }</code><technical_language>omit this null check if initialize list definition</technical_language>

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:
<code>public void findByJugmentId_SupremeCourtJudgment() { int judgmentId = 124; List<JudgmentCorrection> unsortedJc = Lists.newArrayList(); unsortedJc.add(createJcSupremeCourtChamber()); <START> unsortedJc.add(createJcJudgeDelete(scJudgment)); <END> 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); }</code><technical_language>here, cases here: createJcJudgeUpdate</technical_language>

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:
<code>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); <START> if (!(file.exists())) { <END> throw new HiveMetaException("Unknown version specified for initialization: " + toVersion, new NoSuchFileException(file.getAbsolutePath())); } return initScriptName; }</code><technical_language>nit. enclosing () for file needed</technical_language>

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:
<code>public SSLContext getConfiguredDefault() throws DynamicSSLContextException { if (this.configuredDefaultSSLContext != null) { return this.configuredDefaultSSLContext; } try { return AUTH_CONTEXT_CLIENT.getDefaultSSLContext(AuthenticationContext.captureCurrent()); } catch (GeneralSecurityException e) { <START> throw new DynamicSSLContextException(e); <END> } }</code><technical_language>good include a message for of exceptions</technical_language>

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:
<code>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); } <START> if (!getExistingIfaces().containsKey(NetworkUtils.StripVlan(name))) { <END> addViolation(VdcBllMessages.NETWORK_INTERFACES_DONT_EXIST, NetworkUtils.StripVlan(name)); } } if (violations.isEmpty() && StringUtils.isNotBlank(iface.getNetworkName())) { extractNetwork(iface); } } } validateBondSlavesCount(); extractRemovedNetworks(); extractRemovedBonds(); detectSlaveChanges(); return translateViolations(); }</code><technical_language>extract NetworkUtils.StripVlan(name) local variable reuse in case of error</technical_language>

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:
<code>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)) { <START> if (relationshipType.getRightType() == entityType) { <END> listToReturn.add(relationshipType); } } return listToReturn; }</code><technical_language>equals here</technical_language>

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:
<code>public void checkCourseEnrollment(List<EnrolledCoursesResponse> responses) { List<CourseEntry> activeList = new ArrayList<>(); for (EnrolledCoursesResponse response : responses) { <START> if (response.isCourse() && response.isIs_active()) { <END> 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); }</code><technical_language>this isIs_Active instead of is_active/isActive</technical_language>

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:
<code>private Call<MwCreateAccountResponse> request(@NonNull CreateAccountClient.Callback cb) { return subject.request(service(CreateAccountClient.Service.class), <START> "user", "pass", "pass", <END> "token", "email", "11235813", "fibonacci", cb); }</code><technical_language>I descriptive usage of test strings</technical_language>

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:
<code>private CompletableFuture<RestResponse> headHandler(RestRequest restRequest) { <START> return CompletableFuture.completedFuture(new NettyRestResponse.Builder().contentType(APPLICATION_JSON).status(OK).build()); <END> }</code><technical_language>worth cache this response instance variable</technical_language>

Target:
private CompletionStage<RestResponse> headHandler(RestRequest restRequest) { return HEAD_RESPONSE; }
Source:
<code>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) { <START> subscription.cancel(); <END> } 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(); } }); }</code><technical_language>Is this if else correct? If do a 2x subscribe cancel 2nd time re-subsribe</technical_language>

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:
<code>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(); <START> GlusterGeoRepSession session = new GlusterGeoRepSession(); <END> populatePairDetails((Map<String, Object>) sessionPair, details, session); geoRepDetails.add(details); geoRepSessions.add(session); } } }</code><technical_language>is session object initialized for pair? A session is multiple session details. In this case, detail object is a new session</technical_language>

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:
<code>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) <START> .join(interpreterPath, interpreterRunner.getPath()); <END> } 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); }</code><technical_language>accept absolute path path starts /</technical_language>

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:
<code>protected void onUserAction(String userActionName, AssetDisplayInteractor interactor, Object... args) { if (entryId != 0) { interactor.start(entryId); <START> } else if (className != null && !className.equals("") && classPK != 0) { <END> interactor.start(className, classPK); } else { interactor.start(portletItemName); } }</code><technical_language>invert plz</technical_language>

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:
<code>public void putBlobs(String key, List<Blob> blobs) { if (absoluteMaxSize > 0 && getStorageSize() > absoluteMaxSize) { doGC(); if (getStorageSize() > absoluteMaxSize) { throw new MaximumTransientSpaceExceeded(); <START> } <END> } 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); }</code><technical_language>do checking storage size</technical_language>

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:
<code>public boolean equals(Object obj) { <START> if (!(obj instanceof SpiderScanResult)) return false; <END> 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; }</code><technical_language>This done in place null check</technical_language>

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:
<code>public FormValidation doCheckUploadedKeystore(@QueryParameter String value, @QueryParameter String password) { if (StringUtils.isBlank(value)) { return FormValidation.error(Messages.CertificateCredentialsImpl_NoCertificateUploaded()); } byte[] keystoreBytes; <START> if (value.startsWith("{") && value.endsWith("}")) { <END> 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); }</code><technical_language>this sufficient latest cores secrets, Secret start end { } I need ensure a consistent usage instead dynamically detect</technical_language>

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:
<code>@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); } <START> result.module = (instance == null) ? result.newModule() : instance; <END> return result; } catch (RuntimeException e) { logNotFound("Module adapter", type.getName(), e); throw e; } }</code><technical_language>nit: personal style preference, I prefer instance != null ? instance : result.newModule() flipped case here</technical_language>

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:
<code>public void canGetLeaderTimesForMultipleClients() { Namespace client1 = Namespace.of("client1"); Namespace client2 = Namespace.of("client2"); <START> Set<Namespace> namespaces = ImmutableSet.of(client1, client1, client2); <END> 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); }</code><technical_language>nit: instance of client1? This test multiple requests immutableset kill doubles call resource.getLeaderTimes</technical_language>

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:
<code>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; <START> public boolean eventDrivenServiceProcessorEnabled() { <END> return false; }</code><technical_language>So, this method is supposed removed GridServiceProcessor, right? kind of deprecated doomed? I remove method related checks. If need do in new processor (e.g. localNodeJoin), a no-op implementation one. If need do in one, check srvcProc instanceof GridServiceProcessor - ugliness of check match deprecated status of processor</technical_language>

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) { }