SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

Function getDefaults has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            function getDefaults() {
                return {
                    tapToDismiss: true,
                    toastClass: 'toast',
                    containerId: 'toast-container',
Severity: Minor
Found in de.bund.bfr.knime.pmm.nodes/js-lib/toastr/2_1_3/debug/js/toastr.js - About 1 hr to fix

Function init has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        init: function(element, options) {
            this.$element = $(element);
            //since 1.4.1 container do not use data-* directly as they already merged into options.
            this.options = $.extend({}, $.fn.editableContainer.defaults, options);         
            this.splitOptions();

Function render has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        render: function() {
            //init loader
            this.$loading = $($.fn.editableform.loading);        
            this.$div.empty().append(this.$loading);
            

Function pack has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.layout.pack = function() {
    var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ], radius;
    function pack(d, i) {
      var nodes = hierarchy.call(this, d, i), root = nodes[0], w = size[0], h = size[1], r = radius == null ? Math.sqrt : typeof radius === "function" ? radius : function() {
        return radius;

Function extent has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    brush.extent = function(z) {
      var x0, x1, y0, y1, t;
      if (!arguments.length) {
        if (x) {
          if (xExtentDomain) {

Function intersect has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

$.ui.intersect = (function() {
    function isOverAxis( x, reference, size ) {
        return ( x >= reference ) && ( x < ( reference + size ) );
    }

Function _respectSize has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _respectSize: function( data ) {

        var o = this._vBoundaries,
            a = this.axis,
            ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width),

Function _optionDatepicker has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _optionDatepicker: function(target, name, value) {
        var settings, date, minDate, maxDate,
            inst = this._getInst(target);

        if (arguments.length === 2 && typeof name === "string") {

Function close has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    close: function( event ) {
        var tooltip,
            that = this,
            target = $( event ? event.currentTarget : this.element ),
            tooltipData = this._find( target );

Function clear has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

TextMarker.prototype.clear = function () {
    var this$1 = this;

  if (this.explicitlyCleared) { return }
  var cm = this.doc.cm, withOp = cm && !cm.curOp

Function clear has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

TextMarker.prototype.clear = function () {
    var this$1 = this;

  if (this.explicitlyCleared) { return }
  var cm = this.doc.cm, withOp = cm && !cm.curOp

Function useCustomRule has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function useCustomRule(rule, schema, parentSchema, it) {
    if (self._opts.validateSchema !== false) {
      var deps = rule.definition.dependencies;
      if (deps && !deps.every(function(keyword) {
        return Object.prototype.hasOwnProperty.call(parentSchema, keyword);

Function show has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  Modal.prototype.show = function (_relatedTarget) {
    var that = this
    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })

    this.$element.trigger(e)

Function template has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  _.template = function(text, settings, oldSettings) {
    if (!settings && oldSettings) settings = oldSettings;
    settings = _.defaults({}, settings, _.templateSettings);

    // Combine delimiters into one regular expression via alternation.

Function extractAndCreateUI has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  async function  extractAndCreateUI(modelMetaData, modelscript, visualization){
    if (!modelMetaData || modelMetaData == "null" || modelMetaData == "") {
      _metadata.generalInformation = {};
      _metadata.generalInformation.modelCategory = {};
      _metadata.scope = {};

Function createUI has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  async function createUI(modelscript, visualization) {
    $('#modelScriptArea').val(modelscript || _val.modelScript);
    $('#visualizationScriptArea').val(visualization || _val.visualizationScript);
    $('#readmeArea').val(_val.readme);
    

Function backdrop has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  Modal.prototype.backdrop = function (callback) {
    var that = this
    var animate = this.$element.hasClass('fade') ? 'fade' : ''

    if (this.isShown && this.options.backdrop) {

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

    static void compare(final Dep obtained, final Dep expected) {
        assertThat(obtained.name, equalTo(expected.name));
        assertThat(obtained.origname, equalTo(expected.origname));
        assertThat(obtained.min, equalTo(expected.min));
        assertThat(obtained.max, equalTo(expected.max));
de.bund.bfr.knime.pmm.nodes.tests/src/de/bund/bfr/knime/pmm/js/common/TestUtils.java on lines 53..61

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

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

    static void compare(final Indep obtained, final Indep expected) {
        assertThat(obtained.name, equalTo(expected.name));
        assertThat(obtained.origname, equalTo(expected.origname));
        assertThat(obtained.min, equalTo(expected.min));
        assertThat(obtained.max, equalTo(expected.max));
de.bund.bfr.knime.pmm.nodes.tests/src/de/bund/bfr/knime/pmm/js/common/TestUtils.java on lines 28..36

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

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

      if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") {
        state.context.align = true;
      }
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/cypher/cypher.js on lines 92..94
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/q/q.js on lines 99..101
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/turtle/turtle.js on lines 115..117

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

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

Severity
Category
Status
Source
Language