Showing 10,536 of 10,536 total issues

Similar blocks of code found in 15 locations. Consider refactoring.
Open

        if 'numerator_meter_uuid' in new_values['data'].keys():
            if new_values['data']['numerator_meter_uuid'] is not None and \
                    isinstance(new_values['data']['numerator_meter_uuid'], str) and \
                    len(str.strip(new_values['data']['numerator_meter_uuid'])) > 0:
                numerator_meter_uuid = str.strip(new_values['data']['numerator_meter_uuid'])
Severity: Major
Found in myems-api/core/equipment.py and 14 other locations - About 7 hrs to fix
myems-api/core/combinedequipment.py on lines 948..952
myems-api/core/combinedequipment.py on lines 963..967
myems-api/core/combinedequipment.py on lines 970..974
myems-api/core/combinedequipment.py on lines 1328..1332
myems-api/core/combinedequipment.py on lines 1343..1347
myems-api/core/combinedequipment.py on lines 1350..1354
myems-api/core/energyflowdiagram.py on lines 535..539
myems-api/core/energyflowdiagram.py on lines 835..839
myems-api/core/energyflowdiagram.py on lines 1455..1459
myems-api/core/equipment.py on lines 791..795
myems-api/core/equipment.py on lines 813..817
myems-api/core/equipment.py on lines 1159..1163
myems-api/core/equipment.py on lines 1174..1178
myems-api/core/equipment.py on lines 1181..1185

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

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

Similar blocks of code found in 15 locations. Consider refactoring.
Open

        if 'meter_uuid' in new_values['data'].keys():
            if new_values['data']['meter_uuid'] is not None and \
                    isinstance(new_values['data']['meter_uuid'], str) and \
                    len(str.strip(new_values['data']['meter_uuid'])) > 0:
                meter_uuid = str.strip(new_values['data']['meter_uuid'])
Severity: Major
Found in myems-api/core/energyflowdiagram.py and 14 other locations - About 7 hrs to fix
myems-api/core/combinedequipment.py on lines 948..952
myems-api/core/combinedequipment.py on lines 963..967
myems-api/core/combinedequipment.py on lines 970..974
myems-api/core/combinedequipment.py on lines 1328..1332
myems-api/core/combinedequipment.py on lines 1343..1347
myems-api/core/combinedequipment.py on lines 1350..1354
myems-api/core/energyflowdiagram.py on lines 535..539
myems-api/core/energyflowdiagram.py on lines 1455..1459
myems-api/core/equipment.py on lines 791..795
myems-api/core/equipment.py on lines 806..810
myems-api/core/equipment.py on lines 813..817
myems-api/core/equipment.py on lines 1159..1163
myems-api/core/equipment.py on lines 1174..1178
myems-api/core/equipment.py on lines 1181..1185

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

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

Similar blocks of code found in 15 locations. Consider refactoring.
Open

        if 'numerator_meter_uuid' in new_values['data'].keys():
            if new_values['data']['numerator_meter_uuid'] is not None and \
                    isinstance(new_values['data']['numerator_meter_uuid'], str) and \
                    len(str.strip(new_values['data']['numerator_meter_uuid'])) > 0:
                numerator_meter_uuid = str.strip(new_values['data']['numerator_meter_uuid'])
Severity: Major
Found in myems-api/core/combinedequipment.py and 14 other locations - About 7 hrs to fix
myems-api/core/combinedequipment.py on lines 948..952
myems-api/core/combinedequipment.py on lines 970..974
myems-api/core/combinedequipment.py on lines 1328..1332
myems-api/core/combinedequipment.py on lines 1343..1347
myems-api/core/combinedequipment.py on lines 1350..1354
myems-api/core/energyflowdiagram.py on lines 535..539
myems-api/core/energyflowdiagram.py on lines 835..839
myems-api/core/energyflowdiagram.py on lines 1455..1459
myems-api/core/equipment.py on lines 791..795
myems-api/core/equipment.py on lines 806..810
myems-api/core/equipment.py on lines 813..817
myems-api/core/equipment.py on lines 1159..1163
myems-api/core/equipment.py on lines 1174..1178
myems-api/core/equipment.py on lines 1181..1185

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

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

Similar blocks of code found in 15 locations. Consider refactoring.
Open

            if 'uuid' in link['meter'].keys():
                if link['meter']['uuid'] is not None and \
                        isinstance(link['meter']['uuid'], str) and \
                        len(str.strip(link['meter']['uuid'])) > 0:
                    meter_uuid = str.strip(link['meter']['uuid'])
Severity: Major
Found in myems-api/core/energyflowdiagram.py and 14 other locations - About 7 hrs to fix
myems-api/core/combinedequipment.py on lines 948..952
myems-api/core/combinedequipment.py on lines 963..967
myems-api/core/combinedequipment.py on lines 970..974
myems-api/core/combinedequipment.py on lines 1328..1332
myems-api/core/combinedequipment.py on lines 1343..1347
myems-api/core/combinedequipment.py on lines 1350..1354
myems-api/core/energyflowdiagram.py on lines 535..539
myems-api/core/energyflowdiagram.py on lines 835..839
myems-api/core/equipment.py on lines 791..795
myems-api/core/equipment.py on lines 806..810
myems-api/core/equipment.py on lines 813..817
myems-api/core/equipment.py on lines 1159..1163
myems-api/core/equipment.py on lines 1174..1178
myems-api/core/equipment.py on lines 1181..1185

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

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

Similar blocks of code found in 15 locations. Consider refactoring.
Open

        if 'constant' in new_values['data'].keys():
            if new_values['data']['constant'] is not None and \
                    isinstance(new_values['data']['constant'], str) and \
                    len(str.strip(new_values['data']['constant'])) > 0:
                constant = str.strip(new_values['data']['constant'])
Severity: Major
Found in myems-api/core/equipment.py and 14 other locations - About 7 hrs to fix
myems-api/core/combinedequipment.py on lines 948..952
myems-api/core/combinedequipment.py on lines 963..967
myems-api/core/combinedequipment.py on lines 970..974
myems-api/core/combinedequipment.py on lines 1328..1332
myems-api/core/combinedequipment.py on lines 1343..1347
myems-api/core/combinedequipment.py on lines 1350..1354
myems-api/core/energyflowdiagram.py on lines 535..539
myems-api/core/energyflowdiagram.py on lines 835..839
myems-api/core/energyflowdiagram.py on lines 1455..1459
myems-api/core/equipment.py on lines 791..795
myems-api/core/equipment.py on lines 806..810
myems-api/core/equipment.py on lines 813..817
myems-api/core/equipment.py on lines 1174..1178
myems-api/core/equipment.py on lines 1181..1185

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

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

Similar blocks of code found in 15 locations. Consider refactoring.
Open

        if 'denominator_meter_uuid' in new_values['data'].keys():
            if new_values['data']['denominator_meter_uuid'] is not None and \
                    isinstance(new_values['data']['denominator_meter_uuid'], str) and \
                    len(str.strip(new_values['data']['denominator_meter_uuid'])) > 0:
                denominator_meter_uuid = str.strip(new_values['data']['denominator_meter_uuid'])
Severity: Major
Found in myems-api/core/combinedequipment.py and 14 other locations - About 7 hrs to fix
myems-api/core/combinedequipment.py on lines 948..952
myems-api/core/combinedequipment.py on lines 963..967
myems-api/core/combinedequipment.py on lines 1328..1332
myems-api/core/combinedequipment.py on lines 1343..1347
myems-api/core/combinedequipment.py on lines 1350..1354
myems-api/core/energyflowdiagram.py on lines 535..539
myems-api/core/energyflowdiagram.py on lines 835..839
myems-api/core/energyflowdiagram.py on lines 1455..1459
myems-api/core/equipment.py on lines 791..795
myems-api/core/equipment.py on lines 806..810
myems-api/core/equipment.py on lines 813..817
myems-api/core/equipment.py on lines 1159..1163
myems-api/core/equipment.py on lines 1174..1178
myems-api/core/equipment.py on lines 1181..1185

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

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

Similar blocks of code found in 15 locations. Consider refactoring.
Open

        if 'numerator_meter_uuid' in new_values['data'].keys():
            if new_values['data']['numerator_meter_uuid'] is not None and \
                    isinstance(new_values['data']['numerator_meter_uuid'], str) and \
                    len(str.strip(new_values['data']['numerator_meter_uuid'])) > 0:
                numerator_meter_uuid = str.strip(new_values['data']['numerator_meter_uuid'])
Severity: Major
Found in myems-api/core/equipment.py and 14 other locations - About 7 hrs to fix
myems-api/core/combinedequipment.py on lines 948..952
myems-api/core/combinedequipment.py on lines 963..967
myems-api/core/combinedequipment.py on lines 970..974
myems-api/core/combinedequipment.py on lines 1328..1332
myems-api/core/combinedequipment.py on lines 1343..1347
myems-api/core/combinedequipment.py on lines 1350..1354
myems-api/core/energyflowdiagram.py on lines 535..539
myems-api/core/energyflowdiagram.py on lines 835..839
myems-api/core/energyflowdiagram.py on lines 1455..1459
myems-api/core/equipment.py on lines 791..795
myems-api/core/equipment.py on lines 806..810
myems-api/core/equipment.py on lines 813..817
myems-api/core/equipment.py on lines 1159..1163
myems-api/core/equipment.py on lines 1181..1185

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

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

Similar blocks of code found in 15 locations. Consider refactoring.
Open

        if 'constant' in new_values['data'].keys():
            if new_values['data']['constant'] is not None and \
                    isinstance(new_values['data']['constant'], str) and \
                    len(str.strip(new_values['data']['constant'])) > 0:
                constant = str.strip(new_values['data']['constant'])
Severity: Major
Found in myems-api/core/equipment.py and 14 other locations - About 7 hrs to fix
myems-api/core/combinedequipment.py on lines 948..952
myems-api/core/combinedequipment.py on lines 963..967
myems-api/core/combinedequipment.py on lines 970..974
myems-api/core/combinedequipment.py on lines 1328..1332
myems-api/core/combinedequipment.py on lines 1343..1347
myems-api/core/combinedequipment.py on lines 1350..1354
myems-api/core/energyflowdiagram.py on lines 535..539
myems-api/core/energyflowdiagram.py on lines 835..839
myems-api/core/energyflowdiagram.py on lines 1455..1459
myems-api/core/equipment.py on lines 806..810
myems-api/core/equipment.py on lines 813..817
myems-api/core/equipment.py on lines 1159..1163
myems-api/core/equipment.py on lines 1174..1178
myems-api/core/equipment.py on lines 1181..1185

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

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

Similar blocks of code found in 15 locations. Consider refactoring.
Open

        if 'constant' in new_values['data'].keys():
            if new_values['data']['constant'] is not None and \
                    isinstance(new_values['data']['constant'], str) and \
                    len(str.strip(new_values['data']['constant'])) > 0:
                constant = str.strip(new_values['data']['constant'])
Severity: Major
Found in myems-api/core/combinedequipment.py and 14 other locations - About 7 hrs to fix
myems-api/core/combinedequipment.py on lines 948..952
myems-api/core/combinedequipment.py on lines 963..967
myems-api/core/combinedequipment.py on lines 970..974
myems-api/core/combinedequipment.py on lines 1343..1347
myems-api/core/combinedequipment.py on lines 1350..1354
myems-api/core/energyflowdiagram.py on lines 535..539
myems-api/core/energyflowdiagram.py on lines 835..839
myems-api/core/energyflowdiagram.py on lines 1455..1459
myems-api/core/equipment.py on lines 791..795
myems-api/core/equipment.py on lines 806..810
myems-api/core/equipment.py on lines 813..817
myems-api/core/equipment.py on lines 1159..1163
myems-api/core/equipment.py on lines 1174..1178
myems-api/core/equipment.py on lines 1181..1185

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

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

Similar blocks of code found in 15 locations. Consider refactoring.
Open

        if 'numerator_meter_uuid' in new_values['data'].keys():
            if new_values['data']['numerator_meter_uuid'] is not None and \
                    isinstance(new_values['data']['numerator_meter_uuid'], str) and \
                    len(str.strip(new_values['data']['numerator_meter_uuid'])) > 0:
                numerator_meter_uuid = str.strip(new_values['data']['numerator_meter_uuid'])
Severity: Major
Found in myems-api/core/combinedequipment.py and 14 other locations - About 7 hrs to fix
myems-api/core/combinedequipment.py on lines 948..952
myems-api/core/combinedequipment.py on lines 963..967
myems-api/core/combinedequipment.py on lines 970..974
myems-api/core/combinedequipment.py on lines 1328..1332
myems-api/core/combinedequipment.py on lines 1350..1354
myems-api/core/energyflowdiagram.py on lines 535..539
myems-api/core/energyflowdiagram.py on lines 835..839
myems-api/core/energyflowdiagram.py on lines 1455..1459
myems-api/core/equipment.py on lines 791..795
myems-api/core/equipment.py on lines 806..810
myems-api/core/equipment.py on lines 813..817
myems-api/core/equipment.py on lines 1159..1163
myems-api/core/equipment.py on lines 1174..1178
myems-api/core/equipment.py on lines 1181..1185

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

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

File energystoragepowerstationreportingrevenue.py has 479 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
Severity: Minor
Found in myems-api/reports/energystoragepowerstationreportingrevenue.py - About 7 hrs to fix

    Function $$AnimateCssDriverProvider has 187 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var $$AnimateCssDriverProvider = ['$$animationProvider', /** @this */ function($$animationProvider) {
      $$animationProvider.drivers.push('$$animateCssDriver');
    
      var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim';
      var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor';
    Severity: Major
    Found in myems-admin/js/angular/angular-animate.js - About 7 hrs to fix

      Function link has 187 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  link: function($scope, element, attrs, modelCtrl) {
                      var clear, customOpts, el, locale, opts, _formatted, _init, _picker, _setEndDate, _setStartDate, _validateMax, _validateMin;
                      el = $(element);
                      customOpts = $scope.opts;
                      opts = angular.extend({}, dateRangePickerConfig, customOpts);
      Severity: Major
      Found in myems-admin/js/plugins/daterangepicker/angular-daterangepicker.js - About 7 hrs to fix

        Function drawSeriesLines has 187 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function drawSeriesLines(series) {
                    function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
                        var points = datapoints.points,
                            ps = datapoints.pointsize,
                            prevx = null, prevy = null;
        Severity: Major
        Found in myems-admin/js/plugins/flot/jquery.flot.js - About 7 hrs to fix

          File energystoragepowerstationreportingenergy.py has 478 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import re
          from datetime import datetime, timedelta, timezone
          from decimal import Decimal
          import falcon
          import mysql.connector
          Severity: Minor
          Found in myems-api/reports/energystoragepowerstationreportingenergy.py - About 7 hrs to fix

            Function drawGrid has 186 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function drawGrid() {
                        var i, axes, bw, bc;
            
                        ctx.save();
                        ctx.translate(plotOffset.left, plotOffset.top);
            Severity: Major
            Found in myems-admin/js/plugins/flot/jquery.flot.js - About 7 hrs to fix

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

                      if status is None:
                          raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                                 description="API.INVALID_STATUS")
                      else:
                          status = str.lower(str.strip(status))
              Severity: Major
              Found in myems-api/core/ticket.py and 1 other location - About 7 hrs to fix
              myems-api/core/webmessage.py on lines 62..74

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

              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 status is None:
                          raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                                 description="API.INVALID_STATUS")
                      else:
                          status = str.lower(str.strip(status))
              Severity: Major
              Found in myems-api/core/webmessage.py and 1 other location - About 7 hrs to fix
              myems-api/core/ticket.py on lines 63..75

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

              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

                                <p className="fs--1 mb-1">
                                  {t('PCS Run State')}:{' '}
                                  <strong
                                    className={classNames({
                                      'text-success': PCSRunState === 'Running',
              myems-web/src/components/MyEMS/Microgrid/MicrogridListItem.js on lines 127..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 182.

              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

                                <p className="fs--1 mb-1">
                                  {t('PCS Run State')}:{' '}
                                  <strong
                                    className={classNames({
                                      'text-success': PCSRunState === 'Running',
              myems-web/src/components/MyEMS/EnergyStoragePowerStation/EnergyStoragePowerStationListItem.js on lines 144..169

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

              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