Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 950933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:38:52+00:00 2026-05-15T23:38:52+00:00

I’m principally interested in case studies on code metrics, relating code readability to defect

  • 0

I’m principally interested in case studies on code metrics, relating code readability to defect reduction, that justify taking seriously cyclomatic complexity or some similar metric. Wikipedia has this example:

A number of studies have investigated
cyclomatic complexity’s correlation to
the number of defects contained in a
module. Most such studies find a
strong positive correlation between
cyclomatic complexity and defects:
modules that have the highest
complexity tend to also contain the
most defects. For example, a 2008
study by metric-monitoring software
supplier Enerjy analyzed classes of
open-source Java applications and
divided them into two sets based on
how commonly faults were found in
them. They found strong correlation
between cyclomatic complexity and
their faultiness, with classes with a
combined complexity of 11 having a
probability of being fault-prone of
just 0.28, rising to 0.98 for classes
with a complexity of 74.

This is good, but I’m hoping to know if there are more studies (or perhaps similar studies for other metrics, such as SLOC).

I also found an article at IBM that promotes monitoring CC values, but it lacks case-study support showing ROI figures. Then there is Coding Horror article on “arrow code” which sites a summary of a case study, but does not offer the case study(ies) themselves nor the actual numbers which justified the conclusion:

Studies show a correlation between a
program’s cyclomatic complexity and
its error frequency. A low cyclomatic
complexity contributes to a program’s
understandability and indicates it is
amenable to modification at lower risk
than a more complex program. A
module’s cyclomatic complexity is also
a strong indicator of its testability.

Certainly cyclomatic complexity (CC) will help spot arrow-code, but I still need case studies that show ROI values. For example, “organization X incorporated a max CC of 10 on methods/functions, and reduced defects 20% in the following development iteration.”

Without that kind of data, it is difficult to get management to care. Can anyone point me to a few hard studies? Even just one would help…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:38:52+00:00Added an answer on May 15, 2026 at 11:38 pm

    In this case, you get a bit more from the original article than Wikipedia’s. His technical paper about how the data gathering and such shows a 95% confidence level in the conclusions.

    You’re right that this doesn’t give ROI information directly. At least for this study, that would be fairly difficult — for example, they used open-source projects for their training data, and actual costs for open-source projects are usually difficult to even estimate, much less measure. At the same time, they did use what I’d consider at least a reasonable proxy for true ROI data: they searched through the source control system for each of their “training” projects looking for check-ins that appeared to be related to fixing bugs, defects, etc. They then used a naive Bayes algorithm to find correlation between the metrics they used, and the problems that had been identified in the code. While undoubtedly open to at least some improvement, it appears to me that these results should mean at least something.

    It’s also worth noting that the same people who did the study keep a running index on a large number of open-source projects. If you wanted more in the way of solid data, you can check their index back against the source control logs for some of those projects, you could probably use their data to come up with more in the way of direct ROI type results. One note, however: their index is based on quite a few source code metrics, not just cyclomatic complexity, so I’m not sure exactly how much it would tell exclusively about CC as opposed to the other metrics they look at.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 489k
  • Answers 489k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer oh, never mind. dumb move on my part. this metadata… May 16, 2026 at 9:02 am
  • Editorial Team
    Editorial Team added an answer UglifyJS2, used by the jQuery project. May 16, 2026 at 9:02 am
  • Editorial Team
    Editorial Team added an answer The site doesn't seem to create executable but just provide… May 16, 2026 at 9:02 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.