auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void checkHandlerAnnotation(String name, List<String> foundClasses) throws IOException { if (name.endsWith(CLASS_SUFFIX)) { int end = name.lastIndexOf(CLASS_SUFFIX); String clazzPath = name.substring(0, end); String clazzName = pathToName(clazzPath); try { Class<?> clazz = classForName(clazzName); for (Annotation a : clazz.getAnnotations()) { if (a.annotationType().getName().contains(SCHEMA_HANDLER_JAVA_ANNOTATION)) { foundClasses.add(clazzName); return; } } } catch (ClassNotFoundException e) { throw new IOException("Failed to load class while scanning classes", e); } catch (Exception | Error e) { <START> getProject().getLogger() .info("Unexpected exceptions or errors found during scanning class, ok to skip", e); <END> } } }</code><technical_language>is skip</technical_language>

Target:
private void checkHandlerAnnotation(String name, List<String> foundClasses) throws IOException { if (name.endsWith(CLASS_SUFFIX)) { int end = name.lastIndexOf(CLASS_SUFFIX); String clazzPath = name.substring(0, end); String clazzName = pathToName(clazzPath); try { Class<?> clazz = classForName(clazzName); for (Annotation a : clazz.getAnnotations()) { if (a.annotationType().getName().contains(SCHEMA_HANDLER_JAVA_ANNOTATION)) { foundClasses.add(clazzName); return; } } } catch (ClassNotFoundException e) { throw new IOException("Failed to load class while scanning classes", e); } } }
Source:
<code>protected List<TaskData> doProcess(CommonHttpResponse response, IOperationMonitor monitor) throws IOException, BugzillaRestException { <START> BufferedInputStream is = new BufferedInputStream(response.getResponseEntityAsStream()); <END> InputStreamReader in = new InputStreamReader(is); throwExeptionIfRestError(is, in); return parseFromJson(in); }</code><technical_language>closing streams, this in a try-with-resource block</technical_language>

Target:
protected List<TaskData> doProcess(CommonHttpResponse response, IOperationMonitor monitor) throws IOException, BugzillaRestException { InputStream is = response.getResponseEntityAsStream(); InputStreamReader in = new InputStreamReader(is); return parseFromJson(in); }
Source:
<code>public Poller(Duration pollInterval, Function<PollResponse<T>, Mono<PollResponse<T>>> pollOperation, Supplier<Mono<T>> activationOperation, Consumer<Poller<T>> cancelOperation) { <START> if (pollInterval == null || pollInterval.compareTo(Duration.ZERO) <= 0) { <END> throw logger.logExceptionAsWarning(new IllegalArgumentException( "Null, negative or zero value for poll interval is not allowed.")); } if (pollOperation == null) { throw logger.logExceptionAsWarning(new IllegalArgumentException( "Null value for poll operation is not allowed.")); } this.pollInterval = pollInterval; this.pollOperation = pollOperation; final Mono<T> onActivation = activationOperation == null ? Mono.empty() : activationOperation.get().map(response -> { pollResponse.set(new PollResponse<>(OperationStatus.NOT_STARTED, response)); return response; }); this.fluxHandle = asyncPollRequestWithDelay() .flux() .repeat() .takeUntil(pollResponse -> hasCompleted()) .share() .delaySubscription(onActivation); this.fluxDisposable = fluxHandle.subscribe(); this.autoPollingEnabled = true; this.cancelOperation = cancelOperation; }</code><technical_language>If null, throw NPE if is invalid, throw IllegalArgumentException</technical_language>

Target:
public Poller(Duration pollInterval, Function<PollResponse<T>, Mono<PollResponse<T>>> pollOperation, Supplier<Mono<T>> activationOperation, Consumer<Poller<T>> cancelOperation) { Objects.requireNonNull(pollInterval, "'pollInterval' cannot be null."); if (pollInterval.compareTo(Duration.ZERO) <= 0) { throw logger.logExceptionAsWarning(new IllegalArgumentException( "Negative or zero value for 'pollInterval' is not allowed.")); } this.pollInterval = pollInterval; this.pollOperation = Objects.requireNonNull(pollOperation, "'pollOperation' cannot be null."); final Mono<T> onActivation = activationOperation == null ? Mono.empty() : activationOperation.get().map(response -> { this.pollResponse = new PollResponse<>(OperationStatus.NOT_STARTED, response); return response; }); this.fluxHandle = asyncPollRequestWithDelay() .flux() .repeat() .takeUntil(pollResponse -> hasCompleted()) .share() .delaySubscription(onActivation); this.fluxDisposable = fluxHandle.subscribe(); this.autoPollingEnabled = true; this.cancelOperation = cancelOperation; }
Source:
<code>private boolean canPerform(ApprovalCategory.Id actionId, short level) { final Set<AccountGroup.Id> groups = getCurrentUser().getEffectiveGroups(); int val = Integer.MIN_VALUE; List<RefRight> allRights = new ArrayList<RefRight>(); allRights.addAll(getLocalRights()); if (actionId.canInheritFromWildProject()) { allRights.addAll(getInheritedRights()); } List<RefRight> actionRights = new ArrayList<RefRight>(); for (final RefRight right : allRights) { <START> if (right.getApprovalCategoryId().equals(actionId)) { <END> actionRights.add(right); } } Collections.sort(actionRights, new RefRight.RefPatternOrder()); List<RefRight> mostSpecific = filterMostSpecific(actionRights); for (RefRight right : mostSpecific) { if (groups.contains(right.getAccountGroupId())) { if (val < 0 && right.getMaxValue() > 0) { val = right.getMaxValue(); } else { val = Math.max(right.getMaxValue(), val); } } } return val >= level; }</code><technical_language>do this filtering in getLocal getInherited methods? pass in actionId do part of "is matching ref" loop</technical_language>

Target:
private boolean canPerform(ApprovalCategory.Id actionId, short level) { final Set<AccountGroup.Id> groups = getCurrentUser().getEffectiveGroups(); int val = Integer.MIN_VALUE; List<RefRight> allRights = new ArrayList<RefRight>(); allRights.addAll(getLocalRights(actionId)); if (actionId.canInheritFromWildProject()) { allRights.addAll(getInheritedRights(actionId)); } Collections.sort(allRights, RefRight.REF_PATTERN_ORDER); for (RefRight right : filterMostSpecific(allRights)) { if (groups.contains(right.getAccountGroupId())) { if (val < 0 && right.getMaxValue() > 0) { val = right.getMaxValue(); } else { val = Math.max(right.getMaxValue(), val); } } } return val >= level; }
Source:
<code><START> @Test public void testInvalidParse() { <END> final String urn = "urn:ogcx:def:CRS:EPSG:6.8:4326"; try { URN_Parser.buildParser(urn); fail(); } catch (NoSuchAuthorityCodeException e) { assertEquals(urn, e.getAuthorityCode()); } }</code><technical_language>This is a whitespace change; do a formatter</technical_language>

Target:
public void testInvalidParse() { final String urn = "urn:ogcx:def:CRS:EPSG:6.8:4326"; try { URN_Parser.buildParser(urn); fail(); } catch (NoSuchAuthorityCodeException e) { assertEquals(urn, e.getAuthorityCode()); } }
Source:
<code>public Config<T> withProjectionString(String p) { <START> return new Config<T>(this.klass, this.filterPredicate, Objects.requireNonNull(p, "projectionString"), this.strictProjectionString); <END> }</code><technical_language>suggestion return new Config<T>(this.klass, this.filterPredicate, Objects.requireNonNull(p, "projectionString null"), this.strictProjectionString);</technical_language>

Target:
public Config<T> withProjectionString(String p) { return new Config<T>(this.klass, this.filterPredicate, Objects.requireNonNull(p, "projectionString cannot be null"), this.strictProjectionString); }
Source:
<code>public <T> QueryRunner<T> getQueryRunnerForIntervals(final Query<T> query, final Iterable<Interval> intervals) { <START> if (conglomerate == null) { <END> throw new IllegalStateException("Don't query me, bro."); } final Iterable<SegmentDescriptor> specs = FunctionalIterable .create(intervals) .transformCat( new Function<Interval, Iterable<TimelineObjectHolder<String, Sink>>>() { @Override public Iterable<TimelineObjectHolder<String, Sink>> apply(final Interval interval) { return sinkTimeline.lookup(interval); } } ) .transformCat( new Function<TimelineObjectHolder<String, Sink>, Iterable<SegmentDescriptor>>() { @Override public Iterable<SegmentDescriptor> apply(final TimelineObjectHolder<String, Sink> holder) { return FunctionalIterable .create(holder.getObject()) .transform( new Function<PartitionChunk<Sink>, SegmentDescriptor>() { @Override public SegmentDescriptor apply(final PartitionChunk<Sink> chunk) { return new SegmentDescriptor( holder.getInterval(), holder.getVersion(), chunk.getChunkNumber() ); } } ); } } ); return getQueryRunnerForSegments(query, specs); }</code><technical_language>remove null check</technical_language>

Target:
public <T> QueryRunner<T> getQueryRunnerForIntervals(final Query<T> query, final Iterable<Interval> intervals) { final Iterable<SegmentDescriptor> specs = FunctionalIterable .create(intervals) .transformCat( new Function<Interval, Iterable<TimelineObjectHolder<String, Sink>>>() { @Override public Iterable<TimelineObjectHolder<String, Sink>> apply(final Interval interval) { return sinkTimeline.lookup(interval); } } ) .transformCat( new Function<TimelineObjectHolder<String, Sink>, Iterable<SegmentDescriptor>>() { @Override public Iterable<SegmentDescriptor> apply(final TimelineObjectHolder<String, Sink> holder) { return FunctionalIterable .create(holder.getObject()) .transform( new Function<PartitionChunk<Sink>, SegmentDescriptor>() { @Override public SegmentDescriptor apply(final PartitionChunk<Sink> chunk) { return new SegmentDescriptor( holder.getInterval(), holder.getVersion(), chunk.getChunkNumber() ); } } ); } } ); return getQueryRunnerForSegments(query, specs); }
Source:
<code>public void testCompletingCheckoutWithEmptyCheckoutToken() throws InterruptedException { <START> final CountDownLatch latch = new CountDownLatch(1); <END> try { buyClient.completeCheckout(paymentToken, ""); } catch (IllegalArgumentException e) { latch.countDown(); return; } latch.await(); fail("Expected an IllegalArgumentException"); }</code><technical_language>^^^</technical_language>

Target:
public void testCompletingCheckoutWithEmptyCheckoutToken() throws InterruptedException { try { buyClient.completeCheckout(paymentToken, ""); } catch (IllegalArgumentException e) { return; } fail("Expected an IllegalArgumentException"); }
Source:
<code><START> public static List<Person> peopleListFromJSON(JSONArray jsonArray, int localTableBlogId) { <END> if (jsonArray == null) { return null; } ArrayList<Person> peopleList = new ArrayList<>(jsonArray.length()); for (int i = 0; i < jsonArray.length(); i++) { Person person = Person.fromJSON(jsonArray.optJSONObject(i), localTableBlogId); if (person != null) { peopleList.add(person); } } return peopleList; }</code><technical_language>This helper function fetchUsers live private instead of public needs it. Cheers</technical_language>

Target:
private static List<Person> peopleListFromJSON(JSONArray jsonArray, int localTableBlogId) { if (jsonArray == null) { return null; } ArrayList<Person> peopleList = new ArrayList<>(jsonArray.length()); for (int i = 0; i < jsonArray.length(); i++) { Person person = Person.fromJSON(jsonArray.optJSONObject(i), localTableBlogId); if (person != null) { peopleList.add(person); } } return peopleList; }
Source:
<code>protected GitCompareInput getCompareInput(ComparisonDataSource baseData, ComparisonDataSource remoteData, ComparisonDataSource ancestorData) { <START> return null; <END> }</code><technical_language>throw exception signal this</technical_language>

Target:
protected GitCompareInput getCompareInput(ComparisonDataSource baseData, ComparisonDataSource remoteData, ComparisonDataSource ancestorData) { throw new UnsupportedOperationException( "Compare editor for working tree files is should be opened directly from GitOpenInCompareAction"); }
Source:
<code>public Block[] getSequenceBlocks(int start, int length) { int sequenceLength = 2 * length; <START> BlockBuilder bucketCountsBuilder = BIGINT.createBlockBuilder(null, sequenceLength); <END> BlockBuilder samplesBuilder = DOUBLE.createBlockBuilder(null, sequenceLength); for (int weight = 1; weight < 3; ++weight) { for (int i = start; i < start + length; i++) { BIGINT.writeLong(bucketCountsBuilder, TestReservoirAggregation.SIZE); DOUBLE.writeDouble(samplesBuilder, Double.valueOf(i)); } } return new Block[] { bucketCountsBuilder.build(), samplesBuilder.build() }; }</code><technical_language>createRLEBlock</technical_language>

Target:
public Block[] getSequenceBlocks(int start, int length) { int positionCount = 2 * length; BlockBuilder samples = DOUBLE.createBlockBuilder(null, positionCount); for (int weight = 1; weight < 3; weight++) { for (int i = start; i < start + length; i++) { DOUBLE.writeDouble(samples, i); } } return new Block[] { createRLEBlock(AbstractTestReservoirAggregation.MAX_SAMPLES, positionCount), samples.build() }; }
Source:
<code>public void verifyRecordingSingletonLatencyIsCheapWhenDisabled() throws Exception { final double maxLatencyWhenDisabledMs = 1; final double minLatencyWhenDisabledMs = 0; final long numTasks = 1000; long aggregateLatency = 0; AbfsPerfTracker abfsPerfTracker = new AbfsPerfTracker(accountName, filesystemName, false); List<Callable<Long>> tasks = new ArrayList<>(); final AbfsHttpOperation httpOperation = new AbfsHttpOperation(url, "GET", new ArrayList<>()); for (int i = 0; i < numTasks; i++) { tasks.add(() -> { Instant startRecord = Instant.now(); try (AbfsPerfInfo tracker = new AbfsPerfInfo(abfsPerfTracker, "oneOperationCaller", "oneOperationCallee")) { tracker.registerResult(httpOperation).registerSuccess(true); } long latencyRecord = Duration.between(startRecord, Instant.now()).toMillis(); LOG.debug("Spent ms in recording latency.", latencyRecord); return latencyRecord; }); } for (Future<Long> fr: executorService.invokeAll(tasks)) { aggregateLatency += fr.get(); } <START> double averageRecordLatency = aggregateLatency/numTasks; <END> assertThat(averageRecordLatency).describedAs("Average time for recording singleton latencies should be bounded") .isBetween(minLatencyWhenDisabledMs, maxLatencyWhenDisabledMs); }</code><technical_language>need space "/",</technical_language>

Target:
public void verifyRecordingSingletonLatencyIsCheapWhenDisabled() throws Exception { final double maxLatencyWhenDisabledMs = 1000; final double minLatencyWhenDisabledMs = 0; final long numTasks = 1000; long aggregateLatency = 0; AbfsPerfTracker abfsPerfTracker = new AbfsPerfTracker(accountName, filesystemName, false); List<Callable<Long>> tasks = new ArrayList<>(); final AbfsHttpOperation httpOperation = new AbfsHttpOperation(url, "GET", new ArrayList<>()); for (int i = 0; i < numTasks; i++) { tasks.add(() -> { Instant startRecord = Instant.now(); try (AbfsPerfInfo tracker = new AbfsPerfInfo(abfsPerfTracker, "oneOperationCaller", "oneOperationCallee")) { tracker.registerResult(httpOperation).registerSuccess(true); } long latencyRecord = Duration.between(startRecord, Instant.now()).toMillis(); LOG.debug("Spent ms in recording latency.", latencyRecord); return latencyRecord; }); } for (Future<Long> fr: executorService.invokeAll(tasks)) { aggregateLatency += fr.get(); } double averageRecordLatency = aggregateLatency / numTasks; assertThat(averageRecordLatency).describedAs("Average time for recording singleton latencies should be bounded") .isBetween(minLatencyWhenDisabledMs, maxLatencyWhenDisabledMs); }
Source:
<code>private void printWarnings(final PrintWriter stdout, final GroupMembersList groupMembers) { boolean hasWarning = false; if (groupMembers.containsNonVisibleGroup()) { stdout.println("Warning: Some included groups are not visible to you " + "and are not shown in the result."); hasWarning = true; } final Map<AccountGroup.UUID, GroupMembersList> unresolvedGroups = new HashMap<AccountGroup.UUID, GroupMembersList>(); if (recursive) { unresolvedGroups.putAll(groupMembers.getUnresolvedGroups()); } else { if (!groupMembers.isResolved()) { unresolvedGroups.put(groupMembers.getGroup().getGroupUUID(), groupMembers); <START> } <END> } if (unresolvedGroups.containsKey(AccountGroup.PROJECT_OWNERS)) { stdout.println("Warning: The group '" + unresolvedGroups.get(AccountGroup.PROJECT_OWNERS).getGroup().getName() + "' could not be resolved. It can only be resolved for a concrete project. " + "Please specify a project with the '--project' option."); hasWarning = true; } unresolvedGroups.remove(AccountGroup.PROJECT_OWNERS); for (final GroupMembersList unresolvedGroup : unresolvedGroups.values()) { stdout.println("Warning: The group '" + unresolvedGroup.getGroup().getName() + "' cannot be resolved."); hasWarning = true; } if (hasWarning) { stdout.println(); } }</code><technical_language>code in else branch is longer harder read code in "then" branch although, semantically, thing: populate unresolvedGroups map. else branch is non-recursive case simpler recursive case. code works properly interface of GroupMemberList support non-recursive case</technical_language>

Target:
private void printWarnings(final PrintWriter stdout, final GroupMembersList groupMembers) { boolean hasWarning = false; if (groupMembers.containsNonVisibleGroup()) { stdout.print("Warning: Some included groups are not visible to you " + "and are not shown in the result.\n"); hasWarning = true; } final Map<AccountGroup.UUID, GroupMembersList> unresolvedGroups = new HashMap<AccountGroup.UUID, GroupMembersList>(); unresolvedGroups.putAll(groupMembers.getUnresolvedGroups(recursive)); if (unresolvedGroups.containsKey(AccountGroup.PROJECT_OWNERS)) { stdout.print("Warning: The group '" + unresolvedGroups.get(AccountGroup.PROJECT_OWNERS).getGroup().getName() + "' could not be resolved. It can only be resolved for a concrete project. " + "Please specify a project with the '--project' option.\n"); hasWarning = true; } unresolvedGroups.remove(AccountGroup.PROJECT_OWNERS); for (final GroupMembersList unresolvedGroup : unresolvedGroups.values()) { stdout.print("Warning: The group '" + unresolvedGroup.getGroup().getName() + "' cannot be resolved.\n"); hasWarning = true; } if (hasWarning) { stdout.print("\n"); } }
Source:
<code>void error(ZuulException e) { RequestContext.getCurrentContext().setThrowable(e); zuulRunner.error(); <START> LOG.error(e.getMessage(), e); <END> }</code><technical_language>preference remove e.printStackTrace() altogether 'error' filters determine if want log error</technical_language>

Target:
void error(ZuulException e) { RequestContext.getCurrentContext().setThrowable(e); zuulRunner.error(); }
Source:
<code>public void dynamicTestRegistered(TestIdentifier testIdentifier) { notifyTestExecutionListeners(listener -> { try { listener.dynamicTestRegistered(testIdentifier); } catch (Throwable throwable) { rethrowIfBlacklistedAndLogTest(throwable, listener, testIdentifier, "dynamicTestRegistered"); <START> } <END> }); }</code><technical_language>Please move exception handling notifyTestExecutionListeners() instead of duplicating it</technical_language>

Target:
public void dynamicTestRegistered(TestIdentifier testIdentifier) { notifyEach(testExecutionListeners, listener -> listener.dynamicTestRegistered(testIdentifier), () -> "dynamicTestRegistered(" + testIdentifier + ")"); }
Source:
<code>RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { try { for (;;) { final RevCommit c = pending.next(); if (c == null) { return null; } final boolean produce; if ((c.flags & UNINTERESTING) != 0) produce = false; else { if (filter.requiresCommitBody()) c.parseBody(walker); produce = filter.include(walker, c); } for (int i = 0; i < c.parents.length; i++) { RevCommit p = c.parents[i]; <START> if ((p.flags & PARSED) == 0) { <END> p.parseHeaders(walker); } if (firstParent && i > 0) { continue; } if ((p.flags & SEEN) != 0) { continue; } p.flags |= SEEN; pending.add(p); } walker.carryFlagsImpl(c); if ((c.flags & UNINTERESTING) != 0) { if (pending.everbodyHasFlag(UNINTERESTING)) { final RevCommit n = pending.peek(); if (n != null && n.commitTime >= last.commitTime) { overScan = OVER_SCAN; } else if (--overScan == 0) throw StopWalkException.INSTANCE; } else { overScan = OVER_SCAN; } if (canDispose) c.disposeBody(); continue; } if (produce) return last = c; else if (canDispose) c.disposeBody(); } } catch (StopWalkException swe) { pending.clear(); return null; } }</code><technical_language>I order of checks is relevant minimize work. check "firstParent" first, parsing headers if needed</technical_language>

Target:
RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { try { for (;;) { final RevCommit c = pending.next(); if (c == null) { return null; } final boolean produce; if ((c.flags & UNINTERESTING) != 0) produce = false; else { if (filter.requiresCommitBody()) c.parseBody(walker); produce = filter.include(walker, c); } for (int i = 0; i < c.parents.length; i++) { if (firstParent && i > 0) { break; } RevCommit p = c.parents[i]; if ((p.flags & PARSED) == 0) { p.parseHeaders(walker); } if ((p.flags & SEEN) != 0) { continue; } p.flags |= SEEN; pending.add(p); } walker.carryFlagsImpl(c); if ((c.flags & UNINTERESTING) != 0) { if (pending.everbodyHasFlag(UNINTERESTING)) { final RevCommit n = pending.peek(); if (n != null && n.commitTime >= last.commitTime) { overScan = OVER_SCAN; } else if (--overScan == 0) throw StopWalkException.INSTANCE; } else { overScan = OVER_SCAN; } if (canDispose) c.disposeBody(); continue; } if (produce) return last = c; else if (canDispose) c.disposeBody(); } } catch (StopWalkException swe) { pending.clear(); return null; } }
Source:
<code>private File local(final HttpServletRequest req) { final String name = req.getPathInfo(); if (name.length() < 2 || !name.startsWith("/")) { return null; } final File p = new File(staticBase, name.substring(1)); try { <START> if (!p.getCanonicalFile().getPath().startsWith(staticBase.getPath()+File.separator)) <END> return null; } catch (IOException e) { return null; } return p.isFile() ? p : null; }</code><technical_language>I prefer logic default require admin set option in gerrit.config if he/she wants serve a subdirectory static. servers want to, plenty of brain-damaged ways access local filesystem granted accidentally if allow / \ in path here. of is Windows UNC paths. ways behave funny I want trust Java's getCanonicalFile save them. in a default installation anyway</technical_language>

Target:
private File local(final HttpServletRequest req) { final String name = req.getPathInfo(); if (name.length() < 2 || !name.startsWith("/") || isUnreasonableName(name)) { return null; } final File p = new File(staticBase, name.substring(1)); try { if (!p.getCanonicalFile().getPath().startsWith(staticBasePath)) return null; } catch (IOException e) { return null; } return p.isFile() ? p : null; }
Source:
<code>public void iCanUpdateClientWithRequiredFieldsOnly() throws IOException { String data = "{\n" + " \"entity-type\": \"oauth2Client\",\n" + " \"id\": \"nuxeo-client-12\",\n" + " \"name\": \"Nuxeo Client 12\",\n" + " \"isEnabled\": false,\n" + " \"secret\": \"8529\",\n" + " \"isAutoGrant\": false,\n" + " \"redirectURIs\": [\n" + " \"nuxeo://authorize\"\n" + " ]\n" + "}"; <START> makeOperationAndVerify(TEST_OAUTH2_USER, CLIENT_PATH, RequestType.POST, data, Response.Status.CREATED, <END> mapper.readTree(data)); }</code><technical_language>want test PUT expect OK here</technical_language>

Target:
public void iCanUpdateClientWithRequiredFieldsOnly() throws IOException { String data = "{\n" + " \"entity-type\": \"oauth2Client\",\n" + " \"id\": \"%s\",\n" + " \"name\": \"%s\",\n" + " \"redirectURIs\": [\n" + " \"nuxeo://authorize\"\n" + " ]\n" + "}"; String expected = "{\n" + " \"entity-type\": \"oauth2Client\",\n" + " \"id\": \"%s\",\n" + " \"name\": \"%s\",\n" + " \"isEnabled\": false,\n" + " \"isAutoGrant\": false,\n" + " \"redirectURIs\": [\n" + " \"nuxeo://authorize\"\n" + " ],\n" + " \"secret\": null\n" + "}"; data = String.format(data, TEST_CLIENT_NAME, TEST_CLIENT); expected = String.format(expected, TEST_CLIENT_NAME, TEST_CLIENT); makeOperationAndVerify(TEST_OAUTH2_USER, getClientPath(TEST_CLIENT), RequestType.PUT, data, Response.Status.OK, mapper.readTree(expected)); }
Source:
<code>protected void bindToEntry(BibEntry entry) { if (boundEntry != null) { storeSource(boundEntry, codeArea.textProperty().getValue()); } this.boundEntry = entry; <START> if (entry != null) { <END> DefaultTaskExecutor.runAndWaitInJavaFXThread(() -> { codeArea.clear(); try { codeArea.appendText(getSourceString(entry, mode, fieldFormatterPreferences)); highlightSearchPattern(); } catch (IOException ex) { codeArea.setEditable(false); codeArea.appendText(ex.getMessage() + "\n\n" + Localization.lang("Correct the entry, and reopen editor to display/edit source.")); LOGGER.debug("Incorrect entry", ex); } }); } }</code><technical_language>removed binding fields -> code area? If entry changes (e.g. cleanup actions "generate bibtex key" set special fields ranked/printed/...), changes reflected in source tab, too</technical_language>

Target:
protected void bindToEntry(BibEntry entry) { if (previousEntry != null) { storeSource(previousEntry, codeArea.textProperty().getValue()); } this.previousEntry = entry; updateCodeArea(); entry.getFieldsObservable().addListener((InvalidationListener) listener -> updateCodeArea()); }
Source:
<code>public static String getOMRatisSnapshotDirectory(Configuration conf) { String snapshotDir = conf.get(OMConfigKeys.OZONE_OM_RATIS_SNAPSHOT_DIR); if (Strings.isNullOrEmpty(snapshotDir)) { <START> snapshotDir = getOMRatisDirectory(conf) + "/snapshot"; <END> } return snapshotDir; }</code><technical_language>Paths.get join path here. / breaks Windows. officially support Windows path logic platform agnostic</technical_language>

Target:
public static String getOMRatisSnapshotDirectory(Configuration conf) { String snapshotDir = conf.get(OMConfigKeys.OZONE_OM_RATIS_SNAPSHOT_DIR); if (Strings.isNullOrEmpty(snapshotDir)) { snapshotDir = Paths.get(getOMRatisDirectory(conf), "snapshot").toString(); } return snapshotDir; }
Source:
<code>protected Trade(Offer offer, Coin txFee, Coin takerFee, boolean isCurrencyForTakerFeeBtc, @Nullable NodeAddress arbitratorNodeAddress, @Nullable NodeAddress mediatorNodeAddress, @Nullable NodeAddress refundAgentNodeAddress, Storage<? extends TradableList> storage, BtcWalletService btcWalletService) { this.offer = offer; this.txFee = txFee; this.takerFee = takerFee; this.isCurrencyForTakerFeeBtc = isCurrencyForTakerFeeBtc; this.storage = storage; this.btcWalletService = btcWalletService; this.arbitratorNodeAddress = arbitratorNodeAddress; this.mediatorNodeAddress = mediatorNodeAddress; this.refundAgentNodeAddress = refundAgentNodeAddress; txFeeAsLong = txFee.value; takerFeeAsLong = takerFee.value; takeOfferDate = new Date().getTime(); processModel = new ProcessModel(); lastRefreshRequestDate = takeOfferDate; refreshInterval = Math.min(offer.getPaymentMethod().getMaxTradePeriod() / 5, MAX_REFRESH_INTERVAL); <START> xmrProofResult = new XmrProofResult(0, 0, XmrProofResult.State.FEATURE_DISABLED); <END> }</code><technical_language>is xmrProofResult set here? marked a @Nullable fields left null used. setXmrProofResult method avoid xmrProofResultProperty out sync</technical_language>

Target:
protected Trade(Offer offer, Coin txFee, Coin takerFee, boolean isCurrencyForTakerFeeBtc, @Nullable NodeAddress arbitratorNodeAddress, @Nullable NodeAddress mediatorNodeAddress, @Nullable NodeAddress refundAgentNodeAddress, Storage<? extends TradableList> storage, BtcWalletService btcWalletService) { this.offer = offer; this.txFee = txFee; this.takerFee = takerFee; this.isCurrencyForTakerFeeBtc = isCurrencyForTakerFeeBtc; this.storage = storage; this.btcWalletService = btcWalletService; this.arbitratorNodeAddress = arbitratorNodeAddress; this.mediatorNodeAddress = mediatorNodeAddress; this.refundAgentNodeAddress = refundAgentNodeAddress; txFeeAsLong = txFee.value; takerFeeAsLong = takerFee.value; takeOfferDate = new Date().getTime(); processModel = new ProcessModel(); lastRefreshRequestDate = takeOfferDate; refreshInterval = Math.min(offer.getPaymentMethod().getMaxTradePeriod() / 5, MAX_REFRESH_INTERVAL); }
Source:
<code><START> public abstract @CheckForNull MultiBranchProject<?,?> createProject(@Nonnull ItemGroup<?> parent, @Nonnull String name, @Nonnull List<? extends SCMSource> scmSources, @Nonnull Map<String,Object> attributes, @Nonnull TaskListener listener) throws IOException, InterruptedException; <END> @Override public MultiBranchProjectFactoryDescriptor getDescriptor() { return (MultiBranchProjectFactoryDescriptor) super.getDescriptor(); }</code><technical_language>style guide</technical_language>

Target:
public abstract MultiBranchProject<?,?> createProject(@Nonnull ItemGroup<?> parent, @Nonnull String name, @Nonnull List<? extends SCMSource> scmSources, @Nonnull Map<String,Object> attributes, @Nonnull TaskListener listener) throws IOException, InterruptedException; @Override public MultiBranchProjectFactoryDescriptor getDescriptor() { return (MultiBranchProjectFactoryDescriptor) super.getDescriptor(); }
Source:
<code>protected void addRemoteReplicaInfoToReplicaThread(List<RemoteReplicaInfo> remoteReplicaInfos, boolean startThread) { for (RemoteReplicaInfo remoteReplicaInfo : remoteReplicaInfos) { DataNodeId dataNodeIdToReplicate = remoteReplicaInfo.getReplicaId().getDataNodeId(); String datacenter = dataNodeIdToReplicate.getDatacenterName(); createThreadPoolIfNecessary(datacenter, startThread); <START> ReplicaThread replicaThread = dataNodeIdToReplicaThread.computeIfAbsent(dataNodeIdToReplicate, <END> key -> replicaThreadPoolByDc.get(datacenter).get(getReplicaThreadIndexToUse(datacenter))); replicaThread.addRemoteReplicaInfo(remoteReplicaInfo); remoteReplicaInfo.setReplicaThread(replicaThread); } }</code><technical_language>Minor: throw IllegalStateException if threadpool created for datacenter, avoid NPE</technical_language>

Target:
protected void addRemoteReplicaInfoToReplicaThread(List<RemoteReplicaInfo> remoteReplicaInfos, boolean startThread) { for (RemoteReplicaInfo remoteReplicaInfo : remoteReplicaInfos) { DataNodeId dataNodeIdToReplicate = remoteReplicaInfo.getReplicaId().getDataNodeId(); String datacenter = dataNodeIdToReplicate.getDatacenterName(); List<ReplicaThread> replicaThreads = getOrCreateThreadPoolIfNecessary(datacenter, startThread); if (replicaThreads == null) { logger.warn("Number of replica threads is smaller or equal to 0, not starting any replica threads for {}.", datacenter); continue; } ReplicaThread replicaThread = dataNodeIdToReplicaThread.computeIfAbsent(dataNodeIdToReplicate, key -> replicaThreads.get(getReplicaThreadIndexToUse(datacenter))); replicaThread.addRemoteReplicaInfo(remoteReplicaInfo); remoteReplicaInfo.setReplicaThread(replicaThread); } }
Source:
<code>private <T, SpecT> SpecT createPolicySpec(CatalogItemDo<T, SpecT> loadedItem, DeploymentPlan plan) { Object policy = plan.getCustomAttributes().get("policy"); Map<String, Object> policyConfig; if (policy instanceof String) { policyConfig = ImmutableMap.<String, Object>of("type", policy); } else if (policy instanceof Map) { policyConfig = (Map<String, Object>) policy; } else { <START> throw new IllegalStateException("Policy exepcted to be string or map."); <END> } String policyType = (String) policyConfig.get("type"); Map<String, Object> brooklynConfig = (Map<String, Object>) policyConfig.get("brooklyn.config"); BrooklynClassLoadingContext loader = loadedItem.newClassLoadingContext(mgmt); PolicySpec<? extends Policy> spec = PolicySpec.create(loader.loadClass(policyType, Policy.class)); if (brooklynConfig != null) { spec.configure(brooklynConfig); } return (SpecT) spec; }</code><technical_language>Again, good type passed in part of exception message</technical_language>

Target:
private <T, SpecT> SpecT createPolicySpec(CatalogItemDo<T, SpecT> loadedItem, DeploymentPlan plan) { Object policies = checkNotNull(plan.getCustomAttributes().get(POLICIES_KEY), "policy config"); if (!(policies instanceof Iterable<?>)) { throw new IllegalStateException("The value of " + POLICIES_KEY + " must be an Iterable."); } Object policy = Iterables.getOnlyElement((Iterable<?>)policies); Map<String, Object> policyConfig; if (policy instanceof String) { policyConfig = ImmutableMap.<String, Object>of("type", policy); } else if (policy instanceof Map) { policyConfig = (Map<String, Object>) policy; } else { throw new IllegalStateException("Policy exepcted to be string or map. Unsupported object type " + policy.getClass().getName() + " (" + policy.toString() + ")"); } String policyType = (String) checkNotNull(Yamls.getMultinameAttribute(policyConfig, "policy_type", "policyType", "type"), "policy type"); Map<String, Object> brooklynConfig = (Map<String, Object>) policyConfig.get("brooklyn.config"); BrooklynClassLoadingContext loader = loadedItem.newClassLoadingContext(mgmt); PolicySpec<? extends Policy> spec = PolicySpec.create(loader.loadClass(policyType, Policy.class)); if (brooklynConfig != null) { spec.configure(brooklynConfig); } return (SpecT) spec; }
Source:
<code>private SortingCollection(final Class<T> componentType, final SortingCollection.Codec<T> codec, final Comparator<T> comparator, final int maxRecordsInRam, final Path... tmpDir) { if (maxRecordsInRam <= 0) { throw new IllegalArgumentException("maxRecordsInRam must be > 0"); } if (tmpDir == null || tmpDir.length == 0) { throw new IllegalArgumentException("At least one temp directory must be provided."); } this.tmpDirs = tmpDir; this.codec = codec; this.comparator = comparator; this.maxRecordsInRam = maxRecordsInRam; <START> <END> this.ramRecords = (T[])Array.newInstance(componentType, maxRecordsInRam); }</code><technical_language>intentional newline</technical_language>

Target:
private SortingCollection(final Class<T> componentType, final SortingCollection.Codec<T> codec, final Comparator<T> comparator, final int maxRecordsInRam, final Path... tmpDir) { if (maxRecordsInRam <= 0) { throw new IllegalArgumentException("maxRecordsInRam must be > 0"); } if (tmpDir == null || tmpDir.length == 0) { throw new IllegalArgumentException("At least one temp directory must be provided."); } this.tmpDirs = tmpDir; this.codec = codec; this.comparator = comparator; this.maxRecordsInRam = maxRecordsInRam; @SuppressWarnings("unchecked") T[] ramRecords = (T[]) Array.newInstance(componentType, maxRecordsInRam); this.ramRecords = ramRecords; }
Source:
<code>private ContentletRelationships getContentletRelationshipsFromMap(final Contentlet contentlet, final Map<Relationship, List<Contentlet>> contentRelationships) { if(contentRelationships == null) { return null; } final Structure structure = CacheLocator.getContentTypeCache() .getStructureByInode(contentlet.getStructureInode()); final ContentletRelationships relationshipsData = new ContentletRelationships(contentlet); final List<ContentletRelationships.ContentletRelationshipRecords> relationshipsRecords = new ArrayList<ContentletRelationships.ContentletRelationshipRecords>(); relationshipsData.setRelationshipsRecords(relationshipsRecords); for(final Map.Entry<Relationship, List<Contentlet>> relEntry : contentRelationships.entrySet()) { final Relationship relationship = relEntry.getKey(); final boolean hasChildren = FactoryLocator.getRelationshipFactory().isChild(relationship, structure); boolean hasParent = FactoryLocator.getRelationshipFactory().isParent(relationship, structure); if (hasParent && hasChildren) { if(!UtilMethods.isSet(relationship.getParentRelationName())){ hasParent = true; } else { hasParent = false; <START> } <END> } final ContentletRelationships.ContentletRelationshipRecords records = relationshipsData.new ContentletRelationshipRecords(relationship, hasParent); records.setRecords(relEntry.getValue()); relationshipsRecords.add(records); } return relationshipsData; }</code><technical_language>replace hasParent = !UtilMethods.isSet(relationship.getParentRelationName()</technical_language>

Target:
private ContentletRelationships getContentletRelationshipsFromMap(final Contentlet contentlet, final Map<Relationship, List<Contentlet>> contentRelationships) { if(contentRelationships == null) { return null; } final Structure structure = CacheLocator.getContentTypeCache() .getStructureByInode(contentlet.getStructureInode()); final ContentletRelationships relationshipsData = new ContentletRelationships(contentlet); final List<ContentletRelationships.ContentletRelationshipRecords> relationshipsRecords = new ArrayList<ContentletRelationships.ContentletRelationshipRecords>(); relationshipsData.setRelationshipsRecords(relationshipsRecords); for(final Map.Entry<Relationship, List<Contentlet>> relEntry : contentRelationships.entrySet()) { final Relationship relationship = relEntry.getKey(); final boolean hasChildren = FactoryLocator.getRelationshipFactory().isChild(relationship, structure); boolean hasParent = FactoryLocator.getRelationshipFactory().isParent(relationship, structure); if (hasParent && hasChildren) { hasParent = !UtilMethods.isSet(relationship.getParentRelationName()); } final ContentletRelationships.ContentletRelationshipRecords records = relationshipsData.new ContentletRelationshipRecords(relationship, hasParent); records.setRecords(relEntry.getValue()); relationshipsRecords.add(records); } return relationshipsData; }
Source:
<code>@Test public void testDropFunction() throws Exception { try (Connection c = connect(); Statement s = c.createStatement()) { boolean b = s.execute("create schema s"); assertThat(b, is(false)); boolean f = s.execute("drop function if exists t"); assertThat(f, is(false)); try { boolean f2 = s.execute("drop function t"); assertThat(f2, is(false)); } catch (SQLException e) { assertThat(e.getMessage(), containsString("Error while executing SQL \"drop function t\":" + <START> " At line 1, column 15: Type 'T' not found")); <END> } } }</code><technical_language>throw exception message "XXX support" instead "XXX found"</technical_language>

Target:
@Test public void testDropFunction() throws Exception { try (Connection c = connect(); Statement s = c.createStatement()) { boolean b = s.execute("create schema s"); assertThat(b, is(false)); boolean f = s.execute("drop function if exists t"); assertThat(f, is(false)); try { boolean f2 = s.execute("drop function t"); assertThat(f2, is(false)); } catch (SQLException e) { assertThat(e.getMessage(), containsString("Error while executing SQL \"drop function t\":" + " At line 1, column 15: Function 'T' not found")); } CalciteConnection calciteConnection = (CalciteConnection) c; calciteConnection.getRootSchema().add("T", new Function() { @Override public List<FunctionParameter> getParameters() { return new ArrayList<>(); } }); boolean f3 = s.execute("drop function t"); assertThat(f3, is(false)); calciteConnection.getRootSchema().add("t", new Function() { @Override public List<FunctionParameter> getParameters() { return new ArrayList<>(); } }); try { boolean f4 = s.execute("drop function t"); assertThat(f4, is(false)); } catch (SQLException e) { assertThat(e.getMessage(), containsString("Error while executing SQL \"drop function t\":" + " At line 1, column 15: Function 'T' not found")); } } }
Source:
<code>public void testXidReturnedOnlyOnce() throws Throwable { DummyTransaction dummyTransaction1 = beginAndSuspendTx(this.cache(3)); prepareTransaction(dummyTransaction1); manager(3).stop(); TestingUtil.blockUntilViewsReceived(60000, false, cache(0), cache(1), cache(2)); TestingUtil.waitForRehashToComplete(cache(0), cache(1), cache(2)); DummyTransaction dummyTransaction = beginAndSuspendTx(this.cache(0)); Xid[] recover = dummyTransaction.firstEnlistedResource().recover(XAResource.TMSTARTRSCAN | XAResource.TMENDRSCAN); assertEquals(recover.length,1); <START> assertEquals(recover[0], dummyTransaction1.getXid()); <END> }</code><technical_language>curious... is use? junit.framework.Assert.assertEquals org.testng.Assert.assertEquals</technical_language>

Target:
public void testXidReturnedOnlyOnce() throws Throwable { DummyTransaction dummyTransaction1 = beginAndSuspendTx(this.cache(3)); prepareTransaction(dummyTransaction1); manager(3).stop(); TestingUtil.blockUntilViewsReceived(60000, false, cache(0), cache(1), cache(2)); TestingUtil.waitForRehashToComplete(cache(0), cache(1), cache(2)); DummyTransaction dummyTransaction = beginAndSuspendTx(this.cache(0)); Xid[] recover = dummyTransaction.firstEnlistedResource().recover(XAResource.TMSTARTRSCAN | XAResource.TMENDRSCAN); assertEquals(recover.length,1); assertEquals(dummyTransaction1.getXid(), recover[0]); }
Source:
<code><START> public Point(final Float xCoordinate, final Float yCoordinate) { this.xCoordinate = xCoordinate; this.yCoordinate = yCoordinate; <END> }</code><technical_language>of values is null null</technical_language>

Target:
public Point(final Float xCoordinate, final Float yCoordinate) { if (xCoordinate != null && yCoordinate != null) { this.xCoordinate = xCoordinate; this.yCoordinate = yCoordinate; } else { this.xCoordinate = null; this.yCoordinate = null; } }
Source:
<code>public void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { <START> request = performGZIPRequest(request); <END> if (isGZIPSupported(request) && isGZIPEnabled()) { log.debug("GZIP supported and enabled, compressing response"); GZIPResponseWrapper wrappedResponse = new GZIPResponseWrapper(response); chain.doFilter(request, wrappedResponse); wrappedResponse.finishResponse(); return; } chain.doFilter(request, response); }</code><technical_language>catch exception catch(APIException e) { response.sendError(HttpServletResponse.SC_UNSUPPORTED_MEDIA_TYPE); return; }</technical_language>

Target:
public void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { try { request = performGZIPRequest(request); } catch (APIException e) { response.sendError(HttpServletResponse.SC_UNSUPPORTED_MEDIA_TYPE); return; } if (isGZIPSupported(request) && isGZIPEnabled()) { log.debug("GZIP supported and enabled, compressing response"); GZIPResponseWrapper wrappedResponse = new GZIPResponseWrapper(response); chain.doFilter(request, wrappedResponse); wrappedResponse.finishResponse(); return; } chain.doFilter(request, response); }
Source:
<code>public void runBeforeEachTest() { PersonName name = new PersonName("Joe", "J", "Doe"); name.setDateCreated(new Date()); Person person = new Person(); person.setDateCreated(new Date()); person.setPersonDateCreated(person.getDateCreated()); person.setGender("M"); userJoe = new User(); userJoe.setSystemId("100-30"); userJoe.setPerson(person); userJoe.addName(name); userJoe.setUsername("juser"); userJoe.setDateCreated(new Date()); <START> userJoe.setActivationKey("XbklsieiskeuztecEnPf:1529341342"); <END> userJoe.setEmail("userJoe@gmail.com"); if (dao == null) { dao = (UserDAO) applicationContext.getBean("userDAO"); } dao.saveUser(userJoe, null); }</code><technical_language>is point of 2 changes</technical_language>

Target:
public void runBeforeEachTest() { PersonName name = new PersonName("Joe", "J", "Doe"); name.setDateCreated(new Date()); Person person = new Person(); person.setDateCreated(new Date()); person.setPersonDateCreated(person.getDateCreated()); person.setGender("M"); userJoe = new User(); userJoe.setSystemId("100-30"); userJoe.setPerson(person); userJoe.addName(name); userJoe.setUsername("juser"); userJoe.setDateCreated(new Date()); if (dao == null) { dao = (UserDAO) applicationContext.getBean("userDAO"); } dao.saveUser(userJoe, null); }
Source:
<code>public IUser findUserByProviderUserId(String userId, String provider){ IUser user = null; QuadrigaUserDTO userDTO = dbConnect.findUserByProviderUserId(userId, provider); if (userDTO != null) { user = mapUser(userDTO); } if (user != null) { List<IQuadrigaRole> userRole = user.getQuadrigaRoles(); List<IQuadrigaRole> rolesList = new ArrayList<IQuadrigaRole>(); for (int i = 0; i < userRole.size(); i++) { IQuadrigaRole quadrigaRole = roleManager.getQuadrigaRoleByDbId(IQuadrigaRoleManager.MAIN_ROLES, userRole.get(i) .getDBid()); if (quadrigaRole.getId().equals( RoleNames.ROLE_QUADRIGA_DEACTIVATED)) { rolesList.clear(); rolesList.add(quadrigaRole); break; } rolesList.add(quadrigaRole); } <START> user.setQuadrigaRoles(rolesList); <END> } return user; }</code><technical_language>this code in method above, reduce duplicate code</technical_language>

Target:
public IUser findUserByProviderUserId(String userId, String provider) { QuadrigaUserDTO userDTO = dbConnect.findUserByProviderUserId(userId, provider); return constructUserWithRoles(userDTO); }
Source:
<code>private FileItem <START> checkFileItem(FileItem <END> item, FileItem prevValue, String fieldName) { if (prevValue == null) { if (fieldName.equals(item.getFieldName())) { return item; } return null; } else { return prevValue; } }</code><technical_language>a imbricated if's (minor enough, feel free ignore): private FileItem checkFileItem(FileItem item, FileItem prevValue, String fieldName) { if (prevValue != null) return prevValue; if (fieldName.equals(item.getFieldName())) { return item; } return null; }</technical_language>

Target:
private FileItem checkFileItem(FileItem item, FileItem prevValue, String fieldName) { if (prevValue != null) { return prevValue; } if (fieldName.equals(item.getFieldName())) { return item; } return null; }
Source:
<code>public Response addFromVmSnapshot(Template template) { validateIconParameters(template); validateSnapshotExistence(template.getVm()); Guid snapshotId = getSnapshotId(template.getVm().getSnapshots()); org.ovirt.engine.core.common.businessentities.VM vmConfiguration = getVmConfiguration(snapshotId); Guid clusterId = null; if (namedCluster(template)) { <START> clusterId = getClusterId(template); <END> } if (template.getVersion() != null) { validateParameters(template.getVersion(), "baseTemplate"); } VmStatic originalVm = vmConfiguration.getStaticData(); VmStatic staticVm = getMapper(Template.class, VmStatic.class).map(template, originalVm); if (namedCluster(template)) { staticVm.setClusterId(clusterId); } AddVmTemplateFromSnapshotParameters params = new AddVmTemplateFromSnapshotParameters( staticVm, template.getName(), template.getDescription(), snapshotId); return addTemplate(template, originalVm, vmConfiguration.getDiskMap().keySet(), params, ActionType.AddVmTemplateFromSnapshot); }</code><technical_language>simplified moving line 130</technical_language>

Target:
public Response addFromVmSnapshot(Template template) { validateIconParameters(template); validateSnapshotExistence(template.getVm()); Guid snapshotId = getSnapshotId(template.getVm().getSnapshots()); org.ovirt.engine.core.common.businessentities.VM vmConfiguration = getVmConfiguration(snapshotId); if (template.getVersion() != null) { validateParameters(template.getVersion(), "baseTemplate"); } VmStatic originalVm = vmConfiguration.getStaticData(); VmStatic staticVm = getMapper(Template.class, VmStatic.class).map(template, originalVm); if (namedCluster(template)) { Guid clusterId = getClusterId(template); staticVm.setClusterId(clusterId); } AddVmTemplateFromSnapshotParameters params = new AddVmTemplateFromSnapshotParameters( staticVm, template.getName(), template.getDescription(), snapshotId); return addTemplate(template, originalVm, vmConfiguration.getDiskMap().keySet(), params, ActionType.AddVmTemplateFromSnapshot); }
Source:
<code>protected PlanNode visitPlan(PlanNode node, RewriteContext<Void> context) { <START> throw new UnsupportedOperationException("Plan node not yet supported: " + node.getClass().getName()); <END> }</code><technical_language>Symbol mapping supported for ..</technical_language>

Target:
protected PlanNode visitPlan(PlanNode node, RewriteContext<Void> context) { throw new UnsupportedOperationException("Symbol mapping not yet supported for: " + node.getClass().getName()); }