d4l3k/WebSync

View on GitHub
assets/lib/display-latex.user.js

Summary

Maintainability
F
2 wks
Test Coverage

File display-latex.user.js has 1766 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// This script was automatically generated from a literate source.
// Do not edit this file; look at the literate source instead!
//
// Greasemonkey user script to
// Display LaTeX in Web pages by transforming to MathML
Severity: Major
Found in assets/lib/display-latex.user.js - About 4 days to fix

    Function v_subexpr_to_mathml has a Cognitive Complexity of 100 (exceeds 5 allowed). Consider refactoring.
    Open

    function v_subexpr_to_mathml (tokens ) {
     var v_result = null ;
     var v_mmultiscripts = null ;
     var v_mprescripts = null ;
     if( ( ( tokens.list[tokens.length<=tokens.index+ 0 ? tokens.length-1 : tokens.index+ 0 ]
    Severity: Minor
    Found in assets/lib/display-latex.user.js - About 2 days 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

    g_tex_commands has 47 functions (exceeds 20 allowed). Consider refactoring.
    Open

    = { "\\frac" : v_fraction_to_mathml ,
    "\\dfrac" : v_fraction_to_mathml ,
    "\\tfrac" : v_fraction_to_mathml ,
    "\\binom" : v_binom_to_mathml ,
    "\\sqrt" : v_sqrt_to_mathml ,
    Severity: Minor
    Found in assets/lib/display-latex.user.js - About 6 hrs to fix

      Function v_subexpr_to_mathml has 131 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function v_subexpr_to_mathml (tokens ) {
       var v_result = null ;
       var v_mmultiscripts = null ;
       var v_mprescripts = null ;
       if( ( ( tokens.list[tokens.length<=tokens.index+ 0 ? tokens.length-1 : tokens.index+ 0 ]
      Severity: Major
      Found in assets/lib/display-latex.user.js - About 5 hrs to fix

        Function tokenize_latex_math has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

        function tokenize_latex_math(input)
        {
          var result = new Array();
          var in_text_mode = 0;
          var brace_level = [];
        Severity: Minor
        Found in assets/lib/display-latex.user.js - About 4 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function v_piece_to_mathml has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function v_piece_to_mathml (tokens ) {
         var v_token = tokens.list[tokens.index] ;
         var v_result = null ;
         if( ( v_token == "{" ) ) {
          tokens.index++;
        Severity: Major
        Found in assets/lib/display-latex.user.js - About 2 hrs to fix

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

          function patch_img(node)
          {
          
              if(node.currentTarget)
              node = node.currentTarget;
          Severity: Minor
          Found in assets/lib/display-latex.user.js - About 2 hrs to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function patch_img has 61 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function patch_img(node)
          {
          
              if(node.currentTarget)
              node = node.currentTarget;
          Severity: Major
          Found in assets/lib/display-latex.user.js - About 2 hrs to fix

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

            function tokenize_latex_math(input)
            {
              var result = new Array();
              var in_text_mode = 0;
              var brace_level = [];
            Severity: Minor
            Found in assets/lib/display-latex.user.js - About 2 hrs to fix

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

              function patch_element(node)
              {
                if(node.nodeType == node.TEXT_NODE)
                  patch_text(node);
                else if(node.nodeType == node.ELEMENT_NODE) {    if(node.tagName == 'TEXTAREA' || node.tagName == 'textarea' ||
              Severity: Minor
              Found in assets/lib/display-latex.user.js - About 1 hr to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function v_subexpr_chain_to_mathml has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function v_subexpr_chain_to_mathml (tokens , v_stop_tokens ) {
               var v_result = null ;
               var v_mrow = null ;
               var v_mfrac = null ;
               var v_wrapped_result = null ;
              Severity: Minor
              Found in assets/lib/display-latex.user.js - About 1 hr to fix

                Function v_read_delimiter has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function v_read_delimiter (tokens ) {
                 var v_token = tokens.list[tokens.index] ;
                 if( ( v_token == null ) ) {
                  throw "unexpected eof" ;
                 }
                Severity: Minor
                Found in assets/lib/display-latex.user.js - About 1 hr to fix

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

                  function v_piece_to_mathml (tokens ) {
                   var v_token = tokens.list[tokens.index] ;
                   var v_result = null ;
                   if( ( v_token == "{" ) ) {
                    tokens.index++;
                  Severity: Minor
                  Found in assets/lib/display-latex.user.js - About 1 hr to fix

                  Cognitive Complexity

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

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

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

                  Further reading

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

                  function v_text_to_mathml (tokens ) {
                   if( ( tokens.list[tokens.index] != "{" ) ) {
                    var v_result = result_element( "mtext" ,0 , tokens.list[tokens.index] ) ;
                    tokens.index++;
                    return v_result ;
                  Severity: Minor
                  Found in assets/lib/display-latex.user.js - About 1 hr to fix

                    Function v_subexpr_chain_to_mathml has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function v_subexpr_chain_to_mathml (tokens , v_stop_tokens ) {
                     var v_result = null ;
                     var v_mrow = null ;
                     var v_mfrac = null ;
                     var v_wrapped_result = null ;
                    Severity: Minor
                    Found in assets/lib/display-latex.user.js - About 1 hr to fix

                    Cognitive Complexity

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

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

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

                    Further reading

                    Function v_array_to_mathml has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function v_array_to_mathml (tokens ) {
                     var v_mtable = result_element( "mtable" ,0) ;
                     if( ( tokens.list[tokens.index] == "{" ) ) {
                      tokens.index++;
                      while( ( ( tokens.list[tokens.index] != null )  &&  ( tokens.list[tokens.index] != "}" ) ) ) {
                    Severity: Minor
                    Found in assets/lib/display-latex.user.js - About 1 hr to fix

                    Cognitive Complexity

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

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

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

                    Further reading

                    Function v_text_to_mathml has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function v_text_to_mathml (tokens ) {
                     if( ( tokens.list[tokens.index] != "{" ) ) {
                      var v_result = result_element( "mtext" ,0 , tokens.list[tokens.index] ) ;
                      tokens.index++;
                      return v_result ;
                    Severity: Minor
                    Found in assets/lib/display-latex.user.js - About 1 hr to fix

                    Cognitive Complexity

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

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

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

                    Further reading

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

                    function patch_text(node0)
                    {
                      var text = node0.nodeValue;
                      var results = /\$[^$]+\$|\[tex\](.+?)\[\/tex\]/.exec(text);
                    
                    
                    Severity: Minor
                    Found in assets/lib/display-latex.user.js - About 1 hr to fix

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

                      function v_matrix_to_mtable (tokens , v_mtable ) {
                       var v_mtr = result_element( "mtr" ,0) ;
                       var v_mtd = result_element( "mtd" ,0) ;
                       var v_token = tokens.list[tokens.index] ;
                       result_element_append( v_mtable , v_mtr );
                      Severity: Minor
                      Found in assets/lib/display-latex.user.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                         if( ( ( tokens.list[tokens.length<=tokens.index+ 0 ? tokens.length-1 : tokens.index+ 0 ]
                        == "{" )  &&  ( tokens.list[tokens.length<=tokens.index+ 1 ? tokens.length-1 : tokens.index+ 1 ]
                        == "}" )  &&  ( ( tokens.list[tokens.length<=tokens.index+ 2 ? tokens.length-1 : tokens.index+ 2 ]
                        == "_" )  ||  ( tokens.list[tokens.length<=tokens.index+ 2 ? tokens.length-1 : tokens.index+ 2 ]
                        == "^" ) ) ) ) {
                        Severity: Major
                        Found in assets/lib/display-latex.user.js - About 1 hr to fix

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

                          function fix_mathvariant(node, style)
                          {
                            if(node.nodeType == node.TEXT_NODE) {
                              if(style != null && style != '' && style in char_map) {
                                node.data = node.data.replace(uppercase_re,
                          Severity: Minor
                          Found in assets/lib/display-latex.user.js - About 55 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

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

                          function result_element(tag, num_attrs)
                          {
                            var node = document.createElementNS(mmlns, tag);
                          
                            var k = 2;
                          Severity: Minor
                          Found in assets/lib/display-latex.user.js - About 55 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

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

                          function v_read_delimiter (tokens ) {
                           var v_token = tokens.list[tokens.index] ;
                           if( ( v_token == null ) ) {
                            throw "unexpected eof" ;
                           }
                          Severity: Minor
                          Found in assets/lib/display-latex.user.js - About 55 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

                          Function patch_text has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function patch_text(node0)
                          {
                            var text = node0.nodeValue;
                            var results = /\$[^$]+\$|\[tex\](.+?)\[\/tex\]/.exec(text);
                          
                          
                          Severity: Minor
                          Found in assets/lib/display-latex.user.js - About 45 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

                          Function v_collect_invisible_group has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function v_collect_invisible_group (tokens , v_stop_tokens ) {
                           var v_result = v_subexpr_to_mathml (tokens ) ;
                           var v_mrow = null ;
                           while( ( ( tokens.list[tokens.index] != null )  &&  !( ( tokens.list[tokens.index] in v_stop_tokens ) )  &&  ( ( tokens.list[tokens.index] in g_named_identifiers
                          )  ||  ( tokens.list[tokens.index] in g_left_delimiters
                          Severity: Minor
                          Found in assets/lib/display-latex.user.js - About 45 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

                          Consider simplifying this complex logical expression.
                          Open

                            else if(node.nodeType == node.ELEMENT_NODE) {    if(node.tagName == 'TEXTAREA' || node.tagName == 'textarea' ||
                                 node.tagName == 'INPUT' || node.tagName == 'input' ||
                                 node.tagName == 'SCRIPT' || node.tagName == 'script')
                                return;
                          Severity: Major
                          Found in assets/lib/display-latex.user.js - About 40 mins to fix

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

                            function v_matrix_to_mathml (tokens , v_open_delim , v_close_delim ) {
                             var v_mtable = v_matrix_to_mtable (tokens , result_element( "mtable" ,0) ) ;
                             if( ( ( v_open_delim != null )  ||  ( v_close_delim != null ) ) ) {
                              var v_mrow = result_element( "mrow" ,0) ;
                              if( ( v_open_delim != null ) ) {
                            Severity: Minor
                            Found in assets/lib/display-latex.user.js - About 35 mins to fix

                            Cognitive Complexity

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

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

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

                            Further reading

                            Avoid too many return statements within this function.
                            Open

                              return g_left_delimiters
                            [ v_token ] ;
                            Severity: Major
                            Found in assets/lib/display-latex.user.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                return g_right_delimiters
                              [ v_token ] ;
                              Severity: Major
                              Found in assets/lib/display-latex.user.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                  return g_operator_symbols
                                [ v_token ] ;
                                Severity: Major
                                Found in assets/lib/display-latex.user.js - About 30 mins to fix

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

                                  function v_font_to_mathml (tokens , v_font_name ) {
                                   if( ( tokens.list[tokens.index] != "{" ) ) {
                                    var v_result = result_element( "mi" , 1
                                  , "mathvariant" , v_font_name , tokens.list[tokens.index] ) ;
                                    if( ( v_font_name == "normal" ) ) {
                                  Severity: Minor
                                  Found in assets/lib/display-latex.user.js - About 25 mins to fix

                                  Cognitive Complexity

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

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

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

                                  Further reading

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

                                  function v_collect_precedence_group (tokens , v_operators , v_stop_tokens , v_reader ) {
                                   var v_result = v_reader (tokens , v_stop_tokens ) ;
                                   var v_mrow = null ;
                                   while( ( ( tokens.list[tokens.index] != null )  &&  !( ( tokens.list[tokens.index] in v_stop_tokens ) )  &&  ( tokens.list[tokens.index] in v_operators ) ) ) {
                                    if( ( v_mrow == null ) ) {
                                  Severity: Minor
                                  Found in assets/lib/display-latex.user.js - About 25 mins to fix

                                  Cognitive Complexity

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

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

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

                                  Further reading

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

                                   while( ( ( tokens.list[tokens.length<=tokens.index+ 0 ? tokens.length-1 : tokens.index+ 0 ]
                                  == "{" )  &&  ( tokens.list[tokens.length<=tokens.index+ 1 ? tokens.length-1 : tokens.index+ 1 ]
                                  == "}" )  &&  ( ( tokens.list[tokens.length<=tokens.index+ 2 ? tokens.length-1 : tokens.index+ 2 ]
                                  == "_" )  ||  ( tokens.list[tokens.length<=tokens.index+ 2 ? tokens.length-1 : tokens.index+ 2 ]
                                  == "^" ) ) ) ) {
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 2 other locations - About 1 day to fix
                                  assets/lib/display-latex.user.js on lines 1323..1359
                                  assets/lib/display-latex.user.js on lines 1331..1358

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

                                  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( ( ( tokens.list[tokens.length<=tokens.index+ 0 ? tokens.length-1 : tokens.index+ 0 ]
                                  == "{" )  &&  ( tokens.list[tokens.length<=tokens.index+ 1 ? tokens.length-1 : tokens.index+ 1 ]
                                  == "}" )  &&  ( ( tokens.list[tokens.length<=tokens.index+ 2 ? tokens.length-1 : tokens.index+ 2 ]
                                  == "_" )  ||  ( tokens.list[tokens.length<=tokens.index+ 2 ? tokens.length-1 : tokens.index+ 2 ]
                                  == "^" ) ) ) ) {
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 2 other locations - About 1 day to fix
                                  assets/lib/display-latex.user.js on lines 1331..1358
                                  assets/lib/display-latex.user.js on lines 1402..1437

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

                                  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

                                    while( ( ( tokens.list[tokens.length<=tokens.index+ 0 ? tokens.length-1 : tokens.index+ 0 ]
                                  == "{" )  &&  ( tokens.list[tokens.length<=tokens.index+ 1 ? tokens.length-1 : tokens.index+ 1 ]
                                  == "}" )  &&  ( ( tokens.list[tokens.length<=tokens.index+ 2 ? tokens.length-1 : tokens.index+ 2 ]
                                  == "_" )  ||  ( tokens.list[tokens.length<=tokens.index+ 2 ? tokens.length-1 : tokens.index+ 2 ]
                                  == "^" ) ) ) ) {
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 2 other locations - About 1 day to fix
                                  assets/lib/display-latex.user.js on lines 1323..1359
                                  assets/lib/display-latex.user.js on lines 1402..1437

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

                                  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

                                    try {
                                      var mrow = v_subexpr_chain_to_mathml(tokens, {});
                                      fix_mathvariant(mrow, null);
                                  
                                      mathml = document.createElementNS(mmlns, 'math');
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 1 other location - About 4 hrs to fix
                                  assets/lib/display-latex.user.js on lines 1841..1854

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

                                  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

                                    try {
                                      var mrow = v_subexpr_chain_to_mathml(tokens, {});
                                      fix_mathvariant(mrow, null);
                                  
                                      mathml = document.createElementNS(mmlns, 'math');
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 1 other location - About 4 hrs to fix
                                  assets/lib/display-latex.user.js on lines 1803..1816

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

                                  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

                                     if( ( tokens.list[tokens.index] == "_" ) ) {
                                      tokens.index++;
                                       v_subscript = v_piece_to_mathml (tokens ) ;
                                     }
                                     else if( ( tokens.list[tokens.index] == "^" ) ) {
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 5 other locations - About 2 hrs to fix
                                  assets/lib/display-latex.user.js on lines 1340..1347
                                  assets/lib/display-latex.user.js on lines 1381..1388
                                  assets/lib/display-latex.user.js on lines 1389..1396
                                  assets/lib/display-latex.user.js on lines 1419..1426
                                  assets/lib/display-latex.user.js on lines 1427..1434

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

                                  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

                                    if( ( tokens.list[tokens.index] == "_" ) ) {
                                     tokens.index++;
                                      v_subscript = v_piece_to_mathml (tokens ) ;
                                    }
                                    else if( ( tokens.list[tokens.index] == "^" ) ) {
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 5 other locations - About 2 hrs to fix
                                  assets/lib/display-latex.user.js on lines 1340..1347
                                  assets/lib/display-latex.user.js on lines 1348..1355
                                  assets/lib/display-latex.user.js on lines 1381..1388
                                  assets/lib/display-latex.user.js on lines 1389..1396
                                  assets/lib/display-latex.user.js on lines 1427..1434

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

                                  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

                                     if( ( tokens.list[tokens.index] == "_" ) ) {
                                      tokens.index++;
                                       v_subscript = v_piece_to_mathml (tokens ) ;
                                     }
                                     else if( ( tokens.list[tokens.index] == "^" ) ) {
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 5 other locations - About 2 hrs to fix
                                  assets/lib/display-latex.user.js on lines 1348..1355
                                  assets/lib/display-latex.user.js on lines 1381..1388
                                  assets/lib/display-latex.user.js on lines 1389..1396
                                  assets/lib/display-latex.user.js on lines 1419..1426
                                  assets/lib/display-latex.user.js on lines 1427..1434

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

                                  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

                                   if( ( tokens.list[tokens.index] == "_" ) ) {
                                    tokens.index++;
                                     v_subscript = v_piece_to_mathml (tokens ) ;
                                   }
                                   else if( ( tokens.list[tokens.index] == "^" ) ) {
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 5 other locations - About 2 hrs to fix
                                  assets/lib/display-latex.user.js on lines 1340..1347
                                  assets/lib/display-latex.user.js on lines 1348..1355
                                  assets/lib/display-latex.user.js on lines 1381..1388
                                  assets/lib/display-latex.user.js on lines 1419..1426
                                  assets/lib/display-latex.user.js on lines 1427..1434

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

                                  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

                                    if( ( tokens.list[tokens.index] == "_" ) ) {
                                     tokens.index++;
                                      v_subscript = v_piece_to_mathml (tokens ) ;
                                    }
                                    else if( ( tokens.list[tokens.index] == "^" ) ) {
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 5 other locations - About 2 hrs to fix
                                  assets/lib/display-latex.user.js on lines 1340..1347
                                  assets/lib/display-latex.user.js on lines 1348..1355
                                  assets/lib/display-latex.user.js on lines 1381..1388
                                  assets/lib/display-latex.user.js on lines 1389..1396
                                  assets/lib/display-latex.user.js on lines 1419..1426

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

                                  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

                                   if( ( tokens.list[tokens.index] == "_" ) ) {
                                    tokens.index++;
                                     v_subscript = v_piece_to_mathml (tokens ) ;
                                   }
                                   else if( ( tokens.list[tokens.index] == "^" ) ) {
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 5 other locations - About 2 hrs to fix
                                  assets/lib/display-latex.user.js on lines 1340..1347
                                  assets/lib/display-latex.user.js on lines 1348..1355
                                  assets/lib/display-latex.user.js on lines 1389..1396
                                  assets/lib/display-latex.user.js on lines 1419..1426
                                  assets/lib/display-latex.user.js on lines 1427..1434

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

                                  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

                                  var g_punct_and_space
                                  = { "\\quad" : "\u2003" ,
                                  "\\qquad" : "\u2003\u2003" ,
                                  "\\thickspace" : "\u2002" ,
                                  "\\;" : "\u2002" ,
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 1 other location - About 1 hr to fix
                                  assets/lib/mathquill.js on lines 3798..3812

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

                                  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( ( v_mrow != null ) ) {
                                     result_element_append( v_mrow , v_node );
                                    }
                                    else if( ( v_result != null ) ) {
                                      v_mrow = result_element( "mrow" ,0 , v_result , v_node ) ;
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 1 other location - About 1 hr to fix
                                  assets/lib/display-latex.user.js on lines 1478..1487

                                  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

                                  var g_left_delimiters
                                  = { "(" : "(" ,
                                  "[" : "[" ,
                                  "\\{" : "{" ,
                                  "\\lgroup" : "(" ,
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 1 other location - About 1 hr to fix
                                  assets/lib/display-latex.user.js on lines 211..224

                                  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( ( v_mrow != null ) ) {
                                      result_element_append( v_mrow , v_node );
                                     }
                                     else if( ( v_result != null ) ) {
                                       v_mrow = result_element( "mrow" ,0 , v_result , v_node ) ;
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 1 other location - About 1 hr to fix
                                  assets/lib/display-latex.user.js on lines 1125..1134

                                  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

                                  var g_right_delimiters
                                  = { ")" : ")" ,
                                  "]" : "]" ,
                                  "\\}" : "}" ,
                                  "\\rbrace" : "}" ,
                                  Severity: Major
                                  Found in assets/lib/display-latex.user.js and 1 other location - About 1 hr to fix
                                  assets/lib/display-latex.user.js on lines 197..210

                                  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

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

                                        if(previous &&
                                           previous.nodeType == node.TEXT_NODE &&
                                           !non_whitespace.test(previous.data))
                                          previous = previous.previousSibling;
                                  Severity: Minor
                                  Found in assets/lib/display-latex.user.js and 1 other location - About 40 mins to fix
                                  assets/lib/display-latex.user.js on lines 1762..1765

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 49.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                          if(previous &&
                                         previous.nodeType == node.TEXT_NODE &&
                                         !non_whitespace.test(previous.data))
                                        previous = previous.previousSibling;
                                  Severity: Minor
                                  Found in assets/lib/display-latex.user.js and 1 other location - About 40 mins to fix
                                  assets/lib/display-latex.user.js on lines 1773..1776

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 49.

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

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

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

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

                                  Refactorings

                                  Further Reading

                                  There are no issues that match your filters.

                                  Category
                                  Status