fujaba/NetworkParser

View on GitHub

Showing 4,645 of 4,645 total issues

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

    @Override
    public CharacterBuffer subSequence(int start, int end) {
        int len = end - start;
        if (len < 0 || buffer == null) {
            return new CharacterBuffer();
Severity: Minor
Found in src/main/java/de/uniks/networkparser/buffer/ByteBuffer.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 addBigIntegerLength has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public void addBigIntegerLength(int length) {
        if (length > 127) {
            int size = 1;
            int val = length;

Severity: Minor
Found in src/main/java/de/uniks/networkparser/buffer/DERBuffer.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 element, String attrName, Object value, String type) {
        if (element instanceof NodeProxyMessages) {
            NodeProxySQL nodeProxy = (NodeProxySQL) element;
            if (PROPERTY_DATABASE.equals(attrName)) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/petaf/proxy/NodeProxySQL.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 sending has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    protected boolean sending(Message msg) {
        if (super.sending(msg)) {
            return true;
        }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/petaf/proxy/NodeProxySQL.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 isNumericTypeContainer has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static final boolean isNumericTypeContainer(String typeA, String typeB) {
        if (typeA == null || typeB == null) {
            return typeA == typeB;
        }
        if (typeA.startsWith(javaLang)) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/EntityUtil.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 init has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private boolean init() {
        boolean success = true;
        try {
            /* Switch for Client / Server */
            if (proxy != null && NodeProxy.isInput(proxy.getType())) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/petaf/Server_UPD.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 toBytes has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public byte[] toBytes(boolean... all) {
        byte[] result;
        int i = start;
        if (all != null && all.length > 0 && all[0]) {
            result = new byte[length];
Severity: Minor
Found in src/main/java/de/uniks/networkparser/buffer/BufferedBuffer.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 remove has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  public char remove(int position) {
    if (value == null) {
      return 0;
    }
    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 withStart has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  public CharacterBuffer withStart(char item) {
    if (start > 0) {
      if (start > this.buffer.length) {
        start = this.buffer.length - 1;
      }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/buffer/CharacterBuffer.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

  public boolean add(Object... values) {
    if (values == null) {
      return true;
    }
    boolean addValues = true;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/buffer/CharacterBuffer.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

    @Override
    public Object getValue(Object element, String attrName) {
        if (element instanceof NodeProxyTCP) {
            NodeProxyTCP nodeProxy = (NodeProxyTCP) element;
            if (PROPERTY_URL.equals(attrName)) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/petaf/proxy/NodeProxyTCP.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 validateValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  private boolean validateValue() {
    if (buffer == null) {
      this.start = 0;
      this.length = 0;
      return true;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/buffer/CharacterBuffer.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 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 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 (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

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 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 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

Severity
Category
Status
Source
Language