TY - GEN
T1 - High-MCC functions in the Linux kernel
AU - Jbara, Ahmad
AU - Matan, Adam
AU - Feitelson, Dror G.
PY - 2012
Y1 - 2012
N2 - McCabe's Cyclomatic Complexity (MCC) is a widely used metric for the complexity of control flow. Common usage decrees that functions should not have an MCC above 50, and preferably much less. However, the Linux kernel includes more than 800 functions with MCC values above 50, and over the years 369 functions have had an MCC of 100 or more. Moreover, some of these functions undergo extensive evolution, indicating that developers are successful in coping with the supposed high complexity. We attempt to explain this by analyzing the structure of such functions and showing that in many cases they are in fact well-structured. At the same time, we observe cases where developers indeed refactor the code in order to reduce complexity. These observations indicate that a high MCC is not necessarily an impediment to code comprehension, and support the notion that complexity cannot be fully captured using simple syntactic code metrics.
AB - McCabe's Cyclomatic Complexity (MCC) is a widely used metric for the complexity of control flow. Common usage decrees that functions should not have an MCC above 50, and preferably much less. However, the Linux kernel includes more than 800 functions with MCC values above 50, and over the years 369 functions have had an MCC of 100 or more. Moreover, some of these functions undergo extensive evolution, indicating that developers are successful in coping with the supposed high complexity. We attempt to explain this by analyzing the structure of such functions and showing that in many cases they are in fact well-structured. At the same time, we observe cases where developers indeed refactor the code in order to reduce complexity. These observations indicate that a high MCC is not necessarily an impediment to code comprehension, and support the notion that complexity cannot be fully captured using simple syntactic code metrics.
KW - Linux Kernel
KW - McCabe Cyclomatic Complexity
KW - Software Complexity
UR - http://www.scopus.com/inward/record.url?scp=84865019147&partnerID=8YFLogxK
U2 - 10.1109/icpc.2012.6240512
DO - 10.1109/icpc.2012.6240512
M3 - ???researchoutput.researchoutputtypes.contributiontobookanthology.conference???
AN - SCOPUS:84865019147
SN - 9781467312165
T3 - IEEE International Conference on Program Comprehension
SP - 83
EP - 92
BT - 2012 20th IEEE International Conference on Program Comprehension, ICPC 2012 - Proceedings
PB - IEEE Computer Society
T2 - 2012 20th IEEE International Conference on Program Comprehension, ICPC 2012
Y2 - 11 June 2012 through 13 June 2012
ER -