SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

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

        _check_template: function(tmp){
            try {
                // If empty
                if (tmp === undefined || tmp === "") {
                    return false;
de.bund.bfr.knime.js/src/js/lib/bootstrap-datepicker.js on lines 184..201

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

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 decodeTuple has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static KnimeTuple decodeTuple(final Model1DataTuple m1DataTuple) {
        final KnimeTuple outTuple = new KnimeTuple(SchemaFactory.createM1DataSchema());

        outTuple.setValue(TimeSeriesSchema.ATT_CONDID, m1DataTuple.condId);
        outTuple.setValue(TimeSeriesSchema.ATT_COMBASEID, m1DataTuple.combaseId);

Function d3_geo_clipCircle has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function d3_geo_clipCircle(radius) {
    var cr = Math.cos(radius), smallRadius = cr > 0, point = [ radius, 0 ], notHemisphere = Math.abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);
    return d3_geo_clip(visible, clipLine, interpolate, polygonContains);
    function visible(λ, φ) {
      return Math.cos(λ) * Math.cos(φ) > cr;

Function debounce has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function debounce(func, wait, options) {
      var args,
          maxTimeoutId,
          result,
          stamp,

File MyDBTreeModel.java has 328 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
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtree/MyDBTreeModel.java - About 3 hrs to fix

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

    private void test(PredictiveModelGeneralInformation information) throws Exception {
        assertEquals("Listeria Monocytogenes (DR of gQMRA)", information.getName());
        assertEquals("PUBLISHED SCIENTIFIC STUDIES", information.getSource());
        assertEquals("DR000001", information.getIdentifier());
        assertEquals(6, information.getAuthor().size());
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/swagger/ConsumptionModelSheetImporterTest.java on lines 41..65
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/swagger/GenericModelSheetImporterTest.java on lines 41..65

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

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

    private static void test(PredictiveModelGeneralInformation information) throws Exception {
        assertEquals("Listeria Monocytogenes (DR of gQMRA)", information.getName());
        assertEquals("PUBLISHED SCIENTIFIC STUDIES", information.getSource());
        assertEquals("DR000001", information.getIdentifier());
        assertEquals(6, information.getAuthor().size());
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/swagger/ExposureModelSheetImporterTest.java on lines 41..65
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/swagger/GenericModelSheetImporterTest.java on lines 41..65

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

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

package de.bund.bfr.knime.fsklab.nodes.environment;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
de.bund.bfr.knime.fsklab.deprecatednodes/src-1_9_0/de/bund/bfr/knime/fsklab/nodes/environment/FilesEnvironmentManager.java on lines 1..78

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

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

    private static void test(GenericModelGeneralInformation information) throws Exception {
        assertEquals("Listeria Monocytogenes (DR of gQMRA)", information.getName());
        assertEquals("PUBLISHED SCIENTIFIC STUDIES", information.getSource());
        assertEquals("DR000001", information.getIdentifier());
        assertEquals(6, information.getAuthor().size());
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/swagger/ConsumptionModelSheetImporterTest.java on lines 41..65
de.bund.bfr.knime.fsklab.metadata.model.tests/src/metadata/swagger/ExposureModelSheetImporterTest.java on lines 41..65

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

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

package de.bund.bfr.knime.fsklab.nodes.environment;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
de.bund.bfr.knime.fsklab.nodes/src/de/bund/bfr/knime/fsklab/nodes/environment/FilesEnvironmentManager.java on lines 1..78

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

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 itemStateChanged has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        @Override
        public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
                for (String column : mappingBoxes.keySet()) {
                    if (e.getSource() == mappingBoxes.get(column)) {

Function _initRangeslider has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _initRangeslider ( container ) {
        let O = this;
        _log( 'UI / _initRangeslider' );

        let $elems = $( container ).length > 0 ? $( container ).find( '[data-rangeslider]' ) : $( '[data-rangeslider]' );
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.ui.js - About 3 hrs to fix

Function click has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        click: function(e) {
            e.preventDefault();
            var target = $(e.target).closest('span, td, th');
            if (target.length == 1) {
                switch(target[0].nodeName.toLowerCase()) {

SwaggerUtil has 31 methods (exceeds 20 allowed). Consider refactoring.
Open

public class SwaggerUtil {

    @Deprecated
    public static de.bund.bfr.metadata.swagger.GenericModelGeneralInformation convert(
            metadata.GeneralInformation deprecatedGeneralInformation) {
Severity: Minor
Found in de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerUtil.java - About 3 hrs to fix

Assay has 31 methods (exceeds 20 allowed). Consider refactoring.
Open

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-02T16:22:48.194+02:00")
public class Assay {
  @SerializedName("name")
  private String name = null;

JSONDataTableSpec has 31 methods (exceeds 20 allowed). Consider refactoring.
Open

@JsonAutoDetect
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
public class JSONDataTableSpec {

    /**

PmmTimeSeriesTest has 31 methods (exceeds 20 allowed). Consider refactoring.
Open

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

    @Test
    public void testConstructors() {

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

    public DietaryAssessmentMethod retrieveDietaryAssessmentMethod(Row row) {

        // Check first mandatory properties
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing methodological tool to collect data");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 1000..1036
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 1057..1093
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 1165..1201
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 936..972
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 1008..1044
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 1077..1113
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 1080..1116
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 1090..1126
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerRiskModelSheetImporter.java on lines 1087..1123
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 644..680
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 1008..1044

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

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

    public DietaryAssessmentMethod retrieveDietaryAssessmentMethod(Row row) {

        // Check first mandatory properties
        if (row.getCell(K).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing methodological tool to collect data");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 893..929
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 1000..1036
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 1057..1093
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 1165..1201
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 936..972
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 1008..1044
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 1077..1113
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 1090..1126
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerRiskModelSheetImporter.java on lines 1087..1123
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 644..680
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 1008..1044

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

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

    public DietaryAssessmentMethod retrieveDietaryAssessmentMethod(Row row) {

        // Check first mandatory properties
        if (row.getCell(K).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing methodological tool to collect data");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 893..929
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 1000..1036
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 1057..1093
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 936..972
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 1008..1044
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 1077..1113
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 1080..1116
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 1090..1126
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerRiskModelSheetImporter.java on lines 1087..1123
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 644..680
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 1008..1044

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

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