VIAplanner/via-timetable

View on GitHub
src/timetable-planner/index.js

Summary

Maintainability
F
1 mo
Test Coverage

Function createTimetable has 1230 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const createTimetable = (fallCourseSection, winterCourseSection, state) => {
  let fallTimetable = {
    MONDAY: [],
    TUESDAY: [],
    WEDNESDAY: [],
Severity: Major
Found in src/timetable-planner/index.js - About 6 days to fix

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

    const sortCourseSection = require('./combinations/combinations');
    
    /**
     * Search for the first index of course that has type section
     * @param {*} courseSection
    Severity: Major
    Found in src/timetable-planner/index.js - About 3 days to fix

      Function fallLectureCombo has 426 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        const fallLectureCombo = (courseSection, whichArray, output = []) => {
          fallLectureCombo.founded = 0;
          const lec2 = searchForSectionIndexAfterprevIndex(
            courseSection,
            'lecture',
      Severity: Major
      Found in src/timetable-planner/index.js - About 2 days to fix

        Function winterLectureCombo has 277 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          const winterLectureCombo = (courseSection, whichArray, output = []) => {
            winterLectureCombo.founded = 0;
            const lec2 = searchForSectionIndexAfterprevIndex(
              courseSection,
              'lecture',
        Severity: Major
        Found in src/timetable-planner/index.js - About 1 day to fix

          Function lockSectionOfCourse has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
          Open

          const lockSectionOfCourse = (courseSections, lockSections) => {
            for (const course of courseSections) {
              for (const section of lockSections) {
                if (course.code === section.slice(0, section.length - 5)) {
                  if (section[section.length - 5] === 'L') {
          Severity: Minor
          Found in src/timetable-planner/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

          Function practicalCombo has 206 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      const practicalCombo = (
                        // eslint-disable-next-line no-shadow
                        courseSection,
                        whichArray2 = pra,
                        output2 = [],
          Severity: Major
          Found in src/timetable-planner/index.js - About 1 day to fix

            Function fallPracticalCombo has 202 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              const fallPracticalCombo = (courseSection, whichArray2, output2 = []) => {
                fallPracticalCombo.founded = 0;
                const pra2 = searchForSectionIndexAfterprevIndex(
                  courseSection,
                  'practical',
            Severity: Major
            Found in src/timetable-planner/index.js - About 1 day to fix

              Function winterPracticalCombo has 130 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const winterPracticalCombo = (courseSection, whichArray2, output2 = []) => {
                  winterPracticalCombo.founded = 0;
                  const pra2 = searchForSectionIndexAfterprevIndex(
                    courseSection,
                    'practical',
              Severity: Major
              Found in src/timetable-planner/index.js - About 5 hrs to fix

                Function practicalCombo has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            const practicalCombo = (
                              // eslint-disable-next-line no-shadow
                              courseSection,
                              whichArray2 = pra,
                              output2 = [],
                Severity: Major
                Found in src/timetable-planner/index.js - About 5 hrs to fix

                  Function createTimetable has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                  Open

                  const createTimetable = (fallCourseSection, winterCourseSection, state) => {
                    let fallTimetable = {
                      MONDAY: [],
                      TUESDAY: [],
                      WEDNESDAY: [],
                  Severity: Minor
                  Found in src/timetable-planner/index.js - About 5 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 tutorialCombo has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                          const tutorialCombo = (
                                            // eslint-disable-next-line no-shadow
                                            courseSection,
                                            // eslint-disable-next-line no-shadow
                                            whichArray2 = tut,
                  Severity: Major
                  Found in src/timetable-planner/index.js - About 3 hrs to fix

                    Function tutorialCombo has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                  const tutorialCombo = (
                                    // eslint-disable-next-line no-shadow
                                    courseSection,
                                    whichArray2 = tut,
                                    output2 = [],
                    Severity: Major
                    Found in src/timetable-planner/index.js - About 3 hrs to fix

                      Function tutorialCombo has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  const tutorialCombo = (
                                    // eslint-disable-next-line no-shadow
                                    courseSection,
                                    // eslint-disable-next-line no-shadow
                                    whichArray2 = tut,
                      Severity: Major
                      Found in src/timetable-planner/index.js - About 3 hrs to fix

                        Function fallTutorialCombo has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const fallTutorialCombo = (courseSection, whichArray2, output2 = []) => {
                            fallTutorialCombo.founded = 0;
                            const tut2 = searchForSectionIndexAfterprevIndex(
                              courseSection,
                              'tutorial',
                        Severity: Major
                        Found in src/timetable-planner/index.js - About 3 hrs to fix

                          Function sortCourseSections has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                          Open

                          const sortCourseSections = (course, online) => {
                            if (online === 'InPerson') {
                              course.lecture.sort((a, b) => (a.sectionCode > b.sectionCode ? 1 : -1));
                              course.practical.sort((a, b) => (a.sectionCode > b.sectionCode ? 1 : -1));
                              course.tutorial.sort((a, b) => (a.sectionCode > b.sectionCode ? 1 : -1));
                          Severity: Minor
                          Found in src/timetable-planner/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 tutorialCombo has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                        const tutorialCombo = (
                                          // eslint-disable-next-line no-shadow
                                          courseSection,
                                          whichArray2 = tut,
                                          output2 = [],
                          Severity: Minor
                          Found in src/timetable-planner/index.js - About 2 hrs to fix

                            Function tutorialCombo has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                                    const tutorialCombo = (
                                                      // eslint-disable-next-line no-shadow
                                                      courseSection,
                                                      // eslint-disable-next-line no-shadow
                                                      whichArray2 = tut,
                            Severity: Minor
                            Found in src/timetable-planner/index.js - About 2 hrs to fix

                              Function tutorialCombo has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          const tutorialCombo = (
                                            // eslint-disable-next-line no-shadow
                                            courseSection,
                                            // eslint-disable-next-line no-shadow
                                            whichArray2 = tut,
                              Severity: Minor
                              Found in src/timetable-planner/index.js - About 2 hrs to fix

                                Function winterTutorialCombo has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const winterTutorialCombo = (courseSection, whichArray2, output2 = []) => {
                                    winterTutorialCombo.founded = 0;
                                    const tut2 = searchForSectionIndexAfterprevIndex(
                                      courseSection,
                                      'tutorial',
                                Severity: Minor
                                Found in src/timetable-planner/index.js - About 1 hr to fix

                                  Function checkOverlapForDay has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  const checkOverlapForDay = (timetable, day) => {
                                    let section = 0;
                                    while (section < timetable[day].length) {
                                      let section2 = +section + +1;
                                      while (section2 < timetable[day].length) {
                                  Severity: Minor
                                  Found in src/timetable-planner/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 generateTimetables has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const generateTimetables = (
                                    fallCourses,
                                    fallLockSections,
                                    winterCourses,
                                    winterLockSections,
                                  Severity: Minor
                                  Found in src/timetable-planner/index.js - About 1 hr to fix

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

                                    const lockSectionOfCourse = (courseSections, lockSections) => {
                                      for (const course of courseSections) {
                                        for (const section of lockSections) {
                                          if (course.code === section.slice(0, section.length - 5)) {
                                            if (section[section.length - 5] === 'L') {
                                    Severity: Minor
                                    Found in src/timetable-planner/index.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                            if (
                                              (timetable[day][section].start >= timetable[day][section2].start &&
                                                timetable[day][section].start < timetable[day][section2].end) ||
                                              (timetable[day][section].end > timetable[day][section2].start &&
                                                timetable[day][section].end <= timetable[day][section2].end) ||
                                      Severity: Critical
                                      Found in src/timetable-planner/index.js - About 1 hr to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                            if (fallLectureCombo.founded === 1) {
                                                              return true;
                                                            }
                                        Severity: Major
                                        Found in src/timetable-planner/index.js - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                              if (overlapExists(fallTimetable)) {
                                                                fallTimetable = createShallowCopyOfTimetable(
                                                                  prevTimetable,
                                                                );
                                                                let j = -1;
                                          Severity: Major
                                          Found in src/timetable-planner/index.js - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                if (winterPracticalCombo.founded === 1) {
                                                                  return true;
                                                                }
                                            Severity: Major
                                            Found in src/timetable-planner/index.js - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                  if (overlapExists(fallTimetable)) {
                                                                    fallTimetable = createShallowCopyOfTimetable(
                                                                      prevTimetabletut,
                                                                    );
                                                                    let j = -1;
                                              Severity: Major
                                              Found in src/timetable-planner/index.js - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                if (tut2 !== -1) {
                                                                  return courseSection[whichArray2].tutorial.some(
                                                                    arrayElement2 => {
                                                                      // Recursive case...
                                                                      if (fallLectureCombo.founded === 1) {
                                                Severity: Major
                                                Found in src/timetable-planner/index.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                      if (fallLectureCombo.founded === 1) {
                                                                        return true;
                                                                      }
                                                  Severity: Major
                                                  Found in src/timetable-planner/index.js - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                        if (overlapExists(winterTimetable)) {
                                                                          winterTimetable = createShallowCopyOfTimetable(
                                                                            prevTimetable,
                                                                          );
                                                                          let j = -1;
                                                    Severity: Major
                                                    Found in src/timetable-planner/index.js - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                for (const lecture of course.lecture) {
                                                                  if (lecture.sectionCode === section.slice(section.length - 5)) {
                                                                    course.lecture = [lecture];
                                                                  }
                                                                }
                                                      Severity: Major
                                                      Found in src/timetable-planner/index.js - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                            if (winterLectureCombo.founded === 1) {
                                                                              return true;
                                                                            }
                                                        Severity: Major
                                                        Found in src/timetable-planner/index.js - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                          if (tut2 !== -1) {
                                                                            return courseSection[whichArray2].tutorial.some(
                                                                              arrayElement2 => {
                                                                                // Recursive case...
                                                                                if (fallLectureCombo.founded === 1) {
                                                          Severity: Major
                                                          Found in src/timetable-planner/index.js - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                      for (const tutorial of course.tutorial) {
                                                                        if (tutorial.sectionCode === section.slice(section.length - 5)) {
                                                                          course.tutorial = [tutorial];
                                                                        }
                                                                      }
                                                            Severity: Major
                                                            Found in src/timetable-planner/index.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                            if (tutResult) {
                                                                              winterLectureCombo.founded = 1;
                                                                              // founds a valid timetable
                                                                              return true;
                                                                            } else {
                                                              Severity: Major
                                                              Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                          for (const practical of course.practical) {
                                                                            if (practical.sectionCode === section.slice(section.length - 5)) {
                                                                              course.practical = [practical];
                                                                            }
                                                                          }
                                                                Severity: Major
                                                                Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                if (fallLectureCombo.founded === 1) {
                                                                                  return true;
                                                                                }
                                                                  Severity: Major
                                                                  Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                    Avoid deeply nested control flow statements.
                                                                    Open

                                                                                  if (
                                                                                    section.comboCode.charAt(section.comboCode.length - 6) === 'Y'
                                                                                  ) {
                                                                                    yearLocked.push(section.comboCode);
                                                                                  }
                                                                    Severity: Major
                                                                    Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                                          if (winterLectureCombo.founded === 1) {
                                                                                            return true;
                                                                                          }
                                                                      Severity: Major
                                                                      Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                            if (winterPracticalCombo.founded === 1) {
                                                                                              return true;
                                                                                            }
                                                                        Severity: Major
                                                                        Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

                                                                                        if (tutResult) {
                                                                                          fallLectureCombo.founded = 1;
                                                                                          // founds a valid timetable
                                                                                          return true;
                                                                                        } else {
                                                                          Severity: Major
                                                                          Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

                                                                                          for (const section of tempList) {
                                                                                            if (
                                                                                              section.comboCode.charAt(section.comboCode.length - 6) === 'Y'
                                                                                            ) {
                                                                                              yearLocked.push(section.comboCode);
                                                                            Severity: Major
                                                                            Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                      if (section[section.length - 3] === 'L') {
                                                                                        for (const lecture of course.lecture) {
                                                                                          if (lecture.sectionCode === section.slice(section.length - 3)) {
                                                                                            course.lecture = [lecture];
                                                                                          }
                                                                              Severity: Major
                                                                              Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                                Avoid deeply nested control flow statements.
                                                                                Open

                                                                                              if (winterLectureCombo.founded === 1) {
                                                                                                return true;
                                                                                              }
                                                                                Severity: Major
                                                                                Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

                                                                                                      if (overlapExists(winterTimetable)) {
                                                                                                        winterTimetable = createShallowCopyOfTimetable(
                                                                                                          prevTimetabletut,
                                                                                                        );
                                                                                                        let j = -1;
                                                                                  Severity: Major
                                                                                  Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                                  if (winterPracticalCombo.founded === 1) {
                                                                                                    return true;
                                                                                                  }
                                                                                    Severity: Major
                                                                                    Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                    if (
                                                                                                      JSON.stringify(winterTimetable) ===
                                                                                                        JSON.stringify({
                                                                                                          MONDAY: [],
                                                                                                          TUESDAY: [],
                                                                                      Severity: Major
                                                                                      Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                            if (fallPracticalCombo.founded === 1) {
                                                                                                              return true;
                                                                                                            }
                                                                                        Severity: Major
                                                                                        Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                              if (fallPracticalCombo.founded === 1) {
                                                                                                                return true;
                                                                                                              }
                                                                                          Severity: Major
                                                                                          Found in src/timetable-planner/index.js - About 45 mins to fix

                                                                                            Avoid deeply nested control flow statements.
                                                                                            Open

                                                                                                          if (fallPracticalCombo.founded === 1) {
                                                                                                            return true;
                                                                                                          }
                                                                                            Severity: Major
                                                                                            Found in src/timetable-planner/index.js - About 45 mins to fix

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

                                                                                              const addSectionToTimetable = (sections, timetable) => {
                                                                                                for (const section of sections) {
                                                                                                  for (const time of section.times) {
                                                                                                    if (section.sectionCode.length === 3) {
                                                                                                      const timetableSection = {
                                                                                              Severity: Minor
                                                                                              Found in src/timetable-planner/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

                                                                                              Avoid too many return statements within this function.
                                                                                              Open

                                                                                                            return true;
                                                                                              Severity: Major
                                                                                              Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                Avoid too many return statements within this function.
                                                                                                Open

                                                                                                              return true;
                                                                                                Severity: Major
                                                                                                Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                  Avoid too many return statements within this function.
                                                                                                  Open

                                                                                                                            return true;
                                                                                                  Severity: Major
                                                                                                  Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                    Avoid too many return statements within this function.
                                                                                                    Open

                                                                                                                    return true;
                                                                                                    Severity: Major
                                                                                                    Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                      Avoid too many return statements within this function.
                                                                                                      Open

                                                                                                                  return true;
                                                                                                      Severity: Major
                                                                                                      Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                        Avoid too many return statements within this function.
                                                                                                        Open

                                                                                                                          return true;
                                                                                                        Severity: Major
                                                                                                        Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                          Avoid too many return statements within this function.
                                                                                                          Open

                                                                                                                    return true;
                                                                                                          Severity: Major
                                                                                                          Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                            Avoid too many return statements within this function.
                                                                                                            Open

                                                                                                                      return true;
                                                                                                            Severity: Major
                                                                                                            Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                              Avoid too many return statements within this function.
                                                                                                              Open

                                                                                                                            return true;
                                                                                                              Severity: Major
                                                                                                              Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                                Avoid too many return statements within this function.
                                                                                                                Open

                                                                                                                              return true;
                                                                                                                Severity: Major
                                                                                                                Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this function.
                                                                                                                  Open

                                                                                                                                          return true;
                                                                                                                  Severity: Major
                                                                                                                  Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this function.
                                                                                                                    Open

                                                                                                                                  return true;
                                                                                                                    Severity: Major
                                                                                                                    Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this function.
                                                                                                                      Open

                                                                                                                                                return true;
                                                                                                                      Severity: Major
                                                                                                                      Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this function.
                                                                                                                        Open

                                                                                                                                                  return true;
                                                                                                                        Severity: Major
                                                                                                                        Found in src/timetable-planner/index.js - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this function.
                                                                                                                          Open

                                                                                                                                        return true;
                                                                                                                          Severity: Major
                                                                                                                          Found in src/timetable-planner/index.js - About 30 mins to fix

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

                                                                                                                                              arrayElement2 => {
                                                                                                                                                // Base case when reach until the last course that has tutorial
                                                                                                                                                if (fallPracticalCombo.founded === 1) {
                                                                                                                                                  return true;
                                                                                                                                                }
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 2 days to fix
                                                                                                                            src/timetable-planner/index.js on lines 577..648

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

                                                                                                                            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

                                                                                                                                                arrayElement2 => {
                                                                                                                                                  // Base case when reach until the last course that has tutorial
                                                                                                                                                  if (fallLectureCombo.founded === 1) {
                                                                                                                                                    return true;
                                                                                                                                                  }
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 2 days to fix
                                                                                                                            src/timetable-planner/index.js on lines 807..878

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

                                                                                                                            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 tutorialCombo = (
                                                                                                                                                      // eslint-disable-next-line no-shadow
                                                                                                                                                      courseSection,
                                                                                                                                                      // eslint-disable-next-line no-shadow
                                                                                                                                                      whichArray2 = tut,
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 2 days to fix
                                                                                                                            src/timetable-planner/index.js on lines 1394..1459

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

                                                                                                                            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 tutorialCombo = (
                                                                                                                                          // eslint-disable-next-line no-shadow
                                                                                                                                          courseSection,
                                                                                                                                          // eslint-disable-next-line no-shadow
                                                                                                                                          whichArray2 = tut,
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 2 days to fix
                                                                                                                            src/timetable-planner/index.js on lines 1138..1203

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

                                                                                                                            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 sortCourseSections = (course, online) => {
                                                                                                                              if (online === 'InPerson') {
                                                                                                                                course.lecture.sort((a, b) => (a.sectionCode > b.sectionCode ? 1 : -1));
                                                                                                                                course.practical.sort((a, b) => (a.sectionCode > b.sectionCode ? 1 : -1));
                                                                                                                                course.tutorial.sort((a, b) => (a.sectionCode > b.sectionCode ? 1 : -1));
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 1 day to fix
                                                                                                                            src/timetable-planner/index2.js on lines 59..69

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

                                                                                                                            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 (overlapExists(fallTimetable)) {
                                                                                                                                      fallTimetable = {
                                                                                                                                        MONDAY: [],
                                                                                                                                        TUESDAY: [],
                                                                                                                                        WEDNESDAY: [],
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 2 other locations - About 1 day to fix
                                                                                                                            src/timetable-planner/index.js on lines 549..711
                                                                                                                            src/timetable-planner/index.js on lines 773..938

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

                                                                                                                            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 (tut >= 0) {
                                                                                                                                        const prevTimetabletut = createShallowCopyOfTimetable(
                                                                                                                                          fallTimetable,
                                                                                                                                        );
                                                                                                                                        const tutorialCombo = (
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 2 other locations - About 1 day to fix
                                                                                                                            src/timetable-planner/index.js on lines 549..711
                                                                                                                            src/timetable-planner/index.js on lines 971..1029

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

                                                                                                                            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 (tut >= 0) {
                                                                                                                                          const prevTimetable = createShallowCopyOfTimetable(fallTimetable);
                                                                                                                                          const tutorialCombo = (
                                                                                                                                            // eslint-disable-next-line no-shadow
                                                                                                                                            courseSection,
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 2 other locations - About 1 day to fix
                                                                                                                            src/timetable-planner/index.js on lines 773..938
                                                                                                                            src/timetable-planner/index.js on lines 971..1029

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

                                                                                                                            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 sortCourses = (courses, online) => {
                                                                                                                              for (const course of courses) {
                                                                                                                                sortCourseSections(course, online);
                                                                                                                              }
                                                                                                                              courses.sort((a, b) => (a.practical.length > b.lecture.length ? 1 : -1));
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 6 hrs to fix
                                                                                                                            src/timetable-planner/index2.js on lines 76..83

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

                                                                                                                            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

                                                                                                                                    if (overlapExists(fallTimetable)) {
                                                                                                                                      fallTimetable = {
                                                                                                                                        MONDAY: [],
                                                                                                                                        TUESDAY: [],
                                                                                                                                        WEDNESDAY: [],
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 5 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 971..1029
                                                                                                                            src/timetable-planner/index.js on lines 1368..1482
                                                                                                                            src/timetable-planner/index.js on lines 1512..1535

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

                                                                                                                            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

                                                                                                                                    if (overlapExists(winterTimetable)) {
                                                                                                                                      winterTimetable = {
                                                                                                                                        MONDAY: [],
                                                                                                                                        TUESDAY: [],
                                                                                                                                        WEDNESDAY: [],
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 5 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 751..939
                                                                                                                            src/timetable-planner/index.js on lines 971..1029
                                                                                                                            src/timetable-planner/index.js on lines 1368..1482

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

                                                                                                                            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

                                                                                                                                    if (overlapExists(winterTimetable)) {
                                                                                                                                      winterTimetable = {
                                                                                                                                        MONDAY: [],
                                                                                                                                        TUESDAY: [],
                                                                                                                                        WEDNESDAY: [],
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 5 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 751..939
                                                                                                                            src/timetable-planner/index.js on lines 971..1029
                                                                                                                            src/timetable-planner/index.js on lines 1512..1535

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

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

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

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

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

                                                                                                                            Refactorings

                                                                                                                            Further Reading

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

                                                                                                                                  if (course.code === section.slice(0, section.length - 5)) {
                                                                                                                                    if (section[section.length - 5] === 'L') {
                                                                                                                                      for (const lecture of course.lecture) {
                                                                                                                                        if (lecture.sectionCode === section.slice(section.length - 5)) {
                                                                                                                                          course.lecture = [lecture];
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 4 hrs to fix
                                                                                                                            src/timetable-planner/index2.js on lines 17..48

                                                                                                                            Duplicated Code

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

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

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

                                                                                                                            Tuning

                                                                                                                            This issue has a mass of 117.

                                                                                                                            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 (fallCourseSection.length > 0 && state === 'F') {
                                                                                                                                const lec = searchForSectionIndex(fallCourseSection, 'lecture');
                                                                                                                                const pra = searchForSectionIndex(fallCourseSection, 'practical');
                                                                                                                                const tut = searchForSectionIndex(fallCourseSection, 'tutorial');
                                                                                                                                if (lec >= 0) {
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 3 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 1558..1569

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

                                                                                                                            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 (winterCourseSection.length > 0 && state === 'W') {
                                                                                                                                const lec = searchForSectionIndex(winterCourseSection, 'lecture');
                                                                                                                                const pra = searchForSectionIndex(winterCourseSection, 'practical');
                                                                                                                                const tut = searchForSectionIndex(winterCourseSection, 'tutorial');
                                                                                                                                if (lec >= 0) {
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 3 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 1540..1557

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

                                                                                                                            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 (section.sectionCode.length === 3) {
                                                                                                                                    const timetableSection = {
                                                                                                                                      code: section.comboCode.substring(0, section.comboCode.length - 3),
                                                                                                                                      sectionCode: section.sectionCode,
                                                                                                                                      instructors: section.instructors,
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 56..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 90.

                                                                                                                            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 {
                                                                                                                                    const timetableSection = {
                                                                                                                                      code: section.comboCode.substring(0, section.comboCode.length - 5),
                                                                                                                                      sectionCode: section.sectionCode,
                                                                                                                                      instructors: section.instructors,
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 47..56

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

                                                                                                                            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

                                                                                                                                          if (tutResult) {
                                                                                                                                            winterLectureCombo.founded = 1;
                                                                                                                                            // founds a valid timetable
                                                                                                                                            return true;
                                                                                                                                          } else {
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 531..546
                                                                                                                            src/timetable-planner/index.js on lines 653..668
                                                                                                                            src/timetable-planner/index.js on lines 1226..1241

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

                                                                                                                            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

                                                                                                                                        if (praResult) {
                                                                                                                                          fallLectureCombo.founded = 1;
                                                                                                                                          // founds a valid timetable
                                                                                                                                          return true;
                                                                                                                                        } else {
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 653..668
                                                                                                                            src/timetable-planner/index.js on lines 1226..1241
                                                                                                                            src/timetable-planner/index.js on lines 1310..1325

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

                                                                                                                            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

                                                                                                                                          if (tutResult) {
                                                                                                                                            fallLectureCombo.founded = 1;
                                                                                                                                            // founds a valid timetable
                                                                                                                                            return true;
                                                                                                                                          } else {
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 531..546
                                                                                                                            src/timetable-planner/index.js on lines 1226..1241
                                                                                                                            src/timetable-planner/index.js on lines 1310..1325

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

                                                                                                                            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

                                                                                                                                        if (praResult) {
                                                                                                                                          winterLectureCombo.founded = 1;
                                                                                                                                          // founds a valid timetable
                                                                                                                                          return true;
                                                                                                                                        } else {
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 531..546
                                                                                                                            src/timetable-planner/index.js on lines 653..668
                                                                                                                            src/timetable-planner/index.js on lines 1310..1325

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

                                                                                                                            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

                                                                                                                                          if (pra2 !== -1) {
                                                                                                                                            return courseSection[whichArray2].practical.some(
                                                                                                                                              arrayElement2 => {
                                                                                                                                                // Recursive case...
                                                                                                                                                if (fallLectureCombo.founded === 1) {
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 562..650
                                                                                                                            src/timetable-planner/index.js on lines 1087..1223
                                                                                                                            src/timetable-planner/index.js on lines 1259..1307

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

                                                                                                                            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

                                                                                                                                          if (pra2 !== -1) {
                                                                                                                                            return courseSection[whichArray2].practical.some(
                                                                                                                                              arrayElement2 => {
                                                                                                                                                // Recursive case...
                                                                                                                                                if (winterLectureCombo.founded === 1) {
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 311..528
                                                                                                                            src/timetable-planner/index.js on lines 562..650
                                                                                                                            src/timetable-planner/index.js on lines 1259..1307

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

                                                                                                                            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

                                                                                                                                            if (tut2 !== -1) {
                                                                                                                                              return courseSection[whichArray2].tutorial.some(
                                                                                                                                                arrayElement2 => {
                                                                                                                                                  // Recursive case...
                                                                                                                                                  if (fallLectureCombo.founded === 1) {
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 311..528
                                                                                                                            src/timetable-planner/index.js on lines 562..650
                                                                                                                            src/timetable-planner/index.js on lines 1087..1223

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

                                                                                                                            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

                                                                                                                                            if (tut2 !== -1) {
                                                                                                                                              return courseSection[whichArray2].tutorial.some(
                                                                                                                                                arrayElement2 => {
                                                                                                                                                  // Recursive case...
                                                                                                                                                  if (fallLectureCombo.founded === 1) {
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 311..528
                                                                                                                            src/timetable-planner/index.js on lines 1087..1223
                                                                                                                            src/timetable-planner/index.js on lines 1259..1307

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

                                                                                                                            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 (lec2 !== -1) {
                                                                                                                                  return courseSection[whichArray].lecture.some(arrayElement => {
                                                                                                                                    // Recursive case...
                                                                                                                                    // if the course is not the last one
                                                                                                                                    if (fallLectureCombo.founded === 1) {
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 1040..1340

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

                                                                                                                            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 (lec2 !== -1) {
                                                                                                                                  return courseSection[whichArray].lecture.some(arrayElement => {
                                                                                                                                    // Recursive case...
                                                                                                                                    // if the course is not the last one
                                                                                                                                    if (winterLectureCombo.founded === 1) {
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 268..721

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

                                                                                                                            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

                                                                                                                                if (tut2 !== -1) {
                                                                                                                                  return courseSection[whichArray2].tutorial.some(arrayElement2 => {
                                                                                                                                    // Recursive case...
                                                                                                                                    if (winterTutorialCombo.founded === 1) {
                                                                                                                                      return true;
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 731..941
                                                                                                                            src/timetable-planner/index.js on lines 952..1031
                                                                                                                            src/timetable-planner/index.js on lines 1349..1484

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

                                                                                                                            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

                                                                                                                                if (pra2 !== -1) {
                                                                                                                                  return courseSection[whichArray2].practical.some(arrayElement2 => {
                                                                                                                                    // Recursive case...
                                                                                                                                    if (winterPracticalCombo.founded === 1) {
                                                                                                                                      return true;
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 731..941
                                                                                                                            src/timetable-planner/index.js on lines 952..1031
                                                                                                                            src/timetable-planner/index.js on lines 1493..1537

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

                                                                                                                            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

                                                                                                                                if (tut2 !== -1) {
                                                                                                                                  return courseSection[whichArray2].tutorial.some(arrayElement2 => {
                                                                                                                                    // Recursive case...
                                                                                                                                    if (fallTutorialCombo.founded === 1) {
                                                                                                                                      return true;
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 731..941
                                                                                                                            src/timetable-planner/index.js on lines 1349..1484
                                                                                                                            src/timetable-planner/index.js on lines 1493..1537

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

                                                                                                                            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

                                                                                                                                if (pra2 !== -1) {
                                                                                                                                  return courseSection[whichArray2].practical.some(arrayElement2 => {
                                                                                                                                    // Recursive case...
                                                                                                                                    if (fallPracticalCombo.founded === 1) {
                                                                                                                                      return true;
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 3 other locations - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index.js on lines 952..1031
                                                                                                                            src/timetable-planner/index.js on lines 1349..1484
                                                                                                                            src/timetable-planner/index.js on lines 1493..1537

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

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

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

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

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

                                                                                                                            Refactorings

                                                                                                                            Further Reading

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

                                                                                                                                for (const day of days) {
                                                                                                                                  fallTimetable[day].sort((a, b) => a.start - b.start);
                                                                                                                                  winterTimetable[day].sort((a, b) => a.start - b.start);
                                                                                                                                }
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 2 hrs to fix
                                                                                                                            src/timetable-planner/index2.js on lines 356..359

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

                                                                                                                            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 (tutResult) {
                                                                                                                                          return true;
                                                                                                                                        } else {
                                                                                                                                          if (fallPracticalCombo.founded === 1) {
                                                                                                                                            return true;
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 1 hr to fix
                                                                                                                            src/timetable-planner/index.js on lines 1461..1474

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

                                                                                                                            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 (tutResult) {
                                                                                                                                          return true;
                                                                                                                                        } else {
                                                                                                                                          if (winterPracticalCombo.founded === 1) {
                                                                                                                                            return true;
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 1 hr to fix
                                                                                                                            src/timetable-planner/index.js on lines 883..896

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

                                                                                                                            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

                                                                                                                                (JSON.stringify(timetables[0]) ===
                                                                                                                                  JSON.stringify({
                                                                                                                                    MONDAY: [],
                                                                                                                                    TUESDAY: [],
                                                                                                                                    WEDNESDAY: [],
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 1 hr to fix
                                                                                                                            src/timetable-planner/index.js on lines 1625..1633

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

                                                                                                                            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

                                                                                                                                (JSON.stringify(timetables[1]) ===
                                                                                                                                  JSON.stringify({
                                                                                                                                    MONDAY: [],
                                                                                                                                    TUESDAY: [],
                                                                                                                                    WEDNESDAY: [],
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 1 other location - About 1 hr to fix
                                                                                                                            src/timetable-planner/index.js on lines 1616..1624

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

                                                                                                                            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

                                                                                                                                    (timetable[day][section].start >= timetable[day][section2].start &&
                                                                                                                                      timetable[day][section].start < timetable[day][section2].end) ||
                                                                                                                                    (timetable[day][section].end > timetable[day][section2].start &&
                                                                                                                                      timetable[day][section].end <= timetable[day][section2].end) ||
                                                                                                                            Severity: Major
                                                                                                                            Found in src/timetable-planner/index.js and 2 other locations - About 1 hr to fix
                                                                                                                            src/timetable-planner/index.js on lines 115..120
                                                                                                                            src/timetable-planner/index.js on lines 115..122

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

                                                                                                                            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