Skip to main content
Code Review

Questions tagged [cyclomatic-complexity]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
117 views

Semi-generic data loading utility class

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 ...
1 vote
1 answer
573 views

Comparison of lists of intervals

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 [...
1 vote
2 answers
217 views

Parse string using character value for Unicode characters

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 ...
3 votes
2 answers
159 views

C# Tool to Generate MS Word Document Mailbox List From MS Excel

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# ...
3 votes
2 answers
127 views

Simplify 2D point angle comparator

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 ...
0 votes
2 answers
340 views

Optimizing methods with multiple if checks on getter values

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 ...
5 votes
1 answer
151 views

Hand Coded State Driven Lexical Analyzer in C With Unit Test Part C

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 ...
4 votes
1 answer
103 views

Hand Coded State Driven Lexical Analyzer in C With Unit Test Part B

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 ...
9 votes
2 answers
368 views

Hand Coded State Driven Lexical Analyzer in C With Unit Test Part A

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 ...
1 vote
2 answers
127 views

Parser for file made up of sections

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 <...
0 votes
1 answer
215 views

Case of Cyclomatic Complexity

I'm trying to recreate the method inject (Works like Reduce) from ruby Enumerable Module. Using Rubocop (A Linter) I got the error: ...
4 votes
1 answer
183 views

Method that filters a list parameters based on different fields

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 ...
1 vote
2 answers
95 views

Files.walkTree is causing Assignment Branch Condition too high [closed]

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 ...
6 votes
2 answers
21k views

handle null in Comparator class

I have a class LoanAccount that contains an attributes creationDate and loanAmount. I ...
14 votes
2 answers
805 views

Get the encrypted payload from an unencrypted wrapper PDF document

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 ...

15 30 50 per page
1
2 3 4 5

AltStyle によって変換されたページ (->オリジナル) /