VIAplanner/via-timetable

View on GitHub
src/store/index.js

Summary

Maintainability
F
2 wks
Test Coverage

File index.js has 813 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import Vue from 'vue';
import Vuex from 'vuex';
import genColor from 'color-generator';
import { generateTimetables } from '../timetable-planner/index2';
// import colorDiff from "color-difference"
Severity: Major
Found in src/store/index.js - About 1 day to fix

    Function deleteCourse has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
    Open

        deleteCourse(context, payload) {
          // resets search bar value if the deleted course is the last searched course
          if (
            context.state.searchBarValue !== null &&
            context.state.searchBarValue.includes(payload.code)
    Severity: Minor
    Found in src/store/index.js - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    `` has 31 functions (exceeds 20 allowed). Consider refactoring.
    Open

      getters: {
        getSerializedState: state => state.history[state.history.length - 1 + state.historyIndex],
        getExportOverlay: state => state.exportOverlay,
        getNoTimetablePopup: state => state.noTimetablePopup,
        getShareLinkPopup: state => state.shareLinkPopup,
    Severity: Minor
    Found in src/store/index.js - About 3 hrs to fix

      `` has 27 functions (exceeds 20 allowed). Consider refactoring.
      Open

        mutations: {
          setDarkMode(state, payload) {
            state.darkMode = payload;
            regenerateColors(state);
            saveState(state);
      Severity: Minor
      Found in src/store/index.js - About 3 hrs to fix

        Function deleteCourse has 65 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            deleteCourse(context, payload) {
              // resets search bar value if the deleted course is the last searched course
              if (
                context.state.searchBarValue !== null &&
                context.state.searchBarValue.includes(payload.code)
        Severity: Major
        Found in src/store/index.js - About 2 hrs to fix

          Function clearStorage has 65 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              clearStorage(context) {
                context.state.fallLockedHourStatus = {
                  '8 AM': false,
                  '9 AM': false,
                  '10 AM': false,
          Severity: Major
          Found in src/store/index.js - About 2 hrs to fix

            Function lockSection has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

                lockSection(state, payload) {
                  let index;
                  if (payload.slice(0, 4) === 'Lock') {
                    if (payload[4] === 'F') {
                      index = state.fallLockedSections.indexOf(payload);
            Severity: Minor
            Found in src/store/index.js - About 2 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function unlockSection has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

                unlockSection(state, payload) {
                  let index;
                  if (payload.slice(0, 4) === 'Lock') {
                    // Block hour
                    if (payload[4] === 'F') {
            Severity: Minor
            Found in src/store/index.js - About 2 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function switchSection has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                switchSection(context, payload) {
                  // Remove old section from locked sections
                  context.commit(
                    'unlockSection',
                    `${payload.old.courseCode}${payload.old.sectionCode}`,
            Severity: Minor
            Found in src/store/index.js - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function addCourse has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

                addCourse(state, payload) {
                  if(state.globalAllowConflicts){
                    state.allowedConflictCourses.push({code:payload.course.courseCode});
                  }
                  if (payload.course.courseCode.slice(0, 4) === 'Lock') {
            Severity: Minor
            Found in src/store/index.js - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function addCourse has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                addCourse(state, payload) {
                  if(state.globalAllowConflicts){
                    state.allowedConflictCourses.push({code:payload.course.courseCode});
                  }
                  if (payload.course.courseCode.slice(0, 4) === 'Lock') {
            Severity: Minor
            Found in src/store/index.js - About 1 hr to fix

              Function switchSection has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  switchSection(context, payload) {
                    // Remove old section from locked sections
                    context.commit(
                      'unlockSection',
                      `${payload.old.courseCode}${payload.old.sectionCode}`,
              Severity: Minor
              Found in src/store/index.js - About 1 hr to fix

                Function lockSection has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    lockSection(state, payload) {
                      let index;
                      if (payload.slice(0, 4) === 'Lock') {
                        if (payload[4] === 'F') {
                          index = state.fallLockedSections.indexOf(payload);
                Severity: Minor
                Found in src/store/index.js - About 1 hr to fix

                  Function unlockSection has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      unlockSection(state, payload) {
                        let index;
                        if (payload.slice(0, 4) === 'Lock') {
                          // Block hour
                          if (payload[4] === 'F') {
                  Severity: Minor
                  Found in src/store/index.js - About 1 hr to fix

                    Function selectCourse has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        selectCourse(context, payload) {
                          // save the previous timetable by default
                          if (!payload.noSave) {
                            context.dispatch('saveTimetable');
                          }
                    Severity: Minor
                    Found in src/store/index.js - About 1 hr to fix

                      Avoid deeply nested control flow statements.
                      Open

                              if (index === -1) {
                                state.fallLockedSections.push(payload);
                                state.winterLockedSections.push(payload);
                              }
                      Severity: Major
                      Found in src/store/index.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                      if (dayEvents[i].code === payload.code) {
                                        dayEvents.splice(i, 1);
                                        break;
                                      }
                        Severity: Major
                        Found in src/store/index.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                        if (dayEvents[i].code === payload.code) {
                                          dayEvents.splice(i, 1);
                                          break;
                                        }
                          Severity: Major
                          Found in src/store/index.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                    if (index !== -1) {
                                      state.fallLockedSections.splice(index, 1);
                                      index = state.winterLockedSections.indexOf(payload);
                                      state.winterLockedSections.splice(index, 1);
                                    }
                            Severity: Major
                            Found in src/store/index.js - About 45 mins to fix

                              Function removeCourse has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  removeCourse(state, payload) {
                                    if (payload.code.slice(0, 4) === 'Lock') {
                                      if (payload.code[4] === 'F') {
                                        Vue.delete(state.fallSelectedCourses, payload.code);
                                      } else {
                              Severity: Minor
                              Found in src/store/index.js - About 35 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function selectedCourses has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  selectedCourses: state => whichSemester => {
                                    if (whichSemester === 'F') {
                                      return state.fallSelectedCourses;
                                    } else if (whichSemester === 'S') {
                                      return state.winterSelectedCourses;
                              Severity: Minor
                              Found in src/store/index.js - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

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

                                      } else {
                                        // already in the timetable
                                        if (payload.course.courseCode in state.winterSelectedCourses) {
                                          return;
                                        }
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 1 day to fix
                              src/store/index.js on lines 238..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 202.

                              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 (state.semesterStatus === 'F') {
                                        // already in the timetable
                                        if (payload.course.courseCode in state.fallSelectedCourses) {
                                          return;
                                        }
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 1 day to fix
                              src/store/index.js on lines 256..275

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 202.

                              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 {
                                        for (const day in context.state.winterTimetable) {
                                          const dayEvents = context.state.winterTimetable[day];
                                          for (let i = dayEvents.length - 1; i >= 0; i -= 1) {
                                            if (dayEvents[i].code === payload.code) {
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 3 hrs to fix
                              src/store/index.js on lines 659..669

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

                              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 (payload.code[4] === 'F') {
                                        for (const day in context.state.fallTimetable) {
                                          const dayEvents = context.state.fallTimetable[day];
                                          for (let i = dayEvents.length - 1; i >= 0; i -= 1) {
                                            if (dayEvents[i].code === payload.code) {
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 3 hrs to fix
                              src/store/index.js on lines 669..679

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

                              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

                                  saveLockedDayStatus(context) {
                                    if (context.state.semesterStatus === 'F') {
                                      context.state.savedLockedDayStatus = JSON.parse(
                                        JSON.stringify(context.state.fallLockedDayStatus),
                                      );
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 3 hrs to fix
                              src/store/index.js on lines 525..535

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

                              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

                                  saveLockedHourStatus(context) {
                                    if (context.state.semesterStatus === 'F') {
                                      context.state.savedLockedHourStatus = JSON.parse(
                                        JSON.stringify(context.state.fallLockedHourStatus),
                                      );
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 3 hrs to fix
                              src/store/index.js on lines 514..524

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

                              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

                                      for (const day in context.state.winterTimetable) {
                                        const dayEvents = context.state.winterTimetable[day];
                                        for (let i = dayEvents.length - 1; i >= 0; i -= 1) {
                                          if (dayEvents[i].code === payload.code) {
                                            dayEvents.splice(i, 1);
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 3 hrs to fix
                              src/store/index.js on lines 681..688

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

                              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

                                      for (const day in context.state.fallTimetable) {
                                        const dayEvents = context.state.fallTimetable[day];
                                        for (let i = dayEvents.length - 1; i >= 0; i -= 1) {
                                          if (dayEvents[i].code === payload.code) {
                                            dayEvents.splice(i, 1);
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 3 hrs to fix
                              src/store/index.js on lines 689..696

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

                              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

                                  fallLockedHourStatus: !localStorage.fallLockedHourStatus
                                    ? {
                                        '8 AM': false,
                                        '9 AM': false,
                                        '10 AM': false,
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 3 hrs to fix
                              src/store/index.js on lines 90..107

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

                              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

                                  winterLockedHourStatus: !localStorage.winterLockedHourStatus
                                    ? {
                                        '8 AM': false,
                                        '9 AM': false,
                                        '10 AM': false,
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 3 hrs to fix
                              src/store/index.js on lines 48..65

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

                              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

                                    context.state.fallLockedHourStatus = {
                                      '8 AM': false,
                                      '9 AM': false,
                                      '10 AM': false,
                                      '11 AM': false,
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 2 hrs to fix
                              src/store/index.js on lines 460..475

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

                              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

                                    context.state.winterLockedHourStatus = {
                                      '8 AM': false,
                                      '9 AM': false,
                                      '10 AM': false,
                                      '11 AM': false,
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 2 hrs to fix
                              src/store/index.js on lines 428..443

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

                              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

                                  setLockedHourStatus(state, payload) {
                                    if (state.semesterStatus === 'F') {
                                      state.fallLockedHourStatus[payload] = !state.fallLockedHourStatus[
                                        payload
                                      ];
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 2 hrs to fix
                              src/store/index.js on lines 196..206

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

                              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

                                  setLockedDayStatus(state, payload) {
                                    if (state.semesterStatus === 'F') {
                                      state.fallLockedDayStatus[payload] = !state.fallLockedDayStatus[
                                        payload
                                      ];
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 2 hrs to fix
                              src/store/index.js on lines 185..195

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

                              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

                                Object.values(state.winterSelectedCourses).forEach((course) => {
                                  course.color = genColor(state.darkMode ? darkSaturation : lightSaturation, state.darkMode ? darkLightness : lightLightness).hexString();
                                });
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 1 hr to fix
                              src/store/index.js on lines 33..35

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

                              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

                                Object.values(state.fallSelectedCourses).forEach((course) => {
                                  course.color = genColor(state.darkMode ? darkSaturation : lightSaturation, state.darkMode ? darkLightness : lightLightness).hexString();
                                });
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 1 hr to fix
                              src/store/index.js on lines 36..38

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

                              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

                                  fallTimetable: !localStorage.fallTimetable
                                    ? {
                                        MONDAY: [],
                                        TUESDAY: [],
                                        WEDNESDAY: [],
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 1 hr to fix
                              src/store/index.js on lines 123..131

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

                              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

                                  winterTimetable: !localStorage.winterTimetable
                                    ? {
                                        MONDAY: [],
                                        TUESDAY: [],
                                        WEDNESDAY: [],
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 1 hr to fix
                              src/store/index.js on lines 81..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 60.

                              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

                                  winterLockedDayStatus: !localStorage.winterLockedDayStatus
                                    ? {
                                        Monday: false,
                                        Tuesday: false,
                                        Wednesday: false,
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 1 hr to fix
                              src/store/index.js on lines 66..74

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

                              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

                                  fallLockedDayStatus: !localStorage.fallLockedDayStatus
                                    ? {
                                        Monday: false,
                                        Tuesday: false,
                                        Wednesday: false,
                              Severity: Major
                              Found in src/store/index.js and 1 other location - About 1 hr to fix
                              src/store/index.js on lines 108..116

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

                              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 if (payload[8] === 'F') {
                                      // Fall
                                      index = state.fallLockedSections.indexOf(payload);
                                      if (index !== -1) {
                                        state.fallLockedSections.splice(index, 1);
                              Severity: Minor
                              Found in src/store/index.js and 1 other location - About 55 mins to fix
                              src/store/index.js on lines 373..387

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

                              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 if (payload[8] === 'S') {
                                      // Winter
                                      index = state.winterLockedSections.indexOf(payload);
                                      if (index !== -1) {
                                        state.winterLockedSections.splice(index, 1);
                              Severity: Minor
                              Found in src/store/index.js and 1 other location - About 55 mins to fix
                              src/store/index.js on lines 367..387

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

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

                                    } else if (payload[8] === 'F') {
                                      index = state.fallLockedSections.indexOf(payload);
                                      if (index === -1) {
                                        state.fallLockedSections.push(payload);
                                      }
                              Severity: Major
                              Found in src/store/index.js and 2 other locations - About 50 mins to fix
                              src/store/index.js on lines 322..332
                              src/store/index.js on lines 338..349

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

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

                                    } else if (payload[8] === 'S') {
                                      index = state.winterLockedSections.indexOf(payload);
                                      if (index === -1) {
                                        state.winterLockedSections.push(payload);
                                      }
                              Severity: Major
                              Found in src/store/index.js and 2 other locations - About 50 mins to fix
                              src/store/index.js on lines 322..332
                              src/store/index.js on lines 333..349

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

                              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 (payload[4] === 'F') {
                                        index = state.fallLockedSections.indexOf(payload);
                                        if (index !== -1) {
                                          state.fallLockedSections.splice(index, 1);
                                        }
                              Severity: Minor
                              Found in src/store/index.js and 1 other location - About 50 mins to fix
                              src/store/index.js on lines 361..366

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

                              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 {
                                        index = state.winterLockedSections.indexOf(payload);
                                        if (index !== -1) {
                                          state.winterLockedSections.splice(index, 1);
                                        }
                              Severity: Minor
                              Found in src/store/index.js and 1 other location - About 50 mins to fix
                              src/store/index.js on lines 356..361

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

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

                                      if (payload[4] === 'F') {
                                        index = state.fallLockedSections.indexOf(payload);
                                        if (index === -1) {
                                          state.fallLockedSections.push(payload);
                                        }
                              Severity: Major
                              Found in src/store/index.js and 2 other locations - About 50 mins to fix
                              src/store/index.js on lines 333..349
                              src/store/index.js on lines 338..349

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

                              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 (context.state.semesterStatus === 'F') {
                                      context.state.fallLockedHourStatus =
                                        context.state.savedLockedHourStatus;
                                      context.state.fallLockedDayStatus = context.state.savedLockedDayStatus;
                                    } else {
                              Severity: Minor
                              Found in src/store/index.js and 1 other location - About 40 mins to fix
                              src/store/index.js on lines 553..558

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

                                    } else {
                                      context.state.winterLockedHourStatus =
                                        context.state.savedLockedHourStatus;
                                      context.state.winterLockedDayStatus =
                                        context.state.savedLockedDayStatus;
                              Severity: Minor
                              Found in src/store/index.js and 1 other location - About 40 mins to fix
                              src/store/index.js on lines 549..553

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

                                    const timetables = generateTimetables(
                                      fallCourses,
                                      context.state.fallLockedSections,
                                      winterCourses,
                                      context.state.winterLockedSections,
                              Severity: Minor
                              Found in src/store/index.js and 1 other location - About 40 mins to fix
                              src/store/index.js on lines 713..720

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

                                    const bothTimetables = generateTimetables(
                                      fallCourses,
                                      context.state.fallLockedSections,
                                      winterCourses,
                                      context.state.winterLockedSections,
                              Severity: Minor
                              Found in src/store/index.js and 1 other location - About 40 mins to fix
                              src/store/index.js on lines 612..619

                              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

                                    const fallCourses = Object.keys(context.state.fallSelectedCourses).map(
                                      code => context.state.fallSelectedCourses[code],
                                    );
                              Severity: Major
                              Found in src/store/index.js and 3 other locations - About 35 mins to fix
                              src/store/index.js on lines 605..607
                              src/store/index.js on lines 608..610
                              src/store/index.js on lines 709..711

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

                                    const winterCourses = Object.keys(
                                      context.state.winterSelectedCourses,
                                    ).map(code => context.state.winterSelectedCourses[code]);
                              Severity: Major
                              Found in src/store/index.js and 3 other locations - About 35 mins to fix
                              src/store/index.js on lines 605..607
                              src/store/index.js on lines 608..610
                              src/store/index.js on lines 706..708

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

                                    const winterCourses = Object.keys(
                                      context.state.winterSelectedCourses,
                                    ).map(code => context.state.winterSelectedCourses[code]);
                              Severity: Major
                              Found in src/store/index.js and 3 other locations - About 35 mins to fix
                              src/store/index.js on lines 605..607
                              src/store/index.js on lines 706..708
                              src/store/index.js on lines 709..711

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

                                    const fallCourses = Object.keys(context.state.fallSelectedCourses).map(
                                      code => context.state.fallSelectedCourses[code],
                                    );
                              Severity: Major
                              Found in src/store/index.js and 3 other locations - About 35 mins to fix
                              src/store/index.js on lines 608..610
                              src/store/index.js on lines 706..708
                              src/store/index.js on lines 709..711

                              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

                                    context.state.winterTimetable = {
                                      MONDAY: [],
                                      TUESDAY: [],
                                      WEDNESDAY: [],
                                      THURSDAY: [],
                              Severity: Minor
                              Found in src/store/index.js and 1 other location - About 35 mins to fix
                              src/store/index.js on lines 453..459

                              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

                                    context.state.fallTimetable = {
                                      MONDAY: [],
                                      TUESDAY: [],
                                      WEDNESDAY: [],
                                      THURSDAY: [],
                              Severity: Minor
                              Found in src/store/index.js and 1 other location - About 35 mins to fix
                              src/store/index.js on lines 485..491

                              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

                              There are no issues that match your filters.

                              Category
                              Status