Showing 12 of 18 total issues
Method format
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public String format(SessionNodeView session) {
StringBuilder builder = new StringBuilder();
builder.append(NEWLINE + INDENTS.get(1) + "ROOT");
List<FrameExtract> sessionCallFrames = session.getSessionFrameStack().getCallFrames();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method main
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
Method format
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public String format(SessionNodeView session) {
StringBuilder builder = new StringBuilder();
builder.append(NEWLINE + INDENTS.get(1) + "ROOT");
List<FrameExtract> sessionCallFrames = session.getSessionFrameStack().getCallFrames();
Method formatSelectSqlStatement
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
static String formatSelectSqlStatement(String generalIntend, String[] lines) {
StringBuilder builder = new StringBuilder();
boolean whereClauseProcessed = false;
builder.append('\n');
Method main
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method formatSelectSqlStatement
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
static String formatSelectSqlStatement(String generalIntend, String[] lines) {
StringBuilder builder = new StringBuilder();
boolean whereClauseProcessed = false;
builder.append('\n');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method statementExecuted
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void statementExecuted(String sql) {
if (verbosityLevel.isDebugModeEnabled()) {
if (verbosityLevel.isSqlStatementStackVisible()) {
String label = verbosityLevel.isSqlStatementVisible()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method filterApplicationCallFrames
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private List<FrameExtract> filterApplicationCallFrames(List<FrameExtract> callFrames, boolean proxyCallFramesHidden) {
List<FrameExtract> applicationAllCallFrames = filterToList(callFrames, FrameExtract::isNotThirdPartyClass);
if (!proxyCallFramesHidden) {
return applicationAllCallFrames;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method filter
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public List<OperationNodeView> filter(List<OperationNodeView> initialOperations) {
List<OperationNodeView> operations = initialOperations;
Set<OperationNodeView> excludedOperations = new HashSet<>();
for (OperationExclusion exclusion : exclusions) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getSqlWithParameters
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
String getSqlWithParameters() {
StringBuilder builder = new StringBuilder();
int parameterIndex = 0;
int startIndex = 0;
int endIndex = -1;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getMaxCommonHeadFragmentOfLists
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static <T> List<T> getMaxCommonHeadFragmentOfLists(List<T> firstList, List<T> secondList) {
Iterator<T> firstIterator = firstList.iterator();
Iterator<T> secondIterator = secondList.iterator();
int amountOfSameItems = 0;
boolean differenceFound = false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method addLazyInitialisation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
void addLazyInitialisation(LazyInitialisation lazyInitialisation) {
if (this.lazyInitialisations.isEmpty()) {
this.lazyInitialisations.add(lazyInitialisation);
if (operationType == OperationType.EXPLICIT) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"