sentilo/sentilo

View on GitHub

Showing 593 of 1,220 total issues

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

  @Override
  public void registerAlerts(final CatalogAlertInputMessage message) {
    LOGGER.debug("Registering alerts");
    final RequestContext rc = RequestUtils.buildContext(message, converter.marshal(message));
    getRestClient().post(rc);
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 79..85
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 94..100
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 109..116
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 125..131
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 176..183
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 192..198

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

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

  @Override
  public void deleteProvider(final CatalogDeleteInputMessage message) {
    LOGGER.debug("Deleting provider components/sensors");
    final RequestContext rc = RequestUtils.buildContext(message, converter.marshal(message));
    getRestClient().delete(rc);
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 79..85
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 94..100
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 109..116
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 161..167
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 176..183
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 192..198

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

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

  @Override
  public void registerSensors(final CatalogInputMessage message) {
    LOGGER.debug("Registering sensors");
    final RequestContext rc = RequestUtils.buildContext(message, converter.marshal(message));
    getRestClient().post(rc);
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 94..100
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 109..116
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 125..131
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 161..167
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 176..183
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 192..198

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

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

  @Override
  public void updateAlerts(final CatalogAlertInputMessage message) {
    LOGGER.debug("Updating alerts");
    final RequestContext rc = RequestUtils.buildContext(message, converter.marshal(message));
    getRestClient().put(rc);
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 79..85
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 94..100
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 109..116
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 125..131
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 161..167
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 192..198

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

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

  @Override
  public void updateComponents(final CatalogInputMessage message) {
    LOGGER.debug("Updating components");
    final RequestContext rc = RequestUtils.buildContext(message, converter.marshal(message));
    getRestClient().put(rc);
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 79..85
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 94..100
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 125..131
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 161..167
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 176..183
sentilo-platform-client-java/src/main/java/org/sentilo/platform/client/core/service/impl/DefaultCatalogServiceOperationsImpl.java on lines 192..198

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

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

  public BatchProcessWorker(final BatchProcessContext batchUpdateContext) {
    initialEventsToProcess = batchUpdateContext.getEventsToProcess();
    restClient = batchUpdateContext.getRestClient();
    numMaxRetries = batchUpdateContext.getNumMaxRetries();
    callback = batchUpdateContext.getCallback();
sentilo-agent-kafka/src/main/java/org/sentilo/agent/kafka/repository/ProcessWorker.java on lines 56..61

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

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

/*
 * Sentilo
 *
 * Original version 1.4 Copyright (C) 2013 Institut Municipal d’Informàtica, Ajuntament de
 * Barcelona. Modified by Opentrends adding support for multitenant deployments and SaaS.
sentilo-common/src/main/java/org/sentilo/common/exception/MessageNotReadableException.java on lines 1..46

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

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

/*
 * Sentilo
 *
 * Original version 1.4 Copyright (C) 2013 Institut Municipal d’Informàtica, Ajuntament de
 * Barcelona. Modified by Opentrends adding support for multitenant deployments and SaaS.
sentilo-common/src/main/java/org/sentilo/common/exception/MessageNotWritableException.java on lines 1..46

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

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

            for ( ; i < length; i++ ) {
                value = callback( elems[ i ], i, arg );

                if ( value != null ) {
                    ret[ ret.length ] = value;
Severity: Minor
Found in sentilo-catalog-web/src/main/webapp/static/js/jquery-1.9.0.js and 1 other location - About 35 mins to fix
sentilo-catalog-web/src/main/webapp/static/js/jquery-1.9.0.js on lines 765..771

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

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 ( tbody.length === 0 )
            {
                tbody = [ document.createElement( 'tbody' ) ];
                this.appendChild( tbody[0] );
            }
sentilo-catalog-web/src/main/webapp/static/js/jquery.dataTables.js on lines 6736..6740

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

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

                s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min));
Severity: Minor
Found in sentilo-catalog-web/src/main/webapp/static/js/jquery.flot.js and 1 other location - About 35 mins to fix
sentilo-catalog-web/src/main/webapp/static/js/jquery.flot.js on lines 937..937

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

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

  var tr = new google.maps.LatLng(bounds.getNorthEast().lat(),
      bounds.getNorthEast().lng());
sentilo-catalog-web/src/main/webapp/static/js/markerclusterer.js on lines 1345..1346

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

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

  @Before("((updateAll(resources) || insertAll(resources)) && @annotation(auditable))")
  public void doCollectionAdvice(final JoinPoint jp, final Collection<CatalogDocument> resources, final Auditable auditable) {

    switch (auditable.actionType()) {
      case CREATE:
sentilo-catalog-web/src/main/java/org/sentilo/web/catalog/aop/aspect/AuditableAspect.java on lines 76..89

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

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

            } else if (dataType === 'IMAGE_LINK') {
                addAccordionGroup(accordion, accordionId, dataType, header, e, imageWrapperIdPrefix);
                tempSensorLastObsMap.image.push({
                    value: value,
                    formattedValue: formattedValue,
sentilo-catalog-web/src/main/webapp/static/js/sentilo/universal_map.js on lines 743..778
sentilo-catalog-web/src/main/webapp/static/js/sentilo/universal_map.js on lines 750..778
sentilo-catalog-web/src/main/webapp/static/js/sentilo/universal_map.js on lines 764..778
sentilo-catalog-web/src/main/webapp/static/js/sentilo/universal_map.js on lines 771..778

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

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 ( thead.length === 0 )
            {
                thead = [ document.createElement( 'thead' ) ];
                this.appendChild( thead[0] );
            }
sentilo-catalog-web/src/main/webapp/static/js/jquery.dataTables.js on lines 6744..6748

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

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

            } else if (dataType === 'VIDEO_LINK') {
                addAccordionGroup(accordion, accordionId, dataType, header, e, videoWrapperIdPrefix);
                tempSensorLastObsMap.video.push({
                    value: value,
                    formattedValue: formattedValue,
sentilo-catalog-web/src/main/webapp/static/js/sentilo/universal_map.js on lines 743..778
sentilo-catalog-web/src/main/webapp/static/js/sentilo/universal_map.js on lines 757..778
sentilo-catalog-web/src/main/webapp/static/js/sentilo/universal_map.js on lines 764..778
sentilo-catalog-web/src/main/webapp/static/js/sentilo/universal_map.js on lines 771..778

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

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

            } else if (dataType === 'JSON') {
                addAccordionGroup(accordion, accordionId, dataType, header, e, jsonWrapperIdPrefix);
                tempSensorLastObsMap.json.push({
                    value: value,
                    formattedValue: formattedValue,
sentilo-catalog-web/src/main/webapp/static/js/sentilo/universal_map.js on lines 743..778
sentilo-catalog-web/src/main/webapp/static/js/sentilo/universal_map.js on lines 750..778
sentilo-catalog-web/src/main/webapp/static/js/sentilo/universal_map.js on lines 757..778
sentilo-catalog-web/src/main/webapp/static/js/sentilo/universal_map.js on lines 764..778

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

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

            for ( i in elems ) {
                value = callback( elems[ i ], i, arg );

                if ( value != null ) {
                    ret[ ret.length ] = value;
Severity: Minor
Found in sentilo-catalog-web/src/main/webapp/static/js/jquery-1.9.0.js and 1 other location - About 35 mins to fix
sentilo-catalog-web/src/main/webapp/static/js/jquery-1.9.0.js on lines 755..761

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

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 ( displayValue !== alternateDisplayValue ) {
                        result += processJsonPrimitive( 'string', displayValue, alternateDisplayValue );
                        isToggleable = true;
                    } else {
                        result += processJsonPrimitive( 'string', displayValue );
sentilo-catalog-web/src/main/webapp/static/js/jquery.jsonPresenter.js on lines 161..166

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

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

                aaSort = ( oSettings.aaSortingFixed !== null ) ?
                    oSettings.aaSortingFixed.concat( oSettings.aaSorting ) :
                    oSettings.aaSorting.slice();
sentilo-catalog-web/src/main/webapp/static/js/jquery.dataTables.js on lines 3949..3951

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

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