Source:
<code>public void testAllChecksPageInSyncWithChecksSummaries() throws Exception { final Pattern endOfSentence = Pattern.compile("(.*?\\.)\\s", Pattern.DOTALL); final Map<String, String> summaries = readSummaries(); for (Path path : XdocUtil.getXdocsConfigFilePaths(XdocUtil.getXdocsFilePaths())) { final String fileName = path.getFileName().toString(); if ("config_reporting.xml".equals(fileName) || "config_filefilters.xml".equals(fileName) || "config_filters.xml".equals(fileName)) { continue; } final String input = new String(Files.readAllBytes(path), UTF_8); final Document document = XmlUtil.getRawXml(fileName, input, input); final NodeList sources = document.getElementsByTagName("subsection"); for (int position = 0; position < sources.getLength(); position++) { final Node section = sources.item(position); final String sectionName = XmlUtil.getNodeName(section); if (!"Description".equals(sectionName)) { continue; } final String checkName = XmlUtil.getNodeName(section.getParentNode()); final Matcher matcher = endOfSentence.matcher(section.getTextContent()); assertWithMessage( "XDocs description should start with a sentence that ends with a period") .that(matcher.find()); final String firstSentence = XmlUtil.sanitizeXml(matcher.group(1)); <START> assertWithMessage("Summary for check " + checkName <END> + " in " + AVAILABLE_CHECKS_PATH + " should match the first sentence of the \"Description\" section for " + fileName + "#" + checkName) .that(summaries.get(checkName)) .isEqualTo(firstSentence); } } }</code><technical_language>Please sync assertion message. checkName is in message twice</technical_language>

Target:
public void testAllChecksPageInSyncWithChecksSummaries() throws Exception { final Pattern endOfSentence = Pattern.compile("(.*?\\.)\\s", Pattern.DOTALL); final Map<String, String> summaries = readSummaries(); for (Path path : XdocUtil.getXdocsConfigFilePaths(XdocUtil.getXdocsFilePaths())) { final String fileName = path.getFileName().toString(); if ("config_reporting.xml".equals(fileName) || "config_filefilters.xml".equals(fileName) || "config_filters.xml".equals(fileName)) { continue; } final String input = new String(Files.readAllBytes(path), UTF_8); final Document document = XmlUtil.getRawXml(fileName, input, input); final NodeList sources = document.getElementsByTagName("subsection"); for (int position = 0; position < sources.getLength(); position++) { final Node section = sources.item(position); final String sectionName = XmlUtil.getNameAttributeOfNode(section); if (!"Description".equals(sectionName)) { continue; } final String checkName = XmlUtil.getNameAttributeOfNode(section.getParentNode()); final Matcher matcher = endOfSentence.matcher(section.getTextContent()); assertWithMessage( "The first sentence of the \"Description\" subsection for the check " + checkName + " in the file \"" + fileName + "\" should end with a period") .that(matcher.find()); final String firstSentence = XmlUtil.sanitizeXml(matcher.group(1)); assertWithMessage("The summary for check " + checkName + " in the file \"" + AVAILABLE_CHECKS_PATH + "\"" + " should match the first sentence of the \"Description\" subsection" + " for this check in the file \"" + fileName + "\"") .that(summaries.get(checkName)) .isEqualTo(firstSentence); } } }