neuropsychology/NeuroKit.py

View on GitHub

Showing 176 of 176 total issues

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

        if band == "Beta2":
            frequencies[band] = np.arange(18, 30+0.1, step)
Severity: Major
Found in examples/UnderDev/eeg/eeg_time_frequency.py and 8 other locations - About 45 mins to fix
examples/UnderDev/eeg/eeg_time_frequency.py on lines 216..217
examples/UnderDev/eeg/eeg_time_frequency.py on lines 218..219
examples/UnderDev/eeg/eeg_time_frequency.py on lines 220..221
examples/UnderDev/eeg/eeg_time_frequency.py on lines 222..223
examples/UnderDev/eeg/eeg_time_frequency.py on lines 224..225
examples/UnderDev/eeg/eeg_time_frequency.py on lines 228..229
examples/UnderDev/eeg/eeg_time_frequency.py on lines 230..231
examples/UnderDev/eeg/eeg_time_frequency.py on lines 232..233

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

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

    fa_rate_adjusted = (n_FA+ 0.5)/((n_FA+ 0.5) + n_CR + 1)
Severity: Minor
Found in neurokit/statistics/routines.py and 1 other location - About 45 mins to fix
neurokit/statistics/routines.py on lines 89..89

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

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

                    uniques_ms = results[participant][run]["microstates"][np.where(uniques)]
Severity: Minor
Found in examples/UnderDev/eeg/eeg_microstates.py and 1 other location - About 45 mins to fix
examples/UnderDev/eeg/eeg_microstates.py on lines 295..295

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

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

            ECG_Response["ECG_Phase_Systole_Completion"] = -1*systole_beg/(systole_end - systole_beg)*100
Severity: Minor
Found in neurokit/bio/bio_ecg.py and 1 other location - About 45 mins to fix
neurokit/bio/bio_rsp.py on lines 320..320

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

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

    hit_rate_adjusted = (n_Hit+ 0.5)/((n_Hit+ 0.5) + n_Miss + 1)
Severity: Minor
Found in neurokit/statistics/routines.py and 1 other location - About 45 mins to fix
neurokit/statistics/routines.py on lines 90..90

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

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

Avoid deeply nested control flow statements.
Open

                    if isinstance(hrv[key], float):  # Avoid storing series or dataframes
                        ECG_Response["ECG_HRV_" + key + "_Baseline"] = hrv[key]

                # Compute differences between features and baseline
                keys = [key for key in ECG_Response.keys() if '_Baseline' in key]  # Find keys
Severity: Major
Found in neurokit/bio/bio_ecg.py - About 45 mins to fix

    Function create_epochs has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def create_epochs(data, events_onsets, sampling_rate=1000, duration=1, onset=0, index=None):
    Severity: Minor
    Found in neurokit/signal/epochs.py - About 45 mins to fix

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

              if band == "Beta1":
                  frequencies[band] = np.arange(13, 17+0.1, step)
      Severity: Major
      Found in examples/UnderDev/eeg/eeg_time_frequency.py and 8 other locations - About 45 mins to fix
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 216..217
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 218..219
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 220..221
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 222..223
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 226..227
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 228..229
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 230..231
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 232..233

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

      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 9 locations. Consider refactoring.
      Open

              if band == "Alpha2":
                  frequencies[band] = np.arange(10, 12+0.1, step)
      Severity: Major
      Found in examples/UnderDev/eeg/eeg_time_frequency.py and 8 other locations - About 45 mins to fix
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 216..217
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 218..219
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 220..221
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 224..225
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 226..227
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 228..229
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 230..231
      examples/UnderDev/eeg/eeg_time_frequency.py on lines 232..233

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

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

      def ecg_process(ecg, rsp=None, sampling_rate=1000, filter_type="FIR", filter_band="bandpass", filter_frequency=[3, 45], segmenter="hamilton", quality_model="default", hrv_features=["time", "frequency"], age=None, sex=None, position=None):
          """
          Automated processing of ECG and RSP signals.
      
          Parameters
      Severity: Minor
      Found in neurokit/bio/bio_ecg.py - About 45 mins to fix

      Cognitive Complexity

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

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

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

      Further reading

      Function bio_EventRelated has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def bio_EventRelated(epoch, event_length, window_post_ecg=0, window_post_rsp=4, window_post_eda=4, ecg_features=["Heart_Rate", "Cardiac_Phase", "RR_Interval", "RSA", "HRV"]):
      Severity: Minor
      Found in neurokit/bio/bio_meta.py - About 45 mins to fix

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

                if band == "Delta":
                    frequencies[band] = np.arange(1, 3+0.1, step)
        Severity: Major
        Found in examples/UnderDev/eeg/eeg_time_frequency.py and 8 other locations - About 45 mins to fix
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 218..219
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 220..221
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 222..223
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 224..225
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 226..227
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 228..229
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 230..231
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 232..233

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

        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 9 locations. Consider refactoring.
        Open

                if band == "Theta":
                    frequencies[band] = np.arange(4, 7+0.1, step)
        Severity: Major
        Found in examples/UnderDev/eeg/eeg_time_frequency.py and 8 other locations - About 45 mins to fix
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 216..217
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 220..221
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 222..223
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 224..225
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 226..227
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 228..229
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 230..231
        examples/UnderDev/eeg/eeg_time_frequency.py on lines 232..233

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

        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 5 locations. Consider refactoring.
        Open

                response[prefix + "_Mean"] = epoch[variable][0:window_end].mean()
        Severity: Major
        Found in neurokit/bio/bio_ecg.py and 4 other locations - About 45 mins to fix
        neurokit/bio/bio_ecg.py on lines 857..857
        neurokit/bio/bio_ecg.py on lines 859..859
        neurokit/bio/bio_ecg.py on lines 860..860
        neurokit/bio/bio_ecg.py on lines 862..862

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

        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

                            uniques_times = results[participant][run]["microstates_times"][np.where(uniques)]
        Severity: Minor
        Found in examples/UnderDev/eeg/eeg_microstates.py and 1 other location - About 45 mins to fix
        examples/UnderDev/eeg/eeg_microstates.py on lines 296..296

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

        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

        Avoid deeply nested control flow statements.
        Open

                            if key in complexity_features[epoch_index].keys():
                                complexity_features[epoch_index][key].append(feature)
                            else:
                                complexity_features[epoch_index][key] = [feature]
        
        
        Severity: Major
        Found in neurokit/eeg/eeg_complexity.py - About 45 mins to fix

          Function find_following_duplicates has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          def find_following_duplicates(array):
              """
              Find the duplicates that are following themselves.
          
              Parameters
          Severity: Minor
          Found in neurokit/statistics/statistics.py - About 45 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

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

              events["durations"] = np.array(events["durations"])[np.array(toremove)]
          Severity: Major
          Found in neurokit/signal/events.py and 2 other locations - About 45 mins to fix
          neurokit/signal/events.py on lines 191..191
          neurokit/signal/events.py on lines 193..194

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

          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 9 locations. Consider refactoring.
          Open

                  if band == "Gamma1":
                      frequencies[band] = np.arange(31, 40+0.1, step)
          Severity: Major
          Found in examples/UnderDev/eeg/eeg_time_frequency.py and 8 other locations - About 45 mins to fix
          examples/UnderDev/eeg/eeg_time_frequency.py on lines 216..217
          examples/UnderDev/eeg/eeg_time_frequency.py on lines 218..219
          examples/UnderDev/eeg/eeg_time_frequency.py on lines 220..221
          examples/UnderDev/eeg/eeg_time_frequency.py on lines 222..223
          examples/UnderDev/eeg/eeg_time_frequency.py on lines 224..225
          examples/UnderDev/eeg/eeg_time_frequency.py on lines 226..227
          examples/UnderDev/eeg/eeg_time_frequency.py on lines 230..231
          examples/UnderDev/eeg/eeg_time_frequency.py on lines 232..233

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

          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

              if time_index is not None:
                  events["onsets_time"] = np.array(events["onsets_time"])[np.array(toremove)]
          Severity: Major
          Found in neurokit/signal/events.py and 2 other locations - About 45 mins to fix
          neurokit/signal/events.py on lines 191..191
          neurokit/signal/events.py on lines 192..192

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

          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