ahbeng/NUSMods

View on GitHub
scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts

Summary

Maintainability
F
1 mo
Test Coverage

File NusModsParser.ts has 1870 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Generated from src/services/requisite-tree/antlr4/NusMods.g4 by ANTLR 4.9.0-SNAPSHOT


import { ATN } from "antlr4ts/atn/ATN";
import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer";
Severity: Major
Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 5 days to fix

    NusModsParser has 30 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export class NusModsParser extends Parser {
        public static readonly COMMA = 1;
        public static readonly LPAREN = 2;
        public static readonly RPAREN = 3;
        public static readonly IF_IN = 4;
    Severity: Minor
    Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 3 hrs to fix

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

          public primitive(): PrimitiveContext {
              let _localctx: PrimitiveContext = new PrimitiveContext(this._ctx, this.state);
              this.enterRule(_localctx, 12, NusModsParser.RULE_primitive);
              try {
                  this.state = 104;
      Severity: Major
      Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 3 hrs to fix

        Function cohort_years has 75 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public cohort_years(): Cohort_yearsContext {
                let _localctx: Cohort_yearsContext = new Cohort_yearsContext(this._ctx, this.state);
                this.enterRule(_localctx, 24, NusModsParser.RULE_cohort_years);
                let _la: number;
                try {
        Severity: Major
        Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 3 hrs to fix

          Function prereq has 75 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public prereq(): PrereqContext {
                  let _localctx: PrereqContext = new PrereqContext(this._ctx, this.state);
                  this.enterRule(_localctx, 32, NusModsParser.RULE_prereq);
                  let _la: number;
                  try {
          Severity: Major
          Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 3 hrs to fix

            Function program_types has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public program_types(): Program_typesContext {
                    let _localctx: Program_typesContext = new Program_typesContext(this._ctx, this.state);
                    this.enterRule(_localctx, 2, NusModsParser.RULE_program_types);
                    let _la: number;
                    try {
            Severity: Major
            Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 2 hrs to fix

              Function op has 55 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public op(): OpContext {
                      let _localctx: OpContext = new OpContext(this._ctx, this.state);
                      this.enterRule(_localctx, 10, NusModsParser.RULE_op);
                      try {
                          this.state = 93;
              Severity: Major
              Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 2 hrs to fix

                Function compound has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public compound(): CompoundContext {
                        let _localctx: CompoundContext = new CompoundContext(this._ctx, this.state);
                        this.enterRule(_localctx, 4, NusModsParser.RULE_compound);
                        try {
                            this.state = 77;
                Severity: Major
                Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 2 hrs to fix

                  Function plan_types_condition has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public plan_types_condition(): Plan_types_conditionContext {
                          let _localctx: Plan_types_conditionContext = new Plan_types_conditionContext(this._ctx, this.state);
                          this.enterRule(_localctx, 22, NusModsParser.RULE_plan_types_condition);
                          try {
                              this.state = 138;
                  Severity: Major
                  Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 2 hrs to fix

                    Function special_condition has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public special_condition(): Special_conditionContext {
                            let _localctx: Special_conditionContext = new Special_conditionContext(this._ctx, this.state);
                            this.enterRule(_localctx, 30, NusModsParser.RULE_special_condition);
                            try {
                                this.state = 171;
                    Severity: Major
                    Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 2 hrs to fix

                      Function programs_condition has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public programs_condition(): Programs_conditionContext {
                              let _localctx: Programs_conditionContext = new Programs_conditionContext(this._ctx, this.state);
                              this.enterRule(_localctx, 16, NusModsParser.RULE_programs_condition);
                              try {
                                  this.state = 117;
                      Severity: Major
                      Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 2 hrs to fix

                        Function coreq has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public coreq(): CoreqContext {
                                let _localctx: CoreqContext = new CoreqContext(this._ctx, this.state);
                                this.enterRule(_localctx, 34, NusModsParser.RULE_coreq);
                                try {
                                    this.state = 194;
                        Severity: Minor
                        Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

                          Function overall has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public overall(): OverallContext {
                                  let _localctx: OverallContext = new OverallContext(this._ctx, this.state);
                                  this.enterRule(_localctx, 0, NusModsParser.RULE_overall);
                                  try {
                                      this.state = 55;
                          Severity: Minor
                          Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

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

                                public programs_values(): Programs_valuesContext {
                                    let _localctx: Programs_valuesContext = new Programs_valuesContext(this._ctx, this.state);
                                    this.enterRule(_localctx, 18, NusModsParser.RULE_programs_values);
                                    let _la: number;
                                    try {
                            Severity: Minor
                            Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

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

                                  public course_items(): Course_itemsContext {
                                      let _localctx: Course_itemsContext = new Course_itemsContext(this._ctx, this.state);
                                      this.enterRule(_localctx, 38, NusModsParser.RULE_course_items);
                                      let _la: number;
                                      try {
                              Severity: Minor
                              Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

                                Function plan_types has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public plan_types(): Plan_typesContext {
                                        let _localctx: Plan_typesContext = new Plan_typesContext(this._ctx, this.state);
                                        this.enterRule(_localctx, 20, NusModsParser.RULE_plan_types);
                                        let _la: number;
                                        try {
                                Severity: Minor
                                Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

                                  Function programs has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public programs(): ProgramsContext {
                                          let _localctx: ProgramsContext = new ProgramsContext(this._ctx, this.state);
                                          this.enterRule(_localctx, 14, NusModsParser.RULE_programs);
                                          let _la: number;
                                          try {
                                  Severity: Minor
                                  Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

                                    Function binop has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public binop(): BinopContext {
                                            let _localctx: BinopContext = new BinopContext(this._ctx, this.state);
                                            this.enterRule(_localctx, 6, NusModsParser.RULE_binop);
                                            try {
                                                this.state = 84;
                                    Severity: Minor
                                    Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

                                      Function subject_years has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public subject_years(): Subject_yearsContext {
                                              let _localctx: Subject_yearsContext = new Subject_yearsContext(this._ctx, this.state);
                                              this.enterRule(_localctx, 26, NusModsParser.RULE_subject_years);
                                              let _la: number;
                                              try {
                                      Severity: Minor
                                      Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

                                        Function courses has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public courses(): CoursesContext {
                                                let _localctx: CoursesContext = new CoursesContext(this._ctx, this.state);
                                                this.enterRule(_localctx, 36, NusModsParser.RULE_courses);
                                                let _la: number;
                                                try {
                                        Severity: Minor
                                        Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

                                          Function must_not_be_in has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              public must_not_be_in(): Must_not_be_inContext {
                                                  let _localctx: Must_not_be_inContext = new Must_not_be_inContext(this._ctx, this.state);
                                                  this.enterRule(_localctx, 42, NusModsParser.RULE_must_not_be_in);
                                                  let _la: number;
                                                  try {
                                          Severity: Minor
                                          Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

                                            Function must_be_in has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                public must_be_in(): Must_be_inContext {
                                                    let _localctx: Must_be_inContext = new Must_be_inContext(this._ctx, this.state);
                                                    this.enterRule(_localctx, 40, NusModsParser.RULE_must_be_in);
                                                    let _la: number;
                                                    try {
                                            Severity: Minor
                                            Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

                                              Function boolean_expr has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  public boolean_expr(): Boolean_exprContext {
                                                      let _localctx: Boolean_exprContext = new Boolean_exprContext(this._ctx, this.state);
                                                      this.enterRule(_localctx, 8, NusModsParser.RULE_boolean_expr);
                                                      let _la: number;
                                                      try {
                                              Severity: Minor
                                              Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

                                                Function special has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                    public special(): SpecialContext {
                                                        let _localctx: SpecialContext = new SpecialContext(this._ctx, this.state);
                                                        this.enterRule(_localctx, 28, NusModsParser.RULE_special);
                                                        try {
                                                            this.enterOuterAlt(_localctx, 1);
                                                Severity: Minor
                                                Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

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

                                                      public contains_number(): Contains_numberContext {
                                                          let _localctx: Contains_numberContext = new Contains_numberContext(this._ctx, this.state);
                                                          this.enterRule(_localctx, 44, NusModsParser.RULE_contains_number);
                                                          try {
                                                              this.enterOuterAlt(_localctx, 1);
                                                  Severity: Minor
                                                  Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 1 hr to fix

                                                    Function boolean_expr has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                        public boolean_expr(): Boolean_exprContext {
                                                            let _localctx: Boolean_exprContext = new Boolean_exprContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 8, NusModsParser.RULE_boolean_expr);
                                                            let _la: number;
                                                            try {
                                                    Severity: Minor
                                                    Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 55 mins to fix

                                                    Cognitive Complexity

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

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

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

                                                    Further reading

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

                                                        public prereq(): PrereqContext {
                                                            let _localctx: PrereqContext = new PrereqContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 32, NusModsParser.RULE_prereq);
                                                            let _la: number;
                                                            try {
                                                    Severity: Minor
                                                    Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 35 mins to fix

                                                    Cognitive Complexity

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

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

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

                                                    Further reading

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

                                                        public cohort_years(): Cohort_yearsContext {
                                                            let _localctx: Cohort_yearsContext = new Cohort_yearsContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 24, NusModsParser.RULE_cohort_years);
                                                            let _la: number;
                                                            try {
                                                    Severity: Minor
                                                    Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 35 mins to fix

                                                    Cognitive Complexity

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

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

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

                                                    Further reading

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

                                                        public program_types(): Program_typesContext {
                                                            let _localctx: Program_typesContext = new Program_typesContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 2, NusModsParser.RULE_program_types);
                                                            let _la: number;
                                                            try {
                                                    Severity: Minor
                                                    Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 25 mins to fix

                                                    Cognitive Complexity

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

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

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

                                                    Further reading

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

                                                        public compound(): CompoundContext {
                                                            let _localctx: CompoundContext = new CompoundContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 4, NusModsParser.RULE_compound);
                                                            try {
                                                                this.state = 77;
                                                    Severity: Minor
                                                    Found in scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts - About 25 mins to fix

                                                    Cognitive Complexity

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

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

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

                                                    Further reading

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

                                                            "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03\x1E\xE1\x04\x02" +
                                                            "\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04\x07" +
                                                            "\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04\r\t\r\x04" +
                                                            "\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t\x12\x04" +
                                                            "\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t\x17\x04" +
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsLexer.ts on lines 111..211

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

                                                    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

                                                        public programs_condition(): Programs_conditionContext {
                                                            let _localctx: Programs_conditionContext = new Programs_conditionContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 16, NusModsParser.RULE_programs_condition);
                                                            try {
                                                                this.state = 117;
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 714..766
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 921..973

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

                                                    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

                                                        public plan_types_condition(): Plan_types_conditionContext {
                                                            let _localctx: Plan_types_conditionContext = new Plan_types_conditionContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 22, NusModsParser.RULE_plan_types_condition);
                                                            try {
                                                                this.state = 138;
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 576..628
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 921..973

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

                                                    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

                                                        public special_condition(): Special_conditionContext {
                                                            let _localctx: Special_conditionContext = new Special_conditionContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 30, NusModsParser.RULE_special_condition);
                                                            try {
                                                                this.state = 171;
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 576..628
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 714..766

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

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                        public programs_values(): Programs_valuesContext {
                                                            let _localctx: Programs_valuesContext = new Programs_valuesContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 18, NusModsParser.RULE_programs_values);
                                                            let _la: number;
                                                            try {
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1147..1187

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

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                        public course_items(): Course_itemsContext {
                                                            let _localctx: Course_itemsContext = new Course_itemsContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 38, NusModsParser.RULE_course_items);
                                                            let _la: number;
                                                            try {
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 630..670

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

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                        public plan_types(): Plan_typesContext {
                                                            let _localctx: Plan_typesContext = new Plan_typesContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 20, NusModsParser.RULE_plan_types);
                                                            let _la: number;
                                                            try {
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 534..574

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

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                        public programs(): ProgramsContext {
                                                            let _localctx: ProgramsContext = new ProgramsContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 14, NusModsParser.RULE_programs);
                                                            let _la: number;
                                                            try {
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 672..712

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

                                                    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

                                                    export class Programs_valuesContext extends ParserRuleContext {
                                                        public PROGRAMS_VALUE(): TerminalNode[];
                                                        public PROGRAMS_VALUE(i: number): TerminalNode;
                                                        public PROGRAMS_VALUE(i?: number): TerminalNode | TerminalNode[] {
                                                            if (i === undefined) {
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1947..1979

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

                                                    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

                                                    export class Course_itemsContext extends ParserRuleContext {
                                                        public PROGRAMS_VALUE(): TerminalNode[];
                                                        public PROGRAMS_VALUE(i: number): TerminalNode;
                                                        public PROGRAMS_VALUE(i?: number): TerminalNode | TerminalNode[] {
                                                            if (i === undefined) {
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1660..1692

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

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                        public must_not_be_in(): Must_not_be_inContext {
                                                            let _localctx: Must_not_be_inContext = new Must_not_be_inContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 42, NusModsParser.RULE_must_not_be_in);
                                                            let _la: number;
                                                            try {
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1189..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 286.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                        public must_be_in(): Must_be_inContext {
                                                            let _localctx: Must_be_inContext = new Must_be_inContext(this._ctx, this.state);
                                                            this.enterRule(_localctx, 40, NusModsParser.RULE_must_be_in);
                                                            let _la: number;
                                                            try {
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1225..1259

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

                                                    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

                                                    export class ProgramsContext extends ParserRuleContext {
                                                        public PROGRAMS(): TerminalNode { return this.getToken(NusModsParser.PROGRAMS, 0); }
                                                        public programs_condition(): Programs_conditionContext {
                                                            return this.getRuleContext(0, Programs_conditionContext);
                                                        }
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1695..1720

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

                                                    export class Plan_typesContext extends ParserRuleContext {
                                                        public PLAN_TYPES(): TerminalNode { return this.getToken(NusModsParser.PLAN_TYPES, 0); }
                                                        public plan_types_condition(): Plan_types_conditionContext {
                                                            return this.getRuleContext(0, Plan_types_conditionContext);
                                                        }
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1607..1632

                                                    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

                                                    export class Programs_conditionContext extends ParserRuleContext {
                                                        public IF_IN(): TerminalNode | undefined { return this.tryGetToken(NusModsParser.IF_IN, 0); }
                                                        public IF_NOT_IN(): TerminalNode | undefined { return this.tryGetToken(NusModsParser.IF_NOT_IN, 0); }
                                                        public must_be_in(): Must_be_inContext | undefined {
                                                            return this.tryGetRuleContext(0, Must_be_inContext);
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1723..1745
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1846..1868

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

                                                    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

                                                    export class Plan_types_conditionContext extends ParserRuleContext {
                                                        public IF_IN(): TerminalNode | undefined { return this.tryGetToken(NusModsParser.IF_IN, 0); }
                                                        public IF_NOT_IN(): TerminalNode | undefined { return this.tryGetToken(NusModsParser.IF_NOT_IN, 0); }
                                                        public must_be_in(): Must_be_inContext | undefined {
                                                            return this.tryGetRuleContext(0, Must_be_inContext);
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1635..1657
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1846..1868

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

                                                    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

                                                    export class Special_conditionContext extends ParserRuleContext {
                                                        public IF_IN(): TerminalNode | undefined { return this.tryGetToken(NusModsParser.IF_IN, 0); }
                                                        public IF_NOT_IN(): TerminalNode | undefined { return this.tryGetToken(NusModsParser.IF_NOT_IN, 0); }
                                                        public must_be_in(): Must_be_inContext | undefined {
                                                            return this.tryGetRuleContext(0, Must_be_inContext);
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1635..1657
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1723..1745

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

                                                    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

                                                    export class Must_be_inContext extends ParserRuleContext {
                                                        public MUST_BE_IN(): TerminalNode { return this.getToken(NusModsParser.MUST_BE_IN, 0); }
                                                        public contains_number(): Contains_numberContext | undefined {
                                                            return this.tryGetRuleContext(0, Contains_numberContext);
                                                        }
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 2003..2021

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

                                                    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

                                                    export class Must_not_be_inContext extends ParserRuleContext {
                                                        public MUST_NOT_BE_IN(): TerminalNode { return this.getToken(NusModsParser.MUST_NOT_BE_IN, 0); }
                                                        public contains_number(): Contains_numberContext | undefined {
                                                            return this.tryGetRuleContext(0, Contains_numberContext);
                                                        }
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1982..2000

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

                                                    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

                                                                    {
                                                                    this.state = 175;
                                                                    this.match(NusModsParser.SUBJECTS);
                                                                    this.state = 177;
                                                                    this._errHandler.sync(this);
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1115..1130

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 134.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                                {
                                                                this.state = 196;
                                                                this.match(NusModsParser.COURSES);
                                                                this.state = 198;
                                                                this._errHandler.sync(this);
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1001..1016

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 134.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                                case 2:
                                                                    this.enterOuterAlt(_localctx, 2);
                                                                    {
                                                                    this.state = 71;
                                                                    this.match(NusModsParser.LPAREN);
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 389..399

                                                    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

                                                                case NusModsParser.LPAREN:
                                                                    this.enterOuterAlt(_localctx, 1);
                                                                    {
                                                                    this.state = 88;
                                                                    this.match(NusModsParser.LPAREN);
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 260..270

                                                    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

                                                                case NusModsParser.GPA:
                                                                    this.enterOuterAlt(_localctx, 5);
                                                                    {
                                                                    this.state = 182;
                                                                    this.match(NusModsParser.GPA);
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1018..1026

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

                                                    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

                                                                case NusModsParser.UNITS:
                                                                    this.enterOuterAlt(_localctx, 4);
                                                                    {
                                                                    this.state = 180;
                                                                    this.match(NusModsParser.UNITS);
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsParser.ts on lines 1027..1035

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

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                        public static get _ATN(): ATN {
                                                            if (!NusModsParser.__ATN) {
                                                                NusModsParser.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(NusModsParser._serializedATN));
                                                            }
                                                    
                                                    
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsLexer.ts on lines 436..442

                                                    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

                                                        private static readonly _SYMBOLIC_NAMES: Array<string | undefined> = [
                                                            undefined, "COMMA", "LPAREN", "RPAREN", "IF_IN", "MUST_BE_IN", "IF_NOT_IN", 
                                                            "MUST_NOT_BE_IN", "THEN", "AND", "OR", "PROGRAM_TYPES", "PROGRAM_TYPES_VALUE", 
                                                            "PROGRAMS", "PLAN_TYPES", "COHORT_YEARS", "SUBJECT_YEARS", "SPECIAL", 
                                                            "SPECIAL_VALUE", "COURSES", "SUBJECTS", "UNITS", "GPA", "COREQUISITE", 
                                                    scrapers/nus-v2/src/services/requisite-tree/antlr4/NusModsLexer.ts on lines 72..78

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 48.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

                                                    There are no issues that match your filters.

                                                    Category
                                                    Status