Analiz...ethods(3pm)

πŸ“¦
version 1.25.5 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

ok so bestie, this is Analizo::Metric::LackOfCohesionOfMethods β€” aka the Lack of Cohesion of Methods (LCOM4) metric 🫢

It lives in the User Contributed Perl Documentation section of your manpages, and it's part of Analizo's metric squad ✨


🌸 DESCRIPTION 🌸

no cap, this metric computes the cohesion of the class, and the whole calculation is based on this article right here:

Article: text M. Hitz and B. Montazeri, "Measuring coupling and cohesion in object-oriented systems," in Proceedings of the International. Symposium on Applied Corporate Computing, 1995. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.409.4862

okay so here's the vibe of how LCOM4 actually works, and it's lowkey elegant πŸ‘‘

The LCOM4 value for a module is literally the number of connected components of an undirected graph. And what are the nodes and edges in this graph? Let me break it down:

  • the nodes are the module's subroutines (methods, functions, and friends πŸ’…)
  • the edges show that two subroutines either use at least one attribute/variable in common, or that one subroutine calls the other

These connected components are the module's independent parts. So if a module has more than one of them, it has multiple independent, distinct responsibilities β€” it's giving "this class is doing way too much" 😭 main character energy but for too many plots fr fr.


if you wanna see LCOM4 out here being used in an actual study, bestie, say less:

text Terceiro, Antonio, et al. "Understanding structural complexity evolution: A quantitative analysis." Software Maintenance and Reengineering (CSMR), 2012 16th European Conference on. IEEE, 2012. NBR 6023 http://ieeexplore.ieee.org/abstract/document/6178856/

and if you want the side-by-side tea on the whole LCOM family πŸ“ β€” a comparative study covering the various LCOM1, LCOM2, LCOM3, LCOM4 and LCOM5, look no further:

text Kaur, Taranjeet, and Rupinder Kaur. "Comparison of various lacks of Cohesion Metrics." International Journal of Computer Trends and Technology (IJCTT) 4.5 (2013). NBR 6023 http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.686.2543

🌈 that's the whole page, bestie β€” every component, every citation, every URL accounted for, and not a single crumb of detail left behind πŸ’…

and for the cute sign-off: this doc came to you courtesy of perl v5.40.1, dated 2025-12-13, under the Analiz...ethods(3pm) manpage header. periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from