Showing 10,536 of 10,536 total issues

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

    try:
        cnx_historical_db = mysql.connector.connect(**config.myems_historical_db)
        cursor_historical_db = cnx_historical_db.cursor()
    except Exception as e:
        error_string = "Error in step 1.2 of meter.worker " + str(e) + " for '" + meter['name'] + "'"
Severity: Major
Found in myems-normalization/meter.py and 1 other location - About 5 hrs to fix
myems-normalization/meter.py on lines 208..233

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

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

    try:
        query = (" SELECT utc_date_time, actual_value "
                 " FROM tbl_energy_value "
                 " WHERE point_id = %s AND utc_date_time < %s AND is_bad = 0 "
                 " ORDER BY utc_date_time DESC "
Severity: Major
Found in myems-normalization/meter.py and 1 other location - About 5 hrs to fix
myems-normalization/meter.py on lines 188..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 95.

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

app.controller('ModalEditWindFarmCtrl', function($scope, $uibModalInstance, params) {
    $scope.operation = "SETTING.EDIT_WIND_FARM";
    $scope.windfarm = params.windfarm;
    $scope.costcenters=params.costcenters;
    $scope.contacts=params.contacts;
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainer.controller.js on lines 214..227
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainerpowerconversionsystem.controller.js on lines 699..712
myems-admin/app/controllers/settings/microgrid/microgridpowerconversionsystem.controller.js on lines 247..260
myems-admin/app/controllers/settings/photovoltaicpowerstation/photovoltaicpowerstation.controller.js on lines 305..318
myems-admin/app/controllers/settings/space/space.controller.js on lines 400..414
myems-admin/app/controllers/settings/store/store.controller.js on lines 312..325
myems-admin/app/controllers/settings/virtualpowerplant/virtualpowerplant.controller.js on lines 306..320

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

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

app.controller('ModalEditStoreCtrl', function($scope, $uibModalInstance, params) {
    $scope.operation = "SETTING.EDIT_STORE";
    $scope.store = params.store;
    $scope.storetypes=params.storetypes;
    $scope.costcenters=params.costcenters;
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainer.controller.js on lines 214..227
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainerpowerconversionsystem.controller.js on lines 699..712
myems-admin/app/controllers/settings/microgrid/microgridpowerconversionsystem.controller.js on lines 247..260
myems-admin/app/controllers/settings/photovoltaicpowerstation/photovoltaicpowerstation.controller.js on lines 305..318
myems-admin/app/controllers/settings/space/space.controller.js on lines 400..414
myems-admin/app/controllers/settings/virtualpowerplant/virtualpowerplant.controller.js on lines 306..320
myems-admin/app/controllers/settings/windfarm/windfarm.controller.js on lines 305..318

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

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

app.controller('ModalEditSpaceCtrl', function ($scope, $uibModalInstance, params) {
    $scope.operation = "SETTING.EDIT_SPACE";
    $scope.space = params.space;
    $scope.timezones = params.timezones;
    $scope.costcenters = params.costcenters;
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainer.controller.js on lines 214..227
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainerpowerconversionsystem.controller.js on lines 699..712
myems-admin/app/controllers/settings/microgrid/microgridpowerconversionsystem.controller.js on lines 247..260
myems-admin/app/controllers/settings/photovoltaicpowerstation/photovoltaicpowerstation.controller.js on lines 305..318
myems-admin/app/controllers/settings/store/store.controller.js on lines 312..325
myems-admin/app/controllers/settings/virtualpowerplant/virtualpowerplant.controller.js on lines 306..320
myems-admin/app/controllers/settings/windfarm/windfarm.controller.js on lines 305..318

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

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

app.controller('ModalEditPhotovoltaicPowerStationCtrl', function($scope, $uibModalInstance, params) {
    $scope.operation = "SETTING.EDIT_PHOTOVOLTAIC_POWER_STATION";
    $scope.photovoltaicpowerstation = params.photovoltaicpowerstation;
    $scope.costcenters=params.costcenters;
    $scope.contacts=params.contacts;
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainer.controller.js on lines 214..227
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainerpowerconversionsystem.controller.js on lines 699..712
myems-admin/app/controllers/settings/microgrid/microgridpowerconversionsystem.controller.js on lines 247..260
myems-admin/app/controllers/settings/space/space.controller.js on lines 400..414
myems-admin/app/controllers/settings/store/store.controller.js on lines 312..325
myems-admin/app/controllers/settings/virtualpowerplant/virtualpowerplant.controller.js on lines 306..320
myems-admin/app/controllers/settings/windfarm/windfarm.controller.js on lines 305..318

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

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

  app.controller('ModalEditEnergyStorageContainerPowerconversionsystemCtrl', function($scope, $uibModalInstance, params) {
      $scope.operation = "ENERGY_STORAGE_CONTAINER.EDIT_ENERGY_STORAGE_CONTAINER_POWER_CONVERSION_SYSTEM";
      $scope.energystoragecontainerpowerconversionsystem = params.energystoragecontainerpowerconversionsystem;
    $scope.points=params.points;
    $scope.meters=params.meters;
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainer.controller.js on lines 214..227
myems-admin/app/controllers/settings/microgrid/microgridpowerconversionsystem.controller.js on lines 247..260
myems-admin/app/controllers/settings/photovoltaicpowerstation/photovoltaicpowerstation.controller.js on lines 305..318
myems-admin/app/controllers/settings/space/space.controller.js on lines 400..414
myems-admin/app/controllers/settings/store/store.controller.js on lines 312..325
myems-admin/app/controllers/settings/virtualpowerplant/virtualpowerplant.controller.js on lines 306..320
myems-admin/app/controllers/settings/windfarm/windfarm.controller.js on lines 305..318

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

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

app.controller('ModalEditVirtualPowerPlantCtrl', function($scope, $uibModalInstance, params) {
    $scope.operation = "SETTING.EDIT_VIRTUAL_POWER_PLANT";
    $scope.virtualpowerplant = params.virtualpowerplant;
    $scope.costcenters=params.costcenters;
    $scope.points=params.points;
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainer.controller.js on lines 214..227
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainerpowerconversionsystem.controller.js on lines 699..712
myems-admin/app/controllers/settings/microgrid/microgridpowerconversionsystem.controller.js on lines 247..260
myems-admin/app/controllers/settings/photovoltaicpowerstation/photovoltaicpowerstation.controller.js on lines 305..318
myems-admin/app/controllers/settings/space/space.controller.js on lines 400..414
myems-admin/app/controllers/settings/store/store.controller.js on lines 312..325
myems-admin/app/controllers/settings/windfarm/windfarm.controller.js on lines 305..318

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

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

app.controller('ModalEditEnergyStorageContainerCtrl', function($scope, $uibModalInstance, params) {
    $scope.operation = "SETTING.EDIT_ENERGY_STORAGE_CONTAINER";
    $scope.energystoragecontainer = params.energystoragecontainer;
    $scope.costcenters=params.costcenters;
    $scope.contacts=params.contacts;
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainerpowerconversionsystem.controller.js on lines 699..712
myems-admin/app/controllers/settings/microgrid/microgridpowerconversionsystem.controller.js on lines 247..260
myems-admin/app/controllers/settings/photovoltaicpowerstation/photovoltaicpowerstation.controller.js on lines 305..318
myems-admin/app/controllers/settings/space/space.controller.js on lines 400..414
myems-admin/app/controllers/settings/store/store.controller.js on lines 312..325
myems-admin/app/controllers/settings/virtualpowerplant/virtualpowerplant.controller.js on lines 306..320
myems-admin/app/controllers/settings/windfarm/windfarm.controller.js on lines 305..318

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

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

  app.controller('ModalEditMicrogridPowerconversionsystemCtrl', function($scope, $uibModalInstance, params) {
      $scope.operation = "MICROGRID.EDIT_MICROGRID_POWER_CONVERSION_SYSTEM";
      $scope.microgridpowerconversionsystem = params.microgridpowerconversionsystem;
    $scope.points=params.points;
    $scope.meters=params.meters;
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainer.controller.js on lines 214..227
myems-admin/app/controllers/settings/energystoragecontainer/energystoragecontainerpowerconversionsystem.controller.js on lines 699..712
myems-admin/app/controllers/settings/photovoltaicpowerstation/photovoltaicpowerstation.controller.js on lines 305..318
myems-admin/app/controllers/settings/space/space.controller.js on lines 400..414
myems-admin/app/controllers/settings/store/store.controller.js on lines 312..325
myems-admin/app/controllers/settings/virtualpowerplant/virtualpowerplant.controller.js on lines 306..320
myems-admin/app/controllers/settings/windfarm/windfarm.controller.js on lines 305..318

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

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

export default [
  {
    title: `2.10.2 - African hobby`,
    publish: '13 May, 2021',
    logs: {
Severity: Minor
Found in myems-web/src/components/changelog/changeLogs.js - About 5 hrs to fix

    Consider simplifying this complex logical expression.
    Open

                  if (Ha && !va)
                    switch (b) {
                      case "start":
                        Wa(0);
                        a.updateCurrentList();
    Severity: Critical
    Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 5 hrs to fix

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

                          if parameters['parameter_type'] == 'point':
                              if point_id is None:
                                  raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                                         description='API.INVALID_POINT_ID')
                              query = (" SELECT id, name "
      Severity: Major
      Found in myems-api/core/equipment.py and 2 other locations - About 5 hrs to fix
      myems-api/core/equipment.py on lines 840..851
      myems-api/core/equipment.py on lines 2601..2612

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

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

                      if parameters['parameter_type'] == 'point':
                          if point_id is None:
                              raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                                     description='API.INVALID_POINT_ID')
                          query = (" SELECT id, name "
      Severity: Major
      Found in myems-api/core/equipment.py and 2 other locations - About 5 hrs to fix
      myems-api/core/equipment.py on lines 840..851
      myems-api/core/equipment.py on lines 3100..3111

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

      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 rows is not None and len(rows) > 0:
                      for row in rows:
                          data_source = data_source_dict.get(row[2], None)
                          result = {"id": row[0], "name": row[1], "data_source": data_source}
                          point_result.append(result)
      Severity: Major
      Found in myems-api/core/tenant.py and 1 other location - About 5 hrs to fix
      myems-api/core/tenant.py on lines 2816..2821

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

      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 rows is not None and len(rows) > 0:
                      for row in rows:
                          data_source = data_source_dict.get(row[2], None)
                          result = {"id": row[0], "name": row[1], "data_source": data_source}
                          point_result.append(result)
      Severity: Major
      Found in myems-api/core/tenant.py and 1 other location - About 5 hrs to fix
      myems-api/core/tenant.py on lines 2188..2193

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

      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 s has 141 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function s() {
              function t(t, a, o) {
                  var i = e("<td>");
                  return t.formatter ? i.html(t.formatter(a, i, o)) : i.html(a || ""), i
              }
      Severity: Major
      Found in myems-admin/js/plugins/footable/footable.all.min.js - About 5 hrs to fix

        Function CodeHighlightDoc has 140 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const CodeHighlightDoc = () => {
          return (
            <Fragment>
              <PageHeader
                title="CodeHighlight"
        Severity: Major
        Found in myems-web/src/components/plugins/CodeHighlightDoc.js - About 5 hrs to fix

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

                            -20 > d
                              ? ((h.y -= 10),
                                h.y > pa.y ? (b.y += 10) : ((b.y = l - d), (g = !0)))
                              : 20 < d
                              ? ((h.y += 10),
          Severity: Major
          Found in myems-admin/js/jcui/angular.integralui.treeview.min.js and 1 other location - About 5 hrs to fix
          myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 5749..5755

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

          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

                    <Row noGutters className="bg-200 text-900 px-1 fs--1 font-weight-semi-bold">
                      <Col xs={9} md={8} className="p-2 px-md-3">
                        Name
                      </Col>
                      <Col xs={3} md={4} className="px-3">
          myems-web/src/components/e-commerce/FavouriteItems.js on lines 113..127

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

          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