Showing 400 of 537 total issues
Method nextNode
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected boolean
nextNode()
{
// Non-recursive one-fetch-at-a-time depth-first traversal with
// attribute/namespace nodes and white-space stripping.
Method lookupNamespaceURI
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public String
lookupNamespaceURI(String specifiedPrefix)
{
short type = this.getNodeType();
switch (type) {
- Read upRead up
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 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!");
- Read upRead up
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 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
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
- Read upRead up
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 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
NokogiriHandler
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
public class NokogiriHandler extends DefaultHandler2 implements XmlDeclHandler
{
StringBuilder charactersBuilder;
private final Ruby runtime;
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
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")
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;
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
{
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;
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();
- Read upRead up
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
ReaderNode
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class ReaderNode
{
final Ruby ruby;
public ReaderAttributeList attributeList;
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
{
- Read upRead up
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 protectAgainstWrappingAttack
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public static boolean
protectAgainstWrappingAttack(
Node startNode, Element knownElement, String value
)
{
- Read upRead up
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 24 (exceeds 5 allowed). Consider refactoring. Open
def parse(string_or_io, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML)
options = Nokogiri::XML::ParseOptions.new(options) if Integer === options
yield options if block_given?
url ||= string_or_io.respond_to?(:path) ? string_or_io.path : nil
- Read upRead up
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 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;
- Read upRead up
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 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
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;