hackedteam/rcs-db-ext

View on GitHub

Showing 14,269 of 14,269 total issues

File expression.py has 3420 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# sql/expression.py
# Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

    File turtle.py has 3333 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    #
    # turtle.py: a Tkinter based turtle graphics module for Python
    # Version 1.0.1 - 24. 9. 2009
    #
    # Copyright (C) 2006 - 2010  Gregor Lingl
    Severity: Major
    Found in Python/Lib/lib-tk/turtle.py - About 1 wk to fix

      File Tkinter.py has 3327 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """Wrapper functions for Tcl/Tk.
      
      Tkinter provides classes which allow the display, positioning and
      control of widgets. Toplevel widgets are Tk and Toplevel. Other
      widgets are Frame, Label, Entry, Text, Canvas, Button, Radiobutton,
      Severity: Major
      Found in Python/Lib/lib-tk/Tkinter.py - About 1 wk to fix

        Method scan_tokens has a Cognitive Complexity of 452 (exceeds 5 allowed). Consider refactoring.
        Open

            def scan_tokens encoder, options
              state, heredocs = options[:state] || @state
              heredocs = heredocs.dup if heredocs.is_a?(Array)
              
              if state && state.instance_of?(StringState)

        Cognitive Complexity

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

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

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

        Further reading

        File winerror.py has 2988 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        """Error related constants for win32
        
        Generated by h2py from winerror.h
        """
        # Few extras added manually...
        Severity: Major
        Found in Python/Lib/site-packages/win32/lib/winerror.py - About 1 wk to fix

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

          class ImpLoader:
              """PEP 302 Loader that wraps Python's "classic" import algorithm
              """
              code = source = None
          
          Severity: Major
          Found in Python/Lib/pkgutil.py and 1 other location - About 1 wk to fix
          Python/Lib/site-packages/pip/_pkgutil.py on lines 228..319

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

          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

          class ImpLoader:
              """PEP 302 Loader that wraps Python's "classic" import algorithm
              """
              code = source = None
          
          
          Severity: Major
          Found in Python/Lib/site-packages/pip/_pkgutil.py and 1 other location - About 1 wk to fix
          Python/Lib/pkgutil.py on lines 224..316

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

          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

          Method _Code has 1519 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def _Code
          
              _save = self.pos
              while true # sequence
          
          
          Severity: Major
          Found in Ruby/lib/ruby/2.0.0/rdoc/markdown.rb - About 1 wk to fix

            Method _CodeFence has a Cognitive Complexity of 363 (exceeds 5 allowed). Consider refactoring.
            Open

              def _CodeFence
            
                _save = self.pos
                while true # sequence
                  _save1 = self.pos
            Severity: Minor
            Found in Ruby/lib/ruby/2.0.0/rdoc/markdown.rb - About 1 wk to fix

            Cognitive Complexity

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

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

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

            Further reading

            Function _parse has a Cognitive Complexity of 355 (exceeds 5 allowed). Consider refactoring.
            Open

            def _parse(source, state):
                # parse a simple pattern
                subpattern = SubPattern(state)
            
                # precompute constants into local variables
            Severity: Minor
            Found in Python/Lib/sre_parse.py - About 1 wk to fix

            Cognitive Complexity

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

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

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

            Further reading

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

            class dirpath:
                def __init__(self, str, recurse=0):
                    dp = str.split(';')
                    dirs = {}
                    for d in dp:
            Python/Lib/site-packages/pythonwin/pywin/framework/sgrepmdi.py on lines 42..113

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

            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

            class dirpath:
                def __init__(self, str, recurse=0):
                    dp = str.split(';')
                    dirs = {}
                    for d in dp:
            Python/Lib/site-packages/pythonwin/pywin/framework/mdi_pychecker.py on lines 52..123

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

            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

                static final class TreeBin extends AbstractQueuedSynchronizer {
                    private static final long serialVersionUID = 2249069246763182397L;
                    transient TreeNode root;  // root of tree
                    transient TreeNode first; // head of next-pointer list
            
            
            Ruby/lib/ruby/gems/2.0.0/gems/thread_safe-0.3.4/ext/org/jruby/ext/thread_safe/jsr166e/nounsafe/ConcurrentHashMapV8.java on lines 761..1189

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

            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

                static final class TreeBin extends AbstractQueuedSynchronizer {
                    private static final long serialVersionUID = 2249069246763182397L;
                    transient TreeNode root;  // root of tree
                    transient TreeNode first; // head of next-pointer list
            
            
            Ruby/lib/ruby/gems/2.0.0/gems/thread_safe-0.3.4/ext/org/jruby/ext/thread_safe/jsr166e/ConcurrentHashMapV8.java on lines 769..1197

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

            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

            File imap.rb has 2419 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            require "socket"
            require "monitor"
            require "digest/md5"
            require "strscan"
            begin
            Severity: Major
            Found in Ruby/lib/ruby/2.0.0/net/imap.rb - About 6 days to fix

              File ConcurrentHashMapV8.java has 2355 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*
               * Written by Doug Lea with assistance from members of JCP JSR-166
               * Expert Group and released to the public domain, as explained at
               * http://creativecommons.org/publicdomain/zero/1.0/
               */

                File decimal_23.py has 2350 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # <win32com>
                # This is a clone of Python 2.4's 'decimal' module.  It will only be used when
                # 'import decimal' fails - so is likely to be used in Python 2.3.
                # </win32com>
                # Copyright (c) 2004 Python Software Foundation.
                Severity: Major
                Found in Python/Lib/site-packages/win32com/decimal_23.py - About 6 days to fix

                  File ConcurrentHashMapV8.java has 2304 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /*
                   * Written by Doug Lea with assistance from members of JCP JSR-166
                   * Expert Group and released to the public domain, as explained at
                   * http://creativecommons.org/publicdomain/zero/1.0/
                   */

                    Method _BlockQuoteRaw has a Cognitive Complexity of 303 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def _BlockQuoteRaw
                    
                        _save = self.pos
                        while true # sequence
                          _tmp = apply(:_StartList)
                    Severity: Minor
                    Found in Ruby/lib/ruby/2.0.0/rdoc/markdown.rb - About 6 days to fix

                    Cognitive Complexity

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

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

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

                    Further reading

                    File query.py has 2165 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    # orm/query.py
                    # Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file>
                    #
                    # This module is part of SQLAlchemy and is released under
                    # the MIT License: http://www.opensource.org/licenses/mit-license.php
                    Severity: Major
                    Found in Python/Lib/site-packages/pypm/external/2/sqlalchemy/orm/query.py - About 5 days to fix
                      Severity
                      Category
                      Status
                      Source
                      Language