fujaba/NetworkParser

View on GitHub
src/main/java/de/uniks/networkparser/ext/petaf/proxy/NodeProxyMessages.java

Summary

Maintainability
B
5 hrs
Test Coverage

Method getValue has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public Object getValue(Object element, String attrName) {
        if (element instanceof NodeProxyMessages) {
            NodeProxyMessages nodeProxy = (NodeProxyMessages) element;
            if (PROPERTY_URL.equals(attrName)) {

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 12 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public boolean setValue(Object element, String attrName, Object value, String type) {
        if (element instanceof NodeProxyMessages) {
            NodeProxyMessages nodeProxy = (NodeProxyMessages) element;
            if (PROPERTY_URL.equals(attrName)) {

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 10 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    protected boolean sending(Message msg) {
        if (super.sending(msg)) {
            return true;
        }

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

Avoid too many return statements within this method.
Open

        return super.setValue(element, attrName, value, type);

    Avoid too many return statements within this method.
    Open

                    return true;

      Avoid too many return statements within this method.
      Open

              return super.getValue(element, attrName);

        Avoid too many return statements within this method.
        Open

                        return nodeProxy.getMessageType();

          There are no issues that match your filters.

          Category
          Status