LoboEvolution/LoboEvolution

View on GitHub

Showing 3,825 of 16,019 total issues

CSSStyleDeclaration3Test has 150 methods (exceeds 20 allowed). Consider refactoring.
Open

@ExtendWith(AlertsExtension.class)
public class CSSStyleDeclaration3Test extends LoboUnitTest {


    @Test

    File PDFParser.java has 1149 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * MIT License
     *
     * Copyright (c) 2014 - 2024 LoboEvolution
     *
    Severity: Major
    Found in LoboPDF/src/main/java/org/loboevolution/pdfview/PDFParser.java - About 2 days to fix

      File ElementImpl.java has 1134 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

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

        Method layoutContainer has a Cognitive Complexity of 142 (exceeds 5 allowed). Consider refactoring.
        Open

                @Override
                public void layoutContainer(final Container parent) {
                    final int tabPlacement = tabPane.getTabPlacement();
                    final int tc = tabPane.getTabCount();
                    final Insets insets = tabPane.getInsets();
        Severity: Minor
        Found in LoboJTattoo/src/main/java/com/jtattoo/plaf/BaseTabbedPaneUI.java - About 2 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 HTMLDocumentTest.java has 1128 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

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

          File HTMLOptionElement2Test.java has 1124 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

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

            File CanvasRenderingContext2DTest.java has 1121 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

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

              AbstractTheme has 145 methods (exceeds 20 allowed). Consider refactoring.
              Open

              @EqualsAndHashCode(callSuper = true)
              @Slf4j
              @Data
              public abstract class AbstractTheme extends MetalTheme {
                  
              Severity: Major
              Found in LoboJTattoo/src/main/java/com/jtattoo/plaf/AbstractTheme.java - About 2 days to fix

                File NodeImpl.java has 1116 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

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

                  File DOMNodeTest.java has 1116 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/junit/DOMNodeTest.java - About 2 days to fix

                    Method getClippingShape has a Cognitive Complexity of 139 (exceeds 5 allowed). Consider refactoring.
                    Open

                        protected Shape getClippingShape(final SVGElement clippedElement) {
                            Area clipArea = null;
                            final AffineTransform clipTransform = new AffineTransform();
                            if (hasChildNodes()) {
                                final NodeListImpl children = (NodeListImpl) getChildNodes();

                    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

                    HTMLSelectElementTest has 142 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    @ExtendWith(AlertsExtension.class)
                    public class HTMLSelectElementTest extends LoboUnitTest {
                    
                        @Test
                        @Alerts({"3", "1", "3", "0"})

                      Method selectsPseudoClass has a Cognitive Complexity of 136 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private boolean selectsPseudoClass(final Condition condition, final HTMLElement element, final boolean mouseOver) {
                              final String value = condition.getValue();
                              switch (value) {
                                  case "hover":
                                      setMouseOver(true);

                      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 StyleSheetRenderState.java has 1085 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

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

                        File HTMLElementImpl.java has 1075 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

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

                          File PDFFile.java has 1071 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /*
                           * MIT License
                           *
                           * Copyright (c) 2014 - 2024 LoboEvolution
                           *
                          Severity: Major
                          Found in LoboPDF/src/main/java/org/loboevolution/pdfview/PDFFile.java - About 2 days to fix

                            File NodeTest.java has 1067 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/dom/NodeTest.java - About 2 days to fix

                              DocumentImpl has 136 methods (exceeds 20 allowed). Consider refactoring.
                              Open

                              public class DocumentImpl extends NodeImpl implements Document, XPathEvaluator {
                              
                                  private boolean strictErrorChecking = true;
                              
                                  private boolean xmlStandalone;

                                File EventTest.java has 1043 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/event/EventTest.java - About 2 days to fix

                                  HTMLDocumentTest has 130 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  @ExtendWith(AlertsExtension.class)
                                  public class HTMLDocumentTest extends LoboUnitTest {
                                  
                                  
                                      static final String[] JQUERY_CUSTOM_SELECTORS = {"div.submenu-last:last",
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language