Showing 10,536 of 10,536 total issues

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

    if "associated_equipment" not in report.keys() or \
            "energy_category_names" not in report['associated_equipment'].keys() or \
            len(report['associated_equipment']["energy_category_names"]) == 0 \
            or 'associated_equipment_names_array' not in report['associated_equipment'].keys() \
            or report['associated_equipment']['associated_equipment_names_array'] is None \
Severity: Major
Found in myems-api/excelexporters/combinedequipmentenergycategory.py and 1 other location - About 1 wk to fix
myems-api/excelexporters/combinedequipmentstatistics.py on lines 624..671

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

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 "associated_equipment" not in report.keys() or \
            "energy_category_names" not in report['associated_equipment'].keys() or \
            len(report['associated_equipment']["energy_category_names"]) == 0 \
            or 'associated_equipment_names_array' not in report['associated_equipment'].keys() \
            or report['associated_equipment']['associated_equipment_names_array'] is None \
Severity: Major
Found in myems-api/excelexporters/combinedequipmentstatistics.py and 1 other location - About 1 wk to fix
myems-api/excelexporters/combinedequipmentenergycategory.py on lines 808..856

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

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

app.controller('ShopfloorPointController', function (
    $scope, 
    $window,
    $translate, 
    ShopfloorService, 
myems-admin/app/controllers/settings/store/storepoint.controller.js on lines 3..133
myems-admin/app/controllers/settings/tenant/tenantpoint.controller.js on lines 3..133

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

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

app.controller('StorePointController', function (
    $window,
    $scope, 
    $translate, 
    StoreService, 
myems-admin/app/controllers/settings/shopfloor/shopfloorpoint.controller.js on lines 3..133
myems-admin/app/controllers/settings/tenant/tenantpoint.controller.js on lines 3..133

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

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

app.controller('TenantPointController', function (
    $scope, 
    $window,
    $translate, 
    TenantService, 
myems-admin/app/controllers/settings/shopfloor/shopfloorpoint.controller.js on lines 3..133
myems-admin/app/controllers/settings/store/storepoint.controller.js on lines 3..133

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

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 combinedequipment.py has 2995 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import uuid
from datetime import datetime, timedelta
import falcon
import mysql.connector
import simplejson as json
Severity: Major
Found in myems-api/core/combinedequipment.py - About 1 wk to fix

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

        if "subtotals_in_kgco2e" not in reporting_period_data.keys() or \
                reporting_period_data['subtotals_in_kgco2e'] is None or \
                len(reporting_period_data['subtotals_in_kgco2e']) == 0:
            pass
        else:
    Severity: Major
    Found in myems-api/excelexporters/tenantenergycategory.py and 5 other locations - About 1 wk to fix
    myems-api/excelexporters/shopfloorenergycategory.py on lines 397..458
    myems-api/excelexporters/shopfloorenergycategory.py on lines 466..526
    myems-api/excelexporters/spaceenergycategory.py on lines 378..439
    myems-api/excelexporters/spaceenergycategory.py on lines 442..502
    myems-api/excelexporters/tenantenergycategory.py on lines 376..437

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

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

        if "subtotals_in_kgce" not in reporting_period_data.keys() or \
                reporting_period_data['subtotals_in_kgce'] is None or \
                len(reporting_period_data['subtotals_in_kgce']) == 0:
            pass
        else:
    Severity: Major
    Found in myems-api/excelexporters/spaceenergycategory.py and 5 other locations - About 1 wk to fix
    myems-api/excelexporters/shopfloorenergycategory.py on lines 397..458
    myems-api/excelexporters/shopfloorenergycategory.py on lines 466..526
    myems-api/excelexporters/spaceenergycategory.py on lines 442..502
    myems-api/excelexporters/tenantenergycategory.py on lines 376..437
    myems-api/excelexporters/tenantenergycategory.py on lines 440..500

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

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

        if "subtotals_in_kgce" not in reporting_period_data.keys() or \
                reporting_period_data['subtotals_in_kgce'] is None or \
                len(reporting_period_data['subtotals_in_kgce']) == 0:
            pass
        else:
    Severity: Major
    Found in myems-api/excelexporters/shopfloorenergycategory.py and 5 other locations - About 1 wk to fix
    myems-api/excelexporters/shopfloorenergycategory.py on lines 466..526
    myems-api/excelexporters/spaceenergycategory.py on lines 378..439
    myems-api/excelexporters/spaceenergycategory.py on lines 442..502
    myems-api/excelexporters/tenantenergycategory.py on lines 376..437
    myems-api/excelexporters/tenantenergycategory.py on lines 440..500

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

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

        if "subtotals_in_kgco2e" not in reporting_period_data.keys() or \
                reporting_period_data['subtotals_in_kgco2e'] is None or \
                len(reporting_period_data['subtotals_in_kgco2e']) == 0:
            pass
        else:
    Severity: Major
    Found in myems-api/excelexporters/spaceenergycategory.py and 5 other locations - About 1 wk to fix
    myems-api/excelexporters/shopfloorenergycategory.py on lines 397..458
    myems-api/excelexporters/shopfloorenergycategory.py on lines 466..526
    myems-api/excelexporters/spaceenergycategory.py on lines 378..439
    myems-api/excelexporters/tenantenergycategory.py on lines 376..437
    myems-api/excelexporters/tenantenergycategory.py on lines 440..500

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

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

        if "subtotals_in_kgce" not in reporting_period_data.keys() or \
                reporting_period_data['subtotals_in_kgce'] is None or \
                len(reporting_period_data['subtotals_in_kgce']) == 0:
            pass
        else:
    Severity: Major
    Found in myems-api/excelexporters/tenantenergycategory.py and 5 other locations - About 1 wk to fix
    myems-api/excelexporters/shopfloorenergycategory.py on lines 397..458
    myems-api/excelexporters/shopfloorenergycategory.py on lines 466..526
    myems-api/excelexporters/spaceenergycategory.py on lines 378..439
    myems-api/excelexporters/spaceenergycategory.py on lines 442..502
    myems-api/excelexporters/tenantenergycategory.py on lines 440..500

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

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

        if "subtotals_in_kgco2e" not in reporting_period_data.keys() or \
                reporting_period_data['subtotals_in_kgco2e'] is None or \
                len(reporting_period_data['subtotals_in_kgco2e']) == 0:
            pass
        else:
    Severity: Major
    Found in myems-api/excelexporters/shopfloorenergycategory.py and 5 other locations - About 1 wk to fix
    myems-api/excelexporters/shopfloorenergycategory.py on lines 397..458
    myems-api/excelexporters/spaceenergycategory.py on lines 378..439
    myems-api/excelexporters/spaceenergycategory.py on lines 442..502
    myems-api/excelexporters/tenantenergycategory.py on lines 376..437
    myems-api/excelexporters/tenantenergycategory.py on lines 440..500

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

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

              modalInstance.result.then(function(energystoragecontainergrid) {
                energystoragecontainergrid.power_point_id = energystoragecontainergrid.power_point.id;
                energystoragecontainergrid.buy_meter_id = energystoragecontainergrid.buy_meter.id;
                energystoragecontainergrid.sell_meter_id = energystoragecontainergrid.sell_meter.id;
                if (energystoragecontainergrid.total_active_power_point != null && energystoragecontainergrid.total_active_power_point.id != null ) {
    myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainergrid.controller.js on lines 213..319

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

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

              modalInstance.result.then(function(modifiedEnergyStorageContainerGrid) {
                modifiedEnergyStorageContainerGrid.power_point_id = modifiedEnergyStorageContainerGrid.power_point.id;
                modifiedEnergyStorageContainerGrid.buy_meter_id = modifiedEnergyStorageContainerGrid.buy_meter.id;
                modifiedEnergyStorageContainerGrid.sell_meter_id = modifiedEnergyStorageContainerGrid.sell_meter.id;
    
    
    myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainergrid.controller.js on lines 86..191

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

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

    class MicrogridSensorCollection:
        def __init__(self):
            """Initializes Class"""
            pass
    
    
    Severity: Major
    Found in myems-api/core/microgrid.py and 1 other location - About 1 wk to fix
    myems-api/core/energystoragepowerstation.py on lines 591..702

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

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

    class EnergyStoragePowerStationContainerCollection:
        def __init__(self):
            """Initializes Class"""
            pass
    
    
    Severity: Major
    Found in myems-api/core/energystoragepowerstation.py and 1 other location - About 1 wk to fix
    myems-api/core/microgrid.py on lines 4782..4889

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

    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

    Function qrcode has 1570 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var qrcode = function() {
    
      //---------------------------------------------------------------------
      // qrcode
      //---------------------------------------------------------------------
    Severity: Major
    Found in myems-admin/js/angular/qrcode.js - About 1 wk to fix

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

      app.controller('EmailServerController', function($scope,
          $rootScope,
          $window,
          $translate,
          $uibModal,
      myems-admin/app/controllers/settings/contact/contact.controller.js on lines 3..143

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

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

      app.controller('ContactController', function(
          $scope,
          $rootScope,
          $window,
          $translate,
      myems-admin/app/controllers/settings/emailserver/emailserver.controller.js on lines 3..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 1272.

      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 equipment.py has 2730 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import uuid
      from datetime import datetime, timedelta
      import falcon
      import mysql.connector
      import simplejson as json
      Severity: Major
      Found in myems-api/core/equipment.py - About 1 wk to fix
        Severity
        Category
        Status
        Source
        Language