macool/jquery-ecuador-id-validator

View on GitHub
lib/jasmine-1.3.1/jasmine.js

Summary

Maintainability
F
2 wks
Test Coverage

File jasmine.js has 1624 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var isCommonJS = typeof window == "undefined" && typeof exports == "object";

/**
 * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
 *
Severity: Major
Found in lib/jasmine-1.3.1/jasmine.js - About 4 days to fix

    Function matcherFn_ has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
    Open

    jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
      return function() {
        var matcherArgs = jasmine.util.argsToArray(arguments);
        var result = matcherFunction.apply(this, arguments);
    
    
    Severity: Minor
    Found in lib/jasmine-1.3.1/jasmine.js - About 6 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 next_ has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    jasmine.Queue.prototype.next_ = function() {
      var self = this;
      var goAgain = true;
    
      while (goAgain) {
    Severity: Minor
    Found in lib/jasmine-1.3.1/jasmine.js - About 4 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 compareObjects_ has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

    jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
      if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
        return true;
      }
    
    
    Severity: Minor
    Found in lib/jasmine-1.3.1/jasmine.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 format has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

    jasmine.PrettyPrinter.prototype.format = function(value) {
      this.ppNestLevel_++;
      try {
        if (value === jasmine.undefined) {
          this.emitScalar('undefined');
    Severity: Minor
    Found in lib/jasmine-1.3.1/jasmine.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 equals_ has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

    jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
      mismatchKeys = mismatchKeys || [];
      mismatchValues = mismatchValues || [];
    
      for (var i = 0; i < this.equalityTesters_.length; i++) {
    Severity: Minor
    Found in lib/jasmine-1.3.1/jasmine.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 next_ has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    jasmine.Queue.prototype.next_ = function() {
      var self = this;
      var goAgain = true;
    
      while (goAgain) {
    Severity: Minor
    Found in lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

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

      jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
        mismatchKeys = mismatchKeys || [];
        mismatchValues = mismatchValues || [];
      
        for (var i = 0; i < this.equalityTesters_.length; i++) {
      Severity: Minor
      Found in lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

        Function runFunctionsWithinRange has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

        jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
          var scheduledFunc;
          var funcsToRun = [];
          for (var timeoutKey in this.scheduledFunctions) {
            scheduledFunc = this.scheduledFunctions[timeoutKey];
        Severity: Minor
        Found in lib/jasmine-1.3.1/jasmine.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 compareRegExps_ has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

        jasmine.Env.prototype.compareRegExps_ = function(a, b, mismatchKeys, mismatchValues) {
          if (a.source != b.source)
            mismatchValues.push("expected pattern /" + b.source + "/ is not equal to the pattern /" + a.source + "/");
        
          if (a.ignoreCase != b.ignoreCase)
        Severity: Minor
        Found in lib/jasmine-1.3.1/jasmine.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 format has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        jasmine.PrettyPrinter.prototype.format = function(value) {
          this.ppNestLevel_++;
          try {
            if (value === jasmine.undefined) {
              this.emitScalar('undefined');
        Severity: Minor
        Found in lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

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

          jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
            return function() {
              var matcherArgs = jasmine.util.argsToArray(arguments);
              var result = matcherFunction.apply(this, arguments);
          
          
          Severity: Minor
          Found in lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

            Function toThrow has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
            Open

            jasmine.Matchers.prototype.toThrow = function(expected) {
              var result = false;
              var exception;
              if (typeof this.actual != 'function') {
                throw new Error('Actual is not a function');
            Severity: Minor
            Found in lib/jasmine-1.3.1/jasmine.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 jasmineMatches has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

            jasmine.Matchers.ObjectContaining.prototype.jasmineMatches = function(other, mismatchKeys, mismatchValues) {
              mismatchKeys = mismatchKeys || [];
              mismatchValues = mismatchValues || [];
            
              var env = jasmine.getEnv();
            Severity: Minor
            Found in lib/jasmine-1.3.1/jasmine.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 runFunctionsWithinRange has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
              var scheduledFunc;
              var funcsToRun = [];
              for (var timeoutKey in this.scheduledFunctions) {
                scheduledFunc = this.scheduledFunctions[timeoutKey];
            Severity: Minor
            Found in lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

              Function compareObjects_ has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
                if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
                  return true;
                }
              
              
              Severity: Minor
              Found in lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

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

                jasmine.WaitsForBlock.prototype.execute = function(onComplete) {
                  if (jasmine.VERBOSE) {
                    this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen'));
                  }
                  var latchFunctionResult;
                Severity: Minor
                Found in lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                      if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) {
                        return ["Expected function " + not + "to throw", expected ? expected.message || expected : "an exception", ", but it threw", exception.message || exception].join(' ');
                      } else {
                        return "Expected function to throw an exception.";
                      }
                  Severity: Major
                  Found in lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

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

                    jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() {
                      var runner = this.env.currentRunner();
                      var i;
                    
                      for (var suite = this.suite; suite; suite = suite.parentSuite) {
                    Severity: Minor
                    Found in lib/jasmine-1.3.1/jasmine.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 iterateObject has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                    jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
                      for (var property in obj) {
                        if (!obj.hasOwnProperty(property)) continue;
                        if (property == '__Jasmine_been_here_before__') continue;
                        fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined && 
                    Severity: Minor
                    Found in lib/jasmine-1.3.1/jasmine.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

                    Avoid deeply nested control flow statements.
                    Open

                                if (i > 0) message += ",";
                    Severity: Major
                    Found in lib/jasmine-1.3.1/jasmine.js - About 45 mins to fix

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

                      jasmine.NestedResults.prototype.addResult = function(result) {
                        if (result.type != 'log') {
                          if (result.items_) {
                            this.rollupCounts(result);
                          } else {
                      Severity: Minor
                      Found in lib/jasmine-1.3.1/jasmine.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 WaitsForBlock has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
                      Severity: Minor
                      Found in lib/jasmine-1.3.1/jasmine.js - About 35 mins to fix

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

                        jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
                          var summaryMessages = [];
                          var messagesLength = result.messages.length;
                          for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) {
                            var resultMessage = result.messages[messageIndex];
                        Severity: Minor
                        Found in lib/jasmine-1.3.1/jasmine.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 formatException has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                        jasmine.util.formatException = function(e) {
                          var lineNumber;
                          if (e.line) {
                            lineNumber = e.line;
                          }
                        Severity: Minor
                        Found in lib/jasmine-1.3.1/jasmine.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

                        Avoid too many return statements within this function.
                        Open

                            return (a == b);
                        Severity: Major
                        Found in lib/jasmine-1.3.1/jasmine.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return a.matches(b);
                          Severity: Major
                          Found in lib/jasmine-1.3.1/jasmine.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                              return other instanceof this.expectedClass;
                            Severity: Major
                            Found in lib/jasmine-1.3.1/jasmine.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                  return this.compareObjects_(a, b, mismatchKeys, mismatchValues);
                              Severity: Major
                              Found in lib/jasmine-1.3.1/jasmine.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                    return this.compareRegExps_(a, b, mismatchKeys, mismatchValues);
                                Severity: Major
                                Found in lib/jasmine-1.3.1/jasmine.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                      return b.matches(a);
                                  Severity: Major
                                  Found in lib/jasmine-1.3.1/jasmine.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                        return b.jasmineMatches(a);
                                    Severity: Major
                                    Found in lib/jasmine-1.3.1/jasmine.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          return a.jasmineMatches(b);
                                      Severity: Major
                                      Found in lib/jasmine-1.3.1/jasmine.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                            return (a == b);
                                        Severity: Major
                                        Found in lib/jasmine-1.3.1/jasmine.js - About 30 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                              return a.getTime() == b.getTime();
                                          Severity: Major
                                          Found in lib/jasmine-1.3.1/jasmine.js - About 30 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                              return (a === b);
                                            Severity: Major
                                            Found in lib/jasmine-1.3.1/jasmine.js - About 30 mins to fix

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

                                              jasmine.Env.prototype.contains_ = function(haystack, needle) {
                                                if (jasmine.isArray_(haystack)) {
                                                  for (var i = 0; i < haystack.length; i++) {
                                                    if (this.equals_(haystack[i], needle)) return true;
                                                  }
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.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

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

                                              jasmine.MessageResult.prototype.toString = function() {
                                                var text = "";
                                                for (var i = 0; i < this.values.length; i++) {
                                                  if (i > 0) text += " ";
                                                  if (jasmine.isString_(this.values[i])) {
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.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

                                              jasmine.getGlobal().setTimeout = function(funcToCall, millis) {
                                                if (jasmine.Clock.installed.setTimeout.apply) {
                                                  return jasmine.Clock.installed.setTimeout.apply(this, arguments);
                                                } else {
                                                  return jasmine.Clock.installed.setTimeout(funcToCall, millis);
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 3 hrs to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1736..1742

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

                                              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

                                              jasmine.getGlobal().setInterval = function(funcToCall, millis) {
                                                if (jasmine.Clock.installed.setInterval.apply) {
                                                  return jasmine.Clock.installed.setInterval.apply(this, arguments);
                                                } else {
                                                  return jasmine.Clock.installed.setInterval(funcToCall, millis);
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 3 hrs to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1728..1734

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

                                              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

                                              jasmine.getGlobal().clearInterval = function(timeoutKey) {
                                                if (jasmine.Clock.installed.clearTimeout.apply) {
                                                  return jasmine.Clock.installed.clearInterval.apply(this, arguments);
                                                } else {
                                                  return jasmine.Clock.installed.clearInterval(timeoutKey);
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 2 hrs to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1744..1750

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

                                              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

                                              jasmine.getGlobal().clearTimeout = function(timeoutKey) {
                                                if (jasmine.Clock.installed.clearTimeout.apply) {
                                                  return jasmine.Clock.installed.clearTimeout.apply(this, arguments);
                                                } else {
                                                  return jasmine.Clock.installed.clearTimeout(timeoutKey);
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 2 hrs to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1752..1758

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

                                              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

                                              jasmine.Queue.prototype.add = function(block, ensure) {
                                                if (ensure === jasmine.undefined) {
                                                  ensure = false;
                                                }
                                              
                                              
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 2 hrs to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 2018..2025

                                              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

                                              jasmine.Queue.prototype.addBefore = function(block, ensure) {
                                                if (ensure === jasmine.undefined) {
                                                  ensure = false;
                                                }
                                              
                                              
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 2 hrs to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 2027..2034

                                              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

                                              jasmine.Env.prototype.afterEach = function(afterEachFunction) {
                                                if (this.currentSuite) {
                                                  this.currentSuite.afterEach(afterEachFunction);
                                                } else {
                                                  this.currentRunner_.afterEach(afterEachFunction);
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 835..841

                                              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

                                              jasmine.Env.prototype.beforeEach = function(beforeEachFunction) {
                                                if (this.currentSuite) {
                                                  this.currentSuite.beforeEach(beforeEachFunction);
                                                } else {
                                                  this.currentRunner_.beforeEach(beforeEachFunction);
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 847..854

                                              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

                                                  for (i = 0; i < suite.after_.length; i++) {
                                                    this.queue.add(new jasmine.Block(this.env, suite.after_[i], this), true);
                                                  }
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 2401..2403

                                              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

                                                for (i = 0; i < runner.after_.length; i++) {
                                                  this.queue.add(new jasmine.Block(this.env, runner.after_[i], this), true);
                                                }
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 2397..2399

                                              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

                                                for (i = 0; i < runner.before_.length; i++) {
                                                  this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this));
                                                }
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 2386..2388

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

                                                  for (i = 0; i < suite.before_.length; i++) {
                                                    this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this));
                                                  }
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 2390..2392

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

                                              jasmine.Spec.prototype.runs = function (func) {
                                                var block = new jasmine.Block(this.env, func, this);
                                                this.addToQueue(block);
                                                return this;
                                              };
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 2281..2285

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 59.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                              jasmine.Spec.prototype.waits = function(timeout) {
                                                var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this);
                                                this.addToQueue(waitsFunc);
                                                return this;
                                              };
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 2248..2252

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 59.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                    mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual.");
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1567..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 2 locations. Consider refactoring.
                                              Open

                                                    mismatchValues.push("'" + property + "' was '" + (other[property] ? jasmine.util.htmlEscape(other[property].toString()) : other[property]) + "' in expected, but was '" + (this.sample[property] ? jasmine.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + "' in actual.");
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 927..927

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

                                                this.message = function() {
                                                  return [
                                                    "Expected spy " + this.actual.identity + " to not have been called.",
                                                    "Expected spy " + this.actual.identity + " to have been called."
                                                  ];
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 55 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1364..1369

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

                                              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

                                                this.message = function() {
                                                  return [
                                                    "Expected spy " + this.actual.identity + " to have been called.",
                                                    "Expected spy " + this.actual.identity + " not to have been called."
                                                  ];
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 55 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1391..1396

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

                                              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

                                              jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) {
                                                beforeEachFunction.typeName = 'beforeEach';
                                                this.before_.splice(0,0,beforeEachFunction);
                                              };
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 55 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 2153..2156

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

                                              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

                                              jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
                                                afterEachFunction.typeName = 'afterEach';
                                                this.after_.splice(0,0,afterEachFunction);
                                              };
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 55 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 2148..2151

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

                                              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

                                                self.setInterval = function(funcToCall, millis) {
                                                  self.timeoutsMade++;
                                                  self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true);
                                                  return self.timeoutsMade;
                                                };
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 50 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1584..1588

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

                                              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

                                                self.setTimeout = function(funcToCall, millis) {
                                                  self.timeoutsMade++;
                                                  self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false);
                                                  return self.timeoutsMade;
                                                };
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 50 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1590..1594

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

                                              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

                                              jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
                                                beforeEachFunction.typeName = 'beforeEach';
                                                this.before_.unshift(beforeEachFunction);
                                              };
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 50 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 2487..2490

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

                                              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

                                              jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
                                                afterEachFunction.typeName = 'afterEach';
                                                this.after_.unshift(afterEachFunction);
                                              };
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 50 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 2482..2485

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

                                              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

                                              jasmine.Matchers.prototype.toContain = function(expected) {
                                                return this.env.contains_(this.actual, expected);
                                              };
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 40 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1272..1274

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

                                              jasmine.Matchers.prototype.toEqual = function(expected) {
                                                return this.env.equals_(this.actual, expected);
                                              };
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 40 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1451..1453

                                              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

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

                                                if (!jasmine.isSpy(this.actual)) {
                                                  throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
                                                }
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 40 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1360..1362
                                              lib/jasmine-1.3.1/jasmine.js on lines 1409..1411
                                              lib/jasmine-1.3.1/jasmine.js on lines 1432..1434

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

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

                                                if (!jasmine.isSpy(this.actual)) {
                                                  throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
                                                }
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 40 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1360..1362
                                              lib/jasmine-1.3.1/jasmine.js on lines 1387..1389
                                              lib/jasmine-1.3.1/jasmine.js on lines 1432..1434

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

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

                                                if (!jasmine.isSpy(this.actual)) {
                                                  throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
                                                }
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 40 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1387..1389
                                              lib/jasmine-1.3.1/jasmine.js on lines 1409..1411
                                              lib/jasmine-1.3.1/jasmine.js on lines 1432..1434

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

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

                                                if (!jasmine.isSpy(this.actual)) {
                                                  throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
                                                }
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 40 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1360..1362
                                              lib/jasmine-1.3.1/jasmine.js on lines 1387..1389
                                              lib/jasmine-1.3.1/jasmine.js on lines 1409..1411

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

                                              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

                                              jasmine.Matchers.prototype.toNotContain = function(expected) {
                                                return !this.env.contains_(this.actual, expected);
                                              };
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 35 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1281..1283

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 46.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                              jasmine.Matchers.prototype.toNotEqual = function(expected) {
                                                return !this.env.equals_(this.actual, expected);
                                              };
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 35 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 1461..1463

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 46.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                for (property in a) {
                                                  if (!hasKey(b, property) && hasKey(a, property)) {
                                                    mismatchKeys.push("expected missing key '" + property + "', but present in actual.");
                                                  }
                                                }
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 35 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 914..918

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 46.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                for (var property in b) {
                                                  if (!hasKey(a, property) && hasKey(b, property)) {
                                                    mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
                                                  }
                                                }
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 35 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 919..923

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 46.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                if (a.global != b.global)
                                                  mismatchValues.push("expected modifier g was" + (b.global ? " " : " not ") + "set and does not equal the origin modifier");
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 30 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 887..888
                                              lib/jasmine-1.3.1/jasmine.js on lines 893..894
                                              lib/jasmine-1.3.1/jasmine.js on lines 896..897

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

                                                if (a.ignoreCase != b.ignoreCase)
                                                  mismatchValues.push("expected modifier i was" + (b.ignoreCase ? " " : " not ") + "set and does not equal the origin modifier");
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 30 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 890..891
                                              lib/jasmine-1.3.1/jasmine.js on lines 893..894
                                              lib/jasmine-1.3.1/jasmine.js on lines 896..897

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

                                                if (a.multiline != b.multiline)
                                                  mismatchValues.push("expected modifier m was" + (b.multiline ? " " : " not ") + "set and does not equal the origin modifier");
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 30 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 887..888
                                              lib/jasmine-1.3.1/jasmine.js on lines 890..891
                                              lib/jasmine-1.3.1/jasmine.js on lines 896..897

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

                                                if (a.sticky != b.sticky)
                                                  mismatchValues.push("expected modifier y was" + (b.sticky ? " " : " not ") + "set and does not equal the origin modifier");
                                              Severity: Major
                                              Found in lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 30 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 887..888
                                              lib/jasmine-1.3.1/jasmine.js on lines 890..891
                                              lib/jasmine-1.3.1/jasmine.js on lines 893..894

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

                                                if (e.sourceURL) {
                                                  file = e.sourceURL;
                                                }
                                                else if (e.fileName) {
                                                  file = e.fileName;
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 30 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 670..675

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

                                                if (e.line) {
                                                  lineNumber = e.line;
                                                }
                                                else if (e.lineNumber) {
                                                  lineNumber = e.lineNumber;
                                              Severity: Minor
                                              Found in lib/jasmine-1.3.1/jasmine.js and 1 other location - About 30 mins to fix
                                              lib/jasmine-1.3.1/jasmine.js on lines 679..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 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