fujaba/NetworkParser

View on GitHub

Showing 4,645 of 4,645 total issues

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

/***/ "./elements/edges/Implements.ts":
/*!**************************************!*\
  !*** ./elements/edges/Implements.ts ***!
  \**************************************/
/*! no static exports found */
Severity: Major
Found in src/main/resources/de/uniks/networkparser/graph/diagram.js and 2 other locations - About 2 days to fix
src/main/resources/de/uniks/networkparser/graph/diagram.js on lines 3860..3896
src/main/resources/de/uniks/networkparser/graph/diagram.js on lines 4319..4355

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 397.

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 3 locations. Consider refactoring.
Open

/***/ "./elements/edges/Aggregation.ts":
/*!***************************************!*\
  !*** ./elements/edges/Aggregation.ts ***!
  \***************************************/
/*! no static exports found */
Severity: Major
Found in src/main/resources/de/uniks/networkparser/graph/diagram.js and 2 other locations - About 2 days to fix
src/main/resources/de/uniks/networkparser/graph/diagram.js on lines 4319..4355
src/main/resources/de/uniks/networkparser/graph/diagram.js on lines 4443..4479

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 397.

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 3 locations. Consider refactoring.
Open

/***/ "./elements/edges/Composition.ts":
/*!***************************************!*\
  !*** ./elements/edges/Composition.ts ***!
  \***************************************/
/*! no static exports found */
Severity: Major
Found in src/main/resources/de/uniks/networkparser/graph/diagram.js and 2 other locations - About 2 days to fix
src/main/resources/de/uniks/networkparser/graph/diagram.js on lines 3860..3896
src/main/resources/de/uniks/networkparser/graph/diagram.js on lines 4443..4479

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 397.

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 testClass has a Cognitive Complexity of 112 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean testClass(Object obj, Class<?> clazz, SimpleSet<String> ignoreMethods) {
        boolean reg = false;
        Set<Thread> oldThreads = Thread.getAllStackTraces().keySet();
        if (obj == null) {
            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

Function ./elements/nodes/Input.ts has a Cognitive Complexity of 111 (exceeds 5 allowed). Consider refactoring.
Open

/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
Severity: Minor
Found in src/main/resources/de/uniks/networkparser/graph/diagram.js - About 2 days 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

Function ./elements/nodes/Class.ts has 442 lines of code (exceeds 25 allowed). Consider refactoring.
Open

/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
Severity: Major
Found in src/main/resources/de/uniks/networkparser/graph/diagram.js - About 2 days to fix

    Method init has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring.
    Open

        protected Process init() {
            String outputFile = null;
            String debugPort = null;
            if (encodingCode != null && !encodingCode.equalsIgnoreCase(System.getProperty("file.encoding"))) {
                System.setProperty("file.encoding", encodingCode);
    Severity: Minor
    Found in src/main/java/de/uniks/networkparser/ext/SimpleController.java - About 2 days 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

    Function Class has 428 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Class = (function (_super) {
        __extends(Class, _super);
        function Class(json) {
            var _this = _super.call(this, json) || this;
            _this.attributes = [];
    Severity: Major
    Found in src/main/resources/de/uniks/networkparser/graph/diagram.js - About 2 days to fix

      File QRTokener.java has 879 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      package de.uniks.networkparser.bytes.qr;
      
      /*
      NetworkParser
      The MIT License
      Severity: Major
      Found in src/main/java/de/uniks/networkparser/bytes/qr/QRTokener.java - About 2 days to fix

        File DiagramEditor.java has 847 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        package de.uniks.networkparser.ext;
        
        /*
        The MIT License
        
        
        Severity: Major
        Found in src/main/java/de/uniks/networkparser/ext/DiagramEditor.java - About 2 days to fix

          Method parsing has a Cognitive Complexity of 101 (exceeds 5 allowed). Consider refactoring.
          Open

              @SuppressWarnings("unchecked")
              private void parsing(XMLEntity xmlEntity, SendableEntityCreator entityFactory, Object entityObject, String rootId) {
                  if (xmlEntity == null || this.map == null) {
                      return;
                  }
          Severity: Minor
          Found in src/main/java/de/uniks/networkparser/xml/EMFTokener.java - About 2 days 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

          Function ./elements/edges/Association.ts has 403 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          /***/ (function(module, exports, __webpack_require__) {
          
          "use strict";
          
          var __extends = (this && this.__extends) || (function () {
          Severity: Major
          Found in src/main/resources/de/uniks/networkparser/graph/diagram.js - About 2 days to fix

            File EMFTokener.java has 836 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            package de.uniks.networkparser.xml;
            
            /*
            NetworkParser
            The MIT License
            Severity: Major
            Found in src/main/java/de/uniks/networkparser/xml/EMFTokener.java - About 2 days to fix

              Method update has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
              Open

                  @Override
                  public boolean update(Object evt) {
                      if (isAtomar()) {
                          if (evt instanceof PropertyChangeEvent) {
                              return condition.update(evt);
              Severity: Minor
              Found in src/main/java/de/uniks/networkparser/UpdateCondition.java - About 1 day 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

              Function ./Data.ts has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
              Open

              /***/ (function(module, exports, __webpack_require__) {
              
              "use strict";
              
              Object.defineProperty(exports, "__esModule", { value: true });
              Severity: Minor
              Found in src/main/resources/de/uniks/networkparser/graph/diagram.js - About 1 day 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

              File ReflectionBlackBoxTester.java has 824 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              package de.uniks.networkparser.ext.generic;
              
              /*
              The MIT License
              
              

                Function ./Bridge.ts has 387 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                /***/ (function(module, exports, __webpack_require__) {
                
                "use strict";
                
                var __extends = (this && this.__extends) || (function () {
                Severity: Major
                Found in src/main/resources/de/uniks/networkparser/graph/diagram.js - About 1 day to fix

                  Function Association has 382 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var Association = (function (_super) {
                      __extends(Association, _super);
                      function Association(data) {
                          var _this = _super.call(this) || this;
                          _this.$points = [];
                  Severity: Major
                  Found in src/main/resources/de/uniks/networkparser/graph/diagram.js - About 1 day to fix

                    Method toString has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
                    Open

                        @Override
                        public String toString() {
                            SourceCode code = getCode();
                            if (this.size() < 1) {
                                if (code != null) {
                    Severity: Minor
                    Found in src/main/java/de/uniks/networkparser/parser/TemplateResultFile.java - About 1 day 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

                    File Clazz.java has 797 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    package de.uniks.networkparser.graph;
                    
                    import de.uniks.networkparser.EntityUtil;
                    /*
                    The MIT License
                    Severity: Major
                    Found in src/main/java/de/uniks/networkparser/graph/Clazz.java - About 1 day to fix
                      Severity
                      Category
                      Status
                      Source
                      Language