sparklemotion/nokogiri

View on GitHub

Showing 383 of 516 total issues

File XmlSchema.java has 349 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package nokogiri;
 
import static nokogiri.internals.NokogiriHelpers.adjustSystemIdIfNecessary;
import static nokogiri.internals.NokogiriHelpers.getNokogiriClass;
 
 
Severity: Minor
Found in ext/java/nokogiri/XmlSchema.java - About 4 hrs to fix

    Method getDTMHandleFromNode has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    @Override
    public /* synchronized */ int
    getDTMHandleFromNode(org.w3c.dom.Node node)
    {
    //if (node == null) // "node must be non-null for getDTMHandleFromNode!");
    Severity: Minor
    Found in ext/java/nokogiri/internals/XalanDTMManagerPatch.java - About 4 hrs to fix

    Method removeDotSegments has 101 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    private static String
    removeDotSegments(String path)
    {
     
    // 1. The input buffer is initialized with the now-appended path
    Severity: Major
    Found in ext/java/nokogiri/internals/c14n/Canonicalizer11.java - About 4 hrs to fix

      Method visit_function has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

      def visit_function(node)
      msg = :"visit_function_#{node.value.first.gsub(/[(]/, "")}"
      return send(msg, node) if respond_to?(msg)
       
      case node.value.first
      Severity: Minor
      Found in lib/nokogiri/css/xpath_visitor.rb - About 3 hrs to fix

      File XMLUtils.java has 327 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
      * Licensed to the Apache Software Foundation (ASF) under one
      * or more contributor license agreements. See the NOTICE file
      * distributed with this work for additional information
      * regarding copyright ownership. The ASF licenses this file
      Severity: Minor
      Found in ext/java/nokogiri/internals/c14n/XMLUtils.java - About 3 hrs to fix

        NokogiriHandler has 31 methods (exceeds 20 allowed). Consider refactoring.
        Open

        public class NokogiriHandler extends DefaultHandler2 implements XmlDeclHandler
        {
         
        StringBuilder charactersBuilder;
        private final Ruby runtime;
        Severity: Minor
        Found in ext/java/nokogiri/internals/NokogiriHandler.java - About 3 hrs to fix

          NokogiriService has 31 methods (exceeds 20 allowed). Consider refactoring.
          Open

          public class NokogiriService implements BasicLibraryService
          {
          public boolean
          basicLoad(Ruby ruby)
          {
          Severity: Minor
          Found in ext/java/nokogiri/NokogiriService.java - About 3 hrs to fix

            Class NodeSet has 31 methods (exceeds 20 allowed). Consider refactoring.
            Open

            class NodeSet
            include Nokogiri::XML::Searchable
            include Enumerable
             
            # The Document this NodeSet is associated with
            Severity: Minor
            Found in lib/nokogiri/xml/node_set.rb - About 3 hrs to fix

              Method process_recipe has 92 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              def process_recipe(name, version, static_p, cross_p, cacheable_p = true)
              require "rubygems"
              gem("mini_portile2", REQUIRED_MINI_PORTILE_VERSION) # gemspec is not respected at install time
              require "mini_portile2"
              message("Using mini_portile version #{MiniPortile::VERSION}\n")
              Severity: Major
              Found in ext/nokogiri/extconf.rb - About 3 hrs to fix

                XmlNodeSet has 30 methods (exceeds 20 allowed). Consider refactoring.
                Open

                @JRubyClass(name = "Nokogiri::XML::NodeSet")
                public class XmlNodeSet extends RubyObject implements NodeList
                {
                private static final long serialVersionUID = 1L;
                 
                 
                Severity: Minor
                Found in ext/java/nokogiri/XmlNodeSet.java - About 3 hrs to fix

                  Method canonicalizeSubTree has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  protected final void
                  canonicalizeSubTree(
                  Node currentNode, NameSpaceSymbTable ns, Node endnode, int documentLevel, CanonicalFilter filter
                  ) throws CanonicalizationException, IOException
                  {
                  Severity: Major
                  Found in ext/java/nokogiri/internals/c14n/CanonicalizerBase.java - About 3 hrs to fix

                    File NokogiriHandler.java has 318 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    package nokogiri.internals;
                     
                    import static nokogiri.internals.NokogiriHelpers.getLocalPart;
                    import static nokogiri.internals.NokogiriHelpers.getPrefix;
                    import static nokogiri.internals.NokogiriHelpers.isNamespace;
                    Severity: Minor
                    Found in ext/java/nokogiri/internals/NokogiriHandler.java - About 3 hrs to fix

                      Method addNode has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                      Open

                      protected int
                      addNode(Node node, int parentIndex,
                      int previousSibling, int forceNodeType)
                      {
                      int nodeIndex = m_nodes.size();
                      Severity: Minor
                      Found in ext/java/nokogiri/internals/dom2dtm/DOM2DTM.java - About 3 hrs to fix

                      ReaderNode has 29 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      public abstract class ReaderNode
                      {
                       
                      final Ruby ruby;
                      public ReaderAttributeList attributeList;
                      Severity: Minor
                      Found in ext/java/nokogiri/internals/ReaderNode.java - About 3 hrs to fix

                        Method protectAgainstWrappingAttack has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                        Open

                        public static boolean
                        protectAgainstWrappingAttack(
                        Node startNode, Element knownElement, String value
                        )
                        {
                        Severity: Minor
                        Found in ext/java/nokogiri/internals/c14n/XMLUtils.java - About 3 hrs to fix

                        Method handleAttributesSubtree has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                        Open

                        @Override
                        protected Iterator<Attr>
                        handleAttributesSubtree(Element element, NameSpaceSymbTable ns)
                        throws CanonicalizationException
                        {
                        Severity: Minor
                        Found in ext/java/nokogiri/internals/c14n/Canonicalizer20010315Excl.java - About 3 hrs to fix

                        Method parse has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def parse(
                        input,
                        url_ = nil, encoding_ = nil, options_ = XML::ParseOptions::DEFAULT_HTML,
                        url: url_, encoding: encoding_, options: options_
                        )
                        Severity: Minor
                        Found in lib/nokogiri/html4/document.rb - About 3 hrs to fix

                        Method startElement has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                        @Override
                        public void
                        startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException
                        {
                        final Ruby runtime = this.runtime;
                        Severity: Minor
                        Found in ext/java/nokogiri/internals/NokogiriHandler.java - About 3 hrs to fix

                        File NameSpaceSymbTable.java has 302 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /**
                        * Licensed to the Apache Software Foundation (ASF) under one
                        * or more contributor license agreements. See the NOTICE file
                        * distributed with this work for additional information
                        * regarding copyright ownership. The ASF licenses this file
                        Severity: Minor
                        Found in ext/java/nokogiri/internals/c14n/NameSpaceSymbTable.java - About 3 hrs to fix

                          XmlDtd has 27 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                          @JRubyClass(name = "Nokogiri::XML::DTD", parent = "Nokogiri::XML::Node")
                          public class XmlDtd extends XmlNode
                          {
                          private static final long serialVersionUID = 1L;
                           
                           
                          Severity: Minor
                          Found in ext/java/nokogiri/XmlDtd.java - About 3 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language