antimalware/manul

View on GitHub

Showing 400 of 400 total issues

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

    private function checkWebAsyst(&$version)
    {
        $version = CMS_VERSION_UNDEFINED;
        $res = false;

Severity: Major
Found in src/scanner/classes/CmsVersionDetector.inc.php and 9 other locations - About 2 hrs to fix
src/scanner/classes/CmsVersionDetector.inc.php on lines 130..146
src/scanner/classes/CmsVersionDetector.inc.php on lines 148..163
src/scanner/classes/CmsVersionDetector.inc.php on lines 229..244
src/scanner/classes/CmsVersionDetector.inc.php on lines 263..278
src/scanner/classes/CmsVersionDetector.inc.php on lines 280..295
src/scanner/classes/CmsVersionDetector.inc.php on lines 310..325
src/scanner/classes/CmsVersionDetector.inc.php on lines 327..342
src/scanner/classes/CmsVersionDetector.inc.php on lines 344..359
src/scanner/classes/CmsVersionDetector.inc.php on lines 361..376

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

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

    private function checkIpb(&$version)
    {
        $version = CMS_VERSION_UNDEFINED;
        $res = false;

Severity: Major
Found in src/scanner/classes/CmsVersionDetector.inc.php and 9 other locations - About 2 hrs to fix
src/scanner/classes/CmsVersionDetector.inc.php on lines 130..146
src/scanner/classes/CmsVersionDetector.inc.php on lines 148..163
src/scanner/classes/CmsVersionDetector.inc.php on lines 246..261
src/scanner/classes/CmsVersionDetector.inc.php on lines 263..278
src/scanner/classes/CmsVersionDetector.inc.php on lines 280..295
src/scanner/classes/CmsVersionDetector.inc.php on lines 310..325
src/scanner/classes/CmsVersionDetector.inc.php on lines 327..342
src/scanner/classes/CmsVersionDetector.inc.php on lines 344..359
src/scanner/classes/CmsVersionDetector.inc.php on lines 361..376

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

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

    private function checkVBulletin(&$version)
    {
        $version = CMS_VERSION_UNDEFINED;
        $res = false;

Severity: Major
Found in src/scanner/classes/CmsVersionDetector.inc.php and 9 other locations - About 2 hrs to fix
src/scanner/classes/CmsVersionDetector.inc.php on lines 130..146
src/scanner/classes/CmsVersionDetector.inc.php on lines 148..163
src/scanner/classes/CmsVersionDetector.inc.php on lines 229..244
src/scanner/classes/CmsVersionDetector.inc.php on lines 246..261
src/scanner/classes/CmsVersionDetector.inc.php on lines 263..278
src/scanner/classes/CmsVersionDetector.inc.php on lines 280..295
src/scanner/classes/CmsVersionDetector.inc.php on lines 310..325
src/scanner/classes/CmsVersionDetector.inc.php on lines 327..342
src/scanner/classes/CmsVersionDetector.inc.php on lines 361..376

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

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

    private function checkBitrix(&$version)
    {
        $version = CMS_VERSION_UNDEFINED;
        $res = false;

Severity: Major
Found in src/scanner/classes/CmsVersionDetector.inc.php and 9 other locations - About 2 hrs to fix
src/scanner/classes/CmsVersionDetector.inc.php on lines 148..163
src/scanner/classes/CmsVersionDetector.inc.php on lines 229..244
src/scanner/classes/CmsVersionDetector.inc.php on lines 246..261
src/scanner/classes/CmsVersionDetector.inc.php on lines 263..278
src/scanner/classes/CmsVersionDetector.inc.php on lines 280..295
src/scanner/classes/CmsVersionDetector.inc.php on lines 310..325
src/scanner/classes/CmsVersionDetector.inc.php on lines 327..342
src/scanner/classes/CmsVersionDetector.inc.php on lines 344..359
src/scanner/classes/CmsVersionDetector.inc.php on lines 361..376

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

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

    private function checkPhpBb(&$version)
    {
        $version = CMS_VERSION_UNDEFINED;
        $res = false;

Severity: Major
Found in src/scanner/classes/CmsVersionDetector.inc.php and 9 other locations - About 2 hrs to fix
src/scanner/classes/CmsVersionDetector.inc.php on lines 130..146
src/scanner/classes/CmsVersionDetector.inc.php on lines 148..163
src/scanner/classes/CmsVersionDetector.inc.php on lines 229..244
src/scanner/classes/CmsVersionDetector.inc.php on lines 246..261
src/scanner/classes/CmsVersionDetector.inc.php on lines 263..278
src/scanner/classes/CmsVersionDetector.inc.php on lines 280..295
src/scanner/classes/CmsVersionDetector.inc.php on lines 310..325
src/scanner/classes/CmsVersionDetector.inc.php on lines 344..359
src/scanner/classes/CmsVersionDetector.inc.php on lines 361..376

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

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

    private function checkPhpShopScript(&$version)
    {
        $version = CMS_VERSION_UNDEFINED;
        $res = false;

Severity: Major
Found in src/scanner/classes/CmsVersionDetector.inc.php and 9 other locations - About 2 hrs to fix
src/scanner/classes/CmsVersionDetector.inc.php on lines 130..146
src/scanner/classes/CmsVersionDetector.inc.php on lines 148..163
src/scanner/classes/CmsVersionDetector.inc.php on lines 229..244
src/scanner/classes/CmsVersionDetector.inc.php on lines 246..261
src/scanner/classes/CmsVersionDetector.inc.php on lines 263..278
src/scanner/classes/CmsVersionDetector.inc.php on lines 280..295
src/scanner/classes/CmsVersionDetector.inc.php on lines 310..325
src/scanner/classes/CmsVersionDetector.inc.php on lines 327..342
src/scanner/classes/CmsVersionDetector.inc.php on lines 344..359

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

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

    private function checkInstantCms(&$version)
    {
        $version = CMS_VERSION_UNDEFINED;
        $res = false;

Severity: Major
Found in src/scanner/classes/CmsVersionDetector.inc.php and 9 other locations - About 2 hrs to fix
src/scanner/classes/CmsVersionDetector.inc.php on lines 130..146
src/scanner/classes/CmsVersionDetector.inc.php on lines 148..163
src/scanner/classes/CmsVersionDetector.inc.php on lines 229..244
src/scanner/classes/CmsVersionDetector.inc.php on lines 246..261
src/scanner/classes/CmsVersionDetector.inc.php on lines 263..278
src/scanner/classes/CmsVersionDetector.inc.php on lines 280..295
src/scanner/classes/CmsVersionDetector.inc.php on lines 327..342
src/scanner/classes/CmsVersionDetector.inc.php on lines 344..359
src/scanner/classes/CmsVersionDetector.inc.php on lines 361..376

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

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 onTouchEnd has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

FastClick.prototype.onTouchEnd = function(event) {
    'use strict';
    var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;

    if (!this.trackingClick) {
Severity: Major
Found in src/log_analyzer/js/analyzer.table.js - About 2 hrs to fix

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

        function Inflater() {
            var that = this;
            var z = new ZStream();
            var bufsize = 512;
            var flush = Z_NO_FLUSH;
    Severity: Minor
    Found in src/log_analyzer/js/inflate.js - About 2 hrs to fix

      Function initVML has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function initVML() {
      
          /* Utility function to create a VML tag */
          function vml(tag, attr) {
            return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr)
      Severity: Minor
      Found in src/log_analyzer/js/spin.js - About 1 hr to fix

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

                                    content: (function () { //TODO: move to separate methods
                                        var dayBEMJSON,
                                            currentDayISO,
                                            currentDateISO,
                                            currentMonthISO,
        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

                  this
                      .liveBindTo('focusin', function() {
                          this._onFocus();
                      })
                      .liveBindTo('focusout', function() {
          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 3808..3817

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 73.

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

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

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

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

          Refactorings

          Further Reading

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

                         if (response.phpError || ( response.meta && response.meta.phpError)) {
                             errorInfo = response.phpError ? response.phpError : response.meta.phpError;
                             showErrorMessage('PHP error', errorInfo);
                             return -1;
                         }
          Severity: Major
          Found in src/scanner/static/js/common.js and 1 other location - About 1 hr to fix
          src/scanner/static/js/common.js on lines 123..127

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 73.

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

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

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

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

          Refactorings

          Further Reading

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

                  this
                      .liveBindTo('focusin', function() {
                          this._onFocus();
                      })
                      .liveBindTo('focusout', function() {
          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 7233..7242

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 73.

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

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

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

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

          Refactorings

          Further Reading

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

                         if (response.phpError || ( response.meta && response.meta.phpError)) {
                             errorInfo = response.phpError ? response.phpError : response.meta.phpError;
                             showErrorMessage('PHP error', errorInfo);
                             return -1;
                         }
          Severity: Major
          Found in src/scanner/static/js/common.js and 1 other location - About 1 hr to fix
          src/scanner/static/js/common.js on lines 79..83

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 73.

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

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

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

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

          Refactorings

          Further Reading

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

                  function send_tree(tree,// the tree to be sent
                  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 inited has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            'inited': function () {
                                if (this.hasMod('type', 'setting')) {
                                    var popup = this.findBlockOutside('page').findBlockInside({block: 'popup', modName: 'name', modVal: 'setting'});
                                    this.bindTo('click', function () {
                                        popup.toggle()
            Severity: Minor
            Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

              Function launchWorkerProcess has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function launchWorkerProcess(worker, reader, writer, offset, size, onappend, onprogress, onend, onreaderror, onwriteerror) {
                      var chunkIndex = 0, index, outputSize;
              
                      function onflush() {
                          worker.removeEventListener(MESSAGE_EVENT, onmessage, false);
              Severity: Minor
              Found in src/log_analyzer/js/zip.js - About 1 hr to fix

                Function setMod has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    setMod : function(elem, modName, modVal) {
                        if(typeof modVal === 'undefined') {
                            if(typeof elem === 'string') { // if no elem
                                modVal = typeof modName === 'undefined'?
                                    true :  // e.g. setMod('focused')
                Severity: Minor
                Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

                  Function localize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      localize: function() {
                  
                          $('label.load_file_button')._t('Common.LoadFile');
                          $('title')._t('Common.Title');
                  
                  Severity: Minor
                  Found in src/log_analyzer/js/localization.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language