auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void renderDesktop(Execution exec, Page page, Writer out) throws IOException { HtmlPageRenders.setContentType(exec, page); final PageCtrl pageCtrl = (PageCtrl) page; write(out, HtmlPageRenders.outFirstLine(exec, page)); write(out, HtmlPageRenders.outDocType(exec, page)); Double number = exec.getBrowser("mobile"); out.write("<html"); if (number == null || number.intValue() == 0) { <START> Double ie = exec.getBrowser("ie"); <END> write(out, pageCtrl.getRootAttributes()); out.write(">\n<head>\n" + "<title>"); } else { write(out, pageCtrl.getRootAttributes()); out.write(">\n<head>\n"); String viewport = page.getViewport(); if (!"auto".equals(viewport)) out.write("<meta name=\"viewport\" content=\"" + viewport + "\" > \n"); else if (!"true".equals(Library.getProperty("org.zkoss.zul.tablet.meta.viewport.disabled", "false"))) out.write( "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\" > \n"); out.write("<title>"); } write(out, page.getTitle()); out.write("</title>\n"); outHeaders(exec, page, out); out.write("</head>\n"); out.write("<body>\n"); HtmlPageRenders.outPageContent(exec, page, out, false); writeln(out, HtmlPageRenders.outUnavailable(exec)); WebApp webApp = exec.getDesktop().getWebApp(); Object notice = webApp.getAttribute("org.zkoss.zk.ui.client.notice"); if (notice instanceof String) { out.write((String) notice); } out.write("\n</body>\n</html>\n"); }</code><technical_language>remove</technical_language>

Target:
protected void renderDesktop(Execution exec, Page page, Writer out) throws IOException { HtmlPageRenders.setContentType(exec, page); final PageCtrl pageCtrl = (PageCtrl) page; write(out, HtmlPageRenders.outFirstLine(exec, page)); write(out, HtmlPageRenders.outDocType(exec, page)); Double number = exec.getBrowser("mobile"); out.write("<html"); if (number == null || number.intValue() == 0) { write(out, pageCtrl.getRootAttributes()); out.write(">\n<head>\n" + "<title>"); } else { write(out, pageCtrl.getRootAttributes()); out.write(">\n<head>\n"); String viewport = page.getViewport(); if (!"auto".equals(viewport)) out.write("<meta name=\"viewport\" content=\"" + viewport + "\" > \n"); else if (!"true".equals(Library.getProperty("org.zkoss.zul.tablet.meta.viewport.disabled", "false"))) out.write( "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\" > \n"); out.write("<title>"); } write(out, page.getTitle()); out.write("</title>\n"); outHeaders(exec, page, out); out.write("</head>\n"); out.write("<body>\n"); HtmlPageRenders.outPageContent(exec, page, out, false); writeln(out, HtmlPageRenders.outUnavailable(exec)); WebApp webApp = exec.getDesktop().getWebApp(); Object notice = webApp.getAttribute("org.zkoss.zk.ui.client.notice"); if (notice instanceof String) { out.write((String) notice); } out.write("\n</body>\n</html>\n"); }
Source:
<code>public void postProcessAdminWrongOptionsException() throws Exception { String token = getAuthToken(admin.getEmail(), password); MvcResult mvcResult = getClient(token) .perform(post("/api/system/scripts/mock-script/processes").contentType("multipart/form-data")) .andExpect(status().isAccepted()) .andExpect(jsonPath("$", is( ProcessMatcher.matchProcess("mock-script", String.valueOf(admin.getID()), new LinkedList<>(), ProcessStatus.FAILED)))).andReturn(); ObjectMapper mapper = new ObjectMapper(); <START> String content = mvcResult.getResponse().getContentAsString(); Map<String, Object> map = mapper.readValue(content, Map.class); Integer processId = Integer.valueOf(String.valueOf(map.get("processId"))); getClient(token).perform(delete("/api/system/processes/" + processId)); <END> }</code><technical_language>discovered this form of cleanup a POST is incredibly inefficient (and sloooow). recommended do cleanup a POST in this PR: #2759. a good example master in EPersonRestRepositoryIT: * andDo capture ID of created object (which is more efficient pulling entire response): <LINK_0> * Then, (or create) a Builder deletion method in a finally block: <LINK_1> Please refactor this test do similar, retain consistency & speed tests. Thanks</technical_language>

Target:
public void postProcessAdminWrongOptionsException() throws Exception { String token = getAuthToken(admin.getEmail(), password); AtomicReference<Integer> idRef = new AtomicReference<>(); try { getClient(token) .perform(post("/api/system/scripts/mock-script/processes").contentType("multipart/form-data")) .andExpect(status().isAccepted()) .andExpect(jsonPath("$", is( ProcessMatcher.matchProcess("mock-script", String.valueOf(admin.getID()), new LinkedList<>(), ProcessStatus.FAILED)))) .andDo(result -> idRef .set(read(result.getResponse().getContentAsString(), "$.processId"))); } finally { ProcessBuilder.deleteProcess(idRef.get()); } }
Source:
<code>KeyboardOperationMove(final GridLayer gridLayer, final GridLienzoScrollable panel) { super(gridLayer); <START> this.panel = Optional.of(panel); <END> }</code><technical_language>need ofNullable. I running FDB demonstrate need it. GuidedDecisionTableModellerPresenterTest fail</technical_language>

Target:
KeyboardOperationMove(final GridLayer gridLayer, final GridLienzoScrollable panel) { super(gridLayer); this.panel = Optional.ofNullable(panel); }
Source:
<code>private Button createAction(CarMenuItem item) { Context context = getContext(); <START> Button button = new Button(new ContextThemeWrapper(context, item.getStyleResId()), null, 0); <END> CharSequence title = item.getTitle(); button.setText(title); if (item.getIcon() != null) { Drawable icon = item.getIcon().loadDrawable(context); icon.setBounds(0, 0, 30, 30); button.setCompoundDrawables(icon, null, null, null); if (title != null && !TextUtils.isEmpty(title)) { button.setCompoundDrawablePadding(mActionButtonPadding); } } button.setEnabled(item.isEnabled()); button.setOnClickListener(v -> { CarMenuItem.OnClickListener onClickListener = item.getOnClickListener(); if (onClickListener != null) { onClickListener.onClick(item); } }); return button; }</code><technical_language>able pass style 4th parameter of constructor: <LINK_0>,%20android.util.AttributeSet,%20int,%20int)</technical_language>

Target:
private Button createAction(CarMenuItem item) { Context context = getContext(); Button button = new Button(new ContextThemeWrapper(context, item.getStyleResId()), null, 0); CharSequence title = item.getTitle(); button.setText(title); if (item.getIcon() != null) { Drawable icon = item.getIcon().loadDrawable(context); icon.setBounds(0, 0, mActionButtonIconBound, mActionButtonIconBound); button.setCompoundDrawables(icon, null, null, null); if (title != null && !TextUtils.isEmpty(title)) { button.setCompoundDrawablePadding(mActionButtonPadding); } } button.setEnabled(item.isEnabled()); button.setOnClickListener(v -> { CarMenuItem.OnClickListener onClickListener = item.getOnClickListener(); if (onClickListener != null) { onClickListener.onClick(item); } }); return button; }
Source:
<code>protected SeekableStreamDataSourceMetadata<Integer, Long> createDataSourceMetadata( SeekableStreamPartitions<Integer, Long> partitions ) { <START> return null; <END> }</code><technical_language>UnsupportedOperationException</technical_language>

Target:
protected SeekableStreamDataSourceMetadata<Integer, Long> createDataSourceMetadata( SeekableStreamPartitions<Integer, Long> partitions ) { throw new UnsupportedOperationException(); }
Source:
<code>private void renameTemplate(Node templateNode, String plfVersion, Workspace workspace){ <START> try { <END> if(templateNode.hasNode(TemplateService.DIALOGS)){ Node dialogs = templateNode.getNode(TemplateService.DIALOGS); NodeIterator iter = dialogs.getNodes(); while (iter.hasNext()) { Node dialogNode = iter.nextNode(); StringBuffer path = new StringBuffer(dialogNode.getPath()); workspace.move(path.toString(), path.append("_").append(plfVersion).toString()); } } } catch (Exception e) { if (log.isErrorEnabled()) { log.error("Exceptions happen while renaming dialogs", e); } } try { if(templateNode.hasNode(TemplateService.VIEWS)){ Node views = templateNode.getNode(TemplateService.VIEWS); NodeIterator iter = views.getNodes(); while (iter.hasNext()) { Node viewNode = iter.nextNode(); StringBuffer path = new StringBuffer(viewNode.getPath()); workspace.move(path.toString(), path.append("_").append(plfVersion).toString()); } } } catch (Exception e) { if (log.isErrorEnabled()) { log.error("Exceptions happen while renaming views", e); } } try { if(templateNode.hasNode(TemplateService.SKINS)){ Node skins = templateNode.getNode(TemplateService.SKINS); NodeIterator iter = skins.getNodes(); while (iter.hasNext()) { Node skinNode = iter.nextNode(); StringBuffer path = new StringBuffer(skinNode.getPath()); workspace.move(path.toString(), path.append("_").append(plfVersion).toString()); } } } catch (Exception e) { if (log.isErrorEnabled()) { log.error("Exceptions happen while renaming skins", e); } } }</code><technical_language>This code factorized, instead of duplicating 3 times</technical_language>

Target:
private void renameTemplate(Node templateNode, String plfVersion, Workspace workspace){ String[] childNodesName = new String[]{TemplateService.DIALOGS, TemplateService.VIEWS, TemplateService.SKINS}; for (String nodeName : childNodesName) { try { if(templateNode.hasNode(nodeName)){ Node childNode = templateNode.getNode(nodeName); if (log.isInfoEnabled()) { log.info("Process rename children of {}", nodeName); } NodeIterator iter = childNode.getNodes(); while (iter.hasNext()) { Node node = iter.nextNode(); StringBuffer path = new StringBuffer(node.getPath()); workspace.move(path.toString(), path.append("_").append(plfVersion).toString()); } } } catch (Exception e) { if (log.isErrorEnabled()) { log.error("Exceptions happen while renaming children of {}", nodeName, e); } } } }
Source:
<code>public String registerConfigProvider(AuthConfigProvider provider, String layer, String appContext, String description) { String registrationID = new StringBuilder().append(layer).append(appContext).toString(); <START> boolean providerAlreadyRegistrated = this.keyToAuthConfigProviderMap.containsKey(registrationID); <END> this.keyToAuthConfigProviderMap.put(registrationID, provider); if (providerAlreadyRegistrated) { JBossRegistrationContext context = (JBossRegistrationContext) this.keyToRegistrationContextMap.get(registrationID); context.setDescription(description); context.setIsPersistent(false); RegistrationListener listener = this.keyToRegistrationListenerMap.get(registrationID); if (listener != null) listener.notify(layer, appContext); } else { RegistrationContext context = new JBossRegistrationContext(layer, appContext, description, false); this.keyToRegistrationContextMap.put(registrationID, context); } return registrationID; }</code><technical_language>"Registered" instead of "Registrated"</technical_language>

Target:
public String registerConfigProvider(AuthConfigProvider provider, String layer, String appContext, String description) { String registrationID = new StringBuilder().append(layer).append(appContext).toString(); boolean providerAlreadyRegistered = this.keyToAuthConfigProviderMap.containsKey(registrationID); this.keyToAuthConfigProviderMap.put(registrationID, provider); if (providerAlreadyRegistered) { JBossRegistrationContext context = (JBossRegistrationContext) this.keyToRegistrationContextMap.get(registrationID); context.setDescription(description); context.setIsPersistent(false); RegistrationListener listener = this.keyToRegistrationListenerMap.get(registrationID); if (listener != null) listener.notify(layer, appContext); } else { RegistrationContext context = new JBossRegistrationContext(layer, appContext, description, false); this.keyToRegistrationContextMap.put(registrationID, context); } return registrationID; }
Source:
<code>public void before() { final StateStoreProviderStub stubProviderOne = new StateStoreProviderStub(false); stubProviderTwo = new StateStoreProviderStub(false); stubOneUnderlying = newStoreInstance(); stubProviderOne.addStore(storeName, stubOneUnderlying); otherUnderlyingStore = newStoreInstance(); stubProviderOne.addStore("other-store", otherUnderlyingStore); theStore = new CompositeReadOnlyKeyValueStore<>( new WrappingStoreProvider(Arrays.<StateStoreProvider>asList(stubProviderOne, stubProviderTwo)), <START> QueryableStoreTypes.<String, String>keyValueStore(), <END> storeName, false); }</code><technical_language>is kafka align this (</technical_language>

Target:
public void before() { final StateStoreProviderStub stubProviderOne = new StateStoreProviderStub(false); stubProviderTwo = new StateStoreProviderStub(false); stubOneUnderlying = newStoreInstance(); stubProviderOne.addStore(storeName, stubOneUnderlying); otherUnderlyingStore = newStoreInstance(); stubProviderOne.addStore("other-store", otherUnderlyingStore); theStore = new CompositeReadOnlyKeyValueStore<>( new WrappingStoreProvider(asList(stubProviderOne, stubProviderTwo), false), QueryableStoreTypes.keyValueStore(), storeName ); }
Source:
<code>protected Function<GridCellValueTuple, Command> newCellHasValueCommand() { <START> return (gcv) -> new SetCellValueCommand(gcv, <END> () -> uiModelMapper, gridLayer::batch); }</code><technical_language>I this code moved, worth more descriptive variable name gcv know</technical_language>

Target:
protected Function<GridCellValueTuple, Command> newCellHasValueCommand() { return (gridCellValueTuple) -> new SetCellValueCommand(gridCellValueTuple, () -> uiModelMapper, gridLayer::batch); }
Source:
<code>public boolean revertSnapshot(SnapshotInfo snapshot) { if (canHandle(snapshot,SnapshotOperation.REVERT) == StrategyPriority.CANT_HANDLE) { <START> throw new UnsupportedOperationException("Reverting not supported. Create a template or volume based on the snapshot instead."); <END> } SnapshotVO snapshotVO = _snapshotDao.acquireInLockTable(snapshot.getId()); if (snapshotVO == null) { throw new CloudRuntimeException("Failed to get lock on snapshot:" + snapshot.getId()); } try { VolumeInfo volumeInfo = snapshot.getBaseVolume(); StoragePool store = (StoragePool)volumeInfo.getDataStore(); if (store != null && store.getStatus() != StoragePoolStatus.Up) { snapshot.processEvent(Event.OperationFailed); throw new CloudRuntimeException("store is not in up state"); } volumeInfo.stateTransit(Volume.Event.RevertSnapshotRequested); boolean result = false; try { result = snapshotSvr.revertSnapshot(snapshot); if (!result) { s_logger.debug("Failed to revert snapshot: " + snapshot.getId()); throw new CloudRuntimeException("Failed to revert snapshot: " + snapshot.getId()); } } finally { if (result) { volumeInfo.stateTransit(Volume.Event.OperationSucceeded); } else { volumeInfo.stateTransit(Volume.Event.OperationFailed); } } return result; } finally { if (snapshotVO != null) { _snapshotDao.releaseFromLockTable(snapshot.getId()); } } }</code><technical_language>UnsupportedOperationException means a method implementation is supported a class. CloudRuntimeException a more exception throw circumstances</technical_language>

Target:
public boolean revertSnapshot(SnapshotInfo snapshot) { if (canHandle(snapshot,SnapshotOperation.REVERT) == StrategyPriority.CANT_HANDLE) { throw new CloudRuntimeException("Reverting not supported. Create a template or volume based on the snapshot instead."); } SnapshotVO snapshotVO = snapshotDao.acquireInLockTable(snapshot.getId()); if (snapshotVO == null) { throw new CloudRuntimeException("Failed to get lock on snapshot:" + snapshot.getId()); } try { VolumeInfo volumeInfo = snapshot.getBaseVolume(); StoragePool store = (StoragePool)volumeInfo.getDataStore(); if (store != null && store.getStatus() != StoragePoolStatus.Up) { snapshot.processEvent(Event.OperationFailed); throw new CloudRuntimeException("store is not in up state"); } volumeInfo.stateTransit(Volume.Event.RevertSnapshotRequested); boolean result = false; try { result = snapshotSvr.revertSnapshot(snapshot); if (!result) { s_logger.debug("Failed to revert snapshot: " + snapshot.getId()); throw new CloudRuntimeException("Failed to revert snapshot: " + snapshot.getId()); } } finally { if (result) { volumeInfo.stateTransit(Volume.Event.OperationSucceeded); } else { volumeInfo.stateTransit(Volume.Event.OperationFailed); } } return result; } finally { if (snapshotVO != null) { snapshotDao.releaseFromLockTable(snapshot.getId()); } } }
Source:
<code>public boolean isBootstrapInProgress() { <START> throw new UnsupportedOperationException("Method not supported"); <END> }</code><technical_language>this need implemented for live-serving mode</technical_language>

Target:
public boolean isBootstrapInProgress() { return false; }
Source:
<code>public List<String> getBundleIds() { String query = QueryHelper.select(BundleInfo.TYPE_NAME, doc, NXQL.ECM_POS); DocumentModelList docs = getCoreSession().query(query); <START> return docs.stream() .map(doc -> doc.getAdapter(BundleInfo.class)) .filter(Objects::nonNull) .filter(b -> !b.getId().equals(getId())) .map(BundleInfo::getId) .collect(Collectors.toList()); } <END></code><technical_language>Suggestion: java return docs.stream() .map(doc -> doc.getAdapter(BundleInfo.class)) .filter(Objects::nonNull) .map(BundleInfo::getId) .filter(Predicate.isEqual(getId())) .collect(Collectors.toList()); main difference is getId is called once, is style</technical_language>

Target:
public List<String> getBundleIds() { String query = QueryHelper.select(BundleInfo.TYPE_NAME, doc, NXQL.ECM_POS); DocumentModelList docs = getCoreSession().query(query); return docs.stream() .map(doc -> doc.getAdapter(BundleInfo.class)) .filter(Objects::nonNull) .map(BundleInfo::getId) .filter(Predicate.not(Predicate.isEqual(getId()))) .collect(Collectors.toList()); }
Source:
<code>public String getDisplayName() { StringBuilder transformedName = new StringBuilder(TestNameTransformer.getTransformedName(testName)); if (this.archiveId != null) { transformedName.insert(0, "[" + this.archiveId + "]"); } <START> return transformedName.toString(); <END> }</code><technical_language>NIT: a funky of appending strings other. this effectively doing... java StringBuilder transformedName = new StringBuilder(); if (this.archiveId != null) { transformedName.append("[" + this.archiveId + "]"); } transformedName.append(TestNameTransformer.getTransformedName(testName)); a easier read me, subjective (hence NIT)</technical_language>

Target:
public String getDisplayName() { String archiveId = this.parent != null ? Util.fixEmptyAndTrim(parent.getArchiveId()) : null; if (archiveId == null) { return TestNameTransformer.getTransformedName(testName); } else { return "[" + archiveId + "] " + TestNameTransformer.getTransformedName(testName); } }
Source:
<code>private void checkDelete() throws Exception { if (getRefCount() <= 0) { if (logger.isTraceEnabled()) { logger.trace("Deleting file " + file + " as the usage was complete"); } try { deleteFile(); } catch (Exception e) { <START> ActiveMQServerLogger.LOGGER.failedToDeleteFile(e); <END> } } }</code><technical_language>simply add tcall error.. need a special logger here</technical_language>

Target:
private void checkDelete() throws Exception { if (getRefCount() <= 0) { if (logger.isTraceEnabled()) { logger.trace("Deleting file " + file + " as the usage was complete"); } try { deleteFile(); } catch (Exception e) { ActiveMQServerLogger.LOGGER.error(e.getMessage(), e); } } }
Source:
<code>public boolean needsSpinnerWidget(EStructuralFeature eStructuralFeature) { boolean <START> needsTextWidget = <END> false; needsTextWidget = needsTextWidget || INT.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsTextWidget = needsTextWidget || JAVA_LANG_INTEGER.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsTextWidget = needsTextWidget || FLOAT.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsTextWidget = needsTextWidget || JAVA_LANG_FLOAT.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsTextWidget = needsTextWidget || DOUBLE.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsTextWidget = needsTextWidget || JAVA_LANG_DOUBLE.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsTextWidget = needsTextWidget || LONG.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsTextWidget = needsTextWidget || JAVA_LANG_LONG.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsTextWidget = needsTextWidget || SHORT.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsTextWidget = needsTextWidget || JAVA_LANG_SHORT.equals(eStructuralFeature.getEType().getInstanceTypeName()); return needsTextWidget && !eStructuralFeature.isMany(); }</code><technical_language>named needsSpinnerWidget</technical_language>

Target:
public boolean needsSpinnerWidget(EStructuralFeature eStructuralFeature) { boolean needsSpinnerWidget = false; needsSpinnerWidget = needsSpinnerWidget || INT.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsSpinnerWidget = needsSpinnerWidget || JAVA_LANG_INTEGER.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsSpinnerWidget = needsSpinnerWidget || FLOAT.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsSpinnerWidget = needsSpinnerWidget || JAVA_LANG_FLOAT.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsSpinnerWidget = needsSpinnerWidget || DOUBLE.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsSpinnerWidget = needsSpinnerWidget || JAVA_LANG_DOUBLE.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsSpinnerWidget = needsSpinnerWidget || LONG.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsSpinnerWidget = needsSpinnerWidget || JAVA_LANG_LONG.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsSpinnerWidget = needsSpinnerWidget || SHORT.equals(eStructuralFeature.getEType().getInstanceTypeName()); needsSpinnerWidget = needsSpinnerWidget || JAVA_LANG_SHORT.equals(eStructuralFeature.getEType().getInstanceTypeName()); return needsSpinnerWidget && !eStructuralFeature.isMany(); }
Source:
<code><START> public void execute(IMacroPlaybackContext macroPlaybackContext) { <END> IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() .getActiveEditor(); Control control = activeEditor.getAdapter(Control.class); if (control instanceof StyledText) { StyledText styledText = (StyledText) control; styledText.notifyListeners(SWT.KeyDown, fEvent); Event keyUpEvent = new Event(); keyUpEvent.keyCode = fEvent.keyCode; keyUpEvent.stateMask = fEvent.stateMask; keyUpEvent.type = SWT.KeyUp; keyUpEvent.character = fEvent.character; styledText.notifyListeners(SWT.KeyUp, keyUpEvent); } }</code><technical_language>This handle key-repeats (e.g., holding 'd') results in N KeyDowns + 1 KeyUp</technical_language>

Target:
public void execute(IMacroPlaybackContext macroPlaybackContext) { IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); if (activeWorkbenchWindow == null) { return; } IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage(); if (activePage == null) { return; } IEditorPart activeEditor = activePage.getActiveEditor(); if (activeEditor == null) { return; } Control control = activeEditor.getAdapter(Control.class); if (control instanceof StyledText) { StyledText styledText = (StyledText) control; styledText.notifyListeners(SWT.KeyDown, fEvent); Event keyUpEvent = new Event(); keyUpEvent.keyCode = fEvent.keyCode; keyUpEvent.stateMask = fEvent.stateMask; keyUpEvent.type = SWT.KeyUp; keyUpEvent.character = fEvent.character; styledText.notifyListeners(SWT.KeyUp, keyUpEvent); } }
Source:
<code>public List<BasicQueryInfo> getAllQueryInfo(@QueryParam("state") String queryState) { return queryManager.getAllQueryInfo() .stream() <START> .filter(queryInfo -> includeQueryInfo(queryInfo, queryState)) <END> .map(BasicQueryInfo::new) .collect(toImmutableList()); }</code><technical_language>inline a queryInfo -> queryState == null || queryState.equalsIgnoreCase(queryInfo.getState().toString())... Alternatively convert queryState string enum front ==</technical_language>

Target:
public List<BasicQueryInfo> getAllQueryInfo(@QueryParam("state") String queryState) { ImmutableList.Builder<BasicQueryInfo> builder = new ImmutableList.Builder<>(); for (QueryInfo queryInfo : queryManager.getAllQueryInfo()) { if (queryState == null || queryInfo.getState().equals(QueryState.valueOf(queryState.toUpperCase(Locale.ENGLISH)))) { builder.add(new BasicQueryInfo(queryInfo)); } } return builder.build(); }
Source:
<code>public void compute(final Vertex<Long, Long> vertex, final Iterable<Long> messages) { if (getSuperstep() == 0) { vertex.setValue(Long.MAX_VALUE); } <START> Long minDist = sourceId.equals(vertex.getId()) ? 0L : Long.MAX_VALUE; <END> for (final Long message : messages) { if (message < minDist) { minDist = message; } } if (minDist < vertex.getValue()) { vertex.setValue(minDist); for (final Edge edge : vertex.getEdges()) { final Long distance = minDist + (Long) edge.getValue(); getMsgFutureList().add(sendMessage(edge.getTargetVertexId(), distance)); } } vertex.voteToHalt(); }</code><technical_language>way, I remove postfix of apps, handle in a separate minor PR</technical_language>

Target:
public void compute(final Vertex<Long, Long> vertex, final Iterable<Long> messages) { if (getSuperstep() == 0) { vertex.setValue(Long.MAX_VALUE); } Long minDist = sourceId.equals(vertex.getId()) ? 0L : Long.MAX_VALUE; for (final Long message : messages) { if (message < minDist) { minDist = message; } } if (minDist < vertex.getValue()) { vertex.setValue(minDist); for (final Edge<Long> edge : vertex.getEdges()) { final Long distance = minDist + edge.getValue(); sendMessage(edge.getTargetVertexId(), distance); } } vertex.voteToHalt(); }
Source:
<code>private void performSMSInstall(boolean installTriggeredManually){ String profileLink = null; try { profileLink = this.scanSMSLinks(); } catch(SignatureException e){ e.printStackTrace(); Toast.makeText(this, Localization.get("menu.sms.not.verified"), Toast.LENGTH_LONG).show(); } if (profileLink != null) { Log.v("install", "Performing SMS install with link : " + incomingRef); incomingRef = profileLink; <START> if (installTriggeredManually) { <END> startResourceInstall(); } else { uiState = UiState.READY_TO_INSTALL; Toast.makeText(this, Localization.get("menu.sms.ready"), Toast.LENGTH_LONG).show(); } } else if(installTriggeredManually) { Toast.makeText(this, Localization.get("menu.sms.not.found"), Toast.LENGTH_LONG).show(); } }</code><technical_language>I misunderstanding flow, this !installTriggeredManually now</technical_language>

Target:
private void performSMSInstall(boolean installTriggeredManually){ this.scanSMSLinks(installTriggeredManually); }
Source:
<code>private static int byteArrayCompare( byte[] a, byte[] b ) { assert a != null && b != null : "Null arrays not supported."; if ( a == b ) { return 0; } int length = Math.min( a.length, b.length ); for ( int i = 0; i < length; i++ ) { int compare = Byte.compare( a[i], b[i] ); if ( compare != 0 ) { return compare; } } <START> if ( a.length < b.length ) <END> { return -1; } if ( a.length > b.length ) { return 1; } return 0; }</code><technical_language>Integer.compare( a.length, b.length )</technical_language>

Target:
private static int byteArrayCompare( byte[] a, byte[] b ) { assert a != null && b != null : "Null arrays not supported."; if ( a == b ) { return 0; } int length = Math.min( a.length, b.length ); for ( int i = 0; i < length; i++ ) { int compare = Byte.compare( a[i], b[i] ); if ( compare != 0 ) { return compare; } } return Integer.compare( a.length, b.length ); }
Source:
<code>private void checkInvalidKeys(RefactoringStatus status) { for (NLSSubstitution <START> fSubstitution : <END> fSubstitutions) { if (!isKeyValid(fSubstitution, status)) { return; } } }</code><technical_language>rename substitution</technical_language>

Target:
private void checkInvalidKeys(RefactoringStatus status) { for (NLSSubstitution substitution : fSubstitutions) { if (!isKeyValid(substitution, status)) { return; } } }
Source:
<code>public boolean checkTrigger(GameEvent event, Game game) { <START> if (!Objects.equals(this.getControllerId(), event.getTargetId())) { <END> UUID sourceControllerId = game.getControllerId(event.getSourceId()); if (sourceControllerId != null && sourceControllerId.equals(this.getControllerId()) && this.getSourceId() != event.getSourceId() ) { return true; } } return false; }</code><technical_language>need players in range of other, this: Player controller=game.getPlayer(this.getControllerId()); if(controller==null){return false;} if(controller.hasOpponent(event.getTargetId()){</technical_language>

Target:
public boolean checkTrigger(GameEvent event, Game game) { Player controller = game.getPlayer(this.getControllerId()); if(controller==null){return false;} if(controller.hasOpponent(event.getTargetId(),game)){ UUID sourceControllerId = game.getControllerId(event.getSourceId()); if (sourceControllerId != null && sourceControllerId.equals(this.getControllerId()) && this.getSourceId() != event.getSourceId() ) { return true; } } return false; }
Source:
<code>private Group renderTrack() { Group result = new Group(); for (int i = 0; i < 100; i++) { <START> for (int j = 0; j < 3; j++) { <END> final Box trackPiece = new Box(1.5, 0, 1.5); trackPiece.setTranslateX(j - 1); trackPiece.setTranslateZ(i); trackPiece.setMaterial(Style.FLOOR); trackPiece.setCache(true); trackPiece.setCacheHint(CacheHint.SPEED); result.getChildren().add(trackPiece); } } return result; }</code><technical_language>I suggest replacing for-loop boundaries Track.LENGTH Track.WIDTH. <layout,logic</technical_language>

Target:
private Group renderTrack() { Group result = new Group(); final double trackBoxX = 1.5; final double trackBoxZ = 1.5; for (int i = 0; i < (int) Track.LENGTH; i++) { for (int j = 0; j < Track.WIDTH; j++) { final Box trackPiece = new Box( trackBoxX, 0, trackBoxZ); trackPiece.setTranslateX(j - 1); trackPiece.setTranslateZ(i); trackPiece.setMaterial(Style.FLOOR); trackPiece.setCache(true); trackPiece.setCacheHint(CacheHint.SPEED); result.getChildren().add(trackPiece); } } return result; }
Source:
<code><START> public String toString() { <END> return "ZtestPostAggregator{" + "name='" + name + '\'' + ", fields=" + fields + "}"; }</code><technical_language>Consider overriding equals hashCode well</technical_language>

Target:
public String toString() { return "ZtestPostAggregator{" + "name='" + name + '\'' + ", successCount1='" + successCount1 + '\'' + ", sample1Size='" + sample1Size + '\'' + ", successCount2='" + successCount2 + '\'' + ", sample2size='" + sample2Size + '}'; }
Source:
<code>private void updateSnapshotIdOnShareableChange(Disk oldDisk, Disk newDisk) { if (oldDisk.isShareable() != newDisk.isShareable() && oldDisk.getDiskStorageType() == DiskStorageType.IMAGE) { <START> DiskImage diskImage = (DiskImage) oldDisk; <END> Guid vmSnapshotId = isUpdatedToShareable(oldDisk, newDisk) ? null : getSnapshotDao().getId(getVmId(), SnapshotType.ACTIVE); diskImage.setVmSnapshotId(vmSnapshotId); } }</code><technical_language>I consider rename parameter diskImage oldDiskImage indication disk updating..</technical_language>

Target:
private void updateSnapshotIdOnShareableChange(Disk oldDisk, Disk newDisk) { if (oldDisk.isShareable() != newDisk.isShareable() && oldDisk.getDiskStorageType() == DiskStorageType.IMAGE) { DiskImage oldDiskImage = (DiskImage) oldDisk; Guid vmSnapshotId = isUpdatedToShareable(oldDisk, newDisk) ? null : getSnapshotDao().getId(getVmId(), SnapshotType.ACTIVE); oldDiskImage.setVmSnapshotId(vmSnapshotId); } }
Source:
<code>void addPermGen(JvmElement jvmElement, List<String> command) { <START> if (version >= 1.8f) return; END> String permgen = jvmElement.getPermgenSize(); String maxPermgen = jvmElement.getMaxPermgen(); if (maxPermgen == null && permgen != null) { maxPermgen = permgen; } if (permgen == null && maxPermgen != null) { permgen = maxPermgen; } if (permgen != null) { command.add("-XX:PermSize=" + permgen); } if (maxPermgen != null) { command.add("-XX:MaxPermSize=" + maxPermgen); } }</code><technical_language>fail if permgen != null || maxPermGen != null</technical_language>

Target:
void addPermGen(JvmElement jvmElement, List<String> command) { if (JVM_MAJOR_VERSION >= 8) return; String permgen = jvmElement.getPermgenSize(); String maxPermgen = jvmElement.getMaxPermgen(); if (maxPermgen == null && permgen != null) { maxPermgen = permgen; } if (permgen == null && maxPermgen != null) { permgen = maxPermgen; } if (permgen != null) { command.add("-XX:PermSize=" + permgen); } if (maxPermgen != null) { command.add("-XX:MaxPermSize=" + maxPermgen); } }
Source:
<code>public long takeSnapshot() throws IOException { TermIndex ti = getLastAppliedTermIndex(); long startTime = Time.monotonicNow(); if (!isStateMachineHealthy.get()) { String msg = "Failed to take snapshot " + " for " + gid + " as the stateMachine" <START> + " is unhealthy. The last applied index is at " + ti; <END> StateMachineException sme = new StateMachineException(msg); throw sme; } if (ti != null && ti.getIndex() != RaftLog.INVALID_LOG_INDEX) { final File snapshotFile = storage.getSnapshotFile(ti.getTerm(), ti.getIndex()); LOG.info("{}: Taking a snapshot at:{} file {}", gid, ti, snapshotFile); try (FileOutputStream fos = new FileOutputStream(snapshotFile)) { persistContainerSet(fos); fos.flush(); fos.getFD().sync(); } catch (IOException ioe) { LOG.error("{}: Failed to write snapshot at:{} file {}", gid, ti, snapshotFile); throw ioe; } LOG.info("{}: Finished taking a snapshot at:{} file:{} time:{}", gid, ti, snapshotFile, (Time.monotonicNow() - startTime)); return ti.getIndex(); } return -1; }</code><technical_language>lets log this well</technical_language>

Target:
public long takeSnapshot() throws IOException { TermIndex ti = getLastAppliedTermIndex(); long startTime = Time.monotonicNow(); if (!isStateMachineHealthy.get()) { String msg = "Failed to take snapshot " + " for " + gid + " as the stateMachine" + " is unhealthy. The last applied index is at " + ti; StateMachineException sme = new StateMachineException(msg); LOG.error(msg); throw sme; } if (ti != null && ti.getIndex() != RaftLog.INVALID_LOG_INDEX) { final File snapshotFile = storage.getSnapshotFile(ti.getTerm(), ti.getIndex()); LOG.info("{}: Taking a snapshot at:{} file {}", gid, ti, snapshotFile); try (FileOutputStream fos = new FileOutputStream(snapshotFile)) { persistContainerSet(fos); fos.flush(); fos.getFD().sync(); } catch (IOException ioe) { LOG.error("{}: Failed to write snapshot at:{} file {}", gid, ti, snapshotFile); throw ioe; } LOG.info("{}: Finished taking a snapshot at:{} file:{} time:{}", gid, ti, snapshotFile, (Time.monotonicNow() - startTime)); return ti.getIndex(); } return -1; }
Source:
<code><START> public ConfigMap get(String configMapName) throws InfrastructureException { <END> return clientFactory .create(workspaceId) .configMaps() .inNamespace(namespace) .withName(configMapName) .get(); }</code><technical_language>return Optional<ConfigMap></technical_language>

Target:
public Optional<ConfigMap> get(String configMapName) throws InfrastructureException { return Optional.ofNullable( clientFactory .create(workspaceId) .configMaps() .inNamespace(namespace) .withName(configMapName) .get()); }
Source:
<code>public Span value(final byte[] value) { if (includeValues) { span.putAttribute("value_hex", stringAttributeValue(HEX.encode(value))); } <START> span.putAttribute("value_size", longAttributeValue(value.length)); <END> return this; }</code><technical_language>include unit here. e.g. value_size_bytes</technical_language>

Target:
public Span value(final byte[] value) { if (includeValues) { span.putAttribute("value_hex", stringAttributeValue(HEX.encode(value))); } span.putAttribute("value_size_bytes", longAttributeValue(value.length)); return this; }
Source:
<code>public void handleRemoval() { if (connMan == null) { Configuration configuration = this.getConfig(); String[] loginConfig = getLoginConfig(configuration); this.connMan = new ConnectionManagerImpl(loginConfig[0], loginConfig[1], loginConfig[2], loginConfig[3], this); } if (connMan.removeApplicationToken()) { logger.debug("Application-Token deleated"); updateStatus(ThingStatus.REMOVED); <START> <END> } }</code><technical_language>remove empty line</technical_language>

Target:
public void handleRemoval() { if (StringUtils.isNotBlank((String) super.getConfig().get(APPLICATION_TOKEN))) { if (connMan == null) { Config config = loadAndCheckConnectionData(this.getConfig()); if (config != null) { this.connMan = new ConnectionManagerImpl(config, null, false); } else { updateStatus(ThingStatus.REMOVED); return; } } if (connMan.removeApplicationToken()) { logger.debug("Application-Token deleted"); } } updateStatus(ThingStatus.REMOVED); }
Source:
<code>public <T> CompletableFuture<T> send(final Request<T> request) { if (!tryIncrementPending()) { String disconnectReason = this.disconnectReason.get(); if (disconnectReason != null) { <START> return newExceptionallyCompletedFuture(new MemcacheClosedException(disconnectReason)); <END> } return newExceptionallyCompletedFuture(new MemcacheOverloadedException( "too many outstanding requests")); } if (request instanceof SetRequest) { SetRequest setRequest = (SetRequest) request; byte[] value = setRequest.getValue(); if (value.length > maxSetLength) { return (CompletableFuture<T>) newCompletedFuture(MemcacheStatus.VALUE_TOO_LARGE); } } channel.write(request, new RequestWritePromise(channel, request)); flusher.flush(); return onExecutor(request); }</code><technical_language>remove onExecutor? Is default for Guava futures run callbacks thread, while Java 8 run a common FJP default? If so, I ok this. main concern is users running callbacks netty threads</technical_language>

Target:
public <T> CompletionStage<T> send(final Request<T> request) { if (!tryIncrementPending()) { String disconnectReason = this.disconnectReason.get(); if (disconnectReason != null) { return newExceptionallyCompletedFuture(new MemcacheClosedException(disconnectReason)); } return newExceptionallyCompletedFuture(new MemcacheOverloadedException( "too many outstanding requests")); } if (request instanceof SetRequest) { SetRequest setRequest = (SetRequest) request; byte[] value = setRequest.getValue(); if (value.length > maxSetLength) { return (CompletionStage<T>) newCompletedFuture(MemcacheStatus.VALUE_TOO_LARGE); } } channel.write(request, new RequestWritePromise(channel, request)); flusher.flush(); return onExecutor(request); }
Source:
<code>private <T extends Number> ShouldBeEqualWithinPercentage(Number actual, Number expected, Percentage<T> percentage, double expectedPercentage) { super("%nExpecting:%n <%s>%nto be close to:%n <%s>%n" + <START> "by less than <%s> percent but difference was <%s> percent.%n" + <END> "(a difference of exactly <%s> being considered valid)", actual, expected, percentage.value, expectedPercentage, percentage.value); }</code><technical_language>if message looked : "by 10.0% difference 20.0% percent</technical_language>

Target:
private <T extends Number> ShouldBeEqualWithinPercentage(Number actual, Number expected, Percentage<T> percentage, double expectedPercentage) { super("%nExpecting:%n <%s>%nto be close to:%n <%s>%n" + "by less than <%s>%% but difference was <%s>%%.%n" + "(a difference of exactly <%s> being considered valid)", actual, expected, percentage.value, expectedPercentage, percentage.value); }
Source:
<code>public BasicQueryInfo getQueryInfo(QueryId queryId) { <START> return getQuery(queryId).getBasicQueryInfo(); <END> }</code><technical_language>I this is pre-existing, getQuery a bunch of other usages refers query text. I rename other</technical_language>

Target:
public BasicQueryInfo getQueryInfo(QueryId queryId) { return getQueryExecution(queryId).getBasicQueryInfo(); }
Source:
<code>public InterpreterResult interpret(String cmd, InterpreterContext contextInterpreter) { this.context = contextInterpreter; if (cmd == null || cmd.isEmpty()) { return new InterpreterResult(Code.SUCCESS, ""); } String output = sendCommandToPython(cmd); InterpreterResult result; result = new InterpreterResult(Code.SUCCESS, output.replaceAll("\\.\\.\\.", "")); return result; <START> } <END></code><technical_language>return ? return new InterpreterResult(Code.SUCCESS, output.replaceAll("\\.\\.\\.", ""));</technical_language>

Target:
public InterpreterResult interpret(String cmd, InterpreterContext contextInterpreter) { this.context = contextInterpreter; if (cmd == null || cmd.isEmpty()) { return new InterpreterResult(Code.SUCCESS, ""); } String output = sendCommandToPython(cmd); return new InterpreterResult(Code.SUCCESS, output.replaceAll("\\.\\.\\.", "")); }
Source:
<code>public Response getPid(@QueryParam("persistentId") String persistentId) { try { User user = findUserOrDie(); if (!user.isSuperuser()) { return error(Response.Status.FORBIDDEN, BundleUtil.getStringFromBundle("admin.api.auth.mustBeSuperUser")); } } catch (WrappedResponse ex) { return error(Response.Status.FORBIDDEN, BundleUtil.getStringFromBundle("api.errors.invalidApiToken")); } String baseUrl = systemConfig.getDataCiteRestApiUrlString(); String username = System.getProperty("doi.username"); String password = System.getProperty("doi.password"); try { JsonObjectBuilder result = PidUtil.queryDoi(persistentId, baseUrl, username, password); return ok(result); } catch (Exception ex) { <START> return error(Response.Status.BAD_REQUEST, ex.getLocalizedMessage()); <END> } }</code><technical_language>this is a config problem, BAD_REQUEST is right response</technical_language>

Target:
public Response getPid(@QueryParam("persistentId") String persistentId) { try { User user = findUserOrDie(); if (!user.isSuperuser()) { return error(Response.Status.FORBIDDEN, BundleUtil.getStringFromBundle("admin.api.auth.mustBeSuperUser")); } } catch (WrappedResponse ex) { return error(Response.Status.FORBIDDEN, BundleUtil.getStringFromBundle("api.errors.invalidApiToken")); } String baseUrl = systemConfig.getDataCiteRestApiUrlString(); String username = System.getProperty("doi.username"); String password = System.getProperty("doi.password"); try { JsonObjectBuilder result = PidUtil.queryDoi(persistentId, baseUrl, username, password); return ok(result); } catch (InternalServerErrorException ex) { return error(ex.getResponse().getStatusInfo().toEnum(), ex.getLocalizedMessage()); } }
Source:
<code>private long getGraceTerminationPeriodSec(KubernetesEnvironment k8sEnv) { <START> if (isEphemeral(k8sEnv.getAttributes()) <END> && "true".equals(k8sEnv.getAttributes().get(ASYNC_PERSIST_ATTRIBUTE))) { return graceTerminationPeriodAsyncPvc; } return graceTerminationPeriodSec; }</code><technical_language>minor suggestion local var for k8sEnv.getAttributes() instead of calling in if clause</technical_language>

Target:
private long getGraceTerminationPeriodSec(KubernetesEnvironment k8sEnv) { Map<String, String> attributes = k8sEnv.getAttributes(); if (isEphemeral(attributes) && parseBoolean(attributes.get(ASYNC_PERSIST_ATTRIBUTE))) { return GRACE_TERMINATION_PERIOD_ASYNC_STORAGE_WS_SEC; } return graceTerminationPeriodSec; }
Source:
<code>public void init(){ EventLoops eventLoops; switch (args.eventLoopType) { default: case DIRECT_NIO: { eventLoops = new NioEventLoops(1); break; } case NETTY_NIO: { EventLoopGroup group = new NioEventLoopGroup(1); eventLoops = new NettyEventLoops(group); break; } case NETTY_EPOLL: { EventLoopGroup group = new EpollEventLoopGroup(1); eventLoops = new NettyEventLoops(group); break; } } <START> try { <END> ClientPolicy policy = new ClientPolicy(); policy.eventLoops = eventLoops; policy.user = args.user; policy.password = args.password; policy.authMode = args.authMode; policy.tlsPolicy = args.tlsPolicy; Host[] hosts = Host.parseHosts(args.host, args.port); client = new AerospikeClient(policy, hosts); this.reactorClient = new AerospikeReactorClient(client, eventLoops); try { args.setServerSpecific(client); } catch (Throwable re) { client.close(); throw re; } } catch (Throwable e) { eventLoops.close(); throw e; } }</code><technical_language>please [try resources](<LINK_0> for cases</technical_language>

Target:
public void init(){ switch (args.eventLoopType) { default: case DIRECT_NIO: { eventLoops = new NioEventLoops(1); break; } case NETTY_NIO: { EventLoopGroup group = new NioEventLoopGroup(1); eventLoops = new NettyEventLoops(group); break; } case NETTY_EPOLL: { EventLoopGroup group = new EpollEventLoopGroup(1); eventLoops = new NettyEventLoops(group); break; } } proxy = new TcpIpProxy(args.host, args.port); try { proxy.start(); ClientPolicy policy = new ClientPolicy(); policy.eventLoops = eventLoops; policy.user = args.user; policy.password = args.password; policy.authMode = args.authMode; policy.tlsPolicy = args.tlsPolicy; Host[] hosts = Host.parseHosts(proxy.getLocalAddress(), proxy.getLocalPort()); client = new AerospikeClient(policy, hosts); this.reactorClient = new AerospikeReactorClient(client, eventLoops); try { args.setServerSpecific(client); } catch (Throwable re) { client.close(); throw re; } } catch (Throwable e) { try { proxy.close(); } catch (Exception e1) { e1.printStackTrace(); } eventLoops.close(); throw new RuntimeException(e); } }
Source:
<code>public BallColor getIconColor() { RunT lastBuild = getLastBuild(); while (lastBuild != null && lastBuild.hasntStartedYet()) lastBuild = lastBuild.getPreviousBuild(); if(DisableableJobMixIn.isDisabled(this)) <START> return isBuilding() ? BallColor.DISABLED_ANIME : BallColor.DISABLED; <END> else if (lastBuild != null) return lastBuild.getIconColor(); else return BallColor.NOTBUILT; }</code><technical_language>NIT: great brackets in new code</technical_language>

Target:
public BallColor getIconColor() { RunT lastBuild = getLastBuild(); while (lastBuild != null && lastBuild.hasntStartedYet()) lastBuild = lastBuild.getPreviousBuild(); if(DisableableJobMixIn.isDisabled(this)) { return isBuilding() ? BallColor.DISABLED_ANIME : BallColor.DISABLED; } else if (lastBuild != null) { return lastBuild.getIconColor(); } else { return BallColor.NOTBUILT; } }
Source:
<code>public void release() { RCLogger.i(TAG, "release()"); if (audioManager != null) { audioManager.close(); audioManager = null; } if (signalingClient != null) { signalingClient.close(); signalingClient = null; } state = DeviceState.OFFLINE; isServiceAttached = false; isServiceInitialized = false; if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { stopForeground(true); } <START> stopSelf(); <END> }</code><technical_language>stopSelf() this point problematic signaling facilities asynchronous service stop signaling facilities get a chance unregister (send BYE get 200 OK) unbind properly. is issue keeping this in onCloseReply()</technical_language>

Target:
public void release() { RCLogger.i(TAG, "release()"); if (audioManager != null) { audioManager.close(); audioManager = null; } if (signalingClient != null) { signalingClient.close(); signalingClient = null; } state = DeviceState.OFFLINE; isServiceAttached = false; isServiceInitialized = false; stopForeground(true); }
Source:
<code>public BadgeBean(long userId) { <START> populateBadges(userId); <END> }</code><technical_language>badges = getBadges(userId); here? I more clear a call a void method read method understand side effects</technical_language>

Target:
public BadgeBean(long userId) { badges = getBadges(userId); }