core/templates/expressions/parser.js

Summary

Maintainability
F
5 mos
Test Coverage

Function exports has a Cognitive Complexity of 2434 (exceeds 5 allowed). Consider refactoring.
Open

module.exports = (function() {
  /*
   * Generated by PEG.js 0.8.0.
   *
   * http://pegjs.majda.cz/
Severity: Minor
Found in core/templates/expressions/parser.js - About 1 mo 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 exports has 2860 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = (function() {
  /*
   * Generated by PEG.js 0.8.0.
   *
   * http://pegjs.majda.cz/
Severity: Major
Found in core/templates/expressions/parser.js - About 2 wks to fix

    Function parse has 2839 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function parse(input) {
        var options = arguments.length > 1 ? arguments[1] : {},
    
            peg$FAILED = {},
    
    
    Severity: Major
    Found in core/templates/expressions/parser.js - About 2 wks to fix

      File parser.js has 2862 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      module.exports = (function() {
        /*
         * Generated by PEG.js 0.8.0.
         *
         * http://pegjs.majda.cz/
      Severity: Major
      Found in core/templates/expressions/parser.js - About 1 wk to fix

        Function peg$parseDecimalLiteral has 126 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function peg$parseDecimalLiteral() {
              var s0, s1, s2, s3, s4, s5, s6;
        
              s0 = peg$currPos;
              s1 = peg$currPos;
        Severity: Major
        Found in core/templates/expressions/parser.js - About 5 hrs to fix

          Function peg$parseAdditiveOperator has 96 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function peg$parseAdditiveOperator() {
                var s0, s1, s2, s3;
          
                s0 = peg$currPos;
                if (input.charCodeAt(peg$currPos) === 43) {
          Severity: Major
          Found in core/templates/expressions/parser.js - About 3 hrs to fix

            Function peg$parseExpression has 93 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function peg$parseExpression() {
                  var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11;
            
                  s0 = peg$currPos;
                  if (input.substr(peg$currPos, 2) === peg$c143) {
            Severity: Major
            Found in core/templates/expressions/parser.js - About 3 hrs to fix

              Function peg$parseStringLiteral has 88 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function peg$parseStringLiteral() {
                    var s0, s1, s2, s3, s4;
              
                    peg$silentFails++;
                    s0 = peg$currPos;
              Severity: Major
              Found in core/templates/expressions/parser.js - About 3 hrs to fix

                Function peg$parseArgumentList has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function peg$parseArgumentList() {
                      var s0, s1, s2, s3, s4, s5, s6, s7;
                
                      s0 = peg$currPos;
                      s1 = peg$parseExpression();
                Severity: Major
                Found in core/templates/expressions/parser.js - About 3 hrs to fix

                  Function peg$parseEqualityExpression has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function peg$parseEqualityExpression() {
                        var s0, s1, s2, s3, s4, s5, s6, s7;
                  
                        s0 = peg$currPos;
                        s1 = peg$parseRelationalExpression();
                  Severity: Major
                  Found in core/templates/expressions/parser.js - About 3 hrs to fix

                    Function peg$parseMultiplicativeExpression has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function peg$parseMultiplicativeExpression() {
                          var s0, s1, s2, s3, s4, s5, s6, s7;
                    
                          s0 = peg$currPos;
                          s1 = peg$parseUnaryExpression();
                    Severity: Major
                    Found in core/templates/expressions/parser.js - About 3 hrs to fix

                      Function peg$parseLogicalORExpression has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function peg$parseLogicalORExpression() {
                            var s0, s1, s2, s3, s4, s5, s6, s7;
                      
                            s0 = peg$currPos;
                            s1 = peg$parseLogicalANDExpression();
                      Severity: Major
                      Found in core/templates/expressions/parser.js - About 3 hrs to fix

                        Function peg$parseAdditiveExpression has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function peg$parseAdditiveExpression() {
                              var s0, s1, s2, s3, s4, s5, s6, s7;
                        
                              s0 = peg$currPos;
                              s1 = peg$parseMultiplicativeExpression();
                        Severity: Major
                        Found in core/templates/expressions/parser.js - About 3 hrs to fix

                          Function peg$parseLogicalANDExpression has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function peg$parseLogicalANDExpression() {
                                var s0, s1, s2, s3, s4, s5, s6, s7;
                          
                                s0 = peg$currPos;
                                s1 = peg$parseEqualityExpression();
                          Severity: Major
                          Found in core/templates/expressions/parser.js - About 3 hrs to fix

                            Function peg$parseRelationalExpression has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function peg$parseRelationalExpression() {
                                  var s0, s1, s2, s3, s4, s5, s6, s7;
                            
                                  s0 = peg$currPos;
                                  s1 = peg$parseAdditiveExpression();
                            Severity: Major
                            Found in core/templates/expressions/parser.js - About 3 hrs to fix

                              Function peg$parseBooleanLiteral has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function peg$parseBooleanLiteral() {
                                    var s0, s1, s2, s3;
                              
                                    s0 = peg$currPos;
                                    if (input.substr(peg$currPos, 5) === peg$c27) {
                              Severity: Major
                              Found in core/templates/expressions/parser.js - About 2 hrs to fix

                                Function peg$parseDoubleStringCharacter has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function peg$parseDoubleStringCharacter() {
                                      var s0, s1, s2;
                                
                                      s0 = peg$currPos;
                                      s1 = peg$currPos;
                                Severity: Major
                                Found in core/templates/expressions/parser.js - About 2 hrs to fix

                                  Function peg$parseSingleStringCharacter has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function peg$parseSingleStringCharacter() {
                                        var s0, s1, s2;
                                  
                                        s0 = peg$currPos;
                                        s1 = peg$currPos;
                                  Severity: Major
                                  Found in core/templates/expressions/parser.js - About 2 hrs to fix

                                    Function peg$buildException has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function peg$buildException(message, expected, pos) {
                                          function cleanupExpected(expected) {
                                            var i = 1;
                                    
                                            expected.sort(function(a, b) {
                                    Severity: Major
                                    Found in core/templates/expressions/parser.js - About 2 hrs to fix

                                      Function peg$parsePrimaryExpression has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function peg$parsePrimaryExpression() {
                                            var s0, s1, s2, s3, s4, s5;
                                      
                                            s0 = peg$currPos;
                                            s1 = peg$parseIdentifier();
                                      Severity: Major
                                      Found in core/templates/expressions/parser.js - About 2 hrs to fix

                                        Function peg$parseMultiplicativeOperator has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            function peg$parseMultiplicativeOperator() {
                                              var s0, s1, s2, s3;
                                        
                                              s0 = peg$currPos;
                                              if (input.charCodeAt(peg$currPos) === 42) {
                                        Severity: Major
                                        Found in core/templates/expressions/parser.js - About 2 hrs to fix

                                          Function peg$parseUnicodeEscapeSequence has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              function peg$parseUnicodeEscapeSequence() {
                                                var s0, s1, s2, s3, s4, s5, s6, s7;
                                          
                                                s0 = peg$currPos;
                                                if (input.charCodeAt(peg$currPos) === 117) {
                                          Severity: Major
                                          Found in core/templates/expressions/parser.js - About 2 hrs to fix

                                            Function peg$parseArguments has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                function peg$parseArguments() {
                                                  var s0, s1, s2, s3, s4, s5;
                                            
                                                  s0 = peg$currPos;
                                                  if (input.charCodeAt(peg$currPos) === 40) {
                                            Severity: Major
                                            Found in core/templates/expressions/parser.js - About 2 hrs to fix

                                              Function peg$parseHexIntegerLiteral has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  function peg$parseHexIntegerLiteral() {
                                                    var s0, s1, s2, s3, s4, s5;
                                              
                                                    s0 = peg$currPos;
                                                    if (input.charCodeAt(peg$currPos) === 48) {
                                              Severity: Minor
                                              Found in core/templates/expressions/parser.js - About 2 hrs to fix

                                                Function peg$parseIdentifierStart has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                    function peg$parseIdentifierStart() {
                                                      var s0, s1, s2;
                                                
                                                      s0 = peg$parseUnicodeLetter();
                                                      if (s0 === peg$FAILED) {
                                                Severity: Minor
                                                Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                  Function peg$parseHexEscapeSequence has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      function peg$parseHexEscapeSequence() {
                                                        var s0, s1, s2, s3, s4, s5;
                                                  
                                                        s0 = peg$currPos;
                                                        if (input.charCodeAt(peg$currPos) === 120) {
                                                  Severity: Minor
                                                  Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                    Function peg$parseIdentifierPart has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        function peg$parseIdentifierPart() {
                                                          var s0, s1;
                                                    
                                                          s0 = peg$parseIdentifierStart();
                                                          if (s0 === peg$FAILED) {
                                                    Severity: Minor
                                                    Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                      Function peg$parseEscapeSequence has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                          function peg$parseEscapeSequence() {
                                                            var s0, s1, s2, s3;
                                                      
                                                            s0 = peg$parseCharacterEscapeSequence();
                                                            if (s0 === peg$FAILED) {
                                                      Severity: Minor
                                                      Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                        Function peg$parseLogicalOROperator has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            function peg$parseLogicalOROperator() {
                                                              var s0, s1, s2, s3;
                                                        
                                                              s0 = peg$currPos;
                                                              if (input.substr(peg$currPos, 2) === peg$c140) {
                                                        Severity: Minor
                                                        Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                          Function peg$parseLogicalANDOperator has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                              function peg$parseLogicalANDOperator() {
                                                                var s0, s1, s2, s3;
                                                          
                                                                s0 = peg$currPos;
                                                                if (input.substr(peg$currPos, 2) === peg$c137) {
                                                          Severity: Minor
                                                          Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                            Function peg$parseNumericLiteral has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                function peg$parseNumericLiteral() {
                                                                  var s0, s1, s2, s3;
                                                            
                                                                  peg$silentFails++;
                                                                  s0 = peg$currPos;
                                                            Severity: Minor
                                                            Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                              Function peg$parseRelationalOperator has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                  function peg$parseRelationalOperator() {
                                                                    var s0;
                                                              
                                                                    if (input.substr(peg$currPos, 2) === peg$c125) {
                                                                      s0 = peg$c125;
                                                              Severity: Minor
                                                              Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                                Function peg$parseIdentifier has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                    function peg$parseIdentifier() {
                                                                      var s0, s1, s2;
                                                                
                                                                      peg$silentFails++;
                                                                      s0 = peg$currPos;
                                                                Severity: Minor
                                                                Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                                  Function peg$parseCallExpression has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                      function peg$parseCallExpression() {
                                                                        var s0, s1, s2, s3, s4;
                                                                  
                                                                        s0 = peg$currPos;
                                                                        s1 = peg$parseIdentifier();
                                                                  Severity: Minor
                                                                  Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                                    Function peg$parseNullLiteral has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                        function peg$parseNullLiteral() {
                                                                          var s0, s1, s2, s3;
                                                                    
                                                                          s0 = peg$currPos;
                                                                          if (input.substr(peg$currPos, 4) === peg$c24) {
                                                                    Severity: Minor
                                                                    Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                                      Function peg$parseUnaryExpression has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                          function peg$parseUnaryExpression() {
                                                                            var s0, s1, s2, s3;
                                                                      
                                                                            s0 = peg$parseCallExpression();
                                                                            if (s0 === peg$FAILED) {
                                                                      Severity: Minor
                                                                      Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                                        Function peg$parseIdentifierName has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                            function peg$parseIdentifierName() {
                                                                              var s0, s1, s2, s3;
                                                                        
                                                                              peg$silentFails++;
                                                                              s0 = peg$currPos;
                                                                        Severity: Minor
                                                                        Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                                          Function peg$parseDecimalIntegerLiteral has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                              function peg$parseDecimalIntegerLiteral() {
                                                                                var s0, s1, s2;
                                                                          
                                                                                if (input.charCodeAt(peg$currPos) === 48) {
                                                                                  s0 = peg$c40;
                                                                          Severity: Minor
                                                                          Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                                            Function buildMessage has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                                  function buildMessage(expected, found) {
                                                                                    function stringEscape(s) {
                                                                                      function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }
                                                                            
                                                                                      return s
                                                                            Severity: Minor
                                                                            Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                                              Function peg$parseNonEscapeCharacter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                                  function peg$parseNonEscapeCharacter() {
                                                                                    var s0, s1, s2;
                                                                              
                                                                                    s0 = peg$currPos;
                                                                                    s1 = peg$currPos;
                                                                              Severity: Minor
                                                                              Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                                                Function peg$computePosDetails has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                    function peg$computePosDetails(pos) {
                                                                                      function advance(details, startPos, endPos) {
                                                                                        var p, ch;
                                                                                
                                                                                        for (p = startPos; p < endPos; p++) {
                                                                                Severity: Minor
                                                                                Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                                                  Function peg$parseUnaryOperator has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                      function peg$parseUnaryOperator() {
                                                                                        var s0;
                                                                                  
                                                                                        if (input.charCodeAt(peg$currPos) === 43) {
                                                                                          s0 = peg$c107;
                                                                                  Severity: Minor
                                                                                  Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                                                    Function peg$parseSignedInteger has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                        function peg$parseSignedInteger() {
                                                                                          var s0, s1, s2;
                                                                                    
                                                                                          s0 = peg$currPos;
                                                                                          if (peg$c48.test(input.charAt(peg$currPos))) {
                                                                                    Severity: Minor
                                                                                    Found in core/templates/expressions/parser.js - About 1 hr to fix

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                    if (peg$silentFails === 0) { peg$fail(peg$c72); }
                                                                                      Severity: Major
                                                                                      Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                      if (peg$silentFails === 0) { peg$fail(peg$c132); }
                                                                                        Severity: Major
                                                                                        Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                        if (s3 !== peg$FAILED) {
                                                                                                          s4 = peg$parse__();
                                                                                                          if (s4 !== peg$FAILED) {
                                                                                                            if (input.charCodeAt(peg$currPos) === 41) {
                                                                                                              s5 = peg$c99;
                                                                                          Severity: Major
                                                                                          Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                            Avoid deeply nested control flow statements.
                                                                                            Open

                                                                                                          if (s7 !== peg$FAILED) {
                                                                                                            s4 = [s4, s5, s6, s7];
                                                                                                            s3 = s4;
                                                                                                          } else {
                                                                                                            peg$currPos = s3;
                                                                                            Severity: Major
                                                                                            Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                              Avoid deeply nested control flow statements.
                                                                                              Open

                                                                                                            if (s6 !== peg$FAILED) {
                                                                                                              s7 = peg$parseEqualityExpression();
                                                                                                              if (s7 !== peg$FAILED) {
                                                                                                                s4 = [s4, s5, s6, s7];
                                                                                                                s3 = s4;
                                                                                              Severity: Major
                                                                                              Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

                                                                                                              if (s7 !== peg$FAILED) {
                                                                                                                s4 = [s4, s5, s6, s7];
                                                                                                                s3 = s4;
                                                                                                              } else {
                                                                                                                peg$currPos = s3;
                                                                                                Severity: Major
                                                                                                Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                  Avoid deeply nested control flow statements.
                                                                                                  Open

                                                                                                                if (s7 !== peg$FAILED) {
                                                                                                                  s4 = [s4, s5, s6, s7];
                                                                                                                  s3 = s4;
                                                                                                                } else {
                                                                                                                  peg$currPos = s3;
                                                                                                  Severity: Major
                                                                                                  Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                    Avoid deeply nested control flow statements.
                                                                                                    Open

                                                                                                                  if (peg$silentFails === 0) { peg$fail(peg$c16); }
                                                                                                    Severity: Major
                                                                                                    Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                      Avoid deeply nested control flow statements.
                                                                                                      Open

                                                                                                                    if (peg$silentFails === 0) { peg$fail(peg$c121); }
                                                                                                      Severity: Major
                                                                                                      Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                        Avoid deeply nested control flow statements.
                                                                                                        Open

                                                                                                                      if (input.substr(peg$currPos, 4) === peg$c145) {
                                                                                                                        s5 = peg$c145;
                                                                                                                        peg$currPos += 4;
                                                                                                                      } else {
                                                                                                                        s5 = peg$FAILED;
                                                                                                        Severity: Major
                                                                                                        Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                          Avoid deeply nested control flow statements.
                                                                                                          Open

                                                                                                                        if (s2 !== peg$FAILED) {
                                                                                                                          peg$reportedPos = s0;
                                                                                                                          s1 = peg$c17(s2);
                                                                                                                          s0 = s1;
                                                                                                                        } else {
                                                                                                          Severity: Major
                                                                                                          Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                            Avoid deeply nested control flow statements.
                                                                                                            Open

                                                                                                                          if (input.charCodeAt(peg$currPos) === 41) {
                                                                                                                            s5 = peg$c99;
                                                                                                                            peg$currPos++;
                                                                                                                          } else {
                                                                                                                            s5 = peg$FAILED;
                                                                                                            Severity: Major
                                                                                                            Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                              Avoid deeply nested control flow statements.
                                                                                                              Open

                                                                                                                            if (s6 !== peg$FAILED) {
                                                                                                                              s7 = peg$parseExpression();
                                                                                                                              if (s7 !== peg$FAILED) {
                                                                                                                                s4 = [s4, s5, s6, s7];
                                                                                                                                s3 = s4;
                                                                                                              Severity: Major
                                                                                                              Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                Open

                                                                                                                              if (s7 !== peg$FAILED) {
                                                                                                                                s4 = [s4, s5, s6, s7];
                                                                                                                                s3 = s4;
                                                                                                                              } else {
                                                                                                                                peg$currPos = s3;
                                                                                                                Severity: Major
                                                                                                                Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                  Open

                                                                                                                                if (s7 !== peg$FAILED) {
                                                                                                                                  s4 = [s4, s5, s6, s7];
                                                                                                                                  s3 = s4;
                                                                                                                                } else {
                                                                                                                                  peg$currPos = s3;
                                                                                                                  Severity: Major
                                                                                                                  Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                    Open

                                                                                                                                  if (input.charCodeAt(peg$currPos) === 8204) {
                                                                                                                                    s1 = peg$c18;
                                                                                                                                    peg$currPos++;
                                                                                                                                  } else {
                                                                                                                                    s1 = peg$FAILED;
                                                                                                                    Severity: Major
                                                                                                                    Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                      Open

                                                                                                                                    if (s1 !== peg$FAILED) {
                                                                                                                                      peg$reportedPos = s0;
                                                                                                                                      s1 = peg$c20();
                                                                                                                                    }
                                                                                                                      Severity: Major
                                                                                                                      Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                        Open

                                                                                                                                      if (peg$silentFails === 0) { peg$fail(peg$c104); }
                                                                                                                        Severity: Major
                                                                                                                        Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                          Open

                                                                                                                                        if (s6 !== peg$FAILED) {
                                                                                                                                          s7 = peg$parseAdditiveExpression();
                                                                                                                                          if (s7 !== peg$FAILED) {
                                                                                                                                            s4 = [s4, s5, s6, s7];
                                                                                                                                            s3 = s4;
                                                                                                                          Severity: Major
                                                                                                                          Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                            Open

                                                                                                                                          if (s6 !== peg$FAILED) {
                                                                                                                                            s7 = peg$parseLogicalANDExpression();
                                                                                                                                            if (s7 !== peg$FAILED) {
                                                                                                                                              s4 = [s4, s5, s6, s7];
                                                                                                                                              s3 = s4;
                                                                                                                            Severity: Major
                                                                                                                            Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                              Open

                                                                                                                                            if (s7 !== peg$FAILED) {
                                                                                                                                              s4 = [s4, s5, s6, s7];
                                                                                                                                              s3 = s4;
                                                                                                                                            } else {
                                                                                                                                              peg$currPos = s3;
                                                                                                                              Severity: Major
                                                                                                                              Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                Open

                                                                                                                                              if (peg$silentFails === 0) { peg$fail(peg$c59); }
                                                                                                                                Severity: Major
                                                                                                                                Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                  Open

                                                                                                                                                if (s5 !== peg$FAILED) {
                                                                                                                                                  peg$reportedPos = s0;
                                                                                                                                                  s1 = peg$c102(s3);
                                                                                                                                                  s0 = s1;
                                                                                                                                                } else {
                                                                                                                                  Severity: Major
                                                                                                                                  Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                    Open

                                                                                                                                                  if (s7 !== peg$FAILED) {
                                                                                                                                                    s4 = [s4, s5, s6, s7];
                                                                                                                                                    s3 = s4;
                                                                                                                                                  } else {
                                                                                                                                                    peg$currPos = s3;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                      Open

                                                                                                                                                    if (s6 !== peg$FAILED) {
                                                                                                                                                      s7 = peg$parseRelationalExpression();
                                                                                                                                                      if (s7 !== peg$FAILED) {
                                                                                                                                                        s4 = [s4, s5, s6, s7];
                                                                                                                                                        s3 = s4;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                        Open

                                                                                                                                                      if (s3 !== peg$FAILED) {
                                                                                                                                                        peg$reportedPos = s0;
                                                                                                                                                        s1 = peg$c106(s1, s3);
                                                                                                                                                        s0 = s1;
                                                                                                                                                      } else {
                                                                                                                                        Severity: Major
                                                                                                                                        Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                                          Function SyntaxError has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                          Open

                                                                                                                                            function SyntaxError(message, expected, found, offset, line, column) {
                                                                                                                                          Severity: Minor
                                                                                                                                          Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                            Open

                                                                                                                                                          if (s0 === peg$FAILED) {
                                                                                                                                                            s0 = peg$parseNl();
                                                                                                                                                          }
                                                                                                                                            Severity: Major
                                                                                                                                            Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                              Open

                                                                                                                                                            if (s6 !== peg$FAILED) {
                                                                                                                                                              s7 = peg$parseUnaryExpression();
                                                                                                                                                              if (s7 !== peg$FAILED) {
                                                                                                                                                                s4 = [s4, s5, s6, s7];
                                                                                                                                                                s3 = s4;
                                                                                                                                              Severity: Major
                                                                                                                                              Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                Open

                                                                                                                                                              if (s5 !== peg$FAILED) {
                                                                                                                                                                s6 = peg$parse__();
                                                                                                                                                                if (s6 !== peg$FAILED) {
                                                                                                                                                                  s7 = peg$parseExpression();
                                                                                                                                                                  if (s7 !== peg$FAILED) {
                                                                                                                                                Severity: Major
                                                                                                                                                Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                  Open

                                                                                                                                                                if (s0 === peg$FAILED) {
                                                                                                                                                                  s0 = peg$currPos;
                                                                                                                                                                  if (input.charCodeAt(peg$currPos) === 8205) {
                                                                                                                                                                    s1 = peg$c21;
                                                                                                                                                                    peg$currPos++;
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                    Open

                                                                                                                                                                  if (s6 !== peg$FAILED) {
                                                                                                                                                                    s7 = peg$parseMultiplicativeExpression();
                                                                                                                                                                    if (s7 !== peg$FAILED) {
                                                                                                                                                                      s4 = [s4, s5, s6, s7];
                                                                                                                                                                      s3 = s4;
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in core/templates/expressions/parser.js - About 45 mins to fix

                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                      Open

                                                                                                                                                                    if (s7 !== peg$FAILED) {
                                                                                                                                                                      s4 = [s4, s5, s6, s7];
                                                                                                                                                                      s3 = s4;
                                                                                                                                                                    } else {
                                                                                                                                                                      peg$currPos = s3;
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in core/templates/expressions/parser.js - About 45 mins to fix

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

                                                                                                                                                            function peg$parseLogicalANDExpression() {
                                                                                                                                                              var s0, s1, s2, s3, s4, s5, s6, s7;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$currPos;
                                                                                                                                                              s1 = peg$parseEqualityExpression();
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 5 other locations - About 3 days to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2200..2278
                                                                                                                                                        core/templates/expressions/parser.js on lines 2342..2420
                                                                                                                                                        core/templates/expressions/parser.js on lines 2523..2601
                                                                                                                                                        core/templates/expressions/parser.js on lines 2644..2722
                                                                                                                                                        core/templates/expressions/parser.js on lines 2871..2949

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                            function peg$parseLogicalORExpression() {
                                                                                                                                                              var s0, s1, s2, s3, s4, s5, s6, s7;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$currPos;
                                                                                                                                                              s1 = peg$parseLogicalANDExpression();
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 5 other locations - About 3 days to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2200..2278
                                                                                                                                                        core/templates/expressions/parser.js on lines 2342..2420
                                                                                                                                                        core/templates/expressions/parser.js on lines 2523..2601
                                                                                                                                                        core/templates/expressions/parser.js on lines 2644..2722
                                                                                                                                                        core/templates/expressions/parser.js on lines 2747..2825

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                            function peg$parseRelationalExpression() {
                                                                                                                                                              var s0, s1, s2, s3, s4, s5, s6, s7;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$currPos;
                                                                                                                                                              s1 = peg$parseAdditiveExpression();
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 5 other locations - About 3 days to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2200..2278
                                                                                                                                                        core/templates/expressions/parser.js on lines 2342..2420
                                                                                                                                                        core/templates/expressions/parser.js on lines 2644..2722
                                                                                                                                                        core/templates/expressions/parser.js on lines 2747..2825
                                                                                                                                                        core/templates/expressions/parser.js on lines 2871..2949

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                            function peg$parseAdditiveExpression() {
                                                                                                                                                              var s0, s1, s2, s3, s4, s5, s6, s7;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$currPos;
                                                                                                                                                              s1 = peg$parseMultiplicativeExpression();
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 5 other locations - About 3 days to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2200..2278
                                                                                                                                                        core/templates/expressions/parser.js on lines 2523..2601
                                                                                                                                                        core/templates/expressions/parser.js on lines 2644..2722
                                                                                                                                                        core/templates/expressions/parser.js on lines 2747..2825
                                                                                                                                                        core/templates/expressions/parser.js on lines 2871..2949

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                            function peg$parseMultiplicativeExpression() {
                                                                                                                                                              var s0, s1, s2, s3, s4, s5, s6, s7;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$currPos;
                                                                                                                                                              s1 = peg$parseUnaryExpression();
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 5 other locations - About 3 days to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2342..2420
                                                                                                                                                        core/templates/expressions/parser.js on lines 2523..2601
                                                                                                                                                        core/templates/expressions/parser.js on lines 2644..2722
                                                                                                                                                        core/templates/expressions/parser.js on lines 2747..2825
                                                                                                                                                        core/templates/expressions/parser.js on lines 2871..2949

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                            function peg$parseEqualityExpression() {
                                                                                                                                                              var s0, s1, s2, s3, s4, s5, s6, s7;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$currPos;
                                                                                                                                                              s1 = peg$parseRelationalExpression();
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 5 other locations - About 3 days to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2200..2278
                                                                                                                                                        core/templates/expressions/parser.js on lines 2342..2420
                                                                                                                                                        core/templates/expressions/parser.js on lines 2523..2601
                                                                                                                                                        core/templates/expressions/parser.js on lines 2747..2825
                                                                                                                                                        core/templates/expressions/parser.js on lines 2871..2949

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

                                                                                                                                                        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

                                                                                                                                                            function peg$parseSingleStringCharacter() {
                                                                                                                                                              var s0, s1, s2;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$currPos;
                                                                                                                                                              s1 = peg$currPos;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 2 days to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1326..1395

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

                                                                                                                                                        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

                                                                                                                                                            function peg$parseDoubleStringCharacter() {
                                                                                                                                                              var s0, s1, s2;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$currPos;
                                                                                                                                                              s1 = peg$currPos;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 2 days to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1397..1466

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

                                                                                                                                                        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

                                                                                                                                                            function peg$parseLogicalOROperator() {
                                                                                                                                                              var s0, s1, s2, s3;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$currPos;
                                                                                                                                                              if (input.substr(peg$currPos, 2) === peg$c140) {
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 1 day to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2827..2869

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

                                                                                                                                                        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

                                                                                                                                                            function peg$parseLogicalANDOperator() {
                                                                                                                                                              var s0, s1, s2, s3;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$currPos;
                                                                                                                                                              if (input.substr(peg$currPos, 2) === peg$c137) {
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 1 day to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2951..2993

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                if (s1 !== peg$FAILED) {
                                                                                                                                                                  s2 = peg$currPos;
                                                                                                                                                                  peg$silentFails++;
                                                                                                                                                                  if (input.charCodeAt(peg$currPos) === 45) {
                                                                                                                                                                    s3 = peg$c109;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 1 day to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2433..2470

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                              if (s1 !== peg$FAILED) {
                                                                                                                                                                s2 = peg$currPos;
                                                                                                                                                                peg$silentFails++;
                                                                                                                                                                if (input.charCodeAt(peg$currPos) === 43) {
                                                                                                                                                                  s3 = peg$c107;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 1 day to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2480..2517

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                  if (s4 !== peg$FAILED) {
                                                                                                                                                                    if (input.charCodeAt(peg$currPos) === 44) {
                                                                                                                                                                      s5 = peg$c103;
                                                                                                                                                                      peg$currPos++;
                                                                                                                                                                    } else {
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 1 day to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2050..2080

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                if (s4 !== peg$FAILED) {
                                                                                                                                                                  if (input.charCodeAt(peg$currPos) === 44) {
                                                                                                                                                                    s5 = peg$c103;
                                                                                                                                                                    peg$currPos++;
                                                                                                                                                                  } else {
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 1 day to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2085..2115

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                              if (s2 !== peg$FAILED) {
                                                                                                                                                                s3 = peg$parseDoubleStringCharacters();
                                                                                                                                                                if (s3 === peg$FAILED) {
                                                                                                                                                                  s3 = peg$c37;
                                                                                                                                                                }
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 7 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1237..1264

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                if (s2 !== peg$FAILED) {
                                                                                                                                                                  s3 = peg$parseSingleStringCharacters();
                                                                                                                                                                  if (s3 === peg$FAILED) {
                                                                                                                                                                    s3 = peg$c37;
                                                                                                                                                                  }
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 7 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1200..1227

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                      if (s3 !== peg$FAILED) {
                                                                                                                                                                        s4 = peg$parse__();
                                                                                                                                                                        if (s4 !== peg$FAILED) {
                                                                                                                                                                          if (input.charCodeAt(peg$currPos) === 41) {
                                                                                                                                                                            s5 = peg$c99;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 7 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2003..2028

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                  if (s3 !== peg$FAILED) {
                                                                                                                                                                    s4 = peg$parse__();
                                                                                                                                                                    if (s4 !== peg$FAILED) {
                                                                                                                                                                      if (input.charCodeAt(peg$currPos) === 41) {
                                                                                                                                                                        s5 = peg$c99;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 7 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1907..1932

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                              if (s1 !== peg$FAILED) {
                                                                                                                                                                s2 = peg$currPos;
                                                                                                                                                                peg$silentFails++;
                                                                                                                                                                s3 = peg$parseIdentifierPart();
                                                                                                                                                                peg$silentFails--;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 3 other locations - About 5 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 740..762
                                                                                                                                                        core/templates/expressions/parser.js on lines 772..794
                                                                                                                                                        core/templates/expressions/parser.js on lines 1481..1503

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                if (s1 !== peg$FAILED) {
                                                                                                                                                                  s2 = peg$currPos;
                                                                                                                                                                  peg$silentFails++;
                                                                                                                                                                  s3 = peg$parseDecimalDigit();
                                                                                                                                                                  peg$silentFails--;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 3 other locations - About 5 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 702..724
                                                                                                                                                        core/templates/expressions/parser.js on lines 740..762
                                                                                                                                                        core/templates/expressions/parser.js on lines 772..794

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                              if (s1 !== peg$FAILED) {
                                                                                                                                                                s2 = peg$currPos;
                                                                                                                                                                peg$silentFails++;
                                                                                                                                                                s3 = peg$parseIdentifierPart();
                                                                                                                                                                peg$silentFails--;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 3 other locations - About 5 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 702..724
                                                                                                                                                        core/templates/expressions/parser.js on lines 772..794
                                                                                                                                                        core/templates/expressions/parser.js on lines 1481..1503

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                if (s1 !== peg$FAILED) {
                                                                                                                                                                  s2 = peg$currPos;
                                                                                                                                                                  peg$silentFails++;
                                                                                                                                                                  s3 = peg$parseIdentifierPart();
                                                                                                                                                                  peg$silentFails--;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 3 other locations - About 5 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 702..724
                                                                                                                                                        core/templates/expressions/parser.js on lines 740..762
                                                                                                                                                        core/templates/expressions/parser.js on lines 1481..1503

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                              if (s0 === peg$FAILED) {
                                                                                                                                                                if (input.charCodeAt(peg$currPos) === 45) {
                                                                                                                                                                  s0 = peg$c109;
                                                                                                                                                                  peg$currPos++;
                                                                                                                                                                } else {
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 3 other locations - About 5 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1584..1601
                                                                                                                                                        core/templates/expressions/parser.js on lines 2291..2308
                                                                                                                                                        core/templates/expressions/parser.js on lines 2621..2638

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                if (s0 === peg$FAILED) {
                                                                                                                                                                  if (input.charCodeAt(peg$currPos) === 60) {
                                                                                                                                                                    s0 = peg$c129;
                                                                                                                                                                    peg$currPos++;
                                                                                                                                                                  } else {
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 3 other locations - About 5 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1584..1601
                                                                                                                                                        core/templates/expressions/parser.js on lines 2178..2195
                                                                                                                                                        core/templates/expressions/parser.js on lines 2291..2308

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                if (s0 === peg$FAILED) {
                                                                                                                                                                  if (input.charCodeAt(peg$currPos) === 120) {
                                                                                                                                                                    s0 = peg$c69;
                                                                                                                                                                    peg$currPos++;
                                                                                                                                                                  } else {
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 3 other locations - About 5 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 2178..2195
                                                                                                                                                        core/templates/expressions/parser.js on lines 2291..2308
                                                                                                                                                        core/templates/expressions/parser.js on lines 2621..2638

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                              if (s1 === peg$FAILED) {
                                                                                                                                                                if (input.charCodeAt(peg$currPos) === 47) {
                                                                                                                                                                  s1 = peg$c116;
                                                                                                                                                                  peg$currPos++;
                                                                                                                                                                } else {
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 3 other locations - About 5 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1584..1601
                                                                                                                                                        core/templates/expressions/parser.js on lines 2178..2195
                                                                                                                                                        core/templates/expressions/parser.js on lines 2621..2638

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

                                                                                                                                                        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

                                                                                                                                                            function peg$parseSingleStringCharacters() {
                                                                                                                                                              var s0, s1, s2;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$currPos;
                                                                                                                                                              s1 = [];
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 5 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1280..1301

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

                                                                                                                                                        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

                                                                                                                                                            function peg$parseDoubleStringCharacters() {
                                                                                                                                                              var s0, s1, s2;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$currPos;
                                                                                                                                                              s1 = [];
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 5 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1303..1324

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                  if (s3 !== peg$FAILED) {
                                                                                                                                                                    s4 = peg$parseExponentPart();
                                                                                                                                                                    if (s4 === peg$FAILED) {
                                                                                                                                                                      s4 = peg$c37;
                                                                                                                                                                    }
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 3 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 985..1000

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                if (s1 !== peg$FAILED) {
                                                                                                                                                                  s2 = peg$parseDecimalDigits();
                                                                                                                                                                  if (s2 === peg$FAILED) {
                                                                                                                                                                    s2 = peg$c37;
                                                                                                                                                                  }
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 3 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 941..956

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

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

                                                                                                                                                            function peg$parseLm() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c76.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parseLo() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c78.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parsePc() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c92.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parseZs() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c94.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853

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

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

                                                                                                                                                            function peg$parseLl() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c74.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parseNonZeroDigit() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c44.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parseLu() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c82.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parseMc() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c84.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parseNd() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c88.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parseExponentIndicator() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c46.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parseDecimalDigit() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c42.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parseLt() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c80.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parseNl() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c90.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parseHexDigit() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c53.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1799..1811
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

                                                                                                                                                            function peg$parseMn() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              if (peg$c86.test(input.charAt(peg$currPos))) {
                                                                                                                                                                s0 = input.charAt(peg$currPos);
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 14 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1023..1035
                                                                                                                                                        core/templates/expressions/parser.js on lines 1037..1049
                                                                                                                                                        core/templates/expressions/parser.js on lines 1073..1085
                                                                                                                                                        core/templates/expressions/parser.js on lines 1173..1185
                                                                                                                                                        core/templates/expressions/parser.js on lines 1715..1727
                                                                                                                                                        core/templates/expressions/parser.js on lines 1729..1741
                                                                                                                                                        core/templates/expressions/parser.js on lines 1743..1755
                                                                                                                                                        core/templates/expressions/parser.js on lines 1757..1769
                                                                                                                                                        core/templates/expressions/parser.js on lines 1771..1783
                                                                                                                                                        core/templates/expressions/parser.js on lines 1785..1797
                                                                                                                                                        core/templates/expressions/parser.js on lines 1813..1825
                                                                                                                                                        core/templates/expressions/parser.js on lines 1827..1839
                                                                                                                                                        core/templates/expressions/parser.js on lines 1841..1853
                                                                                                                                                        core/templates/expressions/parser.js on lines 1855..1867

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                              if (s1 !== peg$FAILED) {
                                                                                                                                                                s2 = peg$parseDecimalDigits();
                                                                                                                                                                if (s2 !== peg$FAILED) {
                                                                                                                                                                  s1 = [s1, s2];
                                                                                                                                                                  s0 = s1;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 2 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1056..1068
                                                                                                                                                        core/templates/expressions/parser.js on lines 1622..1634

                                                                                                                                                        Duplicated Code

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

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

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

                                                                                                                                                        Tuning

                                                                                                                                                        This issue has a mass of 85.

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                if (s4 !== peg$FAILED) {
                                                                                                                                                                  s5 = peg$parseHexDigit();
                                                                                                                                                                  if (s5 !== peg$FAILED) {
                                                                                                                                                                    s4 = [s4, s5];
                                                                                                                                                                    s3 = s4;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 2 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1056..1068
                                                                                                                                                        core/templates/expressions/parser.js on lines 1101..1113

                                                                                                                                                        Duplicated Code

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

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

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

                                                                                                                                                        Tuning

                                                                                                                                                        This issue has a mass of 85.

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                              if (s1 !== peg$FAILED) {
                                                                                                                                                                s2 = peg$parseSignedInteger();
                                                                                                                                                                if (s2 !== peg$FAILED) {
                                                                                                                                                                  s1 = [s1, s2];
                                                                                                                                                                  s0 = s1;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 2 other locations - About 2 hrs to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 1101..1113
                                                                                                                                                        core/templates/expressions/parser.js on lines 1622..1634

                                                                                                                                                        Duplicated Code

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

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

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

                                                                                                                                                        Tuning

                                                                                                                                                        This issue has a mass of 85.

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                                  if (s0 === peg$FAILED) {
                                                                                                                                                                    s0 = peg$parseLm();
                                                                                                                                                                    if (s0 === peg$FAILED) {
                                                                                                                                                                      s0 = peg$parseLo();
                                                                                                                                                                      if (s0 === peg$FAILED) {
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 1 hr to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 678..686

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

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                              if (s0 === peg$FAILED) {
                                                                                                                                                                s0 = peg$parseBooleanLiteral();
                                                                                                                                                                if (s0 === peg$FAILED) {
                                                                                                                                                                  s0 = peg$parseNumericLiteral();
                                                                                                                                                                  if (s0 === peg$FAILED) {
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in core/templates/expressions/parser.js and 1 other location - About 1 hr to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 637..645

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

                                                                                                                                                        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

                                                                                                                                                            function peg$parseCharacterEscapeSequence() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$parseSingleEscapeCharacter();
                                                                                                                                                              if (s0 === peg$FAILED) {
                                                                                                                                                        Severity: Minor
                                                                                                                                                        Found in core/templates/expressions/parser.js and 2 other locations - About 35 mins to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 652..661
                                                                                                                                                        core/templates/expressions/parser.js on lines 663..672

                                                                                                                                                        Duplicated Code

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

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

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

                                                                                                                                                        Tuning

                                                                                                                                                        This issue has a mass of 47.

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                            function peg$parseUnicodeCombiningMark() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$parseMn();
                                                                                                                                                              if (s0 === peg$FAILED) {
                                                                                                                                                        Severity: Minor
                                                                                                                                                        Found in core/templates/expressions/parser.js and 2 other locations - About 35 mins to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 663..672
                                                                                                                                                        core/templates/expressions/parser.js on lines 1515..1524

                                                                                                                                                        Duplicated Code

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

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

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

                                                                                                                                                        Tuning

                                                                                                                                                        This issue has a mass of 47.

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

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

                                                                                                                                                            function peg$parseReservedWord() {
                                                                                                                                                              var s0;
                                                                                                                                                        
                                                                                                                                                              s0 = peg$parseNullLiteral();
                                                                                                                                                              if (s0 === peg$FAILED) {
                                                                                                                                                        Severity: Minor
                                                                                                                                                        Found in core/templates/expressions/parser.js and 2 other locations - About 35 mins to fix
                                                                                                                                                        core/templates/expressions/parser.js on lines 652..661
                                                                                                                                                        core/templates/expressions/parser.js on lines 1515..1524

                                                                                                                                                        Duplicated Code

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

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

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

                                                                                                                                                        Tuning

                                                                                                                                                        This issue has a mass of 47.

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

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

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

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

                                                                                                                                                        Refactorings

                                                                                                                                                        Further Reading

                                                                                                                                                        There are no issues that match your filters.

                                                                                                                                                        Category
                                                                                                                                                        Status