fujaba/NetworkParser

View on GitHub

Showing 3,691 of 4,645 total issues

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

    private void parseGenericTypeDefPart(CharacterBuffer typeString) {
        /* <T, T, ...> */
        skip("<", false);
        typeString.with('<');

Severity: Minor
Found in src/main/java/de/uniks/networkparser/parser/ParserEntity.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 checkCondition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    protected boolean checkCondition(GraphMatcher matches, Match match) {
        if (match == null || matches == null) {
            return false;
        }

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 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 create has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static final TemplateResultFragment create(GraphModel model, boolean useImport, boolean createModel) {
        TemplateResultFragment fragment = new TemplateResultFragment().withMember(model);
        fragment.useImport = useImport;
        if (createModel && model != null) {
            String classModel = "de.uniks.networkparser.ext.ClassModel";
Severity: Minor
Found in src/main/java/de/uniks/networkparser/parser/TemplateResultFragment.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

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

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

    public static final boolean removeYou(GraphMember value) {
        if (value == null) {
            return true;
        }
        value.setParentNode(null);
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/GraphUtil.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 setValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public boolean setValue(Object entity, String attribute, Object value, String type) {
        if (ITEM.equalsIgnoreCase(attribute)) {
            ((GraphPatternMatch) entity).withItem(value);
            return true;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/GraphPatternMatch.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 match has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean match(Clazz... clazzes) {
        if (clazzes == null) {
            return true;
        }
        for (Clazz clazz : clazzes) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/Feature.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 withExcludeClazz has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public Feature withExcludeClazz(Clazz... value) {
        if (this.reference) {
            return null;
        }
        if (value == null) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/Feature.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 getSeperator has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected String getSeperator() {
        if (getType() == AssociationTypes.GENERALISATION) {
            return "-^";
        }
        if (getOtherType() == AssociationTypes.GENERALISATION) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/Association.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 size has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public int size() {
        if (this.matches == null) {
            return 0;
        }
        int size = 0;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/GraphPatternMatch.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 withExcludeClazz has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public Feature withExcludeClazz(String... value) {
        if (this.reference) {
            return null;
        }
        if (value == null) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/Feature.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 getGraphDiff has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static final GraphSimpleSet getGraphDiff(GraphSimpleSet owner, GraphMember item) {
        if (item == null) {
            return owner;
        }
        if (owner == null) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/GraphUtil.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 fixDataType has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void fixDataType(DataType dataType) {
        if (dataType == null) {
            return;
        }
        Clazz clazz = dataType.getClazz();
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/GraphModel.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 isUndirectional has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static final boolean isUndirectional(Association assoc) {
        if (assoc == null) {
            return false;
        }
        if ((assoc.getType() == AssociationTypes.ASSOCIATION || assoc.getType() == AssociationTypes.UNDIRECTIONAL)
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/GraphUtil.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 toString has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public String toString(boolean ref) {
        String internName = this.getInternName(false, true);
        if(EntityUtil.isPrimitiveType(internName)) {
            if (ref) {
                return DataType.class.getSimpleName() + "." + internName.toUpperCase();
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/DataType.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 createType has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static final String createType(String value) {
        if (value == null) {
            return Clazz.TYPE_CLASS;
        }
        String trim = value.trim().toLowerCase();
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/GraphUtil.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 addValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected Annotation addValue(Annotation... values) {
        if (values == null) {
            return this;
        }
        SimpleList<?> list;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/graph/Annotation.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 RemoveSmall has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Benchmark
    @Warmup(iterations = 5, time = 1)
    @Measurement(iterations = 5, time = 1)
    @BenchmarkMode(Mode.AverageTime)
    public void RemoveSmall() {
Severity: Minor
Found in src/jmh/java/de/uniks/networkparser/test/CollectionTest_Small.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