Examples of errors detected by the V6011 diagnostic


V6011. The expression contains a suspicious mix of integer and real types


IntelliJ IDEA Community Edition

V6011 [CWE-682] The '0.2' literal of the 'double' type is compared to a value of the 'int' type. TitleCapitalizationInspection.java 169


private static boolean checkSentenceCapitalization(@NotNull String value) {
  List<String> words = StringUtil.split(value, " ");
  ....
  int capitalized = 1;
  ....
  return capitalized / words.size() < 0.2; // allow reasonable amount of
                                           // capitalized words
}


Bugs Found

Checked Projects
346
Collected Errors
13 124