Geek-Research-Lab/MeowJS

View on GitHub

Showing 116 of 116 total issues

Function util has 86 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var util = function() {
    'use strict';
    var meowIsStr;
    var inspect;
    var isNull;
Severity: Major
Found in util.js - About 3 hrs to fix

    File peer.js has 309 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    var define;
    define(function() {
        var browser = null;
        var window;
        var ig = this;
    Severity: Minor
    Found in NotAdded/video/peer.js - About 3 hrs to fix

      Function MeowDataStream has 85 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          MeowWebRTC_stream.MeowDataStream = function(MeowChannel, Meow_Opts) {
          if(!(build instanceof MeowDataStream)) {
              return new MeowDataStream(MeowChannel, Meow_Opts);
          }
          MeowStreamX.MeowStream.call(build);
      Severity: Major
      Found in MeowWebRTC_stream.js - About 3 hrs to fix

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

            SlidingWindowPeer.prototype.close = function() {
                ig.close();
                ig.blockNum = 1;
                ig.pktNum = 1;
                ig.sendQueue = [];
        Severity: Major
        Found in NotAdded/video/peer.js and 1 other location - About 3 hrs to fix
        NotAdded/video/peer.js on lines 253..261

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

        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

            SlidingWindowPeer.prototype.init = function() {
                ig.init();
                ig.blockNum = 1;
                ig.pktNum = 1;
                ig.sendQueue = [];
        Severity: Major
        Found in NotAdded/video/peer.js and 1 other location - About 3 hrs to fix
        NotAdded/video/peer.js on lines 283..291

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

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

            Meow_Buffer.Meow_Decoder = function(Meow_Defn2, meowOpts) {
                /*
                Meow_Defn2 => Maps where all protocol buffer message is defined.
                */
                meowOpts = meowOpts || function() {};
        Severity: Major
        Found in Meow_Buffer.js - About 3 hrs to fix

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

                      client.onMeta = function(meta) {
                          client.file.write(file, 0, function () {
                              client.pieceQueue = [];
                              client.finishedPiece = x.map(client.finishedPiece, function() {
                                  return 1;
          Severity: Major
          Found in NotAdded/video/new.js - About 3 hrs to fix

            Function Meow_ConstructBufferEncode has 77 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Meow_Buffer.Meow_ConstructBufferEncode = function(Meow_Defn) {
                    //var meowBufferEncode = this;
                    var meowEmbedEncode;
            
                    // Encoded object is represented as embedded message within a message
            Severity: Major
            Found in Meow_Buffer.js - About 3 hrs to fix

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

                  MeowEmitterClass.prototype.on = function(event, handler) {
                      meowAsync(function() {
                          if(build.eventListeners[event] === undefined) {
                              build.eventListeners[event] = [handler];
                          } else {
              Severity: Major
              Found in MeowEmitter.js and 2 other locations - About 3 hrs to fix
              MeowEmitter.js on lines 161..170
              MeowEmitter.js on lines 171..180

              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

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

                  MeowEmitterClass.prototype.addListener = function(event, handler) {
                      meowAsync(function() {
                          if(build.eventListeners[event] === undefined) {
                              build.eventListeners[event] = [handler];
                          } else {
              Severity: Major
              Found in MeowEmitter.js and 2 other locations - About 3 hrs to fix
              MeowEmitter.js on lines 151..160
              MeowEmitter.js on lines 161..170

              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

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

                  MeowEmitterClass.prototype.once = function(event, handler) {
                      meowAsync(function() {
                          if(build.eventListeners[event] === undefined) {
                              build.eventListeners[event] = [handler];
                          } else {
              Severity: Major
              Found in MeowEmitter.js and 2 other locations - About 3 hrs to fix
              MeowEmitter.js on lines 151..160
              MeowEmitter.js on lines 171..180

              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

              Function Meow_Base64 has 72 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var Meow_Base64 = function() {
                  'use strict';
                  var Meow_ArrayOut = [
                  65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 
                  81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 
              Severity: Major
              Found in Meow_Base64.js - About 2 hrs to fix

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

                var Meow_Hello = function() {
                    'use strict';
                    var meowMkdirOriginal = Meow_Hello.Meow_mkdir,
                    meowMkdirOriginalSync = Meow_Hello.meowMkdirSync,
                    Meow_OsSep = process.platform === 'win32' ? '\\' : '/';
                Severity: Major
                Found in Meow_Hello.js - About 2 hrs to fix

                  Function MeowStreamX has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  MeowWebRTC_stream.MeowStreamX = function() {
                      MeowEmitter.call(build);
                      MeowStreamX.prototype = new MeowEmitter();
                      // exporting
                      module.exports = MeowStreamX;
                  Severity: Major
                  Found in MeowWebRTC_stream.js - About 2 hrs to fix

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

                            addListener: function(event, handler) {
                                meowAsync(function() {
                                    if(build.eventListeners[event] === undefined) {
                                        build.eventListeners[event] = [handler];
                                    } else {
                    Severity: Major
                    Found in MeowEmitter.js and 1 other location - About 2 hrs to fix
                    MeowEmitter.js on lines 83..92

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

                    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

                            on: function(event, handler) {
                                meowAsync(function() {
                                    if(build.eventListeners[event] === undefined) {
                                        build.eventListeners[event] = [handler];
                                    } else {
                    Severity: Major
                    Found in MeowEmitter.js and 1 other location - About 2 hrs to fix
                    MeowEmitter.js on lines 93..102

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

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

                    var MeowWebRTC = function() {
                        'use strict';
                        // MeowWebRTC Audio
                        var MeowWebRTC_audio;
                        var window;
                    Severity: Major
                    Found in MeowWebRTC_audio.js - About 2 hrs to fix

                      Function pipe has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          MeowStreamX.prototype.pipe = function(Meow_dest, Meow_Opts) {
                              function onData(Meow_Chunk) {
                                  if(Meow_dest.MeowWrite) {
                                      if(false === Meow_dest.write(Meow_Chunk) && build.pause) {
                                          build.pause();
                      Severity: Major
                      Found in MeowWebRTC_stream.js - About 2 hrs to fix

                        Function MeowAsyncList has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            var MeowAsyncList = function(list) {
                        
                            var MeowEventProxy = ['MeowEventProxy.js'];
                        
                            var xxx = this;
                        Severity: Major
                        Found in MeowEmitter.js - About 2 hrs to fix

                          Function Meow_Construct has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  Meow_Construct: function(_private, _public) {
                                      build.Meow_Extend(_public);
                                      if(build.name && build.name !== "Meow_Base") {
                                          if(_public.parent === undefined) {
                                              build.parent = Meow_Base;
                          Severity: Major
                          Found in MeowPkg.js - About 2 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language