ArtifactForms/MeshLibCore

View on GitHub

Showing 407 of 407 total issues

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

    if (changeAmnt == 1) {
      this.x = finalVec.x;
      this.y = finalVec.y;
      this.z = finalVec.z;
      return this;
Severity: Major
Found in src/main/java/math/Vector3f.java and 2 other locations - About 40 mins to fix
src/main/java/math/Vector3f.java on lines 424..429
src/main/java/math/Vector3f.java on lines 437..442

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

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

    if (changeAmnt == 0) {
      this.x = beginVec.x;
      this.y = beginVec.y;
      this.z = beginVec.z;
      return this;
Severity: Major
Found in src/main/java/math/Vector3f.java and 2 other locations - About 40 mins to fix
src/main/java/math/Vector3f.java on lines 424..429
src/main/java/math/Vector3f.java on lines 443..448

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

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

    if (changeAmnt == 1) {
      this.x = finalVec.x;
      this.y = finalVec.y;
      this.z = finalVec.z;
      return this;
Severity: Major
Found in src/main/java/math/Vector3f.java and 2 other locations - About 40 mins to fix
src/main/java/math/Vector3f.java on lines 437..442
src/main/java/math/Vector3f.java on lines 443..448

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

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

  public MouseEvent(int mouseX, int mouseY, int previousMouseX, int previousMouseY) {
    this.mouseX = mouseX;
    this.mouseY = mouseY;
    this.previousMouseX = previousMouseX;
    this.previousMouseY = previousMouseY;
Severity: Major
Found in src/main/java/workspace/ui/event/MouseEvent.java and 4 other locations - About 40 mins to fix
src/main/java/math/Color.java on lines 92..97
src/main/java/mesh/creator/platonic/PlatonicSolid.java on lines 23..29
src/main/java/mesh/creator/primitives/GridCreator.java on lines 37..43
src/main/java/workspace/ui/Color.java on lines 46..51

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

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

    public GridCreator(int subdivisionsX, int subdivisionsZ, float tileSizeX,
            float tileSizeZ) {
        this.subdivisionsX = subdivisionsX;
        this.subdivisionsZ = subdivisionsZ;
        this.tileSizeX = tileSizeX;
Severity: Major
Found in src/main/java/mesh/creator/primitives/GridCreator.java and 4 other locations - About 40 mins to fix
src/main/java/math/Color.java on lines 92..97
src/main/java/mesh/creator/platonic/PlatonicSolid.java on lines 23..29
src/main/java/workspace/ui/Color.java on lines 46..51
src/main/java/workspace/ui/event/MouseEvent.java on lines 40..45

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

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

  private void updateOsMetrics() {
      setInfo(CATEGORY_OS, "Name", osBean.getName());
      setInfo(CATEGORY_OS, "Arch", osBean.getArch());
      setInfo(CATEGORY_OS, "Processors", osBean.getAvailableProcessors());
      setInfo(CATEGORY_OS, "Version", osBean.getVersion());
Severity: Minor
Found in src/main/java/engine/debug/DebugInfoUpdater.java and 1 other location - About 40 mins to fix
src/main/java/engine/debug/DebugInfoUpdater.java on lines 107..112

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

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

  private void updateSceneMetrics(Scene activeScene) {
    setInfo(CATEGORY_SCENE, "Scene", activeScene.getName());
    setInfo(CATEGORY_SCENE, "Root count", activeScene.getRootCount());
    setInfo(CATEGORY_SCENE, "Lights count", activeScene.getLightCount());
    setInfo(CATEGORY_SCENE, "Wireframe mode", activeScene.isWireframeMode());
Severity: Minor
Found in src/main/java/engine/debug/DebugInfoUpdater.java and 1 other location - About 40 mins to fix
src/main/java/engine/debug/DebugInfoUpdater.java on lines 95..100

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

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

    public Color(int red, int green, int blue, int alpha) {
        this.red = red;
        this.green = green;
        this.blue = blue;
        this.alpha = alpha;
Severity: Major
Found in src/main/java/workspace/ui/Color.java and 4 other locations - About 40 mins to fix
src/main/java/math/Color.java on lines 92..97
src/main/java/mesh/creator/platonic/PlatonicSolid.java on lines 23..29
src/main/java/mesh/creator/primitives/GridCreator.java on lines 37..43
src/main/java/workspace/ui/event/MouseEvent.java on lines 40..45

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

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

    private PlatonicSolid(int faceCount, int vertexCount, int edgeCount,
            String name) {
        this.faceCount = faceCount;
        this.vertexCount = vertexCount;
        this.edgeCount = edgeCount;
Severity: Major
Found in src/main/java/mesh/creator/platonic/PlatonicSolid.java and 4 other locations - About 40 mins to fix
src/main/java/math/Color.java on lines 92..97
src/main/java/mesh/creator/primitives/GridCreator.java on lines 37..43
src/main/java/workspace/ui/Color.java on lines 46..51
src/main/java/workspace/ui/event/MouseEvent.java on lines 40..45

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

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

  public Color(float r, float g, float b, float a) {
    this.r = r;
    this.g = g;
    this.b = b;
    this.a = a;
Severity: Major
Found in src/main/java/math/Color.java and 4 other locations - About 40 mins to fix
src/main/java/mesh/creator/platonic/PlatonicSolid.java on lines 23..29
src/main/java/mesh/creator/primitives/GridCreator.java on lines 37..43
src/main/java/workspace/ui/Color.java on lines 46..51
src/main/java/workspace/ui/event/MouseEvent.java on lines 40..45

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

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

    @Override
    public Mesh3D modify(Mesh3D mesh) {
        if (mesh == null) {
            throw new IllegalArgumentException("Mesh cannot be null.");
        }
Severity: Major
Found in src/main/java/mesh/modifier/RotateYModifier.java and 4 other locations - About 40 mins to fix
src/main/java/mesh/modifier/PushPullModifier.java on lines 57..68
src/main/java/mesh/modifier/RotateXModifier.java on lines 67..78
src/main/java/mesh/modifier/RotateZModifier.java on lines 67..78
src/main/java/mesh/modifier/ScaleModifier.java on lines 67..78

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

    @Override
    public Mesh3D modify(Mesh3D mesh) {
        if (mesh == null) {
            throw new IllegalArgumentException("Mesh cannot be null.");
        }
Severity: Major
Found in src/main/java/mesh/modifier/PushPullModifier.java and 4 other locations - About 40 mins to fix
src/main/java/mesh/modifier/RotateXModifier.java on lines 67..78
src/main/java/mesh/modifier/RotateYModifier.java on lines 67..78
src/main/java/mesh/modifier/RotateZModifier.java on lines 67..78
src/main/java/mesh/modifier/ScaleModifier.java on lines 67..78

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

    @Override
    public Mesh3D modify(Mesh3D mesh) {
        if (mesh == null) {
            throw new IllegalArgumentException("Mesh cannot be null.");
        }
Severity: Major
Found in src/main/java/mesh/modifier/ScaleModifier.java and 4 other locations - About 40 mins to fix
src/main/java/mesh/modifier/PushPullModifier.java on lines 57..68
src/main/java/mesh/modifier/RotateXModifier.java on lines 67..78
src/main/java/mesh/modifier/RotateYModifier.java on lines 67..78
src/main/java/mesh/modifier/RotateZModifier.java on lines 67..78

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

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

    @Override
    public Mesh3D modify(Mesh3D mesh) {
        if (mesh == null) {
            throw new IllegalArgumentException("Mesh cannot be null.");
        }
Severity: Major
Found in src/main/java/mesh/modifier/RotateZModifier.java and 4 other locations - About 40 mins to fix
src/main/java/mesh/modifier/PushPullModifier.java on lines 57..68
src/main/java/mesh/modifier/RotateXModifier.java on lines 67..78
src/main/java/mesh/modifier/RotateYModifier.java on lines 67..78
src/main/java/mesh/modifier/ScaleModifier.java on lines 67..78

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

    if (specular == null || specular.length < 3) {
      specular = new float[] {1.0f, 1.0f, 1.0f}; // Default specular
      System.err.println(
          "Warning: Material specular property is null or incomplete. Using default.");
    }
Severity: Minor
Found in src/main/java/workspace/GraphicsPImpl.java and 2 other locations - About 40 mins to fix
src/main/java/workspace/GraphicsPImpl.java on lines 435..439
src/main/java/workspace/GraphicsPImpl.java on lines 440..444

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

    if (diffuse == null || diffuse.length < 3) {
      diffuse = new float[] {1.0f, 1.0f, 1.0f}; // Default diffuse
      System.err.println(
          "Warning: Material diffuse property is null or incomplete. Using default.");
    }
Severity: Minor
Found in src/main/java/workspace/GraphicsPImpl.java and 2 other locations - About 40 mins to fix
src/main/java/workspace/GraphicsPImpl.java on lines 435..439
src/main/java/workspace/GraphicsPImpl.java on lines 445..449

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

    @Override
    public Mesh3D modify(Mesh3D mesh) {
        if (mesh == null) {
            throw new IllegalArgumentException("Mesh cannot be null.");
        }
Severity: Major
Found in src/main/java/mesh/modifier/RotateXModifier.java and 4 other locations - About 40 mins to fix
src/main/java/mesh/modifier/PushPullModifier.java on lines 57..68
src/main/java/mesh/modifier/RotateYModifier.java on lines 67..78
src/main/java/mesh/modifier/RotateZModifier.java on lines 67..78
src/main/java/mesh/modifier/ScaleModifier.java on lines 67..78

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

    if (ambient == null || ambient.length < 3) {
      ambient = new float[] {0.2f, 0.2f, 0.2f}; // Default ambient
      System.err.println(
          "Warning: Material ambient property is null or incomplete. Using default.");
    }
Severity: Minor
Found in src/main/java/workspace/GraphicsPImpl.java and 2 other locations - About 40 mins to fix
src/main/java/workspace/GraphicsPImpl.java on lines 440..444
src/main/java/workspace/GraphicsPImpl.java on lines 445..449

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

Severity
Category
Status
Source
Language