Questions tagged [code-metrics]

29 questions
36
votes
2 answers

Are There Metrics For Cohesion And Coupling?

Is there a metric analogous to the McCabe Complexity measure to measure how cohesive a routine is and also how loosely (or tightly) coupled the routine is to other code in the same code base?
Onorio Catenacci
  • 2,947
  • 3
  • 27
  • 37
18
votes
4 answers

Source code metrics for measuring code stability?

Considering how software is developed during a release cycle (implementation, testing, bug fixing, release) I was thinking that one should be able to see some pattern in the lines of code that are changed in the code base; e.g. towards the end of a…
Giorgio
  • 19,646
0
votes
3 answers

Is the number of bugs in a section of code proportional to the # of lines ? The square of the # of lines ?

Are there any studies that aggregate data over a wide population of contributed code, that establish a correlation between amount of code written in a commit and the # of bugs discovered in that code ? It'd be hard to do in github without knowing…