SiLeBAT/FSK-Lab

View on GitHub
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js

Summary

Maintainability
F
2 mos
Test Coverage

File fskutil_1.0.0.js has 1572 lines of code (exceeds 250 allowed). Consider refactoring.
Open

fskutil = function () {

    var fskutil = { version: "1.0.0" };

    /** Temporary workaround for some metadata glitches. */
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js - About 4 days to fix

Function create has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        create(id, title, formData, port) {

            // modal body
            let form = document.createElement("form");
            formData.forEach(prop => {
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js - About 2 hrs to fix

Function add has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        add(data) {

            // Add new row (Order is fixed by formData)
            let newRow = document.createElement("tr");

Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js - About 1 hr to fix

Function _create has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _create(name, mandatory, helperText) {

            // Create buttons with icons
            let addButton = document.createElement("button");
            addButton.type = "button";
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js - About 1 hr to fix

Function _create has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _create(title, dialog, formData) {

            // Add button
            let addButton = document.createElement("button");
            addButton.classList.add("btn", "btn-primary");
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js - About 1 hr to fix

Function _createPanels has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _createPanels() {

            let schema = fskui.riskModel;

            return {
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js - About 1 hr to fix

Function _createPanels has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _createPanels(port) {

            let schema = fskui.qraModel;

            return {
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js - About 1 hr to fix

Function _createPanels has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _createPanels(port) {

            let schema = fskui.genericModel;

            return {
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js - About 1 hr to fix

Function _create has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _create(name, mandatory, type, helperText, value, vocabulary, port) {

            // Create input
            this.input.className = type === "checkbox" ? "form-check-input" : "form-control";
            this.input.type = type;
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js - About 1 hr to fix

Avoid too many return statements within this function.
Open

            return new fskutil.ArrayForm(prop.label, isMandatory, prop.type,
                value ? value : [], prop.description, port, prop.vocabulary);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return new fskutil.ArrayForm(prop.label, isMandatory, prop.type,
                value ? value : [], prop.description, port, prop.vocabulary);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js - About 30 mins to fix

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

    fskutil.QraModel = class {

        constructor(metadata, servicePort) {
            this.metadata = metadata;
            this.panels = this._createPanels(servicePort);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 1 wk to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1667..1771

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

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

    fskutil.ExposureModel = class {

        constructor(metadata, servicePort) {
            this.metadata = metadata;
            this.panels = this._createPanels(servicePort);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 1 wk to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 2184..2293

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

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

    fskutil.AdvancedTable = class {

        constructor(data, formData, dialog, panel) {
            this.formData = formData;
            this.dialog = dialog;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 6 days to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 1898..2025

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

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

        get metaData() {

            // general information
            this.metadata.generalInformation = this.panels.generalInformation.data;
            this.metadata.generalInformation.modelCategory = this.panels.modelCategory.data;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 3 days to fix
de.bund.bfr.knime.js/src/js/app/app.schemas.js on lines 826..858

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

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

        get metaData() {

            // general information
            this.metadata.generalInformation = this.panels.generalInformation.data;
            this.metadata.generalInformation.modelCategory = this.panels.modelCategory.data;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 3 days to fix
de.bund.bfr.knime.js/src/js/app/app.schemas.js on lines 1021..1053

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

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

        get metaData() {

            // generalInformation
            this.metadata.generalInformation = this.panels.generalInformation.data;
            this.metadata.generalInformation.modelCategory = this.panels.modelCategory.data;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 3 days to fix
de.bund.bfr.knime.js/src/js/app/app.schemas.js on lines 1794..1826

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

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

        _createPanels() {

            let schema = fskui.toxicologicalModel;

            return {
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 3 days to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1520..1543

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

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

        _createPanels() {
            let schema = fskui.doseResponseModel;

            return {
                generalInformation: new fskutil.FormPanel("General", schema.generalInformation, this.metadata.generalInformation, port),
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 3 days to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1619..1643

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

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

        _createPanels() {

            let schema = fskui.consumptionModel;

            return {
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 3 days to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1421..1444

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

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

        _createPanels() {

            let schema = fskui.otherModel;

            return {
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 3 days to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1920..1947

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

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

        get metaData() {

            // generalInformation
            this.metadata.generalInformation = this.panels.generalInformation.data;
            this.metadata.generalInformation.modelCategory = this.panels.modelCategory.data;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 3 days to fix
de.bund.bfr.knime.js/src/js/app/app.schemas.js on lines 1609..1640

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

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

        get metaData() {

            // generalInformation
            this.metadata.generalInformation = this.panels.generalInformation.data;
            this.metadata.generalInformation.modelCategory = this.panels.modelCategory;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 3 days to fix
de.bund.bfr.knime.js/src/js/app/app.schemas.js on lines 633..664

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

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

        _create(title, dialog, formData) {

            // Add button
            let addButton = document.createElement("button");
            addButton.classList.add("btn", "btn-primary");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 2 days to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2424..2470

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

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

        get metaData() {

            // generalInformation
            this.metadata.generalInformation = this.panels.generalInformation.data;
            this.metadata.generalInformation.author = this.panels.author.data;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 2 days to fix
de.bund.bfr.knime.js/src/js/app/app.schemas.js on lines 474..503

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

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

        _createMenus() {
            return fskutil.createSubMenu("General information", [
                { "id": "generalInformation", "label": "General" },
                { "id": "modelCategory", "label": "Model category" },
                { "id": "author", "label": "Author" },
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 2 other locations - About 1 day to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1545..1564
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 2051..2070

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

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

        _createMenus() {
            return fskutil.createSubMenu("General information", [
                { "id": "generalInformation", "label": "General" },
                { "id": "modelCategory", "label": "Model category" },
                { "id": "author", "label": "Author" },
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 2 other locations - About 1 day to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1545..1564
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1645..1664

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

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

        _createMenus() {
            return fskutil.createSubMenu("General information", [
                { "id": "generalInformation", "label": "General" },
                { "id": "modelCategory", "label": "Model category" },
                { "id": "author", "label": "Author" },
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 2 other locations - About 1 day to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1645..1664
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 2051..2070

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

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

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

        _createMenus() {
            return fskutil.createSubMenu("General information", [
                { "id": "generalInformation", "label": "General" },
                { "id": "author", "label": "Author" },
                { "id": "creator", "label": "Creator" },
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 1 day to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1848..1864

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

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

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

        _createMenus() {
            return fskutil.createSubMenu("General information", [
                { "id": "generalInformation", "label": "General" },
                { "id": "author", "label": "Author" },
                { "id": "creator", "label": "Creator" },
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 1 day to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1349..1366

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

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

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

        validate() {
            let isValid = true;
            if (!this.panels.generalInformation.validate()) isValid = false;
            if (!this.panels.modelCategory.validate()) isValid = false;
            if (!this.panels.scopeGeneral.validate()) isValid = false;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 2 other locations - About 4 hrs to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 581..588
de.bund.bfr.knime.js/src/js/app/app.schemas.js on lines 1055..1062

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

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

        validate() {

            let isValid;
            if (!this.mandatory) {
                isValid = true;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 4 hrs to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2217..2233

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

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

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

        validate() {
            let isValid = true;
            if (!this.panels.generalInformation.validate()) isValid = false;
            if (!this.panels.scopeGeneral.validate()) isValid = false;
            if (!this.panels.study.validate()) isValid = false;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 2 other locations - About 3 hrs to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 170..176
de.bund.bfr.knime.js/src/js/app/app.schemas.js on lines 467..473

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

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

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

            if (mandatory) {
                this.helpBlock = document.createElement("span");
                this.helpBlock.className = "help-block";
                this.helpBlock.style.display = "none";
                this.helpBlock.textContent = `${name} is a required property`;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 3 hrs to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2093..2099

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

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

    fskutil.createLabel = function (name, isMandatory, description) {
        let label = document.createElement("label");
        label.classList.add("col-sm-2", "control-label");
        label.title = description;
        label.setAttribute("data-toggle", "tooltip");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 2 other locations - About 3 hrs to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2779..2789
de.bund.bfr.knime.js/src/js/app/app.utils.js on lines 27..37

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

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

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

        get value() {
            let data = [];
            this.body.childNodes.forEach(tr => {
                let inputCell = tr.lastChild; // 2nd cell (with input)
                let input = inputCell.firstChild; // <input>
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 2 hrs to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 1886..1895

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

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

        remove() {
            // Find checked rows and delete them
            Array.from(this.body.children).forEach(row => {
                // Get checkbox (tr > td > input)
                let checkbox = row.firstChild.firstChild;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 2 hrs to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 1832..1841

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

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

        clear() {
            this.input.value = "";

            if (this.helpBlock) {
                this.helpBlock.style.display = "none";
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 2 hrs to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2120..2129

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

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

    function metadataFix(metadata) {
        // Ignore temporarily publication type
        // TODO: publicationType takes the abbreviation instead of the full string
        // used in the Reference dialog. Since KNIME runs getComponentValue twice,
        // the value cannot be converted here. The 1st call to getComponentValue
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 2 hrs to fix
de.bund.bfr.knime.js/src/js/app/app.utils.js on lines 2..20

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

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

    fskutil.createSubMenu = function (name, submenus) {
        return `<li class="dropdown">
        <a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button"
            aria-haspopup="true" aria-expanded="false">${name}<span class="caret"></a>
        <ul class="dropdown-menu">
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 2 other locations - About 1 hr to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2756..2766
de.bund.bfr.knime.js/src/js/app/app.utils.js on lines 44..53

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

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

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

        validate() {
            let isValid = true;
            Object.values(this.inputs).forEach(input => {
                if (!input.validate()) isValid = false;
            });
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 1 hr to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2542..2548

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

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

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

                for (const inputId in this.inputs) {
                    let currentInput = this.inputs[inputId];
                    data[inputId] = currentInput.value; // Save input value
                    currentInput.clear(); // Clear input
                }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 1 hr to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2321..2325

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

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

        add() {
            // If it has no rows or the last row value is not empty
            if (!this.body.lastChild || this.body.lastChild.lastChild.firstChild.value) {
                this._createRow();
            }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 1 hr to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 1825..1830

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

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

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

        get data() {
            let data = {};
            Object.entries(this.inputs).forEach(([id, input]) => data[id] = input.value);
            return data;
        }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 1 hr to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2550..2554

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

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

        constructor(metadata, servicePort) {
            this.metadata = metadata;
            this.panels = this._createPanels(servicePort);
            this.menus = this._createMenus();
        }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 1 hr to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1186..1190

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

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

        constructor(metadata, servicePort) {
            this.metadata = metadata;
            this.panels = this._createPanels(servicePort);
            this.menus = this._createMenus();
        }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 1 hr to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 1869..1873

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

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

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

            input.addEventListener("keyup", (event) => {
                if (event.key === "Enter") {
                    input.blur();
                    this.add();
                }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 1 hr to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 1864..1869

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

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

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

        if (prop.type === "text" || prop.type === "number" || prop.type === "url" ||
            prop.type === "date" || prop.type === "email")
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 1 hr to fix
de.bund.bfr.knime.js/src/js/app/app.utils.js on lines 89..90

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

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 (prop.type === "text-array")
            return new fskutil.ArrayForm(prop.label, isMandatory, prop.type,
                value ? value : [], prop.description, port, prop.vocabulary);
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 50 mins to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 746..748

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

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 (prop.type === "date-array")
            return new fskutil.ArrayForm(prop.label, isMandatory, prop.type,
                value ? value : [], prop.description, port, prop.vocabulary);
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 50 mins to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 742..744

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

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

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

        set value(newValue) {
            this.simpleTable.trash();
            newValue.forEach(item => this.simpleTable._createRow(item));
        }
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 45 mins to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 1788..1791

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

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

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

        edit(index, newData) {
            this.data[index] = newData; // Update this.data
            this.table.edit(index, newData); // Update table
        }
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 35 mins to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2477..2480

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

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

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

        remove(index) {
            this.data.splice(index, 1); // Update this.data
            this.table.remove(index); // TODO: update table
        }
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 35 mins to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2482..2485

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

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

                let month = ("" + value[1]).length > 1 ? ("" + value[1]) : ("0" + value[1]);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 9 other locations - About 30 mins to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 355..355
de.bund.bfr.knime.js/src/js/app/app.editable.mt.InputForm.js on lines 161..161
de.bund.bfr.knime.js/src/js/app/app.editable.mt.InputForm.js on lines 162..162
de.bund.bfr.knime.js/src/js/app/app.editable.mt.InputForm.js on lines 201..201
de.bund.bfr.knime.js/src/js/app/app.editable.mt.InputForm.js on lines 202..202
de.bund.bfr.knime.js/src/js/app/app.editable.mt.SimpleTable.js on lines 56..56
de.bund.bfr.knime.js/src/js/app/app.editable.mt.SimpleTable.js on lines 57..57
de.bund.bfr.knime.js/src/js/app/app.editable.mt.TablePanel.js on lines 244..244
de.bund.bfr.knime.js/src/js/app/app.editable.mt.TablePanel.js on lines 245..245

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

                let day = ("" + value[2]).length > 1 ? ("" + value[2]) : ("0" + value[2]);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 9 other locations - About 30 mins to fix
de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js on lines 356..356
de.bund.bfr.knime.js/src/js/app/app.editable.mt.InputForm.js on lines 161..161
de.bund.bfr.knime.js/src/js/app/app.editable.mt.InputForm.js on lines 162..162
de.bund.bfr.knime.js/src/js/app/app.editable.mt.InputForm.js on lines 201..201
de.bund.bfr.knime.js/src/js/app/app.editable.mt.InputForm.js on lines 202..202
de.bund.bfr.knime.js/src/js/app/app.editable.mt.SimpleTable.js on lines 56..56
de.bund.bfr.knime.js/src/js/app/app.editable.mt.SimpleTable.js on lines 57..57
de.bund.bfr.knime.js/src/js/app/app.editable.mt.TablePanel.js on lines 244..244
de.bund.bfr.knime.js/src/js/app/app.editable.mt.TablePanel.js on lines 245..245

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

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

        add(data) {
            this.data.push(data); // add data
            this.table.add(data); // Update table
        }
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 30 mins to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2472..2475

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 (!this.mandatory) {
                isValid = true;
            } else {
                isValid = this.textarea.value ? true : false;
            }
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/bfr/fskutil_1.0.0.js and 1 other location - About 30 mins to fix
de.bund.bfr.knime.fsklab.deprecatednodes/js-src/de/bund/bfr/knime/fsklab/1.7.2/editor/editor.js on lines 2137..2141

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

There are no issues that match your filters.

Category
Status