auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void setClanTag(String newValue) { if (StringUtils.isEmpty(newValue)) { <START> clanMenu.setVisible(false); <END> } else { Runnable setMenuItems = new Runnable() { @Override public void run() { clan = clanService.getClanByTag(player.getClan()); if (clan != null) { MenuItem page = new MenuItem(i18n.get("clan.visitPage")); page.setOnAction(event -> { platformService.showDocument(baseClanWebsite + clan.getClanId()); }); if (playerService.isOnline(clan.getLeaderName())) { MenuItem toLeader = new MenuItem(i18n.get("clan.toLeader")); toLeader.setOnAction(event -> { onClanTagClicked(); }); clanMenu.getItems().addAll(FXCollections.observableArrayList(toLeader, page)); } else { clanMenu.getItems().addAll(FXCollections.observableArrayList(page)); } } } }; executorService.submit(setMenuItems); clanMenu.setText(String.format(CLAN_TAG_FORMAT, newValue)); clanMenu.setVisible(true); } }</code><technical_language>If return here, avoid else { } reduce nesting :)</technical_language>

Target:
private void setClanTag(String newValue) { if (StringUtils.isEmpty(newValue)) { clanMenu.setVisible(false); return; } Optional.ofNullable(usernameLabel.getTooltip()).ifPresent(tooltip -> usernameLabel.setTooltip(null)); Optional.ofNullable(clanMenu.getTooltip()).ifPresent(tooltip -> clanMenu.setTooltip(null)); clanMenu.setText(String.format(CLAN_TAG_FORMAT, newValue)); clanMenu.setVisible(true); }
Source:
<code>public static QueryType sqlQueryType(String sqlQuery) { String query = sqlQuery.substring(0, sqlQuery.indexOf(" ")).toUpperCase(); <START> ; <END> switch (query) { case "UPDATE": sqlQueryType = QueryType.UPDATE; break; case "SELECT": sqlQueryType = QueryType.SELECT; break; case "DELETE": sqlQueryType = QueryType.DELETE; break; case "INSERT": sqlQueryType = QueryType.INSERT; break; } return sqlQueryType; }</code><technical_language>Extra ;</technical_language>

Target:
public static QueryType sqlQueryType(String sqlQuery) { String query = sqlQuery.substring(0, sqlQuery.indexOf(" ")).toUpperCase(); switch (query) { case "UPDATE": sqlQueryType = QueryType.UPDATE; break; case "SELECT": sqlQueryType = QueryType.SELECT; break; case "DELETE": sqlQueryType = QueryType.DELETE; break; case "INSERT": sqlQueryType = QueryType.INSERT; break; } return sqlQueryType; }
Source:
<code>public Set<Issue> getAllIssues() { <START> final Set<Issue> issues = new HashSet<>(); <END> for (final RuleInspector inspector : all()) { for (Check check : inspector.getChecks()) { if (check.hasIssues()) { issues.addAll(check.getIssues()); } } } for (final Check generalCheck : generalChecks) { if (generalCheck.hasIssues()) { issues.addAll(generalCheck.getIssues()); } } return issues; }</code><technical_language>Formatting</technical_language>

Target:
public Set<Issue> getAllIssues() { final Set<Issue> issues = new HashSet<>(); all().stream() .flatMap(inspector -> inspector.getChecks().stream()) .filter(Check::hasIssues) .map(Check::getIssues) .forEach(issues::addAll); for (final Check generalCheck : generalChecks) { if (generalCheck.hasIssues()) { issues.addAll(generalCheck.getIssues()); } } return issues; }
Source:
<code>public void initialize( IndexDescriptor descriptor, IndexSamplingConfig samplingConfig ) { assert state == State.NONE; layout = layout( descriptor ); treeKey = layout.newKey(); treeValue = layout.newValue(); schemaIndex = new NativeSchemaIndex<>( pageCache, fs, indexFile, layout, monitor, descriptor, indexId ); <START> if ( uniqueSampler( descriptor ) ) <END> { uniqueSampler = new UniqueIndexSampler(); } else { generalSampler = new DefaultNonUniqueIndexSampler( samplingConfig.sampleSizeLimit() ); } state = State.INIT; }</code><technical_language>Method called isUnique, uniqueSampler</technical_language>

Target:
private void initialize( IndexDescriptor descriptor, IndexSamplingConfig samplingConfig ) { assert state == State.NONE; layout = layout( descriptor ); treeKey = layout.newKey(); treeValue = layout.newValue(); schemaIndex = new NativeSchemaIndex<>( pageCache, fs, indexFile, layout, monitor, descriptor, indexId ); if ( isUnique( descriptor ) ) { uniqueSampler = new UniqueIndexSampler(); } else { generalSampler = new DefaultNonUniqueIndexSampler( samplingConfig.sampleSizeLimit() ); } state = State.INIT; }
Source:
<code>private ConfigKey getKeystorePassKey() throws SQLException { String keyStorePassVersion = appConfig.getString(KEYSTORE_PASS_VERSION); if (keyStorePassVersion == null) { keyStorePassVersion = DEFAULT_KEYSTORE_PASS_VERSION; } ConfigKey keyStorePassKey = ConfigKeyFactory.getInstance().generateBlankConfigKey("keystorePass", "String"); keyStorePassKey.setVersion(keyStorePassVersion); <START> return getConfigDAO().getKey(keyStorePassKey); <END> }</code><technical_language>Consider wrapping in a method key. in getKeystorePassKey getKeystoreUrlKey methods</technical_language>

Target:
private ConfigKey getKeystorePassKey() throws SQLException { String keyStorePassVersion = appConfig.getString(KEYSTORE_PASS_VERSION); if (keyStorePassVersion == null) { keyStorePassVersion = DEFAULT_KEYSTORE_PASS_VERSION; } ConfigKey keyStorePassKey = ConfigKeyFactory.getInstance().generateBlankConfigKey("keystorePass", "String"); keyStorePassKey.setVersion(keyStorePassVersion); return getConfigKey(keyStorePassKey); }
Source:
<code>@Override public void sendRequest(Request request) { <START> if (null == request.getType()) request.setType(Type.CON); <END> top.sendRequest(request); request.setAcknowledged(true); }</code><technical_language>please put statement a new line in curly braces</technical_language>

Target:
@Override public void sendRequest(Request request) { if (null == request.getType()) { request.setType(Type.CON); } top.sendRequest(request); request.setAcknowledged(true); }
Source:
<code>protected boolean mustCheckName(DetailAST ast) { boolean checkName = true; if (ignoreOverridden && isOverriddenMethod(ast) || ast.getParent().getType() == TokenTypes.LITERAL_CATCH || CheckUtil.isReceiverParameter(ast) || !matchAccessModifiers(getAccessModifier(ast)) <START> || ast.getParent().getType() == TokenTypes.LAMBDA) { <END> checkName = false; } return checkName; }</code><technical_language>Please move this line closer TokenTypes.LITERAL_CATCH. Recheck code coverage this move</technical_language>

Target:
protected boolean mustCheckName(DetailAST ast) { boolean checkName = true; if (ignoreOverridden && isOverriddenMethod(ast) || ast.getParent().getType() == TokenTypes.LITERAL_CATCH || ast.getParent().getParent().getType() == TokenTypes.LAMBDA || CheckUtil.isReceiverParameter(ast) || !matchAccessModifiers(getAccessModifier(ast))) { checkName = false; } return checkName; }
Source:
<code>public IterationResult advance0() { currentRows = null; while (recordIterator.tryAdvance()) { HeapRow row = prepareRow(recordIterator.getKey(), recordIterator.getValue()); if (row != null) { if (currentRows == null) { currentRows = new ArrayList<>(BATCH_SIZE); } currentRows.add(row); if (currentRows.size() == BATCH_SIZE) { break; } } } if (!map.getMapServiceContext().getService().validateMigrationStamp(migrationStamp)) { throw QueryException.error(SqlErrorCode.PARTITION_MIGRATED, "Map scan failed due to concurrent partition migration " + "(result consistency cannot be guaranteed)"); } if (map.isDestoyed()) { throw QueryException.error(SqlErrorCode.MAP_DESTROYED, "IMap has been destroyed concurrently: " + mapName); } <START> boolean done = !recordIterator.hasNext(); <END> return done ? IterationResult.FETCHED_DONE : IterationResult.FETCHED; }</code><technical_language>Minor: "cleaner" do hasNext check checking for migration stamp destruction. clear contract hasNext interact underlying store (which potentially destroyed migrated)</technical_language>

Target:
public IterationResult advance0() { currentRows = null; while (recordIterator.tryAdvance()) { HeapRow row = prepareRow(recordIterator.getKey(), recordIterator.getValue()); if (row != null) { if (currentRows == null) { currentRows = new ArrayList<>(BATCH_SIZE); } currentRows.add(row); if (currentRows.size() == BATCH_SIZE) { break; } } } boolean done = !recordIterator.hasNext(); if (!map.getMapServiceContext().getService().validateMigrationStamp(migrationStamp)) { throw QueryException.error(SqlErrorCode.PARTITION_MIGRATED, "Map scan failed due to concurrent partition migration " + "(result consistency cannot be guaranteed)"); } if (map.isDestroyed()) { throw QueryException.error(SqlErrorCode.MAP_DESTROYED, "IMap has been destroyed concurrently: " + mapName); } return done ? IterationResult.FETCHED_DONE : IterationResult.FETCHED; }
Source:
<code>private void printSystemInformation(StringBuilder stringBuilder) { try { long totalMemory = Runtime.getRuntime().totalMemory() / 1024; long freeMemory = Runtime.getRuntime().freeMemory() / 1024; long maxMemory = Runtime.getRuntime().maxMemory() / 1024; String used_Memory = totalMemory - freeMemory + " KB"; String available_Memory = (maxMemory - (totalMemory - freeMemory)) + " KB"; <START> OperatingSystemMXBean mbean = (com.sun.management.OperatingSystemMXBean) <END> ManagementFactory.getOperatingSystemMXBean(); String processCpuLoad = Double.toString(mbean.getProcessCpuLoad()); String systemCpuLoad = Double.toString(mbean.getSystemCpuLoad()); stringBuilder.append("System State Information -------").append(System.lineSeparator()); stringBuilder.append("Used Memory : " + used_Memory).append(System.lineSeparator()); stringBuilder.append("Available Memory : " + available_Memory).append(System.lineSeparator()); stringBuilder.append("CPU Process Load : " + processCpuLoad).append(System.lineSeparator()); stringBuilder.append("CPU System Load : " + systemCpuLoad).append(System.lineSeparator()); } catch (Exception e) { } }</code><technical_language>This is oracle specific implementation. other JVMs too: IBM, Azul, Openjdk, etc, if JVM is oracle based implementation is com.sun.management available</technical_language>

Target:
private void printSystemInformation(StringBuilder stringBuilder) { try { long totalMemory = Runtime.getRuntime().totalMemory() / 1024; long freeMemory = Runtime.getRuntime().freeMemory() / 1024; long maxMemory = Runtime.getRuntime().maxMemory() / 1024; String usedMemory = totalMemory - freeMemory + " KB"; String availableMemory = (maxMemory - (totalMemory - freeMemory)) + " KB"; String processCpuLoad = Double.toString(this.mbean.getProcessCpuLoad()); String systemCpuLoad = Double.toString(this.mbean.getSystemCpuLoad()); stringBuilder.append("System State Information -------").append(System.lineSeparator()); stringBuilder.append("Used Memory : " + usedMemory).append(System.lineSeparator()); stringBuilder.append("Available Memory : " + availableMemory).append(System.lineSeparator()); stringBuilder.append("CPU Process Load : " + processCpuLoad).append(System.lineSeparator()); stringBuilder.append("CPU System Load : " + systemCpuLoad).append(System.lineSeparator()); } catch (Exception e) { } }
Source:
<code>private static boolean meetConditions(List<ExpressionTree> operandList) { int operandsNum = operandList.size(); int literalsNum = stringLiteralsNumber(operandList); if (operandsNum > 2 && literalsNum > 0) { int shortLiteralsNum = smallLiteralsNumber(operandList); <START> boolean isOneLiteralTreeOperandsCase = operandsNum == 3 && literalsNum == 1; <END> boolean atLeastHalfLongLiterals = shortLiteralsNum <= literalsNum / 2.; boolean notTooManyNonLiterals = literalsNum - (operandsNum - literalsNum) >= -1; return !isOneLiteralTreeOperandsCase && atLeastHalfLongLiterals && notTooManyNonLiterals; } return false; }</code><technical_language>@vilchik-elena Typo? a "h" in "Three"</technical_language>

Target:
private static boolean meetConditions(List<ExpressionTree> operandList) { int operandsNum = operandList.size(); int literalsNum = stringLiteralsNumber(operandList); if (operandsNum > 2 && literalsNum > 0) { int shortLiteralsNum = smallLiteralsNumber(operandList); boolean isOneLiteralThreeOperandsCase = operandsNum == 3 && literalsNum == 1; boolean atLeastHalfLongLiterals = shortLiteralsNum <= literalsNum / 2.; boolean notTooManyNonLiterals = literalsNum - (operandsNum - literalsNum) >= -1; return !isOneLiteralThreeOperandsCase && atLeastHalfLongLiterals && notTooManyNonLiterals; } return false; }
Source:
<code>public void testInvokeOccurBusinessexception01() throws Throwable { BusinessException occurException = new BusinessException("testing businessexception"); when(mockMethodInvocation.proceed()).thenThrow(occurException); try { testTarget.invoke(mockMethodInvocation); <START> fail("don't occur BusinessException."); <END> } catch (BusinessException e) { assertThat(e, is(occurException)); verify(mockExceptionLogger, times(1)).warn(occurException); verify(mockExceptionLogger, times(1)).warn((Exception) anyObject()); } }</code><technical_language>[x] occur -> occurred --- modified. 6a981ae1248bd5d530270f738a344df2f5ffc6f9</technical_language>

Target:
public void testInvokeOccurBusinessexception01() throws Throwable { BusinessException occurException = new BusinessException("testing businessexception"); when(mockMethodInvocation.proceed()).thenThrow(occurException); try { testTarget.invoke(mockMethodInvocation); fail("didn't occured BusinessException."); } catch (BusinessException e) { assertThat(e, is(occurException)); verify(mockExceptionLogger, times(1)).warn(occurException); verify(mockExceptionLogger, times(1)).warn((Exception) anyObject()); } }
Source:
<code>public void addCallsite(String eventName, String funcName, long ip, String fileName, long lineNumber) { final CTFCallsite cs = new CTFCallsite(eventName, funcName, ip, fileName, lineNumber); LinkedList<CTFCallsite> csl = callsitesByName.get(eventName); if (csl == null) { csl = new LinkedList<CTFCallsite>(); callsitesByName.put(eventName, csl); } ListIterator<CTFCallsite> iter = csl.listIterator(); int index = 0; <START> for (; index < csl.size(); index++) { <END> if (iter.next().compareTo(cs) < 0) { break; } } csl.add(cs); callsitesByIP.add(cs); }</code><technical_language>is "int index = 0" in here</technical_language>

Target:
public void addCallsite(String eventName, String funcName, long ip, String fileName, long lineNumber) { final CTFCallsite cs = new CTFCallsite(eventName, funcName, ip, fileName, lineNumber); LinkedList<CTFCallsite> csl = callsitesByName.get(eventName); if (csl == null) { csl = new LinkedList<CTFCallsite>(); callsitesByName.put(eventName, csl); } ListIterator<CTFCallsite> iter = csl.listIterator(); int index = 0; for (; index < csl.size(); index++) { if (iter.next().compareTo(cs) < 0) { break; } } csl.add(index, cs); callsitesByIP.add(cs); }
Source:
<code>public void testUploadPackFactory() throws Exception { ObjectId master = remote.branch("master").commit().create(); final AtomicInteger rejected = new AtomicInteger(); TestProtocol<User> proto = registerProto(new UploadPackFactory<User>() { @Override public UploadPack create(User req, Repository db) throws ServiceNotAuthorizedException { if (!"user2".equals(req.name)) { rejected.incrementAndGet(); throw new ServiceNotAuthorizedException(); } return new UploadPack(db); } }, new DefaultReceive()); URIish user1Uri = proto.register(new User("user1"), remote.getRepository()); URIish user2Uri = proto.register(new User("user2"), remote.getRepository()); try (Git git = new Git(local.getRepository())) { try { git.fetch() .setRemote(user1Uri.toString()) .setRefSpecs(MASTER) .call(); fail("accepted <START> invalid remote"); <END> } catch (InvalidRemoteException expected) { } assertEquals(1, rejected.get()); assertNull(local.getRepository().exactRef("refs/heads/master")); git.fetch() .setRemote(user2Uri.toString()) .setRefSpecs(MASTER) .call(); assertEquals(1, rejected.get()); assertEquals(master, local.getRepository().exactRef("refs/heads/master").getObjectId()); } }</code><technical_language>this remote is invalid accepts user2 s/invalid remote/not permitted fetch/</technical_language>

Target:
public void testUploadPackFactory() throws Exception { ObjectId master = remote.branch("master").commit().create(); final AtomicInteger rejected = new AtomicInteger(); TestProtocol<User> proto = registerProto(new UploadPackFactory<User>() { @Override public UploadPack create(User req, Repository db) throws ServiceNotAuthorizedException { if (!"user2".equals(req.name)) { rejected.incrementAndGet(); throw new ServiceNotAuthorizedException(); } return new UploadPack(db); } }, new DefaultReceive()); URIish user1Uri = proto.register(new User("user1"), remote.getRepository()); URIish user2Uri = proto.register(new User("user2"), remote.getRepository()); try (Git git = new Git(local.getRepository())) { try { git.fetch() .setRemote(user1Uri.toString()) .setRefSpecs(MASTER) .call(); fail("accepted not permitted fetch"); } catch (InvalidRemoteException expected) { } assertEquals(1, rejected.get()); assertNull(local.getRepository().exactRef("refs/heads/master")); git.fetch() .setRemote(user2Uri.toString()) .setRefSpecs(MASTER) .call(); assertEquals(1, rejected.get()); assertEquals(master, local.getRepository().exactRef("refs/heads/master").getObjectId()); } }
Source:
<code>private static void checkNotCancelledAfter( CompletableFuture<?> cancellationFuture, long milli) throws ExecutionException, InterruptedException { mainThreadExecutor.schedule(() -> {}, milli, TimeUnit.MILLISECONDS).get(); try { cancellationFuture.get(milli, TimeUnit.MILLISECONDS); <START> fail("The future must not have been cancelled"); <END> } catch (TimeoutException e) { assertThat(cancellationFuture.isDone(), is(false)); } }</code><technical_language>checkThat(cancellationFuture.isDone(), is(false))? wait for 2 * milli milliseconds in this method</technical_language>

Target:
private static void checkNotCancelledAfter( CompletableFuture<?> cancellationFuture, long milli) throws ExecutionException, InterruptedException { mainThreadExecutor.schedule(() -> {}, milli, TimeUnit.MILLISECONDS).get(); try { assertThat(cancellationFuture.isDone(), is(false)); cancellationFuture.get(milli, TimeUnit.MILLISECONDS); fail("The future must not have been cancelled"); } catch (TimeoutException e) { assertThat(cancellationFuture.isDone(), is(false)); } }
Source:
<code>private void collectPhysicalFieldsTypes(List<SqlNode> derivedColumns) { for (SqlNode derivedColumn : derivedColumns) { if (derivedColumn instanceof SqlRegularColumn) { SqlRegularColumn regularColumn = (SqlRegularColumn) derivedColumn; String name = regularColumn.getName().getSimple(); if (columns.containsKey(name)) { throw new ValidationException(String.format( "A column named '%s' already exists in the base table.", name)); } SqlDataTypeSpec type = regularColumn.getType(); boolean nullable = type.getNullable() == null ? true : type.getNullable(); RelDataType relType = type.deriveType(sqlValidator, nullable); nonComputedFieldNamesToTypes.put(name, relType); <START> } else if (derivedColumn instanceof SqlMetadataColumn) { SqlMetadataColumn metadataColumn = (SqlMetadataColumn) derivedColumn; String name = metadataColumn.getName().getSimple(); if (columns.containsKey(name)) { throw new ValidationException(String.format( "A column named '%s' already exists in the base table.", name)); } RelDataType relType = metadataColumn.getType() .deriveType(sqlValidator, metadataColumn.getType().getNullable()); nonComputedFieldNamesToTypes.put(name, relType); <END> } } }</code><technical_language>tests cover changes</technical_language>

Target:
private void collectPhysicalFieldsTypes(List<SqlNode> derivedColumns) { for (SqlNode derivedColumn : derivedColumns) { if (derivedColumn instanceof SqlRegularColumn) { SqlRegularColumn regularColumn = (SqlRegularColumn) derivedColumn; String name = regularColumn.getName().getSimple(); if (columns.containsKey(name)) { throw new ValidationException(String.format( "A column named '%s' already exists in the base table.", name)); } SqlDataTypeSpec type = regularColumn.getType(); boolean nullable = type.getNullable() == null ? true : type.getNullable(); RelDataType relType = type.deriveType(sqlValidator, nullable); physicalFieldNamesToTypes.put(name, relType); } } }
Source:
<code>public boolean answerSplitNodeQuestion(String nodeName) throws UnsupportedOperationException { if (nodeName.equals(PurapWorkflowConstants.REQUIRES_IMAGE_ATTACHMENT)) { return requiresAccountsPayableReviewRouting(); } if (nodeName.equals(PurapWorkflowConstants.PURCHASE_WAS_RECEIVED)) { return shouldWaitForReceiving(); } <START> if (nodeName.equals(PurapWorkflowConstants.VENDOR_IS_EMPLOYEE_OR_NONRESIDENT)) { <END> return isVendorEmployeeOrNonresident(); } if (nodeName.equals(CUPurapWorkflowConstants.TREASURY_MANAGER)) { return isWireOrForeignDraft(); } if (nodeName.equals(PurapWorkflowConstants.IS_DOCUMENT_AUTO_APPROVED)) { return isAutoApprovedIndicator(); } throw new UnsupportedOperationException("Cannot answer split question for this node you call \"" + nodeName + "\""); }</code><technical_language>This condition is missing workaround for "VendorIsEmployeeOrNonResidentAlien" route node</technical_language>

Target:
public boolean answerSplitNodeQuestion(String nodeName) throws UnsupportedOperationException { if (nodeName.equals(PurapWorkflowConstants.REQUIRES_IMAGE_ATTACHMENT)) { return requiresAccountsPayableReviewRouting(); } if (nodeName.equals(PurapWorkflowConstants.PURCHASE_WAS_RECEIVED)) { return shouldWaitForReceiving(); } if (nodeName.equals(PurapWorkflowConstants.VENDOR_IS_EMPLOYEE_OR_NONRESIDENT) || "VendorIsEmployeeOrNonResidentAlien".equals(nodeName)) { return isVendorEmployeeOrNonresident(); } if (nodeName.equals(CUPurapWorkflowConstants.TREASURY_MANAGER)) { return isWireOrForeignDraft(); } if (nodeName.equals(PurapWorkflowConstants.IS_DOCUMENT_AUTO_APPROVED)) { return isAutoApprovedIndicator(); } throw new UnsupportedOperationException("Cannot answer split question for this node you call \"" + nodeName + "\""); }
Source:
<code>public void validateTrialInstanceValue(final List<MeasurementVariable> conditions, final Map<String, List<Message>> errorMessages) { for (final MeasurementVariable varCondition : conditions) { if (varCondition.getTermId() == TermId.TRIAL_INSTANCE_FACTOR.getId()) { final Optional<Message> message = Util.validateVariableValues(varCondition, varCondition.getValue()); if (message.isPresent()) { <START> if (errorMessages.containsKey(Constants.INVALID_TRIAL)) { <END> errorMessages.get(Constants.INVALID_TRIAL).add(message.get()); } else { errorMessages.put(Constants.INVALID_TRIAL, Arrays.asList(message.get())); } } } } }</code><technical_language>if-else simplified as: 'errorMessages.putIfAbsent(Constants.INVALID_TRIAL, new ArrayList<>()); errorMessages.get(Constants.INVALID_TRIAL).add(message.get());'</technical_language>

Target:
public void validateTrialInstanceValue(final List<MeasurementVariable> conditions, final Map<String, List<Message>> errorMessages) { for (final MeasurementVariable varCondition : conditions) { if (varCondition.getTermId() == TermId.TRIAL_INSTANCE_FACTOR.getId()) { final Optional<Message> message = Util.validateVariableValues(varCondition, varCondition.getValue()); if (message.isPresent()) { errorMessages.putIfAbsent(Constants.INVALID_TRIAL, new ArrayList<>()); errorMessages.get(Constants.INVALID_TRIAL).add(message.get()); } } } }
Source:
<code>public J strip() { <START> String[] methods = getFieldNames(); END> String[] jsonMethods = p.getFieldNames(); System.out.println(methods); return (J)this; }</code><technical_language>Fixed this method in branch: <LINK_0> Pls, merge branch yours, fixes o included in this pull request</technical_language>

Target:
public J strip() { List<String> names = Arrays.asList(getFieldNames()); for (String jsonName : p.getFieldNames()) { if (!names.contains(jsonName)) { p.<JsCache>cast().delete(jsonName); } } return (J)this; }
Source:
<code><START> @Override public synchronized boolean cancel( final boolean mayInterruptIfRunning ) { <END> return canceled.compareAndSet( false, true ); }</code><technical_language>If AtomicBoolean (and dont do else), longer need synchronized keyword here</technical_language>

Target:
@Override public boolean cancel( final boolean mayInterruptIfRunning ) { return canceled.compareAndSet( false, true ); }
Source:
<code>public SecurityConfigurationMapping() { <START> map = Maps.newHashMap(); <END> }</code><technical_language>enummap instead of hashmap</technical_language>

Target:
public SecurityConfigurationMapping() { table = HashBasedTable.create(); }
Source:
<code>public void printHelp() { <START> Builder<String> builder = Stream.builder(); <END> map.forEach((k,v) -> builder.accept(k + "\t" + v.getRight())); System.out.println(" avaliable values:"); builder.build().forEach(s -> {System.out.println(" " + s);} ); }</code><technical_language>simplified stream().map() map.entrySet (no need Stream.builder())</technical_language>

Target:
public void printHelp() { System.out.println(" available values:"); map.entrySet().stream() .map((e) -> MessageFormat.format(" %s\t%s", e.getKey(), e.getValue().getRight())) .forEach(System.out::println); }
Source:
<code>public void <START> testCreateInvalidConfigAeadWithAuth() <END> throws Exception { IpSecConfig ipSecConfig = buildBasicIpSecConfig(); for (int direction : directions) { ipSecConfig.setAuthentication(direction, authAlgo); try { ipSecConfig.setAuthenticatedEncryption(direction, aeadAlgo); } catch (IllegalArgumentException expected) { } } try { mIpSecService.createTransportModeTransform(ipSecConfig, new Binder()); fail( "IpSecService should have thrown an error on authentication being" + " enabled with authenticated encryption"); } catch (IllegalArgumentException expected) { } }</code><technical_language>theoretically, order matters, test orders-of-operations</technical_language>

Target:
public void testCreateInvalidConfigAeadWithAuth() throws Exception { IpSecConfig ipSecConfig = new IpSecConfig(); addDefaultSpisAndRemoteAddrToIpSecConfig(ipSecConfig); for (int direction : DIRECTIONS) { ipSecConfig.setAuthentication(direction, AUTH_ALGO); try { ipSecConfig.setAuthenticatedEncryption(direction, AEAD_ALGO); } catch (IllegalArgumentException expected) { } } try { mIpSecService.createTransportModeTransform(ipSecConfig, new Binder()); fail( "IpSecService should have thrown an error on authentication being" + " enabled with authenticated encryption"); } catch (IllegalArgumentException expected) { } }
Source:
<code>private void pullItems(GlowBlock block, TEHopper hopper) { GlowBlock source = block.getRelative(BlockFace.UP); <START> if (source.getType() == null || source.getType() == Material.AIR) { <END> GlowItem item = getFirstDroppedItem(source.getLocation()); if (item == null) { return; } ItemStack stack = item.getItemStack(); HashMap<Integer, ItemStack> add = hopper.getInventory().addItem(stack); if (add.size() > 0) { item.setItemStack(add.get(0)); } else { item.remove(); } } else if (source.getTileEntity() != null && source.getTileEntity() instanceof TEContainer) { TEContainer sourceContainer = (TEContainer) source.getTileEntity(); if (sourceContainer.getInventory() == null || sourceContainer.getInventory().getContents().length == 0) { return; } ItemStack item = getFirstItem(sourceContainer); if (item == null) { return; } ItemStack clone = item.clone(); clone.setAmount(1); if (hopper.getInventory().addItem(clone).size() > 0) { return; } if (item.getAmount() - 1 == 0) { sourceContainer.getInventory().remove(item); } else { item.setAmount(item.getAmount() - 1); } } }</code><technical_language>Hoppers slabs signs work. getType() return null, air</technical_language>

Target:
private void pullItems(GlowBlock block, TEHopper hopper) { GlowBlock source = block.getRelative(BlockFace.UP); MaterialData data = source.getState().getData(); if (!source.getType().isSolid() || (data instanceof Step && !((Step) data).isInverted()) || (data instanceof WoodenStep && !((WoodenStep) data).isInverted()) || (data instanceof Sign) || (data instanceof Rails)) { GlowItem item = getFirstDroppedItem(source.getLocation()); if (item == null) { return; } ItemStack stack = item.getItemStack(); HashMap<Integer, ItemStack> add = hopper.getInventory().addItem(stack); if (add.size() > 0) { item.setItemStack(add.get(0)); } else { item.remove(); } } else if (source.getTileEntity() != null && source.getTileEntity() instanceof TEContainer) { TEContainer sourceContainer = (TEContainer) source.getTileEntity(); if (sourceContainer.getInventory() == null || sourceContainer.getInventory().getContents().length == 0) { return; } ItemStack item = getFirstItem(sourceContainer); if (item == null) { return; } ItemStack clone = item.clone(); clone.setAmount(1); if (hopper.getInventory().addItem(clone).size() > 0) { return; } if (item.getAmount() - 1 == 0) { sourceContainer.getInventory().remove(item); } else { item.setAmount(item.getAmount() - 1); } } }
Source:
<code>public EventProducer(TransportProvider transportProvider, CheckpointProvider checkpointProvider, Properties config, boolean customCheckpointing, Consumer<EventProducer> onUnrecoverableError, int generation) { Validate.notNull(transportProvider, "null transport provider"); Validate.notNull(checkpointProvider, "null checkpoint provider"); Validate.notNull(config, "null config"); _checkpointRWLock = new ReentrantReadWriteLock( true); _transportProvider = transportProvider; _checkpointProvider = checkpointProvider; _checkpointPolicy = customCheckpointing ? CheckpointPolicy.CUSTOM : CheckpointPolicy.DATASTREAM; _safeCheckpoints = new ConcurrentHashMap<>(); _onUnrecoverableError = onUnrecoverableError; _generation = generation; _producerId = PRODUCER_ID_SEED.getAndIncrement(); <START> _logger = LoggerFactory.getLogger(String.format("%s:%s", MODULE, _producerId)); <END> _checkpointHandler = new CheckpointHandler(config); _availabilityThresholdSlaMs = Integer.parseInt(config.getProperty(AVAILABILITY_THRESHOLD_SLA_MS, DEFAULT_AVAILABILITY_THRESHOLD_SLA_MS)); _logger.info( String.format("Created event producer with customCheckpointing=%s, sendCallback=%s", customCheckpointing, onUnrecoverableError != null)); _dynamicMetricsManager = DynamicMetricsManager.getInstance(); }</code><technical_language>Do sense include generation Id in logger too</technical_language>

Target:
public EventProducer(TransportProvider transportProvider, CheckpointProvider checkpointProvider, Properties config, boolean customCheckpointing, Consumer<EventProducer> onUnrecoverableError, int generation) { Validate.notNull(transportProvider, "null transport provider"); Validate.notNull(checkpointProvider, "null checkpoint provider"); Validate.notNull(config, "null config"); _checkpointRWLock = new ReentrantReadWriteLock( true); _transportProvider = transportProvider; _checkpointProvider = checkpointProvider; _checkpointPolicy = customCheckpointing ? CheckpointPolicy.CUSTOM : CheckpointPolicy.DATASTREAM; _safeCheckpoints = new ConcurrentHashMap<>(); _onUnrecoverableError = onUnrecoverableError; _generation = generation; _producerId = PRODUCER_ID_SEED.getAndIncrement(); _logger = LoggerFactory.getLogger(String.format("%s:%s:%d", MODULE, _producerId, _generation)); _checkpointHandler = new CheckpointHandler(config); _availabilityThresholdSlaMs = Integer.parseInt(config.getProperty(AVAILABILITY_THRESHOLD_SLA_MS, DEFAULT_AVAILABILITY_THRESHOLD_SLA_MS)); _logger.info( String.format("Created event producer with customCheckpointing=%s, sendCallback=%s", customCheckpointing, onUnrecoverableError != null)); _dynamicMetricsManager = DynamicMetricsManager.getInstance(); }
Source:
<code>public static void setup() throws Exception { ClientFactory.setTestClient(stubClient); DatadogGlobalConfiguration cfg = DatadogUtilities.getDatadogGlobalDescriptor(); ExtensionList.clearLegacyInstances(); cfg.setCollectBuildLogs(false); EnvVars env = new EnvVars(); <START> env.put("DD_TEST", "bar"); <END> j.createOnlineSlave(new LabelAtom("test"), env); }</code><technical_language>is this for? needed for integration test</technical_language>

Target:
public static void setup() throws Exception { ClientFactory.setTestClient(stubClient); DatadogGlobalConfiguration cfg = DatadogUtilities.getDatadogGlobalDescriptor(); ExtensionList.clearLegacyInstances(); cfg.setCollectBuildLogs(false); j.createOnlineSlave(new LabelAtom("test")); }
Source:
<code>public TmfTimeViewAlignmentInfo getTimeViewAlignmentInfo() { <START> if (fLanes.size() == 0) { <END> return null; } return new TmfTimeViewAlignmentInfo(fLanes.get(0).getChartViewer().getControl().getShell(), fSashForm.toDisplay(0, 0), getTimeAxisOffset()); }</code><technical_language>fLanes.isEmpty()</technical_language>

Target:
public TmfTimeViewAlignmentInfo getTimeViewAlignmentInfo() { if (fLanes.size() == 0) { return null; } return fLanes.get(0).getTimeViewAlignmentInfo(); }
Source:
<code>public Maybe<Channel> fromKey(String key) { for (Channel channel : channels.get()) { <START> if (Objects.nonNull(channel.getKey()) && channel.getKey().equals(key)) { <END> return Maybe.just(channel); } } return Maybe.nothing(); }</code><technical_language>do if (Objects.equals(channel.get(), key)) { null checking for you. Objects.nonNull is useful a function is required (e.g. stream.filter) is add extra method call jit decide inline (as compared obj != null')</technical_language>

Target:
public Maybe<Channel> fromKey(String key) { for (Channel channel : channels.get()) { if (Objects.equals(channel.getKey(), key)) { return Maybe.just(channel); } } return Maybe.nothing(); }
Source:
<code>public CompletableFuture<S> writeMessage(S message) throws WriteFailedException { final CompletableFuture<S> future = new CompletableFuture<>(); byte[] bytes = sinkModule.marshalSingleMessage(message); <START> String uuid = UUID.randomUUID().toString(); <END> Long key = offHeapQueue.writeMessage(sinkModule.getId(), bytes); offHeapFutureMap.put(key, future); firstWrite.countDown(); return future; }</code><technical_language>This is unused now</technical_language>

Target:
public CompletableFuture<S> writeMessage(S message) throws WriteFailedException { final CompletableFuture<S> future = new CompletableFuture<>(); byte[] bytes = sinkModule.marshalSingleMessage(message); Long key = offHeapQueue.writeMessage(sinkModule.getId(), bytes); offHeapFutureMap.put(key, future); firstWrite.countDown(); return future; }
Source:
<code>public FormValidation doCheckUrl(@QueryParameter String value) { <START> if (value.isEmpty()) { <END> return FormValidation.warning(Messages.Jenkins_EmptyRootUrl()); } if(value.startsWith("http://localhost")) return FormValidation.warning(Messages.Mailer_Localhost_Error()); return FormValidation.ok(); }</code><technical_language>StringUtils.isBlank(), want avoid NPEs</technical_language>

Target:
public FormValidation doCheckUrl(@QueryParameter String value) { if (StringUtils.isBlank(value)) { return FormValidation.warning(Messages.Jenkins_EmptyRootUrl()); } if(value.startsWith("http://localhost")) return FormValidation.warning(Messages.Mailer_Localhost_Error()); return FormValidation.ok(); }
Source:
<code><START> private ByteBuffer createWorld() { <END> final var address = "127.0.0.1"; final var activity = "Converting Apollo"; ByteBuffer world = ByteBuffer.allocate(Short.BYTES + Integer.BYTES + address.length() + activity .length() + Byte.BYTES + Byte.BYTES + Byte.BYTES + Short.BYTES); world.putShort((short) 1); world.putInt(0); BufferUtil.writeString(world, address); BufferUtil.writeString(world, activity); world.put((byte) 0); world.putShort((short) 2000); world.flip(); ByteBuffer list = ByteBuffer.allocate(Short.BYTES + world.remaining()); list.putShort((short) 1); list.put(world); return list.flip(); }</code><technical_language>Do need this get login working</technical_language>

Target:
private ByteBuffer createWorld() { final var address = "127.0.0.1"; final var activity = "Converting Apollo"; ByteBuffer world = ByteBuffer.allocate(Short.BYTES + Integer.BYTES + address.length() + activity .length() + Byte.BYTES + Byte.BYTES + Byte.BYTES + Short.BYTES); world.putShort((short) 1); world.putInt(0); BufferUtil.writeString(world, address); BufferUtil.writeString(world, activity); world.put((byte) 0); world.putShort((short) 100); world.flip(); ByteBuffer list = ByteBuffer.allocate(Short.BYTES + world.remaining()); list.putShort((short) 1); list.put(world); return list.flip(); }
Source:
<code>public void spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete() throws Throwable { blackboxSubscriberWithoutSetupTest(new BlackboxTestStageTestRun() { @Override public void run(BlackboxTestStage stage) throws Throwable { final Subscription subs = new Subscription() { @Override public void request(long n) { final Throwable thr = new Throwable(); for (StackTraceElement stackElem : thr.getStackTrace()) { if (stackElem.getMethodName().equals("onComplete")) { <START> env.flop(String.format("Subscription::request MUST NOT be called from Subscriber::onComplete! (Caller: %s::%s line %d)", <END> stackElem.getClassName(), stackElem.getMethodName(), stackElem.getLineNumber())); } } } @Override public void cancel() { final Throwable thr = new Throwable(); for (StackTraceElement stackElem : thr.getStackTrace()) { if (stackElem.getMethodName().equals("onComplete")) { env.flop(String.format("Subscription::cancel MUST NOT be called from Subscriber::onComplete! (Caller: %s::%s line %d)", stackElem.getClassName(), stackElem.getMethodName(), stackElem.getLineNumber())); } } } }; final Subscriber<T> sub = createSubscriber(); sub.onSubscribe(subs); sub.onComplete(); env.verifyNoAsyncErrors(); } }); }</code><technical_language>want give implementor rule prohibits this look</technical_language>

Target:
public void spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete() throws Throwable { blackboxSubscriberWithoutSetupTest(new BlackboxTestStageTestRun() { @Override public void run(BlackboxTestStage stage) throws Throwable { final Subscription subs = new Subscription() { @Override public void request(long n) { final Optional<StackTraceElement> onCompleteStackTraceElement = env.findCallerMethodInStackTrace("onComplete"); if (onCompleteStackTraceElement.isDefined()) { final StackTraceElement stackElem = onCompleteStackTraceElement.get(); env.flop(String.format("Subscription::request MUST NOT be called from Subscriber::onComplete (Rule 2.3)! (Caller: %s::%s line %d)", stackElem.getClassName(), stackElem.getMethodName(), stackElem.getLineNumber())); } } @Override public void cancel() { final Optional<StackTraceElement> onCompleteStackElement = env.findCallerMethodInStackTrace("onComplete"); if (onCompleteStackElement.isDefined()) { final StackTraceElement stackElem = onCompleteStackElement.get(); env.flop(String.format("Subscription::cancel MUST NOT be called from Subscriber::onComplete (Rule 2.3)! (Caller: %s::%s line %d)", stackElem.getClassName(), stackElem.getMethodName(), stackElem.getLineNumber())); } } }; final Subscriber<T> sub = createSubscriber(); sub.onSubscribe(subs); sub.onComplete(); env.verifyNoAsyncErrors(); } }); }
Source:
<code>private void updateQuota(StoragePool datacenter) { if (datacenter.getQuotaEnforcementType().equals(QuotaEnforcementTypeEnum.DISABLED) || !getDiskStorageType().getEntity().isInternal()) { getQuota().setIsAvailable(false); return; } getQuota().setIsAvailable(true); StorageDomain storageDomain = getStorageDomain().getSelectedItem(); if (storageDomain == null) { return; } IdQueryParameters parameters = new IdQueryParameters(storageDomain.getId()); <START> Frontend.getInstance().runQuery(VdcQueryType.GetAllRelevantQuotasForStorage, parameters, new AsyncQuery(this, <END> new INewAsyncCallback() { @Override public void onSuccess(Object innerModel, Object innerReturnValue) { ArrayList<Quota> quotaList = ((VdcQueryReturnValue) innerReturnValue).getReturnValue(); final Guid diskQuota = getDisk() != null ? ((DiskImage) getDisk()).getQuotaId() : null; final Guid vmQuota = getVm() != null ? getVm().getQuotaId() : null; final Guid defaultQuota = diskQuota != null ? diskQuota : vmQuota; if (quotaList != null && !quotaList.isEmpty()) { Collections.sort(quotaList, new Comparator<Quota>() { @Override public int compare(Quota quota1, Quota quota2) { if (quota1 == quota2) { return 0; } if (quota1.getId().equals(defaultQuota)) { return -1; } if (quota2.getId().equals(defaultQuota)) { return 1; } return QuotaComparator.NAME.compare(quota1, quota2); } }); getQuota().setItems(quotaList); if (quotaList.get(0).getId().equals(defaultQuota)) { return; } } if (diskQuota != null) { Quota quota = new Quota(); quota.setId(diskQuota); quota.setQuotaName(getDiskImage().getQuotaName()); if (quotaList == null){ quotaList = new ArrayList<>(); } quotaList.add(quota); getQuota().setItems(quotaList); getQuota().setSelectedItem(quota); } } })); }</code><technical_language>please move AsyncDataProvider for re-use. Implement IAsyncConverter integrate sort logic..</technical_language>

Target:
private void updateQuota(StoragePool datacenter) { if (datacenter.getQuotaEnforcementType().equals(QuotaEnforcementTypeEnum.DISABLED) || !getDiskStorageType().getEntity().isInternal()) { getQuota().setIsAvailable(false); return; } getQuota().setIsAvailable(true); StorageDomain storageDomain = getStorageDomain().getSelectedItem(); if (storageDomain == null) { return; } final Guid diskQuota = getDisk() != null ? ((DiskImage) getDisk()).getQuotaId() : null; final Guid vmQuota = getVm() != null ? getVm().getQuotaId() : null; final Guid defaultQuota = diskQuota != null ? diskQuota : vmQuota; AsyncDataProvider.getInstance().getAllRelevantQuotasForStorageSorted(new AsyncQuery( new INewAsyncCallback() { @Override public void onSuccess(Object model, Object returnValue) { List<Quota> quotaList = (List<Quota>) returnValue; if (quotaList != null && !quotaList.isEmpty()) { getQuota().setItems(quotaList); if (quotaList.get(0).getId().equals(defaultQuota)) { return; } } if (diskQuota != null) { Quota quota = new Quota(); quota.setId(diskQuota); quota.setQuotaName(getDiskImage().getQuotaName()); if (quotaList == null) { quotaList = new ArrayList<>(); } quotaList.add(quota); getQuota().setItems(quotaList); getQuota().setSelectedItem(quota); } } }), storageDomain.getId(), defaultQuota); }
Source:
<code>private static int determineContentStart(String s) { int start = TEXTBLOCK_DELIMITER.length(); boolean lineTerminator = false; while (start < s.length() && Character.isWhitespace(s.charAt(start))) { if (s.charAt(start) == '\r' || s.charAt(start) == '\n') { <START> lineTerminator = true; <END> } else if (lineTerminator) { break; } start++; } return start; }</code><technical_language>this work CRLF delimited strings? LF. need call this method normalized string, stop caring CR. clearer return start + 1; instead of breaking next iteration</technical_language>

Target:
private static int determineContentStart(String s) { int start = TEXTBLOCK_DELIMITER.length(); while (start < s.length() && Character.isWhitespace(s.charAt(start))) { if (s.charAt(start) == '\n') { return start + 1; } start++; } return start; }
Source:
<code>protected void assertRequestObjectType(final Class<?> expected, final Serializable requestObject) throws ProtocolAdapterException { if (!expected.isInstance(requestObject)) { throw new ProtocolAdapterException( <START> String.format("The request object has an incorrect type. %s excepted but %s was found.", <END> expected.getCanonicalName(), requestObject.getClass().getCanonicalName())); } }</code><technical_language>typo: 'excepted' 'expected'</technical_language>

Target:
protected void assertRequestObjectType(final Class<?> expected, final Serializable requestObject) throws ProtocolAdapterException { if (!expected.isInstance(requestObject)) { throw new ProtocolAdapterException( String.format("The request object has an incorrect type. %s expected but %s was found.", expected.getCanonicalName(), requestObject.getClass().getCanonicalName())); } }
Source:
<code><START> private static Range create(BigInteger bigFrom, BigInteger bigTo) { <END> if (ignoreOverflow) { bigFrom = bigFrom.max(BIG_LONG_MIN_VALUE); bigTo = bigTo.min(BIG_LONG_MAX_VALUE); } else { BigInteger bigWidth = bigTo.subtract(bigFrom).add(BigInteger.ONE); if (bigWidth.compareTo(BIG_LONG_WIDTH) > 0) { return EVERYTHING; } } long longFrom = bigFrom.longValue(); long longTo = bigTo.longValue(); return createRangeOrEverything(longFrom, longTo); }</code><technical_language>Move this other create methods</technical_language>

Target:
private static Range create(BigInteger bigFrom, BigInteger bigTo) { if (ignoreOverflow) { bigFrom = bigFrom.max(BIG_LONG_MIN_VALUE); bigTo = bigTo.min(BIG_LONG_MAX_VALUE); } else { BigInteger bigWidth = bigTo.subtract(bigFrom).add(BigInteger.ONE); if (bigWidth.compareTo(BIG_LONG_WIDTH) > 0) { return EVERYTHING; } } long longFrom = bigFrom.longValue(); long longTo = bigTo.longValue(); return createOrElse(longFrom, longTo, EVERYTHING); }
Source:
<code>private static Number parseValue(String s, Class dataType) throws ParseException { if (Date.class.isAssignableFrom(dataType)) { long period = TimeParser.parsePeriod(s); <START> return period; <END> } else { throw new IllegalArgumentException("Unsupported value type " + dataType); } }</code><technical_language>returned right away</technical_language>

Target:
private static Number parseValue(String s, Class dataType) throws ParseException { if (Date.class.isAssignableFrom(dataType)) { return TimeParser.parsePeriod(s); } throw new IllegalArgumentException("Unsupported value type " + dataType); }
Source:
<code>public void onNewTxForLastBlock(Block block, Tx tx) { <START> Preconditions.checkArgument(block == getLastBlock().orElseThrow()); <END> block.getTxs().add(tx); daoState.getTxMap().put(tx.getId(), tx); }</code><technical_language>NACK for Preconditions check, good. Thanks for working that. I need a bit more time check if missing. provide a comparision of performance gains PR</technical_language>

Target:
public void onNewTxForLastBlock(Block block, Tx tx) { assertDaoStateChange(); getLastBlock().ifPresent(lastBlock -> { if (block == lastBlock) { block.addTx(tx); daoState.addToTxCache(tx); } else { log.warn("Block for parsing does not match last block. That might happen in edge cases at reorgs. " + "Received block={}", block); } }); }
Source:
<code>private static boolean validateNotAFloat(Object value) { boolean valid = true; if (value instanceof Float) { valid = false; <START> logger.log(Level.SEVERE, "Float value encountered in query"); <END> } return valid; }</code><technical_language>Give some help: "Float in query; Double instead"</technical_language>

Target:
private static boolean validateNotAFloat(Object value) { boolean valid = true; if (value instanceof Float) { valid = false; logger.log(Level.SEVERE, "Float value found in query: %f - Use Double instead.", value); } return valid; }
Source:
<code><START> public Object getElementForNodeId(int id) { <END> verifyThreadAccess(); return mObjectIdMapper.getObjectForId(id); }</code><technical_language>ObjectIdMapper.getObjectForId return null is marked @Nullable, mark this method @Nullable</technical_language>

Target:
public @Nullable Object getElementForNodeId(int id) { return mObjectIdMapper.getObjectForId(id); }
Source:
<code>public Set<String> getDependentFields() { <START> return Sets.newHashSet(); <END> }</code><technical_language>Collections.emptySet() returns a singleton is preferred here</technical_language>

Target:
public Set<String> getDependentFields() { return Collections.emptySet(); }
Source:
<code>public void verifyEditText(String targetText) { waitForValueToBePresentInElementsAttributeByElement( textArea, "value", targetText); Assertion.assertEquals(targetText, getEditText()); PageObjectLogging.log("verifyEditText", <START> "verifying the summary shows " + targetText, true); <END> }</code><technical_language>omit 'verifying' word</technical_language>

Target:
public void verifyEditText(String targetText) { waitForValueToBePresentInElementsAttributeByElement( editArea, "value", targetText); Assertion.assertEquals(targetText, getEditText()); PageObjectLogging.log( "verifyEditText", "The summary shows " + targetText, true); }