fujaba/NetworkParser

View on GitHub
src/main/java/de/uniks/networkparser/graph/GraphList.java

Summary

Maintainability
B
5 hrs
Test Coverage

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

public class GraphList extends GraphModel {
    private String type = GraphTokener.CLASSDIAGRAM;
    private String style;
    private GraphOptions options;

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

    Method initSubLinks has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        public void initSubLinks() {
            for (GraphEntity node : getNodes()) {
                if (node instanceof Clazz == false) {
                    continue;
                }
    Severity: Minor
    Found in src/main/java/de/uniks/networkparser/graph/GraphList.java - About 55 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 add has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        @Override
        public boolean add(Object... values) {
            if (values == null) {
                return false;
            }
    Severity: Minor
    Found in src/main/java/de/uniks/networkparser/graph/GraphList.java - About 55 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 getEdge has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        public Association getEdge(GraphEntity node, String property) {
            if (property == null || node == null) {
                return null;
            }
            for (Association edge : getAssociations()) {
    Severity: Minor
    Found in src/main/java/de/uniks/networkparser/graph/GraphList.java - About 45 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

    Avoid too many return statements within this method.
    Open

            return null;
    Severity: Major
    Found in src/main/java/de/uniks/networkparser/graph/GraphList.java - About 30 mins to fix

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

          public Object getValue(Object key) {
              if (this.children == null) {
                  return null;
              }
              if (this.children instanceof GraphMember) {
      Severity: Minor
      Found in src/main/java/de/uniks/networkparser/graph/GraphList.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