SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method sendRequest has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    public static boolean sendRequest(Connection conn, final String sql, final boolean suppressWarnings, final boolean fetchAdminInCase) {
        boolean result = false;
        boolean adminGathered = false;
        try {
            if (conn == null || conn.isClosed()) conn = getDBConnection();
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - 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

Method LD has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    public static int LD (String s, String t) {
    int d[][]; // matrix
    int n; // length of s
    int m; // length of t
    int i; // iterates through s
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/Levenshtein.java - 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

Method different has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    private boolean different(final Object[] rowBefore,
            final Object[] rowAfter) {
        if (rowBefore == null && rowAfter == null) {
            return false;
        }
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTrigger.java - 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

Method execute has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  protected PortObject[] execute(final PortObject[] inData, final ExecutionContext exec)
      throws CombineArchiveException, REXPMismatchException, RException, InvalidPathException,
      IOException, NoInternetException {

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

  private static void writeArchive(File archiveFile, FskPortObject portObject,
      ExecutionContext exec) throws Exception {

    Map<String, URI> URIS = FSKML.getURIS(1, 0, 12);

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

  private void subModelParametersToJson(FskPortObject topLevel, FskPortObject fskObj,
      ParameterJson combinedJson, String suffix) throws Exception {


    if (fskObj instanceof CombinedFskPortObject) {

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

  public static void removeJoinedParameters(JoinRelation[] relations, FskPortObject outfskPort) {
    if (outfskPort instanceof CombinedFskPortObject) {
      if (relations != null)
        for (JoinRelation relation : relations) {

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

  private static void writeArchive(File archiveFile, FskPortObject portObject,
      ExecutionContext exec, ScriptHandler scriptHandler) throws Exception {

    Map<String, URI> URIS = FSKML.getURIS(1, 0, 12);

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

  public static void addIdentifierToParametersForCombinedObject(FskPortObject portObject,
      String suffix, int suffixInsertionIndex,
      final Map<String, List<String>> unModifiedParamsNames,
      Map<String, Map<String, String>> old_new_pramsMap)
      throws JsonMappingException, JsonProcessingException {

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

    public boolean complies(KnimeTuple tuple) throws PmmException {

        if (isModelFilterEnabled()) {
            PmmXmlDoc x = tuple.getPmmXml(Model1Schema.getAttribute(Model1Schema.ATT_MODELCATALOG, tuple.getSchema().conforms(new Model1Schema()) ? 1 : 2));
            if (x != 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 applyColumnSelection has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    private void applyColumnSelection(List<String> visibleColumns) {
        List<String> columns = new ArrayList<>();

        columns.addAll(Arrays.asList(COLOR, SHAPE, DATA, FORMULA, PARAMETERS,
                VARIABLES));

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

    @Override
    public Object getValueAt(int row, int col) {
      switch (Col.values()[col]) {
        case Model_Name:
          return template.modelName;

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

        validate() {
            let O = this;
            _log( 'PANEL  / _validateForm' );
           
            let validationErrors = [];
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 _getModelHandler has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    async _getModelHandler(modelMetadata) {
        let O = this;
        _log('MODAL DETAILS / _getModelHandler');

        let modelHandler = null;
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.details.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

Method setNodeAnnotation has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void setNodeAnnotation(String newAnnotation, NodeSettingsWO s) {
        long ttt = System.currentTimeMillis();
        Collection<NodeContainer> ncs = WorkflowManager.ROOT.getNodeContainers();
        for (NodeContainer nc : ncs) {
            if (nc instanceof WorkflowManager) {

Method setSettings has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void setSettings(Config c, double[] volumeDef, String[] volumeUnitDef) {
        panel1.removeAll();
        l1.clear();
        lmat.clear();
        lage.clear();

Method createDoc has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private PCMLDocument createDoc() {
        PCMLDocument pcmlDoc = PCMLUtil.create();
        
        PCML pcml = pcmlDoc.getPCML();
        ProcessChain pChain = pcml.addNewProcessChain();

Method retrieveStudySample has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static StudySample retrieveStudySample(Row row, Map<String, Integer> columns) {

        // Check mandatory properties
        final Cell sampleNameCell = row.getCell(columns.get("sample"));
        if (sampleNameCell.getCellTypeEnum() == CellType.BLANK) {

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

    @Override
    protected PortObject[] execute(PortObject[] inObjects, ExecutionContext exec)
            throws Exception {
        BufferedDataTable table = (BufferedDataTable) inObjects[0];
        TableReader reader = new TableReader(table,

Method decodeM2Schemas has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private List<KnimeTuple> decodeM2Schemas(List<JsM2Schema> schemas) {

        List<KnimeTuple> tuples = new ArrayList<>(schemas.size());

        KnimeSchema knimeSchema = SchemaFactory.createM2Schema();
Severity
Category
Status
Source
Language