XoopsModules25x/xoopsinfo

View on GitHub
phpsysinfo/js/phpSysInfo/phpsysinfo.js

Summary

Maintainability
F
1 mo
Test Coverage

File phpsysinfo.js has 1577 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/***************************************************************************
 *   Copyright (C) 2008 by phpSysInfo - A PHP System Information Script    *
 *   http://phpsysinfo.sourceforge.net/                                    *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 4 days to fix

    Function refreshVitals has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
    Open

    function refreshVitals(xml) {
        var hostname = "", ip = "";
        if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('vitals', blocks) < 0))) {
            $("#vitals").remove();
            $("Vitals", xml).each(function getVitals(id) {
    Severity: Minor
    Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 day 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 formatBytes has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
    Open

    function formatBytes(bytes, xml) {
        var byteFormat = "", show = "";
    
        $("Options", xml).each(function getByteFormat(id) {
            byteFormat = $(this).attr("byteFormat");
    Severity: Minor
    Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 7 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function refreshNetwork has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
    Open

    function refreshNetwork(xml) {
        if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {
            $("#network").remove();
            return;
        }
    Severity: Minor
    Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 5 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function refreshUps has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

    function refreshUps(xml) {
        if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('ups', blocks) < 0))) {
            $("#ups").remove();
            return;
        }
    Severity: Minor
    Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 5 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function refreshFilesystems has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

    function refreshFilesystems(xml) {
        if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('filesystem', blocks) < 0))) {
            $("#filesystem").remove();
            return;
        }
    Severity: Minor
    Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 5 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function refreshUps has 120 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function refreshUps(xml) {
        if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('ups', blocks) < 0))) {
            $("#ups").remove();
            return;
        }
    Severity: Major
    Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 4 hrs to fix

      Function refreshVitals has 120 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function refreshVitals(xml) {
          var hostname = "", ip = "";
          if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('vitals', blocks) < 0))) {
              $("#vitals").remove();
              $("Vitals", xml).each(function getVitals(id) {
      Severity: Major
      Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 4 hrs to fix

        Function formatBytes has 108 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function formatBytes(bytes, xml) {
            var byteFormat = "", show = "";
        
            $("Options", xml).each(function getByteFormat(id) {
                byteFormat = $(this).attr("byteFormat");
        Severity: Major
        Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 4 hrs to fix

          Function refreshMemory has 99 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function refreshMemory(xml) {
              if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('memory', blocks) < 0))) {
                  $("#memory").remove();
                  return;
              }
          Severity: Major
          Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 3 hrs to fix

            Function buildpage has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

            $(document).ready(function buildpage() {
                var i = 0, old_template = null, cookie_template = null, cookie_language = null, blocktmp = "";
            
                showCPUListExpanded = $("#showCPUListExpanded").val().toString()==="true";
                showCPUInfoExpanded = $("#showCPUInfoExpanded").val().toString()==="true";
            Severity: Minor
            Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 3 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

            Function fillCpu has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

            function fillCpu(xml, tree, rootposition, collapsed) {
                var cpucount = 0, html = "";
                $("Hardware CPU CpuCore", xml).each(function getCpuCore(cpuCoreId) {
                    var model = "", speed = 0, bus = 0, cache = 0, bogo = 0, temp = 0, load = 0, speedmax = 0, speedmin = 0, cpucoreposition = 0, virt = "", manufacturer = "";
                    cpucount++;
            Severity: Minor
            Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 3 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

            Function full_addr has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

            function full_addr(ip_string) {
                var wrongvalue = false;
                ip_string = $.trim(ip_string).toLowerCase();
                // ipv4 notation
                if (ip_string.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$)/)) {
            Severity: Minor
            Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 3 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

            Function refreshNetwork has 96 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function refreshNetwork(xml) {
                if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {
                    $("#network").remove();
                    return;
                }
            Severity: Major
            Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 3 hrs to fix

              Function getVitals has 95 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  $("Vitals", xml).each(function getVitals(id) {
                      hostname = $(this).attr("Hostname");
                      ip = $(this).attr("IPAddr");
                      kernel = $(this).attr("Kernel");
                      distro = $(this).attr("Distro");
              Severity: Major
              Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 3 hrs to fix

                Function refreshMemory has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                Open

                function refreshMemory(xml) {
                    if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('memory', blocks) < 0))) {
                        $("#memory").remove();
                        return;
                    }
                Severity: Minor
                Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 3 hrs to fix

                Cognitive Complexity

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

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

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

                Further reading

                Function getUps has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    $("UPSInfo UPS", xml).each(function getUps(id) {
                        var name = "", model = "", mode = "", start_time = "", upsstatus = "", temperature = "", outages_count = "", last_outage = "", last_outage_finish = "", line_voltage = "", line_frequency = "", load_percent = "", battery_date = "", battery_voltage = "", battery_charge_percent = "", time_left_minutes = "";
                        name = $(this).attr("Name");
                        model = $(this).attr("Model");
                        mode = $(this).attr("Mode");
                Severity: Major
                Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 3 hrs to fix

                  Function buildpage has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  $(document).ready(function buildpage() {
                      var i = 0, old_template = null, cookie_template = null, cookie_language = null, blocktmp = "";
                  
                      showCPUListExpanded = $("#showCPUListExpanded").val().toString()==="true";
                      showCPUInfoExpanded = $("#showCPUInfoExpanded").val().toString()==="true";
                  Severity: Major
                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 2 hrs to fix

                    Function changeSpanLanguage has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function changeSpanLanguage(plugin) {
                        var langId = "", langStr = "", langarrId = current_language + "_";
                    
                        if (plugin === undefined) {
                            langarrId += "phpSysInfo";
                    Severity: Minor
                    Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 2 hrs to fix

                    Cognitive Complexity

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

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

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

                    Further reading

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

                    function refreshFilesystems(xml) {
                        if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('filesystem', blocks) < 0))) {
                            $("#filesystem").remove();
                            return;
                        }
                    Severity: Major
                    Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 2 hrs to fix

                      Function fillCpu has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function fillCpu(xml, tree, rootposition, collapsed) {
                          var cpucount = 0, html = "";
                          $("Hardware CPU CpuCore", xml).each(function getCpuCore(cpuCoreId) {
                              var model = "", speed = 0, bus = 0, cache = 0, bogo = 0, temp = 0, load = 0, speedmax = 0, speedmin = 0, cpucoreposition = 0, virt = "", manufacturer = "";
                              cpucount++;
                      Severity: Major
                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 2 hrs to fix

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

                        function formatBPS(bps) {
                            var show = "";
                        
                            if (bps > Math.pow(1000, 5)) {
                                show += round(bps / Math.pow(1000, 5), 2);
                        Severity: Minor
                        Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 2 hrs to fix

                        Cognitive Complexity

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

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

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

                        Further reading

                        Function filesystemtable has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function filesystemtable() {
                            var html = "";
                            html += "<h2>" + genlang(30) + "</h2>\n";
                            html += "        <div style=\"overflow-x:auto;\">\n";
                            html += "          <table id=\"filesystemTable\" style=\"border-collapse:collapse;\">\n";
                        Severity: Major
                        Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 2 hrs to fix

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

                              $("Hardware CPU CpuCore", xml).each(function getCpuCore(cpuCoreId) {
                                  var model = "", speed = 0, bus = 0, cache = 0, bogo = 0, temp = 0, load = 0, speedmax = 0, speedmin = 0, cpucoreposition = 0, virt = "", manufacturer = "";
                                  cpucount++;
                                  model = $(this).attr("Model");
                                  speed = parseInt($(this).attr("CpuSpeed"), 10);
                          Severity: Major
                          Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 2 hrs to fix

                            Function full_addr has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function full_addr(ip_string) {
                                var wrongvalue = false;
                                ip_string = $.trim(ip_string).toLowerCase();
                                // ipv4 notation
                                if (ip_string.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$)/)) {
                            Severity: Major
                            Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 2 hrs to fix

                              Function getMount has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  $("FileSystem Mount", xml).each(function getMount(mid) {
                                      var mpoint = "", mpid = 0, type = "", name = "", free = 0, used = 0, size = 0, percent = 0, options = "", inodes = 0, inodes_text = "", options_text = "", ignore = 0;
                                      mpid = parseInt($(this).attr("MountPointID"), 10);
                                      type = $(this).attr("FSType");
                                      name = $(this).attr("Name").replace(/;/g, ";<wbr>"); /* split long name */
                              Severity: Major
                              Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 2 hrs to fix

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

                                function refreshHardware(xml) {
                                    if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('hardware', blocks) < 0))) {
                                        $("#hardware").remove();
                                        return;
                                    }
                                Severity: Minor
                                Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 2 hrs to fix

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

                                  function reload(initiate) {
                                      $.ajax({
                                          url: 'xml.php',
                                          dataType: 'xml',
                                          error: function error() {
                                  Severity: Minor
                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

                                  Cognitive Complexity

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

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

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

                                  Further reading

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

                                  function reload(initiate) {
                                      $.ajax({
                                          url: 'xml.php',
                                          dataType: 'xml',
                                          error: function error() {
                                  Severity: Minor
                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

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

                                        $("Network NetDevice", xml).each(function getDevice(id) {
                                            var name = "", rx = 0, tx = 0, er = 0, dr = 0, info = "", networkindex = 0, htmlrx = '', htmltx = '';
                                            name = $(this).attr("Name");
                                            rx = parseInt($(this).attr("RxBytes"), 10);
                                            tx = parseInt($(this).attr("TxBytes"), 10);
                                    Severity: Minor
                                    Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

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

                                      function fillHWDevice(xml, type, tree, rootposition) {
                                          var devicecount = 0, html = "";
                                          $("Hardware " + type + " Device", xml).each(function getHWDevice(deviceId) {
                                              var name = "", count = 0, capacity = 0, manufacturer = "", product = "", serial = "", devcoreposition = 0;
                                      
                                      
                                      Severity: Minor
                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

                                        Function getLanguage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function getLanguage(plugin, langarrId) {
                                            var getLangUrl = "";
                                            if (current_language) {
                                                getLangUrl = 'language/language.php?lang=' + current_language;
                                                if (plugin) {
                                        Severity: Minor
                                        Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

                                          Function getMemory has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              $("Memory", xml).each(function getMemory(id) {
                                                  var free = 0, total = 0, used = 0, percent = 0, memoryindex = 0;
                                                  free = parseInt($(this).attr("Free"), 10);
                                                  used = parseInt($(this).attr("Used"), 10);
                                                  total = parseInt($(this).attr("Total"), 10);
                                          Severity: Minor
                                          Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

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

                                            function refreshCurrent(xml) {
                                                if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('current', blocks) < 0))) {
                                                    $("#current").remove();
                                                    return;
                                                }
                                            Severity: Minor
                                            Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

                                            Cognitive Complexity

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

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

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

                                            Further reading

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

                                            function refreshVoltage(xml) {
                                                if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('voltage', blocks) < 0))) {
                                                    $("#voltage").remove();
                                                    return;
                                                }
                                            Severity: Minor
                                            Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

                                            Cognitive Complexity

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

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

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

                                            Further reading

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

                                            function fillHWDevice(xml, type, tree, rootposition) {
                                                var devicecount = 0, html = "";
                                                $("Hardware " + type + " Device", xml).each(function getHWDevice(deviceId) {
                                                    var name = "", count = 0, capacity = 0, manufacturer = "", product = "", serial = "", devcoreposition = 0;
                                            
                                            
                                            Severity: Minor
                                            Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

                                            Cognitive Complexity

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

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

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

                                            Further reading

                                            Function changeSpanLanguage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                            function changeSpanLanguage(plugin) {
                                                var langId = "", langStr = "", langarrId = current_language + "_";
                                            
                                                if (plugin === undefined) {
                                                    langarrId += "phpSysInfo";
                                            Severity: Minor
                                            Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

                                              Function getHWDevice has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  $("Hardware " + type + " Device", xml).each(function getHWDevice(deviceId) {
                                                      var name = "", count = 0, capacity = 0, manufacturer = "", product = "", serial = "", devcoreposition = 0;
                                              
                                                      devicecount++;
                                                      name = $(this).attr("Name");
                                              Severity: Minor
                                              Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

                                                Function formatBPS has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                function formatBPS(bps) {
                                                    var show = "";
                                                
                                                    if (bps > Math.pow(1000, 5)) {
                                                        show += round(bps / Math.pow(1000, 5), 2);
                                                Severity: Minor
                                                Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

                                                  Function buildblocks has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                          success: function buildblocks(xml) {
                                                              if ((typeof(initiate) === 'boolean') && (initiate === true)) {
                                                                  populateErrors(xml);
                                                              }
                                                  
                                                  
                                                  Severity: Minor
                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

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

                                                    function genlang(id, plugin) {
                                                        var html = "", idString = "", plugname = "",
                                                            langarrId = current_language + "_";
                                                    
                                                        if (plugin === undefined) {
                                                    Severity: Minor
                                                    Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

                                                    Cognitive Complexity

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

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

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

                                                    Further reading

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

                                                    function refreshVoltage(xml) {
                                                        if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('voltage', blocks) < 0))) {
                                                            $("#voltage").remove();
                                                            return;
                                                        }
                                                    Severity: Minor
                                                    Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

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

                                                      function refreshCurrent(xml) {
                                                          if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('current', blocks) < 0))) {
                                                              $("#current").remove();
                                                              return;
                                                          }
                                                      Severity: Minor
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

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

                                                        function genlang(id, plugin) {
                                                            var html = "", idString = "", plugname = "",
                                                                langarrId = current_language + "_";
                                                        
                                                            if (plugin === undefined) {
                                                        Severity: Minor
                                                        Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

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

                                                          function refreshTemp(xml) {
                                                              if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {
                                                                  $("#temperature").remove();
                                                                  return;
                                                              }
                                                          Severity: Minor
                                                          Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 55 mins to fix

                                                          Cognitive Complexity

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

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

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

                                                          Further reading

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

                                                          function refreshPower(xml) {
                                                              if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('power', blocks) < 0))) {
                                                                  $("#power").remove();
                                                                  return;
                                                              }
                                                          Severity: Minor
                                                          Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 55 mins to fix

                                                          Cognitive Complexity

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

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

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

                                                          Further reading

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

                                                          function refreshFans(xml) {
                                                              if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('fans', blocks) < 0))) {
                                                                  $("#fans").remove();
                                                                  return;
                                                              }
                                                          Severity: Minor
                                                          Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 55 mins to fix

                                                          Cognitive Complexity

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

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

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

                                                          Further reading

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                              if (bps > Math.pow(1000, 1)) {
                                                                                  show += round(bps / Math.pow(1000, 1), 2);
                                                                                  show += String.fromCharCode(160) + 'Kb/s';
                                                                              } else {
                                                                                      show += bps;
                                                          Severity: Major
                                                          Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                if (bytes > Math.pow(1000, 2)) {
                                                                                    show += round(bytes / Math.pow(1000, 2), 2);
                                                                                    show += "&nbsp;" + genlang(40);
                                                                                } else {
                                                                                    if (bytes > Math.pow(1000, 1)) {
                                                            Severity: Major
                                                            Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                  if (bytes > Math.pow(1024, 2)) {
                                                                                      show += round(bytes / Math.pow(1024, 2), 2);
                                                                                      show += "&nbsp;" + genlang(88);
                                                                                  } else {
                                                                                      if (bytes > Math.pow(1024, 1)) {
                                                              Severity: Major
                                                              Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 45 mins to fix

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

                                                                function getLanguage(plugin, langarrId) {
                                                                    var getLangUrl = "";
                                                                    if (current_language) {
                                                                        getLangUrl = 'language/language.php?lang=' + current_language;
                                                                        if (plugin) {
                                                                Severity: Minor
                                                                Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 45 mins to fix

                                                                Cognitive Complexity

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

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

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

                                                                Further reading

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

                                                                function refreshHardware(xml) {
                                                                    if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('hardware', blocks) < 0))) {
                                                                        $("#hardware").remove();
                                                                        return;
                                                                    }
                                                                Severity: Minor
                                                                Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 45 mins to fix

                                                                Cognitive Complexity

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

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

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

                                                                Further reading

                                                                Consider simplifying this complex logical expression.
                                                                Open

                                                                        if (prunning || psleeping || pstopped || pzombie || pwaiting || pother) {
                                                                            $("#s_processes_1").append(" (");
                                                                            $("#s_processes_2").append(" (");
                                                                            var typelist = {running:111,sleeping:112,stopped:113,zombie:114,waiting:115,other:116};
                                                                            for (var proc_type in typelist) {
                                                                Severity: Major
                                                                Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 40 mins to fix

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

                                                                  function refreshOther(xml) {
                                                                      if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('other', blocks) < 0))) {
                                                                          $("#other").remove();
                                                                          return;
                                                                      }
                                                                  Severity: Minor
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 35 mins to fix

                                                                  Cognitive Complexity

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

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

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

                                                                  Further reading

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

                                                                  function round(x, n) {
                                                                      var e = 0, k = "";
                                                                      if (n < 0 || n > 14) {
                                                                          return 0;
                                                                      }
                                                                  Severity: Minor
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 25 mins to fix

                                                                  Cognitive Complexity

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

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

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

                                                                  Further reading

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

                                                                  function full_addr(ip_string) {
                                                                      var wrongvalue = false;
                                                                      ip_string = $.trim(ip_string).toLowerCase();
                                                                      // ipv4 notation
                                                                      if (ip_string.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$)/)) {
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 3 days to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 442..507

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

                                                                  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 formatBPS(bps) {
                                                                      var show = "";
                                                                  
                                                                      if (bps > Math.pow(1000, 5)) {
                                                                          show += round(bps / Math.pow(1000, 5), 2);
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 2 days to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1770..1801

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

                                                                  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 datetime() {
                                                                      var date, day = 0, month = 0, year = 0, hour = 0, minute = 0, days = "", months = "", years = "", hours = "", minutes = "";
                                                                      date = new Date();
                                                                      day = date.getDate();
                                                                      month = date.getMonth() + 1;
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 day to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1817..1834

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

                                                                  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 (bytes > Math.pow(1024, 5)) {
                                                                              show += round(bytes / Math.pow(1024, 5), 2);
                                                                              show += "&nbsp;" + genlang(90);
                                                                          } else {
                                                                              if (bytes > Math.pow(1024, 4)) {
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 day to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 466..492

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

                                                                  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 (bytes > Math.pow(1000, 5)) {
                                                                              show += round(bytes / Math.pow(1000, 5), 2);
                                                                              show += "&nbsp;" + genlang(91);
                                                                          } else {
                                                                              if (bytes > Math.pow(1000, 4)) {
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 day to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 495..521

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

                                                                  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 genlang(id, plugin) {
                                                                      var html = "", idString = "", plugname = "",
                                                                          langarrId = current_language + "_";
                                                                  
                                                                      if (plugin === undefined) {
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 day to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 111..145

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

                                                                  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 round(x, n) {
                                                                      var e = 0, k = "";
                                                                      if (n < 0 || n > 14) {
                                                                          return 0;
                                                                      }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 7 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1843..1859

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

                                                                  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

                                                                          success: function buildblocks(xml) {
                                                                              var idexp;
                                                                              langxml[langarrId] = xml;
                                                                              if (langarr[langarrId] === undefined) {
                                                                                  langarr.push(langarrId);
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 6 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 89..101

                                                                  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

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

                                                                  function createCookie(name, value, days) {
                                                                      var date = new Date(), expires = "";
                                                                      if (days) {
                                                                          date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
                                                                          if (typeof(date.toUTCString)==="function") {
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 6 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 11..25

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

                                                                  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

                                                                          $('span[class*=lang_]').each(function translate(i) {
                                                                              langId = this.className.substring(5);
                                                                              if (langId.indexOf('plugin_') !== 0) { //does not begin with plugin_
                                                                                  langStr = langarr[langarrId][langId];
                                                                                  if (langStr !== undefined) {
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 4 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 176..186

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

                                                                  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

                                                                          $('span[class*=lang_plugin_'+plugin.toLowerCase()+'_]').each(function translate(i) {
                                                                              langId = this.className.substring(5);
                                                                              langStr = langarr[langarrId][langId];
                                                                              if (langStr !== undefined) {
                                                                                  if (langStr.length > 0) {
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 3 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 191..199

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

                                                                  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 changeLanguage(plugin) {
                                                                      var langarrId = current_language + "_";
                                                                  
                                                                      if (plugin === undefined) {
                                                                          langarrId += "phpSysInfo";
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 3 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 154..169

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

                                                                  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 (i = 0; i < ca.length; i++) {
                                                                          c = ca[i];
                                                                          while (c.charAt(0) === ' ') {
                                                                              c = c.substring(1, c.length);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 2 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 37..45

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 91.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                  Array.prototype.pushIfNotExist = function(val) {
                                                                      if (typeof(val) == 'undefined' || val === '') {
                                                                          return;
                                                                      }
                                                                      val = $.trim(val);
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 2 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1803..1811

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

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

                                                                      $("#HardwareTree").jqTreeTable(tree, {
                                                                          openImg: "./gfx/treeTable/tv-collapsable.gif",
                                                                          shutImg: "./gfx/treeTable/tv-expandable.gif",
                                                                          leafImg: "./gfx/treeTable/tv-item.gif",
                                                                          lastOpenImg: "./gfx/treeTable/tv-collapsable-last.gif",
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 7 other locations - About 2 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1042..1056
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1165..1179
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1596..1610
                                                                  phpsysinfo/plugins/bat/js/bat.js on lines 165..179
                                                                  phpsysinfo/plugins/ps/js/ps.js on lines 93..107
                                                                  phpsysinfo/plugins/snmppinfo/js/snmppinfo.js on lines 110..124
                                                                  phpsysinfo/plugins/stablebit/js/stablebit.js on lines 158..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 82.

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

                                                                      $("#MemoryTree").jqTreeTable(tree, {
                                                                          openImg: "./gfx/treeTable/tv-collapsable.gif",
                                                                          shutImg: "./gfx/treeTable/tv-expandable.gif",
                                                                          leafImg: "./gfx/treeTable/tv-item.gif",
                                                                          lastOpenImg: "./gfx/treeTable/tv-collapsable-last.gif",
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 7 other locations - About 2 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 933..947
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1042..1056
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1596..1610
                                                                  phpsysinfo/plugins/bat/js/bat.js on lines 165..179
                                                                  phpsysinfo/plugins/ps/js/ps.js on lines 93..107
                                                                  phpsysinfo/plugins/snmppinfo/js/snmppinfo.js on lines 110..124
                                                                  phpsysinfo/plugins/stablebit/js/stablebit.js on lines 158..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 82.

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

                                                                      if (isinfo) $("#NetworkTree").jqTreeTable(tree, {
                                                                          openImg: "./gfx/treeTable/tv-collapsable.gif",
                                                                          shutImg: "./gfx/treeTable/tv-expandable.gif",
                                                                          leafImg: "./gfx/treeTable/tv-item.gif",
                                                                          lastOpenImg: "./gfx/treeTable/tv-collapsable-last.gif",
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 7 other locations - About 2 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 933..947
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1165..1179
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1596..1610
                                                                  phpsysinfo/plugins/bat/js/bat.js on lines 165..179
                                                                  phpsysinfo/plugins/ps/js/ps.js on lines 93..107
                                                                  phpsysinfo/plugins/snmppinfo/js/snmppinfo.js on lines 110..124
                                                                  phpsysinfo/plugins/stablebit/js/stablebit.js on lines 158..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 82.

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

                                                                          $("#UPSTree").jqTreeTable(tree, {
                                                                              openImg: "./gfx/treeTable/tv-collapsable.gif",
                                                                              shutImg: "./gfx/treeTable/tv-expandable.gif",
                                                                              leafImg: "./gfx/treeTable/tv-item.gif",
                                                                              lastOpenImg: "./gfx/treeTable/tv-collapsable-last.gif",
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 7 other locations - About 2 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 933..947
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1042..1056
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1165..1179
                                                                  phpsysinfo/plugins/bat/js/bat.js on lines 165..179
                                                                  phpsysinfo/plugins/ps/js/ps.js on lines 93..107
                                                                  phpsysinfo/plugins/snmppinfo/js/snmppinfo.js on lines 110..124
                                                                  phpsysinfo/plugins/stablebit/js/stablebit.js on lines 158..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 82.

                                                                  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 (cookie_template !== null) {
                                                                              old_template = $("#template").val();
                                                                              $("#template").val(cookie_template);
                                                                              if ($("#template").val() === null) {
                                                                                  $("#template").val(old_template);
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 2 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 410..416

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

                                                                  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 (((diff = rx - oldnetwork[name].rx) > 0) && ((difftime = timestamp - oldnetwork[name].timestamp) > 0)) {
                                                                                  if (showNetworkActiveSpeed == 2) {
                                                                                      htmlrx ="<br><i>("+formatBPS(round(8*diff/difftime, 2))+")</i>";
                                                                                  } else {
                                                                                      htmlrx ="<br><i>("+formatBytes(round(diff/difftime, 2), xml)+"/s)</i>";
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 2 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 998..1004

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

                                                                  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 (((diff = tx - oldnetwork[name].tx) > 0) && (difftime > 0)) {
                                                                                  if (showNetworkActiveSpeed == 2) {
                                                                                      htmltx ="<br><i>("+formatBPS(round(8*diff/difftime, 2))+")</i>";
                                                                                  } else {
                                                                                      htmltx ="<br><i>("+formatBytes(round(diff/difftime, 2), xml)+"/s)</i>";
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 2 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 991..997

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                              for (i = 0; i < blocks.length; i++) {
                                                                                  if ($("#"+blocks[i]).length > 0) {
                                                                                      $("#output").children().eq(j).before($("#"+blocks[i]));
                                                                                      j++;
                                                                                  }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 2 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 353..358

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

                                                                  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

                                                                          $("#template").change(function changeTemplate() {
                                                                              switchStyle($("#template").val().toString());
                                                                              createCookie('psi_template', $("#template").val().toString(), 365);
                                                                              return false;
                                                                          });
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 2 hrs to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 421..425

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

                                                                  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

                                                                          html += "<tr><td style=\"width:200px;\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(28) + "</span></div></td><td style=\"width:285px;\">" + createBar(percent) + "</td><td class=\"right\" style=\"width:100px;\">" + formatBytes(free, xml) + "</td><td class=\"right\" style=\"width:100px;\">" + formatBytes(used, xml) + "</td><td class=\"right\" style=\"width:100px;\">" + formatBytes(total, xml) + "</td></tr>";
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1136..1136

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 70.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          html += "<tr><td style=\"width:200px;\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(29) + "</span></div></td><td style=\"width:285px;\">" + createBar(percent) + "</td><td class=\"right\" style=\"width:100px;\">" + formatBytes(free, xml) + "</td><td class=\"right\" style=\"width:100px;\">" + formatBytes(used, xml) + "</td><td class=\"right\" style=\"width:100px;\">" + formatBytes(total, xml) + "</td></tr>";
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1100..1100

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 70.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                              if (!isNaN(cached)) {
                                                                                  html += "<tr><td style=\"width:184px;\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(66) + "</span></div></td><td style=\"width:285px;\">" + createBar(cachedp) + "</td><td class=\"right\" style=\"width:100px;\">&nbsp;</td><td class=\"right\" style=\"width:100px;\">" + formatBytes(cached, xml) + "</td><td class=\"right\" style=\"width:100px;\">&nbsp;</td></tr>";
                                                                                  tree.push(memoryindex);
                                                                              }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 2 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1111..1114
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1119..1122

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                              if (!isNaN(app)) {
                                                                                  html += "<tr><td style=\"width:184px;\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(64) + "</span></div></td><td style=\"width:285px;\">" + createBar(appp) + "</td><td class=\"right\" style=\"width:100px;\">&nbsp;</td><td class=\"right\" style=\"width:100px\">" + formatBytes(app, xml) + "</td><td class=\"right\" style=\"width:100px;\">&nbsp;</td></tr>";
                                                                                  tree.push(memoryindex);
                                                                              }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 2 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1115..1118
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1119..1122

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                              if (!isNaN(buff)) {
                                                                                  html += "<tr><td style=\"width:184px;\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(65) + "</span></div></td><td style=\"width:285px\">" + createBar(buffp) + "</td><td class=\"rigth\" style=\"width:100px;\">&nbsp;</td><td class=\"right\" style=\"width:100px;\">" + formatBytes(buff, xml) + "</td><td class=\"right\" style=\"width:100px;\">&nbsp;</td></tr>";
                                                                                  tree.push(memoryindex);
                                                                              }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 2 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1111..1114
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1115..1118

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

                                                                  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 (current_language) {
                                                                          getLangUrl = 'language/language.php?lang=' + current_language;
                                                                          if (plugin) {
                                                                              getLangUrl += "&plugin=" + plugin;
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 67..77

                                                                  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

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

                                                                          $("#currentTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + round(value, 2) + "&nbsp;" + genlang(106) + "</td><td class=\"right\">" + _min + "</td><td class=\"right\">" + _max + "</td></tr>");
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1333..1333

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

                                                                  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

                                                                          $("#voltageTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + round(value, 2) + "&nbsp;" + genlang(62) + "</td><td class=\"right\">" + _min + "</td><td class=\"right\">" + _max + "</td></tr>");
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1440..1440

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

                                                                  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 (showNetworkActiveSpeed) {
                                                                          while (oldnetwork.length > 0) {
                                                                              delete oldnetwork[oldnetwork.length-1]; //remove last object
                                                                              oldnetwork.pop(); //remove last object reference from array
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1186..1192

                                                                  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

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

                                                                          if (line_frequency !== undefined) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(108) + "</span></div></td><td>" + line_frequency + "&nbsp;" + genlang(109) + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 3 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1556..1559
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1572..1575
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1580..1583

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

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

                                                                          if (time_left_minutes !== undefined) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(81) + "</span></div></td><td>" + time_left_minutes + "&nbsp;" + genlang(83) + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 3 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1556..1559
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1560..1563
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1572..1575

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

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

                                                                          if (battery_voltage !== undefined) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(79) + "</span></div></td><td>" + battery_voltage + "&nbsp;" + genlang(82) + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 3 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1556..1559
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1560..1563
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1580..1583

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

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

                                                                          if (line_voltage !== undefined) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(77) + "</span></div></td><td>" + line_voltage + "&nbsp;" + genlang(82) + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 3 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1560..1563
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1572..1575
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1580..1583

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

                                                                  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

                                                                          $("#fansTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + round(value,0) + "&nbsp;" + genlang(63) + "</td><td class=\"right\">" + _min + "</td></tr>");
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1401..1401

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

                                                                  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 (!isNaN(cache)) {
                                                                              html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(15) + ":</span></div></td><td>" + formatBytes(cache, xml) + "</td></tr>\n";
                                                                              tree.push(cpucoreposition);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 855..858

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

                                                                  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 (!isNaN(capacity)) {
                                                                              html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(43) + ":</span></div></td><td>" + formatBytes(capacity, xml) + "</td></tr>\n";
                                                                              tree.push(devcoreposition);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 785..788

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

                                                                  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

                                                                          $("#powerTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + round(value, 2) + "&nbsp;" + genlang(103) + "</td><td class=\"right\">" + _limit + "</td></tr>");
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1367..1367

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

                                                                  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

                                                                      switch ($("#showNetworkActiveSpeed").val().toString()) {
                                                                          case "bps":  showNetworkActiveSpeed = 2;
                                                                                        break;
                                                                          case "true": showNetworkActiveSpeed = 1;
                                                                                        break;
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 1 other location - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 338..344

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (!isNaN(load_percent)) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(78) + "</span></div></td><td>" + createBar(load_percent) + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 5 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 773..776
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 777..780
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 781..784
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 793..796
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1576..1579

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (!isNaN(bus)) {
                                                                              html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(14) + ":</span></div></td><td>" + formatHertz(bus) + "</td></tr>\n";
                                                                              tree.push(cpucoreposition);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 5 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 773..776
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 777..780
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 781..784
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1564..1567
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1576..1579

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (!isNaN(speedmin)) {
                                                                              html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(101) + ":</span></div></td><td>" + formatHertz(speedmin) + "</td></tr>\n";
                                                                              tree.push(cpucoreposition);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 5 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 773..776
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 777..780
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 793..796
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1564..1567
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1576..1579

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (!isNaN(speed)) {
                                                                              html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(13) + ":</span></div></td><td>" + formatHertz(speed) + "</td></tr>\n";
                                                                              tree.push(cpucoreposition);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 5 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 777..780
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 781..784
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 793..796
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1564..1567
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1576..1579

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (!isNaN(speedmax)) {
                                                                              html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(100) + ":</span></div></td><td>" + formatHertz(speedmax) + "</td></tr>\n";
                                                                              tree.push(cpucoreposition);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 5 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 773..776
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 781..784
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 793..796
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1564..1567
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1576..1579

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (!isNaN(battery_charge_percent)) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(80) + "</span></div></td><td>" + createBar(battery_charge_percent) + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 5 other locations - About 1 hr to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 773..776
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 777..780
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 781..784
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 793..796
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1564..1567

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

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

                                                                          if (temperature !== undefined) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(84) + "</span></div></td><td>" + temperature + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 11 other locations - About 40 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 789..792
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 859..862
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 863..866
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 867..870
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1528..1531
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1532..1535
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1536..1539
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1544..1547
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1548..1551
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1552..1555
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1568..1571

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 49.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (battery_date !== undefined) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(104) + "</span></div></td><td>" + battery_date + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 11 other locations - About 40 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 789..792
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 859..862
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 863..866
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 867..870
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1528..1531
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1532..1535
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1536..1539
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1540..1543
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1544..1547
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1548..1551
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1552..1555

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 49.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (outages_count !== undefined) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(74) + "</span></div></td><td>" + outages_count + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 11 other locations - About 40 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 789..792
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 859..862
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 863..866
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 867..870
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1528..1531
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1532..1535
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1536..1539
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1540..1543
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1548..1551
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1552..1555
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1568..1571

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 49.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (upsstatus !== undefined) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(73) + "</span></div></td><td>" + upsstatus + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 11 other locations - About 40 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 789..792
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 859..862
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 863..866
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 867..870
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1528..1531
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1532..1535
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1540..1543
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1544..1547
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1548..1551
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1552..1555
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1568..1571

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 49.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (last_outage !== undefined) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(75) + "</span></div></td><td>" + last_outage + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 11 other locations - About 40 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 789..792
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 859..862
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 863..866
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 867..870
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1528..1531
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1532..1535
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1536..1539
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1540..1543
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1544..1547
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1552..1555
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1568..1571

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 49.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (last_outage_finish !== undefined) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(76) + "</span></div></td><td>" + last_outage_finish + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 11 other locations - About 40 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 789..792
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 859..862
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 863..866
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 867..870
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1528..1531
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1532..1535
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1536..1539
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1540..1543
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1544..1547
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1548..1551
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1568..1571

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 49.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (manufacturer!== undefined) {
                                                                              html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(122) + ":</span></div></td><td>" + manufacturer + "</td></tr>\n";
                                                                              tree.push(devcoreposition);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 11 other locations - About 40 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 789..792
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 863..866
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 867..870
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1528..1531
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1532..1535
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1536..1539
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1540..1543
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1544..1547
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1548..1551
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1552..1555
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1568..1571

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 49.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (serial !== undefined) {
                                                                              html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(124) + ":</span></div></td><td>" + serial + "</td></tr>\n";
                                                                              tree.push(devcoreposition);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 11 other locations - About 40 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 789..792
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 859..862
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 863..866
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1528..1531
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1532..1535
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1536..1539
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1540..1543
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1544..1547
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1548..1551
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1552..1555
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1568..1571

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 49.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (virt !== undefined) {
                                                                              html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(94) + ":</span></div></td><td>" + virt + "</td></tr>\n";
                                                                              tree.push(cpucoreposition);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 11 other locations - About 40 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 859..862
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 863..866
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 867..870
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1528..1531
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1532..1535
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1536..1539
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1540..1543
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1544..1547
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1548..1551
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1552..1555
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1568..1571

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 49.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (model !== undefined) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(70) + "</span></div></td><td>" + model + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 11 other locations - About 40 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 789..792
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 859..862
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 863..866
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 867..870
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1532..1535
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1536..1539
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1540..1543
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1544..1547
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1548..1551
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1552..1555
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1568..1571

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 49.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (start_time !== undefined) {
                                                                              html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(72) + "</span></div></td><td>" + start_time + "</td></tr>\n";
                                                                              tree.push(index);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 11 other locations - About 40 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 789..792
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 859..862
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 863..866
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 867..870
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1528..1531
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1536..1539
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1540..1543
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1544..1547
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1548..1551
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1552..1555
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1568..1571

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 49.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if (product !== undefined) {
                                                                              html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(123) + ":</span></div></td><td>" + product + "</td></tr>\n";
                                                                              tree.push(devcoreposition);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 11 other locations - About 40 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 789..792
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 859..862
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 867..870
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1528..1531
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1532..1535
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1536..1539
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1540..1543
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1544..1547
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1548..1551
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1552..1555
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1568..1571

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 49.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if ($(this).attr("ProcessesOther") !== undefined) {
                                                                              pother = parseInt($(this).attr("ProcessesOther"), 10);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 5 other locations - About 35 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 670..672
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 673..675
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 676..678
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 679..681
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 682..684

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 47.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if ($(this).attr("ProcessesStopped") !== undefined) {
                                                                              pstopped = parseInt($(this).attr("ProcessesStopped"), 10);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 5 other locations - About 35 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 670..672
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 673..675
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 679..681
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 682..684
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 685..687

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 47.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if ($(this).attr("ProcessesZombie") !== undefined) {
                                                                              pzombie = parseInt($(this).attr("ProcessesZombie"), 10);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 5 other locations - About 35 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 670..672
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 673..675
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 676..678
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 682..684
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 685..687

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 47.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if ($(this).attr("ProcessesWaiting") !== undefined) {
                                                                              pwaiting = parseInt($(this).attr("ProcessesWaiting"), 10);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 5 other locations - About 35 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 670..672
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 673..675
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 676..678
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 679..681
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 685..687

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 47.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if ($(this).attr("ProcessesRunning") !== undefined) {
                                                                              prunning = parseInt($(this).attr("ProcessesRunning"), 10);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 5 other locations - About 35 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 673..675
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 676..678
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 679..681
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 682..684
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 685..687

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 47.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          if ($(this).attr("ProcessesSleeping") !== undefined) {
                                                                              psleeping = parseInt($(this).attr("ProcessesSleeping"), 10);
                                                                          }
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 5 other locations - About 35 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 670..672
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 676..678
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 679..681
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 682..684
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 685..687

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 47.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      case "tb":
                                                                          show += round(bytes / Math.pow(1000, 4), 2);
                                                                          show += "&nbsp;" + genlang(85);
                                                                          break;
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 45.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      case "tib":
                                                                          show += round(bytes / Math.pow(1024, 4), 2);
                                                                          show += "&nbsp;" + genlang(86);
                                                                          break;
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 45.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      case "mb":
                                                                          show += round(bytes / Math.pow(1000, 2), 2);
                                                                          show += "&nbsp;" + genlang(40);
                                                                          break;
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 45.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      case "gib":
                                                                          show += round(bytes / Math.pow(1024, 3), 2);
                                                                          show += "&nbsp;" + genlang(87);
                                                                          break;
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 45.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      case "pb":
                                                                          show += round(bytes / Math.pow(1000, 5), 2);
                                                                          show += "&nbsp;" + genlang(91);
                                                                          break;
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 45.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      case "kb":
                                                                          show += round(bytes / Math.pow(1000, 1), 2);
                                                                          show += "&nbsp;" + genlang(39);
                                                                          break;
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 45.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      case "mib":
                                                                          show += round(bytes / Math.pow(1024, 2), 2);
                                                                          show += "&nbsp;" + genlang(88);
                                                                          break;
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 45.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      case "gb":
                                                                          show += round(bytes / Math.pow(1000, 3), 2);
                                                                          show += "&nbsp;" + genlang(41);
                                                                          break;
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 45.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      case "kib":
                                                                          show += round(bytes / Math.pow(1024, 1), 2);
                                                                          show += "&nbsp;" + genlang(89);
                                                                          break;
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 45.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      case "pib":
                                                                          show += round(bytes / Math.pow(1024, 5), 2);
                                                                          show += "&nbsp;" + genlang(90);
                                                                          break;
                                                                  Severity: Major
                                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
                                                                  phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

                                                                  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