private Collection<Rule> byKey(RuleQuery query) {
Rule rule = toRule(rules.find(RuleKey.of(query.getRepositoryKey(), query.getKey())));
return rule != null ? Arrays.asList(rule) : Collections.<Rule>emptyList();
}
private Collection<Rule> byInternalKey(RuleQuery query) {
<BUG>return Collections2.transform(rules.findByInternalKey(query.getRepositoryKey(), query.getConfigKey()), ruleTransformer);

}</BUG>
@CheckForNull
private static Rule toRule(@Nullable org.sonar.api.batch.rule.Rule ar) {

private Collection<Rule> byKey(RuleQuery query) {
Rule rule = toRule(rules.find(RuleKey.of(query.getRepositoryKey(), query.getKey())));
return rule != null ? Arrays.asList(rule) : Collections.<Rule>emptyList();
}
private Collection<Rule> byInternalKey(RuleQuery query) {
return rules.findByInternalKey(query.getRepositoryKey(), query.getConfigKey()).stream()
.map(RuleFinderCompatibility::toRule)
.collect(toList());
}
@CheckForNull
private static Rule toRule(@Nullable org.sonar.api.batch.rule.Rule ar) {
