jiskattema/spot

View on GitHub

Showing 2,641 of 2,641 total issues

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

    durationUnits: {
      hook: 'duration-units',
      prepareView: function (el) {
        return new DurationUnitsSelect({
          el: el,
Severity: Major
Found in src/pages/configure-facet/facet-transform-duration.js and 5 other locations - About 40 mins to fix
src/pages/configure-facet/facet-transform-datetime.js on lines 49..58
src/pages/configure-facet/facet-transform-datetime.js on lines 59..68
src/pages/configure-facet/facet-transform-duration.js on lines 30..39
src/pages/configure-facet/facet-transform-duration.js on lines 40..49
src/pages/configure-partition/partition-datetime.js on lines 75..84

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    timeZones: {
      hook: 'time-zones',
      prepareView: function (el) {
        return new TimeZonesSelect({
          el: el,
Severity: Major
Found in src/pages/configure-partition/partition-datetime.js and 5 other locations - About 40 mins to fix
src/pages/configure-facet/facet-transform-datetime.js on lines 49..58
src/pages/configure-facet/facet-transform-datetime.js on lines 59..68
src/pages/configure-facet/facet-transform-duration.js on lines 20..29
src/pages/configure-facet/facet-transform-duration.js on lines 30..39
src/pages/configure-facet/facet-transform-duration.js on lines 40..49

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    transformedDurationUnits: {
      hook: 'transformed-duration-units',
      prepareView: function (el) {
        return new DurationUnitsSelect({
          el: el,
Severity: Major
Found in src/pages/configure-facet/facet-transform-duration.js and 5 other locations - About 40 mins to fix
src/pages/configure-facet/facet-transform-datetime.js on lines 49..58
src/pages/configure-facet/facet-transform-datetime.js on lines 59..68
src/pages/configure-facet/facet-transform-duration.js on lines 20..29
src/pages/configure-facet/facet-transform-duration.js on lines 40..49
src/pages/configure-partition/partition-datetime.js on lines 75..84

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    timeZones: {
      hook: 'transformed-duration-zone',
      prepareView: function (el) {
        return new TimeZonesSelect({
          el: el,
Severity: Major
Found in src/pages/configure-facet/facet-transform-duration.js and 5 other locations - About 40 mins to fix
src/pages/configure-facet/facet-transform-datetime.js on lines 49..58
src/pages/configure-facet/facet-transform-datetime.js on lines 59..68
src/pages/configure-facet/facet-transform-duration.js on lines 20..29
src/pages/configure-facet/facet-transform-duration.js on lines 30..39
src/pages/configure-partition/partition-datetime.js on lines 75..84

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

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

Consider simplifying this complex logical expression.
Open

  if (
    (partitionA.isDatetime || partitionA.isDuration || partitionA.isContinuous) &&
    (partitionB.isDatetime || partitionB.isDuration || partitionB.isContinuous)) {
    if (partitionA.selected && partitionA.selected.length > 0) {
      chartData.datasets[1] = chartData.datasets[1] || {
Severity: Major
Found in src/widgets/views/chartjs2d.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

              if ((e.x !== null && e.x !== undefined && !isNaN(e.x)) || (e.y !== null && e.y !== undefined && !isNaN(e.y))) {
                errorBar.transition(easingDecimal).draw();
              }
    Severity: Major
    Found in src/widgets/chartjs-errorbars.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

          if (
            (!app.currentPage.helpTemplate || app.currentPage.helpTemplate === '') &&
            (!app.currentPage.helpHints || app.currentPage.helpHints() === []) &&
            (!app.currentPage.helpSteps || app.currentPage.helpTemplate === [])
          ) {
      Severity: Major
      Found in src/app.js - About 40 mins to fix

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

            transformCategorial: {
              hook: 'facet-transform-categorial',
              prepareView: function (el) {
                return new FacetTransformCategorialView({
                  el: el,
        Severity: Major
        Found in src/pages/configure-facet.js and 3 other locations - About 40 mins to fix
        src/pages/configure-facet.js on lines 44..52
        src/pages/configure-facet.js on lines 62..70
        src/pages/configure-facet.js on lines 71..79

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

        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

            transformContinuous: {
              hook: 'facet-transform-continuous',
              prepareView: function (el) {
                return new FacetTransformContinuousView({
                  el: el,
        Severity: Major
        Found in src/pages/configure-facet.js and 3 other locations - About 40 mins to fix
        src/pages/configure-facet.js on lines 53..61
        src/pages/configure-facet.js on lines 62..70
        src/pages/configure-facet.js on lines 71..79

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

        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

            transformDuration: {
              hook: 'facet-transform-duration',
              prepareView: function (el) {
                return new FacetTransformDurationView({
                  el: el,
        Severity: Major
        Found in src/pages/configure-facet.js and 3 other locations - About 40 mins to fix
        src/pages/configure-facet.js on lines 44..52
        src/pages/configure-facet.js on lines 53..61
        src/pages/configure-facet.js on lines 62..70

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

        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

            transformDatetime: {
              hook: 'facet-transform-datetime',
              prepareView: function (el) {
                return new FacetTransformDatetimeView({
                  el: el,
        Severity: Major
        Found in src/pages/configure-facet.js and 3 other locations - About 40 mins to fix
        src/pages/configure-facet.js on lines 44..52
        src/pages/configure-facet.js on lines 53..61
        src/pages/configure-facet.js on lines 71..79

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

        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

              me.scaleSizeInUnits = moment.duration(me.lastTick).subtract(me.firstTick).as(me.tickUnit);
        Severity: Minor
        Found in src/widgets/chartjs-duration-scale.js and 1 other location - About 35 mins to fix
        src/widgets/chartjs-duration-scale.js on lines 238..238

        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

              me.scaleSizeInUnits = moment.duration(me.lastTick).subtract(me.firstTick).as(me.tickUnit);
        Severity: Minor
        Found in src/widgets/chartjs-duration-scale.js and 1 other location - About 35 mins to fix
        src/widgets/chartjs-duration-scale.js on lines 287..287

        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 (partitionB.isDatetime || partitionB.isDuration || partitionB.isContinuous) {
                chartData.datasets[0].data[d].y = partitionB.groups.models[j].value;
              } else {
                chartData.datasets[0].data[d].y = j;
              }
        Severity: Minor
        Found in src/widgets/views/chartjs2d.js and 1 other location - About 35 mins to fix
        src/widgets/views/chartjs2d.js on lines 246..250

        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 (partitionA.isDatetime || partitionA.isDuration || partitionA.isContinuous) {
                chartData.datasets[0].data[d].x = partitionA.groups.models[i].value;
              } else {
                chartData.datasets[0].data[d].x = i;
              }
        Severity: Minor
        Found in src/widgets/views/chartjs2d.js and 1 other location - About 35 mins to fix
        src/widgets/views/chartjs2d.js on lines 252..256

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

          closeCloudDownloadInfo: function () {
            var dialog = this.queryByHook('session-download-cloud');
            dialogPolyfill.registerDialog(dialog);
            dialog.close();
          },
        Severity: Major
        Found in src/pages/datasets.js and 5 other locations - About 35 mins to fix
        src/pages/datasets.js on lines 215..219
        src/pages/datasets.js on lines 220..224
        src/pages/datasets.js on lines 225..229
        src/pages/datasets.js on lines 230..234
        src/pages/datasets.js on lines 236..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 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 6 locations. Consider refactoring.
        Open

          showCloudDownloadInfo: function () {
            var dialog = this.queryByHook('session-download-cloud');
            dialogPolyfill.registerDialog(dialog);
            dialog.showModal();
          },
        Severity: Major
        Found in src/pages/datasets.js and 5 other locations - About 35 mins to fix
        src/pages/datasets.js on lines 215..219
        src/pages/datasets.js on lines 220..224
        src/pages/datasets.js on lines 225..229
        src/pages/datasets.js on lines 230..234
        src/pages/datasets.js on lines 241..245

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

          closeCSVSettings: function () {
            var dialog = this.queryByHook('CSV-settings');
            dialogPolyfill.registerDialog(dialog);
            dialog.close();
          },
        Severity: Major
        Found in src/pages/datasets.js and 5 other locations - About 35 mins to fix
        src/pages/datasets.js on lines 215..219
        src/pages/datasets.js on lines 225..229
        src/pages/datasets.js on lines 230..234
        src/pages/datasets.js on lines 236..240
        src/pages/datasets.js on lines 241..245

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

          showCSVSettings: function () {
            var dialog = this.queryByHook('CSV-settings');
            dialogPolyfill.registerDialog(dialog);
            dialog.showModal();
          },
        Severity: Major
        Found in src/pages/datasets.js and 5 other locations - About 35 mins to fix
        src/pages/datasets.js on lines 220..224
        src/pages/datasets.js on lines 225..229
        src/pages/datasets.js on lines 230..234
        src/pages/datasets.js on lines 236..240
        src/pages/datasets.js on lines 241..245

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

          closeCloudUploadInfo: function () {
            var dialog = this.queryByHook('session-upload-cloud');
            dialogPolyfill.registerDialog(dialog);
            dialog.close();
          },
        Severity: Major
        Found in src/pages/datasets.js and 5 other locations - About 35 mins to fix
        src/pages/datasets.js on lines 215..219
        src/pages/datasets.js on lines 220..224
        src/pages/datasets.js on lines 225..229
        src/pages/datasets.js on lines 236..240
        src/pages/datasets.js on lines 241..245

        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

        Severity
        Category
        Status
        Source
        Language