fujaba/NetworkParser

View on GitHub

Showing 3,691 of 4,645 total issues

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

    public void screendump(String nameExtension) {
        Object snapshotParametersClass = ReflectionLoader.getClass("javafx.scene.SnapshotParameters");
        Object writableImageClass = ReflectionLoader.getClass("javafx.scene.image.WritableImage");
        Object image = ReflectionLoader.call(webView, "snapshot", snapshotParametersClass, null, writableImageClass,
                null);
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/DiagramEditor.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 formatNameBytes has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static int formatNameBytes(String name, byte[] buf, int offset, int length, NioZipEncoding encoding) {
        if (buf == null || name == null) {
            return -1;
        }
        int len = name.length();
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/io/TarUtils.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 readFully has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static int readFully(final InputStream input, final byte[] b, final int offset, final int len) {
        if (b == null || input == null || len < 0 || offset < 0 || len + offset > b.length) {
            return -1;
        }
        int count = 0, x = 0;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/io/FileBuffer.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

    public boolean init(Object items, Object total) {
        String type = getType(total);
        if (PACKAGE.equalsIgnoreCase(type)) {
            Collection<?> classes = (Collection<?>) ReflectionLoader.call(total, "getClasses");

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

  private boolean tryToConsumeSecondEOFRecord() {
    if (is == null) {
      return false;
    }
    boolean shouldReset = true;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/io/TarArchiveInputStream.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

    @Override
    public String toString() {
        char[] values = new char[remaining()];
        int len = lookAHead.length();
        if (len > 0) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/io/FileBuffer.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 save has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean save(Object value) {
        JsonObject model;
        if (value instanceof JsonObject) {
            model = (JsonObject) value;
        } else {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/DiagramEditor.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 toXML has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public XMLEntity toXML(String type) {
        XMLEntity messageXML = XMLEntity.TAG("message");
        if (type == MessageSession.TYPE_FCM) {
            messageXML.add("id", "");
            XMLEntity gcm = messageXML.createChild("gcm");
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/io/SocketMessage.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 analysePattern has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private ObjectCondition analysePattern(And parent, Clazz clazz, SimpleSet<GraphMember> visited) {
        if(clazz == null) {
            return null;
        }
        if(visited.add(clazz) == false) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/story/CucumberStdRule.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 getLastProxy has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public NodeProxy getLastProxy(String property) {
        NodeProxy lastItem = null;
        long max = Long.MIN_VALUE;
        for (NodeProxy item : proxies) {
            Object value = item.getValue(item, property);
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/petaf/Space.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 stop has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public void stop() {
        if (serverSocket != null) {
            try {
                ServerSocket socket = serverSocket;
                serverSocket = null;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/RESTServiceTask.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 checkServerResponse has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected boolean checkServerResponse(BufferedBuffer response, String code) {
        if (response == null || code == null) {
            return false;
        }
        if (response.length() < code.length()) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/io/MessageSession.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 withEnd has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public StoryStepSourceCode withEnd(int position) {
        if (position < -1) {
            this.endLine = -1;
        } else {
            if (position == 0 && startLine == 0 && this.currentLine > 0) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/story/StoryStepSourceCode.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 getUserName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public String getUserName(String... defaultName) {
        SimpleKeyValueList<String, String> parameterMap = getParameterMap();
        for (int i = 0; i < parameterMap.size(); i++) {
            String key = parameterMap.getKeyByIndex(i);
            if (USER.equalsIgnoreCase(key)) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/SimpleController.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 compareTo has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public int compareTo(ModelChange o) {
        if (this.getKey() == null) {
            return -1;
        }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/petaf/ModelChange.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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void run() {
        if (proxy.getUrl() != null) {
            Thread.currentThread().setName(proxy.getUrl() + ":" + proxy.getPort() + " com server");
        } else {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/petaf/Server_TCP.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 withoutTask has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public StoryBook withoutTask(Task... values) {
        if (values != null) {
            for (Task item : values) {
                if (item != null) {
                    this.children.remove((Object) item);
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/story/StoryBook.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 bind has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static SimpleReplication bind(SendableEntityCreator creator, Object root, String... tag) {
        Object item = ReflectionLoader.call(creator, "createIdMap", "");
        SimpleReplication binder = new SimpleReplication();
        if (item == null || item instanceof IdMap == false) {
            return binder;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/petaf/SimpleReplication.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 isReconnecting has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean isReconnecting(SimpleList<Integer> seconds) {
        if (isOnline() || seconds.size() < 1) {
            return false;
        }
        if (lastSendCount >= seconds.size()) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/petaf/NodeProxy.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 convertProperty has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void convertProperty(Object entity, String fullProp) {
        super.convertProperty(entity, fullProp);

        if (InfoMessage.PROPERTY_PROXIES.equals(fullProp) && entity instanceof InfoMessage) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/petaf/PetaFilter.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