alexminichino/trawell

View on GitHub

Showing 303 of 303 total issues

Function ExifRestore has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

var ExifRestore = function () {
  function ExifRestore() {
    _classCallCheck(this, ExifRestore);
  }

Severity: Minor
Found in src/main/resources/static/js/dropzone.js - About 6 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function ExifRestore has 156 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var ExifRestore = function () {
  function ExifRestore() {
    _classCallCheck(this, ExifRestore);
  }

Severity: Major
Found in src/main/resources/static/js/dropzone.js - About 6 hrs to fix

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

    $(document).ready(function () {
        $(".remove").click(function () {
            var idad = $(this).attr("id");
            custom_alert("Message","are you sure you want to eliminate this ad?")
            $.ajax({
    Severity: Major
    Found in src/main/resources/static/js/removeAd.js and 1 other location - About 5 hrs to fix
    src/main/resources/static/js/removeMyAd.js on lines 7..26

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

    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

       $(document).ready(function () {
        $(".remove").click(function () {
            var idad = $(this).attr("id");
            custom_alert("Message","Are you sure you want to eliminate this ad?")
            $.ajax({
    Severity: Major
    Found in src/main/resources/static/js/removeMyAd.js and 1 other location - About 5 hrs to fix
    src/main/resources/static/js/removeAd.js on lines 17..36

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

    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

    User has 42 methods (exceeds 20 allowed). Consider refactoring.
    Open

    @Entity
    @Inheritance(strategy = InheritanceType.JOINED)
    /**
     * @author Milione Vincent class a user on platform
     */
    Severity: Minor
    Found in src/main/java/com/trawell/models/User.java - About 5 hrs to fix

      Function init has 137 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          value: function init() {
            var _this3 = this;
      
            // In case it isn't set already
            if (this.element.tagName === "form") {
      Severity: Major
      Found in src/main/resources/static/js/dropzone.js - About 5 hrs to fix

        Function discover has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
        Open

        Dropzone.discover = function () {
          var dropzones = void 0;
          if (document.querySelectorAll) {
            dropzones = document.querySelectorAll(".dropzone");
          } else {
        Severity: Minor
        Found in src/main/resources/static/js/dropzone.js - About 5 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

              for (var _iterator17 = files, _isArray17 = true, _i18 = 0, _iterator17 = _isArray17 ? _iterator17 : _iterator17[Symbol.iterator]();;) {
                var _ref16;
        
                if (_isArray17) {
                  if (_i18 >= _iterator17.length) break;
        Severity: Major
        Found in src/main/resources/static/js/dropzone.js and 1 other location - About 5 hrs to fix
        src/main/resources/static/js/dropzone.js on lines 1666..1681

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

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

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

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

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

        Refactorings

        Further Reading

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

              for (var _iterator14 = files, _isArray14 = true, _i15 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) {
                var _ref13;
        
                if (_isArray14) {
                  if (_i15 >= _iterator14.length) break;
        Severity: Major
        Found in src/main/resources/static/js/dropzone.js and 1 other location - About 5 hrs to fix
        src/main/resources/static/js/dropzone.js on lines 1853..1868

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

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

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

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

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

        Refactorings

        Further Reading

        Function defaultPrefilter has 122 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function defaultPrefilter(elem, props, opts) {
                var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
                    isBox = "width" in props || "height" in props,
                    anim = this,
                    orig = {},
        Severity: Major
        Found in src/main/resources/static/js/jQuery.js - About 4 hrs to fix

          Function Callbacks has 121 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              jQuery.Callbacks = function(options) {
          
                  // Convert options from String-formatted to Object-formatted if needed
                  // (we check in cache first)
                  options = typeof options === "string" ?
          Severity: Major
          Found in src/main/resources/static/js/jQuery.js - About 4 hrs to fix

            Function isBrowserSupported has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
            Open

            Dropzone.isBrowserSupported = function () {
              var capableBrowser = true;
            
              if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {
                if (!("classList" in document.createElement("a"))) {
            Severity: Minor
            Found in src/main/resources/static/js/dropzone.js - About 4 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

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

                   $.ajax({
                       dataType: "text",
                       url:"/api/itinerary/add",
                       headers:{
                        'Accept' : 'application/json',
            Severity: Major
            Found in src/main/resources/static/js/add&removeDestination.js and 1 other location - About 4 hrs to fix
            src/main/resources/static/js/send_carsharing.js on lines 44..60

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

            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

                        $.ajax({
                            dataType: "text",
                            url:"/api/carsharing/add",
                            headers:{
                             'Accept' : 'application/json',
            Severity: Major
            Found in src/main/resources/static/js/send_carsharing.js and 1 other location - About 4 hrs to fix
            src/main/resources/static/js/add&removeDestination.js on lines 40..56

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

            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

              }, {
                key: "setupEventListeners",
                value: function setupEventListeners() {
                  return this.listeners.map(function (elementListeners) {
                    return function () {
            Severity: Major
            Found in src/main/resources/static/js/dropzone.js and 1 other location - About 4 hrs to fix
            src/main/resources/static/js/dropzone.js on lines 1533..1550

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

            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

              }, {
                key: "removeEventListeners",
                value: function removeEventListeners() {
                  return this.listeners.map(function (elementListeners) {
                    return function () {
            Severity: Major
            Found in src/main/resources/static/js/dropzone.js and 1 other location - About 4 hrs to fix
            src/main/resources/static/js/dropzone.js on lines 1516..1533

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

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

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

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

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

            Refactorings

            Further Reading

            Function then has 102 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                                then: function(onFulfilled, onRejected, onProgress) {
                                    var maxDepth = 0;
            
                                    function resolve(depth, deferred, handler, special) {
                                        return function() {
            Severity: Major
            Found in src/main/resources/static/js/jQuery.js - About 4 hrs to fix

              Function Animation has 96 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function Animation(elem, properties, options) {
                      var result,
                          stopped,
                          index = 0,
                          length = Animation.prefilters.length,
              Severity: Major
              Found in src/main/resources/static/js/jQuery.js - About 3 hrs to fix

                Function isValidFile has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                Open

                Dropzone.isValidFile = function (file, acceptedFiles) {
                  if (!acceptedFiles) {
                    return true;
                  } // If there are no accepted mime types, it's OK
                  acceptedFiles = acceptedFiles.split(",");
                Severity: Minor
                Found in src/main/resources/static/js/dropzone.js - About 3 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function trigger has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        trigger: function(event, data, elem, onlyHandlers) {
                
                            var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
                                eventPath = [elem || document],
                                type = hasOwn.call(event, "type") ? event.type : event,
                Severity: Major
                Found in src/main/resources/static/js/jQuery.js - About 3 hrs to fix
                  Severity
                  Category
                  Status
                  Source
                  Language