alexminichino/trawell

View on GitHub

Showing 224 of 303 total issues

Function setOffset has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        setOffset: function(elem, options, i) {
            var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
                position = jQuery.css(elem, "position"),
                curElem = jQuery(elem),
                props = {};
Severity: Minor
Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

    Function getWidthOrHeight has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function getWidthOrHeight(elem, dimension, extra) {
    
            // Start with computed style
            var styles = getStyles(elem),
    
    Severity: Minor
    Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

      Function showHide has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function showHide(elements, show) {
              var display, elem,
                  values = [],
                  index = 0,
                  length = elements.length;
      Severity: Minor
      Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

        Function isValidFile has 33 lines of code (exceeds 25 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 1 hr to fix

          Function handler has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      handler: function(event) {
                          var notAsync, result,
                              saved = dataPriv.get(this, type);
          
                          if ((event.isTrigger & 1) && this[type]) {
          Severity: Minor
          Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

            Function fallback has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    fallback: function fallback() {
                      // This code should pass in IE7... :(
                      var messageElement = void 0;
                      this.element.className = this.element.className + " dz-browser-not-supported";
            
            
            Severity: Minor
            Found in src/main/resources/static/js/dropzone.js - About 1 hr to fix

              Method main has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static void main(String args[]) {
                      System.out.println("- Downloader started");
                      File baseDirectory = new File(args[0]);
                      System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
              
              
              Severity: Minor
              Found in .mvn/wrapper/MavenWrapperDownloader.java - About 1 hr 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 drawImageIOSFix has 10 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              var drawImageIOSFix = function drawImageIOSFix(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {
              Severity: Major
              Found in src/main/resources/static/js/dropzone.js - About 1 hr to fix

                Function load has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    jQuery.fn.load = function(url, params, callback) {
                        var selector, type, response,
                            self = this,
                            off = url.indexOf(" ");
                
                Severity: Minor
                Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

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

                      jQuery.speed = function(speed, easing, fn) {
                          var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
                              complete: fn || !fn && easing ||
                                  isFunction(speed) && speed,
                              duration: speed,
                  Severity: Minor
                  Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

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

                            removeClass: function(value) {
                                var classes, elem, cur, curValue, clazz, j, finalValue,
                                    i = 0;
                    
                                if (isFunction(value)) {
                    Severity: Minor
                    Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

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

                                  set: function(elem, value, extra) {
                                      var matches,
                                          styles = getStyles(elem),
                      
                                          // Only read styles.position if the test has a chance to fail
                      Severity: Minor
                      Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

                        Method answereComplaint has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            @PostMapping("/answereComplaint")
                            public String answereComplaint(@ModelAttribute Complaint complaint, Model model, HttpSession session)
                                    throws UnsupportedEncodingException{
                        
                                int i = (int) session.getAttribute("complaintPos");
                        Severity: Minor
                        Found in src/main/java/com/trawell/controllers/ComplaintController.java - About 1 hr to fix

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

                              value: function encode64(input) {
                                var output = '';
                                var chr1 = undefined;
                                var chr2 = undefined;
                                var chr3 = '';
                          Severity: Minor
                          Found in src/main/resources/static/js/dropzone.js - About 1 hr to fix

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

                                    attr: function(elem, name, value) {
                                        var ret, hooks,
                                            nType = elem.nodeType;
                            
                                        // Don't get/set attributes on text, comment and attribute nodes
                            Severity: Minor
                            Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

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

                                    var readEntries = function readEntries() {
                                      return dirReader.readEntries(function (entries) {
                                        if (entries.length > 0) {
                                          for (var _iterator16 = entries, _isArray16 = true, _i17 = 0, _iterator16 = _isArray16 ? _iterator16 : _iterator16[Symbol.iterator]();;) {
                                            var _ref15;
                              Severity: Minor
                              Found in src/main/resources/static/js/dropzone.js - About 1 hr to fix

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

                                        off: function(types, selector, fn) {
                                            var handleObj, type;
                                            if (types && types.preventDefault && types.handleObj) {
                                
                                                // ( event )  dispatched jQuery.Event
                                Severity: Minor
                                Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

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

                                      jQuery.parseHTML = function(data, context, keepScripts) {
                                          if (typeof data !== "string") {
                                              return [];
                                          }
                                          if (typeof context === "boolean") {
                                  Severity: Minor
                                  Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

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

                                            finish: function(type) {
                                                if (type !== false) {
                                                    type = type || "fx";
                                                }
                                                return this.each(function() {
                                    Severity: Minor
                                    Found in src/main/resources/static/js/jQuery.js - About 1 hr to fix

                                      Method banuser has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          @PostMapping("/banUser")
                                          public String banuser(@RequestParam(name = "username", required = true) String username,
                                                  @RequestParam(name = "motivation", required = true) String motivation,
                                                  @RequestParam(name = "bannedUntil", required = true) Date bannedUntil, HttpSession session, Model model)
                                                  throws UnsupportedEncodingException {
                                      Severity: Minor
                                      Found in src/main/java/com/trawell/controllers/AdminController.java - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language