niwa99/Tower-Defense

View on GitHub

Showing 88 of 88 total issues

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

            } else {
                if (path[pathNumber].getX() < path[pathNumber + 1].getX()) {
                    if (path[pathNumber].getY() < path[pathNumber - 1].getY()) {
                        pathImage = Constants.DRAWABLE_PATH_RIGHT_DOWN;
                    } else {
Severity: Major
Found in app/src/main/java/de/dhbw/map/structure/MapStructure.java and 1 other location - About 1 hr to fix
app/src/main/java/de/dhbw/map/structure/MapStructure.java on lines 86..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 126.

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

            } else if (path[pathNumber].getY() == path[pathNumber - 1].getY()) {
                if (path[pathNumber].getY() < path[pathNumber + 1].getY()) {
                    if (path[pathNumber].getX() < path[pathNumber - 1].getX()) {
                        pathImage = Constants.DRAWABLE_PATH_RIGHT_DOWN;
                    } else {
Severity: Major
Found in app/src/main/java/de/dhbw/map/structure/MapStructure.java and 1 other location - About 1 hr to fix
app/src/main/java/de/dhbw/map/structure/MapStructure.java on lines 100..114

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

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

    public static int calculatePath(float xCoord, float yCoord) {

        int pathImage = DRAWABLE_PATH_HORIZONTAL;
        int pathNumber = getPathNumber(xCoord, yCoord);
        if (pathNumber != 0 && pathNumber != 20) {
Severity: Minor
Found in app/src/main/java/de/dhbw/map/structure/MapStructure.java - About 1 hr to fix

    Method startMusicPlayer has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public void startMusicPlayer(Activity activity){
            this.isStarted=true;
            if(timer!=null){
                timer.cancel();
                timerTask.cancel();
    Severity: Minor
    Found in app/src/main/java/de/dhbw/game/MusicPlayer.java - About 1 hr to fix

      Method move has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public boolean move(MapStructure map) {
              if (actualField == null) {
                  actualField = getEnemyField(map);
                  progress++;
                  moveToPosition(actualField.getSpawnPoint());
      Severity: Minor
      Found in app/src/main/java/de/dhbw/map/objects/enemy/AEnemy.java - About 1 hr to fix

        Method hitEnemy has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            @Override
            protected void hitEnemy() {
                super.hitEnemy();
        
                enemies.remove(targetEnemy);
        Severity: Minor
        Found in app/src/main/java/de/dhbw/map/objects/bullet/PlasmaBall.java - About 1 hr 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 slowEnemy has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            public void slowEnemy(AEnemy enemy){
                if(matchFieldTimer.isCanceled()){
                    return;
                }
                enemy.getTimerTask().cancel();
        Severity: Minor
        Found in app/src/main/java/de/dhbw/map/matchfield/MatchField.java - About 1 hr 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 buildTower has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public void buildTower(TowerType type, int level, Position pos) {
                if (subMoney(type.getPrice()) && getMapStructure().getField(pos).getFieldDescription() == FieldDescription.FREE) {
                    switch(type) {
                        case ARTILLERY:
                            TowerArtillery newArtillery = new TowerArtillery(getMapStructure().getField(pos), level, gameActivity);
        Severity: Minor
        Found in app/src/main/java/de/dhbw/game/Game.java - About 1 hr to fix

          Method move has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

              public boolean move(MapStructure map) {
                  if (actualField == null) {
                      actualField = getEnemyField(map);
                      progress++;
                      moveToPosition(actualField.getSpawnPoint());
          Severity: Minor
          Found in app/src/main/java/de/dhbw/map/objects/enemy/AEnemy.java - About 1 hr 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 doIntersect has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

              static boolean doIntersect(Position p1, Position q1, Position p2, Position q2) {
                  // Find the four orientations needed for general and
                  // special cases
                  int o1 = orientation(p1, q1, p2);
                  int o2 = orientation(p1, q1, q2);
          Severity: Minor
          Found in app/src/main/java/de/dhbw/map/objects/bullet/LaserRay.java - About 1 hr 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 initializeView has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public LinearLayout initializeView() {
          
                  LinearLayout layout = (LinearLayout) getLayoutInflater().inflate(R.layout.menu_upgrade_and_sell, null);
          
                  setHeader(towerType + " lvl " + level);
          Severity: Minor
          Found in app/src/main/java/de/dhbw/game/popups/MenuUpgradeAndSell.java - About 1 hr to fix

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

                        case 3:
                            starlvlThree = new ImageView(gameActivity);
                            starlvlThree.setImageResource(R.drawable.star);
                            starlvlThree.setX(field.getSpawnPoint().getX() + 50);
                            starlvlThree.setY(field.getSpawnPoint().getY());
            Severity: Minor
            Found in app/src/main/java/de/dhbw/map/objects/tower/ATower.java and 1 other location - About 55 mins to fix
            app/src/main/java/de/dhbw/map/objects/tower/ATower.java on lines 73..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 66.

            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

                        case 4:
                            starlvlFour = new ImageView(gameActivity);
                            starlvlFour.setImageResource(R.drawable.star);
                            starlvlFour.setX(field.getSpawnPoint().getX() + 100);
                            starlvlFour.setY(field.getSpawnPoint().getY());
            Severity: Minor
            Found in app/src/main/java/de/dhbw/map/objects/tower/ATower.java and 1 other location - About 55 mins to fix
            app/src/main/java/de/dhbw/map/objects/tower/ATower.java on lines 79..84

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

            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

            Avoid deeply nested control flow statements.
            Open

                                    if (spawn) {
                                        fieldDescription[i][j] = FieldDescription.SPAWN;
                                        spawn = false;
                                    } else {
                                        fieldDescription[i][j] = FieldDescription.PATH;
            Severity: Major
            Found in app/src/main/java/de/dhbw/map/structure/MapStructure.java - About 45 mins to fix

              Method getNearestEnemy has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  public AEnemy getNearestEnemy(Position actualPosition, List<AEnemy> enemies) {
                      if (!enemies.isEmpty()) {
                          Map<AEnemy, Integer> distanceToEnemy = new HashMap<>();
              
                          for (AEnemy enemy : enemies) {
              Severity: Minor
              Found in app/src/main/java/de/dhbw/map/objects/tower/ATower.java - About 45 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 21 locations. Consider refactoring.
              Open

                  public static int getTowerArtilleryCostsByLevel(int level) {
                      switch (level) {
                          case 1: return TOWER_ARTILLERY_LEVEL_1_COSTS;
                          case 2: return TOWER_ARTILLERY_LEVEL_2_COSTS;
                          case 3: return TOWER_ARTILLERY_LEVEL_3_COSTS;
              app/src/main/java/de/dhbw/map/objects/tower/TowerArtillery.java on lines 100..108
              app/src/main/java/de/dhbw/map/objects/tower/TowerArtillery.java on lines 115..123
              app/src/main/java/de/dhbw/map/objects/tower/TowerArtillery.java on lines 130..138
              app/src/main/java/de/dhbw/map/objects/tower/TowerBoombastic.java on lines 114..122
              app/src/main/java/de/dhbw/map/objects/tower/TowerBoombastic.java on lines 129..137
              app/src/main/java/de/dhbw/map/objects/tower/TowerBoombastic.java on lines 144..152
              app/src/main/java/de/dhbw/map/objects/tower/TowerBoombastic.java on lines 159..167
              app/src/main/java/de/dhbw/map/objects/tower/TowerFreezer.java on lines 129..137
              app/src/main/java/de/dhbw/map/objects/tower/TowerFreezer.java on lines 144..152
              app/src/main/java/de/dhbw/map/objects/tower/TowerFreezer.java on lines 159..167
              app/src/main/java/de/dhbw/map/objects/tower/TowerFreezer.java on lines 174..182
              app/src/main/java/de/dhbw/map/objects/tower/TowerFreezer.java on lines 189..197
              app/src/main/java/de/dhbw/map/objects/tower/TowerLaser.java on lines 97..105
              app/src/main/java/de/dhbw/map/objects/tower/TowerLaser.java on lines 117..125
              app/src/main/java/de/dhbw/map/objects/tower/TowerLaser.java on lines 137..145
              app/src/main/java/de/dhbw/map/objects/tower/TowerLaser.java on lines 157..165
              app/src/main/java/de/dhbw/map/objects/tower/TowerPlasmarizer.java on lines 91..99
              app/src/main/java/de/dhbw/map/objects/tower/TowerPlasmarizer.java on lines 106..114
              app/src/main/java/de/dhbw/map/objects/tower/TowerPlasmarizer.java on lines 121..129
              app/src/main/java/de/dhbw/map/objects/tower/TowerPlasmarizer.java on lines 136..144

              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

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

                              case BOSS_TANK:
                                  for (int i = 0; i < wave.getAmount(); i++) {
                                      addEnemy(new BossTank(wave.getEnemyType().getLabel(), wave.getLevel(), gameActivity));
                                  }
                                  break;
              Severity: Major
              Found in app/src/main/java/de/dhbw/game/wave/Wave.java and 3 other locations - About 35 mins to fix
              app/src/main/java/de/dhbw/game/wave/Wave.java on lines 29..33
              app/src/main/java/de/dhbw/game/wave/Wave.java on lines 34..38
              app/src/main/java/de/dhbw/game/wave/Wave.java on lines 39..43

              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

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

                              case ASSAULTLASER:
                                  TowerLaser newAssaultLaser = new TowerLaser(getMapStructure().getField(pos), level, gameActivity);
                                  getMatchField().addTower(newAssaultLaser);
                                  getMapStructure().getField(pos).setFieldDescription(FieldDescription.TOWER);
                                  break;
              Severity: Major
              Found in app/src/main/java/de/dhbw/game/Game.java and 4 other locations - About 35 mins to fix
              app/src/main/java/de/dhbw/game/Game.java on lines 257..261
              app/src/main/java/de/dhbw/game/Game.java on lines 262..266
              app/src/main/java/de/dhbw/game/Game.java on lines 267..271
              app/src/main/java/de/dhbw/game/Game.java on lines 272..276

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

                  public static int getTowerBoombasticCostsByLevel(int level) {
                      switch (level) {
                          case 1: return TOWER_BOOMBASTIC_LEVEL_1_COSTS;
                          case 2: return TOWER_BOOMBASTIC_LEVEL_2_COSTS;
                          case 3: return TOWER_BOOMBASTIC_LEVEL_3_COSTS;
              app/src/main/java/de/dhbw/map/objects/tower/TowerArtillery.java on lines 85..93
              app/src/main/java/de/dhbw/map/objects/tower/TowerArtillery.java on lines 100..108
              app/src/main/java/de/dhbw/map/objects/tower/TowerArtillery.java on lines 115..123
              app/src/main/java/de/dhbw/map/objects/tower/TowerArtillery.java on lines 130..138
              app/src/main/java/de/dhbw/map/objects/tower/TowerBoombastic.java on lines 129..137
              app/src/main/java/de/dhbw/map/objects/tower/TowerBoombastic.java on lines 144..152
              app/src/main/java/de/dhbw/map/objects/tower/TowerBoombastic.java on lines 159..167
              app/src/main/java/de/dhbw/map/objects/tower/TowerFreezer.java on lines 129..137
              app/src/main/java/de/dhbw/map/objects/tower/TowerFreezer.java on lines 144..152
              app/src/main/java/de/dhbw/map/objects/tower/TowerFreezer.java on lines 159..167
              app/src/main/java/de/dhbw/map/objects/tower/TowerFreezer.java on lines 174..182
              app/src/main/java/de/dhbw/map/objects/tower/TowerFreezer.java on lines 189..197
              app/src/main/java/de/dhbw/map/objects/tower/TowerLaser.java on lines 97..105
              app/src/main/java/de/dhbw/map/objects/tower/TowerLaser.java on lines 117..125
              app/src/main/java/de/dhbw/map/objects/tower/TowerLaser.java on lines 137..145
              app/src/main/java/de/dhbw/map/objects/tower/TowerLaser.java on lines 157..165
              app/src/main/java/de/dhbw/map/objects/tower/TowerPlasmarizer.java on lines 91..99
              app/src/main/java/de/dhbw/map/objects/tower/TowerPlasmarizer.java on lines 106..114
              app/src/main/java/de/dhbw/map/objects/tower/TowerPlasmarizer.java on lines 121..129
              app/src/main/java/de/dhbw/map/objects/tower/TowerPlasmarizer.java on lines 136..144

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

                          if (path[pathNumber].getX() == path[pathNumber - 1].getX() && path[pathNumber].getX() == path[pathNumber + 1].getX()) {
              Severity: Minor
              Found in app/src/main/java/de/dhbw/map/structure/MapStructure.java and 1 other location - About 35 mins to fix
              app/src/main/java/de/dhbw/map/structure/MapStructure.java on lines 84..84

              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

              Severity
              Category
              Status
              Source
              Language