while (l > rule.endPositionCorrection) {
correctedEndPos -= tokenPositions[matchingTokens + l - 1];
l--;
}
}
AnalyzedTokenReadings firstMatchTokenObj = tokens[firstMatchToken + correctedStPos];
boolean startsWithUppercase = StringTools
.startsWithUppercase(firstMatchTokenObj.getToken())
&& !matchConvertsCase(rule.getSuggestionMatches())
&& !matchConvertsCase(rule.getSuggestionMatchesOutMsg());
if (firstMatchTokenObj.isSentStart()
&& tokens.length > firstMatchToken + correctedStPos + 1) {
// make uppercasing work also at sentence start:
firstMatchTokenObj = tokens[firstMatchToken + correctedStPos + 1];
startsWithUppercase = StringTools.startsWithUppercase(firstMatchTokenObj.getToken());
}
int fromPos = tokens[firstMatchToken + correctedStPos].getStartPos();
// FIXME: this is fishy, assumes that comma should always come before whitespace:
if (errMessage.contains(SUGGESTION_START_TAG + ",")
&& firstMatchToken + correctedStPos >= 1) {