jnidzwetzki/bboxdb

View on GitHub

Showing 586 of 966 total issues

Method runThread has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void runThread() {
        
        while(bboxDBConnection.isConnected()) {
            try {

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 cancelQuery has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static void cancelQuery(final Map<BBoxDBClient, List<Short>> cancelData)
            throws BBoxDBException, InterruptedException {
        
        for(Entry<BBoxDBClient, List<Short>> entry : cancelData.entrySet()) {
            

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 coversAtLeastOneDimensionComplete has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean coversAtLeastOneDimensionComplete(final Hyperrectangle hyperrectangle) {
        
        if(this == FULL_SPACE || hyperrectangle == FULL_SPACE) {
            return true;
        }
Severity: Minor
Found in bboxdb-commons/src/main/java/org/bboxdb/commons/math/Hyperrectangle.java - About 25 mins to fix

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 getCoveringBox has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static Hyperrectangle getCoveringBox(final Hyperrectangle hyperrectangle1,
            final Hyperrectangle hyperrectangle2) {

        if(hyperrectangle1 == FULL_SPACE) {
            return hyperrectangle2;
Severity: Minor
Found in bboxdb-commons/src/main/java/org/bboxdb/commons/math/Hyperrectangle.java - About 25 mins to fix

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 getIntersection has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public Hyperrectangle getIntersection(final Hyperrectangle otherBox) {

        if(getDimension() == 0 || otherBox.getDimension() == 0) {
            return FULL_SPACE;
        }
Severity: Minor
Found in bboxdb-commons/src/main/java/org/bboxdb/commons/math/Hyperrectangle.java - About 25 mins to fix

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 scaleVolumeByPercentage has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public Hyperrectangle scaleVolumeByPercentage(final double percentage) {
        
        // Don't scale the full space
        if(this == FULL_SPACE) {
            return null;
Severity: Minor
Found in bboxdb-commons/src/main/java/org/bboxdb/commons/math/Hyperrectangle.java - About 25 mins to fix

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

Severity
Category
Status
Source
Language