SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method thisKeyTyped has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    private void thisKeyTyped(final KeyEvent e) {
          char ch = e.getKeyChar();
          if (ch == KeyEvent.VK_ENTER) {
              saveNdispose();
        }

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

    private boolean setSelectedID(final int id, final boolean force) {
        if (id > 0 && (force || id != getSelectedID())) {
            for (int row=0;row<this.getRowCount();row++) {
                // evtl. sollte hier ein Thread eingebaut werden - wegen Gefahr zu langsam...
                Object o = this.getValueAt(row, 0);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBTable.java - 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 getMNVals has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    private void getMNVals(JTextArea textArea, String firstTablename, String mnTablename, String secondTablename, int id, String fields) {
        textArea.setText("");
        textArea.setToolTipText(id+"");
        String sql= "SELECT " + fields + " FROM " + DBKernel.delimitL(firstTablename) +
                " LEFT JOIN " + DBKernel.delimitL(mnTablename) +
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/gui/dbtable/MyDBForm.java - 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 getStrVal has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    private String getStrVal(HSSFCell cell, int maxChars) {
        String result = null;
        try {
            if (cell == null || cell.getCellType() == HSSFCell.CELL_TYPE_BLANK) {
            } else if (cell.getCellType() == HSSFCell.CELL_TYPE_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 handleForeignKey has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    private Integer handleForeignKey(Integer foreignID, MyTable foreignTable, final Statement anfrage, boolean forceNewEntry) {
          Integer cid = convertID(foreignTable.getTablename(), foreignID);
        if (cid != null) return cid;
        Integer result = null;
        ResultSet rs1 = DBKernel.getResultSet(anfrage, "SELECT * FROM " + DBKernel.delimitL(foreignTable.getTablename()) + " WHERE " + DBKernel.delimitL("ID") + "=" + foreignID, false);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MergeDBsAPriori.java - 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 go4Tables has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    private void go4Tables(final Statement anfrage, MyTable[] myTs, Integer[] myFromIDs) {
        int i=0;
        for (MyTable myT : myTs) {
            try {
                ResultSet rs = DBKernel.getResultSet(anfrage, "SELECT * FROM " + DBKernel.delimitL(myT.getTablename()) +
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MergeDBsAPriori.java - 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 insertDBL has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public static Object insertDBL(final String tablename, final String fieldname, final Integer tableID, Object kzID, String kz, Object value) {
        try {
            if (kzID == null) {
                kzID = DBKernel.getValue(tablename, "ID", tableID + "", fieldname);
                if (kzID == null) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - 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 sendRequest has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    boolean sendRequest(final String sql, final boolean suppressWarnings, final boolean fetchAdminInCase) {
        boolean result = false;
        if (conn != null) {
            boolean adminGathered = false;
            if (fetchAdminInCase && !isAdmin()) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyDBI.java - 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 createSBML has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

  private static SBMLDocument createSBML(FskPortObject fskObj, CombineArchive archive,
      String ModelId, Map<String, URI> URIS, String filePrefix) throws IOException {
    filePrefix = filePrefix + normalizeName(fskObj) + System.getProperty("file.separator");
    SBMLDocument doc = new SBMLDocument(3, 1);
    doc.addDeclaredNamespace("xmlns:fsk",

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

  private static SBMLDocument createSBML(FskPortObject fskObj, CombineArchive archive,
      String ModelId, Map<String, URI> URIS, String filePrefix) throws IOException {
    filePrefix = filePrefix + normalizeName(fskObj) + System.getProperty("file.separator");
    SBMLDocument doc = new SBMLDocument(3, 1);
    doc.addDeclaredNamespace("xmlns:fsk",

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 17 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void actionPerformed(ActionEvent e) {

      // if environment type is switched, clear added Files
      addedFiles.clear();

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

  private static SBMLDocument createSBML(FskPortObject fskObj, CombineArchive archive,
      String ModelId, Map<String, URI> URIS, String filePrefix) throws IOException {
    filePrefix = filePrefix + normalizeName(fskObj) + System.getProperty("file.separator");
    SBMLDocument doc = new SBMLDocument(3, 1);
    doc.addDeclaredNamespace("xmlns:fsk",

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

    public boolean conforms(DataTableSpec tspec) throws PmmException {
        if (tspec == null) return false;
        
        int n = tspec.getNumColumns();
        for (KnimeAttribute col : attributeSet) {

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

    public static void removeNullValues(List<Double> targetValues, List<List<Double>> argumentValues) {
        for (int i = 0; i < targetValues.size(); i++) {
            boolean remove = false;

            if (targetValues.get(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 setMatrixAttribute has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    private void setMatrixAttribute(Integer id, String name, String detail, String dbuuid) throws PmmException {
        PmmXmlDoc matrixXmlDoc = getMatrix();
        if (matrixXmlDoc == null) matrixXmlDoc = new PmmXmlDoc();
        MatrixXml mx = null;
        for (PmmXmlElementConvertable el : matrixXmlDoc.getElementSet()) {

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

    private void setAgentAttribute(Integer id, String name, String detail, String dbuuid) throws PmmException {
        PmmXmlDoc agentXmlDoc = getAgent();
        if (agentXmlDoc == null) agentXmlDoc = new PmmXmlDoc();
        AgentXml ax = null;
        for (PmmXmlElementConvertable el : agentXmlDoc.getElementSet()) {

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

    _createFilter () {
        let O = this;
        _log( 'TABLE MAIN / _createFilter' );

        // prepare sets for filter
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.table.mt.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 getColumnName has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        @Override
        public String getColumnName(int column) {
            switch (column) {
            case 0:
                return ID;

Function tokenBase has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function tokenBase(stream, state) {
    curPunc = null;
    var ch = stream.next();
    if (ch == "#") {
      stream.skipToEnd();
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/r/r.js - About 2 hrs to fix

Function regChange has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function regChange(cm, from, to, lendiff) {
    if (from == null) { from = cm.doc.first; }
    if (to == null) { to = cm.doc.first + cm.doc.size; }
    if (!lendiff) { lendiff = 0; }

Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 2 hrs to fix
Severity
Category
Status
Source
Language