wikimedia/mediawiki-core

View on GitHub
resources/lib/pako/pako_deflate.js

Summary

Maintainability
F
3 wks
Test Coverage

File pako_deflate.js has 1859 lines of code (exceeds 250 allowed). Consider refactoring.
Open


/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
Severity: Major
Found in resources/lib/pako/pako_deflate.js - About 5 days to fix

    Function deflate$1 has 261 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const deflate$1 = (strm, flush) => {
    
        if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) {
          return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;
        }
    Severity: Major
    Found in resources/lib/pako/pako_deflate.js - About 1 day to fix

      Function deflate_stored has 107 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        const deflate_stored = (s, flush) => {
      
          /* Smallest worthy block size when not flushing or finishing. By default
           * this is 32K. This can be as small as 507 bytes for memLevel == 1. For
           * large input and output buffers, the stored block size will be larger.
      Severity: Major
      Found in resources/lib/pako/pako_deflate.js - About 4 hrs to fix

        Function deflate_slow has 77 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          const deflate_slow = (s, flush) => {
        
            let hash_head;          /* head of hash chain */
            let bflush;              /* set if current block must be flushed */
        
        
        Severity: Major
        Found in resources/lib/pako/pako_deflate.js - About 3 hrs to fix

          Function deflate_fast has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const deflate_fast = (s, flush) => {
          
              let hash_head;        /* head of the hash chain */
              let bflush;           /* set if current block must be flushed */
          
          
          Severity: Major
          Found in resources/lib/pako/pako_deflate.js - About 2 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED$1 ||
                  windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
                  strategy < 0 || strategy > Z_FIXED || (windowBits === 8 && wrap !== 1)) {
                  return err(strm, Z_STREAM_ERROR);
                }
            Severity: Critical
            Found in resources/lib/pako/pako_deflate.js - About 2 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                      if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {
                        strend = s.strstart + MAX_MATCH;
                        do {
                          /*jshint noempty:false*/
                        } while (prev === _win[++scan] && prev === _win[++scan] &&
              Severity: Critical
              Found in resources/lib/pako/pako_deflate.js - About 2 hrs to fix

                Function deflate_rle has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const deflate_rle = (s, flush) => {
                
                    let bflush;            /* set if current block must be flushed */
                    let prev;              /* byte at distance one to match */
                    let scan, strend;      /* scan goes up to strend for length of run */
                Severity: Major
                Found in resources/lib/pako/pako_deflate.js - About 2 hrs to fix

                  Function deflateSetDictionary has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    const deflateSetDictionary = (strm, dictionary) => {
                  
                      let dictLength = dictionary.length;
                  
                      if (deflateStateCheck(strm)) {
                  Severity: Major
                  Found in resources/lib/pako/pako_deflate.js - About 2 hrs to fix

                    Consider simplifying this complex logical expression.
                    Open

                        if (!s || s.strm !== strm || (s.status !== INIT_STATE &&
                      //#ifdef GZIP
                                                      s.status !== GZIP_STATE &&
                      //#endif
                                                      s.status !== EXTRA_STATE &&
                    Severity: Critical
                    Found in resources/lib/pako/pako_deflate.js - About 2 hrs to fix

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

                        function Deflate(options) {
                          this.options = common.assign({
                            level: Z_DEFAULT_COMPRESSION,
                            method: Z_DEFLATED,
                            chunkSize: 16384,
                      Severity: Minor
                      Found in resources/lib/pako/pako_deflate.js - About 2 hrs to fix

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

                          const tr_static_init = () => {
                        
                            let n;        /* iterates over tree elements */
                            let bits;     /* bit counter */
                            let length;   /* length value */
                        Severity: Minor
                        Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

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

                            Deflate.prototype.push = function (data, flush_mode) {
                              const strm = this.strm;
                              const chunkSize = this.options.chunkSize;
                              let status, _flush_mode;
                          
                          
                          Severity: Minor
                          Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

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

                              const deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {
                            
                                if (!strm) { // === Z_NULL
                                  return Z_STREAM_ERROR;
                                }
                            Severity: Minor
                            Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

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

                                const longest_match = (s, cur_match) => {
                              
                                  let chain_length = s.max_chain_length;      /* max hash chain length */
                                  let scan = s.strstart; /* current string */
                                  let match;                       /* matched string */
                              Severity: Minor
                              Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

                                Function string2buf has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  var string2buf = (str) => {
                                    if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) {
                                      return new TextEncoder().encode(str);
                                    }
                                
                                
                                Severity: Minor
                                Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

                                  Function gen_bitlen has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const gen_bitlen = (s, desc) => {
                                    //    deflate_state *s;
                                    //    tree_desc *desc;    /* the tree descriptor */
                                  
                                      const tree            = desc.dyn_tree;
                                  Severity: Minor
                                  Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

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

                                      const send_tree = (s, tree, max_code) => {
                                      //    deflate_state *s;
                                      //    ct_data *tree; /* the tree to be scanned */
                                      //    int max_code;       /* and its largest code of non zero frequency */
                                    
                                    
                                    Severity: Minor
                                    Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

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

                                        const fill_window = (s) => {
                                      
                                          const _w_size = s.w_size;
                                          let n, more, str;
                                      
                                      
                                      Severity: Minor
                                      Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

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

                                          const deflate_huff = (s, flush) => {
                                        
                                            let bflush;             /* set if current block must be flushed */
                                        
                                            for (;;) {
                                        Severity: Minor
                                        Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

                                          Consider simplifying this complex logical expression.
                                          Open

                                              if (left >= min_block ||
                                                 ((left || flush === Z_FINISH$1) && flush !== Z_NO_FLUSH$1 &&
                                                 s.strm.avail_in === 0 && left <= have)) {
                                                len = left > have ? have : left;
                                                last = flush === Z_FINISH$1 && s.strm.avail_in === 0 &&
                                          Severity: Critical
                                          Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

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

                                              const _tr_flush_block$1 = (s, buf, stored_len, last) => {
                                              //DeflateState *s;
                                              //charf *buf;       /* input block, or NULL if too old */
                                              //ulg stored_len;   /* length of input block */
                                              //int last;         /* one if this is the last block for a file */
                                            Severity: Minor
                                            Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

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

                                                const build_tree = (s, desc) => {
                                                //    deflate_state *s;
                                                //    tree_desc *desc; /* the tree descriptor */
                                              
                                                  const tree     = desc.dyn_tree;
                                              Severity: Minor
                                              Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

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

                                                  const scan_tree = (s, tree, max_code) => {
                                                  //    deflate_state *s;
                                                  //    ct_data *tree;   /* the tree to be scanned */
                                                  //    int max_code;    /* and its largest code of non zero frequency */
                                                
                                                
                                                Severity: Minor
                                                Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

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

                                                    var buf2string = (buf, max) => {
                                                      const len = max || buf.length;
                                                  
                                                      if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) {
                                                        return new TextDecoder().decode(buf.subarray(0, max));
                                                  Severity: Minor
                                                  Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                if (s.gzhead.hcrc && s.pending > beg) {
                                                                  strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);
                                                                }
                                                    Severity: Major
                                                    Found in resources/lib/pako/pako_deflate.js - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                  if (s.lookahead === 0) {
                                                                    s.strstart = 0;
                                                                    s.block_start = 0;
                                                                    s.insert = 0;
                                                                  }
                                                      Severity: Major
                                                      Found in resources/lib/pako/pako_deflate.js - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                    if (s.pending !== 0) {
                                                                      s.last_flush = -1;
                                                                      return Z_OK$1;
                                                                    }
                                                        Severity: Major
                                                        Found in resources/lib/pako/pako_deflate.js - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                      if (s.gzhead.hcrc && s.pending > beg) {
                                                                        strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);
                                                                      }
                                                          Severity: Major
                                                          Found in resources/lib/pako/pako_deflate.js - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                        if (s.pending !== 0) {
                                                                          s.last_flush = -1;
                                                                          return Z_OK$1;
                                                                        }
                                                            Severity: Major
                                                            Found in resources/lib/pako/pako_deflate.js - About 45 mins to fix

                                                              Function Config has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                              Open

                                                                function Config(good_length, max_lazy, nice_length, max_chain, func) {
                                                              Severity: Minor
                                                              Found in resources/lib/pako/pako_deflate.js - About 35 mins to fix

                                                                Function StaticTreeDesc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                  function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {
                                                                Severity: Minor
                                                                Found in resources/lib/pako/pako_deflate.js - About 35 mins to fix

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                        return err(strm, Z_BUF_ERROR);
                                                                  Severity: Major
                                                                  Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                            return Z_OK$1;
                                                                    Severity: Major
                                                                    Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                              return BS_NEED_MORE;
                                                                      Severity: Major
                                                                      Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                            return BS_BLOCK_DONE;
                                                                        Severity: Major
                                                                        Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                          Avoid too many return statements within this function.
                                                                          Open

                                                                                      return Z_OK$1;
                                                                          Severity: Major
                                                                          Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                return s.pending !== 0 ? Z_OK$1 : Z_STREAM_END$1;
                                                                            Severity: Major
                                                                            Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                      return BS_NEED_MORE;
                                                                              Severity: Major
                                                                              Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                      return BS_FINISH_DONE;
                                                                                Severity: Major
                                                                                Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                      if (flush !== Z_FINISH$1) { return Z_OK$1; }
                                                                                  Severity: Major
                                                                                  Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

                                                                                        return BS_BLOCK_DONE;
                                                                                    Severity: Major
                                                                                    Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                      Avoid too many return statements within this function.
                                                                                      Open

                                                                                          return BS_BLOCK_DONE;
                                                                                      Severity: Major
                                                                                      Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                        Avoid too many return statements within this function.
                                                                                        Open

                                                                                                      return Z_OK$1;
                                                                                        Severity: Major
                                                                                        Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                          Avoid too many return statements within this function.
                                                                                          Open

                                                                                                  return BS_NEED_MORE;
                                                                                          Severity: Major
                                                                                          Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                            Avoid too many return statements within this function.
                                                                                            Open

                                                                                                return BS_BLOCK_DONE;
                                                                                            Severity: Major
                                                                                            Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                              Avoid too many return statements within this function.
                                                                                              Open

                                                                                                      return Z_OK$1;
                                                                                              Severity: Major
                                                                                              Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                                Avoid too many return statements within this function.
                                                                                                Open

                                                                                                            return Z_OK$1;
                                                                                                Severity: Major
                                                                                                Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                                  Avoid too many return statements within this function.
                                                                                                  Open

                                                                                                          return BS_NEED_MORE;
                                                                                                  Severity: Major
                                                                                                  Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                                    Avoid too many return statements within this function.
                                                                                                    Open

                                                                                                                  return Z_OK$1;
                                                                                                    Severity: Major
                                                                                                    Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                                      Avoid too many return statements within this function.
                                                                                                      Open

                                                                                                              return Z_OK$1;
                                                                                                      Severity: Major
                                                                                                      Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                                        Avoid too many return statements within this function.
                                                                                                        Open

                                                                                                                  return Z_OK$1;
                                                                                                        Severity: Major
                                                                                                        Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                                          Avoid too many return statements within this function.
                                                                                                          Open

                                                                                                                    return Z_OK$1;
                                                                                                          Severity: Major
                                                                                                          Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

                                                                                                            Avoid too many return statements within this function.
                                                                                                            Open

                                                                                                                if (s.wrap <= 0) { return Z_STREAM_END$1; }
                                                                                                            Severity: Major
                                                                                                            Found in resources/lib/pako/pako_deflate.js - About 30 mins to fix

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

                                                                                                                      do {
                                                                                                                        if (s.pending === s.pending_buf_size) {
                                                                                                                          //--- HCRC_UPDATE(beg) ---//
                                                                                                                          if (s.gzhead.hcrc && s.pending > beg) {
                                                                                                                            strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 1 day to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 3159..3180

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

                                                                                                              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

                                                                                                                      do {
                                                                                                                        if (s.pending === s.pending_buf_size) {
                                                                                                                          //--- HCRC_UPDATE(beg) ---//
                                                                                                                          if (s.gzhead.hcrc && s.pending > beg) {
                                                                                                                            strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 1 day to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 3194..3215

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

                                                                                                              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 (s.lookahead >= MIN_MATCH) {
                                                                                                                      /*** INSERT_STRING(s, s.strstart, hash_head); ***/
                                                                                                                      s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
                                                                                                                      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
                                                                                                                      s.head[s.ins_h] = s.strstart;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 4 hrs to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2248..2254

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

                                                                                                              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 (s.lookahead >= MIN_MATCH) {
                                                                                                                      /*** INSERT_STRING(s, s.strstart, hash_head); ***/
                                                                                                                      s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
                                                                                                                      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
                                                                                                                      s.head[s.ins_h] = s.strstart;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 4 hrs to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2118..2124

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

                                                                                                              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 ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
                                                                                                                      c2 = str.charCodeAt(m_pos + 1);
                                                                                                                      if ((c2 & 0xfc00) === 0xdc00) {
                                                                                                                        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
                                                                                                                        m_pos++;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 2 hrs to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 3561..3567

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

                                                                                                              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 ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
                                                                                                                      c2 = str.charCodeAt(m_pos + 1);
                                                                                                                      if ((c2 & 0xfc00) === 0xdc00) {
                                                                                                                        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
                                                                                                                        m_pos++;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 2 hrs to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 3545..3551

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

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                const {
                                                                                                                  Z_NO_FLUSH: Z_NO_FLUSH$1, Z_PARTIAL_FLUSH, Z_FULL_FLUSH: Z_FULL_FLUSH$1, Z_FINISH: Z_FINISH$1, Z_BLOCK,
                                                                                                                  Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1, Z_STREAM_ERROR, Z_DATA_ERROR, Z_BUF_ERROR,
                                                                                                                  Z_DEFAULT_COMPRESSION: Z_DEFAULT_COMPRESSION$1,
                                                                                                                  Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED, Z_DEFAULT_STRATEGY: Z_DEFAULT_STRATEGY$1,
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 2 hrs to fix
                                                                                                              resources/lib/codex/codex.js on lines 6632..6651

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

                                                                                                              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 (s.lookahead < MIN_LOOKAHEAD) {
                                                                                                                      fill_window(s);
                                                                                                                      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$1) {
                                                                                                                        return BS_NEED_MORE;
                                                                                                                      }
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 1 hr to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2398..2404

                                                                                                              Duplicated Code

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

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

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

                                                                                                              Tuning

                                                                                                              This issue has a mass of 70.

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                    if (s.lookahead <= MAX_MATCH) {
                                                                                                                      fill_window(s);
                                                                                                                      if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH$1) {
                                                                                                                        return BS_NEED_MORE;
                                                                                                                      }
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 1 hr to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2236..2242

                                                                                                              Duplicated Code

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

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

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

                                                                                                              Tuning

                                                                                                              This issue has a mass of 70.

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                    if (nextlen === 0) {
                                                                                                                      max_count = 138;
                                                                                                                      min_count = 3;
                                                                                                              
                                                                                                                    } else if (curlen === nextlen) {
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 1 hr to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 878..889

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

                                                                                                              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 (nextlen === 0) {
                                                                                                                      max_count = 138;
                                                                                                                      min_count = 3;
                                                                                                              
                                                                                                                    } else if (curlen === nextlen) {
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 1 hr to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 807..818

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

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                  for (code = 0; code < 16; code++) {
                                                                                                                    base_dist[code] = dist;
                                                                                                                    for (n = 0; n < (1 << extra_dbits[code]); n++) {
                                                                                                                      _dist_code[dist++] = code;
                                                                                                                    }
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 1 hr to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 445..450

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

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                  for (code = 0; code < LENGTH_CODES$1 - 1; code++) {
                                                                                                                    base_length[code] = length;
                                                                                                                    for (n = 0; n < (1 << extra_lbits[code]); n++) {
                                                                                                                      _length_code[length++] = code;
                                                                                                                    }
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 1 hr to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 460..465

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

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                const {
                                                                                                                  Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH,
                                                                                                                  Z_OK, Z_STREAM_END,
                                                                                                                  Z_DEFAULT_COMPRESSION,
                                                                                                                  Z_DEFAULT_STRATEGY,
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 50 mins to fix
                                                                                                              resources/lib/vue/vue.global.js on lines 12821..12831

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

                                                                                                              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 (s.match_length >= MIN_MATCH) {
                                                                                                                      // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only
                                                                                                              
                                                                                                                      /*** _tr_tally_dist(s, s.strstart - s.match_start,
                                                                                                                                     s.match_length - MIN_MATCH, bflush); ***/
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 50 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2429..2446

                                                                                                              Duplicated Code

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

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

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

                                                                                                              Tuning

                                                                                                              This issue has a mass of 51.

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                    if (s.match_length >= MIN_MATCH) {
                                                                                                                      //check_match(s, s.strstart, s.strstart - 1, s.match_length);
                                                                                                              
                                                                                                                      /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/
                                                                                                                      bflush = _tr_tally(s, 1, s.match_length - MIN_MATCH);
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 50 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2137..2186

                                                                                                              Duplicated Code

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

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

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

                                                                                                              Tuning

                                                                                                              This issue has a mass of 51.

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                  if (flush === Z_FINISH$1) {
                                                                                                                    /*** FLUSH_BLOCK(s, 1); ***/
                                                                                                                    flush_block_only(s, true);
                                                                                                                    if (s.strm.avail_out === 0) {
                                                                                                                      return BS_FINISH_STARTED;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 3 other locations - About 45 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2197..2205
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2358..2366
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2514..2522

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

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

                                                                                                                  if (flush === Z_FINISH$1) {
                                                                                                                    /*** FLUSH_BLOCK(s, 1); ***/
                                                                                                                    flush_block_only(s, true);
                                                                                                                    if (s.strm.avail_out === 0) {
                                                                                                                      return BS_FINISH_STARTED;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 3 other locations - About 45 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2358..2366
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2457..2465
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2514..2522

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

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

                                                                                                                  if (flush === Z_FINISH$1) {
                                                                                                                    /*** FLUSH_BLOCK(s, 1); ***/
                                                                                                                    flush_block_only(s, true);
                                                                                                                    if (s.strm.avail_out === 0) {
                                                                                                                      return BS_FINISH_STARTED;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 3 other locations - About 45 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2197..2205
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2358..2366
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2457..2465

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

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

                                                                                                                  if (flush === Z_FINISH$1) {
                                                                                                                    /*** FLUSH_BLOCK(s, 1); ***/
                                                                                                                    flush_block_only(s, true);
                                                                                                                    if (s.strm.avail_out === 0) {
                                                                                                                      return BS_FINISH_STARTED;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 3 other locations - About 45 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2197..2205
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2457..2465
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2514..2522

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

                                                                                                              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 (n <= 143) {
                                                                                                                    static_ltree[n * 2 + 1]/*.Len*/ = 8;
                                                                                                                    n++;
                                                                                                                    bl_count[8]++;
                                                                                                                  }
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 2 other locations - About 40 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 487..491
                                                                                                              resources/lib/pako/pako_deflate.js on lines 492..496

                                                                                                              Duplicated Code

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

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

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

                                                                                                              Tuning

                                                                                                              This issue has a mass of 48.

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                  while (n <= 279) {
                                                                                                                    static_ltree[n * 2 + 1]/*.Len*/ = 7;
                                                                                                                    n++;
                                                                                                                    bl_count[7]++;
                                                                                                                  }
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 2 other locations - About 40 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 482..486
                                                                                                              resources/lib/pako/pako_deflate.js on lines 487..491

                                                                                                              Duplicated Code

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

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

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

                                                                                                              Tuning

                                                                                                              This issue has a mass of 48.

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                  while (n <= 255) {
                                                                                                                    static_ltree[n * 2 + 1]/*.Len*/ = 9;
                                                                                                                    n++;
                                                                                                                    bl_count[9]++;
                                                                                                                  }
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 2 other locations - About 40 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 482..486
                                                                                                              resources/lib/pako/pako_deflate.js on lines 492..496

                                                                                                              Duplicated Code

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

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

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

                                                                                                              Tuning

                                                                                                              This issue has a mass of 48.

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                      put_byte(s, s.level === 9 ? 2 :
                                                                                                                                  (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
                                                                                                                                   4 : 0));
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 40 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 3076..3078

                                                                                                              Duplicated Code

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

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

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

                                                                                                              Tuning

                                                                                                              This issue has a mass of 48.

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                      put_byte(s, s.level === 9 ? 2 :
                                                                                                                                  (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
                                                                                                                                   4 : 0));
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 40 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 3100..3102

                                                                                                              Duplicated Code

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

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

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

                                                                                                              Tuning

                                                                                                              This issue has a mass of 48.

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

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

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

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

                                                                                                              Refactorings

                                                                                                              Further Reading

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

                                                                                                                    s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0);
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 35 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2002..2002

                                                                                                              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

                                                                                                                var deflate_1$1 = {
                                                                                                                    deflateInit: deflateInit_1,
                                                                                                                    deflateInit2: deflateInit2_1,
                                                                                                                    deflateReset: deflateReset_1,
                                                                                                                    deflateResetKeep: deflateResetKeep_1,
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 2 other locations - About 35 mins to fix
                                                                                                              resources/lib/codex/codex.js on lines 7268..7278
                                                                                                              resources/src/mediawiki.page.ready/checkboxHack.js on lines 439..449

                                                                                                              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

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

                                                                                                                        s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0);
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 35 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2039..2039

                                                                                                              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

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

                                                                                                                  if (s.sym_next) {
                                                                                                                    /*** FLUSH_BLOCK(s, 0); ***/
                                                                                                                    flush_block_only(s, false);
                                                                                                                    if (s.strm.avail_out === 0) {
                                                                                                                      return BS_NEED_MORE;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 3 other locations - About 30 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2206..2213
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2466..2473
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2523..2530

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

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

                                                                                                                  if (s.sym_next) {
                                                                                                                    /*** FLUSH_BLOCK(s, 0); ***/
                                                                                                                    flush_block_only(s, false);
                                                                                                                    if (s.strm.avail_out === 0) {
                                                                                                                      return BS_NEED_MORE;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 3 other locations - About 30 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2367..2374
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2466..2473
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2523..2530

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

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

                                                                                                                  if (s.sym_next) {
                                                                                                                    /*** FLUSH_BLOCK(s, 0); ***/
                                                                                                                    flush_block_only(s, false);
                                                                                                                    if (s.strm.avail_out === 0) {
                                                                                                                      return BS_NEED_MORE;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 3 other locations - About 30 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2206..2213
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2367..2374
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2523..2530

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

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

                                                                                                                  if (s.sym_next) {
                                                                                                                    /*** FLUSH_BLOCK(s, 0); ***/
                                                                                                                    flush_block_only(s, false);
                                                                                                                    if (s.strm.avail_out === 0) {
                                                                                                                      return BS_NEED_MORE;
                                                                                                              Severity: Major
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 3 other locations - About 30 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2206..2213
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2367..2374
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2466..2473

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

                                                                                                              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

                                                                                                                    s.insert += have > s.w_size - s.insert ? s.w_size - s.insert : have;
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 30 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2013..2013

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

                                                                                                              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

                                                                                                                      s.insert += used > s.w_size - s.insert ? s.w_size - s.insert : used;
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/pako/pako_deflate.js and 1 other location - About 30 mins to fix
                                                                                                              resources/lib/pako/pako_deflate.js on lines 2054..2054

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

                                                                                                              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