fujaba/NetworkParser

View on GitHub

Showing 3,691 of 4,645 total issues

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

    @Override
    public void run() {
        Object transparent = ReflectionLoader.getField(ReflectionLoader.STAGESTYLE, "TRANSPARENT");
        this.stage = ReflectionLoader.newInstance(ReflectionLoader.STAGE, ReflectionLoader.STAGESTYLE, transparent);
        parent.setStage(this.stage);
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/javafx/DialogStage.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 addAttributes has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static final void addAttributes(EMFParser eclass, Clazz sdmClass) {
        List<Object> callList = getEAttributes(eclass);
        if (callList != null) {
            for (Object item : callList) {
                if (item != null) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/generic/EMFParser.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 getESuperTypes has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static final SimpleList<EMFParser> getESuperTypes(Object eref) {
        if (eref instanceof EMFParser) {
            return getESuperTypes(((EMFParser) eref).getValue());
        }
        SimpleList<EMFParser> list = new SimpleList<EMFParser>();
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/generic/EMFParser.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(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 check has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private int check(String body, String search) {
        int mcCabe = 0;
        int index = 0;
        while (index >= 0) {
            index = body.indexOf(search, index);
Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/FileClassModel.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 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 withIgnoreClazzes has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public ReflectionBlackBoxTester withIgnoreClazzes(Class<?> metaClass, String... methods) {
        if (metaClass == null) {
            return this;
        }
        String className = metaClass.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 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 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 withAuthentification has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public GitRevision withAuthentification(String username, String password) {
        if(username == null || password == null) {
            return this;
        }
        this.username = username;
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 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 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 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 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 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

Severity
Category
Status
Source
Language