Showing 10,536 of 10,536 total issues

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

app.controller('ProtocolController', function($scope,
    $rootScope,
    $window,
    $translate,
    $uibModal,
myems-admin/app/controllers/settings/gateway/gateway.controller.js on lines 3..239
myems-admin/app/controllers/settings/sensor/sensor.controller.js on lines 3..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 2183.

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

    for i, value in enumerate(category):
        row = i * 2 + 9
        ws['B' + str(row)].font = name_font
        ws['B' + str(row)].alignment = c_c_alignment
        ws['B' + str(row)] = reporting_period_data['names'][i] + " (" + reporting_period_data['units'][i] + "/H )"
Severity: Major
Found in myems-api/excelexporters/equipmentload.py and 3 other locations - About 1 wk to fix
myems-api/excelexporters/combinedequipmentload.py on lines 227..276
myems-api/excelexporters/shopfloorload.py on lines 226..275
myems-api/excelexporters/storeload.py on lines 226..275

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

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

    for i, value in enumerate(category):
        row = i * 2 + 9
        ws['B' + str(row)].font = name_font
        ws['B' + str(row)].alignment = c_c_alignment
        ws['B' + str(row)] = reporting_period_data['names'][i] + " (" + reporting_period_data['units'][i] + "/H )"
Severity: Major
Found in myems-api/excelexporters/storeload.py and 3 other locations - About 1 wk to fix
myems-api/excelexporters/combinedequipmentload.py on lines 227..276
myems-api/excelexporters/equipmentload.py on lines 225..274
myems-api/excelexporters/shopfloorload.py on lines 226..275

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

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

    for i, value in enumerate(category):
        row = i * 2 + 9
        ws['B' + str(row)].font = name_font
        ws['B' + str(row)].alignment = c_c_alignment
        ws['B' + str(row)] = reporting_period_data['names'][i] + " (" + reporting_period_data['units'][i] + "/H )"
Severity: Major
Found in myems-api/excelexporters/combinedequipmentload.py and 3 other locations - About 1 wk to fix
myems-api/excelexporters/equipmentload.py on lines 225..274
myems-api/excelexporters/shopfloorload.py on lines 226..275
myems-api/excelexporters/storeload.py on lines 226..275

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

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

    for i, value in enumerate(category):
        row = i * 2 + 9
        ws['B' + str(row)].font = name_font
        ws['B' + str(row)].alignment = c_c_alignment
        ws['B' + str(row)] = reporting_period_data['names'][i] + " (" + reporting_period_data['units'][i] + "/H )"
Severity: Major
Found in myems-api/excelexporters/shopfloorload.py and 3 other locations - About 1 wk to fix
myems-api/excelexporters/combinedequipmentload.py on lines 227..276
myems-api/excelexporters/equipmentload.py on lines 225..274
myems-api/excelexporters/storeload.py on lines 226..275

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

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 space.py has 4401 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/space.py - About 1 wk to fix

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

    app.controller('MicrogridLoadController', function(
        $scope,
        $rootScope,
        $window,
        $translate,
    myems-admin/app/controllers/settings/microgrid/microgridevcharger.controller.js on lines 3..204
    myems-admin/app/controllers/settings/microgrid/microgridgenerator.controller.js on lines 3..204
    myems-admin/app/controllers/settings/microgrid/microgridphotovoltaic.controller.js on lines 3..205

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

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

    app.controller('MicrogridEVChargerController', function(
        $scope,
        $rootScope,
        $window,
        $translate,
    myems-admin/app/controllers/settings/microgrid/microgridgenerator.controller.js on lines 3..204
    myems-admin/app/controllers/settings/microgrid/microgridload.controller.js on lines 3..204
    myems-admin/app/controllers/settings/microgrid/microgridphotovoltaic.controller.js on lines 3..205

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

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

    app.controller('MicrogridPhotovoltaicController', function(
        $scope,
        $rootScope,
        $window,
        $translate,
    myems-admin/app/controllers/settings/microgrid/microgridevcharger.controller.js on lines 3..204
    myems-admin/app/controllers/settings/microgrid/microgridgenerator.controller.js on lines 3..204
    myems-admin/app/controllers/settings/microgrid/microgridload.controller.js on lines 3..204

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

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

    app.controller('MicrogridGeneratorController', function(
        $scope,
        $rootScope,
        $window,
        $translate,
    myems-admin/app/controllers/settings/microgrid/microgridevcharger.controller.js on lines 3..204
    myems-admin/app/controllers/settings/microgrid/microgridload.controller.js on lines 3..204
    myems-admin/app/controllers/settings/microgrid/microgridphotovoltaic.controller.js on lines 3..205

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

    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

                if meta_result['parameters'] is not None and len(meta_result['parameters']) > 0:
                    for parameters in meta_result['parameters']:
                        cursor.execute(" SELECT name "
                                       " FROM tbl_combined_equipments_parameters "
                                       " WHERE name = %s AND combined_equipment_id = %s ", (parameters['name'], new_id))
    Severity: Major
    Found in myems-api/core/combinedequipment.py and 1 other location - About 1 wk to fix
    myems-api/core/combinedequipment.py on lines 2808..2947

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

    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

            if new_values['parameters'] is not None and len(new_values['parameters']) > 0:
                for parameters in new_values['parameters']:
                    cursor.execute(" SELECT name "
                                   " FROM tbl_combined_equipments_parameters "
                                   " WHERE name = %s AND combined_equipment_id = %s ", (parameters['name'], new_id))
    Severity: Major
    Found in myems-api/core/combinedequipment.py and 1 other location - About 1 wk to fix
    myems-api/core/combinedequipment.py on lines 3376..3515

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

    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 fullcalendar.min.js has 4312 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * FullCalendar v1.6.4
     * Docs & License: http://arshaw.com/fullcalendar/
     * (c) 2013 Adam Shaw
     */
    Severity: Major
    Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 wk to fix

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

      app.controller('SpaceStoreController', function(
          $scope,
          $window,
          $translate,
          SpaceService,
      myems-admin/app/controllers/settings/space/spacecommand.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceenergyflowdiagram.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceenergystoragepowerstation.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceequipment.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceshopfloor.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spacetenant.controller.js on lines 3..164

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

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

      app.controller('SpaceCommandController', function(
          $scope,
          $window,
          $translate,
          SpaceService,
      myems-admin/app/controllers/settings/space/spaceenergyflowdiagram.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceenergystoragepowerstation.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceequipment.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceshopfloor.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spacestore.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spacetenant.controller.js on lines 3..164

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

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

      app.controller('SpaceTenantController', function(
          $scope,
          $window,
          $translate,
          SpaceService,
      myems-admin/app/controllers/settings/space/spacecommand.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceenergyflowdiagram.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceenergystoragepowerstation.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceequipment.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceshopfloor.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spacestore.controller.js on lines 3..164

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

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

      app.controller('SpaceEnergyFlowDiagramController', function(
          $scope,
          $window,
          $translate,
          SpaceService,
      myems-admin/app/controllers/settings/space/spacecommand.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceenergystoragepowerstation.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceequipment.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceshopfloor.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spacestore.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spacetenant.controller.js on lines 3..164

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

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

      app.controller('SpaceEnergyStoragePowerStationController', function(
          $scope,
          $window,
          $translate,
          SpaceService,
      myems-admin/app/controllers/settings/space/spacecommand.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceenergyflowdiagram.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceequipment.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceshopfloor.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spacestore.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spacetenant.controller.js on lines 3..164

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

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

      app.controller('SpaceEquipmentController', function(
          $scope,
          $window,
          $translate,
          SpaceService,
      myems-admin/app/controllers/settings/space/spacecommand.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceenergyflowdiagram.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceenergystoragepowerstation.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceshopfloor.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spacestore.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spacetenant.controller.js on lines 3..164

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

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

      app.controller('SpaceShopfloorController', function(
          $scope,
          $window,
          $translate,
          SpaceService,
      myems-admin/app/controllers/settings/space/spacecommand.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceenergyflowdiagram.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceenergystoragepowerstation.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spaceequipment.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spacestore.controller.js on lines 3..164
      myems-admin/app/controllers/settings/space/spacetenant.controller.js on lines 3..164

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

      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