fujaba/NetworkParser

View on GitHub
src/main/java/de/uniks/networkparser/parser/ExcelCell.java

Summary

Maintainability
C
1 day
Test Coverage

ExcelCell has 30 methods (exceeds 20 allowed). Consider refactoring.
Open

public class ExcelCell implements SendableEntityCreatorTag, EntityList {
    public static final String TAG = "c";
    public static final String PROPERTY_STYLE = "s";
    public static final String PROPERTY_TYPE = "t";
    public static final String PROPERTY_REFERENZ = "r";
Severity: Minor
Found in src/main/java/de/uniks/networkparser/parser/ExcelCell.java - About 3 hrs to fix

    Method toString has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

        @Override
        public String toString() {
            String ref = "";
            if (this.pos != null) {
                ref = this.pos.toString();
    Severity: Minor
    Found in src/main/java/de/uniks/networkparser/parser/ExcelCell.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 toString has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @Override
        public String toString() {
            String ref = "";
            if (this.pos != null) {
                ref = this.pos.toString();
    Severity: Minor
    Found in src/main/java/de/uniks/networkparser/parser/ExcelCell.java - About 1 hr to fix

      Avoid too many return statements within this method.
      Open

              return false;
      Severity: Major
      Found in src/main/java/de/uniks/networkparser/parser/ExcelCell.java - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return true;
        Severity: Major
        Found in src/main/java/de/uniks/networkparser/parser/ExcelCell.java - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return "<c r=\"" + ref + "\" t=\"b\"><v>0</v></c>";
          Severity: Major
          Found in src/main/java/de/uniks/networkparser/parser/ExcelCell.java - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return "<c r=\"" + ref + "\" t=\"inlineStr\"><is><t>"
                            + new String(context.toString().getBytes(Charset.forName("UTF-8")), Charset.forName("UTF-8"))
                            + "</t></is></c>";
            Severity: Major
            Found in src/main/java/de/uniks/networkparser/parser/ExcelCell.java - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

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

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

                    public boolean setContent(Object value) {
                        if (referenceCell != null) {
                            return referenceCell.setContent(value);
                        }
                        if ((this.content == null && value != null) || (this.content != null && this.content.equals(value) == false)) {
                Severity: Minor
                Found in src/main/java/de/uniks/networkparser/parser/ExcelCell.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 add has a Cognitive Complexity of 6 (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/parser/ExcelCell.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