SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method drawAxisLine has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    protected void drawAxisLine(Graphics2D g2, double cursor,
            Rectangle2D dataArea, RectangleEdge edge) {
        Line2D axisLine = null;
        if (edge == RectangleEdge.TOP) {

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

File ReferenceImpl.java has 371 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 */
package metadata.impl;

import java.util.Date;

File SettingsHelper.java has 371 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

Function axis has 122 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.svg.axis = function() {
    var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, innerTickSize = 6, outerTickSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_;
    function axis(g) {
      g.each(function() {
        var g = d3.select(this);

File HazardImpl.java has 369 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 */
package metadata.impl;

import metadata.Hazard;

File ContactImpl.java has 369 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 */
package metadata.impl;

import metadata.Contact;

File XLS2PCMLNodeModel.java has 369 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 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
Severity
Category
Status
Source
Language