ImpressCMS/impresscms

View on GitHub

Showing 47,251 of 47,256 total issues

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

    if ($dbVersion < $newDbVersion) {
        $configitem_handler = icms::handler('icms_config_item');
        // fetch the rss_local configitem
        $criteria = new icms_db_criteria_Compo ( );
        $criteria->add ( new icms_db_criteria_Item ( 'conf_name', 'rss_local' ) );
Severity: Major
Found in htdocs/modules/system/include/update-to-112.php and 1 other location - About 5 hrs to fix
htdocs/modules/system/include/update-to-112.php on lines 243..257

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

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 ($dbVersion < $newDbVersion) {
        $configitem_handler = icms::handler('icms_config_item');
        // fetch the rss_local configitem
        $criteria = new icms_db_criteria_Compo ( );
        $criteria->add ( new icms_db_criteria_Item ( 'conf_name', 'google_analytics' ) );
Severity: Major
Found in htdocs/modules/system/include/update-to-112.php and 1 other location - About 5 hrs to fix
htdocs/modules/system/include/update-to-112.php on lines 149..163

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

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

File cp_functions.php has 388 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
// $Id: cp_functions.php 12313 2013-09-15 21:14:35Z skenow $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
Severity: Minor
Found in htdocs/include/cp_functions.php - About 5 hrs to fix

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

                    case 'textsarea' :
                        if ($config[$i]->getVar('conf_valuetype') == 'array') {
                            // this is exceptional.. only when value type is arrayneed a smarter way for this
                            $ele =($config[$i]->getVar('conf_value') != '') ? new icms_form_elements_Textarea($title, $config[$i]->getVar('conf_name'), icms_core_DataFilter::htmlSpecialChars(implode('|', $config[$i]->getConfValueForOutput())), 5, 50) : new icms_form_elements_Textarea($title, $config[$i]->getVar('conf_name'), '', 5, 50);
                        } else {
    Severity: Major
    Found in htdocs/modules/system/admin/preferences/main.php and 1 other location - About 5 hrs to fix
    htdocs/modules/system/admin/preferences/main.php on lines 455..462

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

    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 'textarea' :
                        if ($config[$i]->getVar('conf_valuetype') == 'array') {
                            // this is exceptional.. only when value type is array need a smarter way for this
                            $ele =($config[$i]->getVar('conf_value') != '') ? new icms_form_elements_Textarea($title, $config[$i]->getVar('conf_name'), icms_core_DataFilter::htmlSpecialChars(implode('|', $config[$i]->getConfValueForOutput())), 5, 50) : new icms_form_elements_Textarea($title, $config[$i]->getVar('conf_name'), '', 5, 50);
                        } else {
    Severity: Major
    Found in htdocs/modules/system/admin/preferences/main.php and 1 other location - About 5 hrs to fix
    htdocs/modules/system/admin/preferences/main.php on lines 446..453

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

    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

    Function Serializers has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

    Form.Element.Serializers = (function() {
        function input(element, value) {
            switch (element.type.toLowerCase()) {
                case 'checkbox':
                case 'radio':
    Severity: Minor
    Found in htdocs/install/prototype.js - About 5 hrs 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

    Function icms_wordwrap has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

    function icms_wordwrap($str, $width, $break = '/n', $cut = false)
    {
        if(strtolower(_CHARSET) !== 'utf-8')
        {
            $str = wordwrap($str, $width, $break, $cut);
    Severity: Minor
    Found in htdocs/include/functions.php - About 5 hrs 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

    Function imanager_listimg has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

    function imanager_listimg($imgcat_id, $start = 0) {
        global $icmsTpl, $target, $type, $query, $limit;
    
        if (!is_object(icms::$user)) {
            $groups = array(ICMS_GROUP_ANONYMOUS);
    Severity: Minor
    Found in htdocs/modules/system/admin/images/browser.php - About 5 hrs 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

    Function imanager_listimg has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

    function imanager_listimg($imgcat_id, $start = 0) {
        global $icmsAdminTpl, $query, $limit;
    
        if (!is_object(icms::$user)) {
            $groups = array(ICMS_GROUP_ANONYMOUS);
    Severity: Minor
    Found in htdocs/modules/system/admin/images/main.php - About 5 hrs 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

    Function imanager_delcatok has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

    function imanager_delcatok($imgcat_id) {
        if (!icms::$security->check()) {
            redirect_header('admin.php?fct=images', 3, implode('<br />', icms::$security->getErrors()));
        }
    
    
    Severity: Minor
    Found in htdocs/modules/system/admin/images/main.php - About 5 hrs 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 jdate has 125 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function jdate($type,$maket='now') {
        global $icmsConfig;
        icms_loadLanguageFile('core', 'calendar');
        $result='';
        if ($maket=='now') {
    Severity: Major
    Found in htdocs/include/jalali.php - About 5 hrs to fix

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

                              if ($icmsConfigSearch['search_user_date']) {
                                  $results[$i]['uid'] = @ (int) $results[$i]['uid'];
                                  if (!empty($results[$i]['uid'])) {
                                      $uname = icms_member_user_Object::getUnameFromId($results[$i]['uid']);
                                      $results[$i]['processed_user_name'] = $uname;
      Severity: Major
      Found in htdocs/search.php and 1 other location - About 4 hrs to fix
      htdocs/search.php on lines 300..308

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

      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

                      if ($icmsConfigSearch['search_user_date']) {
                          $results[$i]['uid'] = @ (int) $results[$i]['uid'];
                          if (!empty($results[$i]['uid'])) {
                              $uname = icms_member_user_Object::getUnameFromId($results[$i]['uid']);
                              $results[$i]['processed_user_name'] = $uname;
      Severity: Major
      Found in htdocs/search.php and 1 other location - About 4 hrs to fix
      htdocs/search.php on lines 236..244

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

      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

      Function check_dos_attack has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
      Open

          function check_dos_attack($uid = 0, $can_ban = false) {
              if ($this->_done_dos) return true;
      
              $ip4sql = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP);
              $uri4sql = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_STRING);

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

                  case 'D':
                      $result1=date('D',$need);
                      if ($result1=='Sat') $result1=_CAL_SAT;
                      else if ($result1=='Sun') $result1=_CAL_SUN;
                      else if ($result1=='Mon') $result1=_CAL_MON;
      Severity: Major
      Found in htdocs/include/jalali.php and 1 other location - About 4 hrs to fix
      htdocs/include/jalali.php on lines 314..324

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

      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 'l':
                      $result1=date('l',$need);
                      if ($result1=='Saturday') $result1=_CAL_SATURDAY;
                      else if ($result1=='Sunday') $result1=_CAL_SUNDAY;
                      else if ($result1=='Monday') $result1=_CAL_MONDAY;
      Severity: Major
      Found in htdocs/include/jalali.php and 1 other location - About 4 hrs to fix
      htdocs/include/jalali.php on lines 280..290

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

      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 'textarea' :
                          if ($config[$i]->getVar('conf_valuetype') == 'array') {
                              // this is exceptional.. only when value type is array, need a smarter way for this
                              $ele =($config[$i]->getVar('conf_value') != '')
                                  ? new icms_form_elements_Textarea($title, $config[$i]->getVar('conf_name'), icms_core_DataFilter::htmlSpecialChars(implode('|', $config[$i]->getConfValueForOutput())), 5, 50)
      Severity: Major
      Found in htdocs/modules/system/admin/preferences/main.php and 1 other location - About 4 hrs to fix
      htdocs/modules/system/admin/preferences/main.php on lines 117..126

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

      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 'textsarea' :
                          if ($config[$i]->getVar('conf_valuetype') == 'array') {
                              // this is exceptional.. only when value type is array, need a smarter way for this
                              $ele =($config[$i]->getVar('conf_value') != '')
                                  ? new icms_form_elements_Textarea($title, $config[$i]->getVar('conf_name'), icms_core_DataFilter::htmlSpecialChars(implode('|', $config[$i]->getConfValueForOutput())), 5, 50)
      Severity: Major
      Found in htdocs/modules/system/admin/preferences/main.php and 1 other location - About 4 hrs to fix
      htdocs/modules/system/admin/preferences/main.php on lines 128..137

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

      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

          switch ($vars['DB_TYPE']) {
              case 'mysql':
                  $func_connect = empty($vars['DB_PCONNECT'])?"mysql_connect":"mysql_pconnect";
                  if (!($link = @$func_connect($vars['DB_HOST'], $vars['DB_USER'], $vars['DB_PASS'], true))) {
                      $error = ERR_NO_DBCONNECTION;
      Severity: Major
      Found in htdocs/install/page_dbconnection.php and 1 other location - About 4 hrs to fix
      htdocs/install/page_dbsettings.php on lines 31..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 177.

      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

      switch ($vars['DB_TYPE']) {
          case 'mysql':
              $func_connect = empty($vars['DB_PCONNECT'])?"mysql_connect":"mysql_pconnect";
              if (!($link = @$func_connect($vars['DB_HOST'], $vars['DB_USER'], $vars['DB_PASS'], true))) {
                  $error = ERR_NO_DBCONNECTION;
      Severity: Major
      Found in htdocs/install/page_dbsettings.php and 1 other location - About 4 hrs to fix
      htdocs/install/page_dbconnection.php on lines 49..69

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

      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