oglimmer/lunchy

View on GitHub

Showing 111 of 111 total issues

UsersPicturesVotesRecord has 29 methods (exceeds 20 allowed). Consider refactoring.
Open

@Generated(
    value = {
        "http://www.jooq.org",
        "jOOQ version:3.7.2"
    },

    File LocationResource.java has 295 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    package de.oglimmer.lunchy.rest.resources;
    
    import java.io.IOException;
    import java.sql.Timestamp;
    import java.util.ArrayList;
    Severity: Minor
    Found in src/main/java/de/oglimmer/lunchy/rest/resources/LocationResource.java - About 3 hrs to fix

      File UsageStatisticsRecord.java has 294 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * This class is generated by jOOQ
       */
      package de.oglimmer.lunchy.database.generated.tables.records;
      
      

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

                var areacode = this.natural({min: 2, max: 9}).toString() +
                        this.natural({min: 0, max: 8}).toString() +
                        this.natural({min: 0, max: 9}).toString();
        Severity: Major
        Found in src/integration/js/chance.js and 1 other location - About 2 hrs to fix
        src/integration/js/chance.js on lines 705..707

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

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

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

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

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

        Refactorings

        Further Reading

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

                var exchange = this.natural({min: 2, max: 9}).toString() +
                        this.natural({min: 0, max: 9}).toString() +
                        this.natural({min: 0, max: 9}).toString();
        Severity: Major
        Found in src/integration/js/chance.js and 1 other location - About 2 hrs to fix
        src/integration/js/chance.js on lines 658..660

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

        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

            Chance.prototype.latitude = function (options) {
                options = initOptions(options, {fixed: 5, min: -90, max: 90});
                return this.floating({min: options.min, max: options.max, fixed: options.fixed});
            };
        Severity: Major
        Found in src/integration/js/chance.js and 1 other location - About 2 hrs to fix
        src/integration/js/chance.js on lines 694..697

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

        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

            Chance.prototype.longitude = function (options) {
                options = initOptions(options, {fixed: 5, min: -180, max: 180});
                return this.floating({min: options.min, max: options.max, fixed: options.fixed});
            };
        Severity: Major
        Found in src/integration/js/chance.js and 1 other location - About 2 hrs to fix
        src/integration/js/chance.js on lines 689..692

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

        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

        CommunitiesRecord has 24 methods (exceeds 20 allowed). Consider refactoring.
        Open

        @Generated(
            value = {
                "http://www.jooq.org",
                "jOOQ version:3.7.2"
            },

          LocationUsersEmailRecord has 24 methods (exceeds 20 allowed). Consider refactoring.
          Open

          @Generated(
              value = {
                  "http://www.jooq.org",
                  "jOOQ version:3.7.2"
              },

            DatabasechangeloglockRecord has 24 methods (exceeds 20 allowed). Consider refactoring.
            Open

            @Generated(
                value = {
                    "http://www.jooq.org",
                    "jOOQ version:3.7.2"
                },

              File ReviewsRecord.java has 273 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /**
               * This class is generated by jOOQ
               */
              package de.oglimmer.lunchy.database.generated.tables.records;
              
              

                Method values has 20 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public LocationRecord values(Integer value1, String value2, String value3, String value4, String value5, String value6, String value7, String value8, String value9, Integer value10, Timestamp value11, Timestamp value12, Integer value13, Double value14, Double value15, String value16, Integer value17, Integer value18, Byte value19, Integer value20) {

                  Method getHtml has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static String getHtml(UsersRecord rec, List<UpdatesQuery> updates, List<MailImage> images) {
                          StringBuilder body = new StringBuilder("<html><head><meta charset='utf-8'><style>" + HEAD_STYLE + "</style></head><body style='" + BODY_STYLE
                                  + "'>");
                          body.append("<div id='main' style='" + CONTENT_DIV_STYLE + "'>");
                          body.append("<h2>" + MessageFormat.format(greeting, rec.getDisplayname()) + "</h2>").append(BR);
                  Severity: Major
                  Found in src/main/java/de/oglimmer/lunchy/email/NotificationEmailText.java - About 2 hrs to fix

                    Method values has 17 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public UsersRecord values(Integer value1, String value2, String value3, String value4, Timestamp value5, Timestamp value6, Integer value7, String value8, Timestamp value9, String value10, Timestamp value11, Integer value12, Integer value13, Integer value14, Timestamp value15, Timestamp value16, String value17) {

                      Method values has 14 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public DatabasechangelogRecord values(String value1, String value2, String value3, Timestamp value4, Integer value5, String value6, String value7, String value8, String value9, String value10, String value11, String value12, String value13, String value14) {

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

                            $scope.search = function() {        
                                FinderDao.query(getRestParam(), function(result) {
                                    $scope.resultData = result;
                                });
                                UsageDao.register({action: 'finder', context: 'search'});
                        src/main/webapp/js/index/controllers/LunchyControllerFinder.js on lines 63..68

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

                        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

                            $scope.searchRandom = function() {
                                FinderDao.queryRandom(getRestParam(), function(result) {
                                    $scope.resultData = result;
                                });
                                UsageDao.register({action: 'finder', context: 'searchRandom'});
                        src/main/webapp/js/index/controllers/LunchyControllerFinder.js on lines 56..61

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

                        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

                            $scope.removeAll = function() {
                                $scope.data.exclTags = addTags($scope.data.exclTags, $scope.data.inclTags);
                                $scope.data.inclTags = "";
                            };
                        src/main/webapp/js/index/controllers/LunchyControllerFinder.js on lines 75..78

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

                            $scope.addAll = function() {
                                $scope.data.inclTags = addTags($scope.data.inclTags, $scope.data.exclTags);
                                $scope.data.exclTags = "";
                            };
                        src/main/webapp/js/index/controllers/LunchyControllerFinder.js on lines 70..73

                        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

                        Method values has 12 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            public UsageStatisticsRecord values(Integer value1, String value2, String value3, Timestamp value4, String value5, String value6, Integer value7, String value8, Integer value9, String value10, String value11, String value12) {
                          Severity
                          Category
                          Status
                          Source
                          Language