Enegrecer/enegrecer-web

View on GitHub

Showing 357 of 357 total issues

Function colaboradores has 207 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function colaboradores() {
  return [
    {
      nome: 'Adriana Höher',
      papel: 'DEVa',
Severity: Major
Found in src/components/sobrePortal/colaboradores.js - About 1 day to fix

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

      componentWillReceiveProps(nextProps) {
        const { values, active } = nextProps.formDenuncia;
        const mapVitimaParaDenunciante = {
          nomeVitima: 'nomeDenunciante',
          dataNascimentoVitima: 'dataNascimentoDenunciante',
    Severity: Major
    Found in src/components/denuncias/vitima/NovaVitimaForm.js and 1 other location - About 7 hrs to fix
    src/components/denuncias/denunciante/DenuncianteForm.js on lines 14..38

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

    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

      componentWillReceiveProps(nextProps) {
        const { values, active } = nextProps.formDenuncia;
        const mapDenuncianteParaVitima = {
          nomeDenunciante: 'nomeVitima',
          dataNascimentoDenunciante: 'dataNascimentoVitima',
    Severity: Major
    Found in src/components/denuncias/denunciante/DenuncianteForm.js and 1 other location - About 7 hrs to fix
    src/components/denuncias/vitima/NovaVitimaForm.js on lines 13..37

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

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

    function detalhesOuCarregamento(denuncia) {
      const { denunciante, agressor, vitima } = denuncia.pessoasEnvolvidas;
      let componente;
    
      if (denuncia) {
    Severity: Major
    Found in src/components/visualizarDenuncia/VisualizarDenuncia.js - About 7 hrs to fix

      Function detalhesOuCarregamento has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
      Open

      function detalhesOuCarregamento(denuncia) {
        const { denunciante, agressor, vitima } = denuncia.pessoasEnvolvidas;
        let componente;
      
        if (denuncia) {
      Severity: Minor
      Found in src/components/visualizarDenuncia/VisualizarDenuncia.js - About 7 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

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

            camposEsquerda: [
              {
                id: 1,
                titulo: 'Nome',
                descricao: denuncia ? `${agressor.nome}` : ''
      Severity: Major
      Found in src/components/visualizarDenuncia/VisualizarDenuncia.js and 3 other locations - About 3 hrs to fix
      src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 42..58
      src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 64..80
      src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 81..97

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

      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

            camposDireita: [
              {
                id: 1,
                titulo: 'Email',
                descricao: denuncia ? `${denunciante.email}` : ''
      Severity: Major
      Found in src/components/visualizarDenuncia/VisualizarDenuncia.js and 3 other locations - About 3 hrs to fix
      src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 64..80
      src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 81..97
      src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 132..148

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

      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

            camposEsquerda: [
              {
                id: 1,
                titulo: 'Nome',
                descricao: denuncia ? `${vitima.nome}` : ''
      Severity: Major
      Found in src/components/visualizarDenuncia/VisualizarDenuncia.js and 3 other locations - About 3 hrs to fix
      src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 42..58
      src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 81..97
      src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 132..148

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

      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

            camposDireita: [
              {
                id: 1,
                titulo: 'Data de nascimento',
                descricao: denuncia ? `${vitima.dataNascimento}` : ''
      Severity: Major
      Found in src/components/visualizarDenuncia/VisualizarDenuncia.js and 3 other locations - About 3 hrs to fix
      src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 42..58
      src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 64..80
      src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 132..148

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

      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

      DenuncianteForm.propTypes = {
        formDenuncia: PropTypes.shape({
          values: PropTypes.shape({
            nomeDenunciante: PropTypes.string,
            telefoneDenunciante: PropTypes.string,
      Severity: Major
      Found in src/components/denuncias/denunciante/DenuncianteForm.js and 1 other location - About 3 hrs to fix
      src/components/denuncias/vitima/NovaVitimaForm.js on lines 140..153

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

      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

      NovaVitimaForm.propTypes = {
        formDenuncia: PropTypes.shape({
          values: PropTypes.shape({
            nomeDenunciante: PropTypes.string,
            telefoneDenunciante: PropTypes.string,
      Severity: Major
      Found in src/components/denuncias/vitima/NovaVitimaForm.js and 1 other location - About 3 hrs to fix
      src/components/denuncias/denunciante/DenuncianteForm.js on lines 98..111

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

      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

            <div className="spinner-layer spinner-yellow">
              <div className="circle-clipper left">
                <div className="circle" />
              </div>
              <div className="gap-patch">
      Severity: Major
      Found in src/components/comum/carregamento/Carregamento.js and 2 other locations - About 3 hrs to fix
      src/components/comum/carregamento/Carregamento.js on lines 6..16
      src/components/comum/carregamento/Carregamento.js on lines 28..38

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

      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

            <div className="spinner-layer spinner-green">
              <div className="circle-clipper left">
                <div className="circle" />
              </div>
              <div className="gap-patch">
      Severity: Major
      Found in src/components/comum/carregamento/Carregamento.js and 2 other locations - About 3 hrs to fix
      src/components/comum/carregamento/Carregamento.js on lines 17..27
      src/components/comum/carregamento/Carregamento.js on lines 28..38

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

      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

            <div className="spinner-layer spinner-red">
              <div className="circle-clipper left">
                <div className="circle" />
              </div>
              <div className="gap-patch">
      Severity: Major
      Found in src/components/comum/carregamento/Carregamento.js and 2 other locations - About 3 hrs to fix
      src/components/comum/carregamento/Carregamento.js on lines 6..16
      src/components/comum/carregamento/Carregamento.js on lines 17..27

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

      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

                <div className="input-field col s12">
                  <input
                    id="login_moderador"
                    type="text"
                    className="validate"
      Severity: Major
      Found in src/components/moderador/ModeradorLogin.js and 1 other location - About 3 hrs to fix
      src/components/moderador/ModeradorLogin.js on lines 92..101

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

      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

                <div className="input-field col s12">
                  <input
                    id="senha_moderador"
                    type="password"
                    className="validate"
      Severity: Major
      Found in src/components/moderador/ModeradorLogin.js and 1 other location - About 3 hrs to fix
      src/components/moderador/ModeradorLogin.js on lines 82..91

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

      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

        componentDidMount() {
          const ref = firebaseApp.database().ref();
          ref.child('denuncias').orderByChild('idCategoria').equalTo('injuria')
            .once('value', (snapshot) => {
              this.setState({ totalDeDenunciaPorInjuria: snapshot.numChildren() });
      Severity: Major
      Found in src/components/estatistica/Injuria.js and 1 other location - About 3 hrs to fix
      src/components/estatistica/Racismo.js on lines 12..18

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

      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

        componentDidMount() {
          const ref = firebaseApp.database().ref();
          ref.child('denuncias').orderByChild('idCategoria').equalTo('racismo')
            .once('value', (snapshot) => {
              this.setState({ totalDeDenunciaPorRacismo: snapshot.numChildren() });
      Severity: Major
      Found in src/components/estatistica/Racismo.js and 1 other location - About 3 hrs to fix
      src/components/estatistica/Injuria.js on lines 11..17

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

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

        render() {
          const { expanded } = this.state;
          const { denuncia } = this.props;
          const { agressao } = denuncia;
          const { vitima, denunciante } = denuncia.pessoasEnvolvidas;
      Severity: Major
      Found in src/components/moderador/DenunciaRow.js - About 2 hrs to fix

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

              camposEsquerda: [
                {
                  id: 1,
                  titulo: 'Número do BO',
                  descricao: denuncia ? `${denuncia.informacoesLegais.numeroBoletim}` : ''
        Severity: Major
        Found in src/components/visualizarDenuncia/VisualizarDenuncia.js and 1 other location - About 2 hrs to fix
        src/components/visualizarDenuncia/VisualizarDenuncia.js on lines 115..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 86.

        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