Showing 513 of 515 total issues
File XmlNode.java
has 1156 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* (The MIT License)
*
* Copyright (c) 2008 - 2014:
*
Method getNodeCompletePath
has a Cognitive Complexity of 138 (exceeds 5 allowed). Consider refactoring. Open
public static String getNodeCompletePath(Node node) {
Node cur, tmp, next;
String buffer = "";
- 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
XmlNode
has 109 methods (exceeds 20 allowed). Consider refactoring. Open
@JRubyClass(name="Nokogiri::XML::Node")
public class XmlNode extends RubyObject {
protected static final String TEXT_WRAPPER_NAME = "nokogiri_text_wrapper";
/** The underlying Node object. */
Method nextNode
has a Cognitive Complexity of 98 (exceeds 5 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.
// Navigating the DOM is simple, navigating the DTM is simple;
- 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 DOM2DTM.java
has 816 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
File SaveContextVisitor.java
has 642 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* (The MIT License)
*
* Copyright (c) 2008 - 2012:
*
Class Node
has 75 methods (exceeds 20 allowed). Consider refactoring. Open
class Node
include Nokogiri::XML::PP::Node
include Nokogiri::XML::Searchable
include Enumerable
File extconf.rb
has 631 lines of code (exceeds 250 allowed). Consider refactoring. Open
ENV['RC_ARCHS'] = '' if RUBY_PLATFORM =~ /darwin/
require "mkmf"
require "rbconfig"
require "fileutils"
File element_description_defaults.rb
has 596 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Nokogiri
module HTML
class ElementDescription
# Methods are defined protected by method_defined? because at
Method handleAttributes
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected Iterator<Attr> handleAttributes(Element element, NameSpaceSymbTable ns)
throws CanonicalizationException {
// result will contain the attrs which have to be output
xmlattrStack.push(ns.getLevel());
- 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 handleAttributes
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected final Iterator<Attr> handleAttributes(Element element, NameSpaceSymbTable ns)
throws CanonicalizationException {
// result will contain the attrs which have to be output
final SortedSet<Attr> result = this.result;
- 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 a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
private static String removeDotSegments(String path) {
// 1. The input buffer is initialized with the now-appended path
// components then replace occurrences of "//" in the input buffer
// with "/" until no more occurrences of "//" are in the input buffer.
- 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 NokogiriHelpers.java
has 544 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* (The MIT License)
*
* Copyright (c) 2008 - 2014:
*
Method handleAttributes
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected Iterator<Attr> handleAttributes(Element element, NameSpaceSymbTable ns)
throws CanonicalizationException {
// result will contain the attrs which have to be output
xmlattrStack.push(ns.getLevel());
- 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 NokogiriService.java
has 484 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* (The MIT License)
*
* Copyright (c) 2008 - 2011:
*
File node.rb
has 481 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "stringio"
require "nokogiri/xml/node/save_options"
module Nokogiri
module XML
File XmlDocument.java
has 466 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* (The MIT License)
*
* Copyright (c) 2008 - 2014:
*
NokogiriHelpers
has 51 methods (exceeds 20 allowed). Consider refactoring. Open
public class NokogiriHelpers {
public static final String CACHED_NODE = "NOKOGIRI_CACHED_NODE";
public static final String ROOT_NODE_INVALID = "NOKOGIRI_ROOT_NODE_INVALID";
public static final String ENCODED_STRING = "NOKOGIRI_ENCODED_STRING";
File Canonicalizer11.java
has 452 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
SaveContextVisitor
has 49 methods (exceeds 20 allowed). Consider refactoring. Open
public class SaveContextVisitor {
private final StringBuilder buffer;
private final Stack<String> indentation;
private String encoding;