fujaba/NetworkParser

View on GitHub

Showing 3,691 of 4,645 total issues

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

    public String getId(boolean full) {
        if (full == false) {
            return id;
        }
        if (this.owner != null) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/parser/Template.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 addInfo has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private Entity addInfo(Association edge, boolean cardinality, boolean property) {
        Entity result = (Entity) factory.getNewList(true);
        if (edge == null) {
            return result;
        }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/converter/GraphConverter.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 final StringContainer with(char src) {
    if (value == null) {
      this.value = new CharacterBuffer().with(src);

    } else if (value instanceof CharacterBuffer) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/buffer/StringContainer.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 getNodeHeader has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public GraphCustomItem getNodeHeader(GraphEntity entity) {
        GraphSimpleSet children = GraphUtil.getChildren(entity);
        if (children != null) {
            for (GraphMember member : children) {
                if (member instanceof GraphCustomItem) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/converter/GraphConverter.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 parseEdge has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private Entity parseEdge(String type, GraphEntity source, GraphEntity target, Association edge, boolean shortName,
            ArrayList<String> ids) {
        if (source instanceof Clazz && target instanceof Clazz) {
            return parseEdge(type, (Clazz) source, (Clazz) target, edge, shortName, ids);
        }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/converter/GraphConverter.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 executeClazz has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public TemplateResultFile executeClazz(Clazz clazz, LocalisationInterface parameters, boolean isStandard) {
        if (isValid(clazz, parameters) == false) {
            return null;
        }
        TemplateResultFile templateResult = createResultFile(clazz, isStandard);
Severity: Minor
Found in src/main/java/de/uniks/networkparser/parser/Template.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 decode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public byte[] decode(CharSequence value) {
        if (value == null) {
            return null;
        }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/converter/ByteConverterBinary.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 decode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public byte[] decode(byte[] values) {
        if (values == null || values.length < 1) {
            return null;
        }
        int len = values.length;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/converter/ByteConverterHTTP.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 getMetric has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private GraphMetric getMetric(TemplateItem member) {
        GraphSimpleSet children = GraphUtil.getChildren(member);
        if (children != null) {
            for (GraphMember item : children) {
                if (item instanceof GraphMetric) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/converter/CodeCityConverter.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

    protected boolean checkCondition(GraphMatcher matches, Match match) {
        if (match == null || matches == null) {
            return false;
        }
        Clazz sourceClazz = (Clazz) match.getMatch();

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

    protected boolean checkCondition(GraphMatcher matches, Match match) {
        if (match == null || matches == null) {
            return false;
        }
        GraphMember member = match.getMatch();
Severity: Minor
Found in src/main/java/de/uniks/networkparser/parser/differ/AddCondition.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 getHeaderWorkbook has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private String getHeaderWorkbook(ExcelWorkBook content, int id) {
        CharacterBuffer data = new CharacterBuffer().with(HEADER);
        data.with(
                "<workbook xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\">\r\n    <sheets>\r\n");
        for (int i = 0; i < content.size(); i++) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/parser/ExcelParser.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 parseFormalParamList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private String parseFormalParamList() {
        StringBuilder paramList = new StringBuilder().append('(');

        /* '(' (type name[,] )* ') [throws type , (type,)*] */
        skip("(", true);
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

    protected boolean checkCondition(GraphMatcher matches, Match match) {
        if (match == null || matches == null || match.getOtherMatch() == null) {
            return false;
        }
        Association sourceAssociation = (Association) match.getMatch();

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

    private boolean addChange(GraphMatcher matches, Match match, Method sourceMethod, Method otherMethod) {
        if (matches.getMetaModel() != null && (match.isMetaSourceMatch() || match.isMetaMatch())) {
            return false;
        }
        if (sourceMethod.getName().equals(otherMethod.getName())) {

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

    protected boolean checkCondition(GraphMatcher matches, Match match) {
        if (match == null || matches == null) {
            return false;
        }
        GraphMember sourceAttribute = match.getMatch();

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

    public Clazz parse(CharacterBuffer sequence) {
        if (this.code == null) {
            /* FIX IT */
            this.code = new SourceCode();
            this.code.with(new Clazz(""));
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 addChange has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private boolean addChange(GraphMatcher matches, Match match, Association sourceAssociation,
            Association otherAssociation) {
        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 addChange has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private boolean addChange(GraphMatcher matches, Match match, Clazz sourceClazz, Clazz otherClazz) {
        if (match == null || matches == null) {
            return false;
        }
        if (matches.getMetaModel() != null && (match.isMetaMatch() || match.isMetaSourceMatch())) {

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

    protected boolean checkCondition(GraphMatcher matches, Match match) {
        if (matches == null || matches.getMetaModel() == null) {
            return false;
        }
        GraphMember member = match.getMatch();
Severity: Minor
Found in src/main/java/de/uniks/networkparser/parser/differ/RemoveCondition.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