auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private boolean updateWeatherData() { WeatherUndergroundConfiguration config = getConfigAs(WeatherUndergroundConfiguration.class); WeatherUndergroundBridgeHandler handler = null; if (this.getBridge() != null) { <START> handler = (WeatherUndergroundBridgeHandler) this.getBridge().getHandler(); <END> } if (handler != null) { weatherData = handler.getWeatherData(USUAL_FEATURES, StringUtils.trimToEmpty(config.location), this.localeProvider, this.gson); if (weatherData != null) { updateStatus(ThingStatus.ONLINE); } else { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR); } } return weatherData != null; }</code><technical_language>potential NPE warning reported circumvented assigning bridge a locale variable (like for handler)</technical_language>

Target:
private boolean updateWeatherData() { WeatherUndergroundConfiguration config = getConfigAs(WeatherUndergroundConfiguration.class); WeatherUndergroundBridgeHandler handler = null; Bridge bridge = this.getBridge(); if (bridge != null) { handler = (WeatherUndergroundBridgeHandler) bridge.getHandler(); } if (handler != null) { weatherData = handler.getWeatherData(USUAL_FEATURES, StringUtils.trimToEmpty(config.location), this.localeProvider, this.gson); if (weatherData != null) { updateStatus(ThingStatus.ONLINE); } else { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR); } } return weatherData != null; }
Source:
<code>public int hashCode() { <START> return Objects.hashCode(projectUuid, ceTaskUuid, analysisUuid); <END> }</code><technical_language>depend Guava's Object class JDK provides replacement for it? (and more, change in place?)</technical_language>

Target:
public int hashCode() { return Objects.hash(projectUuid, ceTaskUuid, analysisUuid); }
Source:
<code>private boolean checkIfLeaderAlive() { String currJMV = currentJMVersion.get(); String blobJMV = blob.getJobModelVersion(); Iterable<ProcessorEntity> tableList = table.getEntitiesWithPartition(currJMV); ProcessorEntity leader = null, nextLeader = null; for (ProcessorEntity entity: tableList) { if (entity.getIsLeader()) { leader = entity; } } int currJMVInt = 0; if (!currJMV.equals(initialState)) { currJMVInt = Integer.valueOf(currJMV); } if (Integer.valueOf(blobJMV) > currJMVInt) { <START> LOG.info("Leader info 2 in LeaderLivenessCheckScheduker: {}", leader); <END> for (ProcessorEntity entity : table.getEntitiesWithPartition(blobJMV)) { if (entity.getIsLeader()) { nextLeader = entity; } } } if ((leader == null || (System.currentTimeMillis() - leader.getTimestamp().getTime() >= ( LIVENESS_DEBOUNCE_TIME_SEC * 1000))) && nextLeader == null) { return false; } return true; }</code><technical_language>nit: s/LeaderLivenessCheckScheduker/LeaderLivenessCheckScheduler/ Also, "Leader info 2" mean? a typo</technical_language>

Target:
private boolean checkIfLeaderAlive() { String currJMV = currentJMVersion.get(); String blobJMV = blob.getJobModelVersion(); Iterable<ProcessorEntity> tableList = table.getEntitiesWithPartition(currJMV); ProcessorEntity leader = null, nextLeader = null; for (ProcessorEntity entity: tableList) { if (entity.getIsLeader()) { leader = entity; break; } } int currJMVInt = 0; if (!currJMV.equals(initialState)) { currJMVInt = Integer.valueOf(currJMV); } if (Integer.valueOf(blobJMV) > currJMVInt) { for (ProcessorEntity entity : table.getEntitiesWithPartition(blobJMV)) { if (entity.getIsLeader()) { nextLeader = entity; break; } } } if ((leader == null || (System.currentTimeMillis() - leader.getTimestamp().getTime() >= ( LIVENESS_DEBOUNCE_TIME_SEC * 1000))) && nextLeader == null) { return false; } return true; }
Source:
<code>public synchronized int getType (Class<? extends AbstractRecord> c) { for (int i = 0; i < _map.size(); i++) { <START> RecordTypeMap typeMap = _map.get(i); <END> if (typeMap.getRecordClass() != null && typeMap.getRecordClass().equals(c)) return _map.get(i).getType(); } return RecordType.UNTYPED; }</code><technical_language>avoid call getRecordClass AbstractRecord rec = _map.get(i).getRecordClass() _map.get(i) return null in case need checking for too</technical_language>

Target:
public synchronized int getType (Class<? extends AbstractRecord> c) { for (int i = 0; i < _map.size(); i++) { Class<? extends AbstractRecord> recordClass = _map.get(i).getRecordClass(); if (recordClass != null && recordClass.equals(c)) return _map.get(i).getType(); } return RecordType.UNTYPED; }
Source:
<code>private void flushStripe(FlushReason flushReason) throws IOException { List<OrcDataOutput> outputData = new ArrayList<>(); long stripeStartOffset = orcDataSink.size(); if (closedStripes.isEmpty()) { outputData.add(createDataOutput(MAGIC)); stripeStartOffset += MAGIC.length(); } try { outputData.addAll(bufferStripeData(stripeStartOffset, flushReason)); if (flushReason == CLOSED) { outputData.addAll(bufferFileFooter()); } orcDataSink.write(outputData); } <START> catch (IOException e) { <END> throw e; } finally { columnWriters.forEach(ColumnWriter::reset); dictionaryCompressionOptimizer.reset(); rowGroupRowCount = 0; stripeRowCount = 0; bufferedBytes = toIntExact(columnWriters.stream().mapToLong(ColumnWriter::getBufferedBytes).sum()); } }</code><technical_language>This catch is redundant. it, code able throw e</technical_language>

Target:
private void flushStripe(FlushReason flushReason) throws IOException { List<OrcDataOutput> outputData = new ArrayList<>(); long stripeStartOffset = orcDataSink.size(); if (closedStripes.isEmpty()) { outputData.add(createDataOutput(MAGIC)); stripeStartOffset += MAGIC.length(); } try { outputData.addAll(bufferStripeData(stripeStartOffset, flushReason)); if (flushReason == CLOSED) { outputData.addAll(bufferFileFooter()); } orcDataSink.write(outputData); } finally { columnWriters.forEach(ColumnWriter::reset); dictionaryCompressionOptimizer.reset(); rowGroupRowCount = 0; stripeRowCount = 0; bufferedBytes = toIntExact(columnWriters.stream().mapToLong(ColumnWriter::getBufferedBytes).sum()); } }
Source:
<code>public Optional<Argument> build(Type type, Object value, ConfigRegistry config) { return JdbiOptionals.findFirstPresent( () -> tryArray(type, value, config), <START> () -> tryCollection(type, value, config) <END> ); }</code><technical_language>I improvement in this refactoring either. ends significantly longer. wrong original code</technical_language>

Target:
public Optional<Argument> build(Type type, Object value, ConfigRegistry config) { return IterableLike.elementTypeOf(type) .flatMap(config.get(SqlArrayTypes.class)::findFor) .map(arrayType -> arrayArgument(value, arrayType)); }
Source:
<code>private List<GLJournalEntry> executePostGLJournalEntries(ParamsMap params) throws MambuApiException { <START> ApiDefinition apiDefiinition = new ApiDefinition(APIData.GLJOURNALENTRIES, ContentType.WWW_FORM, Method.POST, <END> GLJournalEntry.class, ApiReturnFormat.COLLECTION); List<GLJournalEntry> glEntries = serviceExecutor.execute(apiDefiinition, params); return glEntries; }</code><technical_language>apiDefiinition - I this converted a stand-alone method, please correct variable name</technical_language>

Target:
private List<GLJournalEntry> executePostGLJournalEntries(ParamsMap params) throws MambuApiException { ApiDefinition apiDefinition = new ApiDefinition(APIData.GLJOURNALENTRIES, ContentType.WWW_FORM, Method.POST, GLJournalEntry.class, ApiReturnFormat.COLLECTION); List<GLJournalEntry> glEntries = serviceExecutor.execute(apiDefinition, params); return glEntries; }
Source:
<code>public CommandResult exec(ContextAwareCommandInvocation commandInvocation) { <START> if (help) { <END> commandInvocation.println(commandInvocation.getHelpInfo()); } return CommandResult.SUCCESS; }</code><technical_language>print time? command > server valid</technical_language>

Target:
public CommandResult exec(ContextAwareCommandInvocation commandInvocation) { commandInvocation.println(commandInvocation.getHelpInfo()); return CommandResult.SUCCESS; }
Source:
<code>public HelixManagerProperty getHelixManagerProperty(String zkAddress, String clusterName) { ConfigAccessor configAccessor = new ConfigAccessor(zkAddress); CloudConfig cloudConfig = configAccessor.getCloudConfig(clusterName); if (cloudConfig == null) { <START> CloudConfig.Builder builder = new CloudConfig.Builder(clusterName); <END> builder.setCloudEnabled(false); cloudConfig = builder.build(); } Properties properties = new Properties(); try { InputStream stream = Thread.currentThread().getContextClassLoader() .getResourceAsStream(HELIX_PARTICIPANT_PROPERTY_FILE); properties.load(stream); } catch (IOException e) { String errMsg = String.format("failed to open Helix participant properties file: %s", HELIX_PARTICIPANT_PROPERTY_FILE); LOG.error(errMsg); throw new IllegalArgumentException(errMsg, e); } LOG.info("HelixPropertyFactory successfully loaded helix participant properties: {}", properties); return new HelixManagerProperty(properties, cloudConfig); }</code><technical_language>nit, simpler adding a buildEmptyCloudConfig method returns a static cloudconfig instance configured cloudEnabled = false</technical_language>

Target:
public HelixManagerProperty getHelixManagerProperty(String zkAddress, String clusterName) { ConfigAccessor configAccessor = new ConfigAccessor(zkAddress); CloudConfig cloudConfig; try { cloudConfig = configAccessor.getCloudConfig(clusterName) == null ? buildEmptyCloudConfig(clusterName) : configAccessor.getCloudConfig(clusterName); } catch (HelixException e) { cloudConfig = buildEmptyCloudConfig(clusterName); } Properties properties = new Properties(); try { InputStream stream = Thread.currentThread().getContextClassLoader() .getResourceAsStream(HELIX_PARTICIPANT_PROPERTY_FILE); properties.load(stream); } catch (IOException e) { String errMsg = String.format("failed to open Helix participant properties file: %s", HELIX_PARTICIPANT_PROPERTY_FILE); throw new IllegalArgumentException(errMsg, e); } LOG.info("HelixPropertyFactory successfully loaded helix participant properties: {}", properties); return new HelixManagerProperty(properties, cloudConfig); }
Source:
<code>private void migrateLabelsToAllProjects(ReviewDb db, LegacyLabelTypes labelTypes) throws SQLException, RepositoryNotFoundException, IOException, ConfigInvalidException { Repository git = mgr.openRepository(allProjects); try { MetaDataUpdate md = new MetaDataUpdate(GitReferenceUpdated.DISABLED, allProjects, git); md.getCommitBuilder().setAuthor(serverUser); md.getCommitBuilder().setCommitter(serverUser); ProjectConfig config = ProjectConfig.read(md); Map<String, LabelType> configTypes = config.getLabelSections(); List<LabelType> newTypes = Lists.newArrayList(); for (LegacyLabelType type : labelTypes.getLegacyLabelTypes()) { <START> type.setId(null); <END> if (!configTypes.containsKey(type.getName())) { newTypes.add(type); } } newTypes.addAll(configTypes.values()); configTypes.clear(); for (LabelType type : newTypes) { configTypes.put(type.getName(), type); } md.setMessage("Upgrade to Gerrit Code Review schema 77\n"); config.commit(md); } finally { git.close(); } }</code><technical_language>This removed now</technical_language>

Target:
private void migrateLabelsToAllProjects(ReviewDb db, LegacyLabelTypes labelTypes) throws SQLException, RepositoryNotFoundException, IOException, ConfigInvalidException { Repository git = mgr.openRepository(allProjects); try { MetaDataUpdate md = new MetaDataUpdate(GitReferenceUpdated.DISABLED, allProjects, git); md.getCommitBuilder().setAuthor(serverUser); md.getCommitBuilder().setCommitter(serverUser); ProjectConfig config = ProjectConfig.read(md); Map<String, LabelType> configTypes = config.getLabelSections(); List<LabelType> newTypes = Lists.newArrayList(); for (LegacyLabelType type : labelTypes.getLegacyLabelTypes()) { if (!configTypes.containsKey(type.getName())) { newTypes.add(type); } } newTypes.addAll(configTypes.values()); configTypes.clear(); for (LabelType type : newTypes) { configTypes.put(type.getName(), type); } md.setMessage("Upgrade to Gerrit Code Review schema 77\n"); config.commit(md); } finally { git.close(); } }
Source:
<code>public ActionResult execute() { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); String feedbackSessionName = getNonNullRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME); Intent intent = Intent.valueOf(getNonNullRequestParamValue(Const.ParamsNames.INTENT)); List<FeedbackQuestionAttributes> questions; try { switch (intent) { case STUDENT_SUBMISSION: questions = logic.getFeedbackQuestionsForStudents(feedbackSessionName, courseId); break; case INSTRUCTOR_SUBMISSION: InstructorAttributes instructor = getInstructorOfCourseFromRequest(courseId); questions = logic.getFeedbackQuestionsForInstructors(feedbackSessionName, courseId, instructor.getEmail()); break; case FULL_DETAIL: questions = logic.getFeedbackQuestionsForSession(feedbackSessionName, courseId); break; default: throw new InvalidHttpParameterException("Unknown intent " + intent); } } catch (EntityDoesNotExistException e) { throw new EntityNotFoundException(e); } String moderatedPerson = getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_MODERATED_PERSON); if (!StringHelper.isEmpty(moderatedPerson)) { questions.removeIf(question -> !canInstructorSeeQuestion(question)); } FeedbackQuestions response = <START> new FeedbackQuestions(questions); <END> response.normalizeQuestionNumber(); return new JsonResult(response); }</code><technical_language>combine line</technical_language>

Target:
public ActionResult execute() { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); String feedbackSessionName = getNonNullRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME); Intent intent = Intent.valueOf(getNonNullRequestParamValue(Const.ParamsNames.INTENT)); List<FeedbackQuestionAttributes> questions; try { switch (intent) { case STUDENT_SUBMISSION: questions = logic.getFeedbackQuestionsForStudents(feedbackSessionName, courseId); break; case INSTRUCTOR_SUBMISSION: InstructorAttributes instructor = getInstructorOfCourseFromRequest(courseId); questions = logic.getFeedbackQuestionsForInstructors(feedbackSessionName, courseId, instructor.getEmail()); break; case FULL_DETAIL: questions = logic.getFeedbackQuestionsForSession(feedbackSessionName, courseId); break; default: throw new InvalidHttpParameterException("Unknown intent " + intent); } } catch (EntityDoesNotExistException e) { throw new EntityNotFoundException(e); } String moderatedPerson = getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_MODERATED_PERSON); if (!StringHelper.isEmpty(moderatedPerson)) { questions.removeIf(question -> !canInstructorSeeQuestion(question)); } FeedbackQuestionsData response = new FeedbackQuestionsData(questions); response.normalizeQuestionNumber(); return new JsonResult(response); }
Source:
<code>protected CallOptions getCallOptions() { if (callOptions.getDeadline() != null) { return callOptions; } MethodDescriptor<RequestT, ResponseT> methodDescriptor = rpc.getMethodDescriptor(); <START> if (methodDescriptor == BigtableGrpc.getReadRowsMethod() <END> && !CallOptionsFactory.ConfiguredCallOptionsFactory.isGet(request)) { return callOptions; } return callOptions.withDeadlineAfter(UNARY_DEADLINE_MINUTES, TimeUnit.MINUTES); }</code><technical_language>this .equals? is guarantee method return instance? Also, simpler do instanceof ReadRowsRequest</technical_language>

Target:
protected CallOptions getCallOptions() { if (callOptions.getDeadline() != null) { return callOptions; } if (request instanceof ReadRowsRequest && !CallOptionsFactory.ConfiguredCallOptionsFactory.isGet((ReadRowsRequest) request)) { return callOptions; } return callOptions.withDeadlineAfter(UNARY_DEADLINE_MINUTES, TimeUnit.MINUTES); }
Source:
<code>private static void cleanup() throws IOException { String[] directoryNames = { DatabaseDescriptor.getCommitLogLocation(), }; for (String dirName : directoryNames) { File dir = new File(dirName); if (!dir.exists()) throw new RuntimeException("No such directory: " + dir.getAbsolutePath()); FileUtils.deleteRecursive(dir); } <START> for (String dirName : DatabaseDescriptor.getAllDataFileLocations()) { <END> File dir = new File(dirName); if (!dir.exists()) throw new RuntimeException("No such directory: " + dir.getAbsolutePath()); FileUtils.deleteRecursive(dir); } }</code><technical_language>Refactor lines 272-278 lines 282-287 into... void rmdirs(String... directoryNames) { for (String directoryName : directoryNames) { File directory = new File(directoryName); if (!directory.exists()) { throw new FileNotFoundException(String.format("No directory: %s", directory)); } FileUtils.deletedRecursive(directory); } refactor rmdir(:String) method (throwing RuntimeException if necessary) this **new** rmdirs(directories:String[]) method call it</technical_language>

Target:
private static void cleanup() throws IOException { rmdirs(DatabaseDescriptor.getCommitLogLocation()); rmdirs(DatabaseDescriptor.getAllDataFileLocations()); }
Source:
<code>public void testHttpConnection() throws Exception { Server server = new Server(0); server.setHandler(new AddPointsHandler()); server.start(); URI uri = server.getURI(); DataPointReceiver dpr = new HttpDataPointProtobufReceiverFactory( new SignalFxEndpoint(uri.getScheme(), "127.0.0.1", uri.getPort())) .createDataPointReceiver(); dpr.addDataPoints(AUTH_TOKEN, Collections.singletonList( SignalFxProtocolBuffers.DataPoint.newBuilder().setSource("source").build())); <START> server.stop(); <END> }</code><technical_language>determine redundant</technical_language>

Target:
public void testHttpConnection() throws Exception { Server server = new Server(0); server.setHandler(new AddPointsHandler()); server.start(); URI uri = server.getURI(); DataPointReceiver dpr = new HttpDataPointProtobufReceiverFactory( new SignalFxEndpoint(uri.getScheme(), uri.getHost(), uri.getPort())) .createDataPointReceiver(); dpr.addDataPoints(AUTH_TOKEN, Collections.singletonList( SignalFxProtocolBuffers.DataPoint.newBuilder().setSource("source").build())); server.stop(); }
Source:
<code>public Map<String, String> getLabels() { final Map<String, String> labels = new HashMap<>(getCommonLabels()); labels.put(Constants.LABEL_COMPONENT_KEY, Constants.LABEL_COMPONENT_JOB_MANAGER); <START> flinkConfig.getOptional(KubernetesConfigOptions.JOB_MANAGER_LABELS).ifPresent(labels::putAll); <END> return Collections.unmodifiableMap(labels); }</code><technical_language>order, users override built-in labels customization. I built-in labels prioritize user-specified ones. WDYT</technical_language>

Target:
public Map<String, String> getLabels() { final Map<String, String> labels = new HashMap<>(); labels.putAll(flinkConfig.getOptional(KubernetesConfigOptions.JOB_MANAGER_LABELS).orElse(Collections.emptyMap())); labels.putAll(getCommonLabels()); labels.put(Constants.LABEL_COMPONENT_KEY, Constants.LABEL_COMPONENT_JOB_MANAGER); return Collections.unmodifiableMap(labels); }
Source:
<code>public BigtableAsyncAdmin(CommonConnection asyncConnection) throws IOException { LOG.debug("Creating BigtableAsyncAdmin"); this.options = asyncConnection.getOptions(); this.bigtableTableAdminClient = new BigtableTableAdminClient( asyncConnection.getSession().getTableAdminClient()); this.disabledTables = asyncConnection.getDisabledTables(); this.bigtableInstanceName = options.getInstanceName(); this.tableAdapter2x = new TableAdapter2x(options); this.asyncConnection = asyncConnection; this.configuration = asyncConnection.getConfiguration(); <START> this.instanceName = InstanceName.of(bigtableInstanceName.getProjectId(), bigtableInstanceName.getInstanceId()); <END> String clusterId = configuration.get(BigtableOptionsFactory.BIGTABLE_SNAPSHOT_CLUSTER_ID_KEY, null); if (clusterId != null) { bigtableSnapshotClusterName = bigtableInstanceName.toClusterName(clusterId); } }</code><technical_language>Please BigtableInstanceName.toGcbInstanceName() here</technical_language>

Target:
public BigtableAsyncAdmin(CommonConnection asyncConnection) throws IOException { LOG.debug("Creating BigtableAsyncAdmin"); this.options = asyncConnection.getOptions(); this.bigtableTableAdminClient = new BigtableTableAdminClient( asyncConnection.getSession().getTableAdminClient()); this.disabledTables = asyncConnection.getDisabledTables(); this.bigtableInstanceName = options.getInstanceName(); this.tableAdapter2x = new TableAdapter2x(options); this.asyncConnection = asyncConnection; this.configuration = asyncConnection.getConfiguration(); String clusterId = configuration.get(BigtableOptionsFactory.BIGTABLE_SNAPSHOT_CLUSTER_ID_KEY, null); if (clusterId != null) { bigtableSnapshotClusterName = bigtableInstanceName.toClusterName(clusterId); } }
Source:
<code>public void run() { connectionTimeout = config.getConnectionTimeout(); leakTask.updateLeakDetectionThreshold(config.getLeakDetectionThreshold()); final long now = clockSource.currentTime(); final long idleTimeout = config.getIdleTimeout(); if (now < previous || now > clockSource.plusMillis(previous, (2 * HOUSEKEEPING_PERIOD_MS))) { LOGGER.warn("{} - Unusual system clock change detected, soft-evicting connections from pool.", poolName); previous = now; softEvictConnections(); fillPool(); return; } previous = now; if (idleTimeout > 0L) { final List<PoolEntry> notInUseList = connectionBag.values(STATE_NOT_IN_USE); int removable = notInUseList.size() - config.getMinimumIdle(); if (removable > 0) { logPoolState("Before cleanup\t"); <START> Collections.sort(notInUseList, new Comparator<PoolEntry>() { <END> @Override public int compare(PoolEntry pe1, PoolEntry pe2) { return pe1.lastAccessed < pe2.lastAccessed ? -1 : pe1.lastAccessed > pe2.lastAccessed ? 1 : 0; } }); for (int i = 0; i < removable; i++) { PoolEntry poolEntry = notInUseList.get(i); if (clockSource.elapsedMillis(poolEntry.lastAccessed, now) > idleTimeout) { if (connectionBag.reserve(poolEntry)) { closeConnection(poolEntry, "(connection passed idleTimeout)"); } } } logPoolState("After cleanup\t"); } } fillPool(); }</code><technical_language>try making PoolEntry a java.lang.Comparable if this cleaner</technical_language>

Target:
public void run() { connectionTimeout = config.getConnectionTimeout(); leakTask.updateLeakDetectionThreshold(config.getLeakDetectionThreshold()); final long now = clockSource.currentTime(); final long idleTimeout = config.getIdleTimeout(); if (now < previous || now > clockSource.plusMillis(previous, (2 * HOUSEKEEPING_PERIOD_MS))) { LOGGER.warn("{} - Unusual system clock change detected, soft-evicting connections from pool.", poolName); previous = now; softEvictConnections(); fillPool(); return; } previous = now; if (idleTimeout > 0L) { final List<PoolEntry> notInUseList = connectionBag.values(STATE_NOT_IN_USE); int removable = notInUseList.size() - config.getMinimumIdle(); if (removable > 0) { logPoolState("Before cleanup\t"); Collections.sort(notInUseList, new Comparator<PoolEntry>() { @Override public int compare(final PoolEntry entryOne, final PoolEntry entryTwo) { return -1 * Long.compare(entryOne.lastAccessed, entryTwo.lastAccessed); } }); for (int i = 0; i < removable; i++) { final PoolEntry poolEntry = notInUseList.get(i); if (clockSource.elapsedMillis(poolEntry.lastAccessed, now) > idleTimeout) { if (connectionBag.reserve(poolEntry)) { closeConnection(poolEntry, "(connection passed idleTimeout)"); } } } logPoolState("After cleanup\t"); } } fillPool(); }
Source:
<code>private BiConsumer<Throwable, Object> completeWithErrorPropagate() { return (error, event) -> { final PrivilegedEvent errorEvent = (PrivilegedEvent) ((MessagingException) error).getEvent(); <START> System.out.println("propagating error... " + errorEvent.getContext().getDepthLevel()); <END> errorEvent.getContext().error(error); }; }</code><technical_language>Remove</technical_language>

Target:
private BiConsumer<Throwable, Object> completeWithErrorPropagate() { return (error, event) -> { final PrivilegedEvent errorEvent = (PrivilegedEvent) ((MessagingException) error).getEvent(); errorEvent.getContext().error(error); }; }
Source:
<code><START> protected void loadDetachedPlugins() { <END> StartupType startupType = Jenkins.getActiveInstance().getStartupType(); if (startupType == StartupType.UPGRADE) { VersionNumber lastExecVersion = new VersionNumber(StartupUtil.getLastExecVersion()); LOGGER.log(INFO, "Upgrading Jenkins. The last running version was {0}. This Jenkins is version {1}.", new Object[] {lastExecVersion, Jenkins.VERSION}); final List<ClassicPluginStrategy.DetachedPlugin> detachedPlugins = ClassicPluginStrategy.getDetachedPlugins(lastExecVersion); Set<String> loadedDetached = loadPluginsFromWar("/WEB-INF/detached-plugins", new FilenameFilter() { @Override public boolean accept(File dir, String name) { name = normalisePluginName(name); if (isPluginInstalled(name)) { return true; } for (ClassicPluginStrategy.DetachedPlugin detachedPlugin : detachedPlugins) { if (detachedPlugin.getShortName().equals(name)) { return true; } } return false; } }); LOGGER.log(INFO, "Upgraded Jenkins from version {0} to version {1}. Loaded detached plugins (and dependencies): {2}", new Object[] {lastExecVersion, Jenkins.VERSION, loadedDetached}); StartupUtil.saveLastExecVersion(); } }</code><technical_language>is a module precisely pulled core dependency mechanism</technical_language>

Target:
protected void loadDetachedPlugins() { InstallState installState = Jenkins.getActiveInstance().getInstallState(); if (installState == InstallState.UPGRADE) { VersionNumber lastExecVersion = new VersionNumber(InstallUtil.getLastExecVersion()); LOGGER.log(INFO, "Upgrading Jenkins. The last running version was {0}. This Jenkins is version {1}.", new Object[] {lastExecVersion, Jenkins.VERSION}); final List<ClassicPluginStrategy.DetachedPlugin> detachedPlugins = ClassicPluginStrategy.getDetachedPlugins(lastExecVersion); Set<String> loadedDetached = loadPluginsFromWar("/WEB-INF/detached-plugins", new FilenameFilter() { @Override public boolean accept(File dir, String name) { name = normalisePluginName(name); if (ClassicPluginStrategy.isDetachedPlugin(name)) { VersionNumber installedVersion = getPluginVersion(rootDir, name); VersionNumber bundledVersion = getPluginVersion(dir, name); if (installedVersion != null && bundledVersion != null && installedVersion.isOlderThan(bundledVersion)) { return true; } } for (ClassicPluginStrategy.DetachedPlugin detachedPlugin : detachedPlugins) { if (detachedPlugin.getShortName().equals(name)) { return true; } } return false; } }); LOGGER.log(INFO, "Upgraded Jenkins from version {0} to version {1}. Loaded detached plugins (and dependencies): {2}", new Object[] {lastExecVersion, Jenkins.VERSION, loadedDetached}); InstallUtil.saveLastExecVersion(); } }
Source:
<code>public static <T> Observable.Transformer<T, T> transformer(@Nonnull final String logTag, @Nonnull final String observableTag, @Nonnull final Logger logger) { return new Observable.Transformer<T, T>() { @Override public Observable<T> call(Observable<T> observable) { return observable .doOnNext(new Action1<T>() { @Override public void call(T value) { <START> logger.logNext(logTag, observableTag + " -> onNext : " + value); <END> } }) .doOnError(new Action1<Throwable>() { @Override public void call(Throwable throwable) { logger.logError(logTag, observableTag + " -> onError : " + throwable); } }) .doOnCompleted(new Action0() { @Override public void call() { logger.logCompleted(logTag, observableTag + " -> onCompleted"); } }); } }; }</code><technical_language>java logger.logNext(logTag, observableTag, value);</technical_language>

Target:
public static <T> Observable.Transformer<T, T> transformer(@Nonnull final String logTag, @Nonnull final String observableTag, @Nonnull final Logger logger) { return new Observable.Transformer<T, T>() { @Override public Observable<T> call(Observable<T> observable) { return observable .doOnNext(new Action1<T>() { @Override public void call(T value) { logger.logNext(logTag, observableTag, value); } }) .doOnError(new Action1<Throwable>() { @Override public void call(Throwable throwable) { logger.logError(logTag, observableTag, throwable); } }) .doOnCompleted(new Action0() { @Override public void call() { logger.logCompleted(logTag, observableTag); } }); } }; }
Source:
<code>public CRAMIterator(final InputStream inputStream, final ReferenceSource referenceSource) throws IOException { if (null == referenceSource) { this.referenceSource = new ReferenceSource(); } else <START> this.referenceSource = referenceSource; <END> this.countingInputStream = new CountingInputStream(inputStream); final CramContainerIterator containerIterator = new CramContainerIterator(this.countingInputStream); cramHeader = containerIterator.getCramHeader(); this.containerIterator = containerIterator; firstContainerOffset = this.countingInputStream.getCount(); records = new ArrayList<SAMRecord>(10000); normalizer = new CramNormalizer(cramHeader.getSamFileHeader(), referenceSource); parser = new ContainerParser(cramHeader.getSamFileHeader()); }</code><technical_language>Add curly braces else block. Also, falling a default-constructed ReferenceSource (I believe) eventually produce a NullPointerException deep in cram parsing code provided Defaults.USE_CRAM_REF_DOWNLOAD is false (which is default). I throw if referenceSource is null Defaults.USE_CRAM_REF_DOWNLOAD is false</technical_language>

Target:
public CRAMIterator(final InputStream inputStream, final ReferenceSource referenceSource) throws IOException { if (null == referenceSource) { throw new CRAMException("A reference source is required for CRAM files"); } this.countingInputStream = new CountingInputStream(inputStream); this.referenceSource = referenceSource; final CramContainerIterator containerIterator = new CramContainerIterator(this.countingInputStream); cramHeader = containerIterator.getCramHeader(); this.containerIterator = containerIterator; firstContainerOffset = this.countingInputStream.getCount(); records = new ArrayList<SAMRecord>(10000); normalizer = new CramNormalizer(cramHeader.getSamFileHeader(), referenceSource); parser = new ContainerParser(cramHeader.getSamFileHeader()); }
Source:
<code>public <T> T blocking(CompletionStage<T> request) { <START> return null; <END> }</code><technical_language>delegate</technical_language>

Target:
public <T> T blocking(CompletionStage<T> request) { return delegate.blocking(request); }
Source:
<code>public void testBuildBlobId() throws Exception { BlobId blobId = new BlobId(version, referenceType, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, referenceIsEncrypted); <START> System.out.println(blobId.getID()); <END> assertEquals("Wrong blobId version", version, getVersionFromBlobString(blobId.getID())); assertBlobIdFieldValues(version, blobId, referenceType, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, referenceIsEncrypted); }</code><technical_language>Remove</technical_language>

Target:
public void testBuildBlobId() throws Exception { BlobId blobId = new BlobId(version, referenceType, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, referenceIsEncrypted); assertEquals("Wrong blobId version", version, getVersionFromBlobString(blobId.getID())); assertBlobIdFieldValues(version, blobId, referenceType, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, referenceIsEncrypted); }
Source:
<code>private URL mergeUrl(URL providerUrl) { providerUrl = ClusterUtils.mergeUrl(providerUrl, queryMap); providerUrl = overrideWithConfigurator(providerUrl); providerUrl = providerUrl.addParameter(Constants.CHECK_KEY, String.valueOf(false)); this.overrideDirectoryUrl = this.overrideDirectoryUrl.addParametersIfAbsent(providerUrl.getParameters()); if ((providerUrl.getPath() == null || providerUrl.getPath() <START> .length() == 0) && Constants.DOBBO_PROTOCOL.equals(providerUrl.getProtocol())) { END> String path = directoryUrl.getParameter(Constants.INTERFACE_KEY); if (path != null) { int i = path.indexOf('/'); if (i >= 0) { path = path.substring(i + 1); } i = path.lastIndexOf(':'); if (i >= 0) { path = path.substring(0, i); } providerUrl = providerUrl.setPath(path); } } return providerUrl; }</code><technical_language>pr #3491 merged main branch changed this constant name. please update latest code change here</technical_language>

Target:
private URL mergeUrl(URL providerUrl) { providerUrl = ClusterUtils.mergeUrl(providerUrl, queryMap); providerUrl = overrideWithConfigurator(providerUrl); providerUrl = providerUrl.addParameter(Constants.CHECK_KEY, String.valueOf(false)); this.overrideDirectoryUrl = this.overrideDirectoryUrl.addParametersIfAbsent(providerUrl.getParameters()); if ((providerUrl.getPath() == null || providerUrl.getPath() .length() == 0) && Constants.DUBBO_PROTOCOL.equals(providerUrl.getProtocol())) { String path = directoryUrl.getParameter(Constants.INTERFACE_KEY); if (path != null) { int i = path.indexOf('/'); if (i >= 0) { path = path.substring(i + 1); } i = path.lastIndexOf(':'); if (i >= 0) { path = path.substring(0, i); } providerUrl = providerUrl.setPath(path); } } return providerUrl; }
Source:
<code>private void populateGroupInfo(List<ImmutablePair<String, String>> contactInfo, Group group) { addInfo(contactInfo, DATA_NAME, group.getReference().getName()); DocumentReference documentReference = group.getReference(); try { XWikiDocument doc = (XWikiDocument) this.documentAccessBridge.getDocument(documentReference); BaseObject data = doc.getXObject(Group.CLASS_REFERENCE); <START> addInfo(contactInfo, DATA_EMAIL, data.getStringValue(DATA_CONTACT)); <END> } catch (Exception e) { logger.error("Could not find requested document"); } }</code><technical_language>DATA_ constants field names in JSON, while ATTRIBUTE_ constants field names in XObjects, wrong DATA_CONTACT get values XObject..</technical_language>

Target:
private void populateGroupInfo(List<ImmutablePair<String, String>> contactInfo, Group group) { addInfo(contactInfo, DATA_NAME, group.getReference().getName()); DocumentReference documentReference = group.getReference(); try { XWikiDocument doc = (XWikiDocument) this.documentAccessBridge.getDocument(documentReference); BaseObject data = doc.getXObject(Group.CLASS_REFERENCE); addInfo(contactInfo, DATA_EMAIL, data.getStringValue(ATTRIBUTE_EMAIL_GROUP)); } catch (Exception e) { logger.error("Could not find requested document"); } }
Source:
<code>public void testSplitServerConfig() throws ConfigException { String[] nsa = ConfigUtils.splitServerConfig("[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443"); <START> assertEquals(nsa.length, 2, 0); <END> }</code><technical_language>Assert actual host port</technical_language>

Target:
public void testSplitServerConfig() throws ConfigException { String[] nsa = ConfigUtils.getHostAndPort("[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443"); System.out.println(nsa[0]); assertEquals(nsa[0], "2001:db8:85a3:8d3:1319:8a2e:370:7348"); assertEquals(nsa[1], "443"); }
Source:
<code>private static Path serialize(FormMetadata metaData) { try { <START> Path formDir = metaData.getFormDir(); <END> if (Files.exists(formDir)) { return write( getMetadataFile(metaData), MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(metaData.asJson(MAPPER)), CREATE, TRUNCATE_EXISTING ); } else { Files.createDirectory(formDir); return write( getMetadataFile(metaData), MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(metaData.asJson(MAPPER)), CREATE, TRUNCATE_EXISTING ); } } catch (IOException e) { throw new BriefcaseException("Couldn't produce JSON FormMetadata", e); } }</code><technical_language>This method duplicated code simplified calling UncheckedFiles.createDirectories() unconditionally write call</technical_language>

Target:
private static Path serialize(FormMetadata metaData) { try { Path formDir = metaData.getFormDir(); UncheckedFiles.createDirectories(formDir); return write( getMetadataFile(metaData), MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(metaData.asJson(MAPPER)), CREATE, TRUNCATE_EXISTING ); } catch (IOException e) { throw new BriefcaseException("Couldn't produce JSON FormMetadata", e); } }
Source:
<code>void test_ctor_1arg_toosmall() { <START> assertThrows(IllegalArgumentException.class, () -> new SetResponse(-1)); <END> }</code><technical_language>a lot more cleanup this (unnecessary boxing, StringBuffer -> StringBuilder (already done, pushed yet)), please do in _distinct_ commits</technical_language>

Target:
void test_ctor_1arg_toosmall() { try { new SetResponse(-1); fail("IllegalArgumentException not thrown"); } catch(IllegalArgumentException a){} }
Source:
<code>public void testServer_ServerVersionMismatchException() { <START> IgnoredException.addIgnoredException(ServerOperationException.class); <END> serverNew.invoke(() -> { Cache cache = getCache(); assertThat(cache).isNotNull(); Region<Object, Object> region = cache.getRegion("regionA"); assertThat(region).isNotNull(); assertThatThrownBy(region::clear).isInstanceOf(ServerVersionMismatchException.class) .hasMessage(expectedMessage); }); }</code><technical_language>test shut locator/servers restart again, making tests longer. If tests run faster, lump tests one. do region.clear in a client vm in a server vm. nice verify clears, region 2 records in (clear servers)</technical_language>

Target:
public void testServer_ServerVersionMismatchException() { IgnoredException.addIgnoredException(ServerOperationException.class); serverNew.invoke(() -> { Cache cache = getCache(); assertThat(cache).isNotNull(); Region<String, String> region = cache.getRegion("regionA"); assertThat(region).isNotNull(); assertThatThrownBy(region::clear).isInstanceOf(ServerVersionMismatchException.class) .hasMessage(expectedMessage); assertThat(region.get("A")).isEqualTo("ValueA"); assertThat(region.get("B")).isEqualTo("ValueB"); }); }
Source:
<code>public void testBug474072_missing() throws Exception { String url = FileLocator.find(new URL("platform:/plugin/org.eclipse.jface/$nl$/icons/full/message_error.png")) .toString(); url += "does-not-exist"; <START> ResourceLocator.imageDescriptorFromBundle("org.eclipse.jface", url).orElseThrow(() -> new AssertionError()); <END> }</code><technical_language>.. this test is changed. understanding descriptor is expected non-null createImage return null</technical_language>

Target:
public void testBug474072_missing() throws Exception { String url = FileLocator.find(new URL("platform:/plugin/org.eclipse.jface/$nl$/icons/full/message_error.png")) .toString(); url += "does-not-exist"; ImageDescriptor imageDescriptor = ResourceLocator.imageDescriptorFromBundle("org.eclipse.jface", url) .orElse(null); Image image = null; try { image = imageDescriptor.createImage(false); assertNull(image); } finally { if (image != null) { image.dispose(); } } }
Source:
<code>private Row convertRowType(Row row, List<Tuple2<Integer, Column>> listConvertColumns, <START> Accumulator<ApplySchemaStatistic> statisticAccumulator, StructType newSchema, boolean isDropRow) { <END> statisticAccumulator.localValue().increaseLineProcessed(); Object[] rowData = toArray(row); boolean isFail = false; for (Tuple2<Integer, Column> convertColumn : listConvertColumns) { int colIndex = convertColumn._1(); Schema.ColumnType toType = convertColumn._2().getType(); Object colValue = rowData[colIndex]; if (colValue != null) { String columnData = colValue.toString().trim(); Object newColData = cast(columnData, toType); if (newColData == null) { statisticAccumulator.localValue().addColumnFailed(convertColumn._2().getName(), columnData); isFail = true; } rowData[colIndex] = newColData; } } if (isFail && isDropRow) { return null; } else { return new GenericRowWithSchema(rowData, newSchema); } }</code><technical_language>methods for dropping rows NA values in DropNAHandler, need overloading convertRowType function</technical_language>

Target:
private static Row convertRowType(Row row, List<Tuple2<Integer, Column>> listConvertColumns, Accumulator<ApplySchemaStatistic> statisticAccumulator, StructType newSchema, boolean isDropRow) { statisticAccumulator.localValue().increaseLineProcessed(); Object[] rowData = toArray(row); boolean isFail = false; for (Tuple2<Integer, Column> convertColumn : listConvertColumns) { int colIndex = convertColumn._1(); Schema.ColumnType toType = convertColumn._2().getType(); Object colValue = rowData[colIndex]; if (colValue != null) { String columnData = colValue.toString().trim(); Object newColData = cast(columnData, toType); if (newColData == null) { statisticAccumulator.localValue().addColumnFailed(convertColumn._2().getName(), columnData); isFail = true; } rowData[colIndex] = newColData; } } if (isFail && isDropRow) { return null; } else { return new GenericRowWithSchema(rowData, newSchema); } }
Source:
<code>public void testDoPost() throws IOException, ServletException { when(request.getParameter("connectionName")).thenReturn("test-db-name"); when(request.getParameter("databaseType")).thenReturn(MySQLDatabaseService.DB_NAME); when(request.getParameter("databaseServer")).thenReturn(testDbConfig.getDatabaseHost()); when(request.getParameter("databasePort")).thenReturn("" + testDbConfig.getDatabasePort()); when(request.getParameter("databaseUser")).thenReturn(testDbConfig.getDatabaseUser()); when(request.getParameter("databasePassword")).thenReturn(testDbConfig.getDatabasePassword()); when(request.getParameter("initialDatabase")).thenReturn(testDbConfig.getDatabaseName()); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); when(response.getWriter()).thenReturn(pw); SUT.doPost(request, response); String result = sw.getBuffer().toString().trim(); assertNotNull(result); assertFalse(result.isEmpty(), "Valid response Message expected!"); ObjectNode json = ParsingUtilities.mapper.readValue(result, ObjectNode.class); <START> System.out.println("json:" + json); <END> ArrayNode savedConnections = (ArrayNode) json.get("savedConnections"); Assert.assertNotNull(savedConnections); int len = savedConnections.size(); Assert.assertEquals(len, 1); }</code><technical_language>This a debugging print removed</technical_language>

Target:
public void testDoPost() throws IOException, ServletException { when(request.getParameter("connectionName")).thenReturn("test-db-name"); when(request.getParameter("databaseType")).thenReturn(MySQLDatabaseService.DB_NAME); when(request.getParameter("databaseServer")).thenReturn(testDbConfig.getDatabaseHost()); when(request.getParameter("databasePort")).thenReturn("" + testDbConfig.getDatabasePort()); when(request.getParameter("databaseUser")).thenReturn(testDbConfig.getDatabaseUser()); when(request.getParameter("databasePassword")).thenReturn(testDbConfig.getDatabasePassword()); when(request.getParameter("initialDatabase")).thenReturn(testDbConfig.getDatabaseName()); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); when(response.getWriter()).thenReturn(pw); SUT.doPost(request, response); String result = sw.getBuffer().toString().trim(); assertNotNull(result); assertFalse(result.isEmpty(), "Valid response Message expected!"); ObjectNode json = ParsingUtilities.mapper.readValue(result, ObjectNode.class); ArrayNode savedConnections = (ArrayNode) json.get("savedConnections"); Assert.assertNotNull(savedConnections); int len = savedConnections.size(); Assert.assertEquals(len, 1); }
Source:
<code>public boolean handlesMoveColumnsTo(final List<? extends MetaData> metaData) throws ModelSynchronizer.MoveColumnVetoException { final boolean isActionInsetFactFragment = isActionInsertFactFragment(metaData); if (!isActionInsetFactFragment) { return false; } final List<ActionCol52> columnsToMove = metaData.stream() .map(c -> (MoveColumnToMetaData) c) .map(MoveColumnToMetaData::getColumn) .map(c -> (ActionInsertFactCol52) c) .collect(Collectors.toList()); final String binding = ((ActionInsertFactCol52) columnsToMove.get(0)).getBoundName(); final int tgtIndex = ((MoveColumnToMetaData) metaData.get(0)).getTargetColumnIndex(); final List<BaseColumn> modelColumns = model.getExpandedColumns(); final AtomicBoolean result = new AtomicBoolean(true); model.getActionCols().stream() .filter(c -> !columnsToMove.contains(c)) .filter(c -> c instanceof ActionWorkItemInsertFactCol52) .map(c -> (ActionWorkItemInsertFactCol52) c) .filter(c -> c.getBoundName().equals(binding)) .map(modelColumns::indexOf) .filter(i -> i >= tgtIndex) .findFirst() .ifPresent(i -> result.set(false)); <START> return result.get(); <END> }</code><technical_language>missing something, starting line 171, this equivalent a simpler: return model.getActionCols().stream() .filter(c -> !columnsToMove.contains(c)) .filter(c -> c instanceof ActionWorkItemInsertFactCol52) .map(c -> (ActionWorkItemInsertFactCol52) c) .filter(c -> c.getBoundName().equals(binding)) .map(modelColumns::indexOf) .noneMatch(i -> i >= tgtIndex);</technical_language>

Target:
public boolean handlesMoveColumnsTo(final List<? extends MetaData> metaData) throws ModelSynchronizer.MoveColumnVetoException { final boolean isActionInsetFactFragment = isActionInsertFactFragment(metaData); if (!isActionInsetFactFragment) { return false; } final List<ActionCol52> columnsToMove = metaData.stream() .map(c -> (MoveColumnToMetaData) c) .map(MoveColumnToMetaData::getColumn) .map(c -> (ActionInsertFactCol52) c) .collect(Collectors.toList()); final String binding = ((ActionInsertFactCol52) columnsToMove.get(0)).getBoundName(); final int tgtIndex = ((MoveColumnToMetaData) metaData.get(0)).getTargetColumnIndex(); final List<BaseColumn> modelColumns = model.getExpandedColumns(); return model.getActionCols().stream() .filter(c -> !columnsToMove.contains(c)) .filter(c -> c instanceof ActionWorkItemInsertFactCol52) .map(c -> (ActionWorkItemInsertFactCol52) c) .filter(c -> c.getBoundName().equals(binding)) .map(modelColumns::indexOf) .noneMatch(i -> i >= tgtIndex); }
Source:
<code>private void allQueriesForVms() { <START> when(vmDao.getAllForVdsGroup(any(Guid.class))).thenReturn(new ArrayList<VM>()); <END> }</code><technical_language>Collections.emptyList() anymore</technical_language>

Target:
private void allQueriesForVms() { when(vmDao.getAllForVdsGroup(any(Guid.class))).thenReturn(Collections.<VM> emptyList()); }
Source:
<code>public List<SCMSource> getSCMSources() { <START> return Collections.emptyList(); END> }</code><technical_language>in this plugin, I useful (a get list of repositories managed this OrganizationFolder). I returning list SCMSources owned multiple SCMNavigators is harmless (and possibly useful outside)</technical_language>

Target:
public List<SCMSource> getSCMSources() { Set<SCMSource> result = new HashSet<SCMSource>(); for (MultiBranchProject<?,?> child : getItems()) { result.addAll(child.getSCMSources()); } return new ArrayList<SCMSource>(result); }
Source:
<code>protected SetMembers doExecute(BranchContext context) throws IOException { Options options = Options.builder() .putAll(options()) .put(SetMemberSearchRequestEvaluator.OptionKey.AFTER, searchAfter()) <START> .put(SetMemberSearchRequestEvaluator.OptionKey.LIMIT, limit()) <END> .build(); return context.service(SetMemberSearchRequestEvaluator.class) .evaluate(context.service(CodeSystemURI.class), context, options); }</code><technical_language>Add sort other generic options superclass</technical_language>

Target:
protected SetMembers doExecute(BranchContext context) throws IOException { Options options = Options.builder() .putAll(options()) .put(SetMemberSearchRequestEvaluator.OptionKey.AFTER, searchAfter()) .put(SetMemberSearchRequestEvaluator.OptionKey.LIMIT, limit()) .put(SetMemberSearchRequestEvaluator.OptionKey.LOCALES, locales()) .put(SearchResourceRequest.OptionKey.SORT_BY, sortBy()) .build(); return context.service(SetMemberSearchRequestEvaluator.class) .evaluate(context.service(CodeSystemURI.class), context, options); }