i05nagai/mafipy

View on GitHub
mafipy/replication/tests/test_pricer_quanto_cms.py

Summary

Maintainability
F
2 wks
Test Coverage

File test_pricer_quanto_cms.py has 756 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/bin/python
# -*- coding: utf-8 -*-

from __future__ import division, print_function, absolute_import
from pytest import approx
Severity: Major
Found in mafipy/replication/tests/test_pricer_quanto_cms.py - About 1 day to fix

    Test_SimpleQuantoCmsLinearBullSpreadHelper has 24 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Test_SimpleQuantoCmsLinearBullSpreadHelper(object):
    
        # before all tests starts
        @classmethod
        def setup_class(cls):
    Severity: Minor
    Found in mafipy/replication/tests/test_pricer_quanto_cms.py - About 2 hrs to fix

      Cyclomatic complexity is too high in method test__make_numerator_call_integrands. (6)
      Open

          def test__make_numerator_call_integrands(self):

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Cyclomatic complexity is too high in method test__make_numerator_call_integrands. (6)
      Open

          def test__make_numerator_call_integrands(self):

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

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

          def test_make_pdf_black_scholes(
      Severity: Minor
      Found in mafipy/replication/tests/test_pricer_quanto_cms.py - About 45 mins to fix

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

            def test_make_cdf_black_scholes(
        Severity: Minor
        Found in mafipy/replication/tests/test_pricer_quanto_cms.py - About 45 mins to fix

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

              def test_make_pdf_fprime_black_scholes(
          Severity: Minor
          Found in mafipy/replication/tests/test_pricer_quanto_cms.py - About 45 mins to fix

            Function test_make_pdf_black_swaption has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def test_make_pdf_black_swaption(self,
            Severity: Minor
            Found in mafipy/replication/tests/test_pricer_quanto_cms.py - About 35 mins to fix

              Function test_make_cdf_black_swaption has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def test_make_cdf_black_swaption(self,
              Severity: Minor
              Found in mafipy/replication/tests/test_pricer_quanto_cms.py - About 35 mins to fix

                Function test_make_pdf_fprime_black_swaption has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def test_make_pdf_fprime_black_swaption(self,
                Severity: Minor
                Found in mafipy/replication/tests/test_pricer_quanto_cms.py - About 35 mins to fix

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

                      def test__make_numerator_call_integrands(self):
                          data = util.get_real(1)
                          swap_rate = data[0]
                          funcs = self.target._make_numerator_integrands()
                          # size
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 1 day to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 572..593

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

                  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

                      def test__make_numerator_call_integrands(self):
                          data = util.get_real(1)
                          swap_rate = data[0]
                          funcs = self.target._make_numerator_integrands()
                          # size
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 1 day to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 334..355

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

                  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 case1():
                              # min_put_range < strike < max_put_range = min_call_range
                              # min_call_range < max_put_range
                              self.payoff_strike = (self.min_put_range
                                                    + self.max_put_range) * 0.5
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 1 day to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 403..423

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

                  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 case2():
                              self.payoff_strike = (self.min_call_range
                                                    + self.max_call_range) * 0.5
                              self._set_target()
                              funcs = self.target.make_numerator_analytic_funcs()
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 1 day to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 375..398

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

                  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

                      @pytest.mark.parametrize(
                          "underlying, strike, rate, maturity, vol, expect", [
                              # maturity < 0 raise AssertionError
                              (2.0, 1.0, 1.0, -1.0, 1.0, 1.0),
                              # vol < 0 raise AssertionError
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 1 day to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 142..163

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

                  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

                      @pytest.mark.parametrize(
                          "underlying, strike, rate, maturity, vol, expect", [
                              # maturity < 0 raise AssertionError
                              (2.0, 1.0, 1.0, -1.0, 1.0, 1.0),
                              # vol < 0 raise AssertionError
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 1 day to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 120..140

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

                  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

                      @pytest.mark.parametrize(
                          "init_swap_rate, strike, swap_annuity, option_maturity, vol", [
                              # vol < 0 raise AssertionError
                              (2.0, 1.0, 3.0, 1.0, -1.0),
                              # otherwise
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 7 hrs to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 66..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 118.

                  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

                      @pytest.mark.parametrize(
                          "init_swap_rate, strike, swap_annuity, option_maturity, vol", [
                              # vol < 0 raise AssertionError
                              (2.0, 1.0, 3.0, 1.0, -1.0),
                              # otherwise
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 7 hrs to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 41..64

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

                  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

                          def case2():
                              self.payoff_lower_strike = (self.max_put_range
                                                          + self.min_put_range) * 0.5
                              self.payoff_upper_strike = (self.max_call_range
                                                          + self.min_call_range) * 0.5
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 2 other locations - About 5 hrs to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 649..662
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 695..705

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

                  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

                          def case1():
                              # min_put_range < lower_strike <= upper_strike <max_put_range
                              # min_call_range < max_call_range
                              self.payoff_lower_strike = (self.max_put_range
                                                          + self.min_put_range) * 0.5
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 2 other locations - About 5 hrs to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 667..677
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 695..705

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

                  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

                          def case4():
                              self.payoff_lower_strike = (self.max_call_range
                                                          + self.min_call_range) * 0.5
                              self.payoff_upper_strike = (self.max_call_range
                                                          + self.min_call_range) * 0.5
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 2 other locations - About 5 hrs to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 649..662
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 667..677

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

                  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 case5():
                              self.payoff_lower_strike = (self.max_call_range
                                                          + self.min_call_range) * 0.5
                              self.payoff_upper_strike = self.max_call_range * 1.1
                              self._set_target()
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 4 hrs to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 682..690

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

                  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 case3():
                              self.payoff_lower_strike = (self.max_put_range
                                                          + self.min_put_range) * 0.5
                              self.payoff_upper_strike = self.max_call_range * 1.1
                              self._set_target()
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 4 hrs to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 710..718

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

                  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 _analytic_func32(self, init_swap_rate):
                          return -(self.call_pricer(self.payoff_upper_strike)
                                   * self.payoff_gearing
                                   * self.annuity_mapping_func(self.payoff_upper_strike)
                                   * self.forward_fx_diffusion(self.payoff_upper_strike))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 2 hrs to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 618..622

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

                  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 _analytic_func22(self, init_swap_rate):
                          return -(self.put_pricer(self.payoff_upper_strike)
                                   * self.payoff_gearing
                                   * self.annuity_mapping_func(self.payoff_upper_strike)
                                   * self.forward_fx_diffusion(self.payoff_upper_strike))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 2 hrs to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 632..636

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

                  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 _analytic_func21(self, init_swap_rate):
                          return (self.put_pricer(self.payoff_lower_strike)
                                  * self.payoff_gearing
                                  * self.annuity_mapping_func(self.payoff_lower_strike)
                                  * self.forward_fx_diffusion(self.payoff_lower_strike))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 2 hrs to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 625..629

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

                  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 _analytic_func31(self, init_swap_rate):
                          return (self.call_pricer(self.payoff_lower_strike)
                                  * self.payoff_gearing
                                  * self.annuity_mapping_func(self.payoff_lower_strike)
                                  * self.forward_fx_diffusion(self.payoff_lower_strike))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 2 hrs to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 611..615

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

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

                      def _calc_func2(self, swap_rate):
                          return (2.0
                                  * self.payoff_fprime(swap_rate)
                                  * self.annuity_mapping_fprime(swap_rate)
                                  * self.forward_fx_diffusion(swap_rate))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 5 other locations - About 1 hr to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 322..326
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 328..332
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 554..558
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 560..564
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 566..570

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

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

                      def _calc_func4(self, swap_rate):
                          return (2.0
                                  * self.payoff_func(swap_rate)
                                  * self.annuity_mapping_fprime(swap_rate)
                                  * self.forward_fx_diffusion_fprime(swap_rate))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 5 other locations - About 1 hr to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 316..320
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 322..326
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 328..332
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 554..558
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 560..564

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

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

                      def _calc_func4(self, swap_rate):
                          return (2.0
                                  * self.payoff_func(swap_rate)
                                  * self.annuity_mapping_fprime(swap_rate)
                                  * self.forward_fx_diffusion_fprime(swap_rate))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 5 other locations - About 1 hr to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 316..320
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 322..326
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 554..558
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 560..564
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 566..570

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

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

                      def _calc_func3(self, swap_rate):
                          return (2.0
                                  * self.payoff_fprime(swap_rate)
                                  * self.annuity_mapping_func(swap_rate)
                                  * self.forward_fx_diffusion_fprime(swap_rate))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 5 other locations - About 1 hr to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 316..320
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 328..332
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 554..558
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 560..564
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 566..570

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

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

                      def _calc_func3(self, swap_rate):
                          return (2.0
                                  * self.payoff_fprime(swap_rate)
                                  * self.annuity_mapping_func(swap_rate)
                                  * self.forward_fx_diffusion_fprime(swap_rate))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 5 other locations - About 1 hr to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 316..320
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 322..326
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 328..332
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 554..558
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 566..570

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

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

                      def _calc_func2(self, swap_rate):
                          return (2.0
                                  * self.payoff_fprime(swap_rate)
                                  * self.annuity_mapping_fprime(swap_rate)
                                  * self.forward_fx_diffusion(swap_rate))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 5 other locations - About 1 hr to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 316..320
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 322..326
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 328..332
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 560..564
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 566..570

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

                  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

                      def _calc_func1(self, swap_rate):
                          return (self.payoff_func(swap_rate)
                                  * self.annuity_mapping_func(swap_rate)
                                  * self.forward_fx_diffusion_fhess(swap_rate))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 2 other locations - About 1 hr to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 549..552
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 605..608

                  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

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

                      def _analytic_func1(self, init_swap_rate):
                          return (self.payoff_func(init_swap_rate)
                                  * self.annuity_mapping_func(init_swap_rate)
                                  * self.forward_fx_diffusion(init_swap_rate))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 2 other locations - About 1 hr to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 311..314
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 549..552

                  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

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

                      def _calc_func1(self, swap_rate):
                          return (self.payoff_func(swap_rate)
                                  * self.annuity_mapping_func(swap_rate)
                                  * self.forward_fx_diffusion_fhess(swap_rate))
                  Severity: Major
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 2 other locations - About 1 hr to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 311..314
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 605..608

                  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

                              forward_fx_factor = math.exp(0.5
                                                           * (self.forward_fx_vol ** 2)
                                                           * self.maturity)
                  Severity: Minor
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 35 mins to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 773..775

                  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

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

                          forward_fx_factor = math.exp(0.5
                                                       * (self.forward_fx_vol ** 2)
                                                       * self.maturity)
                  Severity: Minor
                  Found in mafipy/replication/tests/test_pricer_quanto_cms.py and 1 other location - About 35 mins to fix
                  mafipy/replication/tests/test_pricer_quanto_cms.py on lines 738..740

                  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