Showing 39 of 109 total issues

TypeScriptParserBaseListener has 424 methods (exceeds 20 allowed). Consider refactoring.
Open

public class TypeScriptParserBaseListener implements TypeScriptParserListener {
    /**
     * {@inheritDoc}
     *
     * <p>The default implementation does nothing.</p>

    TypeScriptParserListener has 420 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public interface TypeScriptParserListener extends ParseTreeListener {
        /**
         * Enter a parse tree produced by {@link TypeScriptParser#initializer}.
         * @param ctx the parse tree
         */
    Severity: Major
    Found in docs/compare/src/main/java/tsantlr/TypeScriptParserListener.java - About 1 wk to fix

      PythonParserBaseListener has 160 methods (exceeds 20 allowed). Consider refactoring.
      Open

      public class PythonParserBaseListener implements PythonParserListener {
          /**
           * {@inheritDoc}
           *
           * <p>The default implementation does nothing.</p>
      Severity: Major
      Found in docs/compare/src/main/java/pyantlr/PythonParserBaseListener.java - About 3 days to fix

        PythonParserListener has 156 methods (exceeds 20 allowed). Consider refactoring.
        Open

        public interface PythonParserListener extends ParseTreeListener {
            /**
             * Enter a parse tree produced by {@link PythonParser#root}.
             * @param ctx the parse tree
             */
        Severity: Major
        Found in docs/compare/src/main/java/pyantlr/PythonParserListener.java - About 3 days to fix

          File TypeScriptParserBaseListener.java has 430 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // Generated from TypeScriptParser.g4 by ANTLR 4.7.2
          package tsantlr;
          
          import org.antlr.v4.runtime.ParserRuleContext;
          import org.antlr.v4.runtime.tree.ErrorNode;
          Severity: Minor
          Found in docs/compare/src/main/java/tsantlr/TypeScriptParserBaseListener.java - About 6 hrs to fix

            File TypeScriptParserListener.java has 424 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            // Generated from TypeScriptParser.g4 by ANTLR 4.7.2
            package tsantlr;
            
            import org.antlr.v4.runtime.tree.ParseTreeListener;
            
            
            Severity: Minor
            Found in docs/compare/src/main/java/tsantlr/TypeScriptParserListener.java - About 6 hrs to fix

              JavaFullListener has 25 methods (exceeds 20 allowed). Consider refactoring.
              Open

              type JavaFullListener struct {
                  parser.BaseJavaParserListener
              }
              Severity: Minor
              Found in pkg/infrastructure/ast/ast_java/java_full_listener.go - About 2 hrs to fix

                Function startParse has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring.
                Open

                func startParse(nodes []core_domain.CodeDataStruct, relates []support.RefactorChangeRelate) {
                    for _, pkgNode := range nodes {
                        for _, related := range relates {
                            oldInfo := support.BuildMethodPackageInfo(related.OldObj)
                            newInfo := support.BuildMethodPackageInfo(related.NewObj)
                Severity: Minor
                Found in pkg/application/refactor/rename/rename_method.go - About 2 hrs 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 ParseXML has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring.
                Open

                func ParseXML(r io.Reader) *XMLNode {
                    parser := xml.NewDecoder(r)
                    var root XMLNode
                
                    st := container.NewStack()
                Severity: Minor
                Found in pkg/infrastructure/xmlparse/xml_parser.go - About 2 hrs 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 ParseXML has 69 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func ParseXML(r io.Reader) *XMLNode {
                    parser := xml.NewDecoder(r)
                    var root XMLNode
                
                    st := container.NewStack()
                Severity: Minor
                Found in pkg/infrastructure/xmlparse/xml_parser.go - About 1 hr to fix

                  Method TbsApp.AnalysisPath has a Cognitive Complexity of 29 (exceeds 20 allowed). Consider refactoring.
                  Open

                  func (a TbsApp) AnalysisPath(deps []core_domain.CodeDataStruct, identifiersMap map[string]core_domain.CodeDataStruct) []TestBadSmell {
                      var results []TestBadSmell = nil
                      callMethodMap := core_domain.BuildCallMethodMap(deps)
                      for _, clz := range deps {
                          for _, method := range clz.Functions {
                  Severity: Minor
                  Found in pkg/application/tbs/tbs_app.go - About 1 hr to fix

                  Cognitive Complexity

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

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

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

                  Further reading

                  Method CocagoParser.Visitor has 64 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func (n *CocagoParser) Visitor(f *ast.File, fset *token.FileSet, fileName string) *core_domain.CodeContainer {
                      var currentStruct core_domain.CodeDataStruct
                      var currentFile core_domain.CodeContainer
                      var currentFunc *core_domain.CodeFunction
                      var dsMap = make(map[string]*core_domain.CodeDataStruct)
                  Severity: Minor
                  Found in pkg/infrastructure/ast/ast_go/cocago_parser.go - About 1 hr to fix

                    Method testTryStmt has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        @Test
                        void testTryStmt() {
                            String s = "# try_stmt: TRY COLON suite (except_clause+ else_clause? finaly_clause? | finaly_clause)\n" +
                                    "\n" +
                                    "# TRY COLON suite except_clause\n" +
                    Severity: Minor
                    Found in docs/compare/src/test/java/com/compare/PythonIdentAppTest.java - About 1 hr to fix

                      Function Test_ShouldBuildSuccessDataFromSourceData has 56 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func Test_ShouldBuildSuccessDataFromSourceData(t *testing.T) {
                          g := NewGomegaWithT(t)
                      
                          codePath := "../../../_fixtures/grammar/java/examples/api"
                          callNodes, identifiersMap, identifiers := testhelper.BuildAnalysisDeps(codePath)
                      Severity: Minor
                      Found in pkg/application/call/call_graph_test.go - About 1 hr to fix

                        Method nextToken has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            @Override
                            public Token nextToken() {
                                // Check if the end-of-file is ahead and there are still some DEDENTS expected.
                                if (_input.LA(1) == EOF && _indents.size() > 0)
                                {
                        Severity: Minor
                        Found in docs/compare/src/main/java/pyantlr/PythonBaseLexer.java - About 1 hr to fix

                        Cognitive Complexity

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

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

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

                        Further reading

                        Method testStar has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            @Test
                            void testStar() {
                                String s = "# argument\n" +
                                        "#     : test (comp_for | ASSIGN test)?\n" +
                                        "#     | (POWER | STAR) test\n" +
                        Severity: Minor
                        Found in docs/compare/src/test/java/com/compare/PythonIdentAppTest.java - About 1 hr to fix

                          Function BuildDeps has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring.
                          Open

                          func BuildDeps(val xmlparse.XMLNode) []core_domain.CodeDependency {
                              var deps []core_domain.CodeDependency = nil
                              for _, depElement := range val.Elements {
                                  depNode := depElement.Val.(xmlparse.XMLNode)
                                  dependency := core_domain.NewCodeDependency("", "")
                          Severity: Minor
                          Found in pkg/application/deps/maven_analysis.go - About 55 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

                          Method HandleSpaces has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                              protected void HandleSpaces() {
                                  char next = (char) _input.LA(1);
                          
                                  if ((_lastToken == null || _lastToken.getType() == PythonLexer.NEWLINE) && IsNotNewLineOrComment(next))
                                  {
                          Severity: Minor
                          Found in docs/compare/src/main/java/pyantlr/PythonBaseLexer.java - About 55 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

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

                          func BuildCallFromExpr(expr *ast.CallExpr, codeFunc *CodeFunction, fields []CodeField, imports []CodeImport, currentPackage string, localVars []CodeProperty) CodeCall {
                          Severity: Minor
                          Found in pkg/infrastructure/ast/ast_go/cocago_builder.go - About 45 mins to fix

                            Method ProcessStringLiteral has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                protected void ProcessStringLiteral()
                                {
                                    if (lastToken == null || lastToken.getType() == TypeScriptLexer.OpenBrace)
                                    {
                                        String text = getText();
                            Severity: Minor
                            Found in docs/compare/src/main/java/tsantlr/TypeScriptBaseLexer.java - About 45 mins to fix

                            Cognitive Complexity

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

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

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

                            Further reading

                            Severity
                            Category
                            Status
                            Source
                            Language