Error exists when method compareTo declared with signature different than int compareTo(Object).

Vulnerability and risk

Intent was probably to implement interface method of Comparable interface, but since this method has different signature it is not same method and will not be called when comparator is used.

Mitigation and prevention

Declare that class implements Comparable, declare int compareTo(Object) method.

Example 1

14         String name;
15         int compareTo(MyClass a) {
16             return name.compareTo(;
17         }

COV.CMP is reported for line 15: Method compareTo(..) should have signature 'public int compareTo(Object)'