SpeciesFileGroup/taxonworks

View on GitHub

Showing 12,579 of 12,579 total issues

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

const ActionFunctions = {
  [ActionNames.LoadAssertedDistributions]: loadAssertedDistributions,
  [ActionNames.LoadBiologicalAssociations]: loadBiologicalAssociations,
  [ActionNames.LoadCollectingEvents]: loadCollectingEvents,
  [ActionNames.LoadCollectionObjects]: loadCollectionObjects,
app/javascript/vue/tasks/collecting_events/new_collecting_event/store/mutations/mutations.js on lines 33..48
app/javascript/vue/tasks/extracts/new_extract/store/actions/actions.js on lines 18..33
app/javascript/vue/tasks/extracts/new_extract/store/getters/getters.js on lines 33..48
app/javascript/vue/tasks/observation_matrices/image/store/mutations/mutations.js on lines 33..48
app/javascript/vue/tasks/sources/new_source/store/getters/getters.js on lines 33..48
app/javascript/vue/tasks/sources/new_source/store/mutations/mutations.js on lines 33..48

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

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

    } else {
      $(panel).css('left', '')
      if ($(panel).css('right') == '0px') {
        $(panel).attr('data-panel-open', 'false')
        $(panel).css('z-index', '1000')
Severity: Major
Found in app/assets/javascripts/views/shared/slideout.js and 1 other location - About 4 hrs to fix
app/assets/javascripts/views/shared/slideout.js on lines 102..111

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

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

const ActionFunctions = {
  [ActionNames.LoadExtract]: loadExtract,
  [ActionNames.LoadIdentifiers]: loadIdentifiers,
  [ActionNames.RemoveExtract]: removeExtract,
  [ActionNames.LoadRecents]: loadRecents,
app/javascript/vue/tasks/collecting_events/new_collecting_event/store/mutations/mutations.js on lines 33..48
app/javascript/vue/tasks/extracts/new_extract/store/getters/getters.js on lines 33..48
app/javascript/vue/tasks/observation_matrices/image/store/mutations/mutations.js on lines 33..48
app/javascript/vue/tasks/otu/browse/store/actions/actions.js on lines 17..32
app/javascript/vue/tasks/sources/new_source/store/getters/getters.js on lines 33..48
app/javascript/vue/tasks/sources/new_source/store/mutations/mutations.js on lines 33..48

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

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

const GetterFunctions = {
  [GetterNames.GetRecent]: getRecent,
  [GetterNames.GetExtract]: getExtract,
  [GetterNames.GetIdentifiers]: getIdentifiers,
  [GetterNames.GetSettings]: getSettings,
app/javascript/vue/tasks/collecting_events/new_collecting_event/store/mutations/mutations.js on lines 33..48
app/javascript/vue/tasks/extracts/new_extract/store/actions/actions.js on lines 18..33
app/javascript/vue/tasks/observation_matrices/image/store/mutations/mutations.js on lines 33..48
app/javascript/vue/tasks/otu/browse/store/actions/actions.js on lines 17..32
app/javascript/vue/tasks/sources/new_source/store/getters/getters.js on lines 33..48
app/javascript/vue/tasks/sources/new_source/store/mutations/mutations.js on lines 33..48

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

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

const MutationFunctions = {
  [MutationNames.AddGeoreference]: addGeoreference,
  [MutationNames.AddGeoreferenceToQueue]: addGeoreferenceToQueue,
  [MutationNames.SetCELabel]: setCELabel,
  [MutationNames.SetCollectingEvent]: setCollectingEvent,
app/javascript/vue/tasks/extracts/new_extract/store/actions/actions.js on lines 18..33
app/javascript/vue/tasks/extracts/new_extract/store/getters/getters.js on lines 33..48
app/javascript/vue/tasks/observation_matrices/image/store/mutations/mutations.js on lines 33..48
app/javascript/vue/tasks/otu/browse/store/actions/actions.js on lines 17..32
app/javascript/vue/tasks/sources/new_source/store/getters/getters.js on lines 33..48
app/javascript/vue/tasks/sources/new_source/store/mutations/mutations.js on lines 33..48

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

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

const GetterFunctions = {
  [GetterNames.GetBibtexType]: getBibtexType,
  [GetterNames.GetDocumentations]: getDocumentations,
  [GetterNames.GetDocuments]: getDocuments,
  [GetterNames.GetLanguageId]: getLanguageId,
app/javascript/vue/tasks/collecting_events/new_collecting_event/store/mutations/mutations.js on lines 33..48
app/javascript/vue/tasks/extracts/new_extract/store/actions/actions.js on lines 18..33
app/javascript/vue/tasks/extracts/new_extract/store/getters/getters.js on lines 33..48
app/javascript/vue/tasks/observation_matrices/image/store/mutations/mutations.js on lines 33..48
app/javascript/vue/tasks/otu/browse/store/actions/actions.js on lines 17..32
app/javascript/vue/tasks/sources/new_source/store/mutations/mutations.js on lines 33..48

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

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 ($(panel).hasClass('slide-left')) {
      $(panel).css('right', '')
      if ($(panel).css('left') == '0px') {
        $(panel).attr('data-panel-open', 'false')
        $(panel).css('z-index', '1000')
Severity: Major
Found in app/assets/javascripts/views/shared/slideout.js and 1 other location - About 4 hrs to fix
app/assets/javascripts/views/shared/slideout.js on lines 111..120

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

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

Method has too many lines. [53/25]
Open

  def perform_staging
    records, headers = get_records(source.path)

    update!(metadata:
      metadata.merge({

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

File dwc_extensions.rb has 371 lines of code (exceeds 250 allowed). Consider refactoring.
Open

module FieldOccurrence::DwcExtensions

  extend ActiveSupport::Concern

  # include FieldOccurrence::DwcExtensions::TaxonworksExtensions
Severity: Minor
Found in app/models/field_occurrence/dwc_extensions.rb - About 4 hrs to fix

    Method has too many lines. [52/25]
    Open

      def get_diffs version_new, version_old
        added_strings = []
        added_strings_indices = []
        deleted_strings = []
        deleted_strings_indices = []

    This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

    Function makeInitialState has 120 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function makeInitialState() {
      return {
        loadState: {
          assertedDistribution: false,
          biologicalAssociations: true,
    Severity: Major
    Found in app/javascript/vue/tasks/otu/browse/store/store.js - About 4 hrs to fix

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

      export default function (state, args) {
        const {
          descriptorId,
          observationId,
          time
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousUnit.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousValue.js on lines 4..16
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setDayFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setMonthFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMaxFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMedian.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMinFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleNFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardDeviation.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardError.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardMean.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleUnitFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setYearFor.js on lines 4..13

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

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

      export default function (state, args) {
        const {
          descriptorId,
          observationId,
          units
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousUnit.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousValue.js on lines 4..16
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setDayFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setMonthFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMaxFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMedian.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMinFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleNFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardDeviation.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardError.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardMean.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setTimeFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setYearFor.js on lines 4..13

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

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

      export default function (state, args) {
        const {
          descriptorId,
          observationId,
          day
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousUnit.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousValue.js on lines 4..16
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setMonthFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMaxFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMedian.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMinFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleNFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardDeviation.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardError.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardMean.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleUnitFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setTimeFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setYearFor.js on lines 4..13

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

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

      export default function (state, args) {
        const {
          descriptorId,
          continuousValue,
          observationId
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousUnit.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setDayFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setMonthFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMaxFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMedian.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMinFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleNFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardDeviation.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardError.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardMean.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleUnitFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setTimeFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setYearFor.js on lines 4..13

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

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

      export default function (state, args) {
        const {
          descriptorId,
          observationId,
          month
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousUnit.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousValue.js on lines 4..16
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setDayFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMaxFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMedian.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMinFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleNFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardDeviation.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardError.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardMean.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleUnitFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setTimeFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setYearFor.js on lines 4..13

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

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

      export default function (state, args) {
        const {
          descriptorId,
          observationId,
          standardError
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousUnit.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousValue.js on lines 4..16
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setDayFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setMonthFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMaxFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMedian.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMinFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleNFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardDeviation.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardMean.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleUnitFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setTimeFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setYearFor.js on lines 4..13

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

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

      export default function (state, args) {
        const {
          descriptorId,
          continuousUnit,
          observationId
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousValue.js on lines 4..16
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setDayFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setMonthFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMaxFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMedian.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMinFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleNFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardDeviation.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardError.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardMean.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleUnitFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setTimeFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setYearFor.js on lines 4..13

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

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

      export default function (state, args) {
        const {
          descriptorId,
          observationId,
          min
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousUnit.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousValue.js on lines 4..16
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setDayFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setMonthFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMaxFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMedian.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleNFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardDeviation.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardError.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardMean.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleUnitFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setTimeFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setYearFor.js on lines 4..13

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

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

      export default function (state, args) {
        const {
          descriptorId,
          observationId,
          median
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousUnit.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setContinuousValue.js on lines 4..16
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setDayFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setMonthFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMaxFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleMinFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleNFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardDeviation.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardError.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleStandardMean.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setSampleUnitFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setTimeFor.js on lines 4..13
      app/javascript/vue/tasks/observation_matrices/matrix_row_coder/store/mutations/setYearFor.js on lines 4..13

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

      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