alexminichino/trawell

View on GitHub

Showing 303 of 303 total issues

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

package com.trawell.services;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Optional;
Severity: Major
Found in src/main/java/com/trawell/services/PhotoService.java and 2 other locations - About 2 hrs to fix
src/main/java/com/trawell/services/AdService.java on lines 1..66
src/main/java/com/trawell/services/ComplaintService.java on lines 1..62

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

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

package com.trawell.services;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Optional;
Severity: Major
Found in src/main/java/com/trawell/services/ComplaintService.java and 2 other locations - About 2 hrs to fix
src/main/java/com/trawell/services/AdService.java on lines 1..66
src/main/java/com/trawell/services/PhotoService.java on lines 1..63

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

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

package com.trawell.services;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Optional;
Severity: Major
Found in src/main/java/com/trawell/services/AdService.java and 2 other locations - About 2 hrs to fix
src/main/java/com/trawell/services/ComplaintService.java on lines 1..62
src/main/java/com/trawell/services/PhotoService.java on lines 1..63

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

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 superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                    superMatcher = function(seed, context, xml, results, outermost) {
                        var elem, j, matcher,
                            matchedCount = 0,
                            i = "0",
                            unmatched = seed && [],
Severity: Major
Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

    Function Emitter has 64 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Emitter = function () {
      function Emitter() {
        _classCallCheck(this, Emitter);
      }
    
    
    Severity: Major
    Found in src/main/resources/static/js/dropzone.js - About 2 hrs to fix

      Function domManip has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function domManip(collection, args, callback, ignored) {
      
              // Flatten any nested arrays
              args = concat.apply([], args);
      
      Severity: Major
      Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

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

            function ajaxConvert(s, response, jqXHR, isSuccess) {
                var conv2, current, conv, tmp, prev,
                    converters = {},
        
                    // Work with a copy of dataTypes in case we need to modify it for conversion
        Severity: Major
        Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

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

                img.onload = function () {
                  var loadExif = function loadExif(callback) {
                    return callback(1);
                  };
                  if (typeof EXIF !== 'undefined' && EXIF !== null && fixOrientation) {
          Severity: Major
          Found in src/main/resources/static/js/dropzone.js - About 2 hrs to fix

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

                    init = jQuery.fn.init = function(selector, context, root) {
                        var match, elem;
            
                        // HANDLE: $(""), $(null), $(undefined), $(false)
                        if (!selector) {
            Severity: Major
            Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

              Function remove has 52 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      remove: function(elem, types, handler, selector, mappedTypes) {
              
                          var j, origCount, tmp,
                              events, t, handleObj,
                              special, handlers, type, namespaces, origType,
              Severity: Major
              Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

                Function discover has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Function buildFragment has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function buildFragment(elems, context, scripts, selection, ignored) {
                          var elem, tmp, tag, wrap, attached, j,
                              fragment = context.createDocumentFragment(),
                              nodes = [],
                              i = 0,
                  Severity: Major
                  Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

                    Consider simplifying this complex logical expression.
                    Open

                                        if ((mappedTypes || origType === handleObj.origType) &&
                                            (!handler || handler.guid === handleObj.guid) &&
                                            (!tmp || tmp.test(handleObj.namespace)) &&
                                            (!selector || selector === handleObj.selector ||
                                                selector === "**" && handleObj.selector)) {
                    Severity: Critical
                    Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

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

                              for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                                args[_key - 1] = arguments[_key];
                              }
                      Severity: Major
                      Found in src/main/resources/static/js/dropzone.js and 2 other locations - About 1 hr to fix
                      src/main/resources/static/js/dropzone.js on lines 986..988
                      src/main/resources/static/js/dropzone.js on lines 2263..2265

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

                      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

                            for (var _len2 = arguments.length, objects = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
                              objects[_key2 - 1] = arguments[_key2];
                            }
                      Severity: Major
                      Found in src/main/resources/static/js/dropzone.js and 2 other locations - About 1 hr to fix
                      src/main/resources/static/js/dropzone.js on lines 66..68
                      src/main/resources/static/js/dropzone.js on lines 2263..2265

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

                      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

                              for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
                                args[_key3 - 1] = arguments[_key3];
                              }
                      Severity: Major
                      Found in src/main/resources/static/js/dropzone.js and 2 other locations - About 1 hr to fix
                      src/main/resources/static/js/dropzone.js on lines 66..68
                      src/main/resources/static/js/dropzone.js on lines 986..988

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

                      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 tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  tokenize = Sizzle.tokenize = function(selector, parseOnly) {
                                      var matched, match, tokens, type,
                                          soFar, groups, preFilters,
                                          cached = tokenCache[selector + " "];
                      
                      Severity: Minor
                      Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

                        Function matcherFromTokens has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    function matcherFromTokens(tokens) {
                                        var checkContext, matcher, j,
                                            len = tokens.length,
                                            leadingRelative = Expr.relative[tokens[0].type],
                                            implicitRelative = leadingRelative || Expr.relative[" "],
                        Severity: Minor
                        Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

                          Function addCombinator has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      function addCombinator(matcher, combinator, base) {
                                          var dir = combinator.dir,
                                              skip = combinator.next,
                                              key = skip || dir,
                                              checkNonElements = base && key === "parentNode",
                          Severity: Minor
                          Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

                            Function val has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    val: function(value) {
                                        var hooks, ret, valueIsFunction,
                                            elem = this[0];
                            
                                        if (!arguments.length) {
                            Severity: Minor
                            Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language