SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Consider simplifying this complex logical expression.
Open

            if (carverID >= 1 && carverID <= 31 || carverID == 332 ||
                    carverID >= 217 && carverID <= 220 ||
                    carverID >= 295 && carverID <= 307 ||
                    carverID >= 338 && carverID <= 340) result = true; // Material
            else if (carverID >= 280 && carverID <= 290 || carverID == 342) result = true; // Verpackung

Consider simplifying this complex logical expression.
Open

        if (names != null && units != null && types != null && mins != null && maxs != null
            && names.length == units.length && names.length == types.length
            && names.length == mins.length && names.length == maxs.length) {

          for (int i = 0; i < names.length; i++) {

Consider simplifying this complex logical expression.
Open

              if ((current == 0x9) ||
                  (current == 0xA) ||
                  (current == 0xD) ||
                  ((current >= 0x20) && (current <= 0xD7FF)) ||
                  ((current >= 0xE000) && (current <= 0xFFFD)) ||
Severity: Critical
Found in de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/DbIo.java - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

          if (ltr) {
            topLeft = docLTR && openStart && first ? leftSide : fromPos.left;
            topRight = docLTR ? rightSide : wrapX(from, dir, "before");
            botLeft = docLTR ? leftSide : wrapX(to, dir, "after");
            botRight = docLTR && openEnd && last ? rightSide : toPos.right;
Severity: Critical
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

    if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&
        repeat == "single" && (contained = sel.contains(pos)) > -1 &&
        (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&
        (cmp(contained.to(), pos) > 0 || pos.xRel < 0))
      { leftButtonStartDrag(cm, event, pos, behavior); }
Severity: Critical
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

    if ( _isUndefined( value ) 
        || _isNull( value ) 
        || typeof value == 'object' && Object.keys( value ).length === 0 && value.constructor === Object
        || typeof value == 'object' && value.length == 1 && _isNull( value[0] )
        || value.length <= 0 ) {
Severity: Critical
Found in de.bund.bfr.knime.js/src/js/app/app.utils.js - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

        if (this.floating && horizontalDirection) {
            return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
        } else {
            return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
        }

Consider simplifying this complex logical expression.
Open

        if(!(/^(document|window|parent)$/).test(o.containment)) {
            ce = $(o.containment)[0];
            co = $(o.containment).offset();
            over = ($(ce).css("overflow") !== "hidden");

Consider simplifying this complex logical expression.
Open

        if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
                $target.parents("#" + $.datepicker._mainDivId).length === 0 &&
                !$target.hasClass($.datepicker.markerClassName) &&
                !$target.closest("." + $.datepicker._triggerClass).length &&
                $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||

Consider simplifying this complex logical expression.
Open

  if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&
      repeat == "single" && (contained = sel.contains(pos)) > -1 &&
      (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&
      (cmp(contained.to(), pos) > 0 || pos.xRel < 0))
    { leftButtonStartDrag(cm, event, pos, behavior) }
Severity: Critical
Found in de.bund.bfr.knime.fsklab.deprecatednodes/js-lib/codemirror/codemirror.js - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

        if (ltr) {
          topLeft = docLTR && openStart && first ? leftSide : fromPos.left
          topRight = docLTR ? rightSide : wrapX(from, dir, "before")
          botLeft = docLTR ? leftSide : wrapX(to, dir, "after")
          botRight = docLTR && openEnd && last ? rightSide : toPos.right
Severity: Critical
Found in de.bund.bfr.knime.fsklab.deprecatednodes/js-lib/codemirror/codemirror.js - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

        if (ltr) {
          topLeft = docLTR && openStart && first ? leftSide : fromPos.left
          topRight = docLTR ? rightSide : wrapX(from, dir, "before")
          botLeft = docLTR ? leftSide : wrapX(to, dir, "after")
          botRight = docLTR && openEnd && last ? rightSide : toPos.right

Consider simplifying this complex logical expression.
Open

  if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&
      repeat == "single" && (contained = sel.contains(pos)) > -1 &&
      (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&
      (cmp(contained.to(), pos) > 0 || pos.xRel < 0))
    { leftButtonStartDrag(cm, event, pos, behavior) }

Method convertContact has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    static Contact convertContact(JsonNode node) {
        Contact contact = new Contact();

        if (node.has("title")) {
            contact.setTitle(node.get("title").asText());

Method saveSettingsTo has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected void saveSettingsTo(NodeSettingsWO settings)
            throws InvalidSettingsException {
        if (!selectionPanel.getSelectedIDs().isEmpty()) {
            set.setSelectedID(selectionPanel.getSelectedIDs().get(0));

Method insertData has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void insertData(final int condId, final int timeId, final int lognId, String timeUnit, String concUnit, String concUnitObjectType) {
        try {
            PreparedStatement ps = conn.prepareStatement("INSERT INTO \"Messwerte\" (\"" + REL_CONDITION + "\", \"" + ATT_TIME + "\", \"ZeitEinheit\", \"" + ATT_LOG10N
                    + "\", \"Konz_Einheit\" )VALUES(?, ?, ?, ?, ?)");
            ps.setInt(1, condId);

Method updateDialog has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private void updateDialog(ModelType modelType, String readmeFile,
      EnvironmentManager environment) {
    modelTypeComboBoxModel.setSelectedItem(modelType);
    m_readmePanel.setSelectedFile(readmeFile);
    clearEnvironmentPanel();

Method createUI has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private void createUI() {

    // Model type panel
    final JPanel modelTypePanel = new JPanel(new BorderLayout());
    modelTypePanel.setBorder(

Method loadJsonSetting has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  protected void loadJsonSetting() throws IOException, CanceledExecutionException {

    File directory =
        NodeContext.getContext().getWorkflowManager().getContext().getCurrentLocation();
    String name = NodeContext.getContext().getNodeContainer().getName();

Method getFSKObjectFromStringArray has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private static FskPortObject getFSKObjectFromStringArray(Optional<EnvironmentManager> manager,
      String[] model, String modelType, Map<String, FskPortObject> fskID_to_fskObject)
      throws IOException {
    FskPortObject portObject = null;

Severity
Category
Status
Source
Language