ArtifactForms/MeshLibCore

View on GitHub

Showing 407 of 407 total issues

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

    float y0 = m.values[3] * x + m.values[4] * y + m.values[5] * z;
Severity: Major
Found in src/main/java/math/Vector3f.java and 5 other locations - About 35 mins to fix
src/main/java/math/Vector3f.java on lines 336..336
src/main/java/math/Vector3f.java on lines 338..338
src/main/java/math/Vector3f.java on lines 343..343
src/main/java/math/Vector3f.java on lines 344..344
src/main/java/math/Vector3f.java on lines 345..345

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

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

    float x0 = m.values[0] * x + m.values[1] * y + m.values[2] * z;
Severity: Major
Found in src/main/java/math/Vector3f.java and 5 other locations - About 35 mins to fix
src/main/java/math/Vector3f.java on lines 336..336
src/main/java/math/Vector3f.java on lines 337..337
src/main/java/math/Vector3f.java on lines 338..338
src/main/java/math/Vector3f.java on lines 344..344
src/main/java/math/Vector3f.java on lines 345..345

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

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

    float x0 = m.values[0] * x + m.values[1] * y + m.values[2] * z;
Severity: Major
Found in src/main/java/math/Vector3f.java and 5 other locations - About 35 mins to fix
src/main/java/math/Vector3f.java on lines 337..337
src/main/java/math/Vector3f.java on lines 338..338
src/main/java/math/Vector3f.java on lines 343..343
src/main/java/math/Vector3f.java on lines 344..344
src/main/java/math/Vector3f.java on lines 345..345

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

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

    float z0 = m.values[6] * x + m.values[7] * y + m.values[8] * z;
Severity: Major
Found in src/main/java/math/Vector3f.java and 5 other locations - About 35 mins to fix
src/main/java/math/Vector3f.java on lines 336..336
src/main/java/math/Vector3f.java on lines 337..337
src/main/java/math/Vector3f.java on lines 338..338
src/main/java/math/Vector3f.java on lines 343..343
src/main/java/math/Vector3f.java on lines 344..344

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

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

  public void draw(Mesh3D mesh, Color color) {
    p.pushStyle();
    vertices = mesh.vertices.size();
    faces = mesh.faces.size();

Severity: Minor
Found in src/main/java/workspace/Workspace.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 drawFacesFlat has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  private void drawFacesFlat(PGraphics3D context, Mesh3D mesh, Collection<Face3D> faces) {
    for (Face3D f : faces) {
      Vector3f v;

      // Use specific shape types based on face vertex count
Severity: Minor
Found in src/main/java/workspace/render/Mesh3DRenderer.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 subdivideFaces has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private void subdivideFaces() {
        for (Face3D f : mesh.faces) {
            int n = f.indices.length;
            int[] idxs = new int[f.indices.length + 1];
            Vector3f center = mesh.calculateFaceCenter(f);
Severity: Minor
Found in src/main/java/mesh/modifier/subdivision/PlanarMidEdgeCenterModifier.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 createExpressions has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private List<String> createExpressions() {
        List<String> result = new ArrayList<String>();
        List<String> toAdd = new ArrayList<String>();

        for (String s : operations) {
Severity: Minor
Found in src/main/java/mesh/conway/ConwayVariationSystem.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 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 modify has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public Mesh3D modify(Mesh3D mesh) {
        for (Face3D face : mesh.faces) {
            int n = face.indices.length;
            for (int i = 0; i < face.indices.length; i++) {
Severity: Minor
Found in src/main/java/mesh/modifier/SmoothModifier.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 drawMeshFaces has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  private void drawMeshFaces(Mesh3D mesh) {
    //    g.beginShape(PApplet.TRIANGLES);
    //    for (Face3D f : mesh.getFaces()) {
    //      for (int index : f.indices) {
    //        Vector3f v = mesh.vertices.get(index);
Severity: Minor
Found in src/main/java/workspace/GraphicsPImpl.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

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

    public BeamTProfileCreator() {
        height = 0.85f;
        width = 0.5f;
        depth = 2.0f;
        thickness = 0.1f;
Severity: Major
Found in src/main/java/mesh/creator/beam/BeamTProfileCreator.java and 6 other locations - About 35 mins to fix
src/main/java/mesh/creator/assets/ModularKitDoorSegmentCreator.java on lines 25..31
src/main/java/mesh/creator/beam/BeamCProfileCreator.java on lines 22..28
src/main/java/mesh/creator/beam/BeamIProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamLProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamOProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamUProfileCreator.java on lines 23..29

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

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

    public BeamCProfileCreator() {
        height = 0.85f;
        width = 0.5f;
        depth = 2.0f;
        thickness = 0.1f;
Severity: Major
Found in src/main/java/mesh/creator/beam/BeamCProfileCreator.java and 6 other locations - About 35 mins to fix
src/main/java/mesh/creator/assets/ModularKitDoorSegmentCreator.java on lines 25..31
src/main/java/mesh/creator/beam/BeamIProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamLProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamOProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamTProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamUProfileCreator.java on lines 23..29

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

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

    public BeamOProfileCreator() {
        height = 0.85f;
        width = 0.5f;
        depth = 2.0f;
        thickness = 0.1f;
Severity: Major
Found in src/main/java/mesh/creator/beam/BeamOProfileCreator.java and 6 other locations - About 35 mins to fix
src/main/java/mesh/creator/assets/ModularKitDoorSegmentCreator.java on lines 25..31
src/main/java/mesh/creator/beam/BeamCProfileCreator.java on lines 22..28
src/main/java/mesh/creator/beam/BeamIProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamLProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamTProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamUProfileCreator.java on lines 23..29

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

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 GemCreator() {
        segments = 8;
        pavillionRadius = 1;
        tableRadius = 0.6f;
        tableHeight = 0.35f;
Severity: Minor
Found in src/main/java/mesh/creator/special/GemCreator.java and 2 other locations - About 35 mins to fix
src/main/java/mesh/creator/special/DiamondCreator.java on lines 21..27
src/main/java/mesh/creator/special/HoneyCombCreator.java on lines 27..33

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

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

    public BeamIProfileCreator() {
        height = 0.85f;
        width = 0.5f;
        depth = 2.0f;
        thickness = 0.1f;
Severity: Major
Found in src/main/java/mesh/creator/beam/BeamIProfileCreator.java and 6 other locations - About 35 mins to fix
src/main/java/mesh/creator/assets/ModularKitDoorSegmentCreator.java on lines 25..31
src/main/java/mesh/creator/beam/BeamCProfileCreator.java on lines 22..28
src/main/java/mesh/creator/beam/BeamLProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamOProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamTProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamUProfileCreator.java on lines 23..29

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

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

    public BeamLProfileCreator() {
        height = 0.85f;
        width = 0.5f;
        depth = 2.0f;
        thickness = 0.1f;
Severity: Major
Found in src/main/java/mesh/creator/beam/BeamLProfileCreator.java and 6 other locations - About 35 mins to fix
src/main/java/mesh/creator/assets/ModularKitDoorSegmentCreator.java on lines 25..31
src/main/java/mesh/creator/beam/BeamCProfileCreator.java on lines 22..28
src/main/java/mesh/creator/beam/BeamIProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamOProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamTProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamUProfileCreator.java on lines 23..29

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

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

    public ModularKitDoorSegmentCreator() {
        doorWidth = 1.0f;
        doorHeight = 2.0f;
        segmentWidth = 2.0f;
        segmentHeight = 3.0f;
src/main/java/mesh/creator/beam/BeamCProfileCreator.java on lines 22..28
src/main/java/mesh/creator/beam/BeamIProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamLProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamOProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamTProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamUProfileCreator.java on lines 23..29

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

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

    public BeamUProfileCreator() {
        height = 0.85f;
        width = 0.5f;
        depth = 2.0f;
        thickness = 0.1f;
Severity: Major
Found in src/main/java/mesh/creator/beam/BeamUProfileCreator.java and 6 other locations - About 35 mins to fix
src/main/java/mesh/creator/assets/ModularKitDoorSegmentCreator.java on lines 25..31
src/main/java/mesh/creator/beam/BeamCProfileCreator.java on lines 22..28
src/main/java/mesh/creator/beam/BeamIProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamLProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamOProfileCreator.java on lines 23..29
src/main/java/mesh/creator/beam/BeamTProfileCreator.java on lines 23..29

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

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 HoneyCombCreator() {
        rowCount = 2;
        colCount = 2;
        cellRadius = 0.5f;
        height = 0.2f;
Severity: Minor
Found in src/main/java/mesh/creator/special/HoneyCombCreator.java and 2 other locations - About 35 mins to fix
src/main/java/mesh/creator/special/DiamondCreator.java on lines 21..27
src/main/java/mesh/creator/special/GemCreator.java on lines 23..29

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

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