This issue is raised when Sonar considers that a method is a 'Brain Method'.
A Brain Method is a method that tends to centralize its owner’s
class logic and generally performs too many operations. This can include checking too many conditions, using lots of variables, and ultimately making
it difficult to understand, maintain and reuse.
It is characterized by high LOC number, high cyclomatic and cognitive complexity, and a large
number of variables being used.
What is the potential impact?
Brain Methods are often hard to cover with tests, because of their deep nesting, and they are error-prone, because of the many local variables they
usually introduce. Such methods will be very hard to read and understand for anyone outside who created them, and therefore hard to maintain and fix
if bugs get spotted.
They also enable code duplication since the method itself can hardly be reused anywhere else.