auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private static String getPackageNameToUse(Context context) { List<String> browserWithCustomTabsSupport = getBrowserWithCustomTabsSupport(context); String defaultBrowser = getDefaultBrowser(context); for (String browser : browserWithCustomTabsSupport) { <START> if (browser.equals(defaultBrowser)) { <END> return browser; } } return browserWithCustomTabsSupport.get(0); }</code><technical_language>TextUtils.equals(browser, defaultBrowser) instead? a null-safe version of String comparison is defaultBrowser null</technical_language>

Target:
private static String getPackageNameToUse(Context context) { List<String> browsersWithCustomTabsSupport = getBrowsersWithCustomTabsSupport(context); String defaultBrowser = getDefaultBrowser(context); for (String browser : browsersWithCustomTabsSupport) { if (TextUtils.equals(browser, defaultBrowser)) { return browser; } } if (browsersWithCustomTabsSupport.isEmpty()) { return null; } return browsersWithCustomTabsSupport.get(0); }
Source:
<code>public void marshal(Object value, HierarchicalStreamWriter writer, MarshallingContext context) { if (value instanceof Map) { Map<?, ?> map = (Map<?, ?>) value; for (Object obj : map.entrySet()) { Entry<?, ?> entry = (Entry<?, ?>) obj; writer.startNode(entry.getKey().toString()); marshal(entry.getValue(), writer, context); writer.endNode(); } } else if (value instanceof List) { List<?> list = (List<?>) value; for (Object obj : list) { marshal(obj, writer, context); } } else if (value instanceof Hyperlink) { <START> Hyperlink hl = (Hyperlink)value; <END> writer.startNode("link"); writer.startNode("rel"); writer.setValue(hl.getRel()); writer.endNode(); writer.startNode("uri"); writer.setValue(hl.getUri()); writer.endNode(); writer.endNode(); } else { writer.setValue(value.toString()); } }</code><technical_language>If XStream natively serializing a Hyperlink in right way, add a HyperlinkConverter, putting this here</technical_language>

Target:
public void marshal(Object value, HierarchicalStreamWriter writer, MarshallingContext context) { if (value instanceof Map) { Map<?, ?> map = (Map<?, ?>) value; for (Object obj : map.entrySet()) { Entry<?, ?> entry = (Entry<?, ?>) obj; writer.startNode(entry.getKey().toString()); marshal(entry.getValue(), writer, context); writer.endNode(); } } else if (value instanceof List) { List<?> list = (List<?>) value; for (Object obj : list) { if (obj instanceof SimpleObject) { Hyperlink self = getSelfLink((SimpleObject) obj); writer.startNode(self.getResourcePath()); } marshal(obj, writer, context); if (obj instanceof SimpleObject) { writer.endNode(); } } } else if (value instanceof Hyperlink) { writeItem(value, context, writer); } else if (value != null) { writer.setValue(value.toString()); } }
Source:
<code><START> public void time(Runnable timeable){ <END> Histogram.Timer timer = startTimer(); try { timeable.run(); } finally { timer.observeDuration(); } }</code><technical_language>requests for existing timers return duration for in logging. do same</technical_language>

Target:
public double time(Runnable timeable){ return noLabelsChild.time(timeable); }
Source:
<code>public String suggestCountryForUser(Integer userId) { Validate.isTrue(userId != null, "User id must be non null"); String slug = countryDao.findCountryOfLastCreatedSeriesByUser(userId); if (slug != null) { log.info( "Country has been suggested to user #{} from a recently created series", slug, userId ); return slug; } slug = countryDao.findLastCountryCreatedByUser(userId); if (slug != null) { LOG.info( <START> "Country has been suggested to user #{} from a last created country", <END> slug, userId ); return slug; } slug = countryDao.findPopularCountryInCollection(userId); if (slug != null) { log.info( "Country has been suggested to user #{} as popular in his collection", slug, userId ); } return slug; }</code><technical_language>"Country suggested user #{} created recently"</technical_language>

Target:
public String suggestCountryForUser(Integer userId) { Validate.isTrue(userId != null, "User id must be non null"); String slug = countryDao.findCountryOfLastCreatedSeriesByUser(userId); if (slug != null) { log.info( "Country has been suggested to user #{} from a recently created series", slug, userId ); return slug; } slug = countryDao.findLastCountryCreatedByUser(userId); if (slug != null) { log.info( "Country has been suggested to user #{} as it was created by him recently", slug, userId ); return slug; } slug = countryDao.findPopularCountryInCollection(userId); if (slug != null) { log.info( "Country has been suggested to user #{} as popular in his collection", slug, userId ); } return slug; }
Source:
<code>public void checkExecuteCommandWithNullVdsId() { parameters.setStorageServerConnection(NFSConnection); parameters.setVdsId(null); doNothing().when(storageServerConnectionDAO).remove(NFSConnection.getid()); <START> command.executeCommand(); <END> }</code><technical_language>I suggest add validation disconnect method is called, you</technical_language>

Target:
public void checkExecuteCommandWithNullVdsId() { parameters.setStorageServerConnection(NFSConnection); parameters.setVdsId(null); doNothing().when(storageServerConnectionDAO).remove(NFSConnection.getid()); command.executeCommand(); verify(command, never()).disconnectStorage(); }
Source:
<code>public void applyRightFloor(final PatchSetApproval a) { final IdentifiedUser user = userFactory.create(a.getAccountId()); short projectMinAllowed = 0, projectMaxAllowed = 0; for (final ProjectRight r : getAllProjectRights(a.getCategoryId())) { final AccountGroup.Id grp = r.getAccountGroupId(); if (user.getEffectiveGroups().contains(grp)) { projectMinAllowed = (short) Math.min(projectMinAllowed, r.getMinValue()); projectMaxAllowed = (short) Math.max(projectMaxAllowed, r.getMaxValue()); } } short refMinAllowed = 0, refMaxAllowed = 0; String destRef = change.getDest().get(); for (final RefRight refRight : getRefRights(a.getCategoryId())) { <START> if (RefControl.matches(destRef, refRight.getRefPattern())) { <END> final AccountGroup.Id grp = refRight.getAccountGroupId(); if (user.getEffectiveGroups().contains(grp)) { refMinAllowed = (short) Math.min(refMinAllowed, refRight.getMinValue()); refMaxAllowed = (short) Math.max(refMaxAllowed, refRight.getMaxValue()); } } } short minAllowed = (short) Math.max(refMinAllowed, projectMinAllowed); short maxAllowed = (short) Math.min(refMaxAllowed, projectMaxAllowed); if (a.getValue() < minAllowed) { a.setValue(minAllowed); dirty(a); } else if (a.getValue() > maxAllowed) { a.setValue(maxAllowed); dirty(a); } }</code><technical_language>I do this filtering of getRefRights method. part of index operation</technical_language>

Target:
public void applyRightFloor(final PatchSetApproval a) { final IdentifiedUser user = userFactory.create(a.getAccountId()); short refMinAllowed = 0, refMaxAllowed = 0; boolean foundRefRight = false; for (final RefRight refRight : getRefRights(a.getCategoryId())) { final AccountGroup.Id grp = refRight.getAccountGroupId(); foundRefRight = true; if (user.getEffectiveGroups().contains(grp)) { refMinAllowed = (short) Math.min(refMinAllowed, refRight.getMinValue()); refMaxAllowed = (short) Math.max(refMaxAllowed, refRight.getMaxValue()); } } short projectMinAllowed = 0, projectMaxAllowed = 0; for (final ProjectRight r : getAllProjectRights(a.getCategoryId())) { final AccountGroup.Id grp = r.getAccountGroupId(); if (user.getEffectiveGroups().contains(grp)) { projectMinAllowed = (short) Math.min(projectMinAllowed, r.getMinValue()); projectMaxAllowed = (short) Math.max(projectMaxAllowed, r.getMaxValue()); } } short minAllowed; short maxAllowed; if (foundRefRight) { minAllowed = refMinAllowed; maxAllowed = refMaxAllowed; } else { minAllowed = projectMinAllowed; maxAllowed = projectMaxAllowed; } if (a.getValue() < minAllowed) { a.setValue(minAllowed); dirty(a); } else if (a.getValue() > maxAllowed) { a.setValue(maxAllowed); dirty(a); } }
Source:
<code>public String getDirectoryPath(String path) throws ScriptException { <START> if (path.startsWith("file://")) { <END> return new JavaScriptFileManagerImpl().getFile(path).getAbsolutePath(); } String oldPath = path; path = FilenameUtils.normalizeNoEndSeparator(path); if (path == null) { String msg = "Invalid file path : " + oldPath; log.error(msg); throw new ScriptException(msg); } File file = new File(context.getRealPath("/"), path); return file.getPath(); }</code><technical_language>Include file:// constant</technical_language>

Target:
public String getDirectoryPath(String path) throws ScriptException { if (path.startsWith(FILE_PATH)) { return new JavaScriptFileManagerImpl().getFile(path).getAbsolutePath(); } String oldPath = path; path = FilenameUtils.normalizeNoEndSeparator(path); if (path == null) { String msg = "Invalid file path : " + oldPath; log.error(msg); throw new ScriptException(msg); } File file = new File(context.getRealPath("/"), path); return file.getPath(); }
Source:
<code>public void consume(String message) { logger.info("[UmpAmountTransfer] receive message: {}: {}.", this.queue(), message); try { <START> UmpAmountTransferMessage amountTransferMessage = gson.fromJson(message, new TypeToken<UmpAmountTransferMessage>(){}.getType()); <END> umpAmountTransferService.process(amountTransferMessage); logger.info("[UmpAmountTransfer] receive message: {}: done.", this.queue(), message); } catch (Exception e) { logger.error(MessageFormat.format("[MQ] amount transfer consumer fail, message:{0}", message), e); } }</code><technical_language>List</technical_language>

Target:
public void consume(String message) { logger.info("[UmpAmountTransfer] receive message: {}: {}.", this.queue(), message); try { List<UmpAmountTransferMessage> messages = gson.fromJson(message, new TypeToken<List<UmpAmountTransferMessage>>(){}.getType()); umpAmountTransferService.process(messages); logger.info("[UmpAmountTransfer] receive message: {}: done.", this.queue(), message); } catch (Exception e) { logger.error(MessageFormat.format("[MQ] amount transfer consumer fail, message:{0}", message), e); } }
Source:
<code>public void test01_03_redirectToExternalLink() { if (!(driver instanceof FirefoxDriver)) { logger.warn(testName.getMethodName() + " is not support excepting Firefox."); return; <START> } <END> ApServerName apServerName = webDriverOperations.getApServerName(); driver.findElement(By.id("listWithExternalPath")).click(); driver.findElement(By.id("btn1")).click(); inputFieldAccessor.overrideValue(By.id("username"), "user1", driver); inputFieldAccessor.overrideValue(By.id("password"), "user1", driver); assertThat(getRedirectValue(), is( "<LINK_1>")); screenCapture.save(driver); driver.findElement(By.id("btn1")).click(); assertTrue(driver.getCurrentUrl().contains( "/terasoluna-gfw-functionaltest-web")); String expectedMessage; if (apServerName == ApServerName.TOMCAT) { expectedMessage = "Redirect"; } else { expectedMessage = "Welcome!"; } assertThat(driver.findElement(By.xpath("/html/body/div/h2")).getText(), is(expectedMessage)); driver.get(getPackageRootUrl()); driver.findElement(By.id("listWithExternalPathWithContextPath")) .click(); driver.findElement(By.id("btn1")).click(); inputFieldAccessor.overrideValue(By.id("username"), "user1", driver); inputFieldAccessor.overrideValue(By.id("password"), "user1", driver); assertThat(getRedirectValue(), is( "<LINK_0>")); screenCapture.save(driver); driver.findElement(By.id("btn1")).click(); assertTrue(driver.getCurrentUrl().contains( "/terasoluna-gfw-functionaltest-web")); assertThat(driver.findElement(By.xpath("/html/body/div/h2")).getText(), is("Redirect (externalPathWithContextPath)")); }</code><technical_language>[ ] Please implement assertions for browser pattern. And,,, need this time, Assume#assumeTrue skip test depending condition</technical_language>

Target:
public void test01_03_redirectToExternalLink() { ApServerName apServerName = webDriverOperations.getApServerName(); driver.findElement(By.id("listWithExternalPath")).click(); driver.findElement(By.id("btn1")).click(); inputFieldAccessor.overrideValue(By.id("username"), "user1", driver); inputFieldAccessor.overrideValue(By.id("password"), "user1", driver); assertThat(getRedirectValue(), is( "<LINK_1>")); screenCapture.save(driver); driver.findElement(By.id("btn1")).click(); String expectedURL; if (apServerName == ApServerName.TOMCAT) { expectedURL = applicationContextUrl + "/login"; } else { expectedURL = applicationContextUrl + "/"; } webDriverWait.until(ExpectedConditions.urlToBe(expectedURL)); driver.get(getPackageRootUrl()); driver.findElement(By.id("listWithExternalPathWithContextPath")) .click(); driver.findElement(By.id("btn1")).click(); inputFieldAccessor.overrideValue(By.id("username"), "user1", driver); inputFieldAccessor.overrideValue(By.id("password"), "user1", driver); assertThat(getRedirectValue(), is( "<LINK_0>")); screenCapture.save(driver); driver.findElement(By.id("btn1")).click(); webDriverWait.until(ExpectedConditions.urlToBe(applicationContextUrl + "/redirect/externalPathWithContextPath")); }
Source:
<code>public void checkDiskErrorAsync() { volumeChecker.checkAllVolumesAsync( data, (healthyVolumes, failedVolumes) -> { LOG.info("checkDiskErrorAsync callback got failed volumes: {}", failedVolumes.size(), failedVolumes); <START> lastDiskErrorCheck = Time.monotonicNow(); <END> handleVolumeFailures(failedVolumes); }); }</code><technical_language>this timer.monotonicNow();</technical_language>

Target:
public void checkDiskErrorAsync() { volumeChecker.checkAllVolumesAsync( data, (healthyVolumes, failedVolumes) -> { if (failedVolumes.size() > 0) { LOG.warn("checkDiskErrorAsync callback got failed volumes: {}", failedVolumes.size(), failedVolumes); } else { LOG.debug("checkDiskErrorAsync: no volume failures detected"); } lastDiskErrorCheck = Time.monotonicNow(); handleVolumeFailures(failedVolumes); }); }
Source:
<code>public void parse(CommandSource source, CommandArgs args, CommandContext context) throws ArgumentParseException { Object state = args.getState(); <START> while (args.hasNext()) { <END> String arg = args.next(); boolean remove; if (arg.startsWith("-")) { Object start = args.getState(); if (arg.startsWith("--")) { String longFlag = arg.substring(2); remove = parseLongFlag(source, longFlag, args, context); } else { arg = arg.substring(1); remove = parseShortFlags(source, arg, args, context); } if (remove) { args.removeArgs(start, args.getState()); } } else if (this.anchorFlags) { break; } } args.setState(state); if (this.childElement != null) { this.childElement.parse(source, args, context); } }</code><technical_language>_zero_ need change this method, done is change variable names flipped a boolean</technical_language>

Target:
public void parse(CommandSource source, CommandArgs args, CommandContext context) throws ArgumentParseException { Object state = args.getState(); while (args.hasNext()) { String arg = args.next(); if (arg.startsWith("-")) { Object start = args.getState(); boolean remove; if (arg.startsWith("--")) { remove = parseLongFlag(source, arg.substring(2), args, context); } else { remove = parseShortFlags(source, arg.substring(1), args, context); } if (remove) { args.removeArgs(start, args.getState()); } } else if (this.anchorFlags) { break; } } args.setState(state); if (this.childElement != null) { this.childElement.parse(source, args, context); } }
Source:
<code>private boolean isNoRunningVmsWithLeasesExist() { List<VmStatic> runningVmsWithLeases = vmStaticDao.getAllRunningWithLeaseOnForStorageDomain(getStorageDomain().getId()); if (!runningVmsWithLeases.isEmpty()) { <START> String vmNames = runningVmsWithLeases.stream().map(v -> v.getName()).collect(Collectors.joining(", ")); <END> return failValidation(EngineMessage.ERROR_CANNOT_DEACTIVATE_DOMAIN_WITH_RUNNING_VMS_WITH_LEASES, String.format("$vmNames %s", vmNames)); } return true; }</code><technical_language>please replace v -> v.getName() VM::getName</technical_language>

Target:
private boolean isNoRunningVmsWithLeasesExist() { List<VmStatic> runningVmsWithLeases = vmStaticDao.getAllRunningWithLeaseOnStorageDomain(getStorageDomain().getId()); if (!runningVmsWithLeases.isEmpty()) { String vmNames = runningVmsWithLeases.stream().map(VmStatic::getName).collect(Collectors.joining(", ")); return failValidation(EngineMessage.ERROR_CANNOT_DEACTIVATE_DOMAIN_WITH_RUNNING_VMS_WITH_LEASES, String.format("$vmNames %s", vmNames)); } return true; }
Source:
<code>public String getLocalURI() { String extension = null; if (mURI != null) { extension = mURI.substring(mURI.length() - 4).toLowerCase(); } try { <START> if (extension.equals(".csv") || extension.equals(".xml")) { <END> return getClass().getClassLoader().getResource("fake-itemset" + extension).toURI().getPath(); } else { return null; } } catch (URISyntaxException e) { return null; } }</code><technical_language>Technically connector (jr://file vs. jr://file-csv) differentiates two. I this is ok, though</technical_language>

Target:
public String getLocalURI() { try { if (uri.toLowerCase().startsWith("jr://file/")) { return getClass().getClassLoader().getResource("fake-itemset.xml").toURI().getPath(); } else if (uri.toLowerCase().startsWith("jr://file-csv/")) { return getClass().getClassLoader().getResource("fake-itemset.csv").toURI().getPath(); } else { return null; } } catch (URISyntaxException e) { return null; } }
Source:
<code>protected boolean containsLinkedResources() { for (IPackageFragment <START> fPackageFragment : <END> fPackageFragments) { if (fPackageFragment.getResource().isLinked()) { return true; } } return false; }</code><technical_language>rename pack</technical_language>

Target:
protected boolean containsLinkedResources() { for (IPackageFragment pack : fPackageFragments) { if (pack.getResource().isLinked()) { return true; } } return false; }
Source:
<code>public Survey getSurvey(StudyIdentifier studyIdentifier, GuidCreatedOnVersionHolder keys, boolean includeElements, boolean throwException) { Survey survey = surveyDao.getSurvey(keys, includeElements); <START> if (throwException && survey == null || !isInStudy(studyIdentifier, survey)) { <END> throw new EntityNotFoundException(Survey.class); } return survey; }</code><technical_language>&& takes priority ||. (I &&.) If && takes priority, if isInStudy() check fails, this through. If || takes priority, this method return surveys of study. I case is desirable</technical_language>

Target:
public Survey getSurvey(StudyIdentifier studyIdentifier, GuidCreatedOnVersionHolder keys, boolean includeElements, boolean throwException) { return getSurvey(ImmutableSet.of(), studyIdentifier, keys, includeElements, throwException); }
Source:
<code>protected void allowAccess(long secretId, long groupId) { <START> OffsetDateTime now = OffsetDateTime.now(); <END> dslContext .insertInto(ACCESSGRANTS) .set(ACCESSGRANTS.SECRETID, Math.toIntExact(secretId)) .set(ACCESSGRANTS.GROUPID, Math.toIntExact(groupId)) .set(ACCESSGRANTS.CREATEDAT, now) .set(ACCESSGRANTS.UPDATEDAT, now) .execute(); }</code><technical_language>UTC system default</technical_language>

Target:
protected void allowAccess(long secretId, long groupId) { OffsetDateTime now = OffsetDateTime.now(ZoneOffset.UTC); dslContext .insertInto(ACCESSGRANTS) .set(ACCESSGRANTS.SECRETID, Math.toIntExact(secretId)) .set(ACCESSGRANTS.GROUPID, Math.toIntExact(groupId)) .set(ACCESSGRANTS.CREATEDAT, now) .set(ACCESSGRANTS.UPDATEDAT, now).execute(); }
Source:
<code>public static ParseObject create(String className) { <START> return getSubclassingController().instantiate(className); <END> }</code><technical_language>I feel name instantiate(className). newInstance(className) create(className)</technical_language>

Target:
public static ParseObject create(String className) { return getSubclassingController().newInstance(className); }
Source:
<code>private void writeConditions(XMLStreamWriter export, NodeList conditionElements, URI ditavalDirectory) { try { for (int i = 0; i < conditionElements.getLength(); i++) { <START> if (conditionElements.item(i).getNodeType() == Node.ELEMENT_NODE) { <END> export.writeStartElement(conditionElements.item(i).getNodeName()); final NamedNodeMap atts = conditionElements.item(i).getAttributes(); if (atts.getNamedItem(ATTRIBUTE_NAME_IMAGEREF) != null || atts.getNamedItem(ATTRIBUTE_NAME_IMG) != null ) { final String imagerefAtt = atts.getNamedItem(ATTRIBUTE_NAME_IMAGEREF) != null ? atts.getNamedItem(ATTRIBUTE_NAME_IMAGEREF).getNodeValue() : atts.getNamedItem(ATTRIBUTE_NAME_IMG).getNodeValue(); if (toURI(imagerefAtt).isAbsolute()) { export.writeAttribute(DITA_OT_NS_PREFIX, DITA_OT_NS, ATTRIBUTE_NAME_IMAGEREF_URI, imagerefAtt); } else { export.writeAttribute(DITA_OT_NS_PREFIX, DITA_OT_NS, ATTRIBUTE_NAME_IMAGEREF_URI, ditavalDirectory.resolve(imagerefAtt).toString()); } } for (int j = 0; j < atts.getLength(); j++) { export.writeAttribute(atts.item(j).getNodeName(), atts.item(j).getNodeValue()); } writeConditions(export, conditionElements.item(i).getChildNodes(), ditavalDirectory); export.writeEndElement(); } else if (conditionElements.item(i).getNodeType() == Node.TEXT_NODE) { export.writeCharacters(conditionElements.item(i).getNodeValue()); } } } catch (final XMLStreamException e) { logger.error("Failed to generate merged DITAVAL file: " + e.getMessage(), e); } }</code><technical_language>switch-statement for node type tests, rest of Java code too</technical_language>

Target:
private void writeConditions(XMLStreamWriter export, NodeList conditionElements, URI ditavalDirectory) { try { for (int i = 0; i < conditionElements.getLength(); i++) { switch (conditionElements.item(i).getNodeType()) { case Node.ELEMENT_NODE: export.writeStartElement(conditionElements.item(i).getNodeName()); final NamedNodeMap atts = conditionElements.item(i).getAttributes(); if (atts.getNamedItem(ATTRIBUTE_NAME_IMAGEREF) != null || atts.getNamedItem(ATTRIBUTE_NAME_IMG) != null ) { final String imagerefAtt = atts.getNamedItem(ATTRIBUTE_NAME_IMAGEREF) != null ? atts.getNamedItem(ATTRIBUTE_NAME_IMAGEREF).getNodeValue() : atts.getNamedItem(ATTRIBUTE_NAME_IMG).getNodeValue(); if (toURI(imagerefAtt).isAbsolute()) { export.writeAttribute(DITA_OT_NS_PREFIX, DITA_OT_NS, ATTRIBUTE_NAME_IMAGEREF_URI, imagerefAtt); } else { export.writeAttribute(DITA_OT_NS_PREFIX, DITA_OT_NS, ATTRIBUTE_NAME_IMAGEREF_URI, ditavalDirectory.resolve(imagerefAtt).toString()); } } for (int j = 0; j < atts.getLength(); j++) { export.writeAttribute(atts.item(j).getNodeName(), atts.item(j).getNodeValue()); } writeConditions(export, conditionElements.item(i).getChildNodes(), ditavalDirectory); export.writeEndElement(); break; case Node.TEXT_NODE: export.writeCharacters(conditionElements.item(i).getNodeValue()); break; } } } catch (final XMLStreamException e) { logger.error("Failed to generate merged DITAVAL file: " + e.getMessage(), e); } }
Source:
<code>public void testNullStringEquality() throws Exception { testQuery( "SELECT COUNT(*)\n" + "FROM druid.foo\n" + "WHERE NULLIF(dim2, 'a') = null", <START> ImmutableList.of(), <END> NullHandling.replaceWithDefault() ? ImmutableList.of(new Object[]{0L}) : ImmutableList.of(new Object[]{0L}) ); }</code><technical_language>Missing query plan verification</technical_language>

Target:
public void testNullStringEquality() throws Exception { testQuery( "SELECT COUNT(*)\n" + "FROM druid.foo\n" + "WHERE NULLIF(dim2, 'a') = null", ImmutableList.of(), ImmutableList.of(new Object[]{0L}) ); }
Source:
<code>public void truncateBufferedLogs(int maxRecords) { int recordSize = getRecordCount(); if (recordSize > maxRecords) { <START> String query = "SELECT * FROM " + TABLE_NAME + <END> " ORDER BY id DESC" + " LIMIT " + String.valueOf(recordSize - maxRecords); Cursor cursor = db.rawQuery(query, null); Records truncateRecords; try { truncateRecords = recordsFromCursor(cursor); } finally { cursor.close(); } if (truncateRecords != null) { delete(truncateRecords); } } }</code><technical_language>a subquery, DELETE $table_name id IN (SELECT id $table_name ORDER id DESC LIMIT $number_to_remove); ? faster this PR</technical_language>

Target:
public void truncateBufferedLogs(int maxRecords) { int recordSize = getRecordCount(); if (recordSize > maxRecords) { String query = "DELETE FROM " + TABLE_NAME + " WHERE id IN ( SELECT id FROM " + TABLE_NAME + " ORDER BY id ASC LIMIT " + String.valueOf(recordSize - maxRecords) + ")"; db.execSQL(query); } }
Source:
<code>public void setDefaultBranchIfNotSet(Entry entry, String repositoryId) { Version defaultVersion = entry.getActualDefaultVersion(); Set<Long> workflowVersionIds = (Set<Long>)entry.getWorkflowVersions().stream().map(version -> ((Version)version).getId()).collect(Collectors.toSet()); if (defaultVersion == null || !workflowVersionIds.contains(defaultVersion.getId())) { entry.setActualDefaultVersion(null); String branch = getMainBranch(entry, repositoryId); if (branch == null) { String message = String.format("%s : Error getting the main branch.", repositoryId); LOG.info(message); } else { Set<Version> workflowVersions = entry.getWorkflowVersions(); Optional<Version> firstWorkflowVersion = workflowVersions.stream() .filter(workflowVersion -> { String reference = workflowVersion.getReference(); return branch.equals(reference); }).findFirst(); firstWorkflowVersion.ifPresentOrElse(version -> entry.checkAndSetDefaultVersion(version.getName()), () -> { <START> Version newestVersion = Collections.max(workflowVersions, Comparator.comparingInt(s -> s.getDbUpdateDate().getNanos())); <END> entry.setActualDefaultVersion(newestVersion); }); } } }</code><technical_language>this is right date sort on. This is generated DB @UpdateTimestamp I this means change frozen is set</technical_language>

Target:
public void setDefaultBranchIfNotSet(Entry entry, String repositoryId) { Version defaultVersion = entry.getActualDefaultVersion(); Set<Long> workflowVersionIds = (Set<Long>)entry.getWorkflowVersions().stream().map(version -> ((Version)version).getId()).collect(Collectors.toSet()); if (defaultVersion == null || !workflowVersionIds.contains(defaultVersion.getId())) { entry.setActualDefaultVersion(null); String branch = getMainBranch(entry, repositoryId); if (branch == null) { String message = String.format("%s : Error getting the main branch.", repositoryId); LOG.info(message); } else { Set<Version> workflowVersions = entry.getWorkflowVersions(); Optional<Version> firstWorkflowVersion = workflowVersions.stream() .filter(workflowVersion -> { String reference = workflowVersion.getReference(); return branch.equals(reference); }).findFirst(); firstWorkflowVersion.ifPresentOrElse(version -> entry.checkAndSetDefaultVersion(version.getName()), () -> { Version newestVersion = Collections.max(workflowVersions, Comparator.comparingLong(s -> s.getDate().getTime())); entry.setActualDefaultVersion(newestVersion); }); } } }
Source:
<code><START> public LoginOptions getLoginOptions(String jwt, String url) { <END> return getLoginOptionsInternal(jwt, url); }</code><technical_language>Remove this</technical_language>

Target:
public LoginOptions getLoginOptions(String jwt, String url) { if (loginOptions == null) { final BootConfig config = BootConfig.getBootConfig(context); if (TextUtils.isEmpty(jwt)) { loginOptions = new LoginOptions(url, getPasscodeHash(), config.getOauthRedirectURI(), config.getRemoteAccessConsumerKey(), config.getOauthScopes(), null); } else { loginOptions = new LoginOptions(url, getPasscodeHash(), config.getOauthRedirectURI(), config.getRemoteAccessConsumerKey(), config.getOauthScopes(), null, jwt); } } return loginOptions; }
Source:
<code>public HttpRequestBase formatRequest() { URIBuilder uriBuilder = getRepository().getURIBuilder(fAuthIsRequired); URI uri = null; try { String path = new StringBuilder(uriBuilder.getPath()).append("/changes/") .append(getId()) .append("/revisions/").append(getRevision()) .append("/review") .toString(); uriBuilder.setPath(path); uri = new URI(URIUtil.toUnencodedString(uriBuilder.build())); } catch (URISyntaxException e) { EGerritCorePlugin.logError("URI syntax exception", e); } HttpPost httpPost = new HttpPost(uri); Gson gson = new Gson(); String json = gson.toJson(fReviewInput); StringEntity input = null; try { input = new StringEntity(json); } catch (UnsupportedEncodingException e) { EGerritCorePlugin.logError("URI error encoding ReviewInput", e); } input.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, <START> "application/json")); <END> httpPost.setEntity(input); return httpPost; }</code><technical_language>is done, I usage of a global define for string !!</technical_language>

Target:
public HttpRequestBase formatRequest() { URIBuilder uriBuilder = getRepository().getURIBuilder(fAuthIsRequired); URI uri = null; try { String path = new StringBuilder(uriBuilder.getPath()).append("/changes/") .append(getId()) .append("/revisions/").append(getRevision()) .append("/review") .toString(); uriBuilder.setPath(path); uri = new URI(URIUtil.toUnencodedString(uriBuilder.build())); } catch (URISyntaxException e) { EGerritCorePlugin.logError("URI syntax exception", e); } HttpPost httpPost = new HttpPost(uri); Gson gson = new Gson(); String json = gson.toJson(fReviewInput); StringEntity input = null; try { input = new StringEntity(json); } catch (UnsupportedEncodingException e) { EGerritCorePlugin.logError("URI error encoding ReviewInput", e); } input.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, GerritCommand.JSON_HEADER)); httpPost.setEntity(input); return httpPost; }
Source:
<code>private static void updateChildrenFonts(CTabFolder folder, Font font) { for (CTabItem item : folder.getItems()) { Font itemFont = item.getFont(); <START> if (itemFont != null && !itemFont.equals(font)) { <END> item.setFont(font); } } }</code><technical_language>want set font itemFont==null well</technical_language>

Target:
private static void updateChildrenFonts(CTabFolder folder, Font font) { for (CTabItem item : folder.getItems()) { item.setFont(font); } }
Source:
<code>public boolean computeEnabledState() throws Exception { if (isEditableContext()) { <START> ISPNode n = getContextNode(ISPNode.class); <END> return !(n.getDataObject() instanceof TargetObsComp); } return false; }</code><technical_language>previous code a check for null n. need anymore</technical_language>

Target:
public boolean computeEnabledState() throws Exception { if (isEditableContext()) { ISPNode n = getContextNode(ISPNode.class); return (n != null) && !(n.getDataObject() instanceof TargetObsComp); } return false; }
Source:
<code>public void batch_mutate(String kvsMethodName, Map<ByteBuffer, Map<String, List<Mutation>>> mutation_map, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, TException { long startTime = System.currentTimeMillis(); KvsProfilingLogger.maybeLog( (KvsProfilingLogger.CallableCheckedException<Void, TException>) () -> { client.batch_mutate(kvsMethodName, mutation_map, consistency_level); return null; }, (logger, timer) -> { logger.log("CassandraClient.batch_mutate("); ThriftObjectSizeUtils.getSizeOfMutationPerTable(mutation_map).forEach((tableName, size) -> { logger.log("{} -> {}", LoggingArgs.safeInternalTableNameOrPlaceholder(tableName), LoggingArgs.sizeInBytes(size)); }); logger.log(") with consistency at time {}, on kvs.{} took ms", <START> LoggingArgs.startTimeMillis(startTime), <END> SafeArg.of("consistency", consistency_level.toString()), SafeArg.of("kvsMethodName", kvsMethodName), LoggingArgs.durationMillis(timer)); }); }</code><technical_language>this needs switched line get arguments line up</technical_language>

Target:
public void batch_mutate(String kvsMethodName, Map<ByteBuffer, Map<String, List<Mutation>>> mutation_map, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, TException { long startTime = System.currentTimeMillis(); KvsProfilingLogger.maybeLog( (KvsProfilingLogger.CallableCheckedException<Void, TException>) () -> { client.batch_mutate(kvsMethodName, mutation_map, consistency_level); return null; }, (logger, timer) -> { logger.log("CassandraClient.batch_mutate("); ThriftObjectSizeUtils.getSizeOfMutationPerTable(mutation_map).forEach((tableName, size) -> { logger.log("{} -> {}", LoggingArgs.safeInternalTableNameOrPlaceholder(tableName), LoggingArgs.sizeInBytes(size)); }); logger.log(") with consistency at time {}, on kvs.{} took ms", SafeArg.of("consistency", consistency_level.toString()), LoggingArgs.startTimeMillis(startTime), SafeArg.of("kvsMethodName", kvsMethodName), LoggingArgs.durationMillis(timer)); }); }
Source:
<code>public TissuePieceType getByName(String name) { <START> return (TissuePieceType) currentSession().createCriteria(TissuePieceType.class) .add(Restrictions.eq("name", name)) .uniqueResult(); <END> }</code><technical_language>shorten return getBy("name", name); (superclass method)</technical_language>

Target:
public TissuePieceType getByName(String name) { return getBy("name", name); }
Source:
<code>public static OffsetDateTime now(ZoneOffset zoneOffset) { <START> final LocalDate localDate = LocalDates.now(); <END> final LocalTime localTime = LocalTimes.now(); final OffsetDateTime result = OffsetDateTime.newBuilder() .setDate(localDate) .setTime(localTime) .setOffset(zoneOffset) .build(); return result; }</code><technical_language>This is wrong. need date/time _already_ in timezone</technical_language>

Target:
public static OffsetDateTime now(ZoneOffset zoneOffset) { checkNotNull(zoneOffset); final Calendar now = nowAt(zoneOffset); final LocalTime localTime = toLocalTime(now); final LocalDate localDate = toLocalDate(now); final OffsetDateTime result = OffsetDateTime.newBuilder() .setDate(localDate) .setTime(localTime) .setOffset(zoneOffset) .build(); return result; }
Source:
<code>public void testEmptyValuesAreIgnored() { <START> Point point = Point.measurement("dontcare").tag("key","").addField("dontcare", true).build(); <END> assertThat(point.getTags().size()).isEqualTo(0); }</code><technical_language>Please add a tag empty key well</technical_language>

Target:
public void testEmptyValuesAreIgnored() { Point point = Point.measurement("dontcare").tag("key","").addField("dontcare", true).build(); assertThat(point.getTags().size()).isEqualTo(0); point = Point.measurement("dontcare").tag("","value").addField("dontcare", true).build(); assertThat(point.getTags().size()).isEqualTo(0); point = Point.measurement("dontcare").tag(ImmutableMap.of("key","")).addField("dontcare", true).build(); assertThat(point.getTags().size()).isEqualTo(0); point = Point.measurement("dontcare").tag(ImmutableMap.of("","value")).addField("dontcare", true).build(); assertThat(point.getTags().size()).isEqualTo(0); }
Source:
<code>public List<User> call(ApiCaller ac, Deserializer parms) throws PerunException { if(parms.contains("role")) { String roleName = parms.readString("role"); Role role; try { role = Role.valueOf(roleName); } catch (IllegalArgumentException ex) { throw new RpcException(RpcException.Type.WRONG_PARAMETER, "wrong parameter in role, not exists role with this name " + roleName); } return ac.getVosManager().getAdmins(ac.getSession(), ac.getVoById(parms.readInt("vo")), role, parms.readBoolean("onlyDirectAdmins")); } else { return ac.getVosManager().getAdmins(ac.getSession(), ac.getVoById(parms.readInt("vo")), <START> null,parms.readBoolean("onlyDirectAdmins")); <END> } }</code><technical_language>This change is correct. Role null for this method. Please return state change there. deprecated functional</technical_language>

Target:
public List<Vo> call(ApiCaller ac, Deserializer parms) throws PerunException { return ac.getVosManager().getVos(ac.getSession()); }
Source:
<code>public void addProcessInstance(ProcessInstance processInstance, CorrelationKey correlationKey) { ProcessInstanceInfo processInstanceInfo = new ProcessInstanceInfo( processInstance, this.kruntime.getEnvironment() ); ProcessPersistenceContext context = ((ProcessPersistenceContextManager) this.kruntime.getEnvironment() .get( EnvironmentName.PERSISTENCE_CONTEXT_MANAGER )) .getProcessPersistenceContext(); processInstanceInfo = (ProcessInstanceInfo) context.persist( processInstanceInfo ); ((org.jbpm.process.instance.ProcessInstance) processInstance).setId( processInstanceInfo.getId() ); processInstanceInfo.updateLastReadDate(); if (correlationKey == null) { <START> correlationKey = (CorrelationKeyInfo) correlationKeyFactory.newCorrelationKey(processInstanceInfo.getId().toString()); <END> ((org.jbpm.process.instance.ProcessInstance) processInstance).getMetaData().put("CorrelationKey", correlationKey); } CorrelationKeyInfo correlationKeyInfo = (CorrelationKeyInfo) correlationKey; correlationKeyInfo.setProcessInstanceId(processInstanceInfo.getId()); context.persist(correlationKeyInfo); internalAddProcessInstance(processInstance); EventManagerProvider.getInstance().get().create(getInstanceViewFor(processInstance)); }</code><technical_language>Cast CorrelationKeyInfo is needed</technical_language>

Target:
public void addProcessInstance(ProcessInstance processInstance, CorrelationKey correlationKey) { ProcessInstanceInfo processInstanceInfo = new ProcessInstanceInfo( processInstance, this.kruntime.getEnvironment() ); ProcessPersistenceContext context = ((ProcessPersistenceContextManager) this.kruntime.getEnvironment() .get( EnvironmentName.PERSISTENCE_CONTEXT_MANAGER )) .getProcessPersistenceContext(); processInstanceInfo = (ProcessInstanceInfo) context.persist( processInstanceInfo ); ((org.jbpm.process.instance.ProcessInstance) processInstance).setId( processInstanceInfo.getId() ); processInstanceInfo.updateLastReadDate(); if (correlationKey == null) { correlationKey = new CorrelationKeyInfo(); ((CorrelationKeyInfo) correlationKey).addProperty(new CorrelationPropertyInfo(null, processInstanceInfo.getId().toString())); ((CorrelationKeyInfo) correlationKey).setName(correlationKey.toExternalForm()); ((org.jbpm.process.instance.ProcessInstance) processInstance).getMetaData().put("CorrelationKey", correlationKey); } CorrelationKeyInfo correlationKeyInfo = (CorrelationKeyInfo) correlationKey; correlationKeyInfo.setProcessInstanceId(processInstanceInfo.getId()); context.persist(correlationKeyInfo); internalAddProcessInstance(processInstance); EventManagerProvider.getInstance().get().create(getInstanceViewFor(processInstance)); }
Source:
<code>protected void indicating(CDODataInput in) throws IOException { int viewID = in.readInt(); InternalView view = getSession().getView(viewID); if (view == null) { throw new IllegalStateException("View not found"); } InternalLockManager lockManager = getRepository().getLockingManager(); existingLockStates = new ArrayList<CDOLockState>(); int n = in.readInt(); for (int i = 0; i < n; i++) { Object key = indicatingCDOID(in, view.getBranch()); LockState<Object, IView> lockState = lockManager.getLockState(key); if (lockState != null) { existingLockStates.add(CDOLockUtil.createLockState(lockState)); } <START> } <END> if (n == 0) { Collection<LockState<Object, IView>> lockStates = lockManager.getLockStates(); for (LockState<Object, IView> lockState : lockStates) { existingLockStates.add(CDOLockUtil.createLockState(lockState)); } } }</code><technical_language>need more newline ;-)</technical_language>

Target:
protected void indicating(CDODataInput in) throws IOException { int viewID = in.readInt(); InternalView view = getSession().getView(viewID); if (view == null) { throw new IllegalStateException("View not found"); } InternalLockManager lockManager = getRepository().getLockingManager(); existingLockStates = new ArrayList<CDOLockState>(); int n = in.readInt(); if (n == 0) { Collection<LockState<Object, IView>> lockStates = lockManager.getLockStates(); for (LockState<Object, IView> lockState : lockStates) { existingLockStates.add(CDOLockUtil.createLockState(lockState)); } } else { for (int i = 0; i < n; i++) { Object key = indicatingCDOID(in, view.getBranch()); LockState<Object, IView> lockState = lockManager.getLockState(key); if (lockState != null) { existingLockStates.add(CDOLockUtil.createLockState(lockState)); } } } }
Source:
<code>public boolean isActive() { <START> return !SCESIM_DISABLED && (!DROOLS_DISABLED || !DMN_DISABLED); <END> }</code><technical_language>@danielezonca a negation sc result of sc negations: is a simplify</technical_language>

Target:
public boolean isActive() { boolean scesimEnabled = !SCESIM_DISABLED; boolean droolsEnabled = !DROOLS_DISABLED; boolean dmnEnabled = !DMN_DISABLED; boolean droolsOrDmnEnabled = droolsEnabled || dmnEnabled; return scesimEnabled && droolsOrDmnEnabled; }
Source:
<code>public void shouldSaveNewRuleInPage() throws DotSecurityException, DotDataException { final Role role = new RoleDataGen().nextPersisted(); final User user = new UserDataGen().roles(role).nextPersisted(); final Host host = new SiteDataGen().nextPersisted(); final Template template = new TemplateDataGen().nextPersisted(); final HTMLPageAsset htmlPageAsset = new HTMLPageDataGen(host, template).nextPersisted(); final Rule rule = new RuleDataGen().page(htmlPageAsset).next(); this.addPermission(role, host, true); rulesAPI.saveRule(rule, user, false); final List<Rule> rules = rulesAPI.getAllRulesByParent(htmlPageAsset, systemUser, true); <START> assertEquals(1, rules.size()); <END> }</code><technical_language>I compare parent, size</technical_language>

Target:
public void shouldSaveNewRuleInPage() throws DotSecurityException, DotDataException { final Role role = new RoleDataGen().nextPersisted(); final User user = new UserDataGen().roles(role).nextPersisted(); final Host host = new SiteDataGen().nextPersisted(); final Template template = new TemplateDataGen().nextPersisted(); final HTMLPageAsset htmlPageAsset = new HTMLPageDataGen(host, template).nextPersisted(); final Rule rule = new RuleDataGen().page(htmlPageAsset).next(); this.addPermission(role, host, true); rulesAPI.saveRule(rule, user, false); final List<Rule> rules = rulesAPI.getAllRulesByParent(htmlPageAsset, systemUser, true); assertEquals(1, rules.size()); final List<String> rulesId = rules.stream().map(pageRule -> pageRule.getId()).collect(Collectors.toList()); assertTrue(rulesId.contains(rule.getId())); }
Source:
<code>public Collection<T> findByIds(Collection<Long> ids) { if (ids == null) { <START> return null; <END> } return repository.retrieveAll(ids); }</code><technical_language>return empty list throw illegalArgumentException, reason for this returning collection other methods return lists</technical_language>

Target:
public List<T> findByIds(Collection<Long> ids) { if (ids == null) { return new ArrayList<>(); } return repository.retrieveAll(ids); }
Source:
<code>public Statement apply(final Statement statement, final Description description) { return new Statement() { @Override public void evaluate() throws Throwable { Level level = getLevel(description.getAnnotation(LogLevel.class)); <START> Level prevLevel; <END> if (level != null) { prevLevel = resetLogsLevel(level); } else { prevLevel = null; } try { statement.evaluate(); } finally { if (prevLevel != null) { resetLogsLevel(prevLevel); } } } }; }</code><technical_language>this variable assignment a 1-liner, I insist</technical_language>

Target:
public Statement apply(final Statement statement, final Description description) { return new Statement() { @Override public void evaluate() throws Throwable { Test test = description.getAnnotation(Test.class); boolean exceptionExpected = test != null && test.expected() != Test.None.class; Level level = getLevel(description.getAnnotation(LogLevel.class)); if (level == null && exceptionExpected) { level = Level.OFF; } Level prevLevel; if (level != null) { prevLevel = resetLogsLevel(level); } else { prevLevel = null; } try { statement.evaluate(); } finally { if (prevLevel != null) { resetLogsLevel(prevLevel); } } } }; }
Source:
<code>public void setShowIgnoreFilesButtons(boolean showButtons) { this.showButtonsState = showButtons; <START> if (showButtons == false) { <END> setBreakOnJavaScript(true); setBreakOnCSSAndFonts(true); setBreakOnMultimedia(true); setOnlyBreakOnScope(false); } }</code><technical_language>!showButtons</technical_language>

Target:
public void setShowIgnoreFilesButtons(boolean showButtons) { if (!showButtons) { setBreakOnJavaScript(true); setBreakOnCssAndFonts(true); setBreakOnMultimedia(true); setOnlyBreakOnScope(false); } }
Source:
<code><START> public Pilot getPilot(){ <END> if (isTranscendent) { throw new SolDescriptiveException(transcendentNotExistingPropertyExceptionMessage); } return hero.getPilot(); }</code><technical_language>(){ -> () {</technical_language>

Target:
public Pilot getPilot() { return isTranscendent ? transcendentHeroShip.getPilot() : hero.getPilot(); }
Source:
<code>public <START> List<String> getRepositoryDirectories() <END> { return new ArrayList<>(repositoryDirectories); }</code><technical_language>File</technical_language>

Target:
public List<File> getRepositoryDirectories() { return new ArrayList<>(repositoryDirectories); }
Source:
<code>private boolean isDialectExists(Connection dbConnection, String uri) throws UserStoreException { int dialectId = getDialectId(dbConnection, uri); if (dialectId != -1) { return true; } else { return false; <START> } <END> }</code><technical_language>simplified "return dialectId != -1;"</technical_language>

Target:
private boolean isDialectExists(Connection dbConnection, String uri) throws UserStoreException { int dialectId = getDialectId(dbConnection, uri); return dialectId != -1; }
Source:
<code>public void testDefinitionEquals() { DefinitionImpl<String> a = new DefinitionImpl<>("a"); DefinitionImpl<String> b = new DefinitionImpl<>("a"); assertEquals(a, b); b.setDefinition("b"); assertNotEquals(a, b); b.setDefinition("a"); assertEquals(a, b); <START> } <END></code><technical_language>I guess null check is nice here. java assertNotEquals(a, null); b.setDefinition(null); assertNotEquals(a, b); assertNotEquals(b, a);</technical_language>

Target:
public void testDefinitionEquals() { DefinitionImpl<String> a = new DefinitionImpl<>("a"); DefinitionImpl<String> b = new DefinitionImpl<>("a"); assertEquals(a, b); b.setDefinition(null); assertNotEquals(a, b); b.setDefinition("b"); assertNotEquals(a, b); b.setDefinition("a"); assertEquals(a, b); }
Source:
<code>private void testGetDocContent_authenticatedUsers(String authenticatedUsers) throws Exception { String id = "{AAAAAAAA-0000-0000-0000-000000000000}"; DocId docId = newDocId(new Id(id)); MockObjectStore os = getObjectStore(); mockDocument(os, id, DOCUMENT_TIMESTAMP, RELEASED, 42d, "text/plain", TestObjectFactory.newPermissionList(ImmutableList.of( TestObjectFactory.newPermission(Permissions.AUTHENTICATED_USERS, SecurityPrincipalType.GROUP, AccessType.ALLOW, (AccessRight.READ_AS_INT | AccessRight.VIEW_CONTENT_AS_INT), 0, PermissionSource.SOURCE_DIRECT)))); DocumentTraverser traverser = new DocumentTraverser(options); Request request = new MockRequest(docId); RecordingResponse response = new RecordingResponse(); traverser.getDocContent(new Id(id), request, response); Acl acl = response.getAcl(); assertEquals(acl.getPermitGroups().toString(), <START> ImmutableSet.<GroupPrincipal>of(new GroupPrincipal(authenticatedUsers, <END> options.getGlobalNamespace())), acl.getPermitGroups()); assertTrue(acl.getPermitUsers().toString(), acl.getPermitUsers().isEmpty()); assertTrue(acl.getDenyGroups().toString(), acl.getDenyGroups().isEmpty()); assertTrue(acl.getDenyUsers().toString(), acl.getDenyUsers().isEmpty()); }</code><technical_language>need <GroupPrincipal> here; bad line break</technical_language>

Target:
private void testGetDocContent_authenticatedUsers(String authenticatedUsers) throws Exception { String id = "{AAAAAAAA-0000-0000-0000-000000000000}"; DocId docId = newDocId(new Id(id)); MockObjectStore os = getObjectStore(); mockDocument(os, id, DOCUMENT_TIMESTAMP, RELEASED, 42d, "text/plain", TestObjectFactory.newPermissionList(ImmutableList.of( TestObjectFactory.newPermission(Permissions.AUTHENTICATED_USERS, SecurityPrincipalType.GROUP, AccessType.ALLOW, Permissions.VIEW_ACCESS_RIGHTS, 0, PermissionSource.SOURCE_DIRECT)))); DocumentTraverser traverser = new DocumentTraverser(options); Request request = new MockRequest(docId); RecordingResponse response = new RecordingResponse(); traverser.getDocContent(new Id(id), request, response); Acl acl = response.getAcl(); assertEquals(ImmutableSet.of( new GroupPrincipal(authenticatedUsers, options.getGlobalNamespace())), acl.getPermitGroups()); assertTrue(acl.getPermitUsers().toString(), acl.getPermitUsers().isEmpty()); assertTrue(acl.getDenyGroups().toString(), acl.getDenyGroups().isEmpty()); assertTrue(acl.getDenyUsers().toString(), acl.getDenyUsers().isEmpty()); }