ihavalyova/DiAtomic

View on GitHub

Showing 129 of 135 total issues

Function setupUi has 663 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def setupUi(self, MainWindow):
        if not MainWindow.objectName():
            MainWindow.setObjectName(u"MainWindow")
        MainWindow.resize(1068, 848)
        self.actionNew = QAction(MainWindow)
Severity: Major
Found in diatomic/ui_diatom.py - About 3 days to fix

    File gui.py has 909 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import sys
    import numpy as np
    from PyQt5 import QtCore, QtGui, QtWidgets
    import pyqtgraph as pg
    
    
    Severity: Major
    Found in diatomic/gui.py - About 2 days to fix

      File ui_diatom.py has 771 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # -*- coding: utf-8 -*-
      
      ################################################################################
      ## Form generated from reading UI file 'diatomWVoSsf.ui'
      ##
      Severity: Major
      Found in diatomic/ui_diatom.py - About 1 day to fix

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

            def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
                         multiplier=1, custom_func=None, shift_by=0.0):
        
                Operator.__init__(self, objs, pair_states, label, model=model,
                                  rotc=rotc, multiplier=multiplier,
        Severity: Major
        Found in diatomic/operator.py and 6 other locations - About 1 day to fix
        diatomic/operator.py on lines 81..99
        diatomic/operator.py on lines 177..195
        diatomic/operator.py on lines 472..490
        diatomic/operator.py on lines 575..592
        diatomic/operator.py on lines 662..679
        diatomic/operator.py on lines 773..790

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

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

            def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
                         multiplier=1, custom_func=None, shift_by=0.0):
        
                Operator.__init__(self, objs, pair_states, label, model=model,
                                  rotc=rotc, multiplier=multiplier,
        Severity: Major
        Found in diatomic/operator.py and 6 other locations - About 1 day to fix
        diatomic/operator.py on lines 81..99
        diatomic/operator.py on lines 177..195
        diatomic/operator.py on lines 337..355
        diatomic/operator.py on lines 472..490
        diatomic/operator.py on lines 575..592
        diatomic/operator.py on lines 662..679

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

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

            def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
                         multiplier=1, custom_func=None, shift_by=0.0):
        
                Operator.__init__(self, objs, pair_states, label, model=model,
                                  rotc=rotc, multiplier=multiplier,
        Severity: Major
        Found in diatomic/operator.py and 6 other locations - About 1 day to fix
        diatomic/operator.py on lines 177..195
        diatomic/operator.py on lines 337..355
        diatomic/operator.py on lines 472..490
        diatomic/operator.py on lines 575..592
        diatomic/operator.py on lines 662..679
        diatomic/operator.py on lines 773..790

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

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

            def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
                         multiplier=1, custom_func=None, shift_by=0.0):
        
                Operator.__init__(self, objs, pair_states, label, model=model,
                                  rotc=rotc, multiplier=multiplier,
        Severity: Major
        Found in diatomic/operator.py and 6 other locations - About 1 day to fix
        diatomic/operator.py on lines 81..99
        diatomic/operator.py on lines 177..195
        diatomic/operator.py on lines 337..355
        diatomic/operator.py on lines 575..592
        diatomic/operator.py on lines 662..679
        diatomic/operator.py on lines 773..790

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

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

            def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
                         multiplier=1, custom_func=None, shift_by=0.0):
        
                Operator.__init__(self, objs, pair_states, label, model=model,
                                  rotc=rotc, multiplier=multiplier,
        Severity: Major
        Found in diatomic/operator.py and 6 other locations - About 1 day to fix
        diatomic/operator.py on lines 81..99
        diatomic/operator.py on lines 337..355
        diatomic/operator.py on lines 472..490
        diatomic/operator.py on lines 575..592
        diatomic/operator.py on lines 662..679
        diatomic/operator.py on lines 773..790

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

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

            def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
                         multiplier=1, custom_func=None, shift_by=0.0):
        
                Operator.__init__(self, objs, pair_states, label, model=model,
                                  rotc=rotc, multiplier=multiplier,
        Severity: Major
        Found in diatomic/operator.py and 6 other locations - About 1 day to fix
        diatomic/operator.py on lines 81..99
        diatomic/operator.py on lines 177..195
        diatomic/operator.py on lines 337..355
        diatomic/operator.py on lines 472..490
        diatomic/operator.py on lines 662..679
        diatomic/operator.py on lines 773..790

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

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

            def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
                         multiplier=1, custom_func=None, shift_by=0.0):
        
                Operator.__init__(self, objs, pair_states, label, model=model,
                                  rotc=rotc, multiplier=multiplier,
        Severity: Major
        Found in diatomic/operator.py and 6 other locations - About 1 day to fix
        diatomic/operator.py on lines 81..99
        diatomic/operator.py on lines 177..195
        diatomic/operator.py on lines 337..355
        diatomic/operator.py on lines 472..490
        diatomic/operator.py on lines 575..592
        diatomic/operator.py on lines 773..790

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

        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 _rule_sj_interaction(self, jrotn):
        
                omega_diff = self.state1.omega - self.state2.omega
                sigma_diff = self.state1.sigma - self.state2.sigma
                rule_sj = \
        Severity: Major
        Found in diatomic/operator.py and 1 other location - About 1 day to fix
        diatomic/operator.py on lines 754..768

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

        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 _rule_sj_interaction(self, jrotn):
        
                omega_diff = self.state1.omega - self.state2.omega
                sigma_diff = self.state1.sigma - self.state2.sigma
                rule_sj = \
        Severity: Major
        Found in diatomic/operator.py and 1 other location - About 1 day to fix
        diatomic/operator.py on lines 432..446

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

        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

        Diatom has 61 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Diatom(QtWidgets.QMainWindow, Ui_MainWindow):
        
            def __init__(self):
        
                super().__init__()
        Severity: Major
        Found in diatomic/gui.py - About 1 day to fix

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

              def _calculate_cspline_coupling_on_grid(self, ypar):
          
                  xpnts = self.xpoints * self.xunits
                  ypnts = ypar[self.sind:self.eind] * self.yunits
                  cs = CSpline(xpnts, ypnts)
          Severity: Major
          Found in diatomic/operator.py and 6 other locations - About 4 hrs to fix
          diatomic/operator.py on lines 128..133
          diatomic/operator.py on lines 233..238
          diatomic/operator.py on lines 522..527
          diatomic/operator.py on lines 625..630
          diatomic/operator.py on lines 712..717
          diatomic/operator.py on lines 819..824

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

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

              def _calculate_cspline_coupling_on_grid(self, ypar):
          
                  xpnts = self.xpoints * self.xunits
                  ypnts = ypar[self.sind:self.eind] * self.yunits
                  cs = CSpline(xpnts, ypnts)
          Severity: Major
          Found in diatomic/operator.py and 6 other locations - About 4 hrs to fix
          diatomic/operator.py on lines 128..133
          diatomic/operator.py on lines 233..238
          diatomic/operator.py on lines 392..397
          diatomic/operator.py on lines 522..527
          diatomic/operator.py on lines 712..717
          diatomic/operator.py on lines 819..824

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

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

              def _calculate_cspline_coupling_on_grid(self, ypar):
          
                  xpnts = self.xpoints * self.xunits
                  ypnts = ypar[self.sind:self.eind] * self.yunits
                  cs = CSpline(xpnts, ypnts)
          Severity: Major
          Found in diatomic/operator.py and 6 other locations - About 4 hrs to fix
          diatomic/operator.py on lines 128..133
          diatomic/operator.py on lines 233..238
          diatomic/operator.py on lines 392..397
          diatomic/operator.py on lines 522..527
          diatomic/operator.py on lines 625..630
          diatomic/operator.py on lines 712..717

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

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

              def _calculate_cspline_coupling_on_grid(self, ypar):
          
                  xpnts = self.xpoints * self.xunits
                  ypnts = ypar[self.sind:self.eind] * self.yunits
                  cs = CSpline(xpnts, ypnts)
          Severity: Major
          Found in diatomic/operator.py and 6 other locations - About 4 hrs to fix
          diatomic/operator.py on lines 233..238
          diatomic/operator.py on lines 392..397
          diatomic/operator.py on lines 522..527
          diatomic/operator.py on lines 625..630
          diatomic/operator.py on lines 712..717
          diatomic/operator.py on lines 819..824

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

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

              def _calculate_cspline_coupling_on_grid(self, ypar):
          
                  xpnts = self.xpoints * self.xunits
                  ypnts = ypar[self.sind:self.eind] * self.yunits
                  cs = CSpline(xpnts, ypnts)
          Severity: Major
          Found in diatomic/operator.py and 6 other locations - About 4 hrs to fix
          diatomic/operator.py on lines 128..133
          diatomic/operator.py on lines 392..397
          diatomic/operator.py on lines 522..527
          diatomic/operator.py on lines 625..630
          diatomic/operator.py on lines 712..717
          diatomic/operator.py on lines 819..824

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

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

              def _calculate_cspline_coupling_on_grid(self, ypar):
          
                  xpnts = self.xpoints * self.xunits
                  ypnts = ypar[self.sind:self.eind] * self.yunits
                  cs = CSpline(xpnts, ypnts)
          Severity: Major
          Found in diatomic/operator.py and 6 other locations - About 4 hrs to fix
          diatomic/operator.py on lines 128..133
          diatomic/operator.py on lines 233..238
          diatomic/operator.py on lines 392..397
          diatomic/operator.py on lines 625..630
          diatomic/operator.py on lines 712..717
          diatomic/operator.py on lines 819..824

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

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

              def _calculate_cspline_coupling_on_grid(self, ypar):
          
                  xpnts = self.xpoints * self.xunits
                  ypnts = ypar[self.sind:self.eind] * self.yunits
                  cs = CSpline(xpnts, ypnts)
          Severity: Major
          Found in diatomic/operator.py and 6 other locations - About 4 hrs to fix
          diatomic/operator.py on lines 128..133
          diatomic/operator.py on lines 233..238
          diatomic/operator.py on lines 392..397
          diatomic/operator.py on lines 522..527
          diatomic/operator.py on lines 625..630
          diatomic/operator.py on lines 819..824

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

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

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

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

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

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language