fujaba/NetworkParser

View on GitHub
src/main/java/de/uniks/networkparser/converter/DotConverter.java

Summary

Maintainability
D
2 days
Test Coverage

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

    public String encode(BaseItem entity, boolean removePackage) {
        if (entity instanceof GraphModel == false) {
            return "";
        }
        GraphModel root = (GraphModel) entity;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/converter/DotConverter.java - About 7 hrs 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 90 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public String encode(BaseItem entity, boolean removePackage) {
        if (entity instanceof GraphModel == false) {
            return "";
        }
        GraphModel root = (GraphModel) entity;
Severity: Major
Found in src/main/java/de/uniks/networkparser/converter/DotConverter.java - About 3 hrs to fix

    File DotConverter.java has 301 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    package de.uniks.networkparser.converter;
    
    /*
    NetworkParser
    The MIT License
    Severity: Minor
    Found in src/main/java/de/uniks/networkparser/converter/DotConverter.java - About 3 hrs to fix

      Method decodeNode has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

          GraphEntity decodeNode(GraphList graph, BufferItem value) {
              if (graph == null || value == null) {
                  return null;
              }
              char c = value.nextClean(true);
      Severity: Minor
      Found in src/main/java/de/uniks/networkparser/converter/DotConverter.java - About 1 hr 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 decodeEdge has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

          void decodeEdge(GraphList graph, BufferItem value) {
              if (graph == null || value == null) {
                  return;
              }
              char endChar;
      Severity: Minor
      Found in src/main/java/de/uniks/networkparser/converter/DotConverter.java - About 1 hr 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 decodeNode has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          GraphEntity decodeNode(GraphList graph, BufferItem value) {
              if (graph == null || value == null) {
                  return null;
              }
              char c = value.nextClean(true);
      Severity: Minor
      Found in src/main/java/de/uniks/networkparser/converter/DotConverter.java - About 1 hr to fix

        Method decodeGraph has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            GraphList decodeGraph(BufferItem value) {
                if (value == null) {
                    return null;
                }
                char c = value.nextClean(true);
        Severity: Minor
        Found in src/main/java/de/uniks/networkparser/converter/DotConverter.java - About 1 hr to fix

          Method decodeAttributes has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              void decodeAttributes(GraphEntity node, BufferItem value) {
                  if (node == null || value == null) {
                      return;
                  }
                  value.skipTo('[', false);
          Severity: Minor
          Found in src/main/java/de/uniks/networkparser/converter/DotConverter.java - About 1 hr 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 decodeGraph has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              GraphList decodeGraph(BufferItem value) {
                  if (value == null) {
                      return null;
                  }
                  char c = value.nextClean(true);
          Severity: Minor
          Found in src/main/java/de/uniks/networkparser/converter/DotConverter.java - About 1 hr 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 decodeEdge has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              void decodeEdge(GraphList graph, BufferItem value) {
                  if (graph == null || value == null) {
                      return;
                  }
                  char endChar;
          Severity: Minor
          Found in src/main/java/de/uniks/networkparser/converter/DotConverter.java - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status