Showing 400 of 533 total issues
Method engineCanonicalizeSubTree
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected byte[]
engineCanonicalizeSubTree(Node rootNode, Node excludeNode, CanonicalFilter filter)
throws CanonicalizationException
{
this.excludeNode = excludeNode;
Method native_write_to
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@JRubyMethod(required = 4, visibility = Visibility.PRIVATE)
public IRubyObject
native_write_to(ThreadContext context, IRubyObject[] args)
{
Method logicalNextDOMTextNode
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Node
logicalNextDOMTextNode(Node n)
{
Node p = n.getNextSibling();
if (p == null) {
Method createElementNode
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
createElementNode(Ruby ruby, String uri, String localName, String qName, XMLAttributes attrs, int depth,
Stack<String> langStack, Stack<String> xmlBaseStack)
Method evaluate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@JRubyMethod
public IRubyObject
evaluate(ThreadContext context, IRubyObject rbQuery, IRubyObject handler)
{
String query = rbQuery.convertToString().asJavaString();
- 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 dispatchNodeData
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("fallthrough")
protected static void
dispatchNodeData(Node node,
org.xml.sax.ContentHandler ch,
int depth)
- 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 getLocalName
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public String
getLocalName(int nodeHandle)
{
// if(JJK_NEWCODE)
// {
- 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 getOwnerDocument
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static Document
getOwnerDocument(Set<Node> xpathNodeSet)
{
NullPointerException npe = null;
for (Node node : xpathNodeSet) {
- 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 isDescendantOrSelf
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static boolean
isDescendantOrSelf(Node ctx, Node descendantOrSelf)
{
if (ctx == descendantOrSelf) {
return true;
- 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 removeNamespaceRecursively
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private void
removeNamespaceRecursively(XmlNode xmlNode)
{
Node node = xmlNode.node;
if (node.getNodeType() == Node.ELEMENT_NODE) {
- 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 getAttributesNodes
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public IRubyObject
getAttributesNodes()
{
RubyArray<?> array = RubyArray.newArray(ruby);
if (attributeList != null && attributeList.length > 0) {
- 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 dispatchCharactersEvents
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public void
dispatchCharactersEvents(
int nodeHandle, org.xml.sax.ContentHandler ch,
boolean normalize)
throws org.xml.sax.SAXException
- 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 getCachedNodeOrCreate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static IRubyObject
getCachedNodeOrCreate(Ruby runtime, Node node)
{
if (node == null) { return runtime.getNil(); }
if (node.getNodeType() == Node.ATTRIBUTE_NODE && isNamespace(node.getNodeName())) {
- 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 node_type
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@JRubyMethod(name = {"node_type", "type"})
public IRubyObject
node_type(ThreadContext context)
{
String 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 engineCanonicalizeSubTree
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected byte[]
engineCanonicalizeSubTree(Node rootNode, Node excludeNode, CanonicalFilter filter)
throws CanonicalizationException
{
this.excludeNode = excludeNode;
- 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 serializeAttrTextContent
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private static CharSequence
serializeAttrTextContent(String str, boolean htmlDoc)
{
if (str == null || str.length() == 0) { return ""; }
- 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 initialize
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def initialize(document, tags = nil, ctx = nil, options = ParseOptions::DEFAULT_XML) # rubocop:disable Lint/MissingSuper
return self unless tags
options = Nokogiri::XML::ParseOptions.new(options) if Integer === options
yield options if block_given?
- 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 extractDecls
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected IRubyObject[]
extractDecls(ThreadContext context, Node node)
{
List<IRubyObject> decls = new ArrayList<IRubyObject>();
while (node != null) {
- 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 read
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def read(len)
# no support for a call without len
unless @firstchunk
(@firstchunk = @io.read(len)) || return
- 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 create_element
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def create_element(name, *contents_or_attrs, &block)
elm = Nokogiri::XML::Element.new(name, self, &block)
contents_or_attrs.each do |arg|
case arg
when Hash
- 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"