betajs/betajs-media-components

View on GitHub
src/dynamics/audio_recorder/recorder/recorder.js

Summary

Maintainability
F
6 days
Test Coverage

File recorder.js has 579 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Scoped.define("module:AudioRecorder.Dynamics.Recorder", [
    "dynamics:Dynamic",
    "module:Assets",
    "module:AudioVisualization",
    "browser:Info",
Severity: Major
Found in src/dynamics/audio_recorder/recorder/recorder.js - About 1 day to fix

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

                    _bindMedia: function() {
                        if (this._bound || !this.recorderAttached() || !this.recorder)
                            return;
                        this.recorder.ready.success(function() {
                            this.recorder.on("require_display", function() {
    Severity: Major
    Found in src/dynamics/audio_recorder/recorder/recorder.js - About 2 hrs to fix

      Function create has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      create: function() {
                          // Initialize AudioContext
                          WebRTCSupport.globals();
                          if (this.get("theme")) this.set("theme", this.get("theme").toLowerCase());
                          if (this.get("theme") in Assets.recorderthemes) {
      Severity: Minor
      Found in src/dynamics/audio_recorder/recorder/recorder.js - About 1 hr to fix

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

                        computed: {
                            "widthHeightStyles:width,height": function() {
                                var result = {};
                                var width = this.get("width");
                                var height = this.get("height");
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 1 other location - About 4 hrs to fix
        src/dynamics/image_viewer/viewer/image_viewer.js on lines 92..103

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

        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 (this.get("height") && this.get("height") > this.get("visualeffectminheight")) {
                                            this.set('visualeffectheight', this.get("height"));
                                        } else if (this.get("visualeffectheight") < this.get("visualeffectminheight")) {
                                            this.set('visualeffectheight', this.get("visualeffectminheight"));
                                        }
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 1 other location - About 3 hrs to fix
        src/dynamics/audio_player/player/player.js on lines 301..305

        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

                        _uploadAudioFile: function(file) {
                            if (this.get("simulate"))
                                return;
                            var uploader = FileUploader.create(Objs.extend({
                                source: file
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 1 other location - About 3 hrs to fix
        src/dynamics/video_recorder/recorder/recorder.js on lines 776..785

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

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

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

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

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

        Refactorings

        Further Reading

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

                                    this.recorder.enumerateDevices().success(function(devices) {
                                        var selected = this.recorder.currentDevices();
                                        this.set("selectedmicrophone", selected.audio);
                                        this.set("microphones", new Collection(Objs.values(devices.audio)));
                                    }, this);
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 1 other location - About 2 hrs to fix
        src/dynamics/image_capture/capture/capture.js on lines 345..349

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

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

                            if (this.get("theme") in Assets.recorderthemes) {
                                Objs.iter(Assets.recorderthemes[this.get("theme")], function(value, key) {
                                    if (!this.isArgumentAttr(key))
                                        this.set(key, value);
                                }, this);
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 5 other locations - About 2 hrs to fix
        src/dynamics/audio_player/player/player.js on lines 180..185
        src/dynamics/image_capture/capture/capture.js on lines 199..204
        src/dynamics/image_viewer/viewer/image_viewer.js on lines 117..122
        src/dynamics/video_player/player/player.js on lines 1033..1038
        src/dynamics/video_recorder/recorder/recorder.js on lines 372..377

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

        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.recorder.bindMedia().error(function(e) {
                                    this.trigger("access_forbidden", e);
                                    this.set("hideoverlay", false);
                                    this.off("require_display", null, this);
                                    this._error("bind", e);
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 2 other locations - About 2 hrs to fix
        src/dynamics/image_capture/capture/capture.js on lines 336..354
        src/dynamics/video_recorder/recorder/recorder.js on lines 628..666

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

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

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

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

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

        Refactorings

        Further Reading

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

                        _updateCSSSize: function() {
                            var width = Dom.elementDimensions(this.activeElement()).width;
                            this.set("csssize", width > 400 ? "normal" : (width > 300 ? "medium" : "small"));
                        },
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 3 other locations - About 1 hr to fix
        src/dynamics/audio_player/player/player.js on lines 653..656
        src/dynamics/image_capture/capture/capture.js on lines 527..530
        src/dynamics/image_viewer/viewer/image_viewer.js on lines 445..448

        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

                        _initializeUploader: function() {
                            if (this._audioUploader) this._audioUploader.weakDestroy();
                            if (this._dataUploader) this._dataUploader.weakDestroy();
                            this._dataUploader = new MultiUploader();
                        },
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 1 other location - About 1 hr to fix
        src/dynamics/video_recorder/recorder/recorder.js on lines 699..703

        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

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

                        _afterActivate: function(element) {
                            inherited._afterActivate.call(this, element);
                            this.__activated = true;
                            if (this.__attachRequested)
                                this._attachRecorder();
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 1 other location - About 1 hr to fix
        src/dynamics/image_capture/capture/capture.js on lines 402..408

        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

                            "change:webrtconmobile": function() {
                                this.set("recordviafilecapture", Info.isMobile() && (!this.get("webrtconmobile") || !AudioRecorderWrapper.anySupport(this._audioRecorderWrapperOptions())));
                            },
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 2 other locations - About 1 hr to fix
        src/dynamics/image_capture/capture/capture.js on lines 184..186
        src/dynamics/video_recorder/recorder/recorder.js on lines 346..348

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

                        _error: function(error_type, error_code) {
                            this.__error = {
                                error_type: error_type,
                                error_code: error_code
                            };
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 4 other locations - About 1 hr to fix
        src/dynamics/audio_player/player/player.js on lines 251..258
        src/dynamics/image_capture/capture/capture.js on lines 274..281
        src/dynamics/video_player/player/player.js on lines 1370..1377
        src/dynamics/video_recorder/recorder/recorder.js on lines 510..517

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

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

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

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

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

        Refactorings

        Further Reading

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

                        destroy: function() {
                            this._timer.destroy();
                            this.host.destroy();
                            this._detachRecorder();
                            inherited.destroy.call(this);
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 3 other locations - About 1 hr to fix
        src/dynamics/audio_player/player/player.js on lines 618..623
        src/dynamics/image_capture/capture/capture.js on lines 475..480
        src/dynamics/video_recorder/recorder/recorder.js on lines 1135..1140

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

        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

                        _softwareDependencies: function() {
                            if (!this.recorderAttached() || !this.recorder)
                                return Promise.error("No recorder attached.");
                            return this.recorder.softwareDependencies();
                        },
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 2 other locations - About 1 hr to fix
        src/dynamics/image_capture/capture/capture.js on lines 323..327
        src/dynamics/video_recorder/recorder/recorder.js on lines 614..618

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

        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

                        _detachRecorder: function() {
                            if (this.recorder)
                                this.recorder.weakDestroy();
                            this.recorder = null;
                            this.set("hasrecorder", false);
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 1 other location - About 1 hr to fix
        src/dynamics/image_capture/capture/capture.js on lines 287..292

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

                                if (this.get("recordviafilecapture")) {
                                    this.set("skipinitial", false);
                                    this.set("skipinitialonrerecord", false);
                                    this.set("autorecord", false);
                                }
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 2 other locations - About 50 mins to fix
        src/dynamics/audio_recorder/recorder/recorder.js on lines 211..215
        src/dynamics/image_capture/capture/capture.js on lines 211..215

        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

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

                            if (this.get("recordviafilecapture")) {
                                this.set("skipinitial", false);
                                this.set("skipinitialonrerecord", false);
                                this.set("autorecord", false);
                            }
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 2 other locations - About 50 mins to fix
        src/dynamics/audio_recorder/recorder/recorder.js on lines 185..189
        src/dynamics/image_capture/capture/capture.js on lines 211..215

        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

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

                            if (this.recorder) {
                                this.trigger("attached");
                                this.set("pausable", this.get("pausable") && this.recorder.canPause());
                            } else {
                                this._error("attach");
        Severity: Minor
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 1 other location - About 45 mins to fix
        src/dynamics/video_recorder/recorder/recorder.js on lines 607..611

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

        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 (confirm(this.stringUnicode("rerecord-confirm"))) {
                                    this.host.state().rerecord();
                                    this._initSettings();
                                }
        Severity: Minor
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 1 other location - About 45 mins to fix
        src/dynamics/video_recorder/recorder/recorder.js on lines 1039..1042

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

        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

                        _unbindMedia: function() {
                            if (!this._bound)
                                return;
                            this.recorder.unbindMedia();
                            this._bound = false;
        Severity: Minor
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 2 other locations - About 35 mins to fix
        src/dynamics/image_capture/capture/capture.js on lines 364..369
        src/dynamics/video_recorder/recorder/recorder.js on lines 705..710

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

                            manual_submit: function() {
                                this.set("rerecordable", false);
                                this.set("manualsubmit", false);
                                this.trigger("manually_submitted");
                            },
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 6 other locations - About 30 mins to fix
        src/dynamics/audio_player/controlbar/controlbar.js on lines 174..178
        src/dynamics/image_capture/capture/capture.js on lines 463..467
        src/dynamics/image_viewer/controlbar/controlbar.js on lines 37..41
        src/dynamics/video_player/controlbar/controlbar.js on lines 286..290
        src/dynamics/video_player/playbutton/playbutton.js on lines 35..39
        src/dynamics/video_recorder/recorder/recorder.js on lines 1114..1118

        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

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

                            return this.recorder.stopRecord({
                                audio: this.get("uploadoptions").audio,
                                webrtcStreaming: this.get("uploadoptions").webrtcStreaming,
                                noUploading: this.get("uploadoptions").noUploading
                            }).success(function(uploader) {
        Severity: Minor
        Found in src/dynamics/audio_recorder/recorder/recorder.js and 1 other location - About 30 mins to fix
        src/dynamics/video_recorder/recorder/recorder.js on lines 810..819

        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