LoboEvolution/LoboEvolution

View on GitHub

Showing 14,117 of 14,117 total issues

Document has 112 methods (exceeds 20 allowed). Consider refactoring.
Open

public interface Document extends Node, NonElementParentNode, ParentNode, DocumentTraversal {

    /** Constant <code>XMLNS_NAMESPACE_URI="<a href="http://www.w3.org/2000/xmlns/">...</a>"</code> */
    String XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/";

Severity: Major
Found in LoboW3C/src/main/java/org/loboevolution/html/node/Document.java - About 2 days to fix

    BaseTabbedPaneUI has 112 methods (exceeds 20 allowed). Consider refactoring.
    Open

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

      File ElementOffsetWidthTest.java has 872 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

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

        HTMLInputElementTest has 109 methods (exceeds 20 allowed). Consider refactoring.
        Open

        @ExtendWith(AlertsExtension.class)
        public class HTMLInputElementTest extends LoboUnitTest {
        
            @Test
            @Alerts({"foo", "text", "textfield1", "form1", "cat"})

          File XPathParser.java has 866 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

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

            Method nextNode has a Cognitive Complexity of 104 (exceeds 5 allowed). Consider refactoring.
            Open

              @Override
              protected boolean nextNode() {
                // Non-recursive one-fetch-at-a-time depth-first traversal with
                // attribute/namespace nodes and white-space stripping.
                // Navigating the DOM is simple, navigating the DTM is simple;

            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 BaseTitlePane.java has 855 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/BaseTitlePane.java - About 2 days to fix

              File ElementClientWidthTest.java has 834 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

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

                File JBIG2Bitmap.java has 831 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/jpedal/jbig2/image/JBIG2Bitmap.java - About 1 day to fix

                  Method scaleImage has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private static BufferedImage scaleImage(final Raster ras, final int pX, final int pY, final int dComp, final int dBufferedImage) {
                  
                          int w = ras.getWidth();
                          int h = ras.getHeight();
                          int d = dBufferedImage;
                  Severity: Minor
                  Found in LoboPDF/src/main/java/org/jpedal/jbig2/jai/JBIG2ImageReader.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 ElementClientHeightTest.java has 829 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

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

                    Method setProperties has 393 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public void setProperties(final Properties props) {
                            if (props != null) {
                                if (props.getProperty("windowDecoration") != null) {
                                    windowDecoration = props.getProperty("windowDecoration").trim().equalsIgnoreCase("on");
                                }
                    Severity: Major
                    Found in LoboJTattoo/src/main/java/com/jtattoo/plaf/AbstractTheme.java - About 1 day to fix

                      CSSSelectorTest has 99 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      @ExtendWith(AlertsExtension.class)
                      public class CSSSelectorTest extends LoboUnitTest {
                      
                      
                          @Test
                      Severity: Major
                      Found in LoboUnitTest/src/test/java/org/loboevolution/css/CSSSelectorTest.java - About 1 day to fix

                        File BaseBorders.java has 793 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/BaseBorders.java - About 1 day to fix

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

                          /*
                           * MIT License
                           *
                           * Copyright (c) 2014 - 2024 LoboEvolution
                           *
                          LoboJTattoo/src/main/java/com/jtattoo/plaf/hifi/HiFiLookAndFeel.java on lines 1..285
                          LoboJTattoo/src/main/java/com/jtattoo/plaf/luna/LunaLookAndFeel.java on lines 1..292

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

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

                          /*
                           * MIT License
                           *
                           * Copyright (c) 2014 - 2024 LoboEvolution
                           *
                          LoboJTattoo/src/main/java/com/jtattoo/plaf/hifi/HiFiLookAndFeel.java on lines 1..285
                          LoboJTattoo/src/main/java/com/jtattoo/plaf/mint/MintLookAndFeel.java on lines 1..261

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

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

                          /*
                           * MIT License
                           *
                           * Copyright (c) 2014 - 2024 LoboEvolution
                           *
                          LoboJTattoo/src/main/java/com/jtattoo/plaf/luna/LunaLookAndFeel.java on lines 1..292
                          LoboJTattoo/src/main/java/com/jtattoo/plaf/mint/MintLookAndFeel.java on lines 1..261

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

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

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

                            File WindowEventHandlersImpl.java has 787 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

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

                              HTMLOptionsCollectionTest has 96 methods (exceeds 20 allowed). Consider refactoring.
                              Open

                              @ExtendWith(AlertsExtension.class)
                              public class HTMLOptionsCollectionTest extends LoboUnitTest {
                              
                                  @Test
                                  @Alerts({"0", "1", "foo*"})
                                Severity
                                Category
                                Status
                                Source
                                Language