SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

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

    private ModelCategory retrieveModelCategory(Sheet sheet) {
        // Check mandatory properties and throw exception if missing
        if (sheet.getRow(MODEL_CATEGORY__MODEL_CLASS).getCell(J).getCellTypeEnum() != CellType.STRING) {
            throw new IllegalArgumentException("Missing model class");
        }
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/RAKIPSheetImporter.java on lines 415..441
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerConsumptionSheetImporter.java on lines 602..628
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDataModelSheetImporter.java on lines 579..605
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerDoseResponseSheetImporter.java on lines 531..557
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 607..633
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerGenericSheetImporter.java on lines 606..632
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerHealthModelSheetImporter.java on lines 530..556
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerOtherModelSheetImporter.java on lines 599..625
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerPredictiveModelSheetImporter.java on lines 592..618
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerProcessModelSheetImporter.java on lines 597..623
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerQraModelSheetImporter.java on lines 612..638
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerRiskModelSheetImporter.java on lines 609..635
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerSheetImporter.java on lines 314..340
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerToxicologicalSheetImporter.java on lines 530..556
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ConsumptionModelSheetImporter.java on lines 482..508
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/DoseResponseSheetImporter.java on lines 447..473
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ExposureModelSheetImporter.java on lines 498..524
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/GenericModelSheetImporter.java on lines 502..528
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/HealthModelSheetImporter.java on lines 454..480
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/OtherModelSheetImporter.java on lines 474..500
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/PredictiveModelSheetImporter.java on lines 492..518
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ProcessModelSheetImporter.java on lines 455..481
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/RiskModelSheetImporter.java on lines 500..526
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ToxicologicalModelSheetImporter.java on lines 446..472

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

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

    private static final String queryTimeSeries9 = "SELECT\n" + "\n" + "    \"VersuchsbedingungenEinfach\".\"ID\" AS \"" + ATT_CONDITIONID + "\",\n" + "    \"" + REL_COMBASE
            + "\".\"CombaseID\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_TEMPERATURE + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_PH + "\",\n"
            + "    \"VersuchsbedingungenEinfach\".\"" + ATT_AW + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_PRESSURE + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_AGENTID + "\",\n" + "    \"" + REL_AGENT + "\".\""
            + ATT_AGENTNAME + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_AGENTDETAIL + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_MATRIXID + "\",\n"
            + "    \"" + REL_MATRIX + "\".\"" + ATT_MATRIXNAME + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_MATRIXDETAIL + "\",\n" + "    \"DataView\".\"Zeit\",\n"
de.bund.bfr.knime.pmm.bfrdbiface.lib/src/de/bund/bfr/knime/pmm/bfrdbiface/lib/Bfrdb.java on lines 126..132

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

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

    private static final String queryTimeSeries9SinDataView = "SELECT\n" + "\n" + "    \"VersuchsbedingungenEinfach\".\"ID\" AS \"" + ATT_CONDITIONID + "\",\n" + "    \""
            + REL_COMBASE + "\".\"CombaseID\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_TEMPERATURE + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_PH
            + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_AW + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_PRESSURE + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_AGENTID + "\",\n" + "    \"" + REL_AGENT
            + "\".\"" + ATT_AGENTNAME + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_AGENTDETAIL + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_MATRIXID
            + "\",\n" + "    \"" + REL_MATRIX + "\".\"" + ATT_MATRIXNAME + "\",\n" + "    \"VersuchsbedingungenEinfach\".\"" + ATT_MATRIXDETAIL + "\",\n"
de.bund.bfr.knime.pmm.bfrdbiface.lib/src/de/bund/bfr/knime/pmm/bfrdbiface/lib/Bfrdb.java on lines 141..146

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

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 RunnerNodeModel.java has 286 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 ***************************************************************************************************
 * Copyright (c) 2017 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

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

  function getMethods (theClass) {
    var proto = theClass.prototype;

    var methods = [];

Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/select2.full.js and 1 other location - About 2 hrs to fix
de.bund.bfr.knime.pmm.nodes/js-lib/select2/4_0_3/debug/js/select2.js on lines 522..542

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

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

    this.on('query', function (params) {
      if (!self.isOpen()) {
        self.trigger('open', {});
      }
de.bund.bfr.knime.js/src/js/lib/select2.full.js on lines 5734..5745

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

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

    this.on('query', function (params) {
      if (!self.isOpen()) {
        self.trigger('open', {});
      }

Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/select2.full.js and 1 other location - About 2 hrs to fix
de.bund.bfr.knime.pmm.nodes/js-lib/select2/4_0_3/debug/js/select2.js on lines 5342..5353

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

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

  function getMethods (theClass) {
    var proto = theClass.prototype;

    var methods = [];
de.bund.bfr.knime.js/src/js/lib/select2.full.js on lines 526..546

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

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

      return function(stream, state) {
        var ch = stream.peek();
        if (ch == endQuote && state.rubyState.tokenize.length == 1) {
          // step out of ruby context as it seems to complete processing all the braces
          stream.next();
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/haml/haml.js on lines 20..30

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

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

      return function(stream, state) {
        var ch = stream.peek();
        if (ch == endQuote && state.rubyState.tokenize.length == 1) {
          // step out of ruby context as it seems to complete processing all the braces
          stream.next();
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/slim/slim.js on lines 140..150

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

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 ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
            $( this ).css({
                left: ho.left - cop.left - co.left,
                width: w,
                height: h
de.bund.bfr.knime.pmm.nodes/js-src/de/bund/bfr/knime/pmm/js/modelplotter/jquery-ui.js on lines 4022..4028

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

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 ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
            $( this ).css({
                left: ho.left - cop.left - co.left,
                width: w,
                height: h
de.bund.bfr.knime.pmm.nodes/js-src/de/bund/bfr/knime/pmm/js/modelplotter/jquery-ui.js on lines 4014..4020

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

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 FoodProcessNodeDialog.java has 285 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

Method convertPopulationGroup has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    static PopulationGroup convertPopulationGroup(JsonNode node) {

        PopulationGroup group = new PopulationGroup();

        if (node.has("populationName")) {

File PublicationType.java has 285 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 */
package metadata;

import java.util.Arrays;

Method insertEstModel has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private int insertEstModel(String name, final int condId, final int modelId, final Double rms, final Double rsquared, final Double aic, final Double bic, final int responseId,
            Integer qualityScore, Boolean isChecked, Integer workflowID, String comment) {
        int ret = -1;
        try {
            PreparedStatement ps = conn.prepareStatement(

Method insertLiteratureInCase has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void insertLiteratureInCase(PmmXmlDoc lit) {
        try {
            int i = 0;
            for (PmmXmlElementConvertable el : lit.getElementSet()) {
                if (el instanceof LiteratureItem) {

Method execute has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  @Override
  protected PortObject[] execute(PortObject[] inData, ExecutionContext exec) throws Exception {

    this.setInternalPortObjects(inData);

Method retrieveRProperties has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static Properties retrieveRProperties(final RPreferenceProvider rpref) {
        
        final File tmpPath = new File(TEMP_PATH);
        File propsFile;
        File rOutFile;

Method testHashCode has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Test
    public void testHashCode() throws Exception {
        FskMetaData fmd = new FskMetaData();
        fmd.modelName = "ESBL Ecoli in Broiler";
        fmd.modelId = "initialize_parents_animals.R";
Severity
Category
Status
Source
Language