SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

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

    public ExposureModelScope retrieveScope(Sheet sheet) {


        ExposureModelScope scope = new ExposureModelScope();
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerExposureSheetImporter.java on lines 329..370
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/SwaggerRiskModelSheetImporter.java on lines 331..373

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

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 void setMatrixAttribute(Integer id, String name, String detail, String dbuuid) throws PmmException {
        PmmXmlDoc matrixXmlDoc = getMatrix();
        if (matrixXmlDoc == null) matrixXmlDoc = new PmmXmlDoc();
        MatrixXml mx = null;
        for (PmmXmlElementConvertable el : matrixXmlDoc.getElementSet()) {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/PmmTimeSeries.java on lines 456..474

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

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 void setAgentAttribute(Integer id, String name, String detail, String dbuuid) throws PmmException {
        PmmXmlDoc agentXmlDoc = getAgent();
        if (agentXmlDoc == null) agentXmlDoc = new PmmXmlDoc();
        AgentXml ax = null;
        for (PmmXmlElementConvertable el : agentXmlDoc.getElementSet()) {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/PmmTimeSeries.java on lines 475..493

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

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 PredictorViewNodeModel.java has 292 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

FoodProcessNodeModel has 26 methods (exceeds 20 allowed). Consider refactoring.
Open

public class FoodProcessNodeModel extends NodeModel {
    public static final int N_PORT_IN = 4;
    public static final int N_PORT_OUT = 4;
    public static String defaultBacterialUnit = "log10(count/g)";
    private static boolean doModelsOut = false;

StudySampleImpl has 26 methods (exceeds 20 allowed). Consider refactoring.
Open

public class StudySampleImpl extends MinimalEObjectImpl.Container implements StudySample {
    /**
     * The default value of the '{@link #getSampleName() <em>Sample Name</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->

ExposureModelScope has 26 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 ExposureModelScope {
  @SerializedName("product")
  private List<Product> product = new ArrayList<Product>();

OtherModelScope has 26 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 OtherModelScope {
  @SerializedName("product")
  private List<Product> product = null;

DoseResponseModelModelMath has 26 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 DoseResponseModelModelMath {
  @SerializedName("parameter")
  private List<Parameter> parameter = new ArrayList<Parameter>();

GenericModelScope has 26 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 GenericModelScope {
  @SerializedName("product")
  private List<Product> product = null;

ModelPlotterNodeModel has 26 methods (exceeds 20 allowed). Consider refactoring.
Open

public final class ModelPlotterNodeModel
        extends AbstractSVGWizardNodeModel<ModelPlotterViewRepresentation, ModelPlotterViewValue> {

    enum MODEL_TYPE {
        M12, M1, M2

Method createPanel has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private JComponent createPanel() {
        JPanel panel = new JPanel();
        JPanel rangePanel = new JPanel();

        minimumFields = new LinkedHashMap<>();

Method createMainComponent has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private JComponent createMainComponent() {
        if (set.isStandardVisibleColumns()) {
            set.setVisibleColumns(reader.getStandardVisibleColumns());
        }

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

    @Override
    protected BufferedDataTable[] execute(final BufferedDataTable[] inData, final ExecutionContext exec)
            throws Exception {
        KnimeTuple modelTuple = new KnimeTuple(set.getModelTuple().getSchema(),
                set.getModelTuple().getSchema().createSpec(), set.getModelTuple());

LieferkettenImporterEFSA has 26 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings("unused")
public class LieferkettenImporterEFSA extends FileFilter implements MyImporter {
    /**
     * This is the one of the methods that is declared in the abstract class
     */

Method fillHashtable has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    LinkedHashMap<Object, String> fillHashtable(final MyTable theTable, final String startDelim, final String delimiter, final String endDelim, final boolean goDeeper,
            final boolean forceUpdate, HashSet<MyTable> alreadyUsed) {
        if (theTable == null) {
            return null;
        }
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyDBI.java - About 3 hrs to fix

RTokenMaker has 26 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings(value = { "all" })
class RTokenMaker extends AbstractJFlexCTokenMaker {

    /**
     * This character denotes the end of file

RTokenMaker has 26 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings(value = { "all" })
class RTokenMaker extends AbstractJFlexCTokenMaker {

    /**
     * This character denotes the end of file

RTokenMaker has 26 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings(value = { "all" })
class RTokenMaker extends AbstractJFlexCTokenMaker {

    /**
     * This character denotes the end of file

APPSimulation has 26 functions (exceeds 20 allowed). Consider refactoring.
Open

class APPSimulation {
    constructor ( settings, $container ) {
        let O = this;
        // defaults maintable simulations modal
        O._$container = $container;
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.simulation.js - About 3 hrs to fix
Severity
Category
Status
Source
Language