ArtifactForms/MeshLibCore

View on GitHub
src/main/java/mesh/selection/FaceSelection.java

Summary

Maintainability
F
4 days
Test Coverage

FaceSelection has 48 methods (exceeds 20 allowed). Consider refactoring.
Open

public class FaceSelection {

    private Mesh3D mesh;

    private HashSet<Face3D> faceSet;
Severity: Minor
Found in src/main/java/mesh/selection/FaceSelection.java - About 6 hrs to fix

    File FaceSelection.java has 353 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    package mesh.selection;
    
    import java.util.Collection;
    import java.util.HashSet;
    import java.util.Iterator;
    Severity: Minor
    Found in src/main/java/mesh/selection/FaceSelection.java - About 4 hrs to fix

      Method innerBoundary has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

          public void innerBoundary() {
              TraverseHelper helper = new TraverseHelper(mesh);
      
              HashSet<Face3D> deselected = new HashSet<Face3D>();
      
      
      Severity: Minor
      Found in src/main/java/mesh/selection/FaceSelection.java - About 55 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 outerBoundary has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

          public void outerBoundary() {
              TraverseHelper helper = new TraverseHelper(mesh);
      
              HashSet<Face3D> deselected = new HashSet<Face3D>();
      
      
      Severity: Minor
      Found in src/main/java/mesh/selection/FaceSelection.java - About 55 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 selectRegion has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public void selectRegion(float minX, float maxX, float minY, float maxY,
                  float minZ, float maxZ) {
      Severity: Minor
      Found in src/main/java/mesh/selection/FaceSelection.java - About 45 mins to fix

        Method removeRegion has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public void removeRegion(float minX, float maxX, float minY, float maxY,
                    float minZ, float maxZ) {
        Severity: Minor
        Found in src/main/java/mesh/selection/FaceSelection.java - About 45 mins to fix

          Method selectDoubles has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public void selectDoubles() {
                  for (Face3D f0 : mesh.faces) {
                      for (Face3D f1 : mesh.faces) {
                          if (f0.sharesSameIndices(f1) && f0 != f1) {
                              faceSet.add(f0);
          Severity: Minor
          Found in src/main/java/mesh/selection/FaceSelection.java - About 35 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 selectSphere has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              public void selectSphere(Vector3f center, float radius) {
                  for (Face3D face : mesh.getFaces()) {
                      for (int i = 0; i < face.indices.length; i++) {
                          Vector3f v = mesh.getVertexAt(face.indices[i]);
                          float distance = center.distance(v);
          Severity: Minor
          Found in src/main/java/mesh/selection/FaceSelection.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 removeRegion has a Cognitive Complexity of 6 (exceeds 5 allowed). 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: Minor
          Found in src/main/java/mesh/selection/FaceSelection.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 selectByVertex has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              public void selectByVertex(Vector3f v) {
                  for (Face3D face : mesh.faces) {
                      for (int i = 0; i < face.indices.length; i++) {
                          Vector3f v0 = mesh.getVertexAt(face.indices[i]);
                          if (v0.equals(v)) {
          Severity: Minor
          Found in src/main/java/mesh/selection/FaceSelection.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 selectRegion has a Cognitive Complexity of 6 (exceeds 5 allowed). 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: Minor
          Found in src/main/java/mesh/selection/FaceSelection.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

          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

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

              public void selectLeftFaces() {
                  for (Face3D f : mesh.faces) {
                      Vector3f v = mesh.calculateFaceNormal(f);
                      Vector3f v0 = new Vector3f(Mathf.round(v.getX()),
                              Mathf.round(v.getY()), Mathf.round(v.getZ()));
          Severity: Major
          Found in src/main/java/mesh/selection/FaceSelection.java and 2 other locations - About 1 hr to fix
          src/main/java/mesh/selection/FaceSelection.java on lines 295..304
          src/main/java/mesh/selection/FaceSelection.java on lines 328..337

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

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

              public void selectTopFaces() {
                  for (Face3D f : mesh.faces) {
                      Vector3f v = mesh.calculateFaceNormal(f);
                      Vector3f v0 = new Vector3f(Mathf.round(v.getX()),
                              Mathf.round(v.getY()), Mathf.round(v.getZ()));
          Severity: Major
          Found in src/main/java/mesh/selection/FaceSelection.java and 2 other locations - About 1 hr to fix
          src/main/java/mesh/selection/FaceSelection.java on lines 273..282
          src/main/java/mesh/selection/FaceSelection.java on lines 328..337

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

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

              public void selectBackFaces() {
                  for (Face3D f : mesh.faces) {
                      Vector3f v = mesh.calculateFaceNormal(f);
                      Vector3f v0 = new Vector3f(Mathf.round(v.getX()),
                              Mathf.round(v.getY()), Mathf.round(v.getZ()));
          Severity: Major
          Found in src/main/java/mesh/selection/FaceSelection.java and 2 other locations - About 1 hr to fix
          src/main/java/mesh/selection/FaceSelection.java on lines 273..282
          src/main/java/mesh/selection/FaceSelection.java on lines 295..304

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

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

              public void selectRightFaces() {
                  for (Face3D f : mesh.faces) {
                      Vector3f v = mesh.calculateFaceNormal(f);
                      Vector3f v0 = new Vector3f(Mathf.round(v.getX()),
                              Mathf.round(v.getY()), Mathf.round(v.getZ()));
          Severity: Major
          Found in src/main/java/mesh/selection/FaceSelection.java and 2 other locations - About 1 hr to fix
          src/main/java/mesh/selection/FaceSelection.java on lines 306..315
          src/main/java/mesh/selection/FaceSelection.java on lines 317..326

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

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

              public void selectFrontFaces() {
                  for (Face3D f : mesh.faces) {
                      Vector3f v = mesh.calculateFaceNormal(f);
                      Vector3f v0 = new Vector3f(Mathf.round(v.getX()),
                              Mathf.round(v.getY()), Mathf.round(v.getZ()));
          Severity: Major
          Found in src/main/java/mesh/selection/FaceSelection.java and 2 other locations - About 1 hr to fix
          src/main/java/mesh/selection/FaceSelection.java on lines 284..293
          src/main/java/mesh/selection/FaceSelection.java on lines 306..315

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

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

              public void selectBottomFaces() {
                  for (Face3D f : mesh.faces) {
                      Vector3f v = mesh.calculateFaceNormal(f);
                      Vector3f v0 = new Vector3f(Mathf.round(v.getX()),
                              Mathf.round(v.getY()), Mathf.round(v.getZ()));
          Severity: Major
          Found in src/main/java/mesh/selection/FaceSelection.java and 2 other locations - About 1 hr to fix
          src/main/java/mesh/selection/FaceSelection.java on lines 284..293
          src/main/java/mesh/selection/FaceSelection.java on lines 317..326

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

          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 selectInner() {
                  for (Face3D face : mesh.faces) {
                      Vector3f normal = mesh.calculateFaceNormal(face);
                      Vector3f v = mesh.getVertexAt(face.indices[0]);
                      if (normal.dot(v) < 0) {
          Severity: Minor
          Found in src/main/java/mesh/selection/FaceSelection.java and 1 other location - About 55 mins to fix
          src/main/java/mesh/selection/FaceSelection.java on lines 356..364

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

          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 selectOuter() {
                  for (Face3D face : mesh.faces) {
                      Vector3f normal = mesh.calculateFaceNormal(face);
                      Vector3f v = mesh.getVertexAt(face.indices[0]);
                      if (normal.dot(v) > 0) {
          Severity: Minor
          Found in src/main/java/mesh/selection/FaceSelection.java and 1 other location - About 55 mins to fix
          src/main/java/mesh/selection/FaceSelection.java on lines 366..374

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

          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 selectWithCenterXLessThan(float x) {
                  for (Face3D face : mesh.faces) {
                      Vector3f center = mesh.calculateFaceCenter(face);
                      if (center.getX() <= x) {
                          faceSet.add(face);
          Severity: Minor
          Found in src/main/java/mesh/selection/FaceSelection.java and 1 other location - About 40 mins to fix
          src/main/java/mesh/selection/FaceSelection.java on lines 221..228

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

          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 selectWithCenterYLessThan(float y) {
                  for (Face3D face : mesh.faces) {
                      Vector3f center = mesh.calculateFaceCenter(face);
                      if (center.getY() <= y) {
                          faceSet.add(face);
          Severity: Minor
          Found in src/main/java/mesh/selection/FaceSelection.java and 1 other location - About 40 mins to fix
          src/main/java/mesh/selection/FaceSelection.java on lines 230..237

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

          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

          There are no issues that match your filters.

          Category
          Status