fujaba/NetworkParser

View on GitHub

Showing 4,645 of 4,645 total issues

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

    int evaluateAt(int a) {
        if (a == 0 || coefficients == null) {
            /* Just return the x^0 coefficient */
            return getCoefficient(0);
        }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/bytes/qr/GenericGFPoly.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

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

    public String toBinaryString() {
        if (values == null || values.length < 1) {
            return "";
        }
        byte[] result = new byte[values.length * 9 + 9];
Severity: Minor
Found in src/main/java/de/uniks/networkparser/bytes/ByteEntity.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

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

    public boolean log(String type, Object... args) {
        if (type == null || condition == null || args == null) {
            return false;
        }
        if (args.length == 1) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/NetworkParserLog.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

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

    FormatInformation readFormatInformation() {
        if (parsedFormatInfo != null || bitMatrix == null) {
            return parsedFormatInfo;
        }

Severity: Minor
Found in src/main/java/de/uniks/networkparser/bytes/qr/BitMatrixParser.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

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

    private static void embedPositionDetectionPattern(int xStart, int yStart, ByteMatrix matrix) {
        if (matrix != null) {
            for (int y = 0; y < 7; ++y) {
                for (int x = 0; x < 7; ++x) {
                    matrix.set(xStart + x, yStart + y, POSITION_DETECTION_PATTERN[y][x]);
Severity: Minor
Found in src/main/java/de/uniks/networkparser/bytes/qr/QRTokener.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

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

    private static boolean embedTimingPatterns(ByteMatrix matrix) {
        if (matrix == null) {
            return false;
        }
        /*
Severity: Minor
Found in src/main/java/de/uniks/networkparser/bytes/qr/QRTokener.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

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

    public int convert(Object entity, String property, Object value, IdMap map, int deep) {
        if (this.convertable == null && this.property == null) {
            return 1;
        }
        SimpleEvent event = new SimpleEvent(this.strategy, map, property, deep, null, entity, value, null);
Severity: Minor
Found in src/main/java/de/uniks/networkparser/Filter.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

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

    @Override
    public void publish(LogRecord record) {
        if (global != null && global != this) {
            global.publish(record);
            return;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/NetworkParserLog.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

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

    public SimpleKeyValueList<K, V> addToKeyValue(Object key, Number value) {
        int pos = hasKeyAndPos(key);
        if (pos < 0) {
            return this;
        }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/list/SimpleKeyValueList.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

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

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

    public String toGITString() {
        if (System.getenv().get("BUILD_NUMBER") != null) {
            try {
                pomNumber[5] = Integer.valueOf(System.getenv().get("BUILD_NUMBER"));
            } catch (Exception e) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/xml/ArtifactFile.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

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

  final int getArrayFlag(int size) {
    if (size == 0) {
      return 0;
    }
    if ((flag & BIDI) > 0) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/list/AbstractArray.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

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

  public void pack() {
    if (elements == null) {
      return;
    }
    boolean complex = isComplex(size);
Severity: Minor
Found in src/main/java/de/uniks/networkparser/list/AbstractArray.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

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

    protected String parseItem(EntityStringConverter converter) {
        int length = this.size();
        if (length == 0 || converter == null) {
            return "{}";
        }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/json/JsonObject.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

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

    @Override
    public boolean contains(Object o) {
        if (size < MINHASHINGSIZE) {
            for (int pos = 0; pos < this.size; pos++) {
                if (o == elements[pos++]) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/list/SpeedList.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

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

    @Override
    public boolean update(Object value) {
        if (value instanceof SimpleEvent == false) {
            return false;
        }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/logic/MapCondition.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

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

    public SimpleEntity<K, V> with(Map<Object, Object> collection) {
        if (collection != null) {
            Iterator<Entry<Object, Object>> i = collection.entrySet().iterator();
            while (i.hasNext()) {
                Entry<Object, Object> e = i.next();
Severity: Minor
Found in src/main/java/de/uniks/networkparser/list/SimpleEntity.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

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

    @Override
    public Object getValue(LocalisationInterface value) {
        if (value instanceof SendableEntityCreator) {
            SendableEntityCreator variables = (SendableEntityCreator) value;
            Object object = variables.getValue(variables, this.key);
Severity: Minor
Found in src/main/java/de/uniks/networkparser/logic/Equals.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

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

  public BaseItem subList(int fromIndex, int toIndex) {
    BaseItem newInstance = getNewList(false);
    if (fromIndex < 0) {
      fromIndex += size;
    }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/list/AbstractArray.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

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

    public boolean updateSet(Object evt) {
        Set<ObjectCondition> list = getList();
        boolean result = true;
        for (ObjectCondition item : list) {
            if (item.update(evt) == false) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/logic/ListCondition.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

Severity
Category
Status
Source
Language