Skip to main content

Questions tagged [code-metrics]

1 vote
1 answer
157 views

I am using TypeScript with classes, interfaces and polymorphism. A large portion of my project is basically a functional TypeScript-based DSL (domain specific language) that can be used to configure ...
damix911's user avatar
  • 119
7 votes
6 answers
565 views

In large systems there are often code paths that modify state or produce side effects that other code comes to depend on. This makes it hard to safely change code without understanding the whole ...
Sam's user avatar
  • 471
0 votes
3 answers
374 views

Having fewer lines of code per feature is typically better as it increases the developer productivity. Did anyone ever measure the number of code lines executions per line of code across multiple ...
Sebastian Wagner's user avatar
1 vote
1 answer
222 views

I'm looking for a code metric for monitor and track over time the size of several projects and their components. Also, I would like to use it for: evaluate size reduction after refactoring compare ...
Guish's user avatar
  • 23
-1 votes
1 answer
581 views

Can anybody point me to the official source where it is explained what are operators and operands in Halstead Metrics for code, I would prefer the original paper by Halstead. Please don't post the ...
Prashant's user avatar
4 votes
2 answers
2k views

Is the sum of the cyclomatic complexity of all section in a file the total cyclomatic complexity for this file? If it is, is the sum of a set of related files the total cyclomatic complexity for this ...
cervh's user avatar
  • 83
1 vote
2 answers
216 views

A few years ago I was using Sonar (before it was SonarQube) to analyze some Java code, and I remember seeing a useful metric that would come in handy again today. However it does not appear to be ...
Jim Kiley's user avatar
  • 191
0 votes
4 answers
761 views

By these days I work in a legacy code that uses JAVA. The project has a code tightly coupled and low cohesion. All my teammates suffer to make changes in the software, one reason is that we haven't ...
Lucas Fantacucci's user avatar
0 votes
2 answers
2k views

Is there something that ratio of the metrics LOC and Sum Cyclomatic Complexity in a project with many modules can talk about? Does it show the logical complexity of a module/project?
Christy Wald's user avatar
0 votes
2 answers
1k views

Occasionally I look at the code metrics in visual studio for my solution. I don't ever see anything I would find alarming. My maintainability is usually pretty high with exception to some obvious ...
Shelby115's user avatar
  • 475
2 votes
1 answer
5k views

I have been reading on the internet about the metric "number of bugs per 1000 lines of code" and what would be a good number. However, I wonder how someone would compute such a metric? The reason a ...
icehawk's user avatar
  • 183
6 votes
3 answers
7k views

My question is more about the transformation from programming code to control flow graph. Say, I have a piece of code: public class Contractor { // other member fields... private bool ...
VincentZHANG's user avatar
2 votes
1 answer
5k views

I have two classes C1 and C2. C1 has 2 methods and C2 has 3 methods each of complexity value 1. C2 inherits from C1. So, I know C2 has 2+3=5 methods in all. The question is, should I take C2 to have 5 ...
omeganebula's user avatar
7 votes
5 answers
4k views

In my company we have this obligatory practice before a review to be send the binary size impact of the code change to be measured and provided. We must use -Os for this metric to avoid ...
gsf's user avatar
  • 274
3 votes
2 answers
2k views

I know that basically, CC can be computed as number of decision + 1. In addition, every logical operator in the condition causes CC to increase by 1. But why? Having the code if(A || B || C) else... ...
user144171's user avatar

15 30 50 per page