SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method getTopLevelParameterNames has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

  public static LinkedHashMap<String, String> getTopLevelParameterNames(FskPortObject portObject,
      LinkedHashMap<String, String> toplevelOutputParameters,
      LinkedHashMap<String, String> originalNamesMap, String suffix) {
    if (originalNamesMap == null) {
      originalNamesMap = new LinkedHashMap<String, String>();

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

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == clearButton) {
            for (int i = 0; i < ROW_COUNT; i++) {
                table.setTime(i, null);

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

        @Override
        public void actionPerformed(ActionEvent e) {
            JFileChooser fileChooser = new JFileChooser();
            FileFilter svgFilter = new FileFilter() {

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

    public SortedMap<String, Boolean> getAllParVars() {
        SortedMap<String, Boolean> result = new TreeMap<>();
        if (parameter != null && parameter.getElementSet() != null) {
            for (PmmXmlElementConvertable el : parameter.getElementSet()) {
                if (el instanceof ParamXml) {

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

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == manualRangeBox) {
            if (manualRangeBox.isSelected()) {
                minXField.setEnabled(true);

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

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == selectAllButton) {
            for (int i = 0; i < selectTable.getRowCount(); i++) {
                selectTable.setValueAt(true, i, 1);

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

    private static RInstance launchRserve(final String command, final String host, final Integer port)
            throws IOException {
        // if debugging, launch debug version of Rserve.
        final String cmd = (DEBUG_RSERVE && Platform.isWindows()) ? command.replace(".exe", "_d.exe") : command;

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

        get value() {
            let O = this;
            if (O.type === "date") {
                if(O.input.val()){
                    value = O.input.val().split("-");
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.InputForm.js - About 1 hr 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

Function _create has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    async _create () {
        let O = this;
        _log( 'TABLE MAIN / _create', 'primary' );
        
        O._facets = {}; // column facets
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.table.mt.js - About 1 hr 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

Function resampleLineTo has 14 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) {

Method convertProduct has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    static Product convertProduct(JsonNode node) {

        Product product = new Product();

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

Method convertReference has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    static Reference convertReference(JsonNode node) {
        Reference reference = new Reference();

        reference.setIsReferenceDescription(
                node.has("isReferenceDescription") ? node.get("isReferenceDescription").asBoolean() : false);

Method retrieveReference has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static Reference retrieveReference(Row row, Map<String, Integer> columns) {

        // Check mandatory properties and throw exception if missing
        if (row.getCell(columns.get("referenceDescription")).getCellTypeEnum() != CellType.STRING) {
            throw new IllegalArgumentException("Missing Is reference description?");

Method loadSettings has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void loadSettings(NodeSettingsRO settings) {
        try {
            literature = XmlConverter.xmlToObject(
                    settings.getString(CFGKEY_LITERATURE),
                    new ArrayList<LiteratureItem>());

Method setMetaDataFromAnnotation has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  void setMetaDataFromAnnotation(final Annotation annotation) {
    Metadata metadata = new MetadataAnnotation(annotation).getMetadata();

    if (metadata.isSetGivenName())
      template.setCreator(metadata.getGivenName());

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

    @Override
    protected BufferedDataTable[] execute(final BufferedDataTable[] inData,
            final ExecutionContext exec) throws Exception {
        BufferedDataTable table = inData[0];
        DataTableSpec inSpec = table.getSpec();

Method setPM has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void setPM(ParametricModel pm) {
        if (pm != null) {
            if (pm.getLevel() == 2) {
                if (!radioButton2.isSelected()) {
                    radioButton2.setSelected(true);

Method createUnitFromDB has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static PMFUnitDefinition createUnitFromDB(String unit) throws XMLStreamException {
        if (!DBUnits.getDBUnits().containsKey(unit)) {
            return null;
        }

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

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

Method keyPressed has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public void keyPressed(final KeyEvent keyEvent) {
      //System.out.println(keyEvent.getKeyCode() + "\t" + keyEvent.getKeyChar() + "\t" + KeyEvent.VK_F + "\t" + keyEvent.isControlDown());
    if (keyEvent.isControlDown() && keyEvent.getKeyCode() == KeyEvent.VK_LEFT) { //Ctrl+<-, Aussredem geht auch F8
        keyEvent.consume();
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBTable.java - About 1 hr to fix
Severity
Category
Status
Source
Language