auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void scheduleInputEventBasedRule(RetentionRule rule) { if (!rule.isEnabled() || !rule.isEventBased()) { throw new IllegalArgumentException("Rule is disabled or not event-based"); } BulkService bulkService = Framework.getService(BulkService.class); RepositoryService repositoryService = Framework.getService(RepositoryService.class); StringBuilder query = new StringBuilder(RetentionConstants.RULE_RECORD_DOCUMENT_QUERY); query.append(" AND ") .append(RetentionConstants.RECORD_RULE_IDS_PROP) .append(" = '" + rule.getDocument().getId() + "'"); for (String repositoryName : repositoryService.getRepositoryNames()) { BulkCommand command = new BulkCommand.Builder(EvalInputEventBasedRuleAction.ACTION_NAME, query.toString()).user(SecurityConstants.SYSTEM_USERNAME).repository(repositoryName).build(); <START> bulkService.submit(command); <END> } }</code><technical_language>org.nuxeo.ecm.core.bulk.message.BulkCommand.Builder#Builder(java.lang.String, java.lang.String) is a deprecated constructor, replace by: BulkCommand command = new BulkCommand.Builder(EvalInputEventBasedRuleAction.ACTION_NAME, query.toString(), SecurityConstants.SYSTEM_USERNAME).repository(repositoryName).build();</technical_language>

Target:
protected void scheduleInputEventBasedRule(RetentionRule rule) { if (!rule.isEnabled() || !rule.isEventBased()) { throw new IllegalArgumentException("Rule is disabled or not event-based"); } BulkService bulkService = Framework.getService(BulkService.class); RepositoryService repositoryService = Framework.getService(RepositoryService.class); StringBuilder query = new StringBuilder(RetentionConstants.RULE_RECORD_DOCUMENT_QUERY); query.append(" AND ") .append(RetentionConstants.RECORD_RULE_IDS_PROP) .append(" = '" + rule.getDocument().getId() + "'"); for (String repositoryName : repositoryService.getRepositoryNames()) { BulkCommand command = new BulkCommand.Builder(EvalInputEventBasedRuleAction.ACTION_NAME, query.toString(), SecurityConstants.SYSTEM_USERNAME).repository(repositoryName).build(); bulkService.submit(command); } }
Source:
<code>protected void formatBranch() throws EmailException { <START> switch (this.type) { <END> case CREATE: appendText(velocifyFile("NewBranch.vm")); break; case UPDATE: appendText(velocifyFile("ModifyBranch.vm")); break; case DELETE: appendText(velocifyFile("DeleteBranch.vm")); break; } }</code><technical_language>type 'UPDATE_NONFASTFORWARD'? e-mail in this case</technical_language>

Target:
protected void formatBranch() throws EmailException { switch (this.type) { case CREATE: appendText(velocifyFile("NewBranch.vm")); break; case UPDATE: case UPDATE_NONFASTFORWARD: appendText(velocifyFile("ModifyBranch.vm")); break; case DELETE: appendText(velocifyFile("DeleteBranch.vm")); break; } }
Source:
<code>protected boolean mustBeRemoved(@Nonnull JDefinedClassOrInterface type) { if (type == stringDef || type == intDef) { return true; } if (type instanceof JDefinedAnnotationType) { if ((!type.getAnnotations(stringDef).isEmpty()) || !type.getAnnotations(intDef).isEmpty()) { JDefinedAnnotationType typeDef = (JDefinedAnnotationType) type; if (typeDef.getRetentionPolicy() != JRetentionPolicy.SOURCE) { <START> JSession session = type.getParent(JSession.class); <END> session.getReporter().report(Severity.NON_FATAL, new InvalidRetentionForTypeDef(typeDef)); } return true; } } return false; }</code><technical_language>Is normal of JSession</technical_language>

Target:
protected boolean mustBeRemoved(@Nonnull JDefinedClassOrInterface type) { if (type == stringDef || type == intDef) { return true; } if (type instanceof JDefinedAnnotationType) { if ((!type.getAnnotations(stringDef).isEmpty()) || !type.getAnnotations(intDef).isEmpty()) { JDefinedAnnotationType typeDef = (JDefinedAnnotationType) type; if (typeDef.getRetentionPolicy() != JRetentionPolicy.SOURCE) { type.getSession().getReporter().report(Severity.NON_FATAL, new InvalidRetentionForTypeDef(typeDef)); } return true; } } return false; }
Source:
<code>private void handleSyncUpdate(final SyncState sync, Callback successCallback, Callback errorCallback) { try { switch (sync.getStatus()) { case NEW: break; case RUNNING: break; case DONE: ReactBridgeHelper.invokeSuccess(successCallback, sync.asJSON()); break; case FAILED: <START> ReactBridgeHelper.invokeSuccess(errorCallback, sync.asJSON()); <END> break; } } catch (Exception e) { SalesforceReactLogger.e(TAG, "handleSyncUpdate call failed", e); } }</code><technical_language>rename ReactBridgeHelper.invokeSuccess methods ReactBridgeHelper.invoke rename argument methods successCallback callback</technical_language>

Target:
private void handleSyncUpdate(final SyncState sync, Callback successCallback, Callback errorCallback) { try { switch (sync.getStatus()) { case NEW: break; case RUNNING: break; case DONE: ReactBridgeHelper.invoke(successCallback, sync.asJSON()); break; case FAILED: ReactBridgeHelper.invoke(errorCallback, sync.asJSON()); break; } } catch (Exception e) { SalesforceReactLogger.e(TAG, "handleSyncUpdate call failed", e); } }
Source:
<code><START> public void MercurySignupTest_006_japaneseUserSignup() { <END> SignupPageObject mobileSignup = new SignupPageObject(driver); mobileSignup.openMobileSignupPage(wikiURL); String userName = "品質管理" + mobileSignup.getTimeStamp(); String password = "品質管理管理" + mobileSignup.getTimeStamp(); String email = "qaart001+" + mobileSignup.getTimeStamp() + "@gmail.com"; mobileSignup.typeEmailAddress(email).typeUsername(userName).typePassword(password) .typeBirthdate("12", "12", "1952").register(); mobileSignup.verifyAvatarAfterSignup(); }</code><technical_language>tests in SignupTests.java steps verification step. move steps separate method call in test? more thing: MercurySignupTest_006_japaneseUserSignup MercurySignupTest_001_successfulSignup tests verifyAvatarAfterSignup method. combine tests pass data TestNG DataProvider</technical_language>

Target:
public void MercurySignupTest_006_japaneseUserSignup() { SignupPageObject mobileSignup = new SignupPageObject(driver); mobileSignup.openMobileSignupPage(wikiURL); String userName = "ユーザー" + mobileSignup.getTimeStamp(); String password = "パス" + mobileSignup.getTimeStamp(); String email = "qaart001+" + mobileSignup.getTimeStamp() + "@gmail.com"; mobileSignup.typeEmailAddress(email).typeUsername(userName).typePassword(password) .typeBirthdate("12", "12", "1952").register(); mobileSignup.verifyAvatarAfterSignup(); }
Source:
<code>public static DrtConfigGroup get(Config config) { return ConfigUtils.addOrGetModule( config, DrtConfigGroup.class ) ; <START> } <END></code><technical_language>This method a side effect (i.e. creating a module if missing), checks in MultiModeDrtConfigGroup get broken. disallowing a standalone DrtConfigGroup: risk is people a single DRT setup. this, break lots of scenarios (which do time time anyway) typical setup a bit more complicated (no injection of DrtConfigGroup, obtaining providing additional argument: String drtServiceName). worth doing. add this task list for upcoming (remote) DevMeet:-)</technical_language>

Target:
public static DrtConfigGroup get(Config config) { return (DrtConfigGroup) config.getModule(GROUP_NAME); }
Source:
<code><START> boolean isRunning() { <END> return running; }</code><technical_language>suggest private</technical_language>

Target:
private boolean isRunning() { return running; }
Source:
<code>public int hashCode() { int result = 17; result += 37 * Arrays.hashCode(mElements); <START> result += 37 * mRepeat; <END> return result; }</code><technical_language>a polynomial hash implemented a misprint. "result = result * 37 + mRepeat"</technical_language>

Target:
public int hashCode() { int result = 17; result += 37 * 37 * Arrays.hashCode(mElements); result += 37 * mRepeat; return result; }
Source:
<code>public void beforeClass() throws Exception { super.beforeClass(); for (int i = 0; i < _numNodes; i++) { super.stopParticipant(i); } _participantsNew = new MockParticipantManager[_numNodes]; for (int i = 0; i < _numNodes; i++) { String storageNodeName = PARTICIPANT_PREFIX + "_NEW_" + (_startPort + i); <START> _gSetupTool.addInstanceToCluster(CLUSTER_NAME, storageNodeName); <END> } for (int i = 0; i < _numNodes; i++) { Map<String, TaskFactory> taskFactoryReg = new HashMap<>(); taskFactoryReg.put(DelayedStopTask.TASK_COMMAND, DelayedStopTask::new); String instanceName = PARTICIPANT_PREFIX + "_" + (_startPort + i); _participantsNew[i] = new MockParticipantManager(ZK_ADDR, CLUSTER_NAME, instanceName); StateMachineEngine stateMachine = _participantsNew[i].getStateMachineEngine(); stateMachine.registerStateModelFactory("Task", new TaskStateModelFactory(_participantsNew[i], taskFactoryReg)); _participantsNew[i].syncStart(); } _manager = HelixManagerFactory.getZKHelixManager(CLUSTER_NAME, "Admin", InstanceType.ADMINISTRATOR, ZK_ADDR); _manager.connect(); _driver = new TaskDriver(_manager); _admin = _gSetupTool.getClusterManagementTool(); }</code><technical_language>Nit: This line necessary. if do it</technical_language>

Target:
public void beforeClass() throws Exception { super.beforeClass(); for (int i = 0; i < _numNodes; i++) { super.stopParticipant(i); } for (int i = 0; i < _numNodes; i++) { Assert.assertFalse(_participants[i].isConnected()); } _participants = new MockParticipantManager[_numNodes]; for (int i = 0; i < _numNodes; i++) { Map<String, TaskFactory> taskFactoryReg = new HashMap<>(); taskFactoryReg.put(DelayedStopTask.TASK_COMMAND, DelayedStopTask::new); String instanceName = PARTICIPANT_PREFIX + "_" + (_startPort + i); _participants[i] = new MockParticipantManager(ZK_ADDR, CLUSTER_NAME, instanceName); StateMachineEngine stateMachine = _participants[i].getStateMachineEngine(); stateMachine.registerStateModelFactory("Task", new TaskStateModelFactory(_participants[i], taskFactoryReg)); _participants[i].syncStart(); } _manager = HelixManagerFactory.getZKHelixManager(CLUSTER_NAME, "Admin", InstanceType.ADMINISTRATOR, ZK_ADDR); _manager.connect(); _driver = new TaskDriver(_manager); _admin = _gSetupTool.getClusterManagementTool(); }
Source:
<code><START> public void testSyncCreateWithCustomSerializer() { <END> String className = TestHelper.getTestClassName(); String methodName = TestHelper.getTestMethodName(); String testName = className + "_" + methodName; System.out.println("START " + testName + " at " + new Date(System.currentTimeMillis())); String path = String.format("/%s/%s", _rootPath, "msg_0"); ZkSerializer listSerializer = new ZkSerializer() { @Override public byte[] serialize(Object o) throws ZkMarshallingError { List<Integer> list = (List<Integer>) o; return list.stream().map(String::valueOf).collect(Collectors.joining(",")) .getBytes(); } @Override public Object deserialize(byte[] bytes) throws ZkMarshallingError { String string = new String(bytes); return Arrays.stream(string.split(",")).map(Integer::valueOf) .collect(Collectors.toList()); } }; ZkBaseDataAccessor<List<Integer>> accessor = new ZkBaseDataAccessor<>(ZK_ADDR, listSerializer); List<Integer> l0 = ImmutableList.of(1, 2, 3); List<Integer> l1 = ImmutableList.of(4, 5, 6); boolean createResult = accessor.create(path, l0, AccessOption.PERSISTENT); Assert.assertTrue(createResult); List<Integer> data = (List<Integer>) accessor.get(path, null, AccessOption.PERSISTENT); Assert.assertEquals(data, l0); boolean setResult = accessor.set(path, l1, 0, AccessOption.PERSISTENT); Assert.assertTrue(setResult); data = (List<Integer>) accessor.get(path, null, AccessOption.PERSISTENT); Assert.assertEquals(data, l1); System.out.println("END " + testName + " at " + new Date(System.currentTimeMillis())); }</code><technical_language>need test regular constructor a custom serializer</technical_language>

Target:
public void testSyncCreateWithCustomSerializer() { String className = TestHelper.getTestClassName(); String methodName = TestHelper.getTestMethodName(); String testName = className + "_" + methodName; System.out.println("START " + testName + " at " + new Date(System.currentTimeMillis())); String path = String.format("/%s/%s", _rootPath, "msg_0"); ZkBaseDataAccessor<List<Integer>> accessor = new ZkBaseDataAccessor<>(ZK_ADDR, LIST_SERIALIZER); List<Integer> l0 = ImmutableList.of(1, 2, 3); List<Integer> l1 = ImmutableList.of(4, 5, 6); boolean createResult = accessor.create(path, l0, AccessOption.PERSISTENT); Assert.assertTrue(createResult); List<Integer> data = (List<Integer>) accessor.get(path, null, AccessOption.PERSISTENT); Assert.assertEquals(data, l0); boolean setResult = accessor.set(path, l1, 0, AccessOption.PERSISTENT); Assert.assertTrue(setResult); data = (List<Integer>) accessor.get(path, null, AccessOption.PERSISTENT); Assert.assertEquals(data, l1); accessor.close(); System.out.println("END " + testName + " at " + new Date(System.currentTimeMillis())); }
Source:
<code>public String allActiveAlertDefinitions(String query) throws URISyntaxException, IOException { <START> final Executor executor = Executor.newInstance(getHttpClient(100, 5000, 1)); <END> URI uri = new URIBuilder().setPath(config.getProxyControllerUrl() + "/checks/all-active-alert-definitions") .setParameter("query", query).build(); return executor.execute(Request.Get(uri)).returnContent().asString(); }</code><technical_language>100ms socket timeout? work, need settings configurable (Spring properties class)</technical_language>

Target:
public String allActiveAlertDefinitions(String query) throws URISyntaxException, IOException { URI uri = new URIBuilder().setPath(config.getProxyControllerUrl() + "/checks/all-active-alert-definitions") .setParameter("query", query).build(); return getExecutor().execute(Request.Get(uri)).returnContent().asString(); }
Source:
<code>public Optional<String> switchBoard() { List<String> boardNames = getAllBoardNames(); <START> if (getLastOpenBoard().isPresent() && getAllBoardNames().size() > 1) { <END> int lastBoard = boardNames.indexOf(getLastOpenBoard().get()); int index = (lastBoard + 1) % boardNames.size(); setLastOpenBoard(boardNames.get(index)); } else if (!getLastOpenBoard().isPresent() && getAllBoardNames().size() > 1) { setLastOpenBoard(boardNames.get(0)); } return getLastOpenBoard(); }</code><technical_language>explanatory variable clarify intention of complicated conditions</technical_language>

Target:
public Optional<String> switchBoard() { setBoardToSwitch(); return getLastOpenBoard(); }
Source:
<code>public synchronized void finishInsertIntoExistingTable( ConnectorSession session, String databaseName, String tableName, Path currentLocation, List<String> fileNames, PartitionStatistics statisticsUpdate) { setShared(); SchemaTableName schemaTableName = new SchemaTableName(databaseName, tableName); Action<TableAndMore> oldTableAction = tableActions.get(schemaTableName); if (oldTableAction == null || oldTableAction.getData().getTable().isTemporary()) { Table table = getTable(databaseName, tableName) .orElseThrow(() -> new TableNotFoundException(schemaTableName)); <START> PartitionStatistics currentStatistics = getTableStatistics(databaseName, tableName); <END> HdfsContext context = new HdfsContext(session, databaseName, tableName); tableActions.put( schemaTableName, new Action<>( ActionType.INSERT_EXISTING, new TableAndMore( table, Optional.empty(), Optional.of(currentLocation), Optional.of(fileNames), false, merge(currentStatistics, statisticsUpdate), statisticsUpdate), context)); return; } switch (oldTableAction.getType()) { case DROP: throw new TableNotFoundException(schemaTableName); case ADD: case ALTER: case INSERT_EXISTING: throw new UnsupportedOperationException("Inserting into an unpartitioned table that were added, altered, or inserted into in the same transaction is not supported"); default: throw new IllegalStateException("Unknown action type"); } }</code><technical_language>I if I understood change -- this change semantic oldTableAction == null</technical_language>

Target:
public synchronized void finishInsertIntoExistingTable( ConnectorSession session, String databaseName, String tableName, Path currentLocation, List<String> fileNames, PartitionStatistics statisticsUpdate) { setShared(); SchemaTableName schemaTableName = new SchemaTableName(databaseName, tableName); Action<TableAndMore> oldTableAction = tableActions.get(schemaTableName); if (oldTableAction == null || oldTableAction.getData().getTable().getTableType().equals(TEMPORARY_TABLE)) { Table table = getTable(databaseName, tableName) .orElseThrow(() -> new TableNotFoundException(schemaTableName)); PartitionStatistics currentStatistics = getTableStatistics(databaseName, tableName); HdfsContext context = new HdfsContext(session, databaseName, tableName); tableActions.put( schemaTableName, new Action<>( ActionType.INSERT_EXISTING, new TableAndMore( table, Optional.empty(), Optional.of(currentLocation), Optional.of(fileNames), false, merge(currentStatistics, statisticsUpdate), statisticsUpdate), context)); return; } switch (oldTableAction.getType()) { case DROP: throw new TableNotFoundException(schemaTableName); case ADD: case ALTER: case INSERT_EXISTING: throw new UnsupportedOperationException("Inserting into an unpartitioned table that were added, altered, or inserted into in the same transaction is not supported"); default: throw new IllegalStateException("Unknown action type"); } }
Source:
<code>protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { File file = ServletUtils.makeFileFromSanePath(request.getPathInfo(), base); file = checkForIndex(request, response, file, request.getPathInfo()); <START> ServletUtils.sendFile(request, response, file, type, cache, file == base && required); <END> }</code><technical_language>remove file==base entire tree effected</technical_language>

Target:
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { File file = ServletUtils.makeFileFromSanePath(request.getPathInfo(), base); file = checkForIndex(request, response, file, request.getPathInfo()); ServletUtils.sendFile(request, response, file, type, cache, required); }
Source:
<code>private void setupView(final ProcessConfig processConfig) { <START> String runtimeStrategy = ClientRuntimeStrategy.SINGLETON.getValue(view.getTranslationService()); <END> if (processConfig.getRuntimeStrategy() != null && !"".equals(processConfig.getRuntimeStrategy())) { runtimeStrategy = runtimeStrategyMapping.get(processConfig.getRuntimeStrategy()).getValue(view.getTranslationService()); } String mergeMode = ClientMergeMode.MERGE_COLLECTIONS.getValue(view.getTranslationService()); if (processConfig.getMergeMode() != null && !"".equals(processConfig.getMergeMode())) { mergeMode = ClientMergeMode.valueOf(processConfig.getMergeMode()).getValue(view.getTranslationService()); } this.view.setContent(runtimeStrategy, processConfig.getKBase(), processConfig.getKSession(), mergeMode); }</code><technical_language>@bxf12315 @cristianonicolai this <LINK_0> this default ClientRuntimeStrategy.PER_PROCESS_INSTANCE sense modify this later, RHPAM-2120 development</technical_language>

Target:
private void setupView(final ProcessConfig processConfig) { final String runtimeStrategy = ClientRuntimeStrategy.valueOf(processConfig.getRuntimeStrategy()).getValue(view.getTranslationService()); final String mergeMode = ClientMergeMode.valueOf(processConfig.getMergeMode()).getValue(view.getTranslationService()); this.view.setContent(runtimeStrategy, processConfig.getKBase(), processConfig.getKSession(), mergeMode); }
Source:
<code>private Interval getInterval(LocalDate earliestPossibleDate, LocalDate currentUnitDate, Pageable pageable, ChronoUnit timeUnit) { LocalDate requestedStartDate = currentUnitDate.minus(pageable.getOffset() + pageable.getPageSize() - 1L, timeUnit); LocalDate startDate = TimeUtil.max(requestedStartDate, earliestPossibleDate); if (timeUnit == ChronoUnit.WEEKS) { startDate = TimeUtil.getStartOfWeek(startDate); } LocalDate endDate = currentUnitDate.minus(pageable.getOffset() - 1L, timeUnit); <START> Require.that(!endDate.isBefore(startDate), <END> () -> InvalidDataException.dateTooEarly(requestedStartDate, earliestPossibleDate)); return Interval.createInterval(startDate, endDate); }</code><technical_language>endDate.isBefore(earliestPossibleDate) more logical</technical_language>

Target:
private Interval getInterval(LocalDate earliestPossibleDate, LocalDate currentUnitDate, Pageable pageable, ChronoUnit timeUnit) { LocalDate requestedStartDate = currentUnitDate.minus(pageable.getOffset() + pageable.getPageSize() - 1L, timeUnit); LocalDate startDate = TimeUtil.max(requestedStartDate, earliestPossibleDate); if (timeUnit == ChronoUnit.WEEKS) { startDate = TimeUtil.getStartOfWeek(startDate); } LocalDate endDate = currentUnitDate.minus(pageable.getOffset() - 1L, timeUnit); Require.that(!endDate.isBefore(earliestPossibleDate), () -> InvalidDataException.dateTooEarly(endDate, earliestPossibleDate)); return Interval.createInterval(startDate, endDate); }
Source:
<code>private Optional<Type> getCommonSuperTypeForRow(RowType firstType, RowType secondType) { <START> ImmutableList.Builder<Type> commonParameterTypes = ImmutableList.builder(); <END> ImmutableList.Builder<String> commonParameterNames = ImmutableList.builder(); List<RowField> firstFields = firstType.getFields(); List<RowField> secondFields = secondType.getFields(); if (firstFields.size() != secondFields.size()) { return Optional.empty(); } for (int i = 0; i < firstFields.size(); i++) { Optional<Type> commonParameterType = getCommonSuperType(firstFields.get(i).getType(), secondFields.get(i).getType()); if (!commonParameterType.isPresent()) { return Optional.empty(); } commonParameterTypes.add(commonParameterType.get()); Optional<String> firstParameterName = firstFields.get(i).getName(); Optional<String> secondParameterName = secondFields.get(i).getName(); if (commonParameterNames != null && firstParameterName.isPresent() && secondParameterName.isPresent() && firstParameterName.get().equals(secondParameterName.get())) { commonParameterNames.add(firstParameterName.get()); } else { commonParameterNames = null; } } return Optional.of(new RowType(commonParameterTypes.build(), commonParameterNames == null ? Optional.empty() : Optional.of(commonParameterNames.build()))); }</code><technical_language>variables move down, closer for loop</technical_language>

Target:
private Optional<Type> getCommonSuperTypeForRow(RowType firstType, RowType secondType) { List<RowField> firstFields = firstType.getFields(); List<RowField> secondFields = secondType.getFields(); if (firstFields.size() != secondFields.size()) { return Optional.empty(); } ImmutableList.Builder<Type> commonParameterTypes = ImmutableList.builder(); List<Optional<String>> commonParameterNames = new ArrayList<>(); for (int i = 0; i < firstFields.size(); i++) { Optional<Type> commonParameterType = getCommonSuperType(firstFields.get(i).getType(), secondFields.get(i).getType()); if (!commonParameterType.isPresent()) { return Optional.empty(); } commonParameterTypes.add(commonParameterType.get()); Optional<String> firstParameterName = firstFields.get(i).getName(); Optional<String> secondParameterName = secondFields.get(i).getName(); if (firstParameterName.equals(secondParameterName)) { commonParameterNames.add(firstParameterName); } else { commonParameterNames.add(Optional.empty()); } } List<String> names = null; if (commonParameterNames.stream().allMatch(Optional::isPresent)) { names = commonParameterNames.stream() .map(Optional::get) .collect(toImmutableList()); } return Optional.of(new RowType(commonParameterTypes.build(), Optional.ofNullable(names))); }
Source:
<code>public List<UserDto> getUsersByProjectUUId(final String projectUUID) { final List<UserDto> users = new ArrayList<>(); try { if (projectUUID != null) { final SQLQuery query = this.getSession().createSQLQuery(User.GET_USERS_BY_PROJECT_UUID); query.setParameter("project_uuid", projectUUID); final List<Object> results = query.list(); for (final Object o : results) { final Object[] user = (Object[]) o; final Integer userId = (Integer) user[0]; final String username = (String) user[1]; final String firstName = (String) user[2]; final String lastName = (String) user[3]; final String role = (String) user[4]; final Integer status = (Integer) user[5]; final String email = (String) user[6]; final UserDto u = new UserDto(userId, username, firstName, lastName, role, status, email); users.add(u); } } } catch (final HibernateException e) { <START> throw new MiddlewareQueryException("Error in getUsersByProjectUUId(project_uuid=" + projectUUID + ")" + e.getMessage(), e); <END> } return users; }</code><technical_language>Concatenation of e.getMessage() is redundant</technical_language>

Target:
public List<UserDto> getUsersByProjectUUId(final String projectUUID) { final List<UserDto> users = new ArrayList<>(); try { if (projectUUID != null) { final SQLQuery query = this.getSession().createSQLQuery(User.GET_USERS_BY_PROJECT_UUID); query.setParameter("project_uuid", projectUUID); final List<Object> results = query.list(); for (final Object o : results) { final Object[] user = (Object[]) o; final Integer userId = (Integer) user[0]; final String username = (String) user[1]; final String firstName = (String) user[2]; final String lastName = (String) user[3]; final String role = (String) user[4]; final Integer status = (Integer) user[5]; final String email = (String) user[6]; final UserDto u = new UserDto(userId, username, firstName, lastName, role, status, email); users.add(u); } } } catch (final HibernateException e) { throw new MiddlewareQueryException("Error in getUsersByProjectUUId(project_uuid=" + projectUUID + ")", e); } return users; }
Source:
<code><START> protected int getMaxFieldWidth() { <END> return convertWidthInCharsToPixels(40); }</code><technical_language>this class @noextend declaring protected mentioning subclasses sense</technical_language>

Target:
private int getMaxFieldWidth() { return convertWidthInCharsToPixels(25); }
Source:
<code>protected void cleanupExecutionBlock(List<TajoIdProtos.ExecutionBlockIdProto> executionBlockIds) { String cleanupMessage = ""; String prefix = ""; for (TajoIdProtos.ExecutionBlockIdProto eachEbId: executionBlockIds) { <START> cleanupMessage += prefix + (new ExecutionBlockId(eachEbId)).toString(); <END> prefix = ","; } LOG.info("cleanup executionBlocks: " + cleanupMessage); NettyClientBase rpc = null; List<TajoMasterProtocol.WorkerResourceProto> workers = getAllWorker(); TajoWorkerProtocol.ExecutionBlockListProto.Builder builder = TajoWorkerProtocol.ExecutionBlockListProto.newBuilder(); builder.addAllExecutionBlockId(Lists.newArrayList(executionBlockIds)); TajoWorkerProtocol.ExecutionBlockListProto executionBlockListProto = builder.build(); for (TajoMasterProtocol.WorkerResourceProto worker : workers) { try { if (worker.getPeerRpcPort() == 0) continue; rpc = connPool.getConnection(NetUtils.createSocketAddr(worker.getHost(), worker.getPeerRpcPort()), TajoWorkerProtocol.class, true); TajoWorkerProtocol.TajoWorkerProtocolService tajoWorkerProtocolService = rpc.getStub(); tajoWorkerProtocolService.cleanupExecutionBlocks(null, executionBlockListProto, NullCallback.get()); } catch (Exception e) { continue; } finally { connPool.releaseConnection(rpc); } } }</code><technical_language>change StringBuilder</technical_language>

Target:
protected void cleanupExecutionBlock(List<TajoIdProtos.ExecutionBlockIdProto> executionBlockIds) { StringBuilder cleanupMessage = new StringBuilder(); String prefix = ""; for (TajoIdProtos.ExecutionBlockIdProto eachEbId: executionBlockIds) { cleanupMessage.append(prefix).append(new ExecutionBlockId(eachEbId).toString()); prefix = ","; } LOG.info("cleanup executionBlocks: " + cleanupMessage); NettyClientBase rpc = null; List<TajoMasterProtocol.WorkerResourceProto> workers = getAllWorker(); TajoWorkerProtocol.ExecutionBlockListProto.Builder builder = TajoWorkerProtocol.ExecutionBlockListProto.newBuilder(); builder.addAllExecutionBlockId(Lists.newArrayList(executionBlockIds)); TajoWorkerProtocol.ExecutionBlockListProto executionBlockListProto = builder.build(); for (TajoMasterProtocol.WorkerResourceProto worker : workers) { try { if (worker.getPeerRpcPort() == 0) continue; rpc = connPool.getConnection(NetUtils.createSocketAddr(worker.getHost(), worker.getPeerRpcPort()), TajoWorkerProtocol.class, true); TajoWorkerProtocol.TajoWorkerProtocolService tajoWorkerProtocolService = rpc.getStub(); tajoWorkerProtocolService.cleanupExecutionBlocks(null, executionBlockListProto, NullCallback.get()); } catch (Exception e) { continue; } finally { connPool.releaseConnection(rpc); } } }
Source:
<code>public void shouldTryReturnNotNull() { <START> Try<Object> _try = Try(() -> 1); <END> assertThat(_try).isNotNull(); assertThat(_try.isSuccess()).isTrue(); }</code><technical_language>Minor suggestions: - consider making local variables final (@danieldietrich likes way) - name this t instead of starting a weird underscore, scope is small</technical_language>

Target:
public void shouldTryReturnNotNull() { final Try<?> t = Try(() -> 1); assertThat(t).isNotNull(); assertThat(t.isSuccess()).isTrue(); }
Source:
<code>public byte[] read(Path path, BiConsumer<Long, Long> pc) { Path nativePath = virtualToNative(path); ensureCan(path, Permission.READ); if (nativePath.toFile().isDirectory()) { <START> return null; <END> } try { return Files.readAllBytes(nativePath); } catch (IOException ioe) { throw new IllegalStateException(ioe); } }</code><technical_language>This easier reason if raised exception. return null</technical_language>

Target:
public byte[] read(Path path, BiConsumer<Long, Long> pc) { Path nativePath = virtualToNative(path); ensureCan(path, Permission.READ); try { return Files.readAllBytes(nativePath); } catch (IOException ioe) { throw new IllegalStateException(ioe); } }
Source:
<code>public void addListener(Listener listener) { Assert.notNull(listener, "Listener cannot be null"); if (this.listeners.size() == 0) { this.delegate.addConfirmListener(this); this.delegate.addReturnListener(this); } if (!this.listeners.values().contains(listener)){ this.listeners.put(listener.getUUID(), listener); this.pendingConfirms.put(listener, Collections.synchronizedSortedMap(new TreeMap<Long, PendingConfirm>())); if (logger.isDebugEnabled()) { <START> logger.debug("Added listener " + listener); <END> } } }</code><technical_language>code shown GH of changes, but: if (!this.listeners.values().contains(listener)){ this.listeners.put(listener.getUUID(), listener); So, listener change UUID runtime? puIfAbsent good here? key hash nature get a performance</technical_language>

Target:
public void addListener(Listener listener) { Assert.notNull(listener, "Listener cannot be null"); if (this.listeners.size() == 0) { this.delegate.addConfirmListener(this); this.delegate.addReturnListener(this); } if (this.listeners.putIfAbsent(listener.getUUID(), listener) == null) { this.pendingConfirms.put(listener, new ConcurrentSkipListMap<Long, PendingConfirm>()); if (logger.isDebugEnabled()) { logger.debug("Added listener " + listener); } } }
Source:
<code>private boolean isClockwiseWay(TLongList c){ int csize = c.size(); if(csize == 0){ return true; } int mask = 0xffffffff; long middleY = 0; for(int i=0; i< csize; i++) { middleY += (c.get(i) & mask); } middleY /= (long) csize; double clockwiseSum = 0; boolean firstDirectionUp = false; int previousX = Integer.MIN_VALUE; int firstX = Integer.MIN_VALUE; int prevX = (int) (c.get(0) >> 32); int prevY = (int) (c.get(0) & mask); for (int i = 1; i < csize; i++) { int x = (int) (c.get(i) >> 32); <START> int y = (int) (c.get(i) & mask); <END> int rX = ray_intersect_x(prevX, prevY, x, y, (int) middleY); if (rX != Integer.MIN_VALUE) { boolean skipSameSide = (y <= middleY) == (prevY <= middleY); if (skipSameSide) { continue; } boolean directionUp = prevY >= middleY; if (firstX == -Integer.MIN_VALUE) { firstDirectionUp = directionUp; firstX = rX; } else { boolean clockwise = (!directionUp) == (previousX < rX); if (clockwise) { clockwiseSum += Math.abs(previousX - rX); } else { clockwiseSum -= Math.abs(previousX - rX); } } previousX = rX; prevX = x; prevY = y; } } if(firstX != -360){ boolean clockwise = (!firstDirectionUp) == (previousX < firstX); if(clockwise){ clockwiseSum += Math.abs(previousX - firstX); } else { clockwiseSum -= Math.abs(previousX - firstX); } } return clockwiseSum >= 0; }</code><technical_language>here, access array costs some multiplication of numbers</technical_language>

Target:
private boolean isClockwiseWay(TLongList c){ int csize = c.size(); if(csize == 0){ return true; } int mask = 0xffffffff; long middleY = 0; for(int i=0; i< csize; i++) { middleY += (c.get(i) & mask); } middleY /= (long) csize; double clockwiseSum = 0; boolean firstDirectionUp = false; int previousX = Integer.MIN_VALUE; int firstX = Integer.MIN_VALUE; int prevX = (int) (c.get(0) >> 32); int prevY = (int) (c.get(0) & mask); for (int i = 1; i < csize; i++) { long ci = c.get(i); int x = (int) (ci >> 32); int y = (int) (ci & mask); int rX = ray_intersect_x(prevX, prevY, x, y, (int) middleY); if (rX != Integer.MIN_VALUE) { boolean skipSameSide = (y <= middleY) == (prevY <= middleY); if (skipSameSide) { continue; } boolean directionUp = prevY >= middleY; if (firstX == -Integer.MIN_VALUE) { firstDirectionUp = directionUp; firstX = rX; } else { boolean clockwise = (!directionUp) == (previousX < rX); if (clockwise) { clockwiseSum += Math.abs(previousX - rX); } else { clockwiseSum -= Math.abs(previousX - rX); } } previousX = rX; prevX = x; prevY = y; } } if(firstX != -360){ boolean clockwise = (!firstDirectionUp) == (previousX < firstX); if(clockwise){ clockwiseSum += Math.abs(previousX - firstX); } else { clockwiseSum -= Math.abs(previousX - firstX); } } return clockwiseSum >= 0; }
Source:
<code>public void evaluate_shouldReturnAllPatientsCurrentlyNotActiveOnDrugs() throws Exception { cohortDefinition.setOnlyCurrentlyActive(false); Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); <START> System.out.println("Currently Not on Drugs " + cohort.getMemberIds() + " " + cohortDefinition + "==="); <END> }</code><technical_language>a this? <LINK_0></technical_language>

Target:
public void evaluate_shouldReturnAllPatientsCurrentlyNotActiveOnDrugs() throws Exception { cohortDefinition.setOnlyCurrentlyActive(false); Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); Assert.assertTrue(cohort.contains(8)); Assert.assertEquals(1, cohort.size()); }
Source:
<code>Court GetCourt(@PathVariable("id") Long id) { if (id == null) { LogSystem.LogEvent("non id passed to controller"); throw new IncorrectResultSizeDataAccessException("non courtId passed",1); } <START> Court court = courtManager.GetCourtById(id); <END> return court; }</code><technical_language>want check for null return a NotFoundException (or exception caught handler returns 404)</technical_language>

Target:
Court GetCourt(@PathVariable("id") Long id) throws NotFoundException { Court court = courtManager.GetCourtById(id); if (court == null) { throw new NotFoundException("Court Not Found"); } return court; }
Source:
<code>public Condition createCondition(Condition condition) { List<String> errors = new ArrayList<>(); if (condition.isEmpty()) { errors.add("Condition resource is null"); throw new NullPointerException("Condition resource cannot be null"); } if (condition.getSubject().isEmpty()) { errors.add("No subject"); throw new NullPointerException("condition Subject cannot be null"); } Obs obs = Context.getObsService() .saveObs(FHIRConditionUtil.generateOpenMrsObsFromFHIRCondition(condition), ""); <START> FHIRUtils.checkGeneratorErrorList(errors); <END> return FHIRConditionUtil.generateFHIRConditionFromOpenMRSObs(obs); }</code><technical_language>Do need throwing exceptions errors</technical_language>

Target:
public Condition createCondition(Condition condition) { if (condition.isEmpty()) { throw new UnprocessableEntityException("condition resource cannot be null"); } if (condition.getSubject().isEmpty()) { throw new UnprocessableEntityException("condition resource cannot be null"); } Obs obs = Context.getObsService() .saveObs(FHIRConditionUtil.generateOpenMrsObsFromFHIRCondition(condition), ""); return FHIRConditionUtil.generateFHIRConditionFromOpenMRSObs(obs); }
Source:
<code>public void createControl(Composite parent, IEEFFormContainer formContainer) { super.createControl(parent, formContainer); EEFWidgetFactory widgetFactory = formContainer.getWidgetFactory(); Composite composite = parent; boolean <START> isInGroup = <END> this.getWidgetDescription().eContainer() instanceof EEFGroupDescription; boolean isCheckbox = this.getWidgetDescription() instanceof EEFCheckboxDescription; boolean needsLabel = isInGroup || (!Util.isBlank(this.getWidgetDescription().getLabelExpression()) && !isCheckbox); if (needsLabel) { this.label = widgetFactory.createStyledText(composite, SWT.NONE); this.label.setEditable(false); } boolean needsHelp = isInGroup || !Util.isBlank(this.getWidgetDescription().getHelpExpression()); if (needsHelp) { this.help = widgetFactory.createCLabel(composite, ""); if (!Util.isBlank(this.getWidgetDescription().getHelpExpression())) { this.help.setImage(EEFIdeUiPlugin.getPlugin().getImageRegistry().get(Icons.HELP)); this.help.setToolTipText(""); } } this.createMainControl(composite, formContainer); }</code><technical_language>in a group</technical_language>

Target:
public void createControl(Composite parent, IEEFFormContainer formContainer) { super.createControl(parent, formContainer); EEFWidgetFactory widgetFactory = formContainer.getWidgetFactory(); Composite composite = parent; boolean isInGroup = this.getWidgetDescription().eContainer() instanceof EEFGroupDescription; boolean needsSeparatedLabel = this.needSeparatedLabel(); boolean isBlankLabel = Util.isBlank(this.getWidgetDescription().getLabelExpression()); boolean needsLabel = isInGroup || (!isBlankLabel && needsSeparatedLabel); boolean needsHelp = isInGroup || !Util.isBlank(this.getWidgetDescription().getHelpExpression()); if (!isInGroup && (needsLabel || needsHelp)) { composite = widgetFactory.createComposite(parent); int numColumn = 1; if (needsLabel) { numColumn = numColumn + 1; } if (needsHelp) { numColumn = numColumn + 1; } GridLayout layout = new GridLayout(numColumn, false); composite.setLayout(layout); GridData layoutData = new GridData(GridData.FILL_HORIZONTAL); layoutData.horizontalSpan = 1; composite.setLayoutData(layoutData); } if (needsLabel) { this.label = widgetFactory.createStyledText(composite, SWT.NONE); this.label.setEditable(false); this.label.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING)); } if (needsHelp) { this.help = widgetFactory.createCLabel(composite, ""); if (!Util.isBlank(this.getWidgetDescription().getHelpExpression())) { this.help.setImage(EEFIdeUiPlugin.getPlugin().getImageRegistry().get(Icons.HELP)); this.help.setToolTipText(""); } } this.createMainControl(composite, formContainer); }
Source:
<code>private void initializeFavoriteCheck() { if (ConnectorFactory.getConnector(cache).supportsAddToFavorite(cache, typeSelected)) { if (premFavPoints > 0) { favCheck.setVisibility(View.VISIBLE); <START> favCheck.setText(getString(R.string.fav_points_remaining, String.valueOf(premFavPoints))); <END> } } else { favCheck.setVisibility(View.GONE); } }</code><technical_language>either: - fix string %d instead of %s - do implicit .toString() do job calling String.valueOf explicitly</technical_language>

Target:
private void initializeFavoriteCheck() { if (ConnectorFactory.getConnector(cache).supportsAddToFavorite(cache, typeSelected)) { if (premFavPoints > 0) { favCheck.setVisibility(View.VISIBLE); favCheck.setText(getString(R.string.fav_points_remaining, premFavPoints)); } } else { favCheck.setVisibility(View.GONE); } }
Source:
<code>public void testParseEncoding_badEncoding() { try { RawParseUtils.parseEncoding("encoding xyz\n".getBytes()); fail("should throw an UnsupportedCharsetException: xyz"); } catch (UnsupportedCharsetException e) { <START> assertNotNull(e); <END> assertEquals("xyz", e.getMessage()); } }</code><technical_language>This is true. throw null object</technical_language>

Target:
public void testParseEncoding_badEncoding() { try { RawParseUtils.parseEncoding(Constants .encodeASCII("encoding xyz\n")); fail("should throw an UnsupportedCharsetException: xyz"); } catch (UnsupportedCharsetException e) { assertEquals("xyz", e.getMessage()); } }
Source:
<code>protected void setPropertyOnUserModel(Property<Object> userModelProperty, UserModel user, String ldapAttrValue) { if (ldapAttrValue == null) { if (Boolean.class.equals(userModelProperty.getJavaClass()) || boolean.class.equals(userModelProperty.getJavaClass())) { userModelProperty.setValue(user, false); } else { userModelProperty.setValue(user, null); } userModelProperty.setValue(user, null); } else { Class<Object> clazz = userModelProperty.getJavaClass(); if (String.class.equals(clazz)) { userModelProperty.setValue(user, ldapAttrValue); } else if (Boolean.class.equals(clazz) || boolean.class.equals(clazz)) { <START> Boolean boolVal = false; <END> if (ldapAttrValue.equals("TRUE")) { boolVal = true; } userModelProperty.setValue(user, boolVal); } else { logger.warnf("Don't know how to set the property '%s' on user '%s' . Value of LDAP attribute is '%s' ", userModelProperty.getName(), user.getUsername(), ldapAttrValue.toString()); } } }</code><technical_language>"Boolean boolVal = Boolean.valueOf(ldapAttrValue)" . handle case ldapAttrValue is "TRUE" "true" (probably compatibility LDAP servers)</technical_language>

Target:
protected void setPropertyOnUserModel(Property<Object> userModelProperty, UserModel user, String ldapAttrValue) { if (ldapAttrValue == null) { if (Boolean.class.equals(userModelProperty.getJavaClass()) || boolean.class.equals(userModelProperty.getJavaClass())) { userModelProperty.setValue(user, false); } else { userModelProperty.setValue(user, null); } userModelProperty.setValue(user, null); } else { Class<Object> clazz = userModelProperty.getJavaClass(); if (String.class.equals(clazz)) { userModelProperty.setValue(user, ldapAttrValue); } else if (Boolean.class.equals(clazz) || boolean.class.equals(clazz)) { Boolean boolVal = Boolean.valueOf(ldapAttrValue); userModelProperty.setValue(user, boolVal); } else { logger.warnf("Don't know how to set the property '%s' on user '%s' . Value of LDAP attribute is '%s' ", userModelProperty.getName(), user.getUsername(), ldapAttrValue.toString()); } } }
Source:
<code>private String getWebSocketURL(HttpRequest req) { <START> String protocol = "ws"; <END> if (isConnectionSecured) { protocol = "wss"; } String url = protocol + "://" + req.headers().get("Host") + req.getUri(); return url; }</code><technical_language>"ws" "wss" defined constants</technical_language>

Target:
private String getWebSocketURL(HttpRequest req) { String protocol = Constants.WEBSOCKET_PROTOCOL; if (isConnectionSecured) { protocol = Constants.WEBSOCKET_PROTOCOL_SECURED; } String url = protocol + "://" + req.headers().get("Host") + req.getUri(); return url; }
Source:
<code>private boolean isInEnrollList(StudentAttributes student, List<StudentAttributes> studentInfoList) { for (StudentAttributes studentInfo : studentInfoList) { <START> if (studentInfo.email.equals(student.email)) { <END> return true; } } return false; }</code><technical_language>This line updated; updated code of wrong method. Refer to: <LINK_0></technical_language>

Target:
private boolean isInEnrollList(StudentAttributes student, List<StudentAttributes> studentInfoList) { for (StudentAttributes studentInfo : studentInfoList) { if (studentInfo.email.equalsIgnoreCase(student.email)) { return true; } } return false; }
Source:
<code>public static void loadUrlBasedOnOsVersion(@NonNull final Context context, @NonNull final WebView webView, @NonNull final String url, @NonNull final WebViewStatusListener viewInterface, @NonNull final FullScreenErrorNotification errorNotification, @NonNull OkHttpClientProvider okHttpClientProvider) { if (!NetworkUtil.isConnected(context)) { errorNotification.showError(context, new IOException()); } else { errorNotification.hideError(); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { viewInterface.showLoadingProgress(); okHttpClientProvider.get().newCall(new Request.Builder() .url(url) .get() .build()) .enqueue(new Callback() { @Override public void onFailure(Call call, final IOException e) { <START> HANDLER.post((new Runnable() { <END> @Override public void run() { errorNotification.showError(context, e); viewInterface.hideLoadingProgress(); viewInterface.clearWebView(); } })); } @Override public void onResponse(Call call, final okhttp3.Response response) throws IOException { HANDLER.post(new Runnable() { @Override public void run() { final int responseCode = response.code(); if (responseCode >= HttpStatus.BAD_REQUEST) { errorNotification.showError(context, new HttpStatusException(Response.error(responseCode, ResponseBody.create(MediaType.parse("text/plain"), response.message())))); viewInterface.hideLoadingProgress(); viewInterface.clearWebView(); } else { webView.loadUrl(url); } } }); } }); } else { webView.loadUrl(url); } } }</code><technical_language>simply a callback creating new static handler object. webView.post( new Runnable() { @Override public void run() { } } );</technical_language>

Target:
public static void loadUrlBasedOnOsVersion(@NonNull final Context context, @NonNull final WebView webView, @NonNull final String url, @NonNull final WebViewStatusListener viewInterface, @NonNull final FullScreenErrorNotification errorNotification, @NonNull OkHttpClientProvider okHttpClientProvider) { if (!NetworkUtil.isConnected(context)) { errorNotification.showError(context, new IOException()); } else { errorNotification.hideError(); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { viewInterface.showLoadingProgress(); okHttpClientProvider.get().newCall(new Request.Builder() .url(url) .get() .build()) .enqueue(new Callback() { @Override public void onFailure(Call call, final IOException e) { webView.post((new Runnable() { @Override public void run() { errorNotification.showError(context, e); viewInterface.hideLoadingProgress(); viewInterface.clearWebView(); } })); } @Override public void onResponse(Call call, final okhttp3.Response response) throws IOException { webView.post(new Runnable() { @Override public void run() { final int responseCode = response.code(); if (responseCode >= HttpStatus.BAD_REQUEST) { errorNotification.showError(context, new HttpStatusException(Response.error(responseCode, ResponseBody.create(MediaType.parse("text/plain"), response.message())))); viewInterface.hideLoadingProgress(); viewInterface.clearWebView(); } else { webView.loadUrl(url); } } }); } }); } else { webView.loadUrl(url); } } }
Source:
<code>public boolean visit(MethodDeclaration node) { Block body= node.getBody(); if (body == null) return false; Selection selection= getSelection(); int nodeStart= body.getStartPosition(); int nodeExclusiveEnd= nodeStart + body.getLength(); if <START> (((nodeStart >= selection.getOffset()) || (selection.getExclusiveEnd() >= nodeExclusiveEnd))) <END> return false; return super.visit(node); }</code><technical_language>In this case readability is improved imho - in other case clear</technical_language>

Target:
public boolean visit(MethodDeclaration node) { Block body= node.getBody(); if (body == null) return false; Selection selection= getSelection(); int nodeStart= body.getStartPosition(); int nodeExclusiveEnd= nodeStart + body.getLength(); if ((nodeStart >= selection.getOffset()) || (selection.getExclusiveEnd() >= nodeExclusiveEnd)) return false; return super.visit(node); }
Source:
<code><START> public Task<List<OpResult>> multi(List<Op> ops, Executor executor) { <END> return Task.blocking(() -> _zkClient.multi(ops), executor) .recoverWith(e -> { if (e instanceof KeeperException) { e = getCause((KeeperException) e, ops); } return Task.failure(e); }); }</code><technical_language>This is technically incompatible. parseq's policy this for contrib project</technical_language>

Target:
public Task<List<OpResult>> multi(List<Op> ops, Executor executor) { return Task.blocking(() -> _zkClient.multi(ops), executor); }
Source:
<code><START> public ObjectId get(AnyObjectId id) throws IOException { <END> return root.get(id, reader); }</code><technical_language>Lets leave this get() part of public NoteMap API some callers prefer this variant</technical_language>

Target:
public ObjectId get(AnyObjectId id) throws IOException { Note n = root.getNote(id, reader); return n == null ? null : n.getData(); }