auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean isModified(DirCacheEntry entry, boolean forceContentCheck, boolean checkFilemode, FS fs) { if (entry.isAssumeValid()) return false; if (getEntryLength() != entry.getLength()) return true; <START> if (checkFilemode) { <END> if (FileMode.EXECUTABLE_FILE.equals(entry.getRawMode()) && !fs.supportsExecute()) { if (!FileMode.REGULAR_FILE.equals(getEntryRawMode())) return true; } else { if (entry.getRawMode() != getEntryRawMode()) return true; } } long cacheLastModified = entry.getLastModified(); long fileLastModified = getEntryLastModified(); if (cacheLastModified % 1000 == 0) fileLastModified = fileLastModified - fileLastModified % 1000; if ((fileLastModified != cacheLastModified) && !forceContentCheck) return true; return (!getEntryObjectId().equals(entry.getObjectId())); }</code><technical_language>fully skip file mode check. Long story short, want confuse a symlink a file if WorkingTreeIterator subclass detect symlinks (and I hope in future). basis of checkFilemode flag is ignore a difference in executable bit of file. other type of difference honored different, if checkFilemode false</technical_language>

Target:
public boolean isModified(DirCacheEntry entry, boolean forceContentCheck, boolean checkFilemode, FS fs) { if (entry.isAssumeValid()) return false; if (getEntryLength() != entry.getLength()) return true; int modeDiff = getEntryRawMode() ^ entry.getRawMode(); if (!checkFilemode) modeDiff &= ~FileMode.EXECUTABLE_FILE.getBits(); if (modeDiff!=0) return true; long cacheLastModified = entry.getLastModified(); long fileLastModified = getEntryLastModified(); if (cacheLastModified % 1000 == 0) fileLastModified = fileLastModified - fileLastModified % 1000; if ((fileLastModified != cacheLastModified) && !forceContentCheck) return true; if (forceContentCheck) { if (fileLastModified == cacheLastModified) return false; else return !getEntryObjectId().equals(entry.getObjectId()); } else { return fileLastModified != cacheLastModified; } }
Source:
<code>public void testCompletingCheckoutWithNullCheckoutToken() throws InterruptedException { <START> final CountDownLatch latch = new CountDownLatch(1); <END> try { buyClient.completeCheckout(paymentToken, null); } catch (IllegalArgumentException e) { latch.countDown(); return; } latch.await(); fail("Expected an IllegalArgumentException"); }</code><technical_language>redundant this is running thread</technical_language>

Target:
public void testCompletingCheckoutWithNullCheckoutToken() throws InterruptedException { try { buyClient.completeCheckout(paymentToken, null); } catch (IllegalArgumentException e) { return; } fail("Expected an IllegalArgumentException"); }
Source:
<code>public Factory(RuntimeConfiguration runtimeConfiguration, Article parentArticle, Collection<Annotation> comments) { this.competingInterestThreshold = Date.from(runtimeConfiguration.getCompetingInterestThreshold() .atStartOfDay(ZoneId.systemDefault()).toInstant()); this.parentArticle = ArticleVisibility.create(parentArticle); this.commentsByParent = comments.stream() .filter(comment -> comment.getParentID() != null) <START> .collect(Collectors.groupingBy(Annotation::getParentID)); <END> }</code><technical_language>ooh... this is a useful collector function. try remember one. :)</technical_language>

Target:
public Factory(RuntimeConfiguration runtimeConfiguration, Article parentArticle, Collection<Annotation> comments) { this.competingInterestPolicyStart = Date.from(runtimeConfiguration.getCompetingInterestPolicyStart() .atStartOfDay(ZoneId.systemDefault()).toInstant()); this.parentArticle = ArticleVisibility.create(parentArticle); this.commentsByParent = comments.stream() .filter(comment -> comment.getParentID() != null) .collect(Collectors.groupingBy(Annotation::getParentID)); }
Source:
<code>public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Group group = (Group) o; return layout == group.layout; <START> <END> }</code><technical_language>Do forgot compare items label</technical_language>

Target:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; Group group = (Group) o; return layout == group.layout; }
Source:
<code>final void writePlanJsonFile(String planJson) { try { String content = "plan='" + planJson + "'"; <START> String binPath = System.getenv(ShellCommandConfig.JOB_BIN_DIR()); <END> if (binPath != null && !binPath.isEmpty()) { File file = new File(binPath + "/plan.json"); file.setReadable(true, false); PrintWriter writer = new PrintWriter(file, "UTF-8"); writer.println(content); writer.close(); } } catch (Throwable t) { log.warn("fail to write execution plan json to file", t); } }</code><technical_language>bin dir log</technical_language>

Target:
final void writePlanJsonFile(String planJson) { try { String content = "plan='" + planJson + "'"; String planPath = System.getenv(ShellCommandConfig.EXECUTION_PLAN_DIR()); if (planPath != null && !planPath.isEmpty()) { File file = new File(planPath + "/plan.json"); file.setReadable(true, false); PrintWriter writer = new PrintWriter(file, "UTF-8"); writer.println(content); writer.close(); } } catch (Exception e) { log.warn("Failed to write execution plan json to file", e); } }
Source:
<code>private ConcurAccountInfo buildConcurAccountingInformation(ConcurStandardAccountingExtractDetailLine line) { String objectCode = line.getJournalAccountCode(); String subObjectCode; if (getConcurBatchUtilityService().lineRepresentsPersonalExpenseChargedToCorporateCard(line)) { subObjectCode = line.getSubObjectCode(); } else { <START> subObjectCode = line.getReportSubObjectCode(); <END> } ConcurAccountInfo accountingInformation = buildConcurAccountingInformation(line, objectCode, subObjectCode); return accountingInformation; }</code><technical_language>if-else results need reversed, original sub-object code is for non-personal-expense situations</technical_language>

Target:
private ConcurAccountInfo buildConcurAccountingInformation(ConcurStandardAccountingExtractDetailLine line) { String objectCode = line.getJournalAccountCode(); String subObjectCode; if (getConcurBatchUtilityService().lineRepresentsPersonalExpenseChargedToCorporateCard(line)) { subObjectCode = line.getReportSubObjectCode(); } else { subObjectCode = line.getSubObjectCode(); } ConcurAccountInfo accountingInformation = buildConcurAccountingInformation(line, objectCode, subObjectCode); return accountingInformation; }
Source:
<code>public void go(final AcceptsOneWidget container) { ProjectConfigDto projectConfig = appContext.getCurrentProject().getProjectConfig(); <START> isPlainJava = "javac".equals(projectConfig.getType()); <END> setReadOnlyMod(); container.setWidget(view); if (!categories.isEmpty()) { view.renderLibraries(); return; } classpathContainer.getClasspathEntries(projectConfig.getPath()).then(new Operation<List<ClasspathEntryDto>>() { @Override public void apply(List<ClasspathEntryDto> arg) throws OperationException { categories.clear(); for (ClasspathEntryDto entry : arg) { if (CONTAINER == entry.getEntryKind() || LIBRARY == entry.getEntryKind()) { categories.put(entry.getPath(), entry); } } view.setData(categories); view.renderLibraries(); } }); }</code><technical_language>contants PlainJavaProjectConstants</technical_language>

Target:
public void go(final AcceptsOneWidget container) { ProjectConfigDto projectConfig = appContext.getCurrentProject().getProjectConfig(); isPlainJava = JAVAC.equals(projectConfig.getType()); setReadOnlyMod(); container.setWidget(view); if (!categories.isEmpty()) { view.renderLibraries(); return; } classpathContainer.getClasspathEntries(projectConfig.getPath()).then(new Operation<List<ClasspathEntryDto>>() { @Override public void apply(List<ClasspathEntryDto> arg) throws OperationException { categories.clear(); for (ClasspathEntryDto entry : arg) { if (CONTAINER == entry.getEntryKind() || LIBRARY == entry.getEntryKind()) { categories.put(entry.getPath(), entry); } } view.setData(categories); view.renderLibraries(); } }); }
Source:
<code>protected boolean checkPayload(VmPayload payload, String isoPath) { boolean returnValue = true; if (payload.getType() != VmDeviceType.CDROM && payload.getType() != VmDeviceType.FLOPPY) { addCanDoActionMessage(VdcBllMessages.VMPAYLOAD_INVALID_PAYLOAD_TYPE); returnValue = false; } else if (payload.getContent().length() > Config.<Integer> GetValue(ConfigValues.PayloadSize)) { <START> Integer lengthInKb = 2 * Config.<Integer> GetValue(ConfigValues.PayloadSize) / 1024; <END> addCanDoActionMessage(VdcBllMessages.VMPAYLOAD_SIZE_EXCEEDED); addCanDoActionMessage(String.format("$size %1$s", lengthInKb.toString())); returnValue = false; } else if (!StringHelper.isNullOrEmpty(isoPath) && payload.getType() == VmDeviceType.CDROM) { addCanDoActionMessage(VdcBllMessages.VMPAYLOAD_CDROM_EXCEEDED); returnValue = false; } return returnValue; }</code><technical_language>constant for 1024 (avoid magic numbers)</technical_language>

Target:
protected boolean checkPayload(VmPayload payload, String isoPath) { boolean returnValue = true; if (payload.getType() != VmDeviceType.CDROM && payload.getType() != VmDeviceType.FLOPPY) { addCanDoActionMessage(VdcBllMessages.VMPAYLOAD_INVALID_PAYLOAD_TYPE); returnValue = false; } else if (payload.getContent().length() > Config.<Integer> GetValue(ConfigValues.PayloadSize)) { Integer lengthInKb = 2 * Config.<Integer> GetValue(ConfigValues.PayloadSize) / Kb; addCanDoActionMessage(VdcBllMessages.VMPAYLOAD_SIZE_EXCEEDED); addCanDoActionMessage(String.format("$size %1$s", lengthInKb.toString())); returnValue = false; } else if (!StringHelper.isNullOrEmpty(isoPath) && payload.getType() == VmDeviceType.CDROM) { addCanDoActionMessage(VdcBllMessages.VMPAYLOAD_CDROM_EXCEEDED); returnValue = false; } return returnValue; }
Source:
<code>public void testCreateServer() { assertNotNull(dataCenter); testServer = serverApi().createServer( Server.Request.creatingBuilder() .dataCenterId(dataCenter.id()) .name("jclouds-node") .cpuFamily(CpuFamily.INTEL_XEON) .cores(1) .ram(1024) .build()); <START> assertRequestCompleted(testServer); <END> assertRequestCompleted(testServer); assertNotNull(testServer); assertEquals(testServer.properties().name(), "jclouds-node"); assertNodeRunning(ServerRef.create(dataCenter.id(), testServer.id())); }</code><technical_language>Duplicated</technical_language>

Target:
public void testCreateServer() { assertNotNull(dataCenter); testServer = serverApi().createServer( Server.Request.creatingBuilder() .dataCenterId(dataCenter.id()) .name("jclouds-node") .cpuFamily(CpuFamily.INTEL_XEON) .cores(1) .ram(1024) .build()); assertRequestCompleted(testServer); assertNotNull(testServer); assertEquals(testServer.properties().name(), "jclouds-node"); assertNodeRunning(ServerRef.create(dataCenter.id(), testServer.id())); }
Source:
<code>private Screen getNextScreen() { String next = mSession.getNeededData(mSession.getEvaluationContext()); if (next == null) { return null; } else if (next.equals(SessionFrame.STATE_COMMAND_ID)) { return new MenuScreen(); } else if (next.equals(SessionFrame.STATE_DATUM_VAL)) { return new EntityScreen(); } else if (next.equals(SessionFrame.STATE_QUERY_REQUEST)) { return new QueryScreen(qualifiedUsername, password, System.out); } else if (next.equals(SessionFrame.STATE_SYNC_REQUEST)) { <START> new SyncScreen(qualifiedUsername, password); <END> mSession.syncState(); if (mSession.finishExecuteAndPop(mSession.getEvaluationContext())) { mSession.clearVolatiles(); return getNextScreen(); } mSession.clearAllState(); return getNextScreen(); } else if (next.equalsIgnoreCase(SessionFrame.STATE_DATUM_COMPUTED)) { computeDatum(); return getNextScreen(); } throw new RuntimeException("Unexpected Frame Request: " + next); }</code><technical_language>sync screen CLI user facing output? feels worth display in parity webapps does, if synchronous. IE: SyncScreen show details connection, # of results returned, error up, etc. currently I screen this does, is process raw, want change call if</technical_language>

Target:
private Screen getNextScreen() { String next = mSession.getNeededData(mSession.getEvaluationContext()); if (next == null) { return null; } else if (next.equals(SessionFrame.STATE_COMMAND_ID)) { return new MenuScreen(); } else if (next.equals(SessionFrame.STATE_DATUM_VAL)) { return new EntityScreen(); } else if (next.equals(SessionFrame.STATE_QUERY_REQUEST)) { return new QueryScreen(qualifiedUsername, password, System.out); } else if (next.equals(SessionFrame.STATE_SYNC_REQUEST)) { return new SyncScreen(qualifiedUsername, password, System.out); } else if (next.equalsIgnoreCase(SessionFrame.STATE_DATUM_COMPUTED)) { computeDatum(); return getNextScreen(); } throw new RuntimeException("Unexpected Frame Request: " + next); }
Source:
<code>public void lunsMismatchWrongId() { Guid pvID = Guid.newGuid(); LUNs lunFromVG = new LUNs(); lunFromVG.setLUNId(Guid.newGuid().toString()); lunFromVG.setPhysicalVolumeId(pvID.toString()); LUNs lunFromDB = new LUNs(); lunFromDB.setLUNId(Guid.newGuid().toString()); lunFromDB.setPhysicalVolumeId(pvID.toString()); List<LUNs> lunsFromVgInfo = Collections.singletonList(lunFromVG); List<LUNs> lunsFromDb = Collections.singletonList(lunFromDB); boolean isMismatch = command.getLunsToUpdateInDb(lunsFromVgInfo, <START> lunsFromDb).size() > 0; <END> assertTrue(isMismatch); }</code><technical_language>isEmpty()</technical_language>

Target:
public void lunsMismatchWrongId() { Guid pvID = Guid.newGuid(); LUNs lunFromVG = new LUNs(); lunFromVG.setLUNId(Guid.newGuid().toString()); lunFromVG.setPhysicalVolumeId(pvID.toString()); LUNs lunFromDB = new LUNs(); lunFromDB.setLUNId(Guid.newGuid().toString()); lunFromDB.setPhysicalVolumeId(pvID.toString()); List<LUNs> lunsFromVgInfo = Collections.singletonList(lunFromVG); List<LUNs> lunsFromDb = Collections.singletonList(lunFromDB); boolean isMatch = command.getLunsToUpdateInDb(lunsFromVgInfo, lunsFromDb).isEmpty(); assertFalse(isMatch); }
Source:
<code>protected ExtractionResult visitInPredicate(InPredicate node, Boolean complement) { <START> InListExpression valueList = (InListExpression) node.getValueList(); <END> checkState(!valueList.getValues().isEmpty(), "InListExpression should never be empty"); ImmutableList.Builder<Expression> disjuncts = ImmutableList.builder(); for (Expression expression : valueList.getValues()) { disjuncts.add(new ComparisonExpression(EQUAL, node.getValue(), expression)); } return process(or(disjuncts.build()), complement); }</code><technical_language>keep: !(node.getValueList() instanceof InListExpression)</technical_language>

Target:
protected ExtractionResult visitInPredicate(InPredicate node, Boolean complement) { if (!(node.getValueList() instanceof InListExpression)) { return super.visitInPredicate(node, complement); } InListExpression valueList = (InListExpression) node.getValueList(); checkState(!valueList.getValues().isEmpty(), "InListExpression should never be empty"); ImmutableList.Builder<Expression> disjuncts = ImmutableList.builder(); for (Expression expression : valueList.getValues()) { disjuncts.add(new ComparisonExpression(EQUAL, node.getValue(), expression)); } return process(or(disjuncts.build()), complement); }
Source:
<code>public void getAllCustomers() throws Exception { putAll(); mockMvc.perform(get("/v1/customers?limit=ALL") .with(POST_PROCESSOR)) .andExpect(status().isOk()) .andExpect( <START> header().string("Content-Location", new StringStartsWith(BASE_URL + "/customers/"))) <END> .andExpect(jsonPath("$.customers", jsonEquals(jsonResources.get(CUSTOMER_LIST_JSON)))); }</code><technical_language>This is noisy reads better: import static org.hamcrest.Matchers.startsWith; ... startsWith(BASE_URL + "/customers/")</technical_language>

Target:
public void getAllCustomers() throws Exception { putAll(); mockMvc.perform(get("/v1/customers?limit=ALL") .with(POST_PROCESSOR)) .andExpect(status().isOk()) .andExpect( header().string("Content-Location", startsWith(BASE_URL + "/customers/"))) .andExpect(jsonPath("$.customers", jsonEquals(jsonResources.get(CUSTOMER_LIST_JSON)))); }
Source:
<code>void setValueAsString(String theValue) throws IllegalArgumentException; String getValueAsString(); T getValue(); boolean hasValue(); IPrimitiveType<T> setValue(T theValue) throws IllegalArgumentException; <START> static <T> T toValueOrNull(IPrimitiveType<T> thePrimitiveType) { <END> return thePrimitiveType != null ? thePrimitiveType.getValue() : null; }</code><technical_language>static, instance method? (default method interface)</technical_language>

Target:
void setValueAsString(String theValue) throws IllegalArgumentException; T getValue(); IPrimitiveType<T> setValue(T theValue) throws IllegalArgumentException; boolean hasValue(); @Nullable static <T> T toValueOrNull(@Nullable IPrimitiveType<T> thePrimitiveType) { return thePrimitiveType != null ? thePrimitiveType.getValue() : null; }
Source:
<code>public void progress() { for (int i = 0; i < 2; i++) { for (final Location check : this.getCircle(center, this.radius + i, 10)) { <START> Block b = check.getBlock(); <END> if (this.checked.contains(b)) { continue; } b = this.getAppropriateBlock(b); if (b == null) { continue; } new RaiseEarth(player, b.getLocation(), Math.round(this.height - i)); this.checked.add(b); } } this.bPlayer.addCooldown("EarthDome", this.getCooldown()); this.remove(); }</code><technical_language>This variable named currentBlock more readable</technical_language>

Target:
public void progress() { for (int i = 0; i < 2; i++) { for (final Location check : this.getCircle(center, this.radius + i, 10)) { Block currBlock = check.getBlock(); if (this.checked.contains(currBlock)) { continue; } currBlock = this.getAppropriateBlock(currBlock); if (currBlock == null) { continue; } new RaiseEarth(player, currBlock.getLocation(), Math.round(this.height - i)); this.checked.add(currBlock); } } this.bPlayer.addCooldown("EarthDome", this.getCooldown()); this.remove(); }
Source:
<code>public ResponseEntity<Map<String, String>> recharge(@RequestBody Map<String, String> params) { logger.info("[Fudian] call register"); <START> RegisterRequestDto requestDto = registerService.register(params.get("loginName"), params.get("mobilePhone"), params.get("realName"), params.get("identityCode")); <END> return this.generateResponseJson(requestDto, ApiType.REGISTER); }</code><technical_language>mobilePhone->mobile</technical_language>

Target:
public ResponseEntity<Map<String, String>> recharge(@RequestBody Map<String, String> params) { logger.info("[Fudian] call register"); RegisterRequestDto requestDto = registerService.register(params.get("loginName"), params.get("mobile"), params.get("realName"), params.get("identityCode")); return this.generateResponseJson(requestDto, ApiType.REGISTER); }
Source:
<code>public void testRemoveIf() { <START> <END> ArrayList<Integer> integerList = new ArrayList<>(); Collection<Integer> integerCollection = integerList; for (int i = 0; i < 100; ++i) { integerCollection.add(i); } integerCollection.removeIf(isEven); for (int i = 0; i < integerList.size(); i++) { assertTrue(integerList.get(i) % 2 != 0); if (i < integerList.size() - 1) { assertTrue(integerList.get(i + 1) > integerList.get(i)); } } integerCollection.removeIf(isOdd); assertTrue(integerCollection.isEmpty()); }</code><technical_language>stray blank line</technical_language>

Target:
public void testRemoveIf() { for (Supplier<Collection<Integer>> impl : collectionImpls) { Collection<Integer> integers = impl.get(); for (int h = 0; h < 100; ++h) { integers.add((h >>> 2) ^ (h >>> 5) ^ (h >>> 11) ^ (h >>> 17)); } integers.removeIf(isEven); for (Integer i : integers) { assertTrue(i % 2 != 0); } integers.removeIf(isOdd); assertTrue(integers.isEmpty()); } }
Source:
<code>private boolean isNumberOfNodesLimited() { <START> return maximumNumberOfNodes != null && maximumNumberOfNodes > 0; <END> }</code><technical_language>zero a legal value, I write test rather: return maximumNumberOfNodes != null && maximumNumberOfNodes >= 0;</technical_language>

Target:
private boolean isNumberOfNodesLimited() { return maximumNumberOfNodes != null && maximumNumberOfNodes >= 0; }
Source:
<code>public void process() { PerformanceMonitor.startActivity("rendering/finalPostProcessing"); postMaterial.setFloat("focalDistance", cameraTargetSystem.getFocalDistance(), true); if (isFilmGrainEnabled) { postMaterial.setFloat("grainIntensity", filmGrainIntensity, true); postMaterial.setFloat("noiseOffset", randomGenerator.nextFloat(), true); postMaterial.setFloat2("noiseSize", noiseTextureSize, noiseTextureSize, true); postMaterial.setFloat2("renderTargetSize", lastUpdatedGBuffer.width(), lastUpdatedGBuffer.height(), true); } if (isMotionBlurEnabled) { postMaterial.setMatrix4("invViewProjMatrix", activeCamera.getInverseViewProjectionMatrix(), true); postMaterial.setMatrix4("prevViewProjMatrix", activeCamera.getPrevViewProjectionMatrix(), true); } renderFullscreenQuad(); if (!screenGrabber.isTakingScreenshot()) { <START> screenGrabber.saveScreenshot(); <END> } PerformanceMonitor.endActivity(); }</code><technical_language>save screenshot if -are- screenshot if aren't</technical_language>

Target:
public void process() { PerformanceMonitor.startActivity("rendering/finalPostProcessing"); postMaterial.setFloat("focalDistance", cameraTargetSystem.getFocalDistance(), true); if (isFilmGrainEnabled) { postMaterial.setFloat("grainIntensity", filmGrainIntensity, true); postMaterial.setFloat("noiseOffset", randomGenerator.nextFloat(), true); postMaterial.setFloat2("noiseSize", noiseTextureSize, noiseTextureSize, true); postMaterial.setFloat2("renderTargetSize", lastUpdatedGBuffer.width(), lastUpdatedGBuffer.height(), true); } if (isMotionBlurEnabled) { postMaterial.setMatrix4("invViewProjMatrix", activeCamera.getInverseViewProjectionMatrix(), true); postMaterial.setMatrix4("prevViewProjMatrix", activeCamera.getPrevViewProjectionMatrix(), true); } renderFullscreenQuad(); if (screenGrabber.isTakingScreenshot()) { screenGrabber.saveScreenshot(); } PerformanceMonitor.endActivity(); }
Source:
<code>public void checkCanSetUser(Principal principal, String userName) { if (principalUserMatchRules.isEmpty()) { return; } if (principal == null) { denySetUser(principal, userName); } String principalName = principal.getName(); for (PrincipalUserMatchRule rule : principalUserMatchRules) { Optional<Boolean> allowed = rule.match(principalName, userName); if (allowed.isPresent()) { if (allowed.get()) { return; } <START> else { <END> denySetUser(principal, userName); } } } denySetUser(principal, userName); }</code><technical_language>Nit: else is redundant if block returns. This java if (allowed.get()) { return; } denySetUser(principal, userName);</technical_language>

Target:
public void checkCanSetUser(Principal principal, String userName) { if (!principalUserMatchRules.isPresent()) { return; } if (principal == null) { denySetUser(principal, userName); } String principalName = principal.getName(); for (PrincipalUserMatchRule rule : principalUserMatchRules.get()) { Optional<Boolean> allowed = rule.match(principalName, userName); if (allowed.isPresent()) { if (allowed.get()) { return; } denySetUser(principal, userName); } } denySetUser(principal, userName); }
Source:
<code>public void testInitEmptyRepoMissingMaster() throws Exception { String projectName = "AnyProjectName"; TestRepository testRepository = createAndShare(projectName); selectProject(projectName); clickInit(); bot.button("Yes").click(); fillDialog(MASTER_BRANCH_MISSING); bot.waitUntil(shellIsActive(UIText.InitDialog_masterBranchIsMissing)); bot.button("Yes").click(); bot.waitUntil(Conditions.waitForJobs(JobFamilies.GITFLOW_FAMILY, "Git flow jobs")); Repository localRepository = testRepository.getRepository(); GitFlowRepository gitFlowRepository = new GitFlowRepository(localRepository); GitFlowConfig config = gitFlowRepository.getConfig(); assertEquals(DEVELOP_BRANCH, localRepository.getBranch()); assertEquals(MASTER_BRANCH_MISSING, config.getMaster()); assertEquals(FEATURE_BRANCH_PREFIX, config.getFeaturePrefix()); assertEquals(RELEASE_BRANCH_PREFIX, config.getReleasePrefix()); assertEquals(HOTFIX_BRANCH_PREFIX, config.getHotfixPrefix()); assertEquals(VERSION_TAG_PREFIX, config.getVersionTagPrefix()); assertNotNull( <START> localRepository.findRef(Constants.R_HEADS <END> + DEVELOP_BRANCH)); }</code><technical_language>exactRef</technical_language>

Target:
public void testInitEmptyRepoMissingMaster() throws Exception { String projectName = "AnyProjectName"; TestRepository testRepository = createAndShare(projectName); selectProject(projectName); clickInit(); bot.button("Yes").click(); fillDialog(MASTER_BRANCH_MISSING); bot.waitUntil(shellIsActive(UIText.InitDialog_masterBranchIsMissing)); bot.button("Yes").click(); bot.waitUntil(Conditions.waitForJobs(JobFamilies.GITFLOW_FAMILY, "Git flow jobs")); Repository localRepository = testRepository.getRepository(); GitFlowRepository gitFlowRepository = new GitFlowRepository(localRepository); GitFlowConfig config = gitFlowRepository.getConfig(); assertEquals(DEVELOP_BRANCH, localRepository.getBranch()); assertEquals(MASTER_BRANCH_MISSING, config.getMaster()); assertEquals(FEATURE_BRANCH_PREFIX, config.getFeaturePrefix()); assertEquals(RELEASE_BRANCH_PREFIX, config.getReleasePrefix()); assertEquals(HOTFIX_BRANCH_PREFIX, config.getHotfixPrefix()); assertEquals(VERSION_TAG_PREFIX, config.getVersionTagPrefix()); assertNotNull( localRepository.exactRef(Constants.R_HEADS + DEVELOP_BRANCH)); }
Source:
<code>private static boolean hasUnbracedStatements(DetailAST ast) { final DetailAST nextSibling = ast.getNextSibling(); return nextSibling != null && nextSibling.getType() == TokenTypes.SLIST <START> && !"{".equals(nextSibling.getFirstChild().getText()); <END> }</code><technical_language>This return nextSibling != null && nextSibling.getType() == TokenTypes.SLIST && nextSibling.getFirstChild().getType() != TokenTypes.SLIST;</technical_language>

Target:
private static boolean hasUnbracedStatements(DetailAST ast) { final DetailAST nextSibling = ast.getNextSibling(); return nextSibling != null && nextSibling.getType() == TokenTypes.SLIST && nextSibling.getFirstChild().getType() != TokenTypes.SLIST; }
Source:
<code>private ListenableFuture<MutateRowResponse> processUnsafeMutationSplit(MutateRowsRequest.Entry entry) { final SettableFuture<MutateRowResponse> mutateRowResponseListenableFuture = SettableFuture.create(); final List<List<Mutation>> subSets = Lists.partition(entry.getMutationsList(), (int) MAX_NUMBER_OF_MUTATIONS); for (List<Mutation> mutations : subSets) { ListenableFuture<MutateRowResponse> childFuture = sendDirect(entry.getRowKey(), mutations); <START> Futures.addCallback(childFuture, new FutureCallback<MutateRowResponse>() { <END> private boolean failed = false; private int success = 0; @Override public void onSuccess(@Nullable MutateRowResponse result) { success++; if (!failed && success == subSets.size()) { mutateRowResponseListenableFuture.set(result); } } @Override public void onFailure(Throwable t) { failed = true; mutateRowResponseListenableFuture.setException(t); } }); operationAccountant.registerOperation(childFuture); } return mutateRowResponseListenableFuture; }</code><technical_language>This callback needs created for loop, otherwise, success more 1</technical_language>

Target:
private ListenableFuture<MutateRowResponse> processUnsafeMutationSplit(MutateRowsRequest.Entry entry) { final SettableFuture<MutateRowResponse> mutateRowResponseListenableFuture = SettableFuture.create(); final List<List<Mutation>> subSets = Lists.partition(entry.getMutationsList(), (int) MAX_NUMBER_OF_MUTATIONS); FutureCallback<MutateRowResponse> futureCallback = new FutureCallback<MutateRowResponse>() { private boolean failed = false; private int success = 0; @Override public void onSuccess(@Nullable MutateRowResponse result) { success++; if (!failed && success == subSets.size()) { mutateRowResponseListenableFuture.set(result); } } @Override public void onFailure(Throwable t) { failed = true; mutateRowResponseListenableFuture.setException(t); } }; for (List<Mutation> mutations : subSets) { ListenableFuture<MutateRowResponse> childFuture = sendDirect(entry.getRowKey(), mutations); Futures.addCallback(childFuture, futureCallback); operationAccountant.registerOperation(childFuture); } return mutateRowResponseListenableFuture; }
Source:
<code>public void updateUsbSlots(VmBase oldVm, VmBase newVm) { final int oldNumberOfSlots = getUsbSlots(oldVm.getId()).size(); final int newNumberOfUsbSlots = Config.<Integer> getValue(ConfigValues.NumberOfUSBSlots); if (!requiresSpiceUsb(oldVm) && requiresSpiceUsb(newVm)) { disableNormalUsb(newVm.getId()); enableSpiceUsb(newVm.getId(), newNumberOfUsbSlots); return; } if (requiresSpiceUsb(oldVm) && requiresSpiceUsb(newVm)) { updateSpiceUsb(newVm.getId(), oldNumberOfSlots, newNumberOfUsbSlots); return; } if (requiresSpiceUsb(oldVm) && !requiresSpiceUsb(newVm)) { disableSpiceUsb(newVm.getId()); enableNormalUsb(newVm); return; } if (!requiresSpiceUsb(oldVm) && !requiresSpiceUsb(newVm)) { updateNormalUsb(newVm); return; } throw new RuntimeException( format("Unexpected state: oldUsbPolicy=%s, <START> oldGraphicsDevices=[%s], newUsbPolicy=%s, <END> newGraphicsDevices=[%s]", oldVm.getUsbPolicy(), StringUtils.join(getGraphicsDevices(oldVm.getId()), ", "), newVm.getUsbPolicy(), StringUtils.join(getGraphicsDevices(newVm.getId()), ", "))); }</code><technical_language>%s (removing square brackets)</technical_language>

Target:
public void updateUsbSlots(VmBase oldVm, VmBase newVm) { final UsbPolicy oldUsbPolicy = oldVm.getUsbPolicy(); final UsbPolicy newUsbPolicy = newVm.getUsbPolicy(); final int oldNumberOfSlots = getUsbSlots(oldVm.getId()).size(); final int newNumberOfUsbSlots = Config.<Integer> getValue(ConfigValues.NumberOfUSBSlots); if (UsbPolicy.DISABLED == oldUsbPolicy && UsbPolicy.ENABLED_NATIVE == newUsbPolicy) { disableNormalUsb(newVm.getId()); enableSpiceUsb(newVm.getId(), newNumberOfUsbSlots); return; } if (UsbPolicy.ENABLED_NATIVE == oldUsbPolicy && UsbPolicy.ENABLED_NATIVE == newUsbPolicy) { updateSpiceUsb(newVm.getId(), oldNumberOfSlots, newNumberOfUsbSlots); return; } if (UsbPolicy.ENABLED_NATIVE == oldUsbPolicy && UsbPolicy.DISABLED == newUsbPolicy) { disableSpiceUsb(newVm.getId()); enableNormalUsb(newVm); return; } if (UsbPolicy.DISABLED == oldUsbPolicy && UsbPolicy.DISABLED == newUsbPolicy) { updateNormalUsb(newVm); return; } throw new RuntimeException( format("Unexpected state: oldUsbPolicy=%s, newUsbPolicy=%s", oldUsbPolicy, newUsbPolicy)); }
Source:
<code>public AddWanConfigResult(Collection<String> addedPublisherIds, Collection<String> ignoredPublisherIds) { this.addedPublisherIds = addedPublisherIds; <START> this.ignoredPublisherIds = ignoredPublisherIds; <END> }</code><technical_language>i think, passed collections null. put a null check</technical_language>

Target:
public AddWanConfigResult(Collection<String> addedPublisherIds, Collection<String> ignoredPublisherIds) { Preconditions.checkNotNull(addedPublisherIds, "Added publisher IDs must not be null"); Preconditions.checkNotNull(ignoredPublisherIds, "Ignored publisher IDs must not be null"); this.addedPublisherIds = addedPublisherIds; this.ignoredPublisherIds = ignoredPublisherIds; }
Source:
<code>public boolean getTaskForOreon(Actor oreon) { <START> List<EntityRef> availableTasks = oreonHolding.availableTasks; <END> logger.info("Looking for task in " + oreonHolding); if (!availableTasks.isEmpty()) { EntityRef taskEntity = availableTasks.remove(0); TaskComponent taskComponent = taskEntity.getComponent(TaskComponent.class); TaskComponent oreonTaskComponent = oreon.getComponent(TaskComponent.class); oreonTaskComponent.assignedTaskType = taskComponent.assignedTaskType; oreonTaskComponent.creationTime = taskComponent.creationTime; oreonTaskComponent.taskRegion = taskComponent.taskRegion; oreonTaskComponent.taskStatus = TaskStatusType.InProgress; oreon.save(oreonTaskComponent); MinionMoveComponent moveComponent = oreon.getComponent(MinionMoveComponent.class); Vector3i target = oreonTaskComponent.taskRegion.min(); moveComponent.target = new Vector3f(target.x, target.y, target.z); logger.info("Set Oreon target to : " + moveComponent.target); oreon.save(moveComponent); return true; } return false; }</code><technical_language>moment, a Deque<E> a data structure a List for storing tasks. allows if tasks waiting, pull next add new tasks. automatically sort task addition time for you</technical_language>

Target:
public boolean getTaskForOreon(Actor oreon) { Queue<EntityRef> availableTasks = oreonHolding.availableTasks; logger.debug("Looking for task in " + oreonHolding); if (!availableTasks.isEmpty()) { EntityRef taskEntity = availableTasks.remove(); TaskComponent taskComponent = taskEntity.getComponent(TaskComponent.class); TaskComponent oreonTaskComponent = oreon.getComponent(TaskComponent.class); oreonTaskComponent.assignedTaskType = taskComponent.assignedTaskType; oreonTaskComponent.creationTime = taskComponent.creationTime; oreonTaskComponent.taskRegion = taskComponent.taskRegion; oreonTaskComponent.taskStatus = TaskStatusType.InProgress; oreon.save(oreonTaskComponent); MinionMoveComponent moveComponent = oreon.getComponent(MinionMoveComponent.class); Vector3i target = oreonTaskComponent.taskRegion.min(); moveComponent.target = new Vector3f(target.x, target.y, target.z); logger.info("Set Oreon target to : " + moveComponent.target); oreon.save(moveComponent); return true; } return false; }
Source:
<code>public <T> T readDataAndStat(String path, Stat stat, boolean returnNullIfPathNotExists) { T data = null; try { data = readData(path, stat); } catch (ZkNoNodeException e) { if (!returnNullIfPathNotExists) { throw e; } } <START> return data; <END> }</code><technical_language>Same, call raw zkClient</technical_language>

Target:
public <T> T readDataAndStat(String path, Stat stat, boolean returnNullIfPathNotExists) { checkIfPathContainsShardingKey(path); return _rawZkClient.readDataAndStat(path, stat, returnNullIfPathNotExists); }
Source:
<code>public void fail_due_to_mixture_of_dtd_and_xsd_with_schema_provided() { File xmlFile = new File("src/test/resources/checks/XmlSchemaCheck/dtd_and_xsd/entities.xml"); String schema = "src/test/resources/checks/XmlSchemaCheck/dtd_and_xsd/entities.xsd"; parseAndCheck(xmlFile, createCheck(schema, null)); assertLog("Unable to validate file .*entities\\.xml.*", true); <START> assertLog("Cause: .*nested\\.xml.*(No such file or directory|The system cannot find the file specified).*", true); <END> }</code><technical_language>@gjd6640 this change more explicit, e.g. create local vars for OS</technical_language>

Target:
public void fail_due_to_mixture_of_dtd_and_xsd_with_schema_provided() { File xmlFile = new File("src/test/resources/checks/XmlSchemaCheck/dtd_and_xsd/entities.xml"); String schema = "src/test/resources/checks/XmlSchemaCheck/dtd_and_xsd/entities.xsd"; parseAndCheck(xmlFile, createCheck(schema, null)); assertLog("Unable to validate file .*entities\\.xml.*", true); String expectedErrorOnLinux = "Cause: .*nested\\.xml.*No such file or directory.*"; String expectedErrorOnWindows = "Cause: .*nested\\.xml.*The system cannot find the file specified.*"; assertTrue(logsContain(expectedErrorOnLinux) || logsContain(expectedErrorOnWindows)); }
Source:
<code>public void setParameter(String name, Object value) { <START> synchronized (fParameters) { <END> if (!fParameterNames.contains(name)) { throw new RuntimeException(NLS.bind(Messages.TmfAbstractAnalysisModule_InvalidParameter, name, getName())); } Object oldValue = fParameters.get(name); fParameters.put(name, value); if ((value != null) && !(value.equals(oldValue))) { parameterChanged(name); } } }</code><technical_language>if synchronizing methods object, class's monitor, synchronized keyword in method signature (public synchronized void ...) This avoids extra sync objects (and saves level of indentation!)</technical_language>

Target:
public synchronized void setParameter(String name, Object value) { if (!fParameterNames.contains(name)) { throw new RuntimeException(NLS.bind(Messages.TmfAbstractAnalysisModule_InvalidParameter, name, getName())); } Object oldValue = fParameters.get(name); fParameters.put(name, value); if ((value != null) && !(value.equals(oldValue))) { parameterChanged(name); } }
Source:
<code>public static boolean isPapyrusContext(Comparison comparison) { IComparisonScope comparisonScope = (IComparisonScope)EcoreUtil.getAdapter(comparison.eAdapters(), IComparisonScope.class); if <START> (comparisonScope != <END> null) { return Iterables.any(comparisonScope.getNsURIs(), new Predicate<String>() { public boolean apply(String input) { return input.contains(PAPYRUS_NS_URI) || input.contains(NOTATION_NS_URI); } }); } for (MatchResource matchResource : comparison.getMatchedResources()) { if (hasPapyrusURI(matchResource)) { return true; } } return false; }</code><technical_language>comparison scope minimized too, e.g., a comparison HEAD UML file changed, comparisonScope.getNsURIs() UML namespace</technical_language>

Target:
public static boolean isPapyrusContext(Comparison comparison) { final IComparisonScope2 comparisonScope = (IComparisonScope2)EcoreUtil.getAdapter(comparison .eAdapters(), IComparisonScope2.class); if (comparisonScope != null) { return containsPapyrusURI(comparisonScope.getAllInvolvedResourceURIs()); } return containsPapyrusURI(comparison.getMatchedResources()); }
Source:
<code>public <A> PathBuilder<A> get(String property, Class<A> type) { SimpleEntry<String, Class<?>> entry = new SimpleEntry<String, Class<?>>(property, type); PathBuilder<A> path = (PathBuilder<A>) properties.get(entry); if (path == null) { Class<? extends A> vtype = validate(property, type); path = new PathBuilder<A>(vtype, forProperty(property), validator); <START> properties.putIfAbsent(entry, path); <END> } return path; }</code><technical_language>for this one</technical_language>

Target:
public <A> PathBuilder<A> get(String property, Class<A> type) { SimpleEntry<String, Class<?>> entry = new SimpleEntry<String, Class<?>>(property, type); PathBuilder<A> path = (PathBuilder<A>) properties.get(entry); PathBuilder<?> existingPath = null; if (path == null) { Class<? extends A> vtype = validate(property, type); path = new PathBuilder<A>(vtype, forProperty(property), validator); existingPath = properties.putIfAbsent(entry, path); } return existingPath == null ? path : (PathBuilder<A>) existingPath; }
Source:
<code>public void addColumn(long tableId, ColumnInfo column) { String columnType = sqlColumnType(column.getType()); if (columnType == null) { return; } String sql = format("ALTER TABLE %s ADD COLUMN (%s %s, %s %s)", shardIndexTable(tableId), minColumn(column.getColumnId()), columnType, maxColumn(column.getColumnId()), columnType); int attempts = 0; while (true) { attempts++; try (Handle handle = dbi.open()) { handle.execute(sql); } catch (DBIException e) { if (isSyntaxOrAccessError(e)) { return; } if (attempts >= MAX_ADD_COLUMN_ATTEMPTS) { throw metadataError(e); } <START> log.warn(e, "Failed to alter table with attempt %d, will retry. SQL: %s", attempts, sql); <END> try { TimeUnit.MILLISECONDS.sleep(ADD_COLUMN_RETRY_SLEEP_MS); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); throw new RuntimeException("Interrupted", ie); } } } }</code><technical_language>%s %d need specific formatting %02d. safer works for type</technical_language>

Target:
public void addColumn(long tableId, ColumnInfo column) { String columnType = sqlColumnType(column.getType()); if (columnType == null) { return; } String sql = format("ALTER TABLE %s ADD COLUMN (%s %s, %s %s)", shardIndexTable(tableId), minColumn(column.getColumnId()), columnType, maxColumn(column.getColumnId()), columnType); int attempts = 0; while (true) { attempts++; try (Handle handle = dbi.open()) { handle.execute(sql); } catch (DBIException e) { if (isSyntaxOrAccessError(e)) { return; } if (attempts >= MAX_ADD_COLUMN_ATTEMPTS) { throw metadataError(e); } log.warn(e, "Failed to alter table on attempt %s, will retry. SQL: %s", attempts, sql); try { SECONDS.sleep(3); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); throw metadataError(ie); } } } }
Source:
<code>public boolean getBoolean(Config config, String section, String subsection, String name, boolean defaultValue) { String n = config.getRawString(section, subsection, name); <START> if (n == null) <END> return defaultValue; if (Config.MAGIC_EMPTY_VALUE == n) return true; try { return StringUtils.toBoolean(n); } catch (IllegalArgumentException err) { throw new IllegalArgumentException(MessageFormat.format( JGitText.get().invalidBooleanValue, section, name, n)); } }</code><technical_language>missing braces, more of this kind</technical_language>

Target:
public boolean getBoolean(Config config, String section, String subsection, String name, boolean defaultValue) { String n = config.getRawString(section, subsection, name); if (n == null) { return defaultValue; } if (Config.MAGIC_EMPTY_VALUE == n) { return true; } try { return StringUtils.toBoolean(n); } catch (IllegalArgumentException err) { throw new IllegalArgumentException(MessageFormat.format( JGitText.get().invalidBooleanValue, section, name, n)); } }
Source:
<code>protected Rollover(Rollover.Builder builder) { super(builder); this.indexName = builder.index; Map<String, Object> rolloverConditions = new HashMap<>(); if (builder.conditions != null) { rolloverConditions.put("conditions", builder.conditions); } if (builder.settings != null) { <START> rolloverConditions.put("settings", builder.conditions); <END> } this.payload = rolloverConditions; setURI(buildURI() + (builder.isDryRun ? "?dry_run" : "")); }</code><technical_language>@MarinaRazumovsky Please change builder.conditions builder.settings</technical_language>

Target:
protected Rollover(Rollover.Builder builder) { super(builder); this.indexName = builder.index; Map<String, Object> rolloverConditions = new HashMap<>(); if (builder.conditions != null) { rolloverConditions.put("conditions", builder.conditions); } if (builder.settings != null) { rolloverConditions.put("settings", builder.settings); } this.payload = rolloverConditions; setURI(buildURI() + (builder.isDryRun ? "?dry_run" : "")); }
Source:
<code>public void testGetStringBuilderCapacityRestrictedToMax() throws Exception { final StringBuilder sb = ConcreteStringLayout.getStringBuilder(); assertEquals("initial capacity", ConcreteStringLayout.DEFAULT_STRING_BUILDER_SIZE, sb.capacity()); final int MEDIUM = ConcreteStringLayout.DEFAULT_STRING_BUILDER_SIZE + 100; final String mediumMessage = new String(new char[MEDIUM]); sb.append(mediumMessage); final int GROWN = sb.capacity(); assertTrue("capacity has grown", GROWN >= MEDIUM); assertEquals("length=msg length", MEDIUM, sb.length()); final int LARGE = 4096; final String largeMessage = new String(new char[LARGE]); final StringBuilder sb2 = ConcreteStringLayout.getStringBuilder(); <START> assertTrue("reset capacity", sb2.capacity() <= AbstractStringLayout.MAX_STRING_BUILDER_SIZE); <END> assertEquals("empty, ready for use", 0, sb2.length()); sb2.append(largeMessage); assertTrue("capacity grown to fit msg length", sb2.capacity() >= LARGE); assertEquals("length=msg length", LARGE, sb2.length()); sb2.setLength(0); assertEquals("empty, cleared", 0, sb2.length()); final StringBuilder next = ConcreteStringLayout.getStringBuilder(); assertEquals("max capacity", ConcreteStringLayout.MAX_STRING_BUILDER_SIZE, next.capacity()); assertEquals("empty, ready for use", 0, next.length()); }</code><technical_language>exact comparison here? This feels hacky :-(</technical_language>

Target:
public void testGetStringBuilderCapacityRestrictedToMax() throws Exception { final StringBuilder sb = ConcreteStringLayout.getStringBuilder(); int initialCapacity = sb.capacity(); assertEquals("initial capacity", ConcreteStringLayout.DEFAULT_STRING_BUILDER_SIZE, sb.capacity()); final int SMALL = 100; final String mediumMessage = new String(new char[SMALL]); sb.append(mediumMessage); assertTrue("capacity not grown", sb.capacity() == initialCapacity); assertEquals("length=msg length", SMALL, sb.length()); final StringBuilder sb2 = ConcreteStringLayout.getStringBuilder(); assertEquals("capacity unchanged", sb2.capacity(), initialCapacity); assertEquals("empty, ready for use", 0, sb2.length()); final int LARGE = ConcreteStringLayout.MAX_STRING_BUILDER_SIZE * 2; final String largeMessage = new String(new char[LARGE]); sb2.append(largeMessage); assertTrue("capacity grown to fit msg length", sb2.capacity() >= LARGE); assertTrue("capacity is now greater than max length", sb2.capacity() >= ConcreteStringLayout.MAX_STRING_BUILDER_SIZE); assertEquals("length=msg length", LARGE, sb2.length()); sb2.setLength(0); assertEquals("empty, cleared", 0, sb2.length()); assertTrue("capacity remains very large", sb2.capacity() >= ConcreteStringLayout.MAX_STRING_BUILDER_SIZE); final StringBuilder next = ConcreteStringLayout.getStringBuilder(); assertEquals("capacity, trimmed to MAX_STRING_BUILDER_SIZE", ConcreteStringLayout.MAX_STRING_BUILDER_SIZE, next.capacity()); assertEquals("empty, ready for use", 0, next.length()); }
Source:
<code>public static long getAdvancedLongConfigProperty(String property, long defaultValue) { String globalPropertyKey = PATH_PREFIX + property; <START> return Long.getLong(globalPropertyKey, defaultValue); <END> }</code><technical_language>change parseLong getLong intentional? making number parsing more tolerant, bad in principle means long parsing is more tolerant number parsing in MemorySizeParser, confusing</technical_language>

Target:
public static long getAdvancedLongConfigProperty(String property, long defaultValue) { String globalPropertyKey = PATH_PREFIX + property; return Long.parseLong(System.getProperty(globalPropertyKey, Long.toString(defaultValue))); }
Source:
<code>public Map<String, ByteBuffer> getOperatorState() throws IOException { final Map<String, Object> stateMap = new HashMap<>(); stateMap.put("applyStatefulFunctionState", applyStatefulFunction.getCurrentState()); <START> return StateSerializer.getSerializedStateMap(stateMap); <END> }</code><technical_language>Do serialize state in Operator? I caller class a place serialize it</technical_language>

Target:
public Map<String, Object> getOperatorState() { final Map<String, Object> stateMap = new HashMap<>(); stateMap.put("applyStatefulFunctionState", applyStatefulFunction.getCurrentState()); return stateMap; }
Source:
<code>public void waitNode(String expectedText) { seleniumWebDriverHelper.waitNoExceptions( () -> seleniumWebDriverHelper.waitSuccessCondition( driver -> { for (int i = 0; i < getActionNodesCount(); i++) { if (isActionNodeContainsText(i, expectedText)) { return true; } } return false; }), <START> ELEMENT_TIMEOUT_SEC, <END> StaleElementReferenceException.class); }</code><technical_language>ELEMENT_TIMEOUT_SEC = 20 sec enough, iteration for-loop getActionNodesCount:LOAD_PAGE_TIMEOUT_SEC + isActionNodeContainsText:LOAD_PAGE_TIMEOUT_SEC = 20 sec</technical_language>

Target:
public void waitNode(String expectedText) { seleniumWebDriverHelper.waitNoExceptions( () -> seleniumWebDriverHelper.waitSuccessCondition( driver -> { for (int i = 0; i < getActionNodesCount(); i++) { if (isActionNodeContainsText(i, expectedText)) { return true; } } return false; }), WIDGET_TIMEOUT_SEC * 2, StaleElementReferenceException.class); }
Source:
<code>public static <K, V> ReadEntryView<K, V> readOnly(CacheEntry<K, V> entry) { <START> return new EntryBackedReadOnlyView<>(entry, null, null); <END> }</code><technical_language>keeping conversion-less method</technical_language>

Target:
public static <K, V> ReadEntryView<K, V> readOnly(CacheEntry<K, V> entry) { return new EntryBackedReadOnlyView<>(entry, DataConversion.DEFAULT, DataConversion.DEFAULT); }