sebastian-software/core

View on GitHub

Showing 406 of 406 total issues

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

    checksum : (function()
    {
        var table =
    [
      0, 1996959894, 3993919788, 2567524794, 124634137, 1886057615, 3915621685, 2657392035, 249268274,
Severity: Minor
Found in source/class/core/crypt/CRC32.js - About 1 hr to fix

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

      __runNextSuite : function()
      {
        var previousSuite = this.__suites[this.__currentIndex];
        var currentSuite = this.__suites[++this.__currentIndex];
    
    
    Severity: Minor
    Found in source/class/core/testrunner/Controller.js - About 1 hr to fix

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

          var decompress64 = function(encodedText) {
              var marker = codePointAt(encodedText, 0);
              if ((marker >> 4) !== MARKERINT) {
                  return encodedText;
              }
      Severity: Minor
      Found in source/class/core/util/TextCompressor.js - About 1 hr to fix

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

          construct : function(nativeEvent, eventType)
          {
            // We use the touchpoint for touch events
            var isMouse = nativeEvent.type != null ? true : false;
        
        
        Severity: Minor
        Found in source/class/core/bom/event/type/Pointer.js - About 1 hr to fix

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

                  __onLoad : function() {
          
                      document.body.addEventListener('click', function(event) {
          
                          var element = event.target;
          Severity: Minor
          Found in source/class/core/apibrowser/Browser.js - About 1 hr to fix

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

                    getImage : function(id)
                    {
                        if (jasy.Env.isSet("debug")) {
                            core.Assert.isType(id, "String", "Invalid asset ID (no string): " + id + "!");
                        }
            Severity: Minor
            Found in source/class/core/io/Asset.js - About 1 hr to fix

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

                  createView : function(name, construct, varargs)
                  {
                    this.log("Creating view: " + name);
              
                    var db = this.__views;
              Severity: Minor
              Found in source/class/core/presenter/Abstract.js - About 1 hr to fix

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

                    removeView : function(view)
                    {
                      var db = this.__views;
                      for (var name in db)
                      {
                Severity: Major
                Found in source/class/core/presenter/Abstract.js and 1 other location - About 1 hr to fix
                source/class/core/presenter/Abstract.js on lines 132..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 67.

                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

                            result = any ? (whitespace ? "[\n" + indentation + results.join(",\n" + indentation) + "\n" + prefix + "]" : ("[" + results.join(",") + "]")) : "[]";
                Severity: Major
                Found in source/class/core/JSON.js and 1 other location - About 1 hr to fix
                source/class/core/JSON.js on lines 156..156

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

                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

                            result = any ? (whitespace ? "{\n" + indentation + results.join(",\n" + indentation) + "\n" + prefix + "}" : ("{" + results.join(",") + "}")) : "{}";
                Severity: Major
                Found in source/class/core/JSON.js and 1 other location - About 1 hr to fix
                source/class/core/JSON.js on lines 138..138

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

                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

                    removeModel : function(model)
                    {
                      var db = this.__models;
                      for (var name in db)
                      {
                Severity: Major
                Found in source/class/core/presenter/Abstract.js and 1 other location - About 1 hr to fix
                source/class/core/presenter/Abstract.js on lines 339..352

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

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

                    scrollTo: function(left, top, animate, zoom) {
                
                      var self = this;
                
                      // Stop deceleration
                Severity: Minor
                Found in source/class/core/ui/Scroller.js - About 1 hr to fix

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

                      isTrue : function(a, message)
                      {
                        try{
                          core.Assert.isTrue(a);
                        } catch(ex) {
                  Severity: Major
                  Found in source/class/core/testrunner/Test.js and 2 other locations - About 1 hr to fix
                  source/class/core/testrunner/Test.js on lines 196..205
                  source/class/core/testrunner/Test.js on lines 213..222

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

                      isFalse : function(a, message)
                      {
                        try{
                          core.Assert.isFalse(a);
                        } catch(ex) {
                  Severity: Major
                  Found in source/class/core/testrunner/Test.js and 2 other locations - About 1 hr to fix
                  source/class/core/testrunner/Test.js on lines 179..188
                  source/class/core/testrunner/Test.js on lines 213..222

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

                      isNull : function(a, message)
                      {
                        try{
                          core.Assert.isNull(a);
                        } catch(ex) {
                  Severity: Major
                  Found in source/class/core/testrunner/Test.js and 2 other locations - About 1 hr to fix
                  source/class/core/testrunner/Test.js on lines 179..188
                  source/class/core/testrunner/Test.js on lines 196..205

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

                          tokenize: function(text, nostrip)
                          {
                              if (jasy.Env.isSet("debug"))
                              {
                                  core.Assert.isType(text, "String", "Template text must be type of string.");
                  Severity: Minor
                  Found in source/class/core/template/Parser.js - About 1 hr to fix

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

                                if (jasy.Env.isSet("debug"))
                                {
                                    if (!entry) {
                                        throw new Error("Unknown image: " + id);
                                    }
                    Severity: Major
                    Found in source/class/core/io/Asset.js and 2 other locations - About 1 hr to fix
                    source/class/core/io/Asset.js on lines 288..297
                    source/class/core/io/Asset.js on lines 372..381

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 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 3 locations. Consider refactoring.
                    Open

                        var safeAdd = function(x, y)
                        {
                            var lsw = (x & 0xFFFF) + (y & 0xFFFF);
                            var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
                    
                    
                    Severity: Major
                    Found in source/class/core/crypt/MD5.js and 2 other locations - About 1 hr to fix
                    source/class/core/crypt/SHA1.js on lines 158..164
                    source/class/core/crypt/SHA256.js on lines 160..166

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

                        function safeAdd(x, y)
                        {
                            var lsw = (x & 0xFFFF) + (y & 0xFFFF);
                            var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
                    
                    
                    Severity: Major
                    Found in source/class/core/crypt/SHA1.js and 2 other locations - About 1 hr to fix
                    source/class/core/crypt/MD5.js on lines 205..211
                    source/class/core/crypt/SHA256.js on lines 160..166

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

                                if (jasy.Env.isSet("debug"))
                                {
                                    if (!entry) {
                                        throw new Error("Could not figure out frame number of unknown image: " + id);
                                    }
                    Severity: Major
                    Found in source/class/core/io/Asset.js and 2 other locations - About 1 hr to fix
                    source/class/core/io/Asset.js on lines 315..324
                    source/class/core/io/Asset.js on lines 372..381

                    Duplicated Code

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

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

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

                    Tuning

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

                    Severity
                    Category
                    Status
                    Source
                    Language