SiLeBAT/FSK-Lab

View on GitHub
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/ui/TimeSeriesTable.java

Summary

Maintainability
B
6 hrs
Test Coverage

File TimeSeriesTable.java has 296 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 performPaste has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    private void performPaste() {
        int startRow = getSelectedRows()[0];
        int startCol = getSelectedColumns()[0];
        Clipboard system = Toolkit.getDefaultToolkit().getSystemClipboard();
        String trstring = 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 performPaste has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void performPaste() {
        int startRow = getSelectedRows()[0];
        int startCol = getSelectedColumns()[0];
        Clipboard system = Toolkit.getDefaultToolkit().getSystemClipboard();
        String trstring = null;

Method getTableCellEditorComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        public Component getTableCellEditorComponent(JTable table,
                Object value, boolean isSelected, int row, int column) {

Method performCopy has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void performCopy() {
        StringBuilder sbf = new StringBuilder();
        int numcols = getSelectedColumnCount();
        int numrows = getSelectedRowCount();
        int[] rowsselected = getSelectedRows();

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

There are no issues that match your filters.

Category
Status