private static boolean isLinear(AnalyzerMessage issue) {
   String ruleKey;
   RspecKey rspecKeyAnnotation =
       AnnotationUtils.getAnnotation(issue.getCheck().getClass(), RspecKey.class);
   if (rspecKeyAnnotation != null) {
     ruleKey = rspecKeyAnnotation.value();
   } else {
     ruleKey = AnnotationUtils.getAnnotation(issue.getCheck().getClass(), Rule.class).key();
   }
   try {
     URL resource =
         CheckVerifier.class.getResource(
             "/org/sonar/l10n/java/rules/squid/" + ruleKey + "_java.json");
     if (resource == null) {
       throw new IOException();
     }
     String json = Resources.toString(resource, Charsets.UTF_8);
     return LINEAR_FUNC_PATTERN.matcher(json).find();
   } catch (IOException e) {
     // Failed to open json file, as this is not part of API yet, we should not fail because of
     // this
   }
   return false;
 }