auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public InputStream getHistoryGet(String parent, String basename, String rev) { String fullpath; try { fullpath = new File(parent, basename).getCanonicalPath(); } catch (IOException exp) { LOGGER.log(Level.SEVERE, <START> "Failed to get canonical path: {0}", exp.getClass().toString()); <END> return null; } InputStream ret = getHistoryRev(fullpath, rev); if (ret == null) { String origpath; try { origpath = findOriginalName(fullpath, rev); } catch (IOException exp) { LOGGER.log(Level.SEVERE, "Failed to get original revision: {0}", exp.getClass().toString()); return null; } if (origpath != null) { ret = getHistoryRev(origpath, rev); } } return ret; }</code><technical_language>is parent + basename part of exception string</technical_language>

Target:
public InputStream getHistoryGet(String parent, String basename, String rev) { String fullpath; try { fullpath = new File(parent, basename).getCanonicalPath(); } catch (IOException exp) { LOGGER.log(Level.SEVERE, exp, new Supplier<String>() { @Override public String get() { return String.format("Failed to get canonical path: %s/%s", parent, basename); } }); return null; } InputStream ret = getHistoryRev(fullpath, rev); if (ret == null) { String origpath; try { origpath = findOriginalName(fullpath, rev); } catch (IOException exp) { LOGGER.log(Level.SEVERE, exp, new Supplier<String>() { @Override public String get() { return String.format("Failed to get original revision: %s/%s (revision %s)", parent, basename, rev); } }); return null; } if (origpath != null) { ret = getHistoryRev(origpath, rev); } } return ret; }
Source:
<code>public static Set<String> findCaches(Properties properties) { Set<String> caches = new HashSet<>(); caches.add(properties.getProperty(ENTITY_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); caches.add(properties.getProperty(IMMUTABLE_ENTITY_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); caches.add(properties.getProperty(COLLECTION_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); <START> caches.add(properties.getProperty(COLLECTION_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); <END> caches.add(properties.getProperty(NATURAL_ID_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); if (properties.containsKey(PENDING_PUTS_CACHE_RESOURCE_PROP)) { caches.add(properties.getProperty(PENDING_PUTS_CACHE_RESOURCE_PROP)); } if (Boolean.parseBoolean(properties.getProperty(AvailableSettings.USE_QUERY_CACHE))) { caches.add(properties.getProperty(QUERY_CACHE_RESOURCE_PROP, DEF_QUERY_RESOURCE)); caches.add(properties.getProperty(TIMESTAMPS_CACHE_RESOURCE_PROP, DEF_QUERY_RESOURCE)); } int length = INFINISPAN_CONFIG_RESOURCE_PROP.length(); String customRegionPrefix = INFINISPAN_CONFIG_RESOURCE_PROP.substring(0, length - 3) + properties.getProperty(AvailableSettings.CACHE_REGION_PREFIX, ""); String customRegionSuffix = INFINISPAN_CONFIG_RESOURCE_PROP.substring(length - 4, length); for (String propertyName : properties.stringPropertyNames()) { if (propertyName.startsWith(customRegionPrefix) && propertyName.endsWith(customRegionSuffix)) { caches.add(properties.getProperty(propertyName)); } } return caches; }</code><technical_language>Please remove of duplicate calls caches.add(properties.getProperty(COLLECTION_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE))</technical_language>

Target:
public static Set<String> findCaches(Properties properties) { Set<String> caches = new HashSet<>(); caches.add(properties.getProperty(ENTITY_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); caches.add(properties.getProperty(IMMUTABLE_ENTITY_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); caches.add(properties.getProperty(COLLECTION_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); caches.add(properties.getProperty(NATURAL_ID_CACHE_RESOURCE_PROP, DEF_ENTITY_RESOURCE)); if (properties.containsKey(PENDING_PUTS_CACHE_RESOURCE_PROP)) { caches.add(properties.getProperty(PENDING_PUTS_CACHE_RESOURCE_PROP)); } if (Boolean.parseBoolean(properties.getProperty(AvailableSettings.USE_QUERY_CACHE))) { caches.add(properties.getProperty(QUERY_CACHE_RESOURCE_PROP, DEF_QUERY_RESOURCE)); caches.add(properties.getProperty(TIMESTAMPS_CACHE_RESOURCE_PROP, DEF_QUERY_RESOURCE)); } int length = INFINISPAN_CONFIG_RESOURCE_PROP.length(); String customRegionPrefix = INFINISPAN_CONFIG_RESOURCE_PROP.substring(0, length - 3) + properties.getProperty(AvailableSettings.CACHE_REGION_PREFIX, ""); String customRegionSuffix = INFINISPAN_CONFIG_RESOURCE_PROP.substring(length - 4, length); for (String propertyName : properties.stringPropertyNames()) { if (propertyName.startsWith(customRegionPrefix) && propertyName.endsWith(customRegionSuffix)) { caches.add(properties.getProperty(propertyName)); } } return caches; }
Source:
<code>protected Pair<Boolean, VmJob> isMergeRunning() { VDSReturnValue vmStats = runVdsCommand( VDSCommandType.GetVmStats, new GetVmStatsVDSCommandParameters(getVdsDao().get(getParameters().getVdsId()), getParameters().getVmId())); VmJob vmJob = null; Pair<Boolean, VmJob> result = new Pair<>(false, vmJob); if (vmStats.getSucceeded()) { VmInternalData vmInternalData = (VmInternalData) vmStats.getReturnValue(); List<VmJob> vmJobs = vmInternalData.getVmStatistics().getVmJobs(); <START> vmJob = <END> vmJobs.stream(). filter(job -> job.getJobType() == VmJobType.BLOCK). map(job -> (VmBlockJob) job). filter(job -> job.getBlockJobType() == VmBlockJobType.COMMIT). filter(job -> job.getImageGroupId().equals(getParameters().getImageGroupId())). findFirst(). orElse(null); if (vmJob != null) { result.setFirst(true); } } return result; }</code><technical_language>result.setSecond called for this new vmJob object? (I if set result = vmJobs.stream().<...>.findFirst().map(<new pair job>).orElse(<new pair job>) avoid "if (vmJob != null)..." code.) Also, if this is enforced style I . starting continuation lines prior ones</technical_language>

Target:
protected Pair<Boolean, VmBlockJob> isMergeRunning() { VDSReturnValue vmStats = runVdsCommand( VDSCommandType.GetVmStats, new GetVmStatsVDSCommandParameters(getVdsDao().get(getParameters().getVdsId()), getParameters().getVmId())); if (vmStats.getSucceeded()) { VmInternalData vmInternalData = (VmInternalData) vmStats.getReturnValue(); List<VmJob> vmJobs = vmInternalData.getVmStatistics().getVmJobs(); return vmJobs.stream(). filter(job -> job.getJobType() == VmJobType.BLOCK). map(job -> (VmBlockJob) job). filter(job -> job.getBlockJobType() == VmBlockJobType.COMMIT). filter(job -> job.getImageGroupId().equals(getParameters().getImageGroupId())). findFirst(). map(job -> new Pair<>(true, job)). orElse(new Pair<>(false, null)); } return new Pair<>(false, null); }
Source:
<code>public void recordHealthCheck(@NotNull final String executorId, @NotNull final HealthCheckDetails details) { if (LOGGER.isDebugEnabled()) LOGGER.debug("> recordHealthCheck(executorId : {}, details : {})", executorId, protoToString(details)); if (!details.getHealthy()) { final Optional<CassandraNode> nodeOpt = headOption( from(clusterState.nodes()) .filter(cassandraNodeExecutorIdEq(executorId)) ); if (nodeOpt.isPresent()) { LOGGER.info( "health check result unhealthy for node: {}. Message: '{}'", <START> nodeOpt.get().hasCassandraNodeExecutor() ? nodeOpt.get().getCassandraNodeExecutor().getExecutorId() : "??", <END> details.getMsg() ); } } healthCheckHistory.record( HealthCheckHistoryEntry.newBuilder() .setExecutorId(executorId) .setTimestamp(clock.now().getMillis()) .setDetails(details) .build() ); if (LOGGER.isDebugEnabled()) { LOGGER.debug("< recordHealthCheck(executorId : {}, details : {})", executorId, protoToString(details)); } }</code><technical_language>A fallback nodeOpt.get().getHostname() instead of "??"</technical_language>

Target:
public void recordHealthCheck(@NotNull final String executorId, @NotNull final HealthCheckDetails details) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("> recordHealthCheck(executorId : {}, details : {})", executorId, protoToString(details)); } if (!details.getHealthy()) { final Optional<CassandraNode> nodeOpt = headOption( from(clusterState.nodes()) .filter(cassandraNodeExecutorIdEq(executorId)) ); if (nodeOpt.isPresent()) { LOGGER.info( "health check result unhealthy for node: {}. Message: '{}'", nodeOpt.get().hasCassandraNodeExecutor() ? nodeOpt.get().getCassandraNodeExecutor().getExecutorId() : nodeOpt.get().getHostname(), details.getMsg() ); } } healthCheckHistory.record(executorId, clock.now().getMillis(), details); if (LOGGER.isDebugEnabled()) { LOGGER.debug("< recordHealthCheck(executorId : {}, details : {})", executorId, protoToString(details)); } }
Source:
<code>protected void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); Button manageButton = createButton(parent, IDialogConstants.CLIENT_ID + 1, Messages.TraceControl_ManageButtonText, false); manageButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(parent.getShell(), ControlRemoteProfilesPreferencePage.ID, new String[] { ControlRemoteProfilesPreferencePage.ID }, null); dialog.open(); if (fLocalComposite != null) { <START> fFolderViewer.setInput(LTTngProfileViewer.getViewerInput()); <END> } } }); Button button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false); button.setEnabled(false); }</code><technical_language>Needs call enableLocalButtons() after</technical_language>

Target:
protected void createButtonsForButtonBar(final Composite parent) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); Button manageButton = createButton(parent, IDialogConstants.CLIENT_ID + 1, Messages.TraceControl_ManageButtonText, false); manageButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(parent.getShell(), ControlRemoteProfilesPreferencePage.ID, new String[] { ControlRemoteProfilesPreferencePage.ID }, null); dialog.open(); if (fLocalComposite != null) { fFolderViewer.setInput(LTTngProfileViewer.getViewerInput()); enableLocalButtons(); } } }); Button button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false); button.setEnabled(false); }
Source:
<code>public void execute() throws MojoExecutionException, MojoFailureException { if (!TARGET_DEFINITION_PACKAGING.equals(project.getPackaging())) { throw new MojoExecutionException("This goal can only be executed on projects with packaging type '" <START> + TARGET_DEFINITION_PACKAGING + "'"); <END> } File targetFile = new File(project.getBasedir(), project.getArtifactId() + FILE_EXTENSION); if (!targetFile.isFile()) { throw new MojoExecutionException("Expected target definition file '" + targetFile.getAbsolutePath() + "' could not be found."); } project.getArtifact().setFile(targetFile); }</code><technical_language>is this check needed for? omit allow others create a packaging type "my-eclipse-target-definition" for example includes additional steps in default lifecycle</technical_language>

Target:
public void execute() throws MojoExecutionException, MojoFailureException { File targetFile = new File(project.getBasedir(), project.getArtifactId() + FILE_EXTENSION); if (!targetFile.isFile()) { throw new MojoExecutionException("Expected target definition file '" + targetFile.getAbsolutePath() + "' could not be found."); } project.getArtifact().setFile(targetFile); }
Source:
<code>public void charge(final String details, final Dollars amount) { <START> new XemblyLine( <END> this.directives.xset(String.format(". + %d", amount.points())) ).log(); this.wallet.charge(details, amount); }</code><technical_language>I log **after** charge. if this.wallet.charge() throw exception? report a successful charging</technical_language>

Target:
public void charge(final String details, final Dollars amount) { this.wallet.charge(details, amount); new XemblyLine( new Directives() .xpath("/snapshot") .addIf("cost") .xset(String.format(". + %d", amount.points())) ).log(); }
Source:
<code>public boolean checkout() throws IOException { toBeDeleted.clear(); if (headCommitTree != null) preScanTwoTrees(); else prescanOneTree(); if (!conflicts.isEmpty()) { if (failOnConflict) { dc.unlock(); throw new CheckoutConflictException(conflicts.toArray(new String[conflicts.size()])); } else cleanUpConflicts(); } builder.finish(); File file=null; String last = ""; <START> for (int i = removed.size(); i > 0; i--) { <END> String r = removed.get(i - 1); file = new File(repo.getWorkTree(), r); if (!file.delete()) { if (file.exists()) toBeDeleted.add(r); } else { if (!isSamePrefix(r, last)) removeEmptyParents(file); last = r; } } if (file != null) removeEmptyParents(file); for (String path : updated.keySet()) { file = new File(repo.getWorkTree(), path); file.getParentFile().mkdirs(); file.createNewFile(); DirCacheEntry entry = dc.getEntry(path); checkoutEntry(repo, file, entry, config_filemode()); } if (!builder.commit()) { dc.unlock(); throw new IndexWriteException(); } return toBeDeleted.size() == 0; }</code><technical_language>classic write this loop is: for (int i = removed.size() - 1; i >= 0; i--) { String r = removed.get(i); save a subtraction operation iteration. form is C programmers (because want save subtraction), people reading a loop expect see. This form I before, a while process loop condition conclude correct. :-(</technical_language>

Target:
public boolean checkout() throws IOException { toBeDeleted.clear(); if (headCommitTree != null) preScanTwoTrees(); else prescanOneTree(); if (!conflicts.isEmpty()) { if (failOnConflict) { dc.unlock(); throw new CheckoutConflictException(conflicts.toArray(new String[conflicts.size()])); } else cleanUpConflicts(); } builder.finish(); File file=null; String last = ""; for (int i = removed.size() - 1; i >= 0; i--) { String r = removed.get(i); file = new File(repo.getWorkTree(), r); if (!file.delete() && file.exists()) toBeDeleted.add(r); else { if (!isSamePrefix(r, last)) removeEmptyParents(file); last = r; } } if (file != null) removeEmptyParents(file); for (String path : updated.keySet()) { file = new File(repo.getWorkTree(), path); file.getParentFile().mkdirs(); file.createNewFile(); DirCacheEntry entry = dc.getEntry(path); checkoutEntry(repo, file, entry, config_filemode()); } if (!builder.commit()) { dc.unlock(); throw new IndexWriteException(); } return toBeDeleted.size() == 0; }
Source:
<code><START> public static String toCallString(final int copyNumberState) { <END> return String.valueOf(copyNumberState); }</code><technical_language>This toAlleleString private</technical_language>

Target:
private static String toCallString(final int copyNumberState) { return String.valueOf(copyNumberState); }
Source:
<code>private synchronized void completePendingPullRequest(final int requestId, final K key, final V value, final long elapsedTimeInServer, final int numReceivedBytes) { if (isPullRequestStillPending(key, requestId)) { final PullRequest pullRequest = pendingPullRequests.remove(key); <START> final boolean wasItWaiting = pullRequest.completePendingOps(value, elapsedTimeInServer, numReceivedBytes); <END> if (wasItWaiting || pendingPullRequests.size() == maxPendingPullsPerThread - 1) { this.notify(); } } else { LOG.log(Level.INFO, "Could not find corresponding pullRequest for key: {0}, requestIdCounter: {1}", new Object[]{key, requestId}); } }</code><technical_language>waitingPushExists instead of wasItWaiting</technical_language>

Target:
private synchronized void completePendingPullRequest(final int requestId, final K key, final V value, final long elapsedTimeInServer, final int numReceivedBytes) { if (isPullRequestStillPending(key, requestId)) { final PullRequest pullRequest = pendingPullRequests.remove(key); final boolean waitingPushExists = pullRequest.completePendingOps(value, elapsedTimeInServer, numReceivedBytes); if (waitingPushExists || pendingPullRequests.size() == maxPendingPullsPerThread - 1) { this.notify(); } } else { LOG.log(Level.INFO, "Could not find corresponding pullRequest for key: {0}, requestId: {1}", new Object[]{key, requestId}); } }
Source:
<code>private Map<String, Float> executeDescriptionSearch(BranchContext context, TermFilter termFilter) { final SnomedDescriptionSearchRequestBuilder requestBuilder = SnomedRequests.prepareSearchDescription() .all() .filterByActive(true) .filterByTerm(termFilter) .setFields(SnomedDescriptionIndexEntry.Fields.ID, SnomedDescriptionIndexEntry.Fields.CONCEPT_ID) .sortBy(SCORE); if (containsKey(SnomedDescriptionSearchRequest.OptionKey.LANGUAGE_REFSET)) { requestBuilder.filterByLanguageRefSets(getCollection(SnomedDescriptionSearchRequest.OptionKey.LANGUAGE_REFSET, String.class)); } applyIdFilter(requestBuilder, (rb, ids) -> rb.filterByConceptId(ids)); if (containsKey(OptionKey.DESCRIPTION_TYPE)) { final String type = getString(OptionKey.DESCRIPTION_TYPE); requestBuilder.filterByType(type); } if (containsKey(OptionKey.DESCRIPTION_SEMANTIC_TAG)) { final Collection<String> semanticTags = getCollection(OptionKey.DESCRIPTION_SEMANTIC_TAG, String.class); requestBuilder.filterBySemanticTags(semanticTags); } <START> if (containsKey(OptionKey.PARSED_TERM)) { <END> requestBuilder.withParsedTerm(); } final Collection<SnomedDescription> items = requestBuilder .build() .execute(context) .getItems(); final Map<String, Float> conceptMap = newHashMap(); for (SnomedDescription description : items) { if (!conceptMap.containsKey(description.getConceptId())) { conceptMap.put(description.getConceptId(), description.getScore()); } } return conceptMap; }</code><technical_language>parsedTerm is another specific TermFilter type, please add implementation</technical_language>

Target:
private Map<String, Float> executeDescriptionSearch(BranchContext context, TermFilter termFilter) { final SnomedDescriptionSearchRequestBuilder requestBuilder = SnomedRequests.prepareSearchDescription() .all() .filterByActive(true) .filterByTerm(termFilter) .setFields(SnomedDescriptionIndexEntry.Fields.ID, SnomedDescriptionIndexEntry.Fields.CONCEPT_ID) .sortBy(SCORE); if (containsKey(SnomedDescriptionSearchRequest.OptionKey.LANGUAGE_REFSET)) { requestBuilder.filterByLanguageRefSets(getCollection(SnomedDescriptionSearchRequest.OptionKey.LANGUAGE_REFSET, String.class)); } applyIdFilter(requestBuilder, (rb, ids) -> rb.filterByConceptId(ids)); if (containsKey(OptionKey.DESCRIPTION_TYPE)) { final String type = getString(OptionKey.DESCRIPTION_TYPE); requestBuilder.filterByType(type); } if (containsKey(OptionKey.DESCRIPTION_SEMANTIC_TAG)) { final Collection<String> semanticTags = getCollection(OptionKey.DESCRIPTION_SEMANTIC_TAG, String.class); requestBuilder.filterBySemanticTags(semanticTags); } final Collection<SnomedDescription> items = requestBuilder .build() .execute(context) .getItems(); final Map<String, Float> conceptMap = newHashMap(); for (SnomedDescription description : items) { if (!conceptMap.containsKey(description.getConceptId())) { conceptMap.put(description.getConceptId(), description.getScore()); } } return conceptMap; }
Source:
<code><START> public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((actionType == null) ? 0 : actionType.hashCode()); result = prime * result + ((correlationId == null) ? 0 : correlationId.hashCode()); result = prime * result + ((endTime == null) ? 0 : endTime.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + (isVisible ? 1231 : 1237); result = prime * result + ((jobSubjectEntities == null) ? 0 : jobSubjectEntities.hashCode()); result = prime * result + ((lastUpdateTime == null) ? 0 : lastUpdateTime.hashCode()); result = prime * result + ((ownerId == null) ? 0 : ownerId.hashCode()); result = prime * result + ((startTime == null) ? 0 : startTime.hashCode()); result = prime * result + ((status == null) ? 0 : status.hashCode()); result = prime * result + ((steps == null) ? 0 : steps.hashCode()); result = prime * result + (external ? 1231 : 1237); result = prime * result + (autoCleared ? 1231 : 1237); return result; } <END></code><technical_language>I code, IIUC agreed immutable business key in equas/hashCode implement java.util.Objects class. IMHO opportunity do this is JPA-ization of entity - meaning this patch. Pls Objects.hash method here</technical_language>

Target:
public int hashCode() { int result = Objects.hashCode(id); return result; }
Source:
<code>public Set<Locator> getLocators(RollupExecutionContext executionContext) { Set<Locator> locators = new HashSet<Locator>(); try { locators.addAll(IOContainer.fromConfig().getLocatorIO().getLocators(getShard())); <START> locatorsPerShard.update(locators.size()); <END> } catch (Throwable e) { executionContext.markUnsuccessful(e); log.error("Failed reading locators for slot: " + getParentSlot(), e); } return locators; }</code><technical_language>add log.error this catch statement too</technical_language>

Target:
public Set<Locator> getLocators(RollupExecutionContext executionContext) { Set<Locator> locators = new HashSet<Locator>(); try { locators.addAll(IOContainer.fromConfig().getLocatorIO().getLocators(getShard())); locatorsPerShard.update(locators.size()); } catch (Throwable e) { log.error("Failed reading locators for slot: " + getParentSlot(), e); executionContext.markUnsuccessful(e); } return locators; }
Source:
<code>public void shouldExplorePetStoreYamlWithExamples() throws NullPointerException, IOException, SwaggerException { String test = "/PetStoreYamlExamples/"; String defnName = "defn.yaml"; this.nano.addHandler( new DefnServerHandler(test, defnName, "PetStore_defn_with_examples.yaml")); Requestor requestor = new Requestor(HttpSender.MANUAL_REQUEST_INITIATOR); HttpMessage defnMsg = this.getHttpMessage(test + defnName); SwaggerConverter converter = new SwaggerConverter( requestor.getResponseBody(defnMsg.getRequestHeader().getURI()), null); assertThat(converter.getErrorMessages(), is(empty())); final Map<String, String> accessedUrls = new HashMap<String, String>(); RequesterListener listener = new RequesterListener() { @Override public void handleMessage(HttpMessage message, int initiator) { accessedUrls.put( message.getRequestHeader().getMethod() + " " + message.getRequestHeader().getURI().toString(), message.getRequestBody().toString()); } }; requestor.addListener(listener); requestor.run(converter.getRequestModels()); <START> System.out.println(accessedUrls.keySet()); <END> assertTrue( "Should use OpenAPI Example Values in URL Path when crawling urls", accessedUrls.containsKey( "GET http://localhost:" + this.nano.getListeningPort() + "/PetStore/store/order/42424242")); assertTrue( "Should use OpenAPI Example Values in URL Query when crawling urls", accessedUrls.containsKey( "GET http://localhost:" + this.nano.getListeningPort() + "/PetStore/user/login?username=kermit&password=thefrog")); }</code><technical_language>Debug</technical_language>

Target:
public void shouldExplorePetStoreYamlWithExamples() throws NullPointerException, IOException, SwaggerException { String test = "/PetStoreYamlExamples/"; String defnName = "defn.yaml"; this.nano.addHandler( new DefnServerHandler(test, defnName, "PetStore_defn_with_examples.yaml")); Requestor requestor = new Requestor(HttpSender.MANUAL_REQUEST_INITIATOR); HttpMessage defnMsg = this.getHttpMessage(test + defnName); SwaggerConverter converter = new SwaggerConverter( requestor.getResponseBody(defnMsg.getRequestHeader().getURI()), null); assertThat(converter.getErrorMessages(), is(empty())); final Map<String, String> accessedUrls = new HashMap<String, String>(); RequesterListener listener = new RequesterListener() { @Override public void handleMessage(HttpMessage message, int initiator) { accessedUrls.put( message.getRequestHeader().getMethod() + " " + message.getRequestHeader().getURI().toString(), message.getRequestBody().toString()); } }; requestor.addListener(listener); requestor.run(converter.getRequestModels()); assertTrue( "Should use OpenAPI Example Values in URL Path when crawling urls", accessedUrls.containsKey( "GET http://localhost:" + this.nano.getListeningPort() + "/PetStore/store/order/42424242")); assertTrue( "Should use OpenAPI Example Values in URL Query when crawling urls", accessedUrls.containsKey( "GET http://localhost:" + this.nano.getListeningPort() + "/PetStore/user/login?username=kermit&password=thefrog")); }
Source:
<code>public Boolean getIgnorePrefix() { <START> return !Boolean.FALSE.equals(ignorePrefix); <END> }</code><technical_language>getIgnorePrefix, deprecated one, return ignorePrefix() delegating new one</technical_language>

Target:
public Boolean getIgnorePrefix() { return ignorePrefix(); }
Source:
<code>public Poller(Duration pollInterval, Function<PollResponse<T>, Mono<PollResponse<T>>> pollOperation, Supplier<Mono<R>> fetchResultOperation, Supplier<Mono<T>> activationOperation, Function<Poller<T, R>, Mono<T>> cancelOperation) { Objects.requireNonNull(pollInterval, "'pollInterval' cannot be null."); <START> Objects.requireNonNull(fetchResultOperation, "'fetchResultOperation' cannot be null."); <END> if (pollInterval.compareTo(Duration.ZERO) <= 0) { throw logger.logExceptionAsWarning(new IllegalArgumentException( "Negative or zero value for 'pollInterval' is not allowed.")); } this.pollInterval = pollInterval; this.fetchResultOperation = fetchResultOperation; 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 -> isComplete()) .share() .delaySubscription(onActivation); this.fluxDisposable = fluxHandle.subscribe(); this.autoPollingEnabled = true; this.cancelOperation = cancelOperation; }</code><technical_language>do expect in cases care a fetch operation</technical_language>

Target:
public Poller(Duration pollInterval, Function<PollResponse<T>, Mono<PollResponse<T>>> pollOperation, Supplier<Mono<R>> fetchResultOperation, Supplier<Mono<T>> activationOperation, Function<Poller<T, R>, Mono<T>> cancelOperation) { Objects.requireNonNull(pollInterval, "'pollInterval' cannot be null."); Objects.requireNonNull(fetchResultOperation, "'fetchResultOperation' 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.fetchResultOperation = fetchResultOperation; this.pollOperation = Objects.requireNonNull(pollOperation, "'pollOperation' cannot be null."); final Mono<T> onActivation = activationOperation == null ? Mono.empty() : activationOperation.get().doOnError(ex -> this.pollResponse = new PollResponse<>(FAILED, null)) .onErrorStop() .map(response -> { this.pollResponse = new PollResponse<>(OperationStatus.NOT_STARTED, response); return response; }); this.fluxHandle = asyncPollRequestWithDelay() .flux() .repeat() .takeUntil(pollResponse -> isComplete()) .share() .delaySubscription(onActivation); this.fluxDisposable = fluxHandle.subscribe(); this.autoPollingEnabled = true; this.cancelOperation = cancelOperation; }
Source:
<code>private String query(String request, Proxy proxy) throws QueryFailedException, HttpError { try { URL url = new URL(getUrlPrefix() + mHost + ":" + mPort + request); Log.d(Constants.TAG, "hkp keyserver query: " + url + " Proxy: " + proxy); OkHttpClient client = getClient(url, proxy); Response response = client.newCall(new Request.Builder().url(url).build()).execute(); String responseBody = response.body().string(); if (response.isSuccessful()) { return responseBody; } else { throw new HttpError(response.code(), responseBody); } } catch (IOException e) { <START> e.printStackTrace(); <END> throw new QueryFailedException("Keyserver '" + mHost + "' is unavailable. Check your Internet connection!" + proxy == null?"":" Using proxy " + proxy); } }</code><technical_language>Please Log.e exception parameter</technical_language>

Target:
private String query(String request, Proxy proxy) throws QueryFailedException, HttpError { try { URL url = new URL(getUrlPrefix() + mHost + ":" + mPort + request); Log.d(Constants.TAG, "hkp keyserver query: " + url + " Proxy: " + proxy); OkHttpClient client = getClient(url, proxy); Response response = client.newCall(new Request.Builder().url(url).build()).execute(); String responseBody = response.body().string(); if (response.isSuccessful()) { return responseBody; } else { throw new HttpError(response.code(), responseBody); } } catch (IOException e) { Log.e(Constants.TAG, "IOException at HkpKeyserver", e); throw new QueryFailedException("Keyserver '" + mHost + "' is unavailable. Check your Internet connection!" + proxy == null?"":" Using proxy " + proxy); } }
Source:
<code>private Map<String, FeedbackSessionResultsBundle> getFeedbackResultBundles( CourseRoster roster) throws EntityDoesNotExistException { Map<String, FeedbackSessionResultsBundle> feedbackResultBundles = new LinkedHashMap<String, FeedbackSessionResultsBundle>(); List<FeedbackSessionAttributes> fsList = logic .getFeedbackSessionsForCourse(courseId); Collections <START> .sort(fsList, FeedbackSessionAttributes.compareByEndTimeDesc); <END> for (FeedbackSessionAttributes fs : fsList) { if (!fs.isPublished()) continue; FeedbackSessionResultsBundle bundle = logic.getFeedbackSessionResultsForStudent( fs.feedbackSessionName, courseId, studentEmail, roster); if (bundle != null) { removeQuestionsAndResponsesWithoutFeedbackResponseComment(bundle); if (bundle.questions.size() != 0) { feedbackResultBundles.put(fs.feedbackSessionName, bundle); } } } return feedbackResultBundles; }</code><technical_language>next time, re-format codes. this impact code review</technical_language>

Target:
private Map<String, FeedbackSessionResultsBundle> getFeedbackResultBundles(CourseRoster roster) throws EntityDoesNotExistException { Map<String, FeedbackSessionResultsBundle> feedbackResultBundles = new LinkedHashMap<String, FeedbackSessionResultsBundle>(); List<FeedbackSessionAttributes> fsList = logic.getFeedbackSessionsForCourse(courseId); Collections.sort(fsList, SessionAttributes.DESCENDING_ORDER); for(FeedbackSessionAttributes fs : fsList){ if(!fs.isPublished()) continue; FeedbackSessionResultsBundle bundle = logic.getFeedbackSessionResultsForStudent(fs.feedbackSessionName, courseId, studentEmail, roster); if(bundle != null){ removeQuestionsAndResponsesWithoutFeedbackResponseComment(bundle); if(bundle.questions.size() != 0){ feedbackResultBundles.put(fs.feedbackSessionName, bundle); } } } return feedbackResultBundles; }
Source:
<code>public List<TableColumn<BibEntryTableViewModel, ?>> createColumns() { List<TableColumn<BibEntryTableViewModel, ?>> columns = new ArrayList<>(); preferences.getColumns().forEach(column -> { switch (column.getType()) { case GROUPS: columns.add(createGroupColumn(column)); break; case FILES: columns.add(createFilesColumn(column)); break; case LINKED_IDENTIFIER: columns.add(createIdentifierColumn(column)); break; case EXTRAFILE: <START> if (!column.getQualifier().equals("")) { <END> columns.add(createExtraFileColumn(column)); } break; case SPECIALFIELD: if (!column.getQualifier().equals("")) { Field field = FieldFactory.parseField(column.getQualifier()); if (field instanceof SpecialField) { columns.add(createSpecialFieldColumn(column)); } else { LOGGER.warn(Localization.lang("Special field type %0 is unknown. Using normal column type.", column.getQualifier())); columns.add(createFieldColumn(column)); } } break; default: case NORMALFIELD: if (!column.getQualifier().equals("")) { columns.add(createFieldColumn(column)); } break; } }); return columns; }</code><technical_language>please isEmpty is a bit clearer check is about</technical_language>

Target:
public List<TableColumn<BibEntryTableViewModel, ?>> createColumns() { List<TableColumn<BibEntryTableViewModel, ?>> columns = new ArrayList<>(); preferences.getColumns().forEach(column -> { switch (column.getType()) { case GROUPS: columns.add(createGroupColumn(column)); break; case FILES: columns.add(createFilesColumn(column)); break; case LINKED_IDENTIFIER: columns.add(createIdentifierColumn(column)); break; case EXTRAFILE: if (!column.getQualifier().isBlank()) { columns.add(createExtraFileColumn(column)); } break; case SPECIALFIELD: if (!column.getQualifier().isBlank()) { Field field = FieldFactory.parseField(column.getQualifier()); if (field instanceof SpecialField) { columns.add(createSpecialFieldColumn(column)); } else { LOGGER.warn(Localization.lang("Special field type %0 is unknown. Using normal column type.", column.getQualifier())); columns.add(createFieldColumn(column)); } } break; default: case NORMALFIELD: if (!column.getQualifier().isBlank()) { columns.add(createFieldColumn(column)); } break; } }); return columns; }
Source:
<code>public synchronized boolean isLastMQNotifLongAgo() { long delay = 18 * 3600; long threshold = sharedPreferences.getLong(getCurrentModeName() + LAST_MORNING_Q_TIMESTAMP, - delay) + delay; if (threshold < Calendar.getInstance().getTimeInMillis()) { Logger.d(TAG, "{} - Last MQ notif was yesterday", getCurrentModeName()); return true; } else { <START> Logger.d(TAG, "{} - Last MQ notif was recent, do not notify", getCurrentModeName()); <END> return false; } }</code><technical_language>logs Logger.v(). all, good go</technical_language>

Target:
public synchronized boolean isLastMQNotifLongAgo() { long delay = 18 * 3600; long threshold = sharedPreferences.getLong(getCurrentModeName() + LAST_MORNING_Q_TIMESTAMP, - delay) + delay; if (threshold < Calendar.getInstance().getTimeInMillis()) { Logger.v(TAG, "{} - Last MQ notif was yesterday", getCurrentModeName()); return true; } else { Logger.v(TAG, "{} - Last MQ notif was recent, do not notify", getCurrentModeName()); return false; } }
Source:
<code>private Class<?> getResponseType(MessageType messageType, Byte b) { Map<Byte, Class<?>> mapping = reverseResponseMappings.get(messageType); if (mapping == null) { <START> throw new AssertionError("WAT, no mapping for " + messageType); <END> } Class<?> responseType = mapping.get(b); if (responseType == null) { throw new AssertionError("WAT, no mapping for method " + b + " for messageType " + messageType); } return responseType; }</code><technical_language>f^&* legacy! ;) More seriously, this a "nicer message" user indeed... Now, guys go, remembered</technical_language>

Target:
private Class<?> getResponseType(MessageType messageType, Byte b) { Map<Byte, Class<?>> mapping = reverseResponseMappings.get(messageType); if (mapping == null) { throw new AssertionError("No mapping for " + messageType); } Class<?> responseType = mapping.get(b); if (responseType == null) { throw new AssertionError("No mapping for method " + b + " for messageType " + messageType); } return responseType; }
Source:
<code><START> public static void fillComposite(final Node root) { <END> Control[] parentChildren = fproperties.getChildren(); for(int i = 0; i < parentChildren.length; i++) { parentChildren[i].dispose(); } createAnotherTable = true; fillCompositeWithRoot(root); currentTable[0] = null; sc.setContent(fproperties); sc.setExpandHorizontal(true); sc.setExpandVertical(true); sc.setMinSize(fproperties.computeSize(SWT.DEFAULT, SWT.DEFAULT)); }</code><technical_language>public</technical_language>

Target:
private static void fillComposite(final Node root) { Control[] parentChildren = fproperties.getChildren(); for (int i = 0; i < parentChildren.length; i++) { parentChildren[i].dispose(); } createAnotherTable = true; fillCompositeWithRoot(root); currentTable[0] = null; sc.setContent(fproperties); sc.setExpandHorizontal(true); sc.setExpandVertical(true); sc.setMinSize(fproperties.computeSize(SWT.DEFAULT, SWT.DEFAULT)); }
Source:
<code>public BasicQueryInfo getBasicQueryInfo(Optional<BasicStageStats> rootStage) { QueryState state = queryState.get(); Duration elapsedTime; if (endNanos.get() != 0) { <START> elapsedTime = succinctNanos(endNanos.get() - createNanos); <END> } else { elapsedTime = nanosSince(createNanos); } ErrorCode errorCode = null; if (state == FAILED) { ExecutionFailureInfo failureCause = this.failureCause.get(); if (failureCause != null) { errorCode = failureCause.getErrorCode(); } } Duration queuedTime = this.queuedTime.get(); if (queuedTime == null) { queuedTime = elapsedTime; } Duration executionTime = succinctNanos((long) Math.max(0, elapsedTime.getValue(NANOSECONDS) - queuedTime.getValue(NANOSECONDS))); BasicStageStats stageStats = rootStage.orElse(EMPTY_STAGE_STATS); BasicQueryStats queryStats = new BasicQueryStats( createTime, executionStartTime.get(), queuedTime, elapsedTime.convertToMostSuccinctTimeUnit(), executionTime, stageStats.getTotalDrivers(), stageStats.getQueuedDrivers(), stageStats.getRunningDrivers(), stageStats.getCompletedDrivers(), stageStats.getRawInputDataSize(), stageStats.getRawInputPositions(), stageStats.getCumulativeUserMemory(), stageStats.getUserMemoryReservation(), stageStats.getTotalMemoryReservation(), succinctBytes(getPeakUserMemoryInBytes()), stageStats.getTotalCpuTime(), stageStats.getTotalScheduledTime(), stageStats.isFullyBlocked(), stageStats.getBlockedReasons(), stageStats.getProgressPercentage()); return new BasicQueryInfo( queryId, session.toSessionRepresentation(), resourceGroup, state, memoryPool.get().getId(), stageStats.isScheduled(), self, query, queryStats, errorCode == null ? null : errorCode.getType(), errorCode); }</code><technical_language>Typo in commit message: condiitons</technical_language>

Target:
public BasicQueryInfo getBasicQueryInfo(Optional<BasicStageStats> rootStage) { QueryState state = queryState.get(); ErrorCode errorCode = null; if (state == FAILED) { ExecutionFailureInfo failureCause = this.failureCause.get(); if (failureCause != null) { errorCode = failureCause.getErrorCode(); } } BasicStageStats stageStats = rootStage.orElse(EMPTY_STAGE_STATS); BasicQueryStats queryStats = new BasicQueryStats( queryStateTimer.getCreateTime(), getEndTime().orElse(null), queryStateTimer.getQueuedTime(), queryStateTimer.getElapsedTime(), queryStateTimer.getExecutionTime(), stageStats.getTotalDrivers(), stageStats.getQueuedDrivers(), stageStats.getRunningDrivers(), stageStats.getCompletedDrivers(), stageStats.getRawInputDataSize(), stageStats.getRawInputPositions(), stageStats.getCumulativeUserMemory(), stageStats.getUserMemoryReservation(), stageStats.getTotalMemoryReservation(), succinctBytes(getPeakUserMemoryInBytes()), stageStats.getTotalCpuTime(), stageStats.getTotalScheduledTime(), stageStats.isFullyBlocked(), stageStats.getBlockedReasons(), stageStats.getProgressPercentage()); return new BasicQueryInfo( queryId, session.toSessionRepresentation(), resourceGroup, state, memoryPool.get().getId(), stageStats.isScheduled(), self, query, queryStats, errorCode == null ? null : errorCode.getType(), errorCode); }
Source:
<code>private static IEditorDescriptor getEditorDescriptor(String name, IEditorRegistry editorReg, IEditorDescriptor defaultDescriptor, boolean allowInteractive) throws PartInitException, OperationCanceledException { if (defaultDescriptor != null) { return defaultDescriptor; } IUnknownEditorStrategy strategy = getUnknowEditorStrategy(allowInteractive); <START> if (strategy == null) { <END> strategy = new SystemEditorOrTextEditorStrategy(); } IEditorDescriptor editorDesc; try { editorDesc = strategy.getEditorDescriptor(name, editorReg); } catch (CoreException e) { throw new PartInitException(IDEWorkbenchMessages.IDE_noFileEditorFound, e); } if (editorDesc == null) { throw new PartInitException( IDEWorkbenchMessages.IDE_noFileEditorFound); } return editorDesc; }</code><technical_language>This check is needed, getUnknownEditorStrategy() returns null</technical_language>

Target:
private static IEditorDescriptor getEditorDescriptor(String name, IEditorRegistry editorReg, IEditorDescriptor defaultDescriptor, boolean allowInteractive) throws PartInitException, OperationCanceledException { if (defaultDescriptor != null) { return defaultDescriptor; } IUnknownEditorStrategy strategy = getUnknowEditorStrategy(allowInteractive); IEditorDescriptor editorDesc; try { editorDesc = strategy.getEditorDescriptor(name, editorReg); } catch (CoreException e) { throw new PartInitException(IDEWorkbenchMessages.IDE_noFileEditorFound, e); } if (editorDesc == null) { throw new PartInitException( IDEWorkbenchMessages.IDE_noFileEditorFound); } return editorDesc; }
Source:
<code>private static IResource getAdapter(IEditorReference ref) { IEditorInput input; try { input = ref.getEditorInput(); } catch (PartInitException e) { return null; } <START> if (input instanceof FileEditorInput) { FileEditorInput fi = (FileEditorInput) input; IFile file = fi.getFile(); if (file != null) { return file; } } <END> IFile adapter = Adapters.getAdapter(input, IFile.class, true); if (adapter != null) { return adapter; } return Adapters.getAdapter(input, IResource.class, true); }</code><technical_language>Lines 362-368 redundant FileEditorInput adapts IFile</technical_language>

Target:
private static IResource getAdapter(IEditorReference ref) { IEditorInput input; try { input = ref.getEditorInput(); } catch (PartInitException e) { return null; } IFile adapter = Adapters.getAdapter(input, IFile.class, true); if (adapter != null) { return adapter; } return Adapters.getAdapter(input, IResource.class, true); }
Source:
<code>public URL getRedirectURL(String queryString, String requestURI) { <START> if (!requestURI.startsWith("/")) { <END> throw new IAE("Expected requestURI starting with '/'"); } try { final String leader = taskMaster.getLeader(); if (leader == null || leader.isEmpty()) { return null; } else { return new URI("http", leader, requestURI, queryString, null).toURL(); } } catch (Exception e) { throw Throwables.propagate(e); } }</code><technical_language>is this necessary new URI(...)</technical_language>

Target:
public URL getRedirectURL(String queryString, String requestURI) { try { final String leader = taskMaster.getLeader(); if (leader == null || leader.isEmpty()) { return null; } else { return new URI("http", leader, requestURI, queryString, null).toURL(); } } catch (Exception e) { throw Throwables.propagate(e); } }
Source:
<code>public void process(final Exchange exchange) throws Exception { final Message in = exchange.getIn(); String uri = (String) in.getHeader(FCREPO_URI); String uuid = PIDs.get(uri).getUUID(); String objBasePath = idToPath(uuid, HASHED_PATH_DEPTH, HASHED_PATH_SIZE); <START> File imgFile = new File(Paths.get(dataDir,objBasePath, uuid).toString()); <END> if (imgFile.isFile()) { in.setHeader(CdrEditThumbnail, "true"); in.setHeader(CdrBinaryPath, imgFile.getAbsolutePath()); in.setHeader(CdrBinaryMimeType, "image/*"); } }</code><technical_language>Spaces commas</technical_language>

Target:
public void process(final Exchange exchange) throws Exception { final Message in = exchange.getIn(); String uri = (String) in.getHeader(FCREPO_URI); String uuid = PIDs.get(uri).getUUID(); String objBasePath = idToPath(uuid, HASHED_PATH_DEPTH, HASHED_PATH_SIZE); Path imgFile = Paths.get(sourceImagesDir, objBasePath, uuid); if (Files.isRegularFile(imgFile)) { in.setHeader(CdrBinaryPath, imgFile.toAbsolutePath().toString()); in.setHeader(CdrBinaryMimeType, "image/*"); } }
Source:
<code>public <START> @NonNull Image <END> getIcon() { String iconFile = getIconFile(); if (iconFile != null) { Bundle bundle = getBundle(); if (bundle != null) { Image icon = TmfProjectModelIcons.loadIcon(bundle, iconFile); if (icon != null) { return icon; } } } return TmfProjectModelIcons.DEFAULT_ANALYSIS_ICON; }</code><technical_language>Is this artifact intentional? in interface</technical_language>

Target:
public Image getIcon() { String iconFile = getIconFile(); if (iconFile != null) { Bundle bundle = getBundle(); if (bundle != null) { Image icon = TmfProjectModelIcons.loadIcon(bundle, iconFile); if (icon != null) { return icon; } } } return TmfProjectModelIcons.DEFAULT_ANALYSIS_ICON; }
Source:
<code>protected void executeCommand() { boolean isDomainUpdateRequired = doDomainsUseConnection(getConnection()); StoragePoolIsoMap map = null; boolean isUpdateSucceeded = true; boolean hasConnectStorageSucceeded = false; if (isDomainUpdateRequired) { hasConnectStorageSucceeded = connectToStorage(); VDSReturnValue returnValueUpdatedStorageDomain = null; if (!hasConnectStorageSucceeded) { setSucceeded(false); VdcFault f = new VdcFault(); f.setError(VdcBllErrors.StorageServerConnectionError); <START> getReturnValue().setFault(f); <END> return; } for (StorageDomain domain : domains) { map = getStoragePoolIsoMap(domain); changeStorageDomainStatusInTransaction(map, StorageDomainStatus.Locked); returnValueUpdatedStorageDomain = getStatsForDomain(domain); if (returnValueUpdatedStorageDomain.getSucceeded()) { final StorageDomain updatedStorageDomain = (StorageDomain) returnValueUpdatedStorageDomain.getReturnValue(); executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getStorageDomainDynamicDao().update(updatedStorageDomain.getStorageDynamicData()); return null; } }); } else { isUpdateSucceeded = false; break; } } } if(isUpdateSucceeded) { getStorageConnDao().update(getParameters().getStorageServerConnection()); } if (isDomainUpdateRequired) { for (StorageDomain domain : domains) { map = getStoragePoolIsoMap(domain); restoreStateAfterUpdate(map); } disconnectFromStorage(); } setSucceeded(isUpdateSucceeded); }</code><technical_language>need fail connection failed - this moved end, relevant updating domain stats</technical_language>

Target:
protected void executeCommand() { boolean isDomainUpdateRequired = doDomainsUseConnection(getConnection()); StoragePoolIsoMap map = null; List<StorageDomain> updatedDomains = new ArrayList<>(); boolean hasConnectStorageSucceeded = false; if (isDomainUpdateRequired) { hasConnectStorageSucceeded = connectToStorage(); VDSReturnValue returnValueUpdatedStorageDomain = null; if (hasConnectStorageSucceeded) { changeStorageDomainStatusInTransaction(StorageDomainStatus.Locked); for (StorageDomain domain : domains) { returnValueUpdatedStorageDomain = getStatsForDomain(domain); if (returnValueUpdatedStorageDomain.getSucceeded()) { StorageDomain updatedStorageDomain = (StorageDomain) returnValueUpdatedStorageDomain.getReturnValue(); updatedDomains.add(updatedStorageDomain); } } if(!updatedDomains.isEmpty()) { updateStorageDomain(updatedDomains); } } } getStorageConnDao().update(getParameters().getStorageServerConnection()); if (isDomainUpdateRequired) { for (StorageDomain domain : domains) { map = getStoragePoolIsoMap(domain); restoreStateAfterUpdate(map); } if (hasConnectStorageSucceeded) { disconnectFromStorage(); } } setSucceeded(true); }
Source:
<code>protected String[] createValidParamsForProfile() { return new String[] { Const.ParamsNames.STUDENT_SHORT_NAME, "short ", Const.ParamsNames.STUDENT_PROFILE_EMAIL, "e@email.com ", Const.ParamsNames.STUDENT_PROFILE_INSTITUTION, " TEAMMATES Test Institute 5 ", Const.ParamsNames.STUDENT_NATIONALITY, "American", <START> Const.ParamsNames.STUDENT_GENDER, "OTHER", <END> Const.ParamsNames.STUDENT_PROFILE_MOREINFO, " This is more info on me " }; }</code><technical_language>this check if trailing spaces, invalid values, etc</technical_language>

Target:
protected String[] createValidParamsForProfile() { return new String[] { Const.ParamsNames.STUDENT_SHORT_NAME, "short ", Const.ParamsNames.STUDENT_PROFILE_EMAIL, "e@email.com ", Const.ParamsNames.STUDENT_PROFILE_INSTITUTION, " TEAMMATES Test Institute 5 ", Const.ParamsNames.STUDENT_NATIONALITY, "American", Const.ParamsNames.STUDENT_GENDER, "MALE", Const.ParamsNames.STUDENT_PROFILE_MOREINFO, " This is more info on me " }; }
Source:
<code>public String getDeleteType() { <START> return "Curl Type"; <END> }</code><technical_language>"Tissue Piece Type" called</technical_language>

Target:
public String getDeleteType() { return "Tissue Piece Type"; }
Source:
<code>public void writeData(ObjectDataOutput out) throws IOException { IOUtil.writeObject(out, key); IOUtil.writeObject(out, value); out.writeLong(creationTime); out.writeLong(hits); out.writeLong(lastAccessTime); out.writeLong(lastUpdateTime); out.writeLong(ttl); <START> out.writeLong(maxIdle); <END> }</code><technical_language>RU compatibility</technical_language>

Target:
public void writeData(ObjectDataOutput out) throws IOException { IOUtil.writeObject(out, key); IOUtil.writeObject(out, value); out.writeLong(creationTime); out.writeLong(hits); out.writeLong(lastAccessTime); out.writeLong(lastUpdateTime); out.writeLong(ttl); if (out.getVersion().isGreaterOrEqual(V3_11)) { out.writeLong(maxIdle); } }