betajs/betajs-media-components

View on GitHub
src/dynamics/video_recorder/recorder/states.js

Summary

Maintainability
F
3 wks
Test Coverage

File states.js has 1347 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Scoped.define("module:VideoRecorder.Dynamics.RecorderStates.State", [
    "base:States.State",
    "base:Events.ListenMixin",
    "base:Objs"
], function(State, ListenMixin, Objs, scoped) {
Severity: Major
Found in src/dynamics/video_recorder/recorder/states.js - About 3 days to fix

    Function _started has 113 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _started: function() {
                this.dyn.set("cancancel", true);
                this.dyn.set("loader_active", true);
                this.dyn.set("topmessage", this.dyn.string('please-wait'));
                this.dyn.set("message", this.dyn.string("prepare-covershot"));
    Severity: Major
    Found in src/dynamics/video_recorder/recorder/states.js - About 4 hrs to fix

      Function _started has 91 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _started: function() {
                  this.dyn.set("cancancel", true);
                  this.dyn.set("skipinitial", this.dyn.get("skipinitial") || this.dyn.get("skipinitialonrerecord"));
                  this.dyn.set("settingsvisible", false);
                  this.dyn.set("recordvisible", false);
      Severity: Major
      Found in src/dynamics/video_recorder/recorder/states.js - About 3 hrs to fix

        Function selectUpload has 83 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                selectUpload: function(file) {
                    if (this.dyn.get("popup")) {
                        this._popup();
                        return;
                    }
        Severity: Major
        Found in src/dynamics/video_recorder/recorder/states.js - About 3 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                              if ((data.width && this.dyn.get("minuploadingwidth") && this.dyn.get("minuploadingwidth") > data.width) ||
                                  (data.width && this.dyn.get("maxuploadingwidth") && this.dyn.get("maxuploadingwidth") < data.width) ||
                                  (data.height && this.dyn.get("minuploadingheight") && this.dyn.get("minuploadingheight") > data.height) ||
                                  (data.height && this.dyn.get("maxuploadingheight") && this.dyn.get("maxuploadingheight") < data.height)) {
                                  this.next("FatalError", {
          Severity: Critical
          Found in src/dynamics/video_recorder/recorder/states.js - About 2 hrs to fix

            Function _started has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _started: function() {
                        this.dyn.set("settingsvisible", true);
                        this.dyn.set("recordvisible", true);
                        this.dyn.set("rerecordvisible", false);
                        this.dyn.set("stopvisible", false);
            Severity: Major
            Found in src/dynamics/video_recorder/recorder/states.js - About 2 hrs to fix

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

                      _recursivelyDrawImage: function(canvas, thumbnails, ctx, w, h, image, index, promise, column, row) {
                          column = column || 0;
                          row = row || 0;
                          index = index || 0;
                          ctx.drawImage(image, column * w, row * h, w, h);
              Severity: Minor
              Found in src/dynamics/video_recorder/recorder/states.js - About 1 hr to fix

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

                        _started: function() {
                            this.dyn.set("message", "");
                            this.dyn.set("loaderlabel", "");
                            var startedRecording = false;
                            this.dyn._accessing_camera = true;
                Severity: Minor
                Found in src/dynamics/video_recorder/recorder/states.js - About 1 hr to fix

                  Function _recursivelyDrawImage has 10 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          _recursivelyDrawImage: function(canvas, thumbnails, ctx, w, h, image, index, promise, column, row) {
                  Severity: Major
                  Found in src/dynamics/video_recorder/recorder/states.js - About 1 hr to fix

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

                            _started: function() {
                                this.dyn.set("loadlabel", "");
                                this.dyn.trigger("verifying");
                                this.dyn.set("message", this.dyn.string("verifying") + "...");
                                this.dyn.set("playertopmessage", this.dyn.get("message"));
                    Severity: Minor
                    Found in src/dynamics/video_recorder/recorder/states.js - About 1 hr to fix

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

                              _drawIntoCanvas: function(thumbnails) {
                                  var promise = Promise.create();
                                  var w = thumbnails.width;
                                  var h = thumbnails.height;
                                  var imagesCount = thumbnails.images.length;
                      Severity: Minor
                      Found in src/dynamics/video_recorder/recorder/states.js - About 1 hr to fix

                        Function _started has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                _started: function() {
                                    this.dyn.set("settingsvisible", false);
                                    this.dyn.set("recordvisible", false);
                                    this.dyn.set("rerecordvisible", false);
                                    this.dyn.set("stopvisible", false);
                        Severity: Minor
                        Found in src/dynamics/video_recorder/recorder/states.js - About 1 hr to fix

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

                                  stop: function() {
                                      var minlimit = this.dyn.get("timeminlimit");
                                      if (minlimit) {
                                          var delta = (Time.now() - (this._startTime + this.dyn.__pauseDelta)) / 1000;
                                          if (delta < minlimit) {
                          Severity: Minor
                          Found in src/dynamics/video_recorder/recorder/states.js - About 1 hr to fix

                            Function _started has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    _started: function() {
                                        this.dyn.set("is_initial_state", true);
                                        this.dyn.set("verified", false);
                                        this.dyn.set("playbacksource", null);
                                        this.dyn.set("playbackposter", null);
                            Severity: Minor
                            Found in src/dynamics/video_recorder/recorder/states.js - About 1 hr to fix

                              Function _started has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      _started: function() {
                                          if (!this.dyn.isFormatSupported() || !this.dyn.get("allowtrim") || this.dyn.get("duration") < this.dyn.get("timeminlimit")) {
                                              if (!this.dyn.isFormatSupported()) {
                                                  this.dyn.set("allowtrim", false);
                                                  this.dyn.set("was_allowtrim", true);
                              Severity: Minor
                              Found in src/dynamics/video_recorder/recorder/states.js - About 1 hr to fix

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

                                Scoped.define("module:VideoRecorder.Dynamics.RecorderStates.RecordPrepare", [
                                    "module:VideoRecorder.Dynamics.RecorderStates.State",
                                    "base:Timers.Timer",
                                    "base:Time"
                                ], function(State, Timer, Time, scoped) {
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 4 days to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 426..504

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

                                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 ((data.width && this.dyn.get("minuploadingwidth") && this.dyn.get("minuploadingwidth") > data.width) ||
                                                        (data.width && this.dyn.get("maxuploadingwidth") && this.dyn.get("maxuploadingwidth") < data.width) ||
                                                        (data.height && this.dyn.get("minuploadingheight") && this.dyn.get("minuploadingheight") > data.height) ||
                                                        (data.height && this.dyn.get("maxuploadingheight") && this.dyn.get("maxuploadingheight") < data.height)) {
                                                        this.next("FatalError", {
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 1 day to fix
                                src/dynamics/image_capture/capture/states.js on lines 203..212

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

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

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

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

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

                                Refactorings

                                Further Reading

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

                                            if (this.dyn) {
                                                this.dyn.on("message-link-click", function(link) {
                                                    link.execute();
                                                    this.next("RequiredSoftwareWait");
                                                }, this);
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 2 other locations - About 7 hrs to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 286..299
                                src/dynamics/image_capture/capture/states.js on lines 268..281

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

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

                                            this.listenOn(uploader, "error", function(e) {
                                                var bestError = this.dyn.string("uploading-failed");
                                                try {
                                                    e.forEach(function(ee) {
                                                        for (var key in ee)
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 2 other locations - About 7 hrs to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 644..658
                                src/dynamics/image_capture/capture/states.js on lines 548..562

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

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

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

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

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

                                Refactorings

                                Further Reading

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

                                            this.listenOn(uploader, "progress", function(uploaded, total) {
                                                this.dyn.trigger("upload_progress", uploaded, total);
                                                if (total !== 0 && total > 0 && uploaded >= 0) {
                                                    var up = Math.min(100, Math.round(uploaded / total * 100));
                                                    if (!isNaN(up)) {
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 2 other locations - About 7 hrs to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 659..668
                                src/dynamics/image_capture/capture/states.js on lines 563..572

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

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

                                        _started: function() {
                                            this.listenOn(this.dyn, "change:orientation change:currentorientation", function() {
                                                var orientation = this.dyn.get("orientation");
                                                var currentorientation = this.dyn.get("currentorientation");
                                                var result = orientation && orientation !== currentorientation;
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 6 hrs to fix
                                src/dynamics/image_capture/capture/states.js on lines 144..156

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 167.

                                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 (data.duration && this.dyn.get("enforce-duration")) {
                                                        if ((this.dyn.get("timeminlimit") && data.duration < this.dyn.get("timeminlimit")) || (this.dyn.get("timelimit") && data.duration > this.dyn.get("timelimit"))) {
                                                            this.next("FatalError", {
                                                                message: this.dyn.string("upload-error-duration"),
                                                                retry: "Chooser"
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 5 hrs to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 199..207

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

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

                                            if (this.dyn.get("localplayback") && this.dyn.isFormatSupported()) {
                                                this.dyn.set("loader_active", false);
                                                this.dyn.set("message_active", false);
                                            } else {
                                                this.dyn.set("rerecordvisible", this.dyn.get("early-rerecord"));
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 2 other locations - About 4 hrs to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 714..721
                                src/dynamics/image_capture/capture/states.js on lines 618..625

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

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

                                                var timer = this.auto_destroy(new Timer({
                                                    start: true,
                                                    delay: 100,
                                                    context: this,
                                                    fire: function() {
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 3 hrs to fix
                                src/dynamics/image_capture/capture/states.js on lines 344..354

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

                                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

                                            Async.eventually(function() {
                                                this.dyn._stopRecording().success(function() {
                                                    this._hasStopped();
                                                    this.next("CovershotSelection");
                                                }, this).error(function(s) {
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 3 hrs to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 582..592

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

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

                                        record: function() {
                                            if (this.dyn.get("autorecord"))
                                                return;
                                            if (this.dyn.get("audio-test-mandatory") && !this.dyn.get("microphonehealthy") && !this._preparePromise)
                                                return;
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 2 hrs to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 412..420

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

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

                                        rerecord: function() {
                                            this.dyn._hideBackgroundSnapshot();
                                            this.dyn._detachRecorder();
                                            this.dyn.trigger("rerecord");
                                            this.dyn.set("recordermode", true);
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 2 hrs to fix
                                src/dynamics/video_recorder/recorder/states.js on lines 1537..1543

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

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

                                        rerecord: function() {
                                            this.dyn._hideBackgroundSnapshot();
                                            this.dyn._detachRecorder();
                                            this.dyn.trigger("rerecord");
                                            this.dyn.set("recordermode", true);
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 2 hrs to fix
                                src/dynamics/video_recorder/recorder/states.js on lines 1120..1126

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

                                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

                                        _started: function() {
                                            this.dyn._getFirstFrameSnapshot()
                                                .success(function(snapshot) {
                                                    this.startFrameSelection(snapshot);
                                                }, this)
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 2 hrs to fix
                                src/dynamics/video_recorder/recorder/states.js on lines 1030..1038

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

                                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 (this.dyn.get("trimoverlay")) {
                                                    this.dyn._getFirstFrameSnapshot()
                                                        .success(function(snapshot) {
                                                            this.showTrimmingOverlay(snapshot);
                                                        }, this)
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 2 hrs to fix
                                src/dynamics/video_recorder/recorder/states.js on lines 1199..1207

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

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

                                            var dynamic = this.auto_destroy(new this.dyn.cls({
                                                element: popup.containerInner,
                                                attrs: Objs.extend(this.dyn.cloneAttrs(), this.dyn.popupAttrs())
                                            }));
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 1 hr to fix
                                src/dynamics/video_player/player/states.js on lines 350..353

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

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

                                            this.listenOn(uploader, "success", function() {
                                                Async.eventually(function() {
                                                    if (this.destroyed())
                                                        return;
                                                    this._finished();
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 2 other locations - About 1 hr to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 636..643
                                src/dynamics/image_capture/capture/states.js on lines 540..547

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

                                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 (this.dyn.get("timeminlimit"))
                                                this.dyn.set("mintimeindicator", (Time.now() - this._startTime) / 1000 <= this.dyn.get("timeminlimit"));
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 1 hr to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 556..557

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

                                            try {
                                                this.dyn._videoFileName = file.files[0].name;
                                                this.dyn._videoFile = file.files[0];
                                            } catch (e) {}
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 2 other locations - About 1 hr to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 229..232
                                src/dynamics/image_capture/capture/states.js on lines 225..228

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 64.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                        _finished: function() {
                                            this.dyn.set("cancancel", false);
                                            this.dyn.trigger("uploaded");
                                            this.dyn.set("end-upload-time", Time.now());
                                        }
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 2 other locations - About 1 hr to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 690..694
                                src/dynamics/image_capture/capture/states.js on lines 594..598

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 64.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                            this.listenOn(this.dyn, "error", function(s) {
                                                this.next("FatalError", {
                                                    message: this.dyn.string("attach-error"),
                                                    retry: "Initial"
                                                });
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 5 other locations - About 1 hr to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 279..284
                                src/dynamics/audio_recorder/recorder/states.js on lines 365..370
                                src/dynamics/image_capture/capture/states.js on lines 261..266
                                src/dynamics/image_capture/capture/states.js on lines 356..361
                                src/dynamics/video_recorder/recorder/states.js on lines 748..753

                                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

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

                                            this.listenOn(this.dyn, "error", function(s) {
                                                this.next("FatalError", {
                                                    message: this.dyn.string("attach-error"),
                                                    retry: "Initial"
                                                });
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 5 other locations - About 1 hr to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 279..284
                                src/dynamics/audio_recorder/recorder/states.js on lines 365..370
                                src/dynamics/image_capture/capture/states.js on lines 261..266
                                src/dynamics/image_capture/capture/states.js on lines 356..361
                                src/dynamics/video_recorder/recorder/states.js on lines 635..640

                                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

                                            if (this.dyn.get("localplayback") === true) {
                                                this.dyn.set("localplayback", false);
                                                this.dyn.set("was_localplayback", true);
                                            }
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 1 hr to fix
                                src/dynamics/video_recorder/recorder/states.js on lines 434..437

                                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

                                            if (this.dyn.get("snapshotfromuploader") === true) {
                                                this.dyn.set("snapshotfromuploader", false);
                                                this.dyn.set("was_snapshotfromuploader", true);
                                            }
                                Severity: Major
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 1 hr to fix
                                src/dynamics/video_recorder/recorder/states.js on lines 430..433

                                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

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

                                                        this.dyn.trigger("video-trimmed", this.dyn.get("starttime"), this.dyn.get("endtime"), this.dyn.get("duration"));
                                Severity: Minor
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 55 mins to fix
                                src/dynamics/video_recorder/recorder/states.js on lines 1072..1072

                                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

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

                                                this.dyn.trigger("video-trimmed", this.dyn.get("starttime"), this.dyn.get("endtime"), this.dyn.get("duration"));
                                Severity: Minor
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 55 mins to fix
                                src/dynamics/video_recorder/recorder/states.js on lines 1044..1044

                                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

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

                                            this._timer = this.auto_destroy(new Timer({
                                                immediate: true,
                                                delay: this.__timerDelay,
                                                context: this,
                                                fire: this._timerFire
                                Severity: Minor
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 50 mins to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 536..541

                                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

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

                                            if (limit && this._startTime + limit * 1000 <= current) {
                                                this._timer.stop();
                                                this.stop();
                                            }
                                Severity: Minor
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 50 mins to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 559..562

                                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

                                            popup.on("hide", function() {
                                                this._delegatedRecorder = null;
                                                dynamic.destroy();
                                                popup.destroy();
                                            }, this);
                                Severity: Minor
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 40 mins to fix
                                src/dynamics/video_player/player/states.js on lines 356..360

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

                                                if (this.dyn.get("recordings"))
                                                    this.dyn.set("recordings", this.dyn.get("recordings") - 1);
                                Severity: Minor
                                Found in src/dynamics/video_recorder/recorder/states.js and 2 other locations - About 40 mins to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 725..726
                                src/dynamics/image_capture/capture/states.js on lines 629..630

                                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

                                            if ((this.dyn.get("picksnapshots") || this.dyn.get("custom-covershots")) && !this.dyn.get("onlyaudio")) {
                                Severity: Minor
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 35 mins to fix
                                src/dynamics/video_player/player/states.js on lines 917..917

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

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

                                            this.dyn.set("controlbarlabel", this.dyn.get("display-timer") ? TimeFormat.format(TimeFormat.ELAPSED_MINUTES_SECONDS, display) : "");
                                Severity: Minor
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 35 mins to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 550..550

                                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

                                            var display = Math.max(0, limit ? (this._startTime + limit * 1000 - current) : (current - this._startTime));
                                Severity: Minor
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 35 mins to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 548..548

                                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

                                                } else if (this.dyn.get("snapshotfromuploader") || (this.dyn.get("snapshotfrommobilecapture") && this.dyn.get("recordviafilecapture"))) {
                                                    this.next("CreateUploadCovershot");
                                                } else {
                                                    this._next(true);
                                                }
                                Severity: Minor
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 35 mins to fix
                                src/dynamics/video_recorder/recorder/states.js on lines 1388..1389

                                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

                                            if (this.dyn.get("early-rerecord") || (this.dyn.get("cancancel") && this.dyn.get("allowcancel")))
                                                this.dyn.set("controlbar_active", true);
                                Severity: Minor
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 35 mins to fix
                                src/dynamics/video_recorder/recorder/states.js on lines 1106..1110

                                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

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

                                                if (delta < minlimit) {
                                                    var limit = this.dyn.get("timelimit");
                                                    if (!limit || limit > delta)
                                                        return;
                                                }
                                Severity: Minor
                                Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 30 mins to fix
                                src/dynamics/audio_recorder/recorder/states.js on lines 569..573

                                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