auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public FileSystemStorage(ZeppelinConfiguration zConf, String path) throws IOException { this.zConf = zConf; this.hadoopConf = new Configuration(); URI zepConfigURI; URI defaultFSURI; zepConfigURI = getURI(path, "Failed to get URI path"); this.hadoopConf.setBoolean("fs.file.impl.disable.cache", true); String defaultFS = this.hadoopConf.get(FS_DEFAULTFS); defaultFSURI = getURI(defaultFS, "Failed to get defaultFS URI"); if (isS3AFileSystem(defaultFSURI, zepConfigURI)) { <START> this.hadoopConf.set("fs.s3a.impl", S3AFileSystem.class.getName()); <END> LOGGER.info("Setting fs.s3a.impl to S3AFileSystem"); } else { this.hadoopConf.set("fs.file.impl", RawLocalFileSystem.class.getName()); LOGGER.info("Overriding fs.file.impl to RawLocalFileSystem"); } this.isSecurityEnabled = UserGroupInformation.isSecurityEnabled(); this.fs = FileSystem.get(zepConfigURI, this.hadoopConf); }</code><technical_language>set explicitly? Hadoop detect s3a filesystem</technical_language>

Target:
public FileSystemStorage(ZeppelinConfiguration zConf, String path) throws IOException { this.zConf = zConf; this.hadoopConf = new Configuration(); URI zepConfigURI; URI defaultFSURI; try { zepConfigURI = new URI(path); } catch (URISyntaxException e) { LOGGER.error("Failed to get Zeppelin config URI"); throw new IOException(e); } this.hadoopConf.setBoolean("fs.file.impl.disable.cache", true); String defaultFS = this.hadoopConf.get(FS_DEFAULTFS); try { defaultFSURI = new URI(defaultFS); } catch (URISyntaxException e) { LOGGER.error("Failed to get defaultFS URI"); throw new IOException(e); } if (!isS3AFileSystem(defaultFSURI, zepConfigURI)) { this.hadoopConf.set("fs.file.impl", RawLocalFileSystem.class.getName()); } this.isSecurityEnabled = UserGroupInformation.isSecurityEnabled(); this.fs = FileSystem.get(zepConfigURI, this.hadoopConf); }
Source:
<code>public void stop() { try { <START> LOGGER.log(Level.CONFIG, "Stopping rest server"); <END> webManager.stop(); LOGGER.log(Level.INFO, "Rest server stopped"); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Error occurred when stopping VXQuery", e); throw new VXQueryRuntimeException("Error occurred when stopping rest server", e); } }</code><technical_language>Level.CONFIG</technical_language>

Target:
public void stop() { try { LOGGER.log(Level.FINE, "Stopping rest server"); webManager.stop(); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Error occurred when stopping VXQueryService", e); throw new VXQueryRuntimeException("Error occurred when stopping rest server", e); } LOGGER.log(Level.INFO, "Rest server stopped"); }
Source:
<code>private void calcParallelismAndResource(Transformation<?> transform) { int currentParallelism = transform.getParallelism(); if (parallelism < 0) { parallelism = currentParallelism; } else { <START> checkState( currentParallelism < 0 || parallelism == currentParallelism, "Parallelism of a transformation in MultipleInputNode is different from others. This is a bug."); <END> } int currentMaxParallelism = transform.getMaxParallelism(); if (maxParallelism < 0) { maxParallelism = currentMaxParallelism; } else { checkState( currentMaxParallelism < 0 || maxParallelism == currentMaxParallelism, "Max parallelism of a transformation in MultipleInputNode is different from others. This is a bug."); } if (minResources == null) { minResources = transform.getMinResources(); preferredResources = transform.getPreferredResources(); managedMemoryWeight = transform.getManagedMemoryOperatorScopeUseCaseWeights() .getOrDefault(ManagedMemoryUseCase.BATCH_OP, 0); } else { minResources = minResources.merge(transform.getMinResources()); preferredResources = preferredResources.merge(transform.getPreferredResources()); managedMemoryWeight += transform.getManagedMemoryOperatorScopeUseCaseWeights() .getOrDefault(ManagedMemoryUseCase.BATCH_OP, 0); } }</code><technical_language>Consider case: source1 (100 parallelism) -> calc -\ -> union -> join -> ... source2 (50 parallelism) -> calc -/ If source1 2 chainable, calc merged multiple input node. parallelism different. Multiple input creation algorithm handles ExecNode information parallelism, this problem avoid algorithm. I suggest is set parallelism maximum parallelism of members</technical_language>

Target:
private void calcParallelismAndResource(Transformation<?> transform) { parallelism = Math.max(parallelism, transform.getParallelism()); int currentMaxParallelism = transform.getMaxParallelism(); if (maxParallelism < 0) { maxParallelism = currentMaxParallelism; } else { checkState( currentMaxParallelism < 0 || maxParallelism == currentMaxParallelism, "Max parallelism of a transformation in MultipleInputNode is different from others. This is a bug."); } if (minResources == null) { minResources = transform.getMinResources(); preferredResources = transform.getPreferredResources(); managedMemoryWeight = transform.getManagedMemoryOperatorScopeUseCaseWeights() .getOrDefault(ManagedMemoryUseCase.BATCH_OP, 0); } else { minResources = minResources.merge(transform.getMinResources()); preferredResources = preferredResources.merge(transform.getPreferredResources()); managedMemoryWeight += transform.getManagedMemoryOperatorScopeUseCaseWeights() .getOrDefault(ManagedMemoryUseCase.BATCH_OP, 0); } }
Source:
<code>public String get() { WebElement e = resolve(); <START> return ((JavascriptExecutor)driver).executeScript("return arguments[0].value;", e).toString(); <END> }</code><technical_language>Do need javascript for this? WebElement#getAttribute("value") do. Also, note this work for kinds of imputs (textarea, select, etc.)</technical_language>

Target:
public String get() { return resolve().getAttribute("value"); }
Source:
<code>public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mListView.setSelector(new StateListDrawable()); mListView.setOnTouchListener(this); String theme = Utils.getTheme(getActivity()); if (!mIsMiniMonth) { <START> if (theme.equals("dark")) { <END> mListView.setBackgroundColor(getResources().getColor(R.color.month_bgcolor_dark)); } else { mListView.setBackgroundColor(getResources().getColor(R.color.month_bgcolor)); } } if (mShowCalendarControls) { mListView.postDelayed(mLoadingRunnable, mEventsLoadingDelay); } else { mLoader = (CursorLoader) getLoaderManager().initLoader(0, null, this); } mAdapter.setListView(mListView); }</code><technical_language>? :</technical_language>

Target:
public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mListView.setSelector(new StateListDrawable()); mListView.setOnTouchListener(this); String theme = Utils.getTheme(getActivity()); if (!mIsMiniMonth) { mListView.setBackgroundColor(theme.equals("dark") ? (getResources().getColor(R.color.month_bgcolor_dark)) : (getResources().getColor(R.color.month_bgcolor))); } if (mShowCalendarControls) { mListView.postDelayed(mLoadingRunnable, mEventsLoadingDelay); } else { mLoader = (CursorLoader) getLoaderManager().initLoader(0, null, this); } mAdapter.setListView(mListView); }
Source:
<code>public Object apply(RevisionResource rsrc) throws AuthException, BadRequestException, ResourceConflictException, Exception { <START> return Response.withMustRevalidate(delegate.format(rsrc)); <END> }</code><technical_language>This is GetRevisionActions, is returning a ChangeInfo? "Actions for this revision" sounds a Map<String, ActionInfo>, no</technical_language>

Target:
public Object apply(RevisionResource rsrc) throws AuthException, BadRequestException, ResourceConflictException, Exception { return Response.withMustRevalidate(delegate.get().format(rsrc)); }
Source:
<code>protected void changeState(TraceChannelComponent channel, List<String> eventNames, TraceLogLevel logLevel, LogLevelType logLevelType, TraceEventType eventType, String probe, IProgressMonitor monitor) throws ExecutionException{ if (logLevelType.equals(LogLevelType.LOGLEVEL_NONE) || logLevelType.equals(LogLevelType.LOGLEVEL_ALL)) { switch (eventType) { case FUNCTION: channel.enableProbe(String.join(",", eventNames), true, probe, monitor); break; case PROBE: channel.enableProbe(String.join(",", eventNames), false, probe, monitor); break; case SYSCALL: channel.enableSyscalls(eventNames, monitor); break; case TRACEPOINT: channel.enableEvents(eventNames, monitor); break; case UNKNOWN: break; default: break; } } else { channel.enableLogLevel(eventNames, logLevelType, logLevel, null, <START> TraceDomainType.UNKNOWN, monitor); <END> } }</code><technical_language>channel.getDomain()</technical_language>

Target:
protected void changeState(TraceChannelComponent channel, List<String> eventNames, TraceLogLevel logLevel, LogLevelType logLevelType, TraceEventType eventType, String probe, IProgressMonitor monitor) throws ExecutionException{ if (logLevelType.equals(LogLevelType.LOGLEVEL_NONE) || logLevelType.equals(LogLevelType.LOGLEVEL_ALL)) { switch (eventType) { case FUNCTION: channel.enableProbe(String.join(",", eventNames), true, probe, monitor); break; case PROBE: channel.enableProbe(String.join(",", eventNames), false, probe, monitor); break; case SYSCALL: channel.enableSyscalls(eventNames, monitor); break; case TRACEPOINT: channel.enableEvents(eventNames, monitor); break; case UNKNOWN: break; default: break; } } else { channel.enableLogLevel(eventNames, logLevelType, logLevel, null, channel.getDomain(), monitor); } }
Source:
<code><START> public void testValidateOkStatus() throws OseeCoreException { <END> Artifact newTemplate = ArtifactTypeManager.addArtifact(CoreArtifactTypes.RendererTemplate, testBranch); newTemplate.persist(testInfo.getQualifiedTestName()); TemplateArtifactValidator validator = new TemplateArtifactValidator(); IStatus status = validator.validate(newTemplate, CoreAttributeTypes.TemplateMatchCriteria, GUID.create()); Assert.assertTrue(status.isOK()); }</code><technical_language>Add another template artifact a match criteria check OK</technical_language>

Target:
public void testValidateOkStatus() throws OseeCoreException { Artifact newTemplate = ArtifactTypeManager.addArtifact(CoreArtifactTypes.RendererTemplate, testBranch); newTemplate.persist(testInfo.getQualifiedTestName()); TemplateArtifactValidator validator = new TemplateArtifactValidator(); String templateId = GUID.create(); IStatus status = validator.validate(newTemplate, CoreAttributeTypes.TemplateMatchCriteria, templateId); Assert.assertTrue(status.isOK()); newTemplate.addAttributeFromString(CoreAttributeTypes.TemplateMatchCriteria, templateId); newTemplate.persist(testInfo.getQualifiedTestName()); newTemplate = ArtifactTypeManager.addArtifact(CoreArtifactTypes.RendererTemplate, testBranch); newTemplate.persist(testInfo.getQualifiedTestName()); templateId = GUID.create(); status = validator.validate(newTemplate, CoreAttributeTypes.TemplateMatchCriteria, templateId); Assert.assertTrue(status.isOK()); newTemplate.persist(testInfo.getQualifiedTestName()); }
Source:
<code>protected void initTooltip() { tooltip = new WidgetTooltip(getContents()); tooltip.setPlacement(Placement.BOTTOM); String tooltipContent = infoPopup.getTooltipContent(item, this); if (tooltipContent != null) { <START> tooltip.setHtml(SafeHtmlUtils.fromTrustedString(tooltipContent)); <END> } }</code><technical_language>This is potentially dangerous (possible XSS) called Strings pre-determined compile time. However, tooltipContent DOM [1], OK this. [1] ItemInfoPopup#getTooltipContent method contains: return this.getElement().getInnerHTML(); Also, nice if method [1] final (plus panel parameter is unused)</technical_language>

Target:
protected void initTooltip() { tooltip = new WidgetTooltip(getContents()); tooltip.setPlacement(Placement.BOTTOM); String tooltipContent = infoPopup.getTooltipContent(item); if (tooltipContent != null) { tooltip.setHtml(SafeHtmlUtils.fromTrustedString(tooltipContent)); } }
Source:
<code>protected void onInit() { <START> this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(this.getBeanFactory()); <END> if (this.mongoTemplate == null) { this.mongoTemplate = new ReactiveMongoTemplate(this.mongoDbFactory, this.mongoConverter); } this.initialized = true; }</code><technical_language>No, this. call methods</technical_language>

Target:
protected void onInit() { this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory()); if (this.mongoTemplate == null) { this.mongoTemplate = new ReactiveMongoTemplate(this.mongoDbFactory, this.mongoConverter); } this.initialized = true; }
Source:
<code>public void buttonHelpWithConnectionCallsOpenHelpSite() { onView(withId(R.id.main_menu_button_help)) .perform(click()); <START> assertTrue(UiTestUtils.getCurrentActivity() instanceof WebViewActivity); <END> pressBack(); }</code><technical_language>nicer if is checked right url is loaded. this done ends, verifying intend opening webViewActivity right payload (<LINK_0> other end, adding a getUrl function WebViewactivity polling this asserting</technical_language>

Target:
public void buttonHelpWithConnectionCallsOpenHelpSite() { onView(withId(R.id.main_menu_button_help)) .perform(click()); Activity activity = UiTestUtils.getCurrentActivity(); assertTrue(isWebViewActivity(activity)); String url = ((WebViewActivity)activity).getUrl(); assertTrue(url.contains(Constants.CATROBAT_HELP_URL)); pressBack(); }
Source:
<code>public void process(WatchedEvent event) { ReplyHeader h = new ReplyHeader(-1, -1L, 0); if (LOG.isTraceEnabled()) { ZooTrace.logTraceMessage( LOG, ZooTrace.EVENT_DELIVERY_TRACE_MASK, "Deliver event " + event + " to 0x" + Long.toHexString(this.sessionId) + " through " + this); } WatcherEvent e = event.getWrapper(); <START> sendResponse(h, e, "notification", null, null, -1); <END> }</code><technical_language>This -1 smells a little. I if a constant speak more fact is a</technical_language>

Target:
public void process(WatchedEvent event) { ReplyHeader h = new ReplyHeader(-1, -1L, 0); if (LOG.isTraceEnabled()) { ZooTrace.logTraceMessage( LOG, ZooTrace.EVENT_DELIVERY_TRACE_MASK, "Deliver event " + event + " to 0x" + Long.toHexString(this.sessionId) + " through " + this); } WatcherEvent e = event.getWrapper(); sendResponse(h, e, "notification", null, null, ZooDefs.OpCode.error); }
Source:
<code>public ClusterSetup(String zkServerAddress) { _zkServerAddress = zkServerAddress; RealmAwareZkClient zkClient; try { zkClient = new FederatedZkClient( new RealmAwareZkClient.RealmAwareZkConnectionConfig.Builder().build(), new RealmAwareZkClient.RealmAwareZkClientConfig()); } catch (InvalidRoutingDataException | IOException | IllegalStateException e) { if (zkServerAddress == null || zkServerAddress.isEmpty()) { <START> throw new IllegalArgumentException("ZK server address is null or empty!"); <END> } zkClient = SharedZkClientFactory.getInstance() .buildZkClient(new HelixZkClient.ZkConnectionConfig(_zkServerAddress)); zkClient.setZkSerializer(new ZNRecordSerializer()); } _zkClient = zkClient; _admin = new ZKHelixAdmin(_zkClient); _usesExternalZkClient = false; }</code><technical_language>If zk address is set for multi-realm mode, a user expect IllegalArgumentException. throw IllegalStateException user set this **argument**? include original exception message/stack</technical_language>

Target:
public ClusterSetup(String zkServerAddress) { if (Boolean.parseBoolean(System.getProperty(SystemPropertyKeys.MULTI_ZK_ENABLED))) { try { _zkClient = new FederatedZkClient( new RealmAwareZkClient.RealmAwareZkConnectionConfig.Builder().build(), new RealmAwareZkClient.RealmAwareZkClientConfig() .setZkSerializer(new ZNRecordSerializer())); } catch (IOException | InvalidRoutingDataException | IllegalStateException e) { throw new HelixException("Failed to create ConfigAccessor!", e); } } else { _zkClient = SharedZkClientFactory.getInstance() .buildZkClient(new HelixZkClient.ZkConnectionConfig(zkServerAddress)); _zkClient.setZkSerializer(new ZNRecordSerializer()); } _admin = new ZKHelixAdmin(_zkClient); _usesExternalZkClient = false; }
Source:
<code>public void start(final BundleContext context) throws Exception { super.start(context); pluginId = context.getBundle().getSymbolicName(); Dictionary<String, String> props = new Hashtable<String, String>(4); props.put(DebugOptions.LISTENER_SYMBOLICNAME, pluginId); context.registerService(DebugOptionsListener.class.getName(), this, props); repositoryCache = new RepositoryCache(); indexDiffCache = new IndexDiffCache(); try { GitProjectData.reconfigureWindowCache(); } catch (RuntimeException e) { logError(CoreText.Activator_ReconfigureWindowCacheError, e); } GitProjectData.attachToWorkspace(true); IEclipsePreferences node = InstanceScope.INSTANCE.getNode(Activator.getPluginId()); String gitPrefix = node.get(GitCorePreferences.core_gitPrefix, null); if (gitPrefix != null) FS.DETECTED.setGitPrefix(new File(gitPrefix)); repositoryUtil = new RepositoryUtil(); secureStore = new EGitSecureStore(SecurePreferencesFactory.getDefault()); registerAutoShareProjects(); <START> if (egitChangeListener == null) { <END> egitChangeListener = new IResourceChangeListener() { public void resourceChanged(IResourceChangeEvent event) { IResource project = event.getResource(); if (project instanceof IProject) GitProjectData.reconfigureWindowCache(); } }; ResourcesPlugin.getWorkspace().addResourceChangeListener(egitChangeListener, IResourceChangeEvent.PRE_DELETE); } }</code><technical_language>A name for this "preDeleteProjectListener"</technical_language>

Target:
public void start(final BundleContext context) throws Exception { super.start(context); pluginId = context.getBundle().getSymbolicName(); Dictionary<String, String> props = new Hashtable<String, String>(4); props.put(DebugOptions.LISTENER_SYMBOLICNAME, pluginId); context.registerService(DebugOptionsListener.class.getName(), this, props); repositoryCache = new RepositoryCache(); indexDiffCache = new IndexDiffCache(); try { GitProjectData.reconfigureWindowCache(); } catch (RuntimeException e) { logError(CoreText.Activator_ReconfigureWindowCacheError, e); } GitProjectData.attachToWorkspace(true); IEclipsePreferences node = InstanceScope.INSTANCE.getNode(Activator.getPluginId()); String gitPrefix = node.get(GitCorePreferences.core_gitPrefix, null); if (gitPrefix != null) FS.DETECTED.setGitPrefix(new File(gitPrefix)); repositoryUtil = new RepositoryUtil(); secureStore = new EGitSecureStore(SecurePreferencesFactory.getDefault()); registerAutoShareProjects(); if (preDeleteProjectListener == null) { preDeleteProjectListener = new IResourceChangeListener() { public void resourceChanged(IResourceChangeEvent event) { IResource project = event.getResource(); if (project instanceof IProject) GitProjectData.reconfigureWindowCache(); } }; ResourcesPlugin.getWorkspace().addResourceChangeListener(preDeleteProjectListener, IResourceChangeEvent.PRE_DELETE); } }
Source:
<code>protected synchronized void modified(Map<String, Object> properties) { if (properties != null) { String enabled = (String) properties.get("enabled"); if ("false".equalsIgnoreCase(enabled)) { this.enabled = false; } else { this.enabled = true; } } if (enabled) { boolean initialDelay = properties == null || !"false".equalsIgnoreCase((String) properties.get("initialDelay")); if (initialDelay) { executor = Executors.newSingleThreadScheduledExecutor(); linkRegistry.addRegistryChangeListener(linkRegistryLastUpdateListener); itemRegistry.addRegistryHook(itemRegistryLastUpdateListener); delayedInitialize(); } else { initialize(); } } else { if (executor != null) { executor.shutdownNow(); executor = null; } removeLastUpdateListeners(); for (ProviderChangeListener<Item> listener : listeners) { for (Item item : getAll()) { <START> listener.removed(this, item); <END> } } removeRegistryChangeListeners(); } }</code><technical_language>is purpose of this check, i.e. do need it</technical_language>

Target:
protected synchronized void modified(Map<String, Object> properties) { if (properties != null) { String enabled = (String) properties.get("enabled"); if ("false".equalsIgnoreCase(enabled)) { this.enabled = false; } else { this.enabled = true; } } if (enabled) { addRegistryChangeListeners(); boolean initialDelay = properties == null || !"false".equalsIgnoreCase((String) properties.get("initialDelay")); if (initialDelay) { executor = Executors.newSingleThreadScheduledExecutor(); delayedInitialize(); } else { initialize(); } } else { logger.debug("Disabling channel item provider."); if (executor != null) { executor.shutdownNow(); executor = null; } for (ProviderChangeListener<Item> listener : listeners) { for (Item item : getAll()) { listener.removed(this, item); } } removeRegistryChangeListeners(); } }
Source:
<code>public Bundle createNewAccount(String accountName, String username, String refreshToken, String authToken, String instanceUrl, String loginUrl, String clientId, String orgId, String userId, String passcodeHash, <START> String clientSecret) { <END> Bundle extras = new Bundle(); extras.putString(AccountManager.KEY_ACCOUNT_NAME, accountName); extras.putString(AccountManager.KEY_ACCOUNT_TYPE, getAccountType()); extras.putString(AuthenticatorService.KEY_USERNAME, username); extras.putString(AuthenticatorService.KEY_LOGIN_URL, loginUrl); extras.putString(AuthenticatorService.KEY_INSTANCE_URL, instanceUrl); extras.putString(AuthenticatorService.KEY_CLIENT_ID, clientId); extras.putString(AuthenticatorService.KEY_ORG_ID, orgId); extras.putString(AuthenticatorService.KEY_USER_ID, userId); extras.putString(AuthenticatorService.KEY_CLIENT_SECRET, clientSecret); extras.putString(AccountManager.KEY_AUTHTOKEN, Encryptor.encrypt(authToken, passcodeHash)); Account acc = new Account(accountName, getAccountType()); accountManager.addAccountExplicitly(acc, Encryptor.encrypt(refreshToken, passcodeHash), extras); accountManager.setAuthToken(acc, AccountManager.KEY_AUTHTOKEN, authToken); return extras; }</code><technical_language>This method is called ExplorerActivityTest in RestExplorerTest project. I file modified in checkin</technical_language>

Target:
public Bundle createNewAccount(String accountName, String username, String refreshToken, String authToken, String instanceUrl, String loginUrl, String clientId, String orgId, String userId, String passcodeHash, String clientSecret) { Bundle extras = new Bundle(); extras.putString(AccountManager.KEY_ACCOUNT_NAME, accountName); extras.putString(AccountManager.KEY_ACCOUNT_TYPE, getAccountType()); extras.putString(AuthenticatorService.KEY_USERNAME, username); extras.putString(AuthenticatorService.KEY_LOGIN_URL, loginUrl); extras.putString(AuthenticatorService.KEY_INSTANCE_URL, instanceUrl); extras.putString(AuthenticatorService.KEY_CLIENT_ID, clientId); extras.putString(AuthenticatorService.KEY_ORG_ID, orgId); extras.putString(AuthenticatorService.KEY_USER_ID, userId); if (clientSecret != null) { extras.putString(AuthenticatorService.KEY_CLIENT_SECRET, clientSecret); } extras.putString(AccountManager.KEY_AUTHTOKEN, Encryptor.encrypt(authToken, passcodeHash)); Account acc = new Account(accountName, getAccountType()); accountManager.addAccountExplicitly(acc, Encryptor.encrypt(refreshToken, passcodeHash), extras); accountManager.setAuthToken(acc, AccountManager.KEY_AUTHTOKEN, authToken); return extras; }
Source:
<code>public void propertyChange(PropertyChangeEvent event) { if (getBackgroundColorKey().equals(event.getProperty()) || <START> ((getForegroundColorKey() != null) && <END> getForegroundColorKey().equals(event.getProperty()))) { inititalizeColors(); } }</code><technical_language>This removed. key 'null' Style: 'if' property "or" it</technical_language>

Target:
public void propertyChange(PropertyChangeEvent event) { String property= event.getProperty(); if (property.equals(getBackgroundColorKey()) || property.equals(getForegroundColorKey())) { inititalizeColors(); } }
Source:
<code>public static boolean readBooleanFromByte(byte containerByte, int bitOffset) { <START> if (isBitEnabled(containerByte, bitOffset)) <END> return true; return false; }</code><technical_language>return isBitEnabled(containerByte, bitOffset); enough</technical_language>

Target:
public static boolean readBooleanFromByte(byte containerByte, int bitOffset) { return isBitEnabled(containerByte, bitOffset); }
Source:
<code>private void findTargetLineBreakpoint( final IBreakpointsTargetDMContext bpTargetDMC, final List<MIBreakpoint> candidates, final String fileName, final Integer lineNumber, final String function, final String address, final Boolean isHardware, final Boolean isTemporary, final DataRequestMonitor<MIBreakpoint> drm) { class FindBreakpointRM extends ImmediateDataRequestMonitor<MIBreakpoint> { @Override @ConfinedToDsfExecutor("fExecutor") protected void handleCompleted() { <START> final List<MIBreakpoint> bpts = new ArrayList<MIBreakpoint>(candidates); <END> if (bpts.isEmpty()) { drm.done(); return; } final MIBreakpoint bpt = bpts.remove(0); final String debuggerPath = getFileName(bpt); getSource( bpTargetDMC, debuggerPath, new DataRequestMonitor<String>(getExecutor(), drm) { @Override @ConfinedToDsfExecutor( "fExecutor" ) protected void handleCompleted() { if (!isSuccess()) { GdbPlugin.log(getStatus()); } if (compareBreakpointAttributes( bpt, isSuccess() ? getData() : debuggerPath, fileName, lineNumber, function, address, isHardware, isTemporary)) { drm.setData(bpt); drm.done(); } else { new FindBreakpointRM().done(); } } }); } }; new FindBreakpointRM().done(); }</code><technical_language>I this out of handleCompleted(). Currently, bpts created original 'candidates'. need is list gradually remove elements from</technical_language>

Target:
private void findTargetLineBreakpoint( final IBreakpointsTargetDMContext bpTargetDMC, final List<MIBreakpoint> candidates, final String fileName, final Integer lineNumber, final String function, final String address, final Boolean isHardware, final Boolean isTemporary, final DataRequestMonitor<MIBreakpoint> drm) { final List<MIBreakpoint> bpts = new ArrayList<MIBreakpoint>(candidates); class FindBreakpointRM extends ImmediateDataRequestMonitor<MIBreakpoint> { @Override @ConfinedToDsfExecutor("fExecutor") protected void handleCompleted() { if (bpts.isEmpty()) { drm.done(); return; } final MIBreakpoint bpt = bpts.remove(0); final String debuggerPath = getFileName(bpt); getSource( bpTargetDMC, debuggerPath, new DataRequestMonitor<String>(getExecutor(), drm) { @Override @ConfinedToDsfExecutor( "fExecutor" ) protected void handleCompleted() { if (!isSuccess()) { GdbPlugin.log(getStatus()); } if (compareBreakpointAttributes( bpt, isSuccess() ? getData() : debuggerPath, fileName, lineNumber, function, address, isHardware, isTemporary)) { drm.setData(bpt); drm.done(); } else { new FindBreakpointRM().done(); } } }); } }; new FindBreakpointRM().done(); }
Source:
<code>public void execute(CommandContext commandContext) { RuntimeService runtimeService = commandContext.getProcessEngineConfiguration() .getRuntimeService(); new Thread(() -> { try { ThrowMessage message = messageQueue.take(); Map<String, Object> payload = message.getPayload() .orElse(null); runtimeService.messageEventReceived(message.getName(), executionId, payload); waitingCountDownLatchRef.get() .countDown(); } catch (InterruptedException e) { e.printStackTrace(); <START> } finally { <END> removeSubscription(key); } }).start(); }</code><technical_language>Please, logs instead</technical_language>

Target:
public void execute(CommandContext commandContext) { RuntimeService runtimeService = commandContext.getProcessEngineConfiguration() .getRuntimeService(); new Thread(() -> { try { ThrowMessage message = messageQueue.take(); Map<String, Object> payload = message.getPayload() .orElse(null); runtimeService.messageEventReceived(message.getName(), executionId, payload); waitingCountDownLatchRef.get() .countDown(); } catch (InterruptedException e) { log.error(e.getMessage(), e); } finally { removeSubscription(key); } }).start(); }
Source:
<code>public void minutesOutOfRange() { <START> Assert.assertEquals(0, new GmtTimeZone(false, 60, 0)); <END> }</code><technical_language>This test is wrong. title states minutes out of range, hour is out of range (60). Minute is 0, checked</technical_language>

Target:
public void minutesOutOfRange() { new GmtTimeZone(false, 0, 60); }
Source:
<code>public List<WorkflowActionletParameter> getParameters() { final List<WorkflowActionletParameter> params = new ArrayList<>(); params.add(new WorkflowActionletParameter(PARAM_ENVIRONMENT, "Name of the Environment", "", true)); params.add(new WorkflowActionletParameter(PARAM_FORCE_PUSH, "Force the Push? true or false", "false", true)); <START> params.add(new WorkflowActionletParameter(PARAM_FILTER_KEY, "Filter", "", true)); <END> return params; }</code><technical_language>StringPool.BLANK i18n "Filter"</technical_language>

Target:
public List<WorkflowActionletParameter> getParameters() { final List<WorkflowActionletParameter> params = new ArrayList<>(); params.add(new WorkflowActionletParameter(PARAM_ENVIRONMENT, Try.of(()->LanguageUtil.get("pushNowActionlet.environments.name")).getOrElse("Name of the Environments"), "", true)); final Collection<FilterDescriptor> filterDescriptorMap = Try.of(()->APILocator.getPublisherAPI().getFiltersDescriptorsByRole(APILocator.systemUser())).get(); final FilterDescriptor defaultFilter = filterDescriptorMap.stream().filter(filterDescriptor -> filterDescriptor.isDefaultFilter()).findFirst().get(); final List<MultiKeyValue> multiKeyValueFilterList = new ArrayList<>(); filterDescriptorMap.stream().forEach(filterDescriptor -> multiKeyValueFilterList.add(new MultiKeyValue(filterDescriptor.getKey(),filterDescriptor.getTitle()))); params.add(new MultiSelectionWorkflowActionletParameter(PARAM_FILTER_KEY, Try.of(()->LanguageUtil.get("pushNowActionlet.filter")).getOrElse("Name of the Environments"), defaultFilter.getKey(), true,()->multiKeyValueFilterList)); return params; }
Source:
<code>public void onRequestPermissionsResult(final int requestCode, @NonNull String permissions[], @NonNull final int[] grantResults) { answered = true; waiting = false; if (requestCode == REQUEST_LOCATION) { new Handler().postDelayed(new Runnable() { @Override public void run() { boolean granted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED; LocationGMS.sendAndClearPromptHandlers(true, granted); if (granted) { LocationGMS.startGetLocation(); } else { if (fallbackToSettings && neverAskAgainClicked && <START> !ActivityCompat.shouldShowRequestPermissionRationale(PermissionsActivity.this, LocationGMS.requestPermission)) { <END> showLocationPermissionSettings(); } LocationGMS.fireFailedComplete(); } } }, DELAY_TIME_CALLBACK_CALL); } ActivityLifecycleHandler.removeActivityAvailableListener(TAG); finish(); overridePendingTransition(R.anim.onesignal_fade_in, R.anim.onesignal_fade_out); }</code><technical_language>move this if check a separate method clean this long if-statement, below? if (shouldShowLocationPermissionSettings) showLocationPermissionSettings(); **OR** private void attemptToShowLocationPermissionSettings() { if (fallbackToSettings && neverAskAgainClicked && !ActivityCompat.shouldShowRequestPermissionRationale(PermissionsActivity.this, LocationGMS.requestPermission)) showLocationPermissionSettings(); }</technical_language>

Target:
public void onRequestPermissionsResult(final int requestCode, @NonNull String permissions[], @NonNull final int[] grantResults) { answered = true; waiting = false; if (requestCode == REQUEST_LOCATION) { new Handler().postDelayed(new Runnable() { @Override public void run() { boolean granted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED; OneSignal.PromptActionResult result = granted ? OneSignal.PromptActionResult.PERMISSION_GRANTED : OneSignal.PromptActionResult.PERMISSION_DENIED; LocationGMS.sendAndClearPromptHandlers(true, result); if (granted) { LocationGMS.startGetLocation(); } else { attemptToShowLocationPermissionSettings(); LocationGMS.fireFailedComplete(); } } }, DELAY_TIME_CALLBACK_CALL); } ActivityLifecycleHandler.removeActivityAvailableListener(TAG); finish(); overridePendingTransition(R.anim.onesignal_fade_in, R.anim.onesignal_fade_out); }
Source:
<code>List<DRGElement> getDrgElementsWithNamespace(final Definitions definitions, final Import anImport) { return definitions .getDrgElement() .stream() <START> .peek(drgElementWithNamespace(anImport)) <END> .collect(Collectors.toList()); }</code><technical_language>Similar question peek map</technical_language>

Target:
List<DRGElement> getDrgElementsWithNamespace(final Definitions definitions, final Import anImport) { return definitions .getDrgElement() .stream() .map(drgElement -> drgElementWithNamespace(drgElement, anImport)) .collect(Collectors.toList()); }
Source:
<code>public List<String> getSecurityOpts() { <START> return this.securityOpts; <END> }</code><technical_language>need this keyword - rest of this code this necessary</technical_language>

Target:
public List<String> getSecurityOpts() { return securityOpts; }
Source:
<code>protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<Void> voidHandback) throws OperationFailedException { boolean reloadRequired = super.applyUpdateToRuntime(context, operation, attributeName, resolvedValue, currentValue, voidHandback); if (reloadRequired) { final ModelNode model = context.readResource(PathAddress.EMPTY_ADDRESS).getModel(); <START> final ModelNode relativeTo = DeploymentScannerDefinition.RELATIVE_TO.resolveModelAttribute(context, model); <END> context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { File fullPath; if (relativeTo.isDefined()) { final String fullPathName = pathManager.resolveRelativePathEntry(resolvedValue.asString(), relativeTo.asString()); fullPath = new File(fullPathName); } else { fullPath = new File(resolvedValue.asString()); } if (!fullPath.exists()) { ROOT_LOGGER.directoryIsNonexistent(fullPath.getAbsolutePath()); } else if (!fullPath.isDirectory()) { ROOT_LOGGER.isNotADirectory(fullPath.getAbsolutePath()); } else if (!fullPath.canWrite()) { ROOT_LOGGER.directoryIsNotWritable(fullPath.getAbsolutePath()); } } }, Stage.RUNTIME); } return reloadRequired; }</code><technical_language>need moved new step</technical_language>

Target:
protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<Void> voidHandback) throws OperationFailedException { boolean reloadRequired = super.applyUpdateToRuntime(context, operation, attributeName, resolvedValue, currentValue, voidHandback); if (reloadRequired) { context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode model = context.readResource(PathAddress.EMPTY_ADDRESS).getModel(); final ModelNode relativeTo = DeploymentScannerDefinition.RELATIVE_TO.resolveModelAttribute(context, model); Path fullPath; if (relativeTo.isDefined()) { final String fullPathName = pathManager.resolveRelativePathEntry(resolvedValue.asString(), relativeTo.asString()); fullPath = Paths.get(fullPathName); } else { fullPath = Paths.get(resolvedValue.asString()); } if (!Files.exists(fullPath)) { ROOT_LOGGER.directoryIsNonexistent(fullPath.toString()); } else if (!Files.isDirectory(fullPath)) { ROOT_LOGGER.isNotADirectory(fullPath.toString()); } else if (!Files.isReadable(fullPath)) { ROOT_LOGGER.directoryIsNotWritable(fullPath.toString()); } } }, Stage.RUNTIME); } return reloadRequired; }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } <START> return this.repository.equals(((RepositoryKey) obj).getRepository()); <END> }</code><technical_language>(Rather a bunch of IF statements, do this return statement w/ && for above.)</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } return this.repository.equals(((RepositoryKey) obj).getRepository()); }
Source:
<code>private boolean isPrimitiveType(TextElement textElement) { if (textElement instanceof TokenTextElement) { TokenTextElement tokenTextElement = (TokenTextElement)textElement; if (tokenTextElement.getTokenKind() == ASTParserConstants.BYTE) { return true; } if (tokenTextElement.getTokenKind() == ASTParserConstants.CHAR) { return true; } <START> if (tokenTextElement.getTokenKind() == ASTParserConstants.SHORT) { <END> return true; } if (tokenTextElement.getTokenKind() == ASTParserConstants.INT) { return true; } if (tokenTextElement.getTokenKind() == ASTParserConstants.LONG) { return true; } if (tokenTextElement.getTokenKind() == ASTParserConstants.FLOAT) { return true; } if (tokenTextElement.getTokenKind() == ASTParserConstants.DOUBLE) { return true; } return false; } else { return false; } }</code><technical_language>Dear sir, heard of boolean operator? :D</technical_language>

Target:
private boolean isPrimitiveType(TextElement textElement) { if (textElement instanceof TokenTextElement) { TokenTextElement tokenTextElement = (TokenTextElement)textElement; int tokenKind = tokenTextElement.getTokenKind(); return tokenKind == ASTParserConstants.BYTE || tokenKind == ASTParserConstants.CHAR || tokenKind == ASTParserConstants.SHORT || tokenKind == ASTParserConstants.INT || tokenKind == ASTParserConstants.LONG || tokenKind == ASTParserConstants.FLOAT || tokenKind == ASTParserConstants.DOUBLE; } else { return false; } }
Source:
<code>public void onDropItemRequest(DropItemRequest event, EntityRef character) { if (!event.getItem().exists() || !networkSystem.getOwnerEntity(event.getItem()).equals(networkSystem.getOwnerEntity(character))) { return; } EntityRef pickupItem = event.getItem(); EntityRef owner = pickupItem.getOwner(); if (owner.hasComponent(InventoryComponent.class)) { final EntityRef removedItem = inventoryManager.removeItem(owner, EntityRef.NULL, pickupItem, false, 1); if (removedItem != null) { pickupItem = removedItem; } } <START> pickupItem.getComponent(ItemComponent.class).pickUpTime = 2000; <END> pickupItem.send(new DropItemEvent(event.getNewPosition())); pickupItem.send(new ImpulseEvent(event.getImpulse())); }</code><technical_language>likely, is guarantee ItemComponent present</technical_language>

Target:
public void onDropItemRequest(DropItemRequest event, EntityRef character) { if (!event.getItem().exists() || !networkSystem.getOwnerEntity(event.getItem()).equals(networkSystem.getOwnerEntity(character))) { return; } EntityRef pickupItem = event.getItem(); EntityRef owner = pickupItem.getOwner(); if (owner.hasComponent(InventoryComponent.class)) { final EntityRef removedItem = inventoryManager.removeItem(owner, EntityRef.NULL, pickupItem, false, 1); if (removedItem != null) { pickupItem = removedItem; } } ItemComponent itemComponent = pickupItem.getComponent(ItemComponent.class); itemComponent.timeToPickUp = 2000; itemComponent.pickUpTime = time.getGameTimeInMs(); pickupItem.saveComponent(itemComponent); pickupItem.send(new DropItemEvent(event.getNewPosition())); pickupItem.send(new ImpulseEvent(event.getImpulse())); }
Source:
<code>public void resumeTransaction() { <START> SuspendedTransactionImpl suspendedTransaction = transaction.cast(SuspendedTransactionImpl.class); <END> suspendedTransaction.resume(); transaction.set(suspendedTransaction.getTransaction()); }</code><technical_language>Is supported resume transaction in another thread? If so, happen ThreadLocal in TransactionImpl</technical_language>

Target:
public void resumeTransaction() { SuspendedTransactionImpl suspendedTransaction = transaction.getTransactionOfRequiredType(SuspendedTransactionImpl.class); suspendedTransaction.resume(); transaction.set(suspendedTransaction.getTransaction()); }
Source:
<code>public void movePanelRight(int panelIndex) { <START> if (this.getNumberOfPanels() >= 2) { <END> int other = -1; if (panelIndex == (this.getNumberOfPanels() - 1)) { other = 0; } else { other = panelIndex + 1; } if (panelIndex >= 0) { swapPanels(panelIndex, other); this.setCurrentlySelectedPanel(Optional.of(other)); } } }</code><technical_language>This a guard clause. include check for panelIndex? java if (getNumberOfPanels() < 2 || panelIndex == 0) return;</technical_language>

Target:
public void movePanelRight(int panelIndex) { if (getPanelCount() < 2 || panelIndex == (getPanelCount() - 1)) return; int other = (panelIndex + 1) % getPanelCount(); swapPanels(panelIndex, other); selectPanel(other); }
Source:
<code>public String hasError(final String stringToValidate) { final StringBuffer errorMsg = new StringBuffer(); if (UtilMethods.isSet(stringToValidate)) { final StringTokenizer tokenizer = new StringTokenizer(stringToValidate, ","); while (tokenizer.hasMoreTokens()) { final String token = tokenizer.nextToken().trim(); if (Validator.isEmailAddress(token)) { try { APILocator.getUserAPI() .loadByUserByEmail(token, APILocator.getUserAPI().getSystemUser(), false); <START> } catch (Exception e) { <END> Logger.error(this.getClass(), "Unable to find user with email: " + token); errorMsg.append("Unable to find user with email: " + token + "</br>"); } } else { String error = null; if (isUserId(token)) { continue; } else { error = "Unable to find user with ID: " + token + "</br>"; if (isRoleKey(token)) { continue; } else { error = (UtilMethods.isSet(error)) ? error : "Unable to find users assigned to role key: " + token; } errorMsg.append(error); } } } } return (UtilMethods.isSet(errorMsg.toString())) ? errorMsg.toString() : null; }</code><technical_language>![MAJOR](<LINK_0> 'Severity: MAJOR') log rethrow this exception. [![rule](<LINK_3>](<LINK_2> ![MINOR](<LINK_1> 'Severity: MINOR') Catch a list of specific exception subtypes instead. [![rule](<LINK_3>](<LINK_4></technical_language>

Target:
public String hasError(final String stringToValidate) { final StringBuilder errorMsg = new StringBuilder(); if (UtilMethods.isSet(stringToValidate)) { final StringTokenizer tokenizer = new StringTokenizer(stringToValidate, ","); while (tokenizer.hasMoreTokens()) { final String token = tokenizer.nextToken().trim(); if (Validator.isEmailAddress(token)) { try { APILocator.getUserAPI() .loadByUserByEmail(token, APILocator.getUserAPI().getSystemUser(), false); } catch (Exception e) { Logger.error(this.getClass(), "Unable to find user with email: " + token); errorMsg.append("Unable to find user with email: " + token + "</br>"); } } else { String error = null; if (isUserId(token)) { continue; } else { error = "Unable to find user with ID: " + token + "</br>"; if (isRoleKey(token)) { continue; } else { error = (UtilMethods.isSet(error)) ? error : "Unable to find users assigned to role key: " + token; } errorMsg.append(error); } } } } return (UtilMethods.isSet(errorMsg.toString())) ? errorMsg.toString() : null; }
Source:
<code>public void onRoleChanged(long personID, int localTableBlogId, String newRole) { if(!NetworkUtils.isNetworkAvailable(this)) { <START> ToastUtils.showToast(this, R.string.error_update_role, ToastUtils.Duration.LONG); <END> return; } final Person person = PeopleTable.getPerson(personID, localTableBlogId); if (person == null || newRole == null || newRole.equalsIgnoreCase(person.getRole())) { return; } FragmentManager fragmentManager = getFragmentManager(); final PersonDetailFragment personDetailFragment = (PersonDetailFragment) fragmentManager .findFragmentByTag(KEY_PERSON_DETAIL_FRAGMENT); if (personDetailFragment != null) { personDetailFragment.changeRole(newRole); } PeopleUtils.updateRole(person.getBlogId(), person.getPersonID(), newRole, localTableBlogId, new PeopleUtils.UpdateUserCallback() { @Override public void onSuccess(Person person) { PeopleTable.save(person); refreshOnScreenFragmentDetails(); } @Override public void onError() { if (personDetailFragment != null) { personDetailFragment.refreshPersonDetails(); } ToastUtils.showToast(PeopleManagementActivity.this, R.string.error_update_role, ToastUtils.Duration.LONG); } }); }</code><technical_language>error is due network, nicer user problem is. R.string.no_network_message instead</technical_language>

Target:
public void onRoleChanged(long personID, int localTableBlogId, String newRole) { if(!NetworkUtils.checkConnection(this)) { return; } final Person person = PeopleTable.getPerson(personID, localTableBlogId); if (person == null || newRole == null || newRole.equalsIgnoreCase(person.getRole())) { return; } FragmentManager fragmentManager = getFragmentManager(); final PersonDetailFragment personDetailFragment = (PersonDetailFragment) fragmentManager .findFragmentByTag(KEY_PERSON_DETAIL_FRAGMENT); if (personDetailFragment != null) { personDetailFragment.changeRole(newRole); } PeopleUtils.updateRole(person.getBlogId(), person.getPersonID(), newRole, localTableBlogId, new PeopleUtils.UpdateUserCallback() { @Override public void onSuccess(Person person) { AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.PERSON_UPDATED); PeopleTable.save(person); refreshOnScreenFragmentDetails(); } @Override public void onError() { if (personDetailFragment != null) { personDetailFragment.refreshPersonDetails(); } ToastUtils.showToast(PeopleManagementActivity.this, R.string.error_update_role, ToastUtils.Duration.LONG); } }); }
Source:
<code>public void testGetAllUsersId() { Session session = sessionFactory.getCurrentSession(); User expectedOne = new User("TestUser1", "Test"); User expectedTwo = new User("TestUser2", "Test"); User expectedThree = new User("TestUser3", "Test"); session.save(expectedOne); session.save(expectedTwo); session.save(expectedThree); List<String> allUsersId = userDAO.getAllUsersId(); <START> for (String s : allUsersId) { <END> System.err.println(s); } int actual = allUsersId.size(); assertEquals(3, actual); }</code><technical_language>forgot delete these, huh</technical_language>

Target:
public void testGetAllUsersId() { Session session = sessionFactory.getCurrentSession(); User expectedOne = new User("TestUser1", "Test"); User expectedTwo = new User("TestUser2", "Test"); User expectedThree = new User("TestUser3", "Test"); session.save(expectedOne); session.save(expectedTwo); session.save(expectedThree); List<String> allUsersId = userDAO.getAllUsersId(); int actual = allUsersId.size(); assertEquals(3, actual); }
Source:
<code>private void checkDiff() { try { console.writeFormat("%-40s | %-40s | %-40s | %s\n", "Option name", "Default value", "User value", "Version"); console.writeLine(String.format("%s", StringUtils.repeat("-", 136))); getConfigDao().getConfigDiff() .stream() .filter(configKey -> configKey.getKey() != null) <START> .forEach(configDiff -> console.writeFormat("%-40s | %-40s | %-40s | %s\n", <END> configDiff.getKey(), StringUtils.abbreviate(configDiff.getValue(), 40), StringUtils.abbreviate(configDiff.getDefaultValue(), 40), configDiff.getVersion())); } catch (Exception e) { log.error("Error details: ", e); } }</code><technical_language>displaying complete value. current engine-config options 221 options 37 chars 12 more. for 12 options administrator able find difference if difference, lengths of default values ClusterEmulatedMachines 51-71 CustomDeviceProperties 158 HotPlugCpuSupported 42 HotUnplugCpuSupported 43 IPTablesConfig 820 MigrationPolicies 2014-2737 OvirtIsoPrefix 54 oVirtISOsRepositoryPath 52 PollUri 38 RemoteViewerSupportedVersions 62 SpiceSecureChannels 69 VmGracefulShutdownMessage 102 do expect this output easily parseable human readable? If human readable, suggest output: Name: Option1 Current: 'Custom value' Default: 'Default value' \n</technical_language>

Target:
private void checkDiff() { try { getConfigDao().getConfigDiff() .stream() .filter(configKey -> configKey.getKey() != null) .forEach(configDiff -> console.writeFormat("Name: %s\n" + "Version: %s\n" + "Current: %s\n" + "Default: %s\n\n", configDiff.getKey(), configDiff.getVersion(), configDiff.getValue(), configDiff.getDefaultValue())); } catch (Exception e) { log.error("Error details: ", e); } }