KarrLab/datanator_query_python

View on GitHub
datanator_query_python/query/query_taxon_tree.py

Summary

Maintainability
F
4 days
Test Coverage
A
91%

File query_taxon_tree.py has 398 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from datanator_query_python.util import mongo_util, chem_util, file_util
from datanator_query_python.aggregate import pipelines
import os
import json
from pymongo.collation import Collation, CollationStrength
Severity: Minor
Found in datanator_query_python/query/query_taxon_tree.py - About 5 hrs to fix

    Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(self, cache_dirname=None, collection_str='taxon_tree', 
    Severity: Major
    Found in datanator_query_python/query/query_taxon_tree.py - About 1 hr to fix

      Function get_equivalent_species has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          def get_equivalent_species(self, _id, max_distance, max_depth=float('inf')):
              '''
                  Get equivalent species of species with tax_id _id,
                  given the max taxonomic distances, for instance, given three species
                  {'tax_id': 8, 'anc_id': [5,4,3,2,6,7]}
      Severity: Minor
      Found in datanator_query_python/query/query_taxon_tree.py - About 1 hr 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 get_canon_common_ancestor_fast has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          def get_canon_common_ancestor_fast(self, org1, org2, org_format='tax_id'):
              ''' Get the closest common ancestor between
                  two organisms and their distances to the 
                  said ancestor
                  Args:
      Severity: Minor
      Found in datanator_query_python/query/query_taxon_tree.py - About 1 hr 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 get_common_ancestor has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          def get_common_ancestor(self, org1, org2, org_format='name'):
              ''' Get the closest common ancestor between
                  two organisms and their distances to the 
                  said ancestor
                  Args:
      Severity: Minor
      Found in datanator_query_python/query/query_taxon_tree.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 get_canon_common_ancestor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def get_canon_common_ancestor(self, org1, org2, org_format='tax_id'):
              ''' Get the closest common ancestor between
                  two organisms and their distances to the 
                  said ancestor
                  Args:
      Severity: Minor
      Found in datanator_query_python/query/query_taxon_tree.py - About 35 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 get_canon_rank_distance_by_name has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def get_canon_rank_distance_by_name(self, name, front_end=False):
              '''Given the name of species, return canonically-ranked ancestors
                  along the lineage and their non-canonical distances
      
              Args:
      Severity: Minor
      Found in datanator_query_python/query/query_taxon_tree.py - About 35 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

      Avoid too many return statements within this function.
      Open

              return {str(org1): distance1, str(org2): distance2, str(org1)+'_canon_ancestors':canon_anc_1,
      Severity: Major
      Found in datanator_query_python/query/query_taxon_tree.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return {str(org1): distance1, str(org2): distance2, str(org1)+'_canon_ancestors':canon_anc_1,
        Severity: Major
        Found in datanator_query_python/query/query_taxon_tree.py - About 30 mins to fix

          Function each_under_category has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def each_under_category(self, src_tax_ids, target_tax_id):
                  """Given a list of source organism IDs, check if each ID
                  is the child of target organism.
                  
                  Args:
          Severity: Minor
          Found in datanator_query_python/query/query_taxon_tree.py - About 25 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 get_canon_rank_distance has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def get_canon_rank_distance(self, _id, front_end=False):
                  '''Given the ncbi_id, return canonically-ranked ancestors
                      along the lineage and their non-canonical distances
          
                  Args:
          Severity: Minor
          Found in datanator_query_python/query/query_taxon_tree.py - About 25 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

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

                  if canon_anc_1[-1] == org2:
                      distance1 = 1
                      distance2 = 0
                  elif canon_anc_2[-1] == org1:
                      distance1 = 0
          Severity: Major
          Found in datanator_query_python/query/query_taxon_tree.py and 1 other location - About 3 hrs to fix
          datanator_query_python/query/query_protein.py on lines 1002..1010

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

          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

                  if org_format == 'tax_id':
                      anc_ids, anc_names = self.get_anc_by_id([org1, org2])
                      org1_anc = anc_ids[0]
                      org1_anc_name = anc_names[0]
                      org2_anc = anc_ids[1]
          Severity: Major
          Found in datanator_query_python/query/query_taxon_tree.py and 1 other location - About 3 hrs to fix
          datanator_query_python/query/query_taxon_tree.py on lines 375..380

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

          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

                  elif org_format == 'tax_name':
                      anc_ids, anc_names = self.get_anc_by_name([org1, org2])
                      org1_anc = anc_ids[0]
                      org1_anc_name = anc_names[0]
                      org2_anc = anc_ids[1]
          Severity: Major
          Found in datanator_query_python/query/query_taxon_tree.py and 1 other location - About 3 hrs to fix
          datanator_query_python/query/query_taxon_tree.py on lines 369..374

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

          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

                  pipeline = [
                       {'$match': {'tax_id': {'$in': src_tax_ids}}},
                       {'$addFields': {"__order": {'$indexOfArray': [src_tax_ids, "$tax_id"]}}},
                       {'$sort': {"__order": 1}},
                       {"$project": projection}
          Severity: Major
          Found in datanator_query_python/query/query_taxon_tree.py and 2 other locations - About 1 hr to fix
          datanator_query_python/query/query_kegg_orthology.py on lines 91..95
          datanator_query_python/query/query_kegg_orthology.py on lines 114..118

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 49.

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

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

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

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

          Refactorings

          Further Reading

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

                  return {str(org1): distance1, str(org2): distance2, str(org1)+'_canon_ancestors':canon_anc_1,
                  str(org2)+'_canon_ancestors':canon_anc_2}
          Severity: Major
          Found in datanator_query_python/query/query_taxon_tree.py and 2 other locations - About 1 hr to fix
          datanator_query_python/query/query_protein.py on lines 1023..1024
          datanator_query_python/query/query_taxon_tree.py on lines 403..404

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

          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

                  return {str(org1): distance1, str(org2): distance2, str(org1)+'_canon_ancestors':canon_anc_1,
                  str(org2)+'_canon_ancestors':canon_anc_2}
          Severity: Major
          Found in datanator_query_python/query/query_taxon_tree.py and 2 other locations - About 1 hr to fix
          datanator_query_python/query/query_protein.py on lines 1023..1024
          datanator_query_python/query/query_taxon_tree.py on lines 453..454

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

          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

                  super().__init__(cache_dirname=cache_dirname, MongoDB=MongoDB,
          Severity: Major
          Found in datanator_query_python/query/query_taxon_tree.py and 4 other locations - About 1 hr to fix
          datanator_query_python/query/query_metabolites.py on lines 21..21
          datanator_query_python/query/query_metabolites_meta.py on lines 15..15
          datanator_query_python/query/query_sabio_reaction_entries.py on lines 15..15
          datanator_query_python/query/query_sabiork_old.py on lines 19..19

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

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

                  if front_end:
                      result.append({anc['anc_name'][0]: len(anc['anc_name'])})
          Severity: Major
          Found in datanator_query_python/query/query_taxon_tree.py and 1 other location - About 1 hr to fix
          datanator_query_python/query/query_taxon_tree.py on lines 296..297

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

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

                  if front_end:
                      result.append({anc['anc_name'][0]: len(anc['anc_name'])})
          Severity: Major
          Found in datanator_query_python/query/query_taxon_tree.py and 1 other location - About 1 hr to fix
          datanator_query_python/query/query_taxon_tree.py on lines 261..262

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

          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

                      query = {'$and': [{'anc_id': {'$all': common_ancestors} },{'tax_id': {'$nin': checked_ids} },
                                        {'anc_id': {'$nin': checked_ids} }]}
          Severity: Minor
          Found in datanator_query_python/query/query_taxon_tree.py and 1 other location - About 55 mins to fix
          datanator_query_python/query/query_protein.py on lines 137..139

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

          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

                  [canon_anc_1.append(anc) for (anc, rank) in zip(org1_anc_name, rank1_anc) if rank != '+']
          Severity: Minor
          Found in datanator_query_python/query/query_taxon_tree.py and 1 other location - About 35 mins to fix
          datanator_query_python/query/query_taxon_tree.py on lines 392..392

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

          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

                  [canon_anc_2.append(anc) for (anc, rank) in zip(org2_anc_name, rank2_anc) if rank != '+']
          Severity: Minor
          Found in datanator_query_python/query/query_taxon_tree.py and 1 other location - About 35 mins to fix
          datanator_query_python/query/query_taxon_tree.py on lines 391..391

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

          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

          There are no issues that match your filters.

          Category
          Status