auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public String findStatementsWithConcepts(List<String> conceptUris) throws AsyncExecutionException { Map<String, String> parameters = null; <START> parameters = new HashMap<String, String>(); <END> if(conceptUris.size() == 0) return null; StringBuffer termsBelongingToSameRelation = new StringBuffer(""); StringBuffer termInterpretations = new StringBuffer(""); int numberOfSearchedConcepts = conceptUris.size(); for(int i = 0; i < numberOfSearchedConcepts; i++){ termsBelongingToSameRelation.append("(r:Relation)-[*]->(t"+i+":Term)"); termInterpretations.append("t"+i+".interpretation = '"+conceptUris.get(i)+"'"); if(i != (numberOfSearchedConcepts-1)){ termsBelongingToSameRelation.append(","); termInterpretations.append(" and "); } } parameters.put("terms_belonging_to_same_relation", termsBelongingToSameRelation.toString()); parameters.put("term_interpretations", termInterpretations.toString()); return executeNeo4jQuery("concepts.belonging.to.same.statement", parameters, RELATION_EVENT); }</code><technical_language>lines 285-286 combined</technical_language>

Target:
public String findStatementsWithConcepts(List<String> conceptUris) throws AsyncExecutionException { if(conceptUris.size() == 0){ return null; } Map<String, String> parameters = new HashMap<String, String>(); StringBuffer termsBelongingToSameRelation = new StringBuffer(); StringBuffer termInterpretations = new StringBuffer(); int numberOfSearchedConcepts = conceptUris.size(); for(int i = 0; i < numberOfSearchedConcepts; i++){ termsBelongingToSameRelation.append("(r:Relation)-[*]->(t"+i+":Term)"); termInterpretations.append("t"+i+".interpretation = '"+conceptUris.get(i)+"'"); if(i != (numberOfSearchedConcepts-1)){ termsBelongingToSameRelation.append(","); termInterpretations.append(" and "); } } parameters.put("terms_belonging_to_same_relation", termsBelongingToSameRelation.toString()); parameters.put("term_interpretations", termInterpretations.toString()); return executeNeo4jQuery("concepts.belonging.to.same.statement", parameters, RELATION_EVENT); }
Source:
<code>public void equalsSignInRedirectUrl() { <START> <END> testAppUrl = authServerContextRootPage.toString().replace("localhost", NIP_IO_URL) + JAVASCRIPT_URL + "/index.html?test=bla=bla&super=man"; jsDriver.navigate().to(testAppUrl); JSObjectBuilder arguments = defaultArguments(); testExecutor.init(arguments, this::assertInitNotAuth) .login(this::assertOnLoginPage) .loginForm(testUser, this::assertOnTestAppUrl) .init(arguments, (driver1, output1, events2) -> { assertTrue(testAppUrl.contains("bla=bla")); assertSuccessfullyLoggedIn(driver1, output1, events2); }); }</code><technical_language>change testAppUrl. this url is changed, other tests well. please change testAppUrl variable final AuthServerTestEnricher.getAuthServerContextRoot method</technical_language>

Target:
public void equalsSignInRedirectUrl() { testAppUrl = authServerContextRootPage.toString().replace("localhost", NIP_IO_URL) + JAVASCRIPT_URL + "/index.html?test=bla=bla&super=man"; jsDriver.navigate().to(testAppUrl); JSObjectBuilder arguments = defaultArguments(); testExecutor.init(arguments, this::assertInitNotAuth) .login(this::assertOnLoginPage) .loginForm(testUser, this::assertOnTestAppUrl) .init(arguments, (driver1, output1, events2) -> { assertTrue(driver1.getCurrentUrl().contains("bla=bla")); assertSuccessfullyLoggedIn(driver1, output1, events2); }); }
Source:
<code>public void oncePerClassSetUp() throws Exception { synchronized ( AbstractNexusIntegrationTest.class ) { if ( NEEDS_INIT ) { TestContainer.getInstance().startPlexusContainer(); String logMessage = "Running Test: " + getTestId() + " - Class: " + this.getClass().getSimpleName(); staticLog.info( String.format( "%1$-" + logMessage.length() + "s", " " ).replaceAll( " ", "*" ) ); staticLog.info( logMessage ); staticLog.info( String.format( "%1$-" + logMessage.length() + "s", " " ).replaceAll( " ", "*" ) ); beforeStartClean(); copyTestResources(); this.copyConfigFiles(); startNexus(); final boolean testRequiresSecurityEnabled = TestContainer.getInstance().getTestContext().isSecureTest() || Boolean.valueOf( System.getProperty( "secure.test" ) ); <START> TestContainer.getInstance().invokeAsAdministrator( new Callable<Object>() <END> { @Override public Object call() throws Exception { final GlobalConfigurationResource globalConfig = SettingsMessageUtil.getCurrentSettings(); globalConfig.setSecurityEnabled( testRequiresSecurityEnabled ); SettingsMessageUtil.save( globalConfig ); return null; } } ); deployArtifacts(); runOnce(); NEEDS_INIT = false; } getEventInspectorsUtil().waitForCalmPeriod(); } }</code><technical_language>This is a verbose. is test deal user for requests</technical_language>

Target:
public void oncePerClassSetUp() throws Exception { synchronized ( AbstractNexusIntegrationTest.class ) { if ( NEEDS_INIT ) { String logMessage = "Running Test: " + getTestId() + " - Class: " + this.getClass().getSimpleName(); staticLog.info( String.format( "%1$-" + logMessage.length() + "s", " " ).replaceAll( " ", "*" ) ); staticLog.info( logMessage ); staticLog.info( String.format( "%1$-" + logMessage.length() + "s", " " ).replaceAll( " ", "*" ) ); beforeStartClean(); copyTestResources(); this.copyConfigFiles(); startNexus(); final boolean testRequiresSecurityEnabled = TestContainer.getInstance().getTestContext().isSecureTest() || Boolean.valueOf( System.getProperty( "secure.test" ) ); TestContainer.getInstance().invokeAsAdministrator( new Callable<Object>() { @Override public Object call() throws Exception { final GlobalConfigurationResource globalConfig = SettingsMessageUtil.getCurrentSettings(); globalConfig.setSecurityEnabled( testRequiresSecurityEnabled ); SettingsMessageUtil.save( globalConfig ); return null; } } ); deployArtifacts(); runOnce(); NEEDS_INIT = false; } getEventInspectorsUtil().waitForCalmPeriod(); } }
Source:
<code>public ChangeDetailX getChangeDetail(int reviewId, IProgressMonitor monitor) throws GerritException { ChangeDetailX changeDetail = super.getChangeDetail(reviewId, monitor); <START> setParentCommit28OrLater(reviewId, changeDetail, monitor); <END> return changeDetail; }</code><technical_language>this work for versions 2.8 this method is overridden super called</technical_language>

Target:
public ChangeDetailX getChangeDetail(int reviewId, IProgressMonitor monitor) throws GerritException { ChangeDetailX changeDetail = super.getChangeDetail(reviewId, monitor); ChangeInfo28 changeInfo = getAdditionalChangeInfo(reviewId, monitor); if (changeInfo != null) { setRevisionParentCommit(changeInfo, changeDetail); } return changeDetail; }
Source:
<code>public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { if (divBy != 0 && children.get(0).evaluate(tuple, ptr)) { Timestamp ts = (Timestamp)PDataType.TIMESTAMP.toObject(ptr, children.get(0).getColumnModifier()); Timestamp roundedTs; if(divBy == 1 && ts.getNanos() > 0) { roundedTs = new Timestamp(roundTime(ts.getTime() + 1)); } else { <START> roundedTs = new Timestamp(roundTime(ts.getTime())); <END> } byte[] byteValue = getDataType().toBytes(roundedTs); ptr.set(byteValue); return true; } return false; }</code><technical_language>Instead of creating a couple of extra Timestamp objects, move this line in if statement return true, this: if(divBy > 1) { return true; // in this case, correct in ptr } Also, another good optimization check bytes zero creating a Timestamp object. do this this: int nanos = PDataType.INTEGER.getCodec().decodeInt(ptr.getBuffer(), ptr.getOffset()+PDataType.LONG.getMaxLength());</technical_language>

Target:
public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { if (children.get(0).evaluate(tuple, ptr)) { ColumnModifier columnModifier = children.get(0).getColumnModifier(); PDataType dataType = getDataType(); int nanos = dataType.getNanos(ptr, columnModifier); if (nanos > 0) { long millis = dataType.getMillis(ptr, columnModifier); Timestamp roundedTs = new Timestamp(millis + 1); byte[] byteValue = dataType.toBytes(roundedTs); ptr.set(byteValue); } return true; } return false; }
Source:
<code>public void onDismissByOutsideTouch(@NotNull String instanceTag) { switch (instanceTag) { case TAG_ADD_SITE_ICON_DIALOG: showQuickStartNoticeIfNecessary(); break; default: AppLog.e(T.EDITOR, "Dialog instanceTag is not recognized"); <START> throw new UnsupportedOperationException("Dialog instanceTag is not recognized"); <END> } }</code><technical_language>need add other cases of BasicFragmentDialog instances (e.g. TAG_CHANGE_SITE_ICON_DIALOG, TAG_QUICK_START_DIALOG, TAG_REMOVE_NEXT_STEPS_DIALOG, etc.) onDismissByOutsideTouch method. Otherwise, app crash. stack trace for details. 2019-01-31 18:05:06.619 3468-3468/org.wordpress.android.beta E/AndroidRuntime: FATAL EXCEPTION: main Process: org.wordpress.android.beta, PID: 3468 java.lang.UnsupportedOperationException: Dialog instanceTag is recognized org.wordpress.android.ui.main.MySiteFragment.onDismissByOutsideTouch(MySiteFragment.java:1131) org.wordpress.android.ui.main.WPMainActivity.onDismissByOutsideTouch(WPMainActivity.java:1114) org.wordpress.android.ui.posts.BasicFragmentDialog.onDismiss(BasicFragmentDialog.kt:128) android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1343) android.os.Handler.dispatchMessage(Handler.java:102) android.os.Looper.loop(Looper.java:154) android.app.ActivityThread.main(ActivityThread.java:6119) java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Also, if add instanceTag variable error message, easier debug in future. suggestion AppLog.e(T.MAIN, "Dialog instanceTag '" + instanceTag + "' is recognized"); throw new UnsupportedOperationException("Dialog instanceTag '" + instanceTag + "' is recognized");</technical_language>

Target:
public void onDismissByOutsideTouch(@NotNull String instanceTag) { switch (instanceTag) { case TAG_ADD_SITE_ICON_DIALOG: showQuickStartNoticeIfNecessary(); break; case TAG_CHANGE_SITE_ICON_DIALOG: case TAG_EDIT_SITE_ICON_PERMISSIONS_DIALOG: case TAG_QUICK_START_DIALOG: case TAG_QUICK_START_MIGRATION_DIALOG: case TAG_REMOVE_NEXT_STEPS_DIALOG: break; default: AppLog.e(T.EDITOR, "Dialog instanceTag '" + instanceTag + "' is not recognized"); throw new UnsupportedOperationException("Dialog instanceTag is not recognized"); } }
Source:
<code>private String cnameResolveFromCacheLoop(DnsCnameCache cnameCache, String first, String mapping) { String otherMapping = first; boolean advance = false; String name = mapping; while ((mapping = cnameCache.get(hostnameWithDot(name))) != null) { if (otherMapping.equals(mapping)) { break; <START> } <END> name = mapping; if (advance) { otherMapping = mapping; advance = false; } else { advance = true; } } return name; }</code><technical_language>Unrelated this PR more sense break throw</technical_language>

Target:
static String cnameResolveFromCacheLoop(DnsCnameCache cnameCache, String first, String mapping) { boolean advance = false; String name = mapping; while ((mapping = cnameCache.get(hostnameWithDot(name))) != null) { if (first.equals(mapping)) { break; } name = mapping; if (advance) { first = cnameCache.get(first); } advance = !advance; } return name; }
Source:
<code>private <START> boolean autoConnectA2dp(BluetoothDevice <END> device) { final A2dpService a2dpService = mFactory.getA2dpService(); if (a2dpService == null) { warnLog("autoConnectA2dp: service is null, failed to connect to " + device); return false; } int a2dpConnectionPolicy = a2dpService.getConnectionPolicy(device); if (a2dpConnectionPolicy == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { debugLog("autoConnectA2dp: connecting A2DP with " + device); return a2dpService.connect(device); } else { debugLog("autoConnectA2dp: skipped auto-connect A2DP with device " + device + " connectionPolicy " + a2dpConnectionPolicy); return false; } }</code><technical_language>return unused</technical_language>

Target:
private void autoConnectA2dp(BluetoothDevice device) { final A2dpService a2dpService = mFactory.getA2dpService(); if (a2dpService == null) { warnLog("autoConnectA2dp: service is null, failed to connect to " + device); return; } int a2dpConnectionPolicy = a2dpService.getConnectionPolicy(device); if (a2dpConnectionPolicy == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { debugLog("autoConnectA2dp: connecting A2DP with " + device); a2dpService.connect(device); } else { debugLog("autoConnectA2dp: skipped auto-connect A2DP with device " + device + " connectionPolicy " + a2dpConnectionPolicy); } }
Source:
<code>private static TmfTreeViewerEntry createTraceEntry(ITmfTrace trace) { TmfTreeViewerEntry traceEntry = new TmfTreeViewerEntry(trace.getName()); Iterable<ITmfAnalysisModuleWithStateSystems> modules = TmfTraceUtils.getAnalysisModulesOfClass(trace, ITmfAnalysisModuleWithStateSystems.class); for (ITmfAnalysisModuleWithStateSystems module : modules) { module.schedule(); if (!module.waitForInitialization()) { <START> return traceEntry; <END> } for (ITmfStateSystem ss : module.getStateSystems()) { traceEntry.addChild(new StateSystemEntry(ss)); } } return traceEntry; }</code><technical_language>return, do a continue other modules add state systems children</technical_language>

Target:
private static TmfTreeViewerEntry createTraceEntry(ITmfTrace trace) { TmfTreeViewerEntry traceEntry = new TmfTreeViewerEntry(trace.getName()); Iterable<ITmfAnalysisModuleWithStateSystems> modules = TmfTraceUtils.getAnalysisModulesOfClass(trace, ITmfAnalysisModuleWithStateSystems.class); for (ITmfAnalysisModuleWithStateSystems module : modules) { module.schedule(); if (!module.waitForInitialization()) { continue; } for (ITmfStateSystem ss : module.getStateSystems()) { traceEntry.addChild(new StateSystemEntry(ss)); } } return traceEntry; }
Source:
<code>protected V putInternal(long ttl, TimeUnit ttlUnit, Long maxIdle, TimeUnit maxIdleUnit, Object key, Object value) { Data keyData = toData(key); Data valueData = toData(value); long ttlMillis = getTimeInMillis(ttl, ttlUnit); ClientMessage request; if (maxIdle != null) { request = MapPutCodec.encodeRequest(name, keyData, valueData, <START> getThreadId(), ttlMillis, getTimeInMillis(maxIdle, maxIdleUnit)); <END> } else { request = MapPutCodec.encodeRequest(name, keyData, valueData, getThreadId(), ttlMillis); } ClientMessage response = invoke(request, keyData); MapPutCodec.ResponseParameters resultParameters = MapPutCodec.decodeResponse(response); return toObject(resultParameters.response); }</code><technical_language>client member proxy implementations diverge if maxIdleUnit is null. Client interprets maxIdle milliseconds in this case, while MapProxySupport throws NPE. ttlUnit btw. This needs null timeUnits passed interface methods though. Is this expected</technical_language>

Target:
protected V putInternal(long ttl, TimeUnit ttlUnit, Long maxIdle, TimeUnit maxIdleUnit, Object key, Object value) { Data keyData = toData(key); Data valueData = toData(value); long ttlMillis = timeInMsOrOneIfResultIsZero(ttl, ttlUnit); ClientMessage request; if (maxIdle != null) { request = MapPutCodec.encodeRequest(name, keyData, valueData, getThreadId(), ttlMillis, timeInMsOrOneIfResultIsZero(maxIdle, maxIdleUnit)); } else { request = MapPutCodec.encodeRequest(name, keyData, valueData, getThreadId(), ttlMillis); } ClientMessage response = invoke(request, keyData); MapPutCodec.ResponseParameters resultParameters = MapPutCodec.decodeResponse(response); return toObject(resultParameters.response); }
Source:
<code>private static GoogleApiClient createClient(Context context, boolean withSignIn) { GoogleApiClient.Builder builder = new GoogleApiClient.Builder(context) .addApi(AppIndex.API); if (withSignIn) { builder.addApi(Plus.API).addScope(Plus.SCOPE_PLUS_PROFILE) <START> .addApi(Drive.API).addScope(Drive.SCOPE_APPFOLDER); <END> } return builder.build(); }</code><technical_language>this save game state. I remove well. If want store Firebase</technical_language>

Target:
private static GoogleApiClient createClient(Context context, boolean withSignIn) { GoogleApiClient.Builder builder = new GoogleApiClient.Builder(context) .addApi(AppIndex.API); if (withSignIn) { builder.addApi(Plus.API).addScope(Plus.SCOPE_PLUS_PROFILE); } return builder.build(); }
Source:
<code>public FluentWait<WebDriver> get( int timeoutInSec, Class<? extends Throwable> ignoredExceptionType) { return new FluentWait<WebDriver>(seleniumWebDriver) .withTimeout(timeoutInSec, TimeUnit.SECONDS) <START> .pollingEvery(200, TimeUnit.MILLISECONDS) <END> .ignoring(ignoredExceptionType); }</code><technical_language>pollingEvery(200, TimeUnit.MILLISECONDS) redundant default delay attempts is preset 500 millisecs FluentWait itself</technical_language>

Target:
public FluentWait<WebDriver> get( int timeoutInSec, Class<? extends Throwable> ignoredExceptionType) { return new WebDriverWait(seleniumWebDriver, timeoutInSec).ignoring(ignoredExceptionType); }
Source:
<code>protected String initNodeName() { String nodeName = globalConfig.transport().nodeName(); if (nodeName == null || nodeName.isEmpty()) { <START> nodeName = java.util.UUID.randomUUID().toString(); <END> } return nodeName.replaceAll("[^\\w]+", "_"); }</code><technical_language>Replace Util.threadLocalRandomUUID()</technical_language>

Target:
protected String initNodeName() { String nodeName = globalConfig.transport().nodeName(); if (nodeName == null || nodeName.isEmpty()) { nodeName = java.util.UUID.randomUUID().toString(); } return NameUtils.filterIllegalChars(nodeName); }
Source:
<code>public static <E> ReadableSource<E> asSource(URI uri, Class<E> type) { <START> View<E> view = Datasets.<E, View<E>>view(uri); <END> return new DatasetSourceTarget<E>(view, type); }</code><technical_language>instantiating view here, I pass [DatasetSourceTarget constructor](<LINK_0> number of places views instantiated a minimum want push late possible. For example, support for handleExisting push job is committed</technical_language>

Target:
public static <E> ReadableSource<E> asSource(URI uri, Class<E> type) { return new DatasetSourceTarget<E>(uri, type); }
Source:
<code><START> public ObjectStat(String bucketName, String name, ResponseHeader header) { <END> this.bucketName = bucketName; this.name = name; this.contentType = header.contentType(); this.createdTime = (Date) header.lastModified().clone(); this.length = header.contentLength(); if (header.etag() != null) { this.etag = header.etag().replaceAll("\"", ""); } else { this.etag = ""; } this.key = header.xamzMetaKey(); this.iv = header.xamzMetaIv(); this.matDesc = header.xamzMetaMatdesc(); }</code><technical_language>This change breaks compatibility. create a new constructor</technical_language>

Target:
public ObjectStat(String bucketName, String name, ResponseHeader header) { this.bucketName = bucketName; this.name = name; this.contentType = header.contentType(); this.createdTime = (Date) header.lastModified().clone(); this.length = header.contentLength(); if (header.etag() != null) { this.etag = header.etag().replaceAll("\"", ""); } else { this.etag = ""; } this.contentKey = header.xamzMetaKey(); this.encryptionIV = header.xamzMetaIv(); this.matDesc = header.xamzMetaMatdesc(); }
Source:
<code><START> public static AutoCloseable startMetricsReporters(Map<String, Object> topoConf) { <END> final List<PreparableReporter> preparableReporters = MetricsUtils.getPreparableReporters(topoConf); for (PreparableReporter reporter : preparableReporters) { reporter.prepare(StormMetricsRegistry.REGISTRY, topoConf); reporter.start(); LOG.info("Started statistics report plugin..."); } return () -> preparableReporters.forEach(PreparableReporter::stop); }</code><technical_language>I another interface extends AutoCloseable deal non-existing Exception everywhere</technical_language>

Target:
public static Session startMetricsReporters(Map<String, Object> topoConf) { final List<PreparableReporter> preparableReporters = MetricsUtils.getPreparableReporters(topoConf); for (PreparableReporter reporter : preparableReporters) { reporter.prepare(StormMetricsRegistry.REGISTRY, topoConf); reporter.start(); LOG.info("Started statistics report plugin..."); } return () -> preparableReporters.forEach(PreparableReporter::stop); }
Source:
<code>private StringBuffer checkHeaders(ContentSecurityPolicyEnforcer cspListener) { <START> StringBuffer headerErrors = new StringBuffer(); <END> wicketTester.getRequestCycle().getListeners().add(cspListener); wicketTester.executeUrl("/"); String cspHeaderValue = wicketTester.getLastResponse().getHeader(HEADER_CSP); String cspReportingHeaderValue = wicketTester.getLastResponse().getHeader(HEADER_CSP_REPORT); if (cspHeaderValue == null) { headerErrors.append( String.format("Header %s expected but either not present or empty", HEADER_CSP)); } if (cspReportingHeaderValue == null) { headerErrors.append(String.format("Header %s expected but either not present or empty", HEADER_CSP_REPORT)); } if (headerErrors.length() > 0) { return headerErrors; } StringBuffer headerValueErrors = new StringBuffer(); List<String> blockingHeaderValueErrors = checkCSPHeaderValues(cspHeaderValue); List<String> reportingHeaderValueErrors = checkCSPHeaderValues(cspReportingHeaderValue); if (!blockingHeaderValueErrors.isEmpty()) { headerValueErrors.append("Blocking-mode CSP header value issues: "); headerValueErrors .append(blockingHeaderValueErrors.stream().collect(Collectors.joining("; "))); headerValueErrors.append(". "); } if (!reportingHeaderValueErrors.isEmpty()) { headerValueErrors.append("Reporting-mode CSP header value issues: "); headerValueErrors .append(reportingHeaderValueErrors.stream().collect(Collectors.joining("; "))); headerValueErrors.append(". "); } return headerValueErrors; }</code><technical_language>nit: StringBuilder ?! List<String></technical_language>

Target:
private List<String> checkHeaders(ContentSecurityPolicyEnforcer cspListener) { List<String> headerErrors = new ArrayList<>(); wicketTester.getRequestCycle().getListeners().add(cspListener); wicketTester.executeUrl("/"); String cspHeaderValue = wicketTester.getLastResponse().getHeader(CSPHeaderMode.BLOCKING.getHeader()); String cspReportingHeaderValue = wicketTester.getLastResponse().getHeader(CSPHeaderMode.REPORT_ONLY.getHeader()); if (cspHeaderValue == null) { headerErrors.add(String.format("Header %s expected but either not present or empty", CSPHeaderMode.BLOCKING.getHeader())); } if (cspReportingHeaderValue == null) { headerErrors.add(String.format("Header %s expected but either not present or empty", CSPHeaderMode.REPORT_ONLY.getHeader())); } if (!headerErrors.isEmpty()) { return headerErrors; } List<String> headerValueErrors = new ArrayList<>(); List<String> blockingHeaderValueErrors = checkCSPHeaderValues(cspHeaderValue); List<String> reportingHeaderValueErrors = checkCSPHeaderValues(cspReportingHeaderValue); if (!blockingHeaderValueErrors.isEmpty()) { headerValueErrors.add("Blocking-mode CSP header value issues: " + blockingHeaderValueErrors.stream().collect(Collectors.joining("; ")) + "."); } if (!reportingHeaderValueErrors.isEmpty()) { headerValueErrors.add("Reporting-mode CSP header value issues: " + reportingHeaderValueErrors.stream().collect(Collectors.joining("; ")) + "."); } return headerValueErrors; }
Source:
<code>public void testDownstreamTopicRenaming() { MirrorCheckpointTask mirrorCheckpointTask = new MirrorCheckpointTask("source1", "target2", <START> new DefaultReplicationPolicy(), null, new HashMap<>(), new HashMap<>()); <END> assertEquals(new TopicPartition("source1.topic3", 4), mirrorCheckpointTask.renameTopicPartition(new TopicPartition("topic3", 4))); assertEquals(new TopicPartition("topic3", 5), mirrorCheckpointTask.renameTopicPartition(new TopicPartition("target2.topic3", 5))); assertEquals(new TopicPartition("source1.source6.topic7", 8), mirrorCheckpointTask.renameTopicPartition(new TopicPartition("source6.topic7", 8))); }</code><technical_language>Collections.emptyMap() in a places</technical_language>

Target:
public void testDownstreamTopicRenaming() { MirrorCheckpointTask mirrorCheckpointTask = new MirrorCheckpointTask("source1", "target2", new DefaultReplicationPolicy(), null, Collections.emptyMap(), Collections.emptyMap()); assertEquals(new TopicPartition("source1.topic3", 4), mirrorCheckpointTask.renameTopicPartition(new TopicPartition("topic3", 4))); assertEquals(new TopicPartition("topic3", 5), mirrorCheckpointTask.renameTopicPartition(new TopicPartition("target2.topic3", 5))); assertEquals(new TopicPartition("source1.source6.topic7", 8), mirrorCheckpointTask.renameTopicPartition(new TopicPartition("source6.topic7", 8))); }
Source:
<code>public synchronized boolean sendWebRequest() { try { checkIfUrlIsValid(); } catch (RuntimeException e) { <START> return false; <END> } Request request = new Request.Builder() .url(url) .header("User-Agent", USER_AGENT) .build(); call = okHttpClient.newCall(request); call.enqueue(getCallback()); return true; }</code><technical_language>i this. call listener error code remove request usual instead of boolean successfullySentWebRequest = webConnection.sendWebRequest(); if clause in act()</technical_language>

Target:
public synchronized void sendWebRequest() { try { new URL(url); } catch (MalformedURLException e) { WebRequestListener listener = weakListenerReference.get(); if (listener != null) { listener.onRequestFinished(ERROR_BAD_REQUEST.toString()); } return; } Request request = new Request.Builder() .url(url) .header("User-Agent", USER_AGENT) .build(); call = okHttpClient.newCall(request); call.enqueue(createCallback()); }
Source:
<code>private SplitBrainJoinMessage sendSplitBrainJoinMessage(Address target, SplitBrainJoinMessage request) { if (logger.isFineEnabled()) { logger.fine("Sending SplitBrainJoinMessage to " + target); } <START> Connection conn = node.server.getConnectionManager(MEMBER).getOrConnect(target, true); <END> long timeout = SPLIT_BRAIN_CONN_TIMEOUT_MILLIS; while (conn == null) { timeout -= SPLIT_BRAIN_SLEEP_TIME_MILLIS; if (timeout < 0) { logger.fine("Returning null timeout<0, " + timeout); return null; } try { Thread.sleep(SPLIT_BRAIN_SLEEP_TIME_MILLIS); } catch (InterruptedException e) { currentThread().interrupt(); return null; } conn = node.server.getConnectionManager(MEMBER).get(target); } NodeEngine nodeEngine = node.nodeEngine; Future future = nodeEngine.getOperationService().createInvocationBuilder(ClusterServiceImpl.SERVICE_NAME, new SplitBrainMergeValidationOp(request), target) .setTryCount(1).invoke(); try { return (SplitBrainJoinMessage) future.get(SPLIT_BRAIN_JOIN_CHECK_TIMEOUT_SECONDS, TimeUnit.SECONDS); } catch (TimeoutException e) { logger.fine("Timeout during join check!", e); } catch (Exception e) { logger.warning("Error during join check!", e); } return null; }</code><technical_language>Accessing Node#server field potentially break future compatibility tests, accessor instead</technical_language>

Target:
private SplitBrainJoinMessage sendSplitBrainJoinMessage(Address target, SplitBrainJoinMessage request) { if (logger.isFineEnabled()) { logger.fine("Sending SplitBrainJoinMessage to " + target); } Connection conn = node.getServer().getConnectionManager(MEMBER).getOrConnect(target, true); long timeout = SPLIT_BRAIN_CONN_TIMEOUT_MILLIS; while (conn == null) { timeout -= SPLIT_BRAIN_SLEEP_TIME_MILLIS; if (timeout < 0) { logger.fine("Returning null timeout<0, " + timeout); return null; } try { Thread.sleep(SPLIT_BRAIN_SLEEP_TIME_MILLIS); } catch (InterruptedException e) { currentThread().interrupt(); return null; } conn = node.getServer().getConnectionManager(MEMBER).get(target); } NodeEngine nodeEngine = node.nodeEngine; Future future = nodeEngine.getOperationService().createInvocationBuilder(ClusterServiceImpl.SERVICE_NAME, new SplitBrainMergeValidationOp(request), target) .setTryCount(1).invoke(); try { return (SplitBrainJoinMessage) future.get(SPLIT_BRAIN_JOIN_CHECK_TIMEOUT_SECONDS, TimeUnit.SECONDS); } catch (TimeoutException e) { logger.fine("Timeout during join check!", e); } catch (Exception e) { logger.warning("Error during join check!", e); } return null; }
Source:
<code>public void deleteOrganization(String id) { ValidateArgument.required(id, "id"); int count = jdbcTemplate.update( "DELETE FROM " + TABLE_ORGANIZATION + " WHERE " + COL_ORGANIZATION_ID + " = ?", id); if (count < 1) { <START> throw new NotFoundException("Orgnaization with id: '" + id + "' not found"); <END> } }</code><technical_language>Typo</technical_language>

Target:
public void deleteOrganization(String id) { ValidateArgument.required(id, "id"); int count = jdbcTemplate.update( "DELETE FROM " + TABLE_ORGANIZATION + " WHERE " + COL_ORGANIZATION_ID + " = ?", id); if (count < 1) { throw new NotFoundException("Organization with id: '" + id + "' not found"); } }
Source:
<code>public <T> void read(Response response, Callback<T> callback, TypeReference<T> type) throws IOException { final int sc = response.getStatus(); switch(sc) { case 201: case 204: LOG.debug("Return code is %d, finishing.", response.getStatus()); return; case 200: try (final JsonParser jp = mapper.getFactory().createParser(response.readEntity(InputStream.class))) { <START> expect(jp, jp.nextToken(), JsonToken.START_OBJECT); <END> expect(jp, jp.nextToken(), JsonToken.FIELD_NAME); if (!"results".equals(jp.getCurrentName())) { throw new JsonParseException("expecting results field", jp.getCurrentLocation()); } expect(jp, jp.nextToken(), JsonToken.START_ARRAY); jp.clearCurrentToken(); Iterator<T> iter = jp.readValuesAs(type); while (iter.hasNext()) { try { callback.call(iter.next()); } catch (CallbackRefusedException e) { LOG.debug(e, "callback refused execution, finishing."); return; } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new IOException("Callback interrupted", e); } catch (Exception e) { Throwables.propagateIfPossible(e, IOException.class); throw new IOException("Callback failure", e); } } if (jp.nextValue() != JsonToken.VALUE_TRUE || !jp.getCurrentName().equals("success")) { throw new IOException("Streamed receive did not terminate normally; inspect server logs for cause."); } return; } default: if (sc >= 400 && sc < 500) { throw new ClientErrorException(response); } throw new ServerErrorException(response); } }</code><technical_language>pulling this bit try block a method good for clarify</technical_language>

Target:
public <T> void read(Response response, Callback<T> callback, TypeReference<T> type) throws IOException { final int sc = response.getStatus(); switch(sc) { case 201: case 204: LOG.debug("Return code is %d, finishing.", response.getStatus()); return; case 200: try (final JsonParser jp = mapper.getFactory().createParser(response.readEntity(InputStream.class))) { doRead(callback, type, jp); } return; default: if (sc >= 400 && sc < 500) { throw new ClientErrorException(response); } throw new ServerErrorException(response); } }
Source:
<code>public void analyzeClass(final byte[] buffer, final String location) throws IOException { try { analyzeClass(new ClassReader(buffer)); <START> } catch (final Exception cause) { <END> throw analyzerError(location, cause); } }</code><technical_language>Wondering why? this is related ASM 6? asking some improvements some nasty regressions/missed cases of exception handling here</technical_language>

Target:
public void analyzeClass(final byte[] buffer, final String location) throws IOException { try { analyzeClass(new ClassReader(buffer)); } catch (final RuntimeException cause) { throw analyzerError(location, cause); } }
Source:
<code>private void initTree(TmfTreeViewerEntry rootBranch, CounterAnalysis analysis) { Runnable initialize = new Runnable() { @Override public void run() { analysis.schedule(); analysis.waitForCompletion(); ITmfStateSystem stateSystem = analysis.getStateSystem(); if (stateSystem != null) { addTreeViewerBranch(stateSystem, rootBranch, CounterAnalysis.GROUPED_COUNTER_ASPECTS_ATTRIB); addTreeViewerBranch(stateSystem, rootBranch, CounterAnalysis.UNGROUPED_COUNTER_ASPECTS_ATTRIB); <START> Display.getDefault().syncExec(() -> <END> { fTriStateFilteredCheckboxTree.getViewer().expandAll(); for (Object element : fTriStateFilteredCheckboxTree.getCheckedElements()) { fTriStateFilteredCheckboxTree.setSubtreeChecked(element, true); } }); } } }; Thread thread = new Thread(initialize, "Initialize Counter Tree"); thread.start(); }</code><technical_language>clarify syncExec</technical_language>

Target:
private void initTree(TmfTreeViewerEntry rootBranch, CounterAnalysis analysis) { Runnable initialize = () -> { analysis.schedule(); analysis.waitForCompletion(); ITmfStateSystem stateSystem = analysis.getStateSystem(); if (stateSystem != null) { addTreeViewerBranch(stateSystem, rootBranch, CounterAnalysis.GROUPED_COUNTER_ASPECTS_ATTRIB); addTreeViewerBranch(stateSystem, rootBranch, CounterAnalysis.UNGROUPED_COUNTER_ASPECTS_ATTRIB); Display.getDefault().syncExec(() -> { fCheckboxTree.getViewer().expandAll(); for (Object element : fCheckboxTree.getCheckedElements()) { fCheckboxTree.setSubtreeChecked(element, true); } fListener.handleCheckStateChangedEvent(getCheckedCounterEntries()); }); } }; Thread thread = new Thread(initialize, "Initialize Counter Tree"); thread.start(); }
Source:
<code>public void setEnvironment(Environment environment) { <START> this.propertyValue = environment.getProperty(this.propertyName); <END> Assert.notNull(this.propertyValue, () -> "No property exists with name '" + this.propertyName + "'"); }</code><technical_language>Is safe try obtain a property this container callback, is call earlier in application lifecycle</technical_language>

Target:
public void setEnvironment(Environment environment) { this.environment = environment; }
Source:
<code>public <E> CacheQuery<E> buildCacheQuery(String queryString, IndexedQueryMode indexedQueryMode, KeyTransformationHandler keyTransformationHandler, TimeoutExceptionFactory timeoutExceptionFactory, ExecutorService asyncExecutor, Class<?>... classes) { if (!isIndexed) { throw log.cannotRunLuceneQueriesIfNotIndexed(cache.getName()); } if (log.isDebugEnabled()) { log.debugf("Building Lucene query for : %s", queryString); } IckleParsingResult<TypeMetadata> parsingResult = parse(queryString); if (parsingResult.hasGroupingOrAggregations()) { throw log.groupAggregationsNotSupported(); } <START> LuceneQueryParsingResult luceneParsingResult = transformParsingResult(parsingResult, EMPTY_MAP); <END> org.apache.lucene.search.Query luceneQuery = makeTypeQuery(luceneParsingResult.getQuery(), luceneParsingResult.getTargetEntityName()); if (indexedQueryMode == IndexedQueryMode.BROADCAST) { return new ClusteredCacheQueryImpl<>(new QueryDefinition(queryString), asyncExecutor, cache, keyTransformationHandler, null); } else { if (log.isDebugEnabled()) { log.debugf("The resulting Lucene query is : %s", luceneQuery.toString()); } CacheQuery cacheQuery = new CacheQueryImpl<>(luceneQuery, searchFactory, cache, keyTransformationHandler, timeoutExceptionFactory, classes); if (luceneParsingResult.getSort() != null) { cacheQuery = cacheQuery.sort(luceneParsingResult.getSort()); } if (luceneParsingResult.getProjections() != null) { cacheQuery = cacheQuery.projection(luceneParsingResult.getProjections()); } return (CacheQuery<E>) cacheQuery; } }</code><technical_language>Replacing EMPTY_MAP emptyMap() spares of a generics warning</technical_language>

Target:
public <E> CacheQuery<E> buildCacheQuery(String queryString, IndexedQueryMode indexedQueryMode, KeyTransformationHandler keyTransformationHandler, TimeoutExceptionFactory timeoutExceptionFactory, ExecutorService asyncExecutor, Class<?>... classes) { if (!isIndexed) { throw log.cannotRunLuceneQueriesIfNotIndexed(cache.getName()); } if (log.isDebugEnabled()) { log.debugf("Building Lucene query for : %s", queryString); } IckleParsingResult<TypeMetadata> parsingResult = parse(queryString); if (parsingResult.hasGroupingOrAggregations()) { throw log.groupAggregationsNotSupported(); } LuceneQueryParsingResult luceneParsingResult = transformParsingResult(parsingResult, emptyMap()); org.apache.lucene.search.Query luceneQuery = makeTypeQuery(luceneParsingResult.getQuery(), luceneParsingResult.getTargetEntityName()); if (indexedQueryMode == IndexedQueryMode.BROADCAST) { return new ClusteredCacheQueryImpl<>(new QueryDefinition(queryString), asyncExecutor, cache, keyTransformationHandler, null); } else { if (log.isDebugEnabled()) { log.debugf("The resulting Lucene query is : %s", luceneQuery.toString()); } CacheQuery cacheQuery = new CacheQueryImpl<>(luceneQuery, searchFactory, cache, keyTransformationHandler, timeoutExceptionFactory, classes); if (luceneParsingResult.getSort() != null) { cacheQuery = cacheQuery.sort(luceneParsingResult.getSort()); } if (luceneParsingResult.getProjections() != null) { cacheQuery = cacheQuery.projection(luceneParsingResult.getProjections()); } return (CacheQuery<E>) cacheQuery; } }
Source:
<code>public boolean equals(final Object obj) { <START> final boolean baseEquals = super.equals(obj) && Objects.equals(playlistType, ((PlaylistTab) obj).playlistType) && Objects.equals(playlistName, ((PlaylistTab) obj).playlistName); if (!baseEquals) { <END> return false; } final boolean localPlaylistEquals = playlistId == ((PlaylistTab) obj).playlistId; final boolean remotePlaylistEquals = playlistServiceId == ((PlaylistTab) obj).playlistServiceId && Objects.equals(playlistUrl, ((PlaylistTab) obj).playlistUrl); return localPlaylistEquals || remotePlaylistEquals; }</code><technical_language>suggestion if (!(super.equals(obj) && Objects.equals(playlistType, ((PlaylistTab) obj).playlistType) && Objects.equals(playlistName, ((PlaylistTab) obj).playlistName))) { return false; }</technical_language>

Target:
public boolean equals(final Object obj) { if (!(super.equals(obj) && Objects.equals(playlistType, ((PlaylistTab) obj).playlistType) && Objects.equals(playlistName, ((PlaylistTab) obj).playlistName))) { return false; } return (playlistId == ((PlaylistTab) obj).playlistId) || (playlistServiceId == ((PlaylistTab) obj).playlistServiceId && Objects.equals(playlistUrl, ((PlaylistTab) obj).playlistUrl)); }
Source:
<code>protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) { return new GoVisitor() { @Override public void visitCompositeLit(@NotNull GoCompositeLit compositeLit) { GoLiteralValue literalValue = compositeLit.getLiteralValue(); GoStructType structType = getStructType(literalValue); if (structType == null || !isStructImportedOrLocalAllowed(structType, literalValue)) return; List<String> elementsNames = getNames(literalValue.getElementList()); if (hasNull(elementsNames.toArray()) && areElementsNamesMatchesDefinitions(elementsNames, getFieldDefinitionsNames(structType))) { <START> holder.registerProblem(literalValue, "Unnamed field initializations", ProblemHighlightType.GENERIC_ERROR_OR_WARNING, QUICK_FIX); <END> } } }; }</code><technical_language>I report problem for element weak warning, valid code</technical_language>

Target:
protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) { return new GoVisitor() { @Override public void visitLiteralValue(@NotNull GoLiteralValue literalValue) { GoStructType structType = getLiteralStructType(literalValue); if (structType == null || !isStructImportedOrLocalAllowed(structType, literalValue)) return; List<GoElement> elements = literalValue.getElementList(); List<GoNamedElement> definitions = getFieldDefinitions(structType); if (!areElementsKeysMatchesDefinitions(elements, definitions)) return; registerProblemsForElementsWithoutKeys(elements, definitions.size()); } private void registerProblemsForElementsWithoutKeys(@NotNull List<GoElement> elements, int definitionsCount) { for (int i = 0; i < min(elements.size(), definitionsCount); i++) { if (elements.get(i).getKey() != null) continue; holder.registerProblem(elements.get(i), "Unnamed field initialization", ProblemHighlightType.WEAK_WARNING, QUICK_FIX); } } }; }
Source:
<code>private void completeSnapshotApply(LogReplicationEntry inputEntry) { log.debug("Complete of a snapshot apply"); rxState = RxState.LOG_ENTRY_SYNC; logReplicationMetadataManager.setSnapshotApplied(inputEntry); <START> logEntrySinkBufferManager = new LogEntrySinkBufferManager(ackCycleTime, ackCycleCnt, bufferSize, <END> logReplicationMetadataManager.getLastProcessedLogTimestamp(), this); log.info("Sink manager completed SNAPSHOT transfer for and has transit to state.", inputEntry, rxState); }</code><technical_language>Do need a new BufferManager snapshotApply? reset</technical_language>

Target:
private void completeSnapshotApply(LogReplicationEntry inputEntry) { log.debug("Complete of a snapshot apply"); rxState = RxState.LOG_ENTRY_SYNC; logReplicationMetadataManager.setSnapshotApplied(inputEntry); log.info("Sink manager completed SNAPSHOT transfer for and has transit to state.", inputEntry, rxState); }
Source:
<code>public void commit() throws TransactionFailedException { try { super.commit(); } finally { if (log.isInfoEnabled()) { <START> log.info("CachingTransaction cache stats on commit: {}", cellCache.stats()); <END> } } }</code><technical_language>Logging info verbose, lean debug</technical_language>

Target:
public void commit() throws TransactionFailedException { try { super.commit(); } finally { if (log.isDebugEnabled()) { log.debug("CachingTransaction cache stats on commit: {}", cellCache.stats()); } } }
Source:
<code>public void setMenuItems(@Nullable List<CarMenuItem> items) { mMenuItems = items; mActionItems.forEach(indexedItem -> removeView(indexedItem.mView)); mActionItems.clear(); mOverflowMenuItems.clear(); if (mMenuItems != null) { int alwaysItemCount = 0; for (CarMenuItem item : mMenuItems) { if (item.getDisplayBehavior() == CarMenuItem.DisplayBehavior.ALWAYS) { alwaysItemCount++; } } int ifRoomActionCapacity = ACTION_ITEM_COUNT_LIMIT - alwaysItemCount; for (int i = 0; i < mMenuItems.size(); i++) { CarMenuItem item = mMenuItems.get(i); if (item.getDisplayBehavior() == CarMenuItem.DisplayBehavior.ALWAYS || (item.getDisplayBehavior() == CarMenuItem.DisplayBehavior.IF_ROOM && ifRoomActionCapacity > 0)) { View action = item.isCheckable() ? createCheckableAction(item) : createAction(item); mActionItems.add(new IndexedMenuItem(item, action, i)); <START> addView(action); <END> if (item.getDisplayBehavior() == CarMenuItem.DisplayBehavior.IF_ROOM) { ifRoomActionCapacity--; } } else { mOverflowMenuItems.add(new IndexedMenuItem(item, null, i)); } } } mOverflowButtonView.setVisibility(mOverflowMenuItems.isEmpty() ? GONE : VISIBLE); requestLayout(); }</code><technical_language>addView removeView in onMeasure? this i easier track views. wdyt</technical_language>

Target:
public void setMenuItems(@Nullable List<CarMenuItem> items) { mMenuItems = items; mInflatedMenuItems.clear(); if (mMenuItems != null) { for (int i = 0; i < mMenuItems.size(); i++) { CarMenuItem item = mMenuItems.get(i); View action = null; if (item.getDisplayBehavior() != CarMenuItem.DisplayBehavior.NEVER) { action = item.isCheckable() ? createCheckableAction(item) : createAction(item); } mInflatedMenuItems.add(new InflatedMenuItem(item, action)); } } requestLayout(); }
Source:
<code>public void testSupportsBad() { AuthenticationToken authenticationToken = mock(AuthenticationToken.class); boolean supports = pkiRealm.supports(authenticationToken); assertFalse(supports); <START> authenticationToken = mock(BaseAuthenticationToken.class); <END> supports = pkiRealm.supports(authenticationToken); assertFalse(supports); when(authenticationToken.getCredentials()).thenReturn(new Object()); supports = pkiRealm.supports(authenticationToken); assertFalse(supports); }</code><technical_language>This test is identical block above</technical_language>

Target:
public void testSupportsBad() { BaseAuthenticationToken authenticationToken = mock(BaseAuthenticationToken.class); boolean supports = pkiRealm.supports(authenticationToken); assertFalse(supports); when(authenticationToken.getCredentials()).thenReturn(new Object()); when(authenticationToken.getPrincipal()).thenReturn(new Object()); supports = pkiRealm.supports(authenticationToken); assertFalse(supports); when(authenticationToken.getType()).thenReturn(AuthenticationTokenType.SAML); supports = pkiRealm.supports(authenticationToken); assertFalse(supports); when(authenticationToken.getCredentials()).thenReturn(new X509Certificate[1]); when(authenticationToken.getType()).thenReturn(AuthenticationTokenType.PKI); supports = pkiRealm.supports(authenticationToken); assertFalse(supports); when(authenticationToken.getCredentials()).thenReturn(new Object()); when(authenticationToken.getPrincipal()).thenReturn(new X500Principal("cn=test")); supports = pkiRealm.supports(authenticationToken); assertFalse(supports); }
Source:
<code>public static boolean chooseOption(BlobStoreContext context) throws IOException { Scanner scan = new Scanner(System.in); System.out.println(""); System.out.println("Glacier examples"); System.out.println("1. Put and retrieve blob (~4-5 hours)"); System.out.println("2. Multipart upload (~1-5 minutes)"); System.out.println("3. Call interruption (~0-2 minutes)"); System.out.println("4. Provider API (~4-5 hours)"); System.out.println("5. Exit"); System.out.print("Choose an option: "); try{ switch(scan.nextInt()){ case 1: putAndRetrieveBlobExample(context); break; case 2: multipartUploadExample(context); break; case 3: interruptionExample(context); break; case 4: providerExample(context); break; case 5: return false; default: System.out.println("Not a valid option"); break; } } <START> catch(InputMismatchException e){ <END> System.out.println("Not a valid option"); } return true; }</code><technical_language>[minor] Space { this try block</technical_language>

Target:
public static boolean chooseOption(BlobStoreContext context) throws IOException { Scanner scan = new Scanner(System.in); System.out.println(""); System.out.println("Glacier examples"); System.out.println("1. Put and retrieve blob (~4-5 hours)"); System.out.println("2. Multipart upload (~1-5 minutes)"); System.out.println("3. Call interruption (~0-2 minutes)"); System.out.println("4. Provider API (~4-5 hours)"); System.out.println("5. Exit"); System.out.print("Choose an option: "); try{ switch(scan.nextInt()){ case 1: putAndRetrieveBlobExample(context.getBlobStore()); break; case 2: multipartUploadExample(context.getBlobStore()); break; case 3: interruptionExample(context.getBlobStore()); break; case 4: providerExample(context); break; case 5: return false; default: System.out.println("Not a valid option"); break; } } catch(InputMismatchException e) { System.out.println("Not a valid option"); } return true; }
Source:
<code><START> public void addRuntimeAttributesToProject(ProjectConfigDto projectConfig, <END> FolderEntry projectFolder) throws ProjectTypeConstraintException, ForbiddenException, ValueStorageException, ServerException { addAttributesToProject(projectConfig, projectFolder, RUNTIME); }</code><technical_language>Please place public method of private methods</technical_language>

Target:
public void addRuntimeAttributesToProject(ProjectConfigDto projectConfig, FolderEntry projectFolder) throws ProjectTypeConstraintException, ForbiddenException, ValueStorageException, ServerException { addAttributesToProject(projectConfig, projectFolder, AttributeType.RUNTIME); }
Source:
<code>public Stream<RecordedMessage<M, R>> getRecordedMessages() { <START> return clientMessageTracker.getTrackedValues().sorted((r1,r2)->(int)(r1.getSequenceId() - r2.getSequenceId())).map(SequencedRecordedMessage::convert); <END> }</code><technical_language>comparingLong(RecordedMessage::getSequenceId)</technical_language>

Target:
public Stream<RecordedMessage<M, R>> getRecordedMessages() { return clientMessageTracker.getTrackedValues().sorted(comparingLong(SequencedRecordedMessage::getSequenceId)).map(SequencedRecordedMessage::convert); }
Source:
<code>public boolean exists(final String path) { final boolean exists = ocflRepo.containsObject(path); <START> LOGGER.info("Object with path: " + path + ", " + (exists ? "exist" : "does not exist")); <END> return exists; }</code><technical_language>change to: LOGGER.debug("Object path: {}, exists: {}", path, exists);</technical_language>

Target:
public boolean exists(final String path) { final boolean exists = ocflRepo.containsObject(path); LOGGER.debug("Object with path: {}, exists: {}", path, exists); return exists; }