SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

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

  function tokenString(quote) {
    return function(stream, state) {
      var escaped = false, next, end = false;
      while ((next = stream.next()) != null) {
        if (next == quote && !escaped) {end = true; break;}
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/pig/pig.js on lines 46..59
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/verilog/verilog.js on lines 204..215
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/vhdl/vhdl.js on lines 105..116

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

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 tokenString(quote) {
    return function(stream, state) {
      var escaped = false, next, end = false;
      while ((next = stream.next()) != null) {
        if (next == quote && !escaped) {end = true; break;}
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/d/d.js and 1 other location - About 4 hrs to fix
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/clike/clike.js on lines 128..139

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

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 tokenString(quote) {
    return function(stream, state) {
      var escaped = false, next, end = false;
      while ((next = stream.next()) != null) {
        if (next == quote && !escaped) {end = true; break;}
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/d/d.js on lines 77..88

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

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

File GenericModelGeneralInformation.java has 356 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * RAKIP Generic model
 * TODO
 *
 * OpenAPI spec version: 1.0.4

File PredictiveModelGeneralInformation.java has 356 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * RAKIP Generic model
 * TODO
 *
 * OpenAPI spec version: 1.0.4

File OtherModelGeneralInformation.java has 356 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * RAKIP Generic model
 * TODO
 *
 * OpenAPI spec version: 1.0.4

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

/**
 */
package metadata.impl;

import java.util.Date;
de.bund.bfr.knime.fsklab.metadata.model/gen/metadata/impl/EventImpl.java on lines 1..163
de.bund.bfr.knime.fsklab.metadata.model/gen/metadata/impl/StringObjectImpl.java on lines 1..163

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

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

/**
 */
package metadata.impl;

import metadata.MetadataPackage;
de.bund.bfr.knime.fsklab.metadata.model/gen/metadata/impl/EventImpl.java on lines 1..163
de.bund.bfr.knime.fsklab.metadata.model/gen/metadata/impl/ModificationDateImpl.java on lines 1..165

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

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

/**
 */
package metadata.impl;

import metadata.Event;
de.bund.bfr.knime.fsklab.metadata.model/gen/metadata/impl/ModificationDateImpl.java on lines 1..165
de.bund.bfr.knime.fsklab.metadata.model/gen/metadata/impl/StringObjectImpl.java on lines 1..163

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

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

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

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

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

Refactorings

Further Reading

Method actionPerformed has 113 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public void actionPerformed(ActionEvent event) {
        if (event.getSource() == xlsButton) {
            loadFromXLS();
        } else if (event.getSource() == clearButton) {

File ManualModelEditorNodeDialog.java has 355 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*******************************************************************************
 * Copyright (c) 2015 Federal Institute for Risk Assessment (BfR), Germany
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by

File ModelTableModel.java has 355 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*******************************************************************************
 * Copyright (c) 2015 Federal Institute for Risk Assessment (BfR), Germany
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by

Function constructor has 113 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    constructor( metadata, img , state ,  modelScript, visScript , readme ) {
        super( metadata, img , modelScript, visScript, readme ) ;
        this._schema = schemas.consumptionModel;
        if(state){
            this.panels = this._createPanels();
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.schemas.js - About 4 hrs to fix

Function _createComplexPanel has 113 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _createComplexPanel(data, formData, title, dialog) {
            let O = this;

            // tab-pane
            let $panel = $('<div class="tab-pane h-100" role="tabpanel"></div>')
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.TablePanel.js - About 4 hrs to fix

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

        @Override
        public void write(List<KnimeTuple> tuples, boolean isPMFX, String dir, String mdName, Metadata metadata,
                boolean splitModels, String notes, ExecutionContext exec) throws Exception {

            // Group tuples according to its secondary model
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/common/writer/WriterUtils.java on lines 486..520

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

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

        @Override
        public void write(List<KnimeTuple> tuples, boolean isPMFX, String dir, String mdName, Metadata metadata,
                boolean splitModels, String notes, ExecutionContext exec) throws Exception {

            // Group tuples according to its secondary model
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/common/writer/WriterUtils.java on lines 589..623

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

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

MyDBForm has 35 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings("rawtypes")
public class MyDBForm extends JPanel {
    
    /**
     * 
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBForm.java - About 4 hrs to fix

EmfMetadataModuleTest has 35 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings("static-method")
public class EmfMetadataModuleTest {

    private static ObjectMapper MAPPER;

SettingsHelperTest has 35 methods (exceeds 20 allowed). Consider refactoring.
Open

public class SettingsHelperTest {

    private static List<String> exampleSelectedIds;
    private static List<KnimeTuple> exampleSelectedTuples;
    private static Map<String, Double> exampleXValues;

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

    public QualityMeasures retrieveQualityMeasures(Sheet sheet) {
        QualityMeasures measures = new QualityMeasures();

        Cell sseCell = sheet.getRow(QUALITY_MEASURES__SSE).getCell(M);
        if (sseCell.getCellType() == Cell.CELL_TYPE_NUMERIC) {
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 1135..1169
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 965..999
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 1022..1056
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 1051..1085
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 1130..1164
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 1170..1204
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 973..1007
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 1042..1076
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 1035..1069
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 1045..1079
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 1055..1089
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 863..897
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 973..1007
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ConsumptionModelSheetImporter.java on lines 600..634
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/DoseResponseSheetImporter.java on lines 565..599
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ExposureModelSheetImporter.java on lines 616..650
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/GenericModelSheetImporter.java on lines 620..654
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/HealthModelSheetImporter.java on lines 572..606
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/OtherModelSheetImporter.java on lines 615..649
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/PredictiveModelSheetImporter.java on lines 633..667
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ProcessModelSheetImporter.java on lines 573..607
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/QraModelSheetImporter.java on lines 622..656
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/RiskModelSheetImporter.java on lines 618..652
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ToxicologicalModelSheetImporter.java on lines 587..621

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

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