Code review comment: nit: inconsistent `final`. I don't see you re-setting this variable.

Code before review:
private void checkNamingPattern(DetailAST blockCommentToken) {
if (!BlockCommentPosition.isOnMethod(blockCommentToken)) {
return;
}
DetailNode javadocNode = null;
try {
javadocNode = DetailNodeTreeStringPrinter.parseJavadocAsDetailNode(blockCommentToken);
} catch (IllegalArgumentException ex) {
}
if (javadocNode == null) {
return;
}
for (DetailNode node : javadocNode.getChildren()) {
if (node.getType() != JavadocTokenTypes.JAVADOC_INLINE_TAG) {
continue;
}
DetailNode customNameNode = JavadocUtil.findFirstToken(node, JavadocTokenTypes.CUSTOM_NAME);
if (customNameNode == null || !CODE_SNIPPET_ANNOTATION.equals(customNameNode.getText())) {
return;
}
DetailNode descriptionNode = JavadocUtil.findFirstToken(node, JavadocTokenTypes.DESCRIPTION);
if (descriptionNode == null) {
log(node.getLineNumber(), MISSING_CODESNIPPET_TAG_MESSAGE);
return;
}
String customDescription = JavadocUtil.findFirstToken(descriptionNode, JavadocTokenTypes.TEXT).getText();
DetailAST methodDefToken = methodDefStack.peek();
final String methodName = methodDefToken.findFirstToken(TokenTypes.IDENT).getText();
final String className = classNameStack.isEmpty() ? "" : classNameStack.peek();
final String parameters = constructParametersString(methodDefToken);
String fullPath = packageName + "." + className + "." + methodName;
if (parameters != null) {
fullPath = fullPath + "
}
if (customDescription == null || customDescription.isEmpty() ||
!isNamingMatched(customDescription.toLowerCase(), fullPath.toLowerCase(), parameters)) {
log(node.getLineNumber(), String.format("Naming pattern mismatch. The @codeSnippet description "
+ "''%s'' does not match ''%s''. Case Insensitive.", customDescription, fullPath));
}
}
}

Line under review: DetailAST methodDefToken = methodDefStack.peek();

Code after addressing the review:
private void checkNamingPattern(DetailAST blockCommentToken) {
if (!BlockCommentPosition.isOnMethod(blockCommentToken)) {
return;
}
DetailNode javadocNode = null;
try {
javadocNode = DetailNodeTreeStringPrinter.parseJavadocAsDetailNode(blockCommentToken);
} catch (IllegalArgumentException ex) {
}
if (javadocNode == null) {
return;
}
for (DetailNode node : javadocNode.getChildren()) {
if (node.getType() != JavadocTokenTypes.JAVADOC_INLINE_TAG) {
continue;
}
DetailNode customNameNode = JavadocUtil.findFirstToken(node, JavadocTokenTypes.CUSTOM_NAME);
if (customNameNode == null || !CODE_SNIPPET_ANNOTATION.equals(customNameNode.getText())) {
return;
}
DetailNode descriptionNode = JavadocUtil.findFirstToken(node, JavadocTokenTypes.DESCRIPTION);
if (descriptionNode == null) {
log(node.getLineNumber(), MISSING_CODESNIPPET_TAG_MESSAGE);
return;
}
String customDescription = JavadocUtil.findFirstToken(descriptionNode, JavadocTokenTypes.TEXT).getText();
final String methodName = methodDefToken.findFirstToken(TokenTypes.IDENT).getText();
final String className = classNameStack.isEmpty() ? "" : classNameStack.peek();
final String parameters = constructParametersString(methodDefToken);
String fullPath = packageName + "." + className + "." + methodName;
final String fullPathWithoutParameters = fullPath;
if (parameters != null) {
fullPath = fullPath + "
}
if (customDescription == null || customDescription.isEmpty()
|| !isNamingMatched(customDescription.toLowerCase(Locale.ROOT),
fullPathWithoutParameters.toLowerCase(Locale.ROOT), parameters)) {
log(node.getLineNumber(), String.format("Naming pattern mismatch. The @codesnippet description "
+ "''%s'' does not match ''%s''. Case Insensitive.", customDescription, fullPath));
}
}
}