radare/radare2-webui

View on GitHub

Showing 2,691 of 2,691 total issues

Function del_frame has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  this.del_frame = function (name) {
    var prev = undefined;
    if (!name && this.curframe) {
      name = this.curframe[0].name;
    }
Severity: Minor
Found in www/t/js/tiled.js - About 1 hr to fix

    Function getChunk has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function getChunk(howManyBytes, addr, nbCols) {
        if (addr < 0) {
            return {
                offset: 0,
                hex: [],
    Severity: Minor
    Found in www/m/workers/hexchunkProvider.js - About 1 hr to fix

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

              header.appendChild(Inputs.button('Refs', () => {
                  statusMessage('Analyzing references...');
                  r2.cmd('aar', () => {
                      statusMessage('done');
                      this.draw();
      Severity: Major
      Found in www/m/js/widgets/FunctionsWidget.js and 5 other locations - About 1 hr to fix
      www/m/js/widgets/ClassesWidget.js on lines 37..43
      www/m/js/widgets/FunctionsWidget.js on lines 38..44
      www/m/js/widgets/FunctionsWidget.js on lines 46..52
      www/m/js/widgets/FunctionsWidget.js on lines 54..60
      www/m/js/widgets/FunctionsWidget.js on lines 70..76

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

      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

              header.appendChild(Inputs.button('Symbols', () => {
                  statusMessage('Analyzing symbols...');
                  r2.cmd('aa', () => {
                      statusMessage('done');
                      this.draw();
      Severity: Major
      Found in www/m/js/widgets/FunctionsWidget.js and 5 other locations - About 1 hr to fix
      www/m/js/widgets/ClassesWidget.js on lines 37..43
      www/m/js/widgets/FunctionsWidget.js on lines 46..52
      www/m/js/widgets/FunctionsWidget.js on lines 54..60
      www/m/js/widgets/FunctionsWidget.js on lines 62..68
      www/m/js/widgets/FunctionsWidget.js on lines 70..76

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

      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

              header.appendChild(Inputs.button('Calls', () => {
                  statusMessage('Analyzing calls...');
                  r2.cmd('aac', () => {
                      statusMessage('done');
                      this.draw();
      Severity: Major
      Found in www/m/js/widgets/FunctionsWidget.js and 5 other locations - About 1 hr to fix
      www/m/js/widgets/ClassesWidget.js on lines 37..43
      www/m/js/widgets/FunctionsWidget.js on lines 38..44
      www/m/js/widgets/FunctionsWidget.js on lines 54..60
      www/m/js/widgets/FunctionsWidget.js on lines 62..68
      www/m/js/widgets/FunctionsWidget.js on lines 70..76

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

      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

              header.appendChild(Inputs.button('Function', () => {
                  statusMessage('Analyzing function...');
                  r2.cmd('af', () => {
                      statusMessage('done');
                      this.draw();
      Severity: Major
      Found in www/m/js/widgets/FunctionsWidget.js and 5 other locations - About 1 hr to fix
      www/m/js/widgets/ClassesWidget.js on lines 37..43
      www/m/js/widgets/FunctionsWidget.js on lines 38..44
      www/m/js/widgets/FunctionsWidget.js on lines 46..52
      www/m/js/widgets/FunctionsWidget.js on lines 62..68
      www/m/js/widgets/FunctionsWidget.js on lines 70..76

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

      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

              header.appendChild(Inputs.button('AutoName', () => {
                  statusMessage('Analyzing names...');
                  r2.cmd('.afna @@ fcn.*', () => {
                      statusMessage('done');
                      this.draw();
      Severity: Major
      Found in www/m/js/widgets/FunctionsWidget.js and 5 other locations - About 1 hr to fix
      www/m/js/widgets/ClassesWidget.js on lines 37..43
      www/m/js/widgets/FunctionsWidget.js on lines 38..44
      www/m/js/widgets/FunctionsWidget.js on lines 46..52
      www/m/js/widgets/FunctionsWidget.js on lines 54..60
      www/m/js/widgets/FunctionsWidget.js on lines 62..68

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

      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

              header.appendChild(Inputs.button('Refresh', () => {
                  statusMessage('Analyzing symbols...');
                  r2.cmd('aa', () => {
                      statusMessage('done');
                      this.draw();
      Severity: Major
      Found in www/m/js/widgets/ClassesWidget.js and 5 other locations - About 1 hr to fix
      www/m/js/widgets/FunctionsWidget.js on lines 38..44
      www/m/js/widgets/FunctionsWidget.js on lines 46..52
      www/m/js/widgets/FunctionsWidget.js on lines 54..60
      www/m/js/widgets/FunctionsWidget.js on lines 62..68
      www/m/js/widgets/FunctionsWidget.js on lines 70..76

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

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

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

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

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

      Refactorings

      Further Reading

      Function on_hex_scroll has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function on_hex_scroll() {
          if (!r2ui._hex.scrolling) {
              r2ui._hex.scrolling = true;
              var scroll_offset = $('#center_panel').scrollTop();
              var top_offset = $('.hexoffset').height() - $('#center_panel').height();
      Severity: Minor
      Found in www/p/lib/js/panels/hex_panel.js - About 1 hr to fix

        Function draw has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            draw() {
                const nbVals = this.entropy.length;
                if (nbVals < 1) {
                    return;
                }
        Severity: Minor
        Found in www/m/js/modules/overview/EntropyCard.js - About 1 hr to fix

          Function modalShell has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function modalShell () {
            var body = html.div('modal_body');
            var out = html.div('modal_output', '', {
              overflow: 'hidden',
              backgroundColor: 'red',
          Severity: Minor
          Found in www/t/js/modals.js - About 1 hr to fix

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

                colorizeFlag(reset) {
                    if (!this.showFlags) {
                        return;
                    }
            
            
            Severity: Minor
            Found in www/m/js/modules/hexdump/Hexdump.js - About 1 hr to fix

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

                  do_rename: function(element) {
                      if (this.renaming === null && this.selected !== null && this.selected.className.indexOf(' addr ') > -1) {
                          var address = get_address_from_class(this.selected);
                          this.renaming = this.selected;
                          this.renameOldValue = this.selected.innerHTML;
              Severity: Minor
              Found in www/enyo/js/disassembler.js - About 1 hr to fix

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

                    getFlags(minSize, callback) {
                        var filter = function(flags) {
                            var filteredFlags = [];
                            for (var i = 0 ; i < flags.length ; i++) {
                                if (flags[i].size >= minSize) {
                Severity: Minor
                Found in www/m/js/modules/hexdump/HexPairNavigator.js - About 1 hr to fix

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

                  export class DisassemblyBlocksWidget extends BasePreWidget {
                      constructor() {
                          super(
                              'Blocks',
                              x => formatOffsets(x),
                  Severity: Major
                  Found in www/m/js/widgets/DisassemblyBlocksWidget.js and 2 other locations - About 1 hr to fix
                  www/m/js/widgets/DisassemblyDecompileWidget.js on lines 10..18
                  www/m/js/widgets/DisassemblyFunctionsFullWidget.js on lines 10..18

                  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

                      _('cmd_' + ctr).onclick = function () {
                        t.key = 'div_' + ctr;
                        t.cmd = prompt("lala");
                        t.update();
                      };
                  Severity: Major
                  Found in www/t/js/main.js and 1 other location - About 1 hr to fix
                  www/t/js/main.js on lines 507..511

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

                  export class DisassemblyFunctionsFullWidget extends BasePreWidget {
                      constructor() {
                          super(
                              'Functions (full)',
                              x => formatOffsets(x),
                  Severity: Major
                  Found in www/m/js/widgets/DisassemblyFunctionsFullWidget.js and 2 other locations - About 1 hr to fix
                  www/m/js/widgets/DisassemblyBlocksWidget.js on lines 10..18
                  www/m/js/widgets/DisassemblyDecompileWidget.js on lines 10..18

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

                  export class DisassemblyDecompileWidget extends BasePreWidget {
                      constructor() {
                          super(
                              'Decompile',
                              x => formatOffsets(x),
                  Severity: Major
                  Found in www/m/js/widgets/DisassemblyDecompileWidget.js and 2 other locations - About 1 hr to fix
                  www/m/js/widgets/DisassemblyBlocksWidget.js on lines 10..18
                  www/m/js/widgets/DisassemblyFunctionsFullWidget.js on lines 10..18

                  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

                      _('cmd_' + ctr).onclick = function () {
                        t.key = 'div_' + ctr;
                        t.cmd = prompt("pene");
                        t.update();
                      };
                  Severity: Major
                  Found in www/t/js/main.js and 1 other location - About 1 hr to fix
                  www/t/js/main.js on lines 475..479

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 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

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

                  TypesPanel.prototype.insertData = function(k, v, array) {
                      if (typeof array === 'undefined') { array = this.data; };
                      var kt = k[0].trim();
                  
                      if (k.length == 1) {
                  Severity: Minor
                  Found in www/p/lib/js/panels/types_panel.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language