pasosdeJesus/sivel2_gen

View on GitHub

Showing 410 of 410 total issues

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

          def interpreta_ordenar_por(campo)
            critord = ""
            case campo.to_s
            when /^fechadesc/
              critord = "conscaso.fecha desc"
Severity: Major
Found in lib/sivel2_gen/concerns/models/consexpcaso.rb and 1 other location - About 1 hr to fix
lib/sivel2_gen/concerns/models/conscaso.rb on lines 343..362

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

                when 'sectorsocial'
                  ele[1].split(";").each do |sec|
                    sectorsocial = Sivel2Gen::Sectorsocial.where(nombre: sec)
                    if sectorsocial.count == 1
                      ss = Sivel2Gen::SectorsocialVictimacolectiva.new
Severity: Major
Found in lib/sivel2_gen/concerns/models/victimacolectiva.rb and 11 other locations - About 1 hr to fix
lib/sivel2_gen/concerns/models/victima.rb on lines 498..508
lib/sivel2_gen/concerns/models/victima.rb on lines 511..521
lib/sivel2_gen/concerns/models/victima.rb on lines 537..547
lib/sivel2_gen/concerns/models/victima.rb on lines 552..562
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 104..114
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 117..127
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 130..140
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 143..153
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 169..179
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 182..192
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 195..205

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

              when 'sectorsocialsec'
                ele[1].split(";").each do |sec|
                  sectorsocial = Sivel2Gen::Sectorsocial.where(nombre: sec)
                  if sectorsocial.count == 1
                    ss = Sivel2Gen::SectorsocialsecVictima.new
Severity: Major
Found in lib/sivel2_gen/concerns/models/victima.rb and 11 other locations - About 1 hr to fix
lib/sivel2_gen/concerns/models/victima.rb on lines 511..521
lib/sivel2_gen/concerns/models/victima.rb on lines 537..547
lib/sivel2_gen/concerns/models/victima.rb on lines 552..562
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 104..114
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 117..127
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 130..140
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 143..153
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 156..166
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 169..179
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 182..192
lib/sivel2_gen/concerns/models/victimacolectiva.rb on lines 195..205

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

          def interpreta_ordenar_por(campo)
            critord = ""
            case campo.to_s
            when /^fechadesc/
              critord = "sivel2_gen_conscaso.fecha desc"
Severity: Major
Found in lib/sivel2_gen/concerns/models/conscaso.rb and 1 other location - About 1 hr to fix
lib/sivel2_gen/concerns/models/consexpcaso.rb on lines 40..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

Method calcula_de_depmun has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

          def calcula_de_depmun(departamento_id, municipio_id)
            if departamento_id && 
                Sivel2Gen::DepartamentoRegion.where(
                  departamento_id: departamento_id).count > 0
              dr = Sivel2Gen::DepartamentoRegion.
Severity: Minor
Found in lib/sivel2_gen/concerns/models/region.rb - About 1 hr to fix

    Method nueva has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

              def nueva
                if params[:caso_id]
                  @casoetiqueta = Sivel2Gen::CasoEtiqueta.new
                  @casoetiqueta.caso_id = params[:caso_id]
                  @casoetiqueta.etiqueta_id = Msip::Etiqueta.count > 0 ? Msip::Etiqueta.take.id : 0
    Severity: Minor
    Found in lib/sivel2_gen/concerns/controllers/caso_etiquetas_controller.rb - About 1 hr to fix

      Method lista has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                def lista
                  if params[:tabla]
                    r = nil
                    if (params[:tabla] == "departamento" && params[:pais_id].to_i > 0)
                      r = Msip::Departamento.where(fechadeshabilitacion: nil,
      Severity: Minor
      Found in lib/sivel2_gen/concerns/controllers/casos_controller.rb - About 1 hr to fix

        Method embeber_mapacalormuncol_svg has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

              depid, depcad, titulo, subtitulo, titulorangos, fuente, 
              cantidadesmun, opciones = {})
        Severity: Major
        Found in app/helpers/sivel2_gen/vista_helper.rb - About 1 hr to fix

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

                    def personas_segun_tipico(tabla, nomtabla, que1, que3, tablas3, where3)
                      que1 = agregar_tabla(
                        que1, "victima.#{tabla}_id AS #{tabla}_id")
                      tablas3 = agregar_tabla(
                        tablas3, "public.sivel2_gen_#{tabla} AS #{tabla}")
          Severity: Minor
          Found in lib/sivel2_gen/concerns/controllers/conteos_controller.rb and 1 other location - About 55 mins to fix
          lib/sivel2_gen/concerns/controllers/graficar_conteo_controller.rb on lines 219..227

          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

                    def desagregarpor_tipico(tabla, nomtabla, que1, que3, tablas3, where3)
                      que1 = agregar_tabla(
                        que1, "victima.#{tabla}_id AS #{tabla}_id")
                      tablas3 = agregar_tabla(
                        tablas3, "public.sivel2_gen_#{tabla} AS #{tabla}")
          lib/sivel2_gen/concerns/controllers/conteos_controller.rb on lines 194..202

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 46.

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

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

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

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

          Refactorings

          Further Reading

          Method graficar_sexo has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

                  def graficar_sexo
                    series_gen= []
                    if (@vic_dep.count == 0) || (@vic_categorias.count == 0)
                      flash.now[:info] = "Uno de los filros se encuentra vacío"
                    else
          Severity: Minor
          Found in app/controllers/sivel2_gen/fil23_gen/graficar_apexcharts_controller.rb - About 55 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

          Method sin_identificacion has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

                    def sin_identificacion
                      if nombres == "N" && apellidos == "N"
                        caso = Sivel2Gen::Victima.where(persona_id: self.id)[0].caso_id
                        vics = Sivel2Gen::Victima.where(caso_id: caso)
                        hv = {}
          Severity: Minor
          Found in lib/sivel2_gen/concerns/models/persona.rb - About 55 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 2 locations. Consider refactoring.
          Open

                        col = actocolectivo.inject('') { 
                          |memo, a| 
                          r = (memo == '' ? '' : memo + '; ')
                          r += a.presponsable.nombre
                          r += " : " + a.categoria.supracategoria.tviolencia_id + 
          Severity: Minor
          Found in lib/sivel2_gen/concerns/models/caso.rb and 1 other location - About 55 mins to fix
          lib/sivel2_gen/concerns/models/caso.rb on lines 691..698

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 45.

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

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

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

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

          Refactorings

          Further Reading

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

                            genvic_tabla(
                              'Lesiones físicas', 
                              [
                                {"cat" => [23, 33],
                                 "titulo" => "Victimizaciones por `Lesión Física´ por Abuso de Autoridad e Intolerancia Social por agentes directos o indirectos del Estado (Violaciones a los Derechos Humanos)"},
          Severity: Minor
          Found in lib/sivel2_gen/concerns/controllers/conteos_controller.rb and 1 other location - About 55 mins to fix
          lib/sivel2_gen/concerns/controllers/conteos_controller.rb on lines 592..608

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 45.

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

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

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

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

          Refactorings

          Further Reading

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

                            genvic_tabla(
                              'Ejecuciones extrajudiciales, homicidios y asesinatos', 
                              [
                                {"cat" => [20, 30],
                                 "titulo" => "Víctimas de `Ejecución Extrajudicial´ por Abuso de Autoridad e Intolerancia Social por agentes directos o indirectos del Estado (Violaciones a los Derechos Humanos)"},
          Severity: Minor
          Found in lib/sivel2_gen/concerns/controllers/conteos_controller.rb and 1 other location - About 55 mins to fix
          lib/sivel2_gen/concerns/controllers/conteos_controller.rb on lines 646..661

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 45.

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

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

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

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

          Refactorings

          Further Reading

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

            module Concerns
              module Controllers
                module CasoPresponsablesController
                  extend ActiveSupport::Concern
          
          
          lib/sivel2_gen/concerns/controllers/caso_fotras_controller.rb on lines 2..28

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 45.

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

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

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

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

          Refactorings

          Further Reading

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

                        ac = acto.inject('') { 
                          |memo, a| 
                          r = (memo == '' ? '' : memo + '; ')
                          r += a.presponsable.nombre
                          r += " : " + a.categoria.supracategoria.tviolencia_id + 
          Severity: Minor
          Found in lib/sivel2_gen/concerns/models/caso.rb and 1 other location - About 55 mins to fix
          lib/sivel2_gen/concerns/models/caso.rb on lines 705..712

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 45.

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

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

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

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

          Refactorings

          Further Reading

          Method pestanas_formulariocaso has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

                    def pestanas_formulariocaso
                      #byebug
                      if current_usuario && can?(:solocambiaretiquetas, Sivel2Gen::Caso)
                        [
                          { titulo: 'Etiquetas', parcial: 'etiquetas'},
          Severity: Minor
          Found in lib/sivel2_gen/concerns/controllers/casos_controller.rb - About 55 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

          Method remplazar has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

                    def remplazar
                      @grupoper = Msip::Grupoper.find(params[:grupoper_id].to_i)
                      @caso = Sivel2Gen::Caso.find(params[:caso_id].to_i)
                      @vicol_posicion = params[:vicol_posicion].to_i
                      @caso.current_usuario = current_usuario
          Severity: Minor
          Found in lib/sivel2_gen/concerns/controllers/gruposper_controller.rb - About 55 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 2 locations. Consider refactoring.
          Open

            module Concerns
              module Controllers
                module CasoFotrasController
                  extend ActiveSupport::Concern
          
          
          Severity: Minor
          Found in lib/sivel2_gen/concerns/controllers/caso_fotras_controller.rb and 1 other location - About 55 mins to fix
          lib/sivel2_gen/concerns/controllers/caso_presponsables_controller.rb on lines 4..31

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 45.

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

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

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

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

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language