Reactive-Extensions/RxJS

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

Summary

Maintainability
F
2 wks
Test Coverage

Showing 78 of 78 total issues

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 examples/testing/jasmine/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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 6 hrs to fix

    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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 4 hrs to fix

    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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 2 hrs to fix

    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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 2 hrs to fix

    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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 2 hrs to fix

    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 examples/testing/jasmine/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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

        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 examples/testing/jasmine/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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

        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 examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

            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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

            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 examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 55 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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 45 mins to fix

                    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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

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

                      Function WaitsForBlock has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

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

                        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 examples/testing/jasmine/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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 35 mins to fix

                        Avoid too many return statements within this function.
                        Open

                        return a.jasmineMatches(b);
                        Severity: Major
                        Found in examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 30 mins to fix

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 25 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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 25 mins to fix

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 3 hrs to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1721..1727

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 3 hrs to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1729..1735

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 2 hrs to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1737..1743

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 2 hrs to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1745..1751

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 2 hrs to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 2011..2018

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 2 hrs to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 2020..2027

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 833..839

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 845..852

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 2391..2393

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 2387..2389

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 2380..2382

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 2376..2378

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 2271..2275

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 2238..2242

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 925..925

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 1 hr to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1560..1560

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 55 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1384..1389

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 55 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1357..1362

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 55 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 2140..2143

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 55 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 2145..2148

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 50 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1577..1581

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 50 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1583..1587

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 50 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 2472..2475

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 50 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 2477..2480

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 40 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1444..1446

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 40 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1267..1269

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 40 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1380..1382
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1402..1404
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1425..1427

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 40 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1353..1355
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1380..1382
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1425..1427

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 40 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1353..1355
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1380..1382
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1402..1404

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 40 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1353..1355
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1402..1404
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1425..1427

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 35 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 917..921

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 35 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1454..1456

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 35 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 1276..1278

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 35 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 912..916

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 30 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 885..886
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 888..889
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 891..892

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 30 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 885..886
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 891..892
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 894..895

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 30 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 888..889
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 891..892
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 894..895

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 3 other locations - About 30 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 885..886
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 888..889
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 894..895

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 30 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 678..683

                                              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 examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js and 1 other location - About 30 mins to fix
                                              examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js on lines 669..674
                                              Category
                                              Status