jkuchar/MultipleFileUpload

View on GitHub
public/uploadify/js/swfobject (2).js

Summary

Maintainability
F
1 mo
Test Coverage

Function swfobject has a Cognitive Complexity of 428 (exceeds 5 allowed). Consider refactoring.
Open

var swfobject = function() {
    
    var UNDEF = "undefined",
        OBJECT = "object",
        SHOCKWAVE_FLASH = "Shockwave Flash",
Severity: Minor
Found in public/uploadify/js/swfobject (2).js - About 1 wk to fix

Cognitive Complexity

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

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

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

Further reading

Function swfobject has 659 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var swfobject = function() {
    
    var UNDEF = "undefined",
        OBJECT = "object",
        SHOCKWAVE_FLASH = "Shockwave Flash",
Severity: Major
Found in public/uploadify/js/swfobject (2).js - About 3 days to fix

    File swfobject (2).js has 661 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!    SWFObject v2.2 <http://code.google.com/p/swfobject/> 
        is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
    */
    
    var swfobject = function() {
    Severity: Major
    Found in public/uploadify/js/swfobject (2).js - About 1 day to fix

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

          function createSWF(attObj, parObj, id) {
              var r, el = getElementById(id);
              if (ua.wk && ua.wk < 312) { return r; }
              if (el) {
                  if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
      Severity: Major
      Found in public/uploadify/js/swfobject (2).js - About 2 hrs to fix

        Function matchVersions has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function matchVersions() {
                var rl = regObjArr.length;
                if (rl > 0) {
                    for (var i = 0; i < rl; i++) { // for each registered object element
                        var id = regObjArr[i].id;
        Severity: Major
        Found in public/uploadify/js/swfobject (2).js - About 2 hrs to fix

          Function embedSWF has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
                      var callbackObj = {success:false, id:replaceElemIdStr};
                      if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
                          setVisibility(replaceElemIdStr, false);
                          addDomLoadEvent(function() {
          Severity: Major
          Found in public/uploadify/js/swfobject (2).js - About 2 hrs to fix

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

                function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
                    isExpressInstallActive = true;
                    storedCallbackFn = callbackFn || null;
                    storedCallbackObj = {success:false, id:replaceElemIdStr};
                    var obj = getElementById(replaceElemIdStr);
            Severity: Minor
            Found in public/uploadify/js/swfobject (2).js - About 1 hr to fix

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

                  onDomLoad = function() {
                      if (!ua.w3) { return; }
                      if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically 
                          callDomLoadFunctions();
                      }
              Severity: Minor
              Found in public/uploadify/js/swfobject (2).js - About 1 hr to fix

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

                    ua = function() {
                        var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
                            u = nav.userAgent.toLowerCase(),
                            p = nav.platform.toLowerCase(),
                            windows = p ? /win/.test(p) : /win/.test(u),
                Severity: Minor
                Found in public/uploadify/js/swfobject (2).js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                              if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
                                  setVisibility(replaceElemIdStr, false);
                                  addDomLoadEvent(function() {
                                      widthStr += ""; // auto-convert to string
                                      heightStr += "";
                  Severity: Critical
                  Found in public/uploadify/js/swfobject (2).js - About 1 hr to fix

                    Function embedSWF has 10 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
                    Severity: Major
                    Found in public/uploadify/js/swfobject (2).js - About 1 hr to fix

                      Function createCSS has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function createCSS(sel, decl, media, newStyle) {
                              if (ua.ie && ua.mac) { return; }
                              var h = doc.getElementsByTagName("head")[0];
                              if (!h) { return; } // to also support badly authored HTML pages that lack a head element
                              var m = (media && typeof media == "string") ? media : "screen";
                      Severity: Minor
                      Found in public/uploadify/js/swfobject (2).js - About 1 hr to fix

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

                            function testPlayerVersion() {
                                var b = doc.getElementsByTagName("body")[0];
                                var o = createElement(OBJECT);
                                o.setAttribute("type", FLASH_MIME_TYPE);
                                var t = b.appendChild(o);
                        Severity: Minor
                        Found in public/uploadify/js/swfobject (2).js - About 1 hr to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
                                                      setVisibility(id, true);
                                                      if (cb) {
                                                          cbObj.success = true;
                                                          cbObj.ref = getObjectById(id);
                          Severity: Major
                          Found in public/uploadify/js/swfobject (2).js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if (i.toLowerCase() == "data") {
                                                        parObj.movie = attObj[i];
                                                    }
                                                    else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
                                                        att += ' class="' + attObj[i] + '"';
                            Severity: Major
                            Found in public/uploadify/js/swfobject (2).js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
                                                          o.setAttribute("class", attObj[m]);
                                                      }
                                                      else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
                                                          o.setAttribute(m, attObj[m]);
                              Severity: Major
                              Found in public/uploadify/js/swfobject (2).js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        if (o && typeof o.SetVariable != UNDEF) { 
                                                            cbObj.success = true;
                                                            cbObj.ref = o;
                                                        }
                                Severity: Major
                                Found in public/uploadify/js/swfobject (2).js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
                                                              ac.appendChild(c[i].cloneNode(true));
                                                          }
                                  Severity: Major
                                  Found in public/uploadify/js/swfobject (2).js - About 45 mins to fix

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

                                        return {
                                            /* Public API
                                                - Reference: http://code.google.com/p/swfobject/wiki/documentation
                                            */ 
                                            registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 1 wk to fix
                                    public/uploadify/js/swfobject.js on lines 632..786

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

                                    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

                                        var UNDEF = "undefined",
                                            OBJECT = "object",
                                            SHOCKWAVE_FLASH = "Shockwave Flash",
                                            SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
                                            FLASH_MIME_TYPE = "application/x-shockwave-flash",
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 6 days to fix
                                    public/uploadify/js/swfobject.js on lines 7..123

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

                                    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

                                        function matchVersions() {
                                            var rl = regObjArr.length;
                                            if (rl > 0) {
                                                for (var i = 0; i < rl; i++) { // for each registered object element
                                                    var id = regObjArr[i].id;
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 3 days to fix
                                    public/uploadify/js/swfobject.js on lines 225..280

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

                                    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

                                        function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
                                            isExpressInstallActive = true;
                                            storedCallbackFn = callbackFn || null;
                                            storedCallbackObj = {success:false, id:replaceElemIdStr};
                                            var obj = getElementById(replaceElemIdStr);
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 3 days to fix
                                    public/uploadify/js/swfobject.js on lines 312..357

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        function createCSS(sel, decl, media, newStyle) {
                                            if (ua.ie && ua.mac) { return; }
                                            var h = doc.getElementsByTagName("head")[0];
                                            if (!h) { return; } // to also support badly authored HTML pages that lack a head element
                                            var m = (media && typeof media == "string") ? media : "screen";
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 2 days to fix
                                    public/uploadify/js/swfobject.js on lines 552..583

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

                                    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

                                        function testPlayerVersion() {
                                            var b = doc.getElementsByTagName("body")[0];
                                            var o = createElement(OBJECT);
                                            o.setAttribute("type", FLASH_MIME_TYPE);
                                            var t = b.appendChild(o);
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 1 day to fix
                                    public/uploadify/js/swfobject.js on lines 193..221

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 266.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        var cleanup = function() {
                                            if (ua.ie && ua.win) {
                                                window.attachEvent("onunload", function() {
                                                    // remove listeners to avoid memory leaks
                                                    var ll = listenersArr.length;
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 1 day to fix
                                    public/uploadify/js/swfobject.js on lines 606..630

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

                                    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 (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
                                                    var att = "";
                                                    for (var i in attObj) {
                                                        if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
                                                            if (i.toLowerCase() == "data") {
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 1 day to fix
                                    public/uploadify/js/swfobject.js on lines 414..469

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

                                    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

                                        function abstractAltContent(obj) {
                                            var ac = createElement("div");
                                            if (ua.win && ua.ie) {
                                                ac.innerHTML = obj.innerHTML;
                                            }
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 1 day to fix
                                    public/uploadify/js/swfobject.js on lines 383..403

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        function hasPlayerVersion(rv) {
                                            var pv = ua.pv, v = rv.split(".");
                                            v[0] = parseInt(v[0], 10);
                                            v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
                                            v[2] = parseInt(v[2], 10) || 0;
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 1 day to fix
                                    public/uploadify/js/swfobject.js on lines 541..547

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

                                    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

                                        function displayAltContent(obj) {
                                            if (ua.ie && ua.win && obj.readyState != 4) {
                                                // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
                                                // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
                                                var el = createElement("div");
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 7 hrs to fix
                                    public/uploadify/js/swfobject.js on lines 361..381

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

                                    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

                                        function addLoadEvent(fn) {
                                            if (typeof win.addEventListener != UNDEF) {
                                                win.addEventListener("load", fn, false);
                                            }
                                            else if (typeof doc.addEventListener != UNDEF) {
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 6 hrs to fix
                                    public/uploadify/js/swfobject.js on lines 152..172

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

                                    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

                                                    for (var i in attObj) {
                                                        if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
                                                            if (i.toLowerCase() == "data") {
                                                                parObj.movie = attObj[i];
                                                            }
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 5 hrs to fix
                                    public/uploadify/js/swfobject.js on lines 416..428

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        function removeSWF(id) {
                                            var obj = getElementById(id);
                                            if (obj && obj.nodeName == "OBJECT") {
                                                if (ua.ie && ua.win) {
                                                    obj.style.display = "none";
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 5 hrs to fix
                                    public/uploadify/js/swfobject.js on lines 484..502

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

                                    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

                                        function callDomLoadFunctions() {
                                            if (isDomLoaded) { return; }
                                            try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
                                                var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
                                                t.parentNode.removeChild(t);
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 4 hrs to fix
                                    public/uploadify/js/swfobject.js on lines 125..137

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

                                    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

                                        function getObjectById(objectIdStr) {
                                            var r = null;
                                            var o = getElementById(objectIdStr);
                                            if (o && o.nodeName == "OBJECT") {
                                                if (typeof o.SetVariable != UNDEF) {
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 3 hrs to fix
                                    public/uploadify/js/swfobject.js on lines 282..297

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

                                    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

                                        function setVisibility(id, isVisible) {
                                            if (!autoHideShow) { return; }
                                            var v = isVisible ? "visible" : "hidden";
                                            if (isDomLoaded && getElementById(id)) {
                                                getElementById(id).style.visibility = v;
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 2 hrs to fix
                                    public/uploadify/js/swfobject.js on lines 585..594

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

                                    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

                                        function removeObjectInIE(id) {
                                            var obj = getElementById(id);
                                            if (obj) {
                                                for (var i in obj) {
                                                    if (typeof obj[i] == "function") {
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 2 hrs to fix
                                    public/uploadify/js/swfobject.js on lines 504..514

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 85.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    for (var j in parObj) {
                                                        if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
                                                            par += '<param name="' + j + '" value="' + parObj[j] + '" />';
                                                        }
                                                    }
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 1 hr to fix
                                    public/uploadify/js/swfobject.js on lines 436..440

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

                                    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

                                        function canExpressInstall() {
                                            return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
                                        }
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 1 hr to fix
                                    public/uploadify/js/swfobject.js on lines 305..307

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 63.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        function urlEncodeIfNecessary(s) {
                                            var regex = /[\\\"<>\.;]/;
                                            var hasBadChars = regex.exec(s) != null;
                                            return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
                                        }
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 1 hr to fix
                                    public/uploadify/js/swfobject.js on lines 598..602

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

                                    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

                                        function createObjParam(el, pName, pValue) {
                                            var p = createElement("param");
                                            p.setAttribute("name", pName);    
                                            p.setAttribute("value", pValue);
                                            el.appendChild(p);
                                    Severity: Major
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 1 hr to fix
                                    public/uploadify/js/swfobject.js on lines 474..479

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

                                    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

                                        function getElementById(id) {
                                            var el = null;
                                            try {
                                                el = doc.getElementById(id);
                                            }
                                    Severity: Minor
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 45 mins to fix
                                    public/uploadify/js/swfobject.js on lines 518..525

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

                                        function addListener(target, eventType, fn) {
                                            target.attachEvent(eventType, fn);
                                            listenersArr[listenersArr.length] = [target, eventType, fn];
                                        }
                                    Severity: Minor
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 35 mins to fix
                                    public/uploadify/js/swfobject.js on lines 534..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 46.

                                    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

                                        function addDomLoadEvent(fn) {
                                            if (isDomLoaded) {
                                                fn();
                                            }
                                            else { 
                                    Severity: Minor
                                    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 30 mins to fix
                                    public/uploadify/js/swfobject.js on lines 139..146

                                    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