SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Function coordsBidiPartWrapped has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {

Function coordsBidiPart has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) {

Function ReactElement has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

var ReactElement = function (type, key, ref, self, source, owner, props) {

Function equalObjects has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {

Function equalArrays has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {

Function baseMergeDeep has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {

Function baseIsEqualDeep has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {

Function baseClone has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {

Avoid deeply nested control flow statements.
Open

                        if (wfID != null) saveNodes(wfm, wfID);
                        else this.setWarningMessage("Saving Workflow into database failed1!");

Avoid deeply nested control flow statements.
Open

                        if (newValue != null) {
                            node.set(key, newValue);
                        }

Method createControl has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void createControl(final Composite parent) {
        container = new Composite(parent, SWT.NULL);
        GridLayout layout = new GridLayout();
        container.setLayout(layout);

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

Avoid deeply nested control flow statements.
Open

                        if (doc != null) {
                            for (PmmXmlElementConvertable el : doc.getElementSet()) {
                                if (el instanceof DepXml) {
                                    DepXml x = (DepXml) el;
                                    pv.setUnitLog10N(x.unit);

Method createNodeContainer has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private SingleNodeContainer createNodeContainer(WorkflowManager wfm, Integer processID, Object nodeAnno, String description, LinkedHashMap<Integer, NodeID> nodesMap, NodeFactory pf) {

Avoid deeply nested control flow statements.
Open

                        if (doc != null) {
                            for (PmmXmlElementConvertable el : doc.getElementSet()) {
                                if (el instanceof ParamXml) {
                                    ParamXml x = (ParamXml) el;
                                    if (x.name.equals(pv.getLog10N0())) pv.setUnitLog10N0(x.unit);

Avoid deeply nested control flow statements.
Open

                        if (rsZ != null && rsZ.first()) {                                    
                            ops[fromPort - 1].setOutFlux(100 * lhm.get(vp) / sum);
                            lhm.put(vp, -lhm.get(vp));
                            //addedVP = vp;
                            if (lhmm != null && lhmm.containsKey(vp)) ops[fromPort - 1].setMatrix(lhmm.get(vp));

Avoid deeply nested control flow statements.
Open

                        if (selModelID != null) {
                            if (set.getNewConcentrationParameters().containsKey(selModelID) && set.getNewConcentrationParameters().get(selModelID) != null) {
                                pv.setLog10N0(set.getNewConcentrationParameters().get(selModelID));
                            }
                            if (set.getNewLagParameters().containsKey(selModelID) && set.getNewLagParameters().get(selModelID) != null) {

Avoid deeply nested control flow statements.
Open

                                        if (vp == null) {
                                            // new Node: IngredientNode
                                            if (dbl != null) {
                                                if (unit <= 7) { // ADV-Codes: 1=Kilogramm 2=Gramm 7=Liter 24=Prozent 25=Promille 35=Stück
                                                    if (unit == 1) dbl *= 1000;

Method saveSettings has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public void saveSettings( final Config config ) {        
        int i;
        Config c;
        
        config.addString(PARAM_PROCESSNAME, processName);

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

Avoid deeply nested control flow statements.
Open

                        if(!field.getValue().toString().equals("\"\"") && !field.getValue().toString().equals("\"-\""))
                            node.set(key, field.getValue());

Avoid deeply nested control flow statements.
Open

                        if (doc != null) {
                            for (PmmXmlElementConvertable el : doc.getElementSet()) {
                                if (el instanceof IndepXml) {
                                    IndepXml x = (IndepXml) el;
                                    if (x.name.equals(AttributeUtilities.ATT_TEMPERATURE) && x.unit != null) pv.setUnitTemp(x.unit);
Severity
Category
Status
Source
Language