fujaba/NetworkParser

View on GitHub
src/main/java/de/uniks/networkparser/Tokener.java

Summary

Maintainability
A
3 hrs
Test Coverage

Tokener has 21 methods (exceeds 20 allowed). Consider refactoring.
Open

public class Tokener {
    public static final String PROPS = "prop";
    public static final char ENTER = '=';
    public static final char COLON = ':';

Severity: Minor
Found in src/main/java/de/uniks/networkparser/Tokener.java - About 2 hrs to fix

    Method nextValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public Object nextValue(Buffer buffer, BaseItem creator, boolean allowQuote, boolean allowDuppleMark, char c) {
    Severity: Minor
    Found in src/main/java/de/uniks/networkparser/Tokener.java - About 35 mins to fix

      Method nextString has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public CharacterBuffer nextString(Buffer buffer, CharacterBuffer sc, boolean allowCRLF, boolean nextStep,
                  char... quotes) {
      Severity: Minor
      Found in src/main/java/de/uniks/networkparser/Tokener.java - About 35 mins to fix

        Method encode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            public BaseItem encode(Object entity, MapEntity map) {
                IdMap idMap = this.map;
                if (this.map == null) {
                    if (map == null) {
                        return null;
        Severity: Minor
        Found in src/main/java/de/uniks/networkparser/Tokener.java - About 25 mins 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

        There are no issues that match your filters.

        Category
        Status