SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Method loadSettingsFrom has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  protected void loadSettingsFrom(NodeSettingsRO settings, PortObject[] input)
      throws NotConfigurableException {

    FskPortObject inputObject = (FskPortObject) input[0];

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

    private Map<String, String> getVariablesFromAssignments(String paramScript) {
        Map<String, String> vars = new HashMap<>();
        for (String line : paramScript.split("\\r?\\n")) {
            line = line.trim();
            if (line.startsWith("#"))

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

  void load(final NodeSettingsRO settings) throws InvalidSettingsException {

    // Load connections from string in settings
    if (settings.containsKey(CFG_JOIN_SCRIPT)) {
      try {

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

  private FskPortObject runSnippet(
      final FskPortObject fskObj,
      final FskSimulation simulation,
      final ExecutionContext exec,
      List<JoinRelationAdvanced> joinRelationList,

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

    @Override
    public void stateChanged(ChangeEvent e) {

      // Disable text field
      m_workingDirectoryPanel.getComponent(0).setEnabled(false);

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

    static metadata.Parameter retrieveParameter(String[][] values, int row) {

      // Check mandatory properties
      if (values[row][RakipColumn.L.ordinal()].isEmpty()) {
        throw new IllegalArgumentException("Missing parameter id");

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

  @Override
  public Optional<Path> getEnvironment() {

    if (files == null || files.length == 0)
      return Optional.empty();

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

  @Override
  protected PortObject[] execute(PortObject[] inData, ExecutionContext exec) throws Exception {

    this.setInternalPortObjects(inData);

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

  public final void runSnippet(final FskPortObject fskObj, final FskSimulation simulation,
      final ExecutionContext exec, NodeLogger LOGGER,
      final RunnerNodeInternalSettings internalSettings, RunnerNodeSettings nodeSettings)
      throws Exception {
    // Sets up working directory with resource files. This directory needs to be deleted.

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

    static metadata.Parameter retrieveParameter(String[][] values, int row) {

      // Check mandatory properties
      if (values[row][RakipColumn.L.ordinal()].isEmpty()) {
        throw new IllegalArgumentException("Missing parameter id");

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

  private void loadRawJsonData(DataArray param) throws Exception {

    String rawJsonData = "";
    String type = param.getParameterType();
    if (param.getData().length() > 1000 || type.equalsIgnoreCase("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 saveInputParameters has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public void saveInputParameters(FskPortObject fskObj, Path workingDirectory) throws Exception {
    String path = workingDirectory.toString() + File.separator + JSON_FILE_NAME;
    parameterJson = new ParameterJson(new File(path));

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

  private static void writeCombinedObject(CombinedFskPortObject fskObj, CombineArchive archive,
      Map<String, URI> URIS, String filePrefix, ScriptHandler scriptHandler) throws Exception {
    filePrefix = filePrefix + normalizeName(fskObj) + System.getProperty("file.separator");
    
    FskPortObject ffskObj = fskObj.getFirstFskPortObject();

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

  @Override
  protected void validateSettings(final NodeSettingsRO settings) throws InvalidSettingsException {
    m_repositoryLocationSettings.validateSettings(settings);
    m_maxSelectionNumberSettings.validateSettings(settings);
    if (settings.containsKey(KEY_SHOW_DOWNLOAD_BUTTON)) {

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

    @Override
    public void textChanged(Object source) {
        if (parameterFields.contains(source)) {
            int i = parameterFields.indexOf(source);
            String paramName = parameterNames.get(i);

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

  @Override
  public Optional<Path> getEnvironment() {

    if (archivePath == null || archivePath.isEmpty())
      return Optional.empty();

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

    public static Double inverseTransform(Double value, String transform) {
        if (value == null) {
            return null;
        } else if (transform.equals(ChartConstants.NO_TRANSFORM)) {
            return value;

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

    public static Double transform(Double value, String transform) {
        if (value == null) {
            return null;
        } else if (transform.equals(ChartConstants.NO_TRANSFORM)) {
            return value;

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

    public Map<String, List<Double>> getPossibleArgumentValues(boolean useData,
            boolean useMinMax) {
        Map<String, List<Double>> args = new LinkedHashMap<>();

        for (String var : functionArguments.keySet()) {

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

  @Override
  public Optional<Path> getEnvironment() {

    if (files == null || files.length == 0)
      return Optional.empty();

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

Severity
Category
Status
Source
Language