Skip to main content

Questions tagged [cyclomatic-complexity]

Cyclomatic Complexity is a metric of the complexity of a program or a section of a program.

2 votes
1 answer
118 views

The following implements a relatively generic and modular data loading utility. It loads images from a local storage given a lookup table. The data loader is parametrized via dependency injection to ...
lo tolmencre's user avatar
1 vote
1 answer
576 views

From the following script, the "similarity" function should be callable to compare two sets of lists and return a certain similarity score. The elements of the lists represent intervals, so [...
Pimsel's user avatar
  • 25
1 vote
2 answers
217 views

I added the getCValue method to reduce the cyclomatic complexity, but the cyclomatic complexity still persists. How can I reduce it? Can I change this code using ...
stromboli's user avatar
3 votes
2 answers
160 views

There is now a Follow up question to this question. Abstract The VBA solution didn't work on the clients computer because Office 2010 Starter Edition doesn't support VBA. I decided to try a C# ...
pacmaninbw's user avatar
  • 26.2k
3 votes
2 answers
128 views

I have a comparison function for comparing two points in 2 (or more) dimensions based on the angle of each point in standard polar coordinates. In other words, a point ...
hacatu's user avatar
  • 472
0 votes
2 answers
340 views

I have a method where I fetch user input, check if certain values exist, and based on that build my own custom input object that I would use to search in a database. The code for the search method is ...
AnOldSoul's user avatar
  • 121
5 votes
1 answer
152 views

This review is presented in 3 questions due to the amount of code: Part A contains the Lexical Analyzer and the main portion of the unit test code. Part B contains the lower level unit tests called ...
pacmaninbw's user avatar
  • 26.2k
4 votes
1 answer
103 views

This review is presented in 3 questions due to the amount of code: Part A contains the Lexical Analyzer and the main portion of the unit test code. Part B (this question) contains the lower level ...
pacmaninbw's user avatar
  • 26.2k
9 votes
2 answers
369 views

This code review is presented in 3 questions due to the amount of code: Part A (this question) contains the Lexical Analyzer and the main portion of the unit test code. Part B contains the lower ...
pacmaninbw's user avatar
  • 26.2k
1 vote
2 answers
127 views

I'm parsing a file made up of various sections. I have a current_section variable that tracks which portion of the file I'm currently processing and the following <...
Neils Christoffersen's user avatar
0 votes
1 answer
215 views

I'm trying to recreate the method inject (Works like Reduce) from ruby Enumerable Module. Using Rubocop (A Linter) I got the error: ...
Sevila's user avatar
  • 111
4 votes
1 answer
185 views

I have this code which is a callback for Filter in WPF ICollectionView. When I run code analysis, the cyclometic complexity is reported to be 11. I consider this ...
Code Name Jack's user avatar
1 vote
2 answers
96 views

My code is working correctly, but is resulting in a "Assignment branch condition too high" warning with a score of 12.08 on CodeBeat. Codebeat is an automated code review utility that helps ...
Jean-Pierre El Ghafary's user avatar
6 votes
2 answers
21k views

I have a class LoanAccount that contains an attributes creationDate and loanAmount. I ...
Cristian Iacob's user avatar
14 votes
2 answers
806 views

This is code, written by our dev team, and SonarQube tells me that the Cognitive Complexity is too high: 21, and the current (default, out of the box) metric limit is 15. I've had a go at reducing the ...
Amedee Van Gasse's user avatar

15 30 50 per page
1
2 3 4 5