SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

Method stripNonValidXMLCharacters has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public static String stripNonValidXMLCharacters(String in) {
          StringBuffer out = new StringBuffer(); // Used to hold the output.
          char current; // Used to reference the current character.

          if (in == null || ("".equals(in))) return ""; // vacancy test.
Severity: Minor
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method importFlowVariables has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public Collection<FlowVariable> importFlowVariables(String variableName) throws RException {

    checkInitialized();
    final List<FlowVariable> flowVars = new ArrayList<>();

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function _createRow has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    _createRow(value = "") {
        let O = this;
        let input = document.createElement("input");
        input.type = O.type;
        input.className = "form-control";
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.SimpleTable.js - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function _createTableToolbar has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    _createTableToolbar() {
        let O = this;
        _log('TABLE / _createTableToolbar');

        if (O.opts.showToggle || O.opts.showColumns) {
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.table.js - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function _handleRowSelect has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    _handleRowSelect($tr) {
        let O = this;
        // rows selectable and tr exists
        if (O.opts.rowSelectable && $tr) {
            // get current state
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.table.js - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

  public static FskSimulation makeIndividualSimulation(FskSimulation combinedSim, String suffix) {
    FskSimulation fskSimulation = new FskSimulation(combinedSim.getName());

    combinedSim.getParameters().forEach((pId, pValue) -> {
      if (pId.endsWith(suffix))
de.bund.bfr.knime.fsklab.deprecatednodes/src-1_9_0/de/bund/bfr/knime/fsklab/v1_9/joiner/JoinerNodeUtil.java on lines 55..64

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

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

  public static FskSimulation makeIndividualSimulation(FskSimulation combinedSim, String suffix) {
    FskSimulation fskSimulation = new FskSimulation(combinedSim.getName());

    combinedSim.getParameters().forEach((pId,pValue) -> {
      if(pId.endsWith(suffix) )
de.bund.bfr.knime.fsklab.nodes/src/de/bund/bfr/knime/fsklab/v2_0/joiner/JoinerNodeUtil.java on lines 307..316

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

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

    public void addModelSec(final int id, final String name, final String modelType, boolean visible) throws PmmException {
        if (visible) {
            if (name == null) throw new PmmException("Model name must not be null.");

            //modelIdSec.put(name + " (" + modelType + ")", id);
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/ui/ModelReaderUi.java on lines 166..175

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

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

    public void addModelPrim(final int id, final String name, final String modelType, boolean visible) throws PmmException {
        if (visible) {
            if (name == null) throw new PmmException("Model name must not be null.");

            //modelIdPrim.put(name + " (" + modelType + ")", id);
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/ui/ModelReaderUi.java on lines 177..186

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

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

    public static Double getDouble(Element el, String attr) {
        if (el == null || el.getAttributeValue(attr) == null
                || el.getAttributeValue(attr).isEmpty()) {
            return null;
        }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XmlHelper.java on lines 38..49

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

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

/*******************************************************************************
 * 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
de.bund.bfr.knime.pmm.bfrdbiface.lib/src/de/bund/bfr/knime/pmm/bfrdbiface/lib/Activator.java on lines 1..69

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

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

    public static Integer getInt(Element el, String attr) {
        if (el == null || el.getAttributeValue(attr) == null
                || el.getAttributeValue(attr).isEmpty()) {
            return null;
        }
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/XmlHelper.java on lines 51..62

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

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

/*******************************************************************************
 * 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
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/manualmodelconf/ui/Activator.java on lines 1..69

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

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

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Dauer") + " IS NULL OR " + DBKernel.delimitL("DauerEinheit") + " IS NULL",
                        GuiMessages.getString("Die Dauer und deren Einheit sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

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

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

    @Override
    public Model retrieveModel(Sheet sheet) {
        ToxicologicalModel model = new ToxicologicalModel();
        model.setModelType("toxicologicalModel");
        model.setGeneralInformation(retrieveGeneralInformation(sheet));
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ConsumptionModelSheetImporter.java on lines 636..646
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/DataModelSheetImporter.java on lines 551..562
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/DoseResponseSheetImporter.java on lines 601..611
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ExposureModelSheetImporter.java on lines 677..687
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/GenericModelSheetImporter.java on lines 656..666
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/HealthModelSheetImporter.java on lines 608..618
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/OtherModelSheetImporter.java on lines 651..661
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/PredictiveModelSheetImporter.java on lines 669..679
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ProcessModelSheetImporter.java on lines 609..620
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/QraModelSheetImporter.java on lines 658..669
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/RiskModelSheetImporter.java on lines 654..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 64.

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

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Testanbieter") + " IS NULL OR " + DBKernel.delimitL("AnbieterAngebot") + " IS NULL",
                        GuiMessages.getString("Einen Testanbieter und ein AnbieterAngebot sollte es immer geben! Wenn es ein InHouse Kit ist, dann sollte als Kontakt die eigene Adresse angegeben werden und als Angebot interne Informationen")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

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

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

    @Override
    public Model retrieveModel(Sheet sheet) {

        DataModel model = new DataModel();
        model.setModelType("dataModel");
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ConsumptionModelSheetImporter.java on lines 636..646
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/DoseResponseSheetImporter.java on lines 601..611
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ExposureModelSheetImporter.java on lines 677..687
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/GenericModelSheetImporter.java on lines 656..666
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/HealthModelSheetImporter.java on lines 608..618
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/OtherModelSheetImporter.java on lines 651..661
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/PredictiveModelSheetImporter.java on lines 669..679
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ProcessModelSheetImporter.java on lines 609..620
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/QraModelSheetImporter.java on lines 658..669
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/RiskModelSheetImporter.java on lines 654..664
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ToxicologicalModelSheetImporter.java on lines 623..633

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

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

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Personalressourcen") + " IS NOT NULL AND " + DBKernel.delimitL("ZeitEinheit") + " IS NULL",
                        GuiMessages.getString("Die Zeiteinheit für die Personalressourcen sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 457..461
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

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

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

                result.add(new String[]{
                        "SELECT " + idConf + " FROM " + DBKernel.delimitL(tablename) +
                        " WHERE " + DBKernel.delimitL("Dauer") + " IS NULL OR " + DBKernel.delimitL("DauerEinheit") + " IS NULL",
                        GuiMessages.getString("Die Dauer und deren Einheit sollte eingetragen werden!")
                        });
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java and 13 other locations - About 55 mins to fix
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 529..533
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 534..538
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 505..509
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 481..485
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 491..495
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 496..500
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 462..466
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 467..471
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 438..442
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 448..452
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 359..363
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 250..254
org.hsh.bfr.db/src/org/hsh/bfr/db/PlausibilityChecker.java on lines 215..219

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

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

    @Override
    public Model retrieveModel(Sheet sheet) {
        RiskModel model = new RiskModel();
        model.setModelType("riskModel");
        model.setGeneralInformation(retrieveGeneralInformation(sheet));
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ConsumptionModelSheetImporter.java on lines 636..646
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/DataModelSheetImporter.java on lines 551..562
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/DoseResponseSheetImporter.java on lines 601..611
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ExposureModelSheetImporter.java on lines 677..687
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/GenericModelSheetImporter.java on lines 656..666
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/HealthModelSheetImporter.java on lines 608..618
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/OtherModelSheetImporter.java on lines 651..661
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/PredictiveModelSheetImporter.java on lines 669..679
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ProcessModelSheetImporter.java on lines 609..620
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/QraModelSheetImporter.java on lines 658..669
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ToxicologicalModelSheetImporter.java on lines 623..633

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

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