fujaba/NetworkParser

View on GitHub

Showing 4,645 of 4,645 total issues

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

    public boolean validate(BaseItem sourceLanguage, BaseItem targetLanguage, String targetFileName,
            boolean getMissedText) {
        if (sourceLanguage == null || targetLanguage == null) {
            return false;
        }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/http/I18NUtil.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 boolean remove(GraphModel model, String rootDir, String type) {
        if(rootDir == null || model == null) {
            return false;
        }
        /*
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/ModelGenerator.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 withHeader has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public HTTPRequest withHeader(String value) {
        if (value != null) {
            value = value.trim();
            if (value.length() > 0) {
                if (value.startsWith(HTTP_CONTENT)) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/http/HTTPRequest.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(String remoteURL) {
        if (ReflectionLoader.GIT == null) {
            return false;
        }
        String localPath = path;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/GitRevision.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 addTemplate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean addTemplate(Template template, boolean addOwner) {
        if (super.addTemplate(template, addOwner) == false) {
            return false;
        }
        String id2 = template.getId(true);
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/ModelGenerator.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 isAccessMethod has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static boolean isAccessMethod(Object item, String methodName) {
        if (item == null || methodName == null) {
            return false;
        }
        Method method = null;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/generic/ReflectionLoader.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 isNotFirstThread has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static final boolean isNotFirstThread(String[] args) {
        if (args != null) {
            for (String item : args) {
                if ("-XstartOnFirstThread".equalsIgnoreCase(item)) {
                    return true;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/Os.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 entity, String attribute) {
        if (entity == null || this.clazz == null) {
            return null;
        }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/generic/GenericCreator.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 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 load has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static boolean load() {
        IdMap map = new IdMap();
        map.with(StartData.instance());
        CharacterBuffer readFile = FileBuffer.readFile(StartData.fileName);
        if (readFile.length() < 1) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/StartData.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 validate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean validate(String token) {
        if (token == null) {
            return false;
        }
        String header;
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/http/JsonToken.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 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 formatLongBinary has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private static boolean formatLongBinary(long value, byte[] buf, int offset, int length, boolean negative) {
        if(buf == null || length>buf.length) {
            return false;
        }
        final int bits = (length - 1) * 8;
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 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 getLongNameData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  protected byte[] getLongNameData() {
    /* read in the name */
    final ByteArrayOutputStream longName = new ByteArrayOutputStream();
    int length = 0;
    try {
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 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 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 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 (attribute == null || entity instanceof LogItem == false) {
            return false;
        }
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/LogItem.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

Severity
Category
Status
Source
Language