DeflatedPickle/FAOSDance

View on GitHub

Showing 178 of 178 total issues

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

        this.addWindowListener(object : WindowAdapter() {
            override fun windowClosing(e: WindowEvent) {
                UpdateUtil.updateDialog = null
            }
        })
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/SettingsDialog.kt on lines 43..47

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

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

            isSelected = GlobalValues.optionsMap.getMap("reflection")!!.getOption<Boolean>("visible")!!
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/SpriteCategory.kt on lines 95..95
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/SpriteCategory.kt on lines 200..200
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/StreamerModeCategory.kt on lines 21..21
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/WindowCategory.kt on lines 22..22
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/WindowCategory.kt on lines 33..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 71.

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

            isSelected = GlobalValues.optionsMap.getMap("window")!!.getOption<Boolean>("always_on_top")!!
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/ReflectionCategory.kt on lines 27..27
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/SpriteCategory.kt on lines 95..95
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/SpriteCategory.kt on lines 200..200
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/StreamerModeCategory.kt on lines 21..21
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/WindowCategory.kt on lines 22..22

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

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

            isSelected = GlobalValues.optionsMap.getMap("sprite")!!.getOption<Boolean>("toggle_held")!!
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/ReflectionCategory.kt on lines 27..27
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/SpriteCategory.kt on lines 95..95
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/StreamerModeCategory.kt on lines 21..21
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/WindowCategory.kt on lines 22..22
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/WindowCategory.kt on lines 33..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 71.

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

            isSelected = GlobalValues.optionsMap.getMap("streamer_mode")!!.getOption<Boolean>("enabled")!!
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/ReflectionCategory.kt on lines 27..27
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/SpriteCategory.kt on lines 95..95
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/SpriteCategory.kt on lines 200..200
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/WindowCategory.kt on lines 22..22
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/WindowCategory.kt on lines 33..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 71.

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

            isSelected = GlobalValues.optionsMap.getMap("sprite")!!.getOption<Boolean>("visible")!!
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/ReflectionCategory.kt on lines 27..27
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/SpriteCategory.kt on lines 200..200
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/StreamerModeCategory.kt on lines 21..21
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/WindowCategory.kt on lines 22..22
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/WindowCategory.kt on lines 33..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 71.

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

            isSelected = GlobalValues.optionsMap.getMap("window")!!.getOption<Boolean>("solid")!!
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/ReflectionCategory.kt on lines 27..27
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/SpriteCategory.kt on lines 95..95
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/SpriteCategory.kt on lines 200..200
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/StreamerModeCategory.kt on lines 21..21
src/main/kotlin/com/deflatedpickle/faosdance/gui/settings/general/WindowCategory.kt on lines 33..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 71.

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

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

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

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

Refactorings

Further Reading

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

        parent.add(slider, GridBagConstraints().apply {
            fill = GridBagConstraints.HORIZONTAL
            weightx = 1.0
        })
src/main/kotlin/com/deflatedpickle/faosdance/util/GlobalValues.kt on lines 400..403

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

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

        val highSpinner = JSpinner(
            SpinnerNumberModel(
                highValue.toDouble(),
                minNumber.toDouble(),
                maxNumber.toDouble(),
src/main/kotlin/com/deflatedpickle/faosdance/util/GlobalValues.kt on lines 356..363
src/main/kotlin/com/deflatedpickle/faosdance/util/GlobalValues.kt on lines 442..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 68.

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

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

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

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

Refactorings

Further Reading

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

        parent.add(slider, GridBagConstraints().apply {
            fill = GridBagConstraints.HORIZONTAL
            weightx = 1.0
        })
src/main/kotlin/com/deflatedpickle/faosdance/util/GlobalValues.kt on lines 517..520

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

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

        val spinner = JSpinner(
            SpinnerNumberModel(
                defaultValue.toDouble(),
                minNumber.toDouble(),
                maxNumber.toDouble(),
src/main/kotlin/com/deflatedpickle/faosdance/util/GlobalValues.kt on lines 442..449
src/main/kotlin/com/deflatedpickle/faosdance/util/GlobalValues.kt on lines 451..458

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

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

        val lowSpinner = JSpinner(
            SpinnerNumberModel(
                lowValue.toDouble(),
                minNumber.toDouble(),
                maxNumber.toDouble(),
src/main/kotlin/com/deflatedpickle/faosdance/util/GlobalValues.kt on lines 356..363
src/main/kotlin/com/deflatedpickle/faosdance/util/GlobalValues.kt on lines 451..458

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

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 createOptionDouble has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public static Triple<JButton, JSlider, JSpinner> createOptionDouble(Container parent, String name, Double defaultNumber, Double maxNumber, Double minNumber) {
Severity: Minor
Found in src/main/java/com/deflatedpickle/faosdance/FAOSDanceSettings.java - About 35 mins to fix

    Method createOptionInteger has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public static Triple<JButton, JSlider, JSpinner> createOptionInteger(Container parent, String name, Integer defaultNumber, Integer maxNumber, Integer minNumber) {
    Severity: Minor
    Found in src/main/java/com/deflatedpickle/faosdance/FAOSDanceSettings.java - About 35 mins to fix

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

              JSeparator().apply {
                  this@ContextMenu.add(this)
                  trayItems.add(this)
              }
      Severity: Minor
      Found in src/main/kotlin/com/deflatedpickle/faosdance/gui/ContextMenu.kt and 1 other location - About 35 mins to fix
      src/main/kotlin/com/deflatedpickle/faosdance/gui/ContextMenu.kt on lines 45..48

      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

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

              JSeparator().apply {
                  this@ContextMenu.add(this)
                  trayItems.add(this)
              }
      Severity: Minor
      Found in src/main/kotlin/com/deflatedpickle/faosdance/gui/ContextMenu.kt and 1 other location - About 35 mins to fix
      src/main/kotlin/com/deflatedpickle/faosdance/gui/ContextMenu.kt on lines 27..30

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

              if (GlobalValues.optionsMap.getMap("reflection")!!.getOption<Boolean>("visible")!!) {
      src/main/kotlin/com/deflatedpickle/faosdance/gui/SpritePanel.kt on lines 111..111
      src/main/kotlin/com/deflatedpickle/faosdance/gui/SpritePanel.kt on lines 155..155
      src/main/kotlin/com/deflatedpickle/faosdance/main.kt on lines 71..71

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

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

              if (GlobalValues.optionsMap.getMap("sprite")!!.getOption<Boolean>("visible")!!) {
      src/main/kotlin/com/deflatedpickle/faosdance/gui/SpritePanel.kt on lines 101..101
      src/main/kotlin/com/deflatedpickle/faosdance/gui/SpritePanel.kt on lines 155..155
      src/main/kotlin/com/deflatedpickle/faosdance/main.kt on lines 71..71

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

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

              if (GlobalValues.optionsMap.getMap("reflection")!!.getOption<Boolean>("visible")!!) {
      src/main/kotlin/com/deflatedpickle/faosdance/gui/SpritePanel.kt on lines 101..101
      src/main/kotlin/com/deflatedpickle/faosdance/gui/SpritePanel.kt on lines 111..111
      src/main/kotlin/com/deflatedpickle/faosdance/main.kt on lines 71..71

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

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

              if (GlobalValues.optionsMap.getMap("settings")!!.getOption<Boolean>("open_on_start")!!) {
      Severity: Major
      Found in src/main/kotlin/com/deflatedpickle/faosdance/main.kt and 3 other locations - About 35 mins to fix
      src/main/kotlin/com/deflatedpickle/faosdance/gui/SpritePanel.kt on lines 101..101
      src/main/kotlin/com/deflatedpickle/faosdance/gui/SpritePanel.kt on lines 111..111
      src/main/kotlin/com/deflatedpickle/faosdance/gui/SpritePanel.kt on lines 155..155

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

      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