Description:
To override method of base class in the derived class, method name and method profile (return type and types of argumnets) should match one of the overriden method. If you make mistake in method name or incorrectly specify parameter list, the method will not be overriden. So method of the derived class will never be called.
Sapient is able to check both cases. The message is produced if:
This audit has two parameters: Minimum name length and
Maximum number of differences. The first one specifies minimum length
of name of method for which name matching algorithm is applied (althouth methods "f1" and
"f2" differ only in one symbol, it will be strange to call these names similar).
And parameter Maximum number of differences specifies maximum number
of differences between names (removing/insertion of symbol).
Example:
class Base {
void someMethod();
void anotherMethod(String str, int x);
};
class Derived extends Base {
void someMetod(); // mistyping in method name
void anotherMethod(int x, String str); // profiles not matched
}