Lambda-School-Labs/refresh-fe

View on GitHub

Showing 117 of 117 total issues

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

class SleepCard extends React.Component{
    render(){
        return(
            <div className='water-card metric-card'>
                <h3 className='metrics-card-title'>Sleep</h3>
src/components/UserDashboard/Main/Metrics/ExcerciseCard/ExcerciseCard.js on lines 10..55

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

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

class ExcerciseCard extends React.Component{
    render(){
        return(
            <div className='water-card metric-card'>
                <h3 className='metrics-card-title'>Excercise</h3>
src/components/UserDashboard/Main/Metrics/SleepCard/SleepCard.js on lines 9..52

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

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

(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
// Generated by LiveScript 1.3.1
var presets, simpleStr, wrap, slice$ = [].slice, toString$ = {}.toString;
presets = require('./presets').presets;
simpleStr = function(arr){
Severity: Major
Found in public/loading-bar.js - About 3 days to fix

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

    export const addExercise = (increaseNum, userId, dailyPoints, totalPoints) => (
      dispatch
    ) => {
      dispatch({ type: FETCHING_START });
    
    
    Severity: Major
    Found in src/views/private/actions/actions-user.js and 1 other location - About 3 days to fix
    src/views/private/actions/actions-user.js on lines 584..656

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

    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

    export const addBreaks = (increaseNum, userId, dailyPoints, totalPoints) => (
      dispatch
    ) => {
      dispatch({ type: FETCHING_START });
    
    
    Severity: Major
    Found in src/views/private/actions/actions-user.js and 1 other location - About 3 days to fix
    src/views/private/actions/actions-user.js on lines 426..498

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

    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 loading-bar.js has 807 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
    // Generated by LiveScript 1.3.1
    var presets, simpleStr, wrap, slice$ = [].slice, toString$ = {}.toString;
    presets = require('./presets').presets;
    simpleStr = function(arr){
    Severity: Major
    Found in public/loading-bar.js - About 1 day to fix

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

        axiosWithAuth()
          .get(`https://lab23-refresh-be.herokuapp.com/users/${userId}`)
          .then((response) => {
              const teamId = response.data.team_id;
      
      
      Severity: Major
      Found in src/views/private/actions/actions-user.js and 2 other locations - About 1 day to fix
      src/views/private/actions/actions-user.js on lines 312..342
      src/views/private/actions/actions-user.js on lines 389..422

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

      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

        axiosWithAuth()
          .get(`https://lab23-refresh-be.herokuapp.com/users/${userId}`)
          .then((response) => {
              const teamId = response.data.team_id;
              const teamPointsUpdate = updatePointsSleep(response.data.sleep, 8, "add");
      Severity: Major
      Found in src/views/private/actions/actions-user.js and 2 other locations - About 1 day to fix
      src/views/private/actions/actions-user.js on lines 237..273
      src/views/private/actions/actions-user.js on lines 389..422

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

      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

        axiosWithAuth()
          .get(`https://lab23-refresh-be.herokuapp.com/users/${userId}`)
          .then((response) => {
              const teamId = response.data.team_id;
              const teamPointsUpdate = updatePointsSleep(
      Severity: Major
      Found in src/views/private/actions/actions-user.js and 2 other locations - About 1 day to fix
      src/views/private/actions/actions-user.js on lines 237..273
      src/views/private/actions/actions-user.js on lines 312..342

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

      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

        axiosWithAuth()
          .get(`https://lab23-refresh-be.herokuapp.com/users/${userId}/metrics`)
          .then((response) => {
            //check to make sure exercise metric isn't currently at 0, to avoid negative metric input
            if (response.data.exercise !== 0) {
      Severity: Major
      Found in src/views/private/actions/actions-user.js and 1 other location - About 1 day to fix
      src/views/private/actions/actions-user.js on lines 668..702

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

      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

        axiosWithAuth()
          .get(`https://lab23-refresh-be.herokuapp.com/users/${userId}/metrics`)
          .then((response) => {
            //check to make sure breaks metric isn't currently at 0, to avoid negative metric input
            if (response.data.breaks !== 0) {
      Severity: Major
      Found in src/views/private/actions/actions-user.js and 1 other location - About 1 day to fix
      src/views/private/actions/actions-user.js on lines 510..544

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

      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

        axiosWithAuth()
          .get(`https://lab23-refresh-be.herokuapp.com/users/${userId}/metrics`)
          .then((response) => {
            //check to make sure water metric isn't currently at 0, to avoid negative metric input
            if (response.data.water !== 0) {
      Severity: Major
      Found in src/views/private/actions/actions-user.js and 1 other location - About 1 day to fix
      src/views/private/actions/actions-user.js on lines 355..388

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

      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

        axiosWithAuth()
          .get(`https://lab23-refresh-be.herokuapp.com/users/${userId}/metrics`)
          .then((response) => {
            //check to make sure sleep metric isn't currently at 0, to avoid negative metric input
            if (response.data.sleep !== 0) {
      Severity: Major
      Found in src/views/private/actions/actions-user.js and 1 other location - About 1 day to fix
      src/views/private/actions/actions-user.js on lines 202..235

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

      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 actions-user.js has 666 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import axios from "axios";
      import { axiosWithAuth } from "../../../helpers/axiosWithAuth";
      import history from "../../../helpers/history";
      
      export const FETCHING_START = "FETCHING_START";
      Severity: Major
      Found in src/views/private/actions/actions-user.js - About 1 day to fix

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

        function WaterGoal(props) {
        
            function setAddedPoints(props) {
                if (props.water * props.pointsPerMetric.water.points > props.pointsPerMetric.water.max) {
                    return <h2>+ {props.pointsPerMetric.water.max} points </h2>
        src/components/DailyRetro/CarouselForm/slides/Breaks/BreaksGoal.js on lines 4..27
        src/components/DailyRetro/CarouselForm/slides/Sleep/SleepGoal.js on lines 4..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 229.

        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

        function BreaksGoal(props) {
        
            function setAddedPoints(props) {
                if (props.breaks * props.pointsPerMetric.breaks.points > props.pointsPerMetric.breaks.max) {
                    return <h2>+ {props.pointsPerMetric.breaks.max} points </h2>
        src/components/DailyRetro/CarouselForm/slides/Sleep/SleepGoal.js on lines 4..27
        src/components/DailyRetro/CarouselForm/slides/Water/WaterGoal.js on lines 4..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 229.

        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

        function SleepGoal(props) {
        
            function setAddedPoints(props) {
                if (props.sleep * props.pointsPerMetric.sleep.points > props.pointsPerMetric.sleep.max) {
                    return <h2>+ {props.pointsPerMetric.sleep.max} points </h2>
        src/components/DailyRetro/CarouselForm/slides/Breaks/BreaksGoal.js on lines 4..27
        src/components/DailyRetro/CarouselForm/slides/Water/WaterGoal.js on lines 4..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 229.

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

        function reducer(state = initialState, action) {
          switch (action.type) {
            case FETCH_ALL_USERS_LOADING:
              return {
                ...state,
        Severity: Major
        Found in src/views/private/reducers/reducers.js - About 5 hrs to fix

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

          class WaterSlide extends React.Component {
            render() {
              return (
                <div className='metric-slide'>
                  <WaterQuestion next={this.props.next} previous={this.props.previous} />
          src/components/DailyRetro/CarouselForm/slides/Exercise/ExerciseSlide.js on lines 7..28
          src/components/DailyRetro/CarouselForm/slides/Sleep/SleepSlide.js on lines 8..30

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 152.

          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

          class SleepSlide extends React.Component {
            render() {
              return (
                <div className='metric-slide'>
                  <SleepQuestion next={this.props.next} previous={this.props.previous}/>
          src/components/DailyRetro/CarouselForm/slides/Exercise/ExerciseSlide.js on lines 7..28
          src/components/DailyRetro/CarouselForm/slides/Water/WaterSlide.js on lines 8..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 152.

          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