fujaba/NetworkParser

View on GitHub

Showing 4,645 of 4,645 total issues

Avoid too many return statements within this function.
Open

        return new Point();
Severity: Major
Found in src/main/resources/de/uniks/networkparser/graph/diagram.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return this.getCircle(1, 1, 1, 2, 1, 3, 2, 1, 2, 3, 3, 1, 3, 2, 3, 3);
    Severity: Major
    Found in src/main/resources/de/uniks/networkparser/graph/diagram.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return this.getCircle(1, 1, 1, 2, 1, 3, 2, 2, 3, 1, 3, 2, 3, 3);
      Severity: Major
      Found in src/main/resources/de/uniks/networkparser/graph/diagram.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return this.getCircle(1, 1, 1, 2, 1, 3, 2, 1, 2, 2, 2, 3, 3, 1, 3, 2, 3, 3);
        Severity: Major
        Found in src/main/resources/de/uniks/networkparser/graph/diagram.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return '#000';
          Severity: Major
          Found in src/main/resources/de/uniks/networkparser/graph/diagram.js - About 30 mins to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    if (x1 > x2) {
                        this.x = x1 - x2;
                    }
                    else {
                        this.x = x2 - x1;
            Severity: Minor
            Found in src/main/resources/de/uniks/networkparser/graph/diagram.js and 1 other location - About 30 mins to fix
            src/main/resources/de/uniks/networkparser/graph/diagram.js on lines 2781..2786

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 45.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    if (y1 > y2) {
                        this.y = y1 - y2;
                    }
                    else {
                        this.y = y2 - y1;
            Severity: Minor
            Found in src/main/resources/de/uniks/networkparser/graph/diagram.js and 1 other location - About 30 mins to fix
            src/main/resources/de/uniks/networkparser/graph/diagram.js on lines 2775..2780

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 45.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                        this.copyNodeShape.setAttributeNS(null, 'transform', "translate(" + x_1 + " " + (y_1 + 40 + this.padding) + ")");
            Severity: Minor
            Found in src/main/resources/de/uniks/networkparser/graph/diagram.js and 1 other location - About 30 mins to fix
            src/main/resources/de/uniks/networkparser/graph/diagram.js on lines 8989..8989

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 45.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                        this.addEdgeShape.setAttributeNS(null, 'transform', "translate(" + x_1 + " " + (y_1 + 80 + this.padding) + ")");
            Severity: Minor
            Found in src/main/resources/de/uniks/networkparser/graph/diagram.js and 1 other location - About 30 mins to fix
            src/main/resources/de/uniks/networkparser/graph/diagram.js on lines 8982..8982

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 45.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            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(attribute == null || entity instanceof University == false) {
                        return null;
                    }

            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 Meeple == false) {
                        return false;
                    }
            Severity: Minor
            Found in src/test/java/de/uniks/ludo/model/util/MeepleSet.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 TeachingAssistant == false) {
                        return false;
                    }

            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(attribute == null || entity instanceof Start == false) {
                        return null;
                    }
            Severity: Minor
            Found in src/test/java/de/uniks/ludo/model/util/StartSet.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(attribute == null || entity instanceof Home == false) {
                        return null;
                    }
            Severity: Minor
            Found in src/test/java/de/uniks/ludo/model/util/HomeSet.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 execute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

             public void execute(){
                 String[] classpath = System.getProperty("java.class.path").split(";");
                 File config=new File(".classpath");
                 if(config.exists()){
                     try {
            Severity: Minor
            Found in src/javafx/de/uniks/networkparser/test/javafx/TestRunner.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(attribute == null || entity instanceof Assignment == false) {
                        return null;
                    }

            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 Dice == false) {
                        return false;
                    }
            Severity: Minor
            Found in src/test/java/de/uniks/ludo/model/util/DiceSet.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(attribute == null || entity instanceof LastField == false) {
                        return null;
                    }
            Severity: Minor
            Found in src/test/java/de/uniks/ludo/model/util/LastFieldSet.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 target, String attrName, Object value, String type)
               {
                  if (SendableEntityCreator.REMOVE.equals(type) && value != null)
                  {
            Severity: Minor
            Found in src/test/java/de/uniks/networkparser/test/model/util/ItemCreator.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 target, String attrName) {
                    int pos = attrName.indexOf('.');
                    String attribute = attrName;
            
            
            Severity: Minor
            Found in src/test/java/de/uniks/networkparser/test/model/util/BankCreator.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