SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

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

  @Override
  protected void saveSettingsTo(NodeSettingsWO settings) {

    File directory =
        NodeContext.getContext().getWorkflowManager().getContext().getCurrentLocation();

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

  @Override
  protected PortObject[] execute(PortObject[] inObjects, ExecutionContext exec) throws Exception {
    exec.setMessage("Reading subworkflow");
    final WorkflowContext origContext = NodeContext.getContext().getWorkflowManager().getContext();
    NodeContext nodeContext = NodeContext.getContext();

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

  @Override
  protected PortObject[] execute(PortObject[] inObjects, ExecutionContext exec) throws Exception {
    exec.setMessage("Reading subworkflow");
    final WorkflowContext origContext = NodeContext.getContext().getWorkflowManager().getContext();
    NodeContext nodeContext = NodeContext.getContext();

Method checkAndRegenerateSimulation has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public void checkAndRegenerateSimulation(List<FskSimulation> simulations,
      List<Parameter> originalParameters, List<Parameter> newParams) {
    List<Parameter> paramsToBeRemoved =
        (List<Parameter>) CollectionUtils.removeAll(originalParameters, newParams);
    List<Parameter> viewParams =  (List<Parameter>) CollectionUtils.removeAll(newParams, originalParameters);

File ColumnDocumentImpl.java has 255 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * An XML document type.
 * Localname: Column
 * Namespace: http://www.bfr.bund.de/PCML-1_0
 * Java type: de.bund.bfr.pcml10.ColumnDocument

Method loadFrom has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    void loadFrom(final InputStream is)
            throws IOException, XmlException {
        // use NonClosableInputStream to prevent multiple calling of close.
        // We do it in the next line.
        XmlObject xmlDoc = PCMLDocument.Factory.parse(

Function token has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    token: function (stream, state) {
      //check for state changes
      if (!state.inString && ((stream.peek() == '"') || (stream.peek() == "'"))) {
        state.stringType = stream.peek();
        stream.next(); // Skip quote
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/toml/toml.js - About 2 hrs to fix

Function _createSimplePanel has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _createSimplePanel(menu, modelHandler) {
        let O = this;
        _log('MODAL DETAILS / _createSimplePanel: ' + menu.id);

        // tab-pane
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.mt.details.js - About 2 hrs to fix

Function _createTableHead has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _createTableHead(cols) {
        let O = this;
        _log('TABLE / _createTableHead');
        // thead
        let $thead = $('<thead></thead>');
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.table.js - About 2 hrs to fix

Function convertToValue has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        convertToValue: function (percent) {
            var min = this.options.min,
                max = this.options.max,
                min_decimals = min.toString().split(".")[1],
                max_decimals = max.toString().split(".")[1],
Severity: Major
Found in de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js - About 2 hrs to fix

Function parse has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    parse: function( red, green, blue, alpha ) {
        if ( red === undefined ) {
            this._rgba = [ null, null, null, null ];
            return this;
        }

Function keydown has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            keydown: function( event ) {
                if ( this.element.prop( "readOnly" ) ) {
                    suppressKeyPress = true;
                    suppressInput = true;
                    suppressKeyPressRepeat = true;

Function markText has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function markText(doc, from, to, options, type) {
  // Shared markers (across linked documents) are handled separately
  // (markTextShared will call out to this again, once per
  // document).
  if (options && options.shared) { return markTextShared(doc, from, to, options, type) }

Function markText has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function markText(doc, from, to, options, type) {
  // Shared markers (across linked documents) are handled separately
  // (markTextShared will call out to this again, once per
  // document).
  if (options && options.shared) { return markTextShared(doc, from, to, options, type) }

Function 19 has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],19:[function(require,module,exports){
'use strict';
module.exports = function generate_const(it, $keyword, $ruleType) {
  var out = ' ';
  var $lvl = it.level;

Function rules has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function rules() {
  var RULES = [
    { type: 'number',
      rules: [ { 'maximum': ['exclusiveMaximum'] },
               { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] },

Function decode has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function decode(input) {
        // Don't use UCS-2
        var output = [],
            inputLength = input.length,
            out,

Function resolveComponents has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function resolveComponents(base, relative) {
    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
    var skipNormalization = arguments[3];

    var target = {};

Function update has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        update: function(){
            if (!this._allow_update)
                return this;

            var oldDates = this.dates.copy(),

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

  @Override
  protected void reset() {
    NodeContext nodeContext = NodeContext.getContext();
    WorkflowManager wfm = nodeContext.getWorkflowManager();
    WorkflowContext workflowContext = wfm.getContext();
de.bund.bfr.knime.fsklab.deprecatednodes/src-1_9_0/de/bund/bfr/knime/fsklab/v1_9/reader/ReaderNodeModel.java on lines 126..152

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 137.

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