SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method createCategory has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    private Category createCategory(Map<Integer, UnitsFromDB> units, String categoryName) {
        DJep parser = MathUtilities.createParser();
        Map<String, Node> fromFormulas = new LinkedHashMap<>();
        Map<String, Node> toFormulas = new LinkedHashMap<>();
        Map<String, String> fromFormulaStrings = new LinkedHashMap<>();

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 release has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

        public synchronized void release() throws RException {
            if (!m_available) {
                // Either m_pendingDestructionTask is null, which means
                // this resource is being held, or the resource is available
                // and has destruction pending.

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 getMiscUnits has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    public static Map<String, String> getMiscUnits(List<KnimeTuple> tuples) {
        Map<String, Map<String, Integer>> occurences = new LinkedHashMap<>();
        Map<String, String> map = new LinkedHashMap<>();

        for (KnimeTuple tuple : tuples) {

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 getColor has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    private Color getColor(String param, Color lastBG, String lastParam) {
        Color bg = Color.WHITE;
        @SuppressWarnings("unused")
        Color fg = Color.BLACK;
        if (JCheckboxWithObject.isTemperature(param)) {

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 createForm has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

var createForm = (prop, value, port) =>   {
    let isMandatory = prop.required ? prop.required : false;

    if (prop.type === "text" || prop.type === "number" || prop.type === "url" ||
        prop.type === "date" || prop.type === "email"  || prop.type === "year_date")
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.utils.js - About 2 hrs 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 convertParameter has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    static Parameter convertParameter(JsonNode node) {

        Parameter parameter = new Parameter();

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

Method eSet has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @SuppressWarnings("unchecked")
    @Override
    public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case MetadataPackage.POPULATION_GROUP__POPULATION_NAME:

Method loadSettingsFrom has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected void loadSettingsFrom(final NodeSettingsRO settings, final DataTableSpec[] specs)
            throws NotConfigurableException {
        set = new SettingsHelper();
        set.loadSettings(settings);

Method checkForeignWindow2Open has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private void checkForeignWindow2Open(final int row, final int col) {
    MyTable[] myTs = actualTable.getForeignFields();
    //System.out.println(lastClickedRow + "\t" + lastClickedCol + "\t" + myTs.length);
    if (col > 0 && col <= myTs.length && myTs[col-1] != null &&
            !myTs[col-1].getTablename().equals("DoubleKennzahlen")) { 
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBTable.java - About 2 hrs to fix

Method dbBackup has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private static void dbBackup(final JFrame frame, final File backupFile, final boolean silent) {
        if (backupFile != null && backupFile.getParentFile().exists() && DBKernel.DBFilesDa(DBKernel.HSHDB_PATH, DBKernel.dbKennung)) {
            try {
                if (backupFile.exists()) {
                    backupFile.delete();
Severity: Major
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/Backup.java - About 2 hrs to fix

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

  @Override
  protected PortObject[] execute(final PortObject[] inData, final ExecutionContext exec)
      throws Exception {
    try {
      FskPortObject portObj = new FskPortObject();

Method getPoints has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public double[][] getPoints(String paramX, String paramY, String unitX,
            String unitY, String transformX, String transformY,
            Map<String, Integer> choice) throws ConvertException {
        List<Double> xList = valueLists.get(paramX);
        List<Double> yList = valueLists.get(paramY);

Method createPcData has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void createPcData(PCMLDocument pcmlDoc, final PortObject[] inObjects) {
        PCML pcml = pcmlDoc.getPCML();
        ProcessChain pChain = pcml.addNewProcessChain();

        // Fetches model metadata from the 1st table (metadata table)

Function formatStringFactory has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function formatStringFactory(delimiter, tokenOuter) {
      while ("rubf".indexOf(delimiter.charAt(0).toLowerCase()) >= 0)
        delimiter = delimiter.substr(1);

      var singleline = delimiter.length == 1;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/python/python.js - About 2 hrs to fix

Function Display has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function Display(place, doc, input, options) {
    var d = this;
    this.input = input;

    // Covers bottom-right square when both scrollbars are present.
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 2 hrs to fix

Function findPosH has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function findPosH(doc, pos, dir, unit, visually) {
    var oldPos = pos;
    var origDir = dir;
    var lineObj = getLine(doc, pos.line);
    function findNextLine() {
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 2 hrs to fix

Function onDrop has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function onDrop(e) {
    var cm = this;
    clearDragCursor(cm);
    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))
      { return }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 2 hrs to fix

Function _positionDropdown has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  AttachBody.prototype._positionDropdown = function () {
    var $window = $(window);

    var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
    var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
Severity: Major
Found in de.bund.bfr.knime.pmm.nodes/js-lib/select2/4_0_3/debug/js/select2.js - About 2 hrs to fix

Function event has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    brush.event = function(g) {
      g.each(function() {
        var event_ = event.of(this, arguments), extent1 = {
          x: xExtent,
          y: yExtent,

Function _refreshValue has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _refreshValue: function() {
        var lastValPercent, valPercent, value, valueMin, valueMax,
            oRange = this.options.range,
            o = this.options,
            that = this,
Severity
Category
Status
Source
Language