SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

Method retrieveReference has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Reference retrieveReference(Row row) {

        // Check mandatory properties and throw exception if missing
        if (row.getCell(K).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing Is reference description?");

Method retrieveReference has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Reference retrieveReference(Row row) {

        // Check mandatory properties and throw exception if missing
        if (row.getCell(L).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing Is reference description?");

Method retrieveReference has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Reference retrieveReference(Row row) {

        // Check mandatory properties and throw exception if missing
        if (row.getCell(K).getCellType() != Cell.CELL_TYPE_STRING) {
            throw new IllegalArgumentException("Missing Is reference description?");

Method saveToNodeSettings has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public void saveToNodeSettings(final NodeSettingsWO settings) {
    settings.addString(MODEL_NAME, template.isSetModelName() ? template.getModelName() : null);
    settings.addString(MODEL_ID, template.isSetModelId() ? template.getModelId() : null);
    settings.addString(MODEL_LINK,
        template.isSetModelLink() ? template.getModelLink().toString() : null);

Method checkIfInputIsValid has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void checkIfInputIsValid() {
        Map<String, JComboBox<String>> depVarBoxes = new LinkedHashMap<>();
        isValid = true;

        for (String model : comboBoxes.keySet()) {

Method retrieveGeneralInformation has 49 lines of code (exceeds 25 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()];

Method retrieveGeneralInformation has 49 lines of code (exceeds 25 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()];

Method retrieveGeneralInformation has 49 lines of code (exceeds 25 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()];

Method updateDialog has 49 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 test has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Test
    public void test() throws Exception {
        Sheet sheet0;

        final Path path = Paths.get("files/Duarte_MetaData.xlsx");

Function tokenBase has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function tokenBase(stream, state, prev) {
    if (stream.sol()) state.indented = stream.indentation()
    if (stream.eatSpace()) return null

    var ch = stream.peek()
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/swift/swift.js - About 1 hr to fix

Function tokenBase has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function tokenBase(stream, state) {
    var ch = stream.next();
    if (hooks[ch]) {
      var result = hooks[ch](stream, state);
      if (result !== false) return result;
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/clike/clike.js - About 1 hr to fix

Function drawShadow has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        drawShadow: function () {
            var o = this.options,
                c = this.$cache,

                is_from_min = typeof o.from_min === "number" && !isNaN(o.from_min),
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/lib/ion.rangeSlider.js - About 1 hr to fix

Function _setOption has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _setOption: function( key, value ) {
        var isDraggable, isResizable,
            uiDialog = this.uiDialog;

        if ( key === "dialogClass" ) {

Function initUI has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function initUI() {

    function createMetadataList(parameter) {

      const formatProperty = (name, value) => value ? `<li><b>${name}</b>: ${value}</li>` : '';

Function 42 has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],42:[function(require,module,exports){
'use strict';

module.exports = function (data, opts) {
    if (!opts) opts = {};

Function serialize has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function serialize(components) {
    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

    var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
    var uriTokens = [];

Function wrapper has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function wrapper() {
        // Avoid `arguments` object use disqualifying optimizations by
        // converting it to an array before providing it to other functions.
        var length = arguments.length,
            index = length,

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

      if (state.waitProperty) {
        state.waitProperty = false;
        if (stream.match(/\b(\w+)\b/)) {
          state.waitDot = true;  // A property can be followed by another property
          state.waitPipe = true;  // A property can be followed by a filter
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/django/django.js on lines 134..141

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

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 2 locations. Consider refactoring.
Open

      if (state.waitProperty) {
        state.waitProperty = false;
        if (stream.match(/\b(\w+)\b/)) {
          state.waitDot = true;  // A property can be followed by another property
          state.waitPipe = true;  // A property can be followed by a filter
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/django/django.js on lines 233..240

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

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