antimalware/manul

View on GitHub

Showing 400 of 400 total issues

Function _getDatePickerBEMJSON has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _getDatePickerBEMJSON: function () {
            
            var clearBEMJSON,
                datePickerBEMJSON = [
                    {
Severity: Minor
Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

                if (message.append)
                    obj.postMessage({
                        onappend : true,
                        data : deflater.append(message.data, function(current) {
                            obj.postMessage({
    Severity: Major
    Found in src/log_analyzer/js/deflate.js and 1 other location - About 1 hr to fix
    src/log_analyzer/js/inflate.js on lines 2144..2153

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 71.

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

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

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

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

    Refactorings

    Further Reading

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

                if (message.append)
                    obj.postMessage({
                        onappend : true,
                        data : inflater.append(message.data, function(current) {
                            obj.postMessage({
    Severity: Major
    Found in src/log_analyzer/js/inflate.js and 1 other location - About 1 hr to fix
    src/log_analyzer/js/deflate.js on lines 2070..2079

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 71.

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

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

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

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

    Refactorings

    Further Reading

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

            that.build_tree = function(s) {
                var tree = that.dyn_tree;
                var stree = that.stat_desc.static_tree;
                var elems = that.stat_desc.elems;
                var n, m; // iterate over heap elements
    Severity: Minor
    Found in src/log_analyzer/js/deflate.js - About 1 hr to fix

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

              _getDatePickerHeadBEMJSON: function () {
                  var datePickerHeadBEMJSON,
                      titleClickContent = this.months[this._dates.current.month + 1] + ' ' + this._dates.current.year;
      
      //            if (!this.changeDisabled) {
      Severity: Minor
      Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

        function addPointerEvent(type, toExtend) {
        
            var eventName = 'pointer' + type,
                pointerevent,
        
        
        Severity: Minor
        Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

              if(props.onElemSetMod) {
                  for(elemName in props.onElemSetMod) {
                      if(props.onElemSetMod.hasOwnProperty(elemName)) {
                          modFnsToProps('after', props.onElemSetMod[elemName], props, elemName);
                      }
          Severity: Major
          Found in src/log_analyzer/js/analyzer.table.js and 1 other location - About 1 hr to fix
          src/log_analyzer/js/analyzer.table.js on lines 530..537

          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

                         else if (textChild) { // pure text
                            if (!xml.attributes.length)
                               o = X.escape(X.innerXml(xml));
                            else
                               o["#text"] = X.escape(X.innerXml(xml));
          Severity: Major
          Found in src/log_analyzer/js/xml2json.js and 1 other location - About 1 hr to fix
          src/log_analyzer/js/xml2json.js on lines 41..46

          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(props.beforeElemSetMod) {
                  for(elemName in props.beforeElemSetMod) {
                      if(props.beforeElemSetMod.hasOwnProperty(elemName)) {
                          modFnsToProps('before', props.beforeElemSetMod[elemName], props, elemName);
                      }
          Severity: Major
          Found in src/log_analyzer/js/analyzer.table.js and 1 other location - About 1 hr to fix
          src/log_analyzer/js/analyzer.table.js on lines 539..546

          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

                            else { // mixed content
                               if (!xml.attributes.length)
                                  o = X.escape(X.innerXml(xml));
                               else
                                  o["#text"] = X.escape(X.innerXml(xml));
          Severity: Major
          Found in src/log_analyzer/js/xml2json.js and 1 other location - About 1 hr to fix
          src/log_analyzer/js/xml2json.js on lines 48..53

          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

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

                  un : function(e, fn, ctx) {
                      if(typeof e === 'string' || typeof e === 'undefined') {
                          var storage = this[storageExpando];
                          if(storage) {
                              if(e) { // if event type was passed
          Severity: Minor
          Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

            Method __construct has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function __construct($rootPath = '.')
                {
                    $this->rootPath = $rootPath;
                    $this->versions = array();
                    $this->types = array();
            Severity: Minor
            Found in src/scanner/classes/CmsVersionDetector.inc.php - About 1 hr to fix

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

                              if (nextlen === 0) {
                                  max_count = 138;
                                  min_count = 3;
                              } else if (curlen == nextlen) {
                                  max_count = 6;
              Severity: Major
              Found in src/log_analyzer/js/deflate.js and 1 other location - About 1 hr to fix
              src/log_analyzer/js/deflate.js on lines 752..761

              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) {
                                  max_count = 6;
              Severity: Major
              Found in src/log_analyzer/js/deflate.js and 1 other location - About 1 hr to fix
              src/log_analyzer/js/deflate.js on lines 873..882

              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

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

                      Entry.prototype.getData = function(writer, onend, onprogress, checkCrc32) {
                          var that = this, worker;
              
                          function terminate(callback, param) {
                              if (worker)
              Severity: Minor
              Found in src/log_analyzer/js/zip.js - About 1 hr to fix

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

                    function addFileEntry(zipEntry, fileEntry, onend, onerror) {
                        function getChildren(fileEntry, callback) {
                            if (fileEntry.isDirectory)
                                fileEntry.createReader().readEntries(callback);
                            if (fileEntry.isFile)
                Severity: Minor
                Found in src/log_analyzer/js/zip-fs.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                              if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0
                                      || _strategy > Z_HUFFMAN_ONLY) {
                                  return Z_STREAM_ERROR;
                              }
                  Severity: Critical
                  Found in src/log_analyzer/js/deflate.js - About 1 hr to fix

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

                            function scan_tree(tree,// the tree to be scanned
                            max_code // and its largest code of non zero frequency
                            ) {
                                var n; // iterates over all tree elements
                                var prevlen = -1; // last emitted length
                    Severity: Minor
                    Found in src/log_analyzer/js/deflate.js - About 1 hr to fix

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

                              function longest_match(cur_match) {
                                  var chain_length = max_chain_length; // max hash chain length
                                  var scan = strstart; // current string
                                  var match; // matched string
                                  var len; // length of current match
                      Severity: Minor
                      Found in src/log_analyzer/js/deflate.js - About 1 hr to fix

                        Function _onDateChoose has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                _onDateChoose: function (e) {
                                    var target = $(e.target)
                                    var first,
                                        last;
                        
                        
                        Severity: Minor
                        Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language