ArtifactForms/MeshLibCore

View on GitHub

Showing 407 of 407 total issues

Method drawFacesSmooth has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  private void drawFacesSmooth(Mesh3D mesh, Collection<Face3D> faces) {
    context.pushMatrix();

    mesh.apply(new UpdateFaceNormalsModifier());

Severity: Minor
Found in src/main/java/workspace/render/Mesh3DRenderer.java - About 1 hr 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 setMaterial has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  @Override
  public void setMaterial(Material material) {
    if (material == null) {
      System.err.println("Warning: Null material passed to setMaterial().");
      return;
Severity: Minor
Found in src/main/java/workspace/GraphicsPImpl.java - About 1 hr to fix

    Method drawBuffer has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      private void drawBuffer(SceneObject sceneObject) {
        PGraphics3D context = g3d;
        Mesh3D mesh = sceneObject.getMesh();
    
        int c = -1;
    Severity: Minor
    Found in src/main/java/workspace/render/ObjectSelectionRender.java - About 1 hr to fix

      Method invert has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        public Matrix4f invert() {
          float[] inv = new float[16];
          float det;
      
          // Calculate the determinant of the 4x4 matrix and compute its inverse
      Severity: Minor
      Found in src/main/java/math/Matrix4f.java - About 1 hr to fix

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

            protected UiCheckBox getXAxisCheckBox() {
                if (xAxisCheckBox != null)
                    return xAxisCheckBox;
        
                xAxisCheckBox = new UiCheckBox("X-Axis (1)");
        Severity: Major
        Found in src/main/java/workspace/WorkspaceSideBarUi.java and 8 other locations - About 1 hr to fix
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 94..112
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 114..132
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 134..152
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 154..172
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 194..212
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 214..232
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 234..252
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 276..294

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 90.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

            protected UiCheckBox getZAxisCheckBox() {
                if (zAxisCheckBox != null)
                    return zAxisCheckBox;
        
                zAxisCheckBox = new UiCheckBox("Z-Axis (3)");
        Severity: Major
        Found in src/main/java/workspace/WorkspaceSideBarUi.java and 8 other locations - About 1 hr to fix
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 94..112
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 114..132
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 134..152
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 154..172
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 174..192
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 194..212
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 234..252
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 276..294

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 90.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

            protected UiCheckBox getEdgeCheckBox() {
                if (edgeCheckBox != null)
                    return edgeCheckBox;
        
                edgeCheckBox = new UiCheckBox("Edges (E)");
        Severity: Major
        Found in src/main/java/workspace/WorkspaceSideBarUi.java and 8 other locations - About 1 hr to fix
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 94..112
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 114..132
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 134..152
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 154..172
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 174..192
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 194..212
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 214..232
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 276..294

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 90.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

            protected UiCheckBox getGridCheckBox() {
                if (gridCheckBox != null)
                    return gridCheckBox;
        
                gridCheckBox = new UiCheckBox("Grid (G)");
        Severity: Major
        Found in src/main/java/workspace/WorkspaceSideBarUi.java and 8 other locations - About 1 hr to fix
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 114..132
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 134..152
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 154..172
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 174..192
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 194..212
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 214..232
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 234..252
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 276..294

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 90.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

            protected UiCheckBox getWireFrameCheckBox() {
                if (wireFrameCheckBox != null)
                    return wireFrameCheckBox;
        
                wireFrameCheckBox = new UiCheckBox("Wireframe (Z)");
        Severity: Major
        Found in src/main/java/workspace/WorkspaceSideBarUi.java and 8 other locations - About 1 hr to fix
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 94..112
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 114..132
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 134..152
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 174..192
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 194..212
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 214..232
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 234..252
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 276..294

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 90.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

            protected UiCheckBox getYAxisCheckBox() {
                if (yAxisCheckBox != null)
                    return yAxisCheckBox;
        
                yAxisCheckBox = new UiCheckBox("Y-Axis (2)");
        Severity: Major
        Found in src/main/java/workspace/WorkspaceSideBarUi.java and 8 other locations - About 1 hr to fix
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 94..112
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 114..132
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 134..152
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 154..172
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 174..192
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 214..232
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 234..252
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 276..294

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 90.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

            protected UiCheckBox getFaceNormalsCheckBox() {
                if (faceNormalsCheckBox != null)
                    return faceNormalsCheckBox;
        
                faceNormalsCheckBox = new UiCheckBox("Face Normals (N)");
        Severity: Major
        Found in src/main/java/workspace/WorkspaceSideBarUi.java and 8 other locations - About 1 hr to fix
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 94..112
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 134..152
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 154..172
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 174..192
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 194..212
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 214..232
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 234..252
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 276..294

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 90.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

            protected UiCheckBox getVertexNormalsCheckBox() {
                if (vertexNormalsCheckBox != null)
                    return vertexNormalsCheckBox;
        
                vertexNormalsCheckBox = new UiCheckBox("Vertex Normals (V)");
        Severity: Major
        Found in src/main/java/workspace/WorkspaceSideBarUi.java and 8 other locations - About 1 hr to fix
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 94..112
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 114..132
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 154..172
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 174..192
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 194..212
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 214..232
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 234..252
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 276..294

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 90.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

            protected UiCheckBox getLoopCheckBox() {
                if (loopCheckBox != null)
                    return loopCheckBox;
        
                loopCheckBox = new UiCheckBox("Loop");
        Severity: Major
        Found in src/main/java/workspace/WorkspaceSideBarUi.java and 8 other locations - About 1 hr to fix
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 94..112
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 114..132
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 134..152
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 154..172
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 174..192
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 194..212
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 214..232
        src/main/java/workspace/WorkspaceSideBarUi.java on lines 234..252

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 90.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Method intersectsRay has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          public boolean intersectsRay(Ray3f ray) {
            if (ray.getDirection().isZero()) {
              return false; // A ray with zero direction cannot intersect anything
            }
        
        
        Severity: Minor
        Found in src/main/java/math/Bounds.java - About 1 hr to fix

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                  for (int i = 0; i < segments; i++) {
                      int index0 = bottomIndex + (i + 1) % segments;
                      int index1 = bottomIndex + i;
                      int index2 = nextIndex + (i + 1) % segments;
                      mesh.addFace(index0, index1, index2);
          Severity: Major
          Found in src/main/java/mesh/creator/special/GemCreator.java and 1 other location - About 1 hr to fix
          src/main/java/mesh/creator/special/GemCreator.java on lines 82..87

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 88.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                  for (int i = 0; i < segments; i++) {
                      int index0 = nextIndex + (i + 1) % segments;
                      int index1 = bottomIndex + i;
                      int index2 = bottomIndex + (i + 1) % segments;
                      mesh.addFace(index0, index1, index2);
          Severity: Major
          Found in src/main/java/mesh/creator/special/GemCreator.java and 1 other location - About 1 hr to fix
          src/main/java/mesh/creator/special/GemCreator.java on lines 93..98

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 88.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Method createCrossBeam has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private Mesh3D createCrossBeam() {
                  float inset = Mathf.sqrt(this.inset * this.inset * 0.5f);
                  float radius = crossBeamRadius;
                  Mesh3D mesh = new Mesh3D();
          
          
          Severity: Minor
          Found in src/main/java/mesh/creator/assets/CrateCreator.java - About 1 hr to fix

            Method createTriangles has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private void createTriangles() {
                    addFace(0, 6, 9);
                    addFace(0, 9, 22);
                    addFace(0, 17, 6);
                    addFace(0, 22, 19);
            Severity: Minor
            Found in src/main/java/mesh/creator/archimedian/SnubCubeCreator.java - About 1 hr to fix

              Method getMeshModifier has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public IMeshModifier getMeshModifier(char c) {
              
                      switch (c) {
                      case 'd':
                          return new ConwayDualModifier();
              Severity: Minor
              Found in src/main/java/mesh/conway/Conway.java - About 1 hr to fix

                Method getBorderVerticesFromGrid has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                    private List<Vector3f> getBorderVerticesFromGrid(Mesh3D grid) {
                        float valueX = Mathf.abs(grid.getVertexAt(0).getX());
                        float valueZ = Mathf.abs(grid.getVertexAt(0).getZ());
                
                        List<Vector3f> vertices0 = new ArrayList<Vector3f>();
                Severity: Minor
                Found in src/main/java/mesh/creator/primitives/QuadCapCylinderCreator.java - About 1 hr 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