SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

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

            while ( elem.length && elem[ 0 ] !== document ) {
                // Ignore z-index if position is set to a value where z-index is ignored by the browser
                // This makes behavior of this function consistent across browsers
                // WebKit always returns auto if the element is positioned
                position = elem.css( "position" );
de.bund.bfr.knime.pmm.nodes/js-src/de/bund/bfr/knime/pmm/js/modelplotter/jquery-ui.js on lines 8009..8025

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

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

  AjaxAdapter.prototype._applyDefaults = function (options) {
    var defaults = {
      data: function (params) {
        return $.extend({}, params, {
          q: params.term
de.bund.bfr.knime.js/src/js/lib/select2.full.js on lines 3670..3688

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

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

    private List<JsM1DataSchema> codeM1DataSchema(List<KnimeTuple> tuples) {

        List<JsM1DataSchema> schemas = new ArrayList<>(tuples.size());

        for (KnimeTuple tuple : tuples) {

Method doFields has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private String doFields(final PreparedStatement ps, final MyTable myT, ResultSet rs, final Statement anfrage, String sql) {
        try {
            String[] fn = myT.getFieldNames();
            String[] ft = myT.getFieldTypes();
            MyTable[] foreigns = myT.getForeignFields();
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MergeDBsAPriori.java - About 4 hrs to fix

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

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

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

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

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

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

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

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

Function voronoi has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.geom.voronoi = function(points) {
    var x = d3_svg_lineX, y = d3_svg_lineY, clipPolygon = null;
    if (arguments.length) return voronoi(points);
    function voronoi(data) {
      var points, polygons = data.map(function() {

Function 34 has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],34:[function(require,module,exports){
'use strict';
module.exports = function generate_ref(it, $keyword, $ruleType) {
  var out = ' ';
  var $lvl = it.level;

ModelPlotterViewValue has 37 methods (exceeds 20 allowed). Consider refactoring.
Open

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

  private int minXAxis;

JoinerNodeModel has 37 methods (exceeds 20 allowed). Consider refactoring.
Open

public final class JoinerNodeModel extends
    AbstractWizardNodeModel<JoinerViewRepresentation, JoinerViewValue> implements PortObjectHolder {
  private final JoinerNodeSettings nodeSettings = new JoinerNodeSettings();
  private FskPortObject m_port;
  public final static String suffix = "_dup";

File CombaseReader.java has 368 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 loadJsonSetting has 120 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  protected void loadJsonSetting() throws IOException, CanceledExecutionException, ParseException {

    File directory =
        NodeContext.getContext().getWorkflowManager().getContext().getCurrentLocation();
    File settingFolder = new File(buildContainerName());

Function defineOptions has 120 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function defineOptions(CodeMirror) {
    var optionHandlers = CodeMirror.optionHandlers;

    function option(name, deflt, handle, notOnInit) {
      CodeMirror.defaults[name] = deflt;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 4 hrs to fix

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

    private GenericModelDataBackground retrieveBackground(Sheet sheet) {

        final GenericModelDataBackground background = new GenericModelDataBackground();

        try {
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/ConsumptionModelSheetImporter.java on lines 428..480

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

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

    private GenericModelDataBackground retrieveBackground(Sheet sheet) {

        final GenericModelDataBackground background = new GenericModelDataBackground();

        try {
de.bund.bfr.knime.fsklab.metadata.model/src/metadata/swagger/GenericModelSheetImporter.java on lines 406..458

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

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

    if (this.options.dir == null) {
      if ($e.prop('dir')) {
        this.options.dir = $e.prop('dir');
      } else if ($e.closest('[dir]').prop('dir')) {
        this.options.dir = $e.closest('[dir]').prop('dir');
de.bund.bfr.knime.js/src/js/lib/select2.full.js on lines 5353..5361

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

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

    if (this.options.dir == null) {
      if ($e.prop('dir')) {
        this.options.dir = $e.prop('dir');
      } else if ($e.closest('[dir]').prop('dir')) {
        this.options.dir = $e.closest('[dir]').prop('dir');
Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/select2.full.js and 1 other location - About 4 hrs to fix
de.bund.bfr.knime.pmm.nodes/js-lib/select2/4_0_3/debug/js/select2.js on lines 4967..4975

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

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 MyProzessXMLImporter.java has 366 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
Category
Status
Source
Language