LoboEvolution/LoboEvolution

View on GitHub

Showing 14,117 of 14,117 total issues

Method parseToken has 365 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private int parseToken(final Node parent, final LineNumberReader reader, final Set<HTMLTag> stopTags,
                           final LinkedList<String> ancestors) throws IOException, StopException {
        final Document doc = this.document;
        final HTMLDocumentImpl htmlDoc = (HTMLDocumentImpl) doc;
        final StringBuilder textSb = this.readUpToTagBegin(reader);
Severity: Major
Found in LoboHTML/src/main/java/org/loboevolution/html/parser/XHtmlParser.java - About 1 day to fix

    File XMLDocument.java has 772 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * MIT License
     *
     * Copyright (c) 2014 - 2024 LoboEvolution
     *
    Severity: Major
    Found in LoboHTML/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java - About 1 day to fix

      HTMLInputElement has 95 methods (exceeds 20 allowed). Consider refactoring.
      Open

      public interface HTMLInputElement extends HTMLElement {
      
          /**
           * Sets or retrieves a comma-separated list of content types.
           *

        File CSSMediaRuleTest.java has 770 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * MIT License
         *
         * Copyright (c) 2014 - 2024 LoboEvolution
         *

          File HTMLIFrameElement2Test.java has 768 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*
           * MIT License
           *
           * Copyright (c) 2014 - 2024 LoboEvolution
           *

            Method parseForEndTag has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
            Open

                private int parseForEndTag(final Node parent, final LineNumberReader reader, final String tagName,
                                           final boolean addTextNode, final boolean decodeEntities) throws IOException {
                    final Document doc = this.document;
                    int intCh;
                    StringBuilder sb = new StringBuilder();
            Severity: Minor
            Found in LoboHTML/src/main/java/org/loboevolution/html/parser/XHtmlParser.java - About 1 day 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 TableMatrixSizes.java has 745 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
             * MIT License
             *
             * Copyright (c) 2014 - 2024 LoboEvolution
             *

              ComputedCSSStyleDeclarationTest has 91 methods (exceeds 20 allowed). Consider refactoring.
              Open

              @ExtendWith(AlertsExtension.class)
              public class ComputedCSSStyleDeclarationTest extends LoboUnitTest {
              
                  @Test
                  @Alerts({"[object CSSStyleDeclaration]", "[object CSSStyleDeclaration]"})

                File HTMLElementTest.java has 743 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*
                 * MIT License
                 *
                 * Copyright (c) 2014 - 2024 LoboEvolution
                 *

                  File HTMLDialogElementTest.java has 740 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /*
                   * MIT License
                   *
                   * Copyright (c) 2014 - 2024 LoboEvolution
                   *

                    Method set2D has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring.
                    Open

                        void set2D(final int[] prev, final int[] curr, final int changingElemSize, final int[] currentChangeElement) {
                    
                            // reset to defaults on each line
                            isWhite = true;
                            currIndex = 0;
                    Severity: Minor
                    Found in LoboPDF/src/main/java/org/jpedal/io/filter/ccitt/CCITT2D.java - About 1 day 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 parse has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private void parse(final byte[] cs, final GeneralPath gp, final FlPoint pt, final FlPoint wid) {
                            int loc = 0;
                            float x1, x2, x3, y1, y2, y3;
                            boolean flexMode = false;
                            final float[] flexArray = new float[16];
                    Severity: Minor
                    Found in LoboPDF/src/main/java/org/loboevolution/pdfview/font/Type1Font.java - About 1 day 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 HTMLTableElementTest.java has 731 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*
                     * MIT License
                     *
                     * Copyright (c) 2014 - 2024 LoboEvolution
                     *

                      Window has 89 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      public interface Window
                              extends EventTarget, GlobalEventHandlers, WindowBase64, WindowConsole,
                              WindowEventHandlers, WindowOrWorkerGlobalScope, WindowTimers, AbstractView {
                      
                          /**
                      Severity: Major
                      Found in LoboW3C/src/main/java/org/loboevolution/js/Window.java - About 1 day to fix

                        File XPATHErrorResources.java has 724 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /*
                         * MIT License
                         *
                         * Copyright (c) 2014 - 2024 LoboEvolution
                         *

                          File XMLDocumentTest.java has 717 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /*
                           * MIT License
                           *
                           * Copyright (c) 2014 - 2024 LoboEvolution
                           *
                          Severity: Major
                          Found in LoboUnitTest/src/test/java/org/loboevolution/xml/XMLDocumentTest.java - About 1 day to fix

                            File HTMLOptionsCollectionTest.java has 707 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /*
                             * MIT License
                             *
                             * Copyright (c) 2014 - 2024 LoboEvolution
                             *

                              Method paintBackground has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  @Override
                                  protected void paintBackground(final Graphics g, final AbstractButton b) {
                                      if (b.getParent() instanceof JToolBar) {
                                          b.setContentAreaFilled(true);
                                      }
                              Severity: Minor
                              Found in LoboJTattoo/src/main/java/com/jtattoo/plaf/mcwin/McWinButtonUI.java - About 1 day 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 HTMLCollectionTest.java has 697 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /*
                               * MIT License
                               *
                               * Copyright (c) 2014 - 2024 LoboEvolution
                               *

                                File BaseRootPaneUI.java has 695 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /*
                                 * MIT License
                                 *
                                 * Copyright (c) 2014 - 2024 LoboEvolution
                                 *
                                Severity: Major
                                Found in LoboJTattoo/src/main/java/com/jtattoo/plaf/BaseRootPaneUI.java - About 1 day to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language