serge-web/serge-web

View on GitHub

Showing 805 of 805 total issues

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

    'Weather forecast': {
      lastUpdated: '2019-09-30T12:37:26.705Z',
      title: 'Weather forecast',
      details: {
        type: 'object',
client/src/Tests/ActionsAndReducers/playerUI/data/set_latest_wargame_message_mock.ts on lines 1581..1649
client/src/mocks/message-templates.mock.ts on lines 651..719

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

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

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

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

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

Refactorings

Further Reading

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

      {
        lastUpdated: '2019-09-30T12:37:26.705Z',
        title: 'Weather forecast',
        details: {
          type: 'object',
client/src/Tests/ActionsAndReducers/playerUI/data/set_latest_wargame_message_mock.ts on lines 588..656
client/src/mocks/message-templates.mock.ts on lines 651..719

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

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

            plannedTurns: {
              T02: { state: 'Transitting', speed: 20, route: ['C00', 'C01', 'C02', 'C03'] },
              T03: { state: 'Transitting', speed: 20, route: ['C04', 'C05', 'C06', 'C07'] },
              T04: { state: 'Transitting', speed: 20, route: ['D07', 'E08', 'F08', 'G08'] },
              T05: { state: 'Transitting', speed: 20, route: ['H08', 'H09', 'I09', 'I10'] },
Severity: Major
Found in client/public/messages.js and 1 other location - About 1 day to fix
client/public/messages.js on lines 70..80

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

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

            plannedTurns: {
              T02: { state: 'Transitting', speed: 20, route: ['I04', 'I05', 'I06', 'I06'] },
              T03: { state: 'Transitting', speed: 20, route: ['I07', 'I08', 'I09', 'I10'] },
              T04: { state: 'Transitting', speed: 20, route: ['I11', 'J11', 'J12', 'J13'] },
              T05: { state: 'Transitting', speed: 20, route: ['K14', 'L14', 'M15', 'M16'] },
Severity: Major
Found in client/public/messages.js and 1 other location - About 1 day to fix
client/public/messages.js on lines 85..95

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

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

const AdminGameSetup: React.FC = () => {
  const dispatch = useDispatch()
  const { wargame, messageTypes }: { wargame: WargamesState, messageTypes: MessageTypes } = useSelector(({ wargame, messageTypes }: RootState) => ({ wargame, messageTypes }))

  const {
Severity: Major
Found in client/src/Views/GameSetupNew.tsx - About 1 day to fix

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

              {
                name: 'Fisher-A',
                history: {
                  T01: { state: 'Transitting', speed: 10, route: ['L02', 'K03'] },
                  T02: { state: 'Transitting', speed: 20, route: ['J03', 'I04'] }
    Severity: Major
    Found in client/public/messages.js and 1 other location - About 1 day to fix
    client/public/messages.js on lines 285..301

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

    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

              {
                name: 'Fisher-A',
                history: { T01: { state: 'Transitting', speed: 10, route: ['L02', 'K03'] } },
                plannedTurns: {
                  T02: { state: 'Transitting', speed: 20, route: ['J03', 'I04'] },
    Severity: Major
    Found in client/public/messages.js and 1 other location - About 1 day to fix
    client/public/messages.js on lines 127..141

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

    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

              {
                name: 'Fisher-C',
                history: { T01: { state: 'Transitting', speed: 10, route: ['M11', 'L10'] } },
                plannedTurns: {
                  T02: { state: 'Transitting', speed: 20, route: ['K10', 'J09'] },
    Severity: Major
    Found in client/public/messages.js and 1 other location - About 1 day to fix
    client/public/messages.js on lines 97..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 235.

    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

              {
                name: 'Fisher-C',
                history: {
                  T01: { state: 'Transitting', speed: 10, route: ['M11', 'L10'] },
                  T02: { state: 'Transitting', speed: 20, route: ['K10', 'J09'] }
    Severity: Major
    Found in client/public/messages.js and 1 other location - About 1 day to fix
    client/public/messages.js on lines 251..267

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

    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 index.ts has 581 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable no-unused-vars */
    import { ADJUDICATION_PHASE, allDbs, clearAll, COUNTER_MESSAGE, CUSTOM_MESSAGE, databasePath, FEEDBACK_MESSAGE, hiddenPrefix, INFO_MESSAGE, MSG_STORE, MSG_TYPE_STORE, PLANNING_PHASE, SERGE_INFO, serverPath, wargameSettings, dbDefaultSettings } from 'src/config'
    import { deleteRoleAndParts, duplicateThisForce } from 'src/Helpers'
    import _ from 'lodash'
    import moment from 'moment'
    Severity: Major
    Found in client/src/api/wargames_api/index.ts - About 1 day to fix

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

          message: {
            Reference: 'Blue-3',
            Title: 'Blue-3 Trusted Taipir, owned by Red Comms',
            LOCATION: {
              Asia: [
      Severity: Major
      Found in client/src/mocks/coa-messages.mock.ts and 2 other locations - About 1 day to fix
      client/src/mocks/coa-messages.mock.ts on lines 122..180
      client/src/mocks/coa-messages.mock.ts on lines 215..273

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

      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

          message: {
            Reference: 'RED-1',
            Title: 'Red-1 COA',
            LOCATION: {
              Asia: [
      Severity: Major
      Found in client/src/mocks/coa-messages.mock.ts and 2 other locations - About 1 day to fix
      client/src/mocks/coa-messages.mock.ts on lines 35..93
      client/src/mocks/coa-messages.mock.ts on lines 215..273

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

      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

          message: {
            Reference: 'White-2',
            Title: 'White-2 COA',
            LOCATION: {
              Asia: [
      Severity: Major
      Found in client/src/mocks/coa-messages.mock.ts and 2 other locations - About 1 day to fix
      client/src/mocks/coa-messages.mock.ts on lines 35..93
      client/src/mocks/coa-messages.mock.ts on lines 122..180

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

      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 SortableList has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
      Open

      export const SortableList: React.FC<PropTypes> = React.forwardRef(({
        onClick,
        onChange,
        items,
        title = 'Add',
      Severity: Minor
      Found in client/src/Components/local/molecules/sortable-list/index.tsx - About 1 day 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

                  plannedTurns: {
                    T03: { state: 'Transitting', speed: 20, route: ['C04', 'C05', 'C06', 'C07'] },
                    T04: { state: 'Transitting', speed: 20, route: ['D07', 'E08', 'F08', 'G08'] },
                    T05: { state: 'Transitting', speed: 20, route: ['H08', 'H09', 'I09', 'I10'] },
                    T06: { state: 'Transitting', speed: 20, route: ['I11', 'J11', 'J12', 'J13'] },
      Severity: Major
      Found in client/public/messages.js and 1 other location - About 1 day to fix
      client/public/messages.js on lines 223..232

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

      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

                  plannedTurns: {
                    T03: { state: 'Transitting', speed: 20, route: ['I07', 'I08', 'I09', 'I10'] },
                    T04: { state: 'Transitting', speed: 20, route: ['I11', 'J11', 'J12', 'J13'] },
                    T05: { state: 'Transitting', speed: 20, route: ['K14', 'L14', 'M15', 'M16'] },
                    T06: { state: 'Transitting', speed: 20, route: ['M17', 'M18', 'N18', 'N19'] },
      Severity: Major
      Found in client/public/messages.js and 1 other location - About 1 day to fix
      client/public/messages.js on lines 240..249

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

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

      export const ReactTable: React.FC<ReactTableProps> = (props) => {
        const {
          columns,
          rows,
          showArchived,
      Severity: Major
      Found in client/src/Components/local/react-table/index.tsx - About 1 day to fix

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

          {
            messageType: CUSTOM_MESSAGE,
            templateId: 'RFI',
            details: {
              channel: 'channel-BlueRFI',
        Severity: Major
        Found in client/src/mocks/game-messages-rfi.mock.ts and 1 other location - About 7 hrs to fix
        client/src/mocks/game-messages-rfi.mock.ts on lines 222..251

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

        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

          {
            messageType: CUSTOM_MESSAGE,
            templateId: 'RFI',
            details: {
              channel: 'channel-BlueRFI',
        Severity: Major
        Found in client/src/mocks/game-messages-rfi.mock.ts and 1 other location - About 7 hrs to fix
        client/src/mocks/game-messages-rfi.mock.ts on lines 192..221

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

        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

            db.find({
              selector: {
                wargame: req.params.wargame
              },
              fields: ['role', 'activityTime', 'activityType']
        Severity: Major
        Found in server/providers/couchdb.js and 1 other location - About 7 hrs to fix
        server/providers/pouchdb.js on lines 331..349

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

        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