SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

Method retrieveGeneralInformation has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    static GeneralInformation retrieveGeneralInformation(String[][] values) {

      GeneralInformation generalInformation = MetadataFactory.eINSTANCE.createGeneralInformation();

      String name = values[RakipRow.GENERAL_INFORMATION__NAME.num][RakipColumn.I.ordinal()];

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

  @Override
  public void loadFromNodeSettings(NodeSettingsRO settings) throws InvalidSettingsException {

    modelMetaData = settings.getString(CFG_MODEL_METADATA);
    // fix for old broken strings. Previously some strings were escaped and wrapped with

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

  public void convertMetadataToGenericVersion(PortObject[] inObjects)
      throws JsonMappingException, JsonProcessingException, IOException {
    ConversionUtils converter = new ConversionUtils();
    for (PortObject pO : inObjects) {
      FskPortObject fskpo = (FskPortObject) pO;

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

  @Override
  public void workflowChanged(WorkflowEvent event) {
    // Check event in the workflow. A node must be removed and the event must be a NodeContainer
    if (event.getType() == WorkflowEvent.Type.NODE_REMOVED
        && event.getOldValue() instanceof NodeContainer) {

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

    private void plotDataSet(XYPlot plot, Plotable plotable, String id,
            Color defaultColor, Shape defaultShape) throws ConvertException {
        double[][] points = plotable.getPoints(paramX, paramY, unitX, unitY,
                transformX, transformY);
        String legend = shortLegend.get(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 actionPerformed has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        @Override
        public void actionPerformed(ActionEvent e) {
            if (e.getSource() == okButton) {
                approved = true;
                colorList = new ArrayList<>();

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

    private String getData(Cell cell) {
        if (cell != null) {
            if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
                CellValue value = evaluator.evaluate(cell);

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

    public Set<String> getValuesInColumn(File file, String sheet, String column) throws Exception {
        Set<String> valueSet = new LinkedHashSet<>();
        Workbook wb = getWorkbook(file);
        Sheet s = wb.getSheet(sheet);

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

    @Override
    public void actionPerformed( ActionEvent e ) {
        if( e.getSource() == overrideBox ) {
            connField.setEditable(overrideBox.isSelected());
            loginField.setEditable(overrideBox.isSelected());

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

        @SuppressWarnings("unchecked")
        @Override
        public void setValueAt(Object value, int row, int column) {
            switch (column) {
            case 1:

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

    public static List<String> getUnitsFromCategories(List<?> categories) {
        List<String> units = new ArrayList<>();

        if (categories != null) {
            for (Object o : categories) {

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

    private LinkedHashMap<Double, Double> getEquiSeries(LinkedHashMap<Double, Double> timeSeries,
            LinkedList<Point2D.Double> ranges) {
        LinkedHashMap<Double, Double> result = new LinkedHashMap<Double, Double>();
        for (Double time : timeSeries.keySet()) {
            Double value = timeSeries.get(time);

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

    public static Category getCategoryByUnit(String unit) {
        Category category = new NoCategory();

        for (Object o : getAllCategories()) {
            Category cat;

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

    static void compare(Model1DataTuple actual, Model1DataTuple expected) {

        assertThat(actual.condId, equalTo(expected.condId));
        assertThat(actual.combaseId, equalTo(expected.combaseId));
        assertThat(actual.miscList.getMiscs().length, equalTo(expected.miscList.getMiscs().length));

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

  public void finishOutputCapturing(final ExecutionMonitor progress)
      throws RException, CanceledExecutionException, InterruptedException {
    String err = "", out = "";
    REXP output = null;
    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 monitor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private REXP monitor(final Callable<REXP> task)
        throws InterruptedException, RException, CanceledExecutionException {
      final FutureTask<REXP> runningTask = new FutureTask<>(task);
      final Thread t =
          (m_useNodeContext) ? ThreadUtils.threadWithContext(runningTask, "R-Evaluation")

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

        _create(name, mandatory, helperText) {
            let O = this;
            if ( name ) {

                // formgroup
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.editable.mt.ArrayForm.js - About 35 mins 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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

    @Override
    public Color getBackground() {
        if (!isValueValid && isEnabled() && getDocument() != null
                && getText().trim().isEmpty()) {
            return Color.RED;
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/ui/IntTextField.java on lines 112..120
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/ui/StringTextField.java on lines 105..113

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

    @Override
    public Color getBackground() {
        if (!isValueValid && isEnabled() && getDocument() != null
                && getText().trim().isEmpty()) {
            return Color.RED;
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/ui/DoubleTextField.java on lines 133..141
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/ui/IntTextField.java on lines 112..120

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

    @Override
    public Color getBackground() {
        if (!isValueValid && isEnabled() && getDocument() != null
                && getText().trim().isEmpty()) {
            return Color.RED;
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/ui/DoubleTextField.java on lines 133..141
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/ui/StringTextField.java on lines 105..113

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language