Source:
<code>public PlaceholderType checkPlaceholders(String statement) { Matcher quoteMatcher = QUOTE_DETECTION_PATTERN.matcher(statement); Matcher positionMatcher = POSITIONAL_PLACEHOLDER_PATTERN.matcher(statement); Matcher namedMatcher = NAMED_PLACEHOLDER_PATTERN.matcher(statement); List<int[]> quotes = new ArrayList<int[]>(); while (quoteMatcher.find()) { quotes.add(new int[] { quoteMatcher.start(), quoteMatcher.end() }); } int posCount = 0; int namedCount = 0; while (positionMatcher.find()) { String placeholder = positionMatcher.group(1); if (checkNotQuoted(placeholder, positionMatcher.start(), positionMatcher.end(), quotes)) { LOGGER.trace("{}: Found positional placeholder {}", this.queryMethod.getName(), placeholder); posCount++; parameterNames.add(placeholder.substring(1)); } } while (namedMatcher.find()) { String placeholder = namedMatcher.group(1); if (checkNotQuoted(placeholder, namedMatcher.start(), namedMatcher.end(), quotes)) { LOGGER.trace("{}: Found named placeholder {}", this.queryMethod.getName(), placeholder); namedCount++; parameterNames.add(placeholder.substring(1)); } } if (posCount > 0 && namedCount > 0) { throw new IllegalArgumentException("Using both named (" + namedCount + ") and positional (" + posCount + ") placeholders is not supported, please choose one over the other in " + queryMethod.getClass().getName() + "." + this.queryMethod.getName() + "()"); } if (posCount > 0) { <START> return placeHolderType = PlaceholderType.POSITIONAL; <END> } else if (namedCount > 0) { return placeHolderType = PlaceholderType.NAMED; } else { return placeHolderType = PlaceholderType.NONE; } }</code><technical_language>assignment return in</technical_language>

Target:
private void checkPlaceholders(String statement) { Matcher quoteMatcher = QUOTE_DETECTION_PATTERN.matcher(statement); Matcher positionMatcher = POSITIONAL_PLACEHOLDER_PATTERN.matcher(statement); Matcher namedMatcher = NAMED_PLACEHOLDER_PATTERN.matcher(statement); List<int[]> quotes = new ArrayList<int[]>(); while (quoteMatcher.find()) { quotes.add(new int[] { quoteMatcher.start(), quoteMatcher.end() }); } int posCount = 0; int namedCount = 0; while (positionMatcher.find()) { String placeholder = positionMatcher.group(1); if (checkNotQuoted(placeholder, positionMatcher.start(), positionMatcher.end(), quotes)) { LOGGER.trace("{}: Found positional placeholder {}", this.queryMethod.getName(), placeholder); posCount++; parameterNames.add(placeholder.substring(1)); } } while (namedMatcher.find()) { String placeholder = namedMatcher.group(1); if (checkNotQuoted(placeholder, namedMatcher.start(), namedMatcher.end(), quotes)) { LOGGER.trace("{}: Found named placeholder {}", this.queryMethod.getName(), placeholder); namedCount++; parameterNames.add(placeholder.substring(1)); } } if (posCount > 0 && namedCount > 0) { throw new IllegalArgumentException("Using both named (" + namedCount + ") and positional (" + posCount + ") placeholders is not supported, please choose one over the other in " + queryMethod.getClass().getName() + "." + this.queryMethod.getName() + "()"); } if (posCount > 0) { placeHolderType = PlaceholderType.POSITIONAL; } else if (namedCount > 0) { placeHolderType = PlaceholderType.NAMED; } else { placeHolderType = PlaceholderType.NONE; } }