tensorflow/tensorflow

View on GitHub
tensorflow/python/kernel_tests/nn_ops/fractional_max_pool_op_test.py

Summary

Maintainability
F
2 wks
Test Coverage

File fractional_max_pool_op_test.py has 639 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Severity: Major
Found in tensorflow/python/kernel_tests/nn_ops/fractional_max_pool_op_test.py - About 1 day to fix

    Function _testVisually has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

      def _testVisually(self):
        """Manual test by printing out intermediate result of a small random tensor.
    
        Since _GetExpectedFractionalMaxPoolResult is 'automated', it feel safer to
        have a test case that you can see what's happening.

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

      def testDifferentTensorShapes(self):
        """Test different shapes of input tensor.
    
        Mainly test different combinations of num_rows and num_cols.
        """

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

      def testDirectUseOverlapping(self):
        for num_batches in [1, 3]:
          for row_window_size in [2, 5]:
            for col_window_size in [2, 4]:
              num_rows = (row_window_size - 1) * 5 + 1

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

      def testDifferentTensorShapesThroughGradientError(self):
        pseudo_random = True
        overlapping = True
        pooling_ratio = [1, math.sqrt(3), math.sqrt(2), 1]
        for num_batches in [1, 2]:

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

      def testDirectNotUseOverlapping(self):
        for num_batches in [1, 3]:
          for row_window_size in [2, 5]:
            for col_window_size in [2, 4]:
              num_rows = row_window_size * 5

    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 deeply nested control flow statements.
    Open

                with self.cached_session() as _:
                  input_tensor = constant_op.constant(input_data, shape=input_shape)
                  output_tensor, unused_a, unused_b = nn_ops.fractional_max_pool_v2(
                      input_tensor,
                      pooling_ratio,
    Severity: Major
    Found in tensorflow/python/kernel_tests/nn_ops/fractional_max_pool_op_test.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                  if j in col_seq:
                    row_to_print.append("|")
                  row_to_print.append(str(rand_mat[0, i, j, 0]))
      Severity: Major
      Found in tensorflow/python/kernel_tests/nn_ops/fractional_max_pool_op_test.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                    with self.cached_session() as _:
                      input_tensor = constant_op.constant(
                          self._GenerateUniqueRandomInputTensor(input_shape))
                      window_size = [1, row_window_size, col_window_size, 1]
                      stride_size = [1, row_window_size, col_window_size, 1]
        Severity: Major
        Found in tensorflow/python/kernel_tests/nn_ops/fractional_max_pool_op_test.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                      with self.cached_session() as _:
                        input_tensor = constant_op.constant(
                            self._GenerateUniqueRandomInputTensor(input_shape))
                        window_size = [1, row_window_size, col_window_size, 1]
                        stride_size = [1, row_window_size - 1, col_window_size - 1, 1]
          Severity: Major
          Found in tensorflow/python/kernel_tests/nn_ops/fractional_max_pool_op_test.py - About 45 mins to fix

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

              @test_util.run_deprecated_v1
              def testDifferentInputTensorShape(self):
                """Runs the operation in one session with different input tensor shapes."""
                with self.cached_session() as sess:
                  input_holder = array_ops.placeholder(dtypes.float32,
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 282..308

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

            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

              def _MaxPoolAlongRows(self, input_matrix, row_seq, overlapping):
                """Perform max pool along row of a 2-D matrix based on row_seq.
            
                Args:
                  input_matrix: A 2-D matrix.
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 39..61

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

            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

              def _GetExpectedFractionalMaxPoolResult(self, input_tensor, row_seq, col_seq,
                                                      overlapping):
                """Get expected fractional max pool result.
            
                row_seq and col_seq together defines the fractional pooling region.
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 80..109

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

            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

              def testLargePoolingRatio(self):
                """Test when pooling ratio is not within [1, 2).
                """
                pseudo_random = True
                overlapping = True
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 246..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 133.

            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

                for pseudo_random in True, False:
                  for overlapping in True, False:
                    with self.cached_session() as _:
                      input_tensor = constant_op.constant(input_data, shape=input_shape)
                      output_tensor, unused_a, unused_b = nn_ops.fractional_max_pool_v2(
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 506..527

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

            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

              def testDifferentTensorShapes(self):
                """Test different shapes of input tensor.
            
                Mainly test different combinations of num_rows and num_cols.
                """
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 228..244

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

            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

                    for i in range(num_rows):
                      row_to_print = []
                      for j in range(num_cols):
                        if j in col_seq:
                          row_to_print.append("|")
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 175..184

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

            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

              def testAllInputOptions(self):
                """Try all possible input options for fractional_max_pool.
                """
                num_batches = 5
                num_channels = 3
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 192..206

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

            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

              def testPoolingRatioHasMoreDimThanInput(self):
                with self.cached_session() as _:
                  with self.assertRaisesRegex(
                      errors.InvalidArgumentError,
                      r"Pooling ratio is higher than input dimension size for dimension 1.*"
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 336..352

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

            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

                with self.cached_session() as _:
                  input_tensor = constant_op.constant(input_data, shape=input_shape)
                  output_tensor, unused_a, unused_b = nn_ops.fractional_max_pool_v2(
                      input_tensor,
                      pooling_ratio,
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 570..587

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 95.

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

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

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

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

            Refactorings

            Further Reading

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

              def testDivisiblePoolingRatio(self):
                """Test when num of rows/cols can evenly divide pooling ratio.
            
                This is a case regular max pooling can handle. Should be handled by
                fractional pooling as well.
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 264..280

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

            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

              def testPoolingRatioIllegalSmallValue(self):
                with self.cached_session() as _:
                  # Whether turn on `TF2_BEHAVIOR` generates different error messages
                  with self.assertRaisesRegex(
                      (errors.InvalidArgumentError, ValueError),
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 354..369

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

            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

                with self.cached_session():
                  p, r, c = nn_ops.fractional_max_pool_v2(
                      input_tensor,
                      pooling_ratio,
                      pseudo_random,
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 127..138

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

            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

              def _MaxPoolAlongCols(self, input_matrix, col_seq, overlapping):
                """Perform max pool along column of a 2-D matrix based on col_seq.
            
                Args:
                  input_matrix: A 2-D matrix.
            tensorflow/python/kernel_tests/nn_ops/fractional_avg_pool_op_test.py on lines 63..78

            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

            There are no issues that match your filters.

            Category
            Status