ArtifactForms/MeshLibCore

View on GitHub

Showing 407 of 407 total issues

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

    private void createPentagonalFaces() {
        addFace(0, 8, 25, 22, 6);
        addFace(0, 9, 23, 27, 12);
        addFace(1, 7, 24, 28, 10);
        addFace(1, 13, 29, 26, 11);
src/main/java/mesh/creator/platonic/DodecahedronCreator.java on lines 63..76

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

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

Graphics2D has 24 methods (exceeds 20 allowed). Consider refactoring.
Open

public interface Graphics2D {

    /**
     * Retrieves the current width of the rendering context's viewport.
     * 
Severity: Minor
Found in src/main/java/workspace/ui/Graphics2D.java - About 2 hrs to fix

    GemCreator has 24 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class GemCreator implements IMeshCreator {
    
        private int segments;
    
        private float pavillionRadius;
    Severity: Minor
    Found in src/main/java/mesh/creator/special/GemCreator.java - About 2 hrs to fix

      Editor has 24 methods (exceeds 20 allowed). Consider refactoring.
      Open

      public class Editor implements ModelListener {
      
        protected List<SceneObject> sceneObjects;
      
        protected UiComponent rootUi;
      Severity: Minor
      Found in src/main/java/workspace/Editor.java - About 2 hrs to fix

        ChainLinkCreator has 24 methods (exceeds 20 allowed). Consider refactoring.
        Open

        public class ChainLinkCreator implements IMeshCreator {
        
            private float centerPieceSize;
        
            private float majorRadius;
        Severity: Minor
        Found in src/main/java/mesh/creator/assets/ChainLinkCreator.java - About 2 hrs to fix

          WorkspaceSideBarUi has 24 methods (exceeds 20 allowed). Consider refactoring.
          Open

          public class WorkspaceSideBarUi extends UiComponent implements ModelListener {
          
              private int xOffset = 10;
          
              private int yOffset = 65;
          Severity: Minor
          Found in src/main/java/workspace/WorkspaceSideBarUi.java - About 2 hrs to fix

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

                public Matrix3f addLocal(Matrix3f m) {
                    values[M00] += m.values[M00];
                    values[M01] += m.values[M01];
                    values[M02] += m.values[M02];
                    values[M10] += m.values[M10];
            Severity: Major
            Found in src/main/java/math/Matrix3f.java and 1 other location - About 2 hrs to fix
            src/main/java/math/Matrix3f.java on lines 201..212

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

            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 2 locations. Consider refactoring.
            Open

                public Matrix3f set(Matrix3f m) {
                    values[M00] = m.values[M00];
                    values[M01] = m.values[M01];
                    values[M02] = m.values[M02];
                    values[M10] = m.values[M10];
            Severity: Major
            Found in src/main/java/math/Matrix3f.java and 1 other location - About 2 hrs to fix
            src/main/java/math/Matrix3f.java on lines 93..104

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

            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

                private void createVertices() {
                    float halfWidth = width / 2f;
            
                    addVertex(-halfWidth, 0, 0);
                    addVertex(+halfWidth, 0, 0);
            Severity: Major
            Found in src/main/java/mesh/creator/beam/BeamUProfileCreator.java and 1 other location - About 2 hrs to fix
            src/main/java/mesh/creator/beam/BeamCProfileCreator.java on lines 45..56

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

            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

                private void createVertices() {
                    float halfHeight = height / 2f;
            
                    addVertex(-halfHeight, 0, 0);
                    addVertex(+halfHeight, 0, 0);
            Severity: Major
            Found in src/main/java/mesh/creator/beam/BeamCProfileCreator.java and 1 other location - About 2 hrs to fix
            src/main/java/mesh/creator/beam/BeamUProfileCreator.java on lines 45..56

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

            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

            SegmentedBoxCreator has 23 methods (exceeds 20 allowed). Consider refactoring.
            Open

            public class SegmentedBoxCreator implements IMeshCreator {
            
                private int segmentsX;
            
                private int segmentsY;
            Severity: Minor
            Found in src/main/java/mesh/creator/primitives/SegmentedBoxCreator.java - About 2 hrs to fix

              ConwayAmboModifier has 23 methods (exceeds 20 allowed). Consider refactoring.
              Open

              public class ConwayAmboModifier implements IMeshModifier {
              
                  private Mesh3D mesh;
              
                  private ArrayList<Face3D> facesToAdd;
              Severity: Minor
              Found in src/main/java/mesh/conway/ConwayAmboModifier.java - About 2 hrs to fix

                Method addFaces has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private void addFaces() {
                        mesh.addFace(0, 56, 3);
                        mesh.addFace(1, 5, 58);
                        mesh.addFace(2, 6, 57);
                        mesh.addFace(4, 59, 7);

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

                      inv[4] =
                          -(values[4] * values[10] * values[15]
                              - values[4] * values[11] * values[14]
                              - values[8] * values[6] * values[15]
                              + values[8] * values[7] * values[14]
                  Severity: Major
                  Found in src/main/java/math/Matrix4f.java and 1 other location - About 2 hrs to fix
                  src/main/java/math/Matrix4f.java on lines 134..140

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

                  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 2 locations. Consider refactoring.
                  Open

                      inv[12] =
                          -(values[0] * values[9] * values[14]
                              - values[0] * values[11] * values[13]
                              - values[2] * values[8] * values[15]
                              + values[2] * values[12] * values[13]
                  Severity: Major
                  Found in src/main/java/math/Matrix4f.java and 1 other location - About 2 hrs to fix
                  src/main/java/math/Matrix4f.java on lines 118..124

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

                  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 createVertices has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private void createVertices() {
                          mesh.addVertex(+b, +b, +e);
                          mesh.addVertex(+b, +b, -e);
                          mesh.addVertex(+b, -b, +e);
                          mesh.addVertex(-b, +b, +e);

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

                        public void outerBoundary() {
                            TraverseHelper helper = new TraverseHelper(mesh);
                    
                            HashSet<Face3D> deselected = new HashSet<Face3D>();
                    
                    
                    Severity: Major
                    Found in src/main/java/mesh/selection/FaceSelection.java and 1 other location - About 2 hrs to fix
                    src/main/java/mesh/selection/FaceSelection.java on lines 115..134

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

                    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 2 locations. Consider refactoring.
                    Open

                        public void innerBoundary() {
                            TraverseHelper helper = new TraverseHelper(mesh);
                    
                            HashSet<Face3D> deselected = new HashSet<Face3D>();
                    
                    
                    Severity: Major
                    Found in src/main/java/mesh/selection/FaceSelection.java and 1 other location - About 2 hrs to fix
                    src/main/java/mesh/selection/FaceSelection.java on lines 94..113

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

                    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 2 locations. Consider refactoring.
                    Open

                        public void selectRegion(float minX, float maxX, float minY, float maxY,
                                float minZ, float maxZ) {
                            for (Face3D f : mesh.faces) {
                                int n = f.indices.length;
                                boolean add = true;
                    Severity: Major
                    Found in src/main/java/mesh/selection/FaceSelection.java and 1 other location - About 2 hrs to fix
                    src/main/java/mesh/selection/FaceSelection.java on lines 256..271

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

                    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 2 locations. Consider refactoring.
                    Open

                        public void removeRegion(float minX, float maxX, float minY, float maxY,
                                float minZ, float maxZ) {
                            for (Face3D f : mesh.faces) {
                                int n = f.indices.length;
                                boolean remove = true;
                    Severity: Major
                    Found in src/main/java/mesh/selection/FaceSelection.java and 1 other location - About 2 hrs to fix
                    src/main/java/mesh/selection/FaceSelection.java on lines 239..254

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

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language