Showing 239 of 795 total issues

Method processService has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    @Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_ANONYMOUS" })
    public SearchDocumentResponse processService(
            final SearchDocumentRequest serviceRequest) {
        final SearchDocumentResponse inputValidation = inputValidation(serviceRequest);

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

Method createPagingControls has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public void createPagingControls(final AbstractOrderedLayout content, final String name, final String pageId, final Long size, final int pageNr,
            final int resultPerPage) {

    Method addViewApplicationActionEventPageElementDailySummaryValues has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        private static void addViewApplicationActionEventPageElementDailySummaryValues(final String label,
                final Series series, final List<ViewApplicationActionEventPageElementDailySummary> list,
                final DataSeries dataSeries, final SimpleDateFormat simpleDateFormat,
                final ToLongFunction<ViewApplicationActionEventPageElementDailySummary> t) {

      Method createPagingControls has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          void createPagingControls(AbstractOrderedLayout content, String name, String pageId, Long size, int pageNr,
                  int resultPerPage);

        Method entriesSortedByValues has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            private SortedSet<Map.Entry<String, List<T>>> entriesSortedByValues(final Map<String, List<T>> map,
                    final StepMapping<T> stepMapping) {
                final Comparator<? super Entry<String, List<T>>> compare = (o1, o2) -> {
        
                    final Comparator<T> compare1 = (o11, o21) -> {

        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

        Method addRequestInputFormFields has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            <T extends Serializable> void addRequestInputFormFields(FormLayout panelContent, T item, Class<T> beanType, List<String> displayProperties,String buttonLabel,ClickListener buttonListener);

          Method addRequestInputFormFields has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public <T extends Serializable> void addRequestInputFormFields(final FormLayout panelContent, final T item,
                      final Class<T> beanType, final List<String> displayProperties,final String buttonLabel,final ClickListener buttonListener) {

            Method processService has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                @Override
                @Secured({ "ROLE_ANONYMOUS" })
                public RegisterUserResponse processService(final RegisterUserRequest serviceRequest) {
                    final RegisterUserResponse inputValidation = inputValidation(serviceRequest);
                    if (inputValidation != null) {

            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

            Method findOrderedByPropertyListByEmbeddedProperty has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public final <T, V> List<T> findOrderedByPropertyListByEmbeddedProperty(final Class<T> clazz, final SingularAttribute<T, V> property,
                        final Class<V> clazz2, final SingularAttribute<V, ? extends Object> property2, final Object value,
                        final SingularAttribute<T, ? extends Object> orderByProperty) {

              Method findOrderedListByEmbeddedProperty has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  <T,V> List<T> findOrderedListByEmbeddedProperty(Class<T> clazz,
                          SingularAttribute<T, V> property,Class<V> clazz2,
                          SingularAttribute<V, ? extends Object> property2, Object value,SingularAttribute<V, ? extends Object> orderByProperty);

                Method findOrderedByPropertyListByEmbeddedProperty has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    <T, V> List<T> findOrderedByPropertyListByEmbeddedProperty(Class<T> clazz, SingularAttribute<T, V> property,
                            Class<V> clazz2, SingularAttribute<V, ? extends Object> property2, Object value,
                            SingularAttribute<T, ? extends Object> orderByProperty);
                Severity: Minor
                Found in service.api/src/main/java/com/hack23/cia/service/api/DataContainer.java - About 45 mins to fix

                  Method findOrderedByPropertyListByEmbeddedProperty has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public <T, V> List<T> findOrderedByPropertyListByEmbeddedProperty(final Class<T> clazz, final SingularAttribute<T, V> property,
                              final Class<V> clazz2, final SingularAttribute<V, ? extends Object> property2, final Object value,
                              final SingularAttribute<T, ? extends Object> orderByProperty) {

                    Method findOrderedListByEmbeddedProperty has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public <T, V> List<T> findOrderedListByEmbeddedProperty(final Class<T> clazz, final SingularAttribute<T, V> property,
                                final Class<V> clazz2, final SingularAttribute<V, ? extends Object> property2, final Object value,
                                final SingularAttribute<V, ? extends Object> orderByProperty) {

                      Method findOrderedByPropertyListByEmbeddedProperty has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          <T,V> List<T> findOrderedByPropertyListByEmbeddedProperty(Class<T> clazz,
                                  SingularAttribute<T, V> property,Class<V> clazz2,
                                  SingularAttribute<V, ? extends Object> property2, Object value,SingularAttribute<T, ? extends Object> orderByProperty);

                        Method findOrderedListByEmbeddedProperty has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            public final <T, V> List<T> findOrderedListByEmbeddedProperty(final Class<T> clazz, final SingularAttribute<T, V> property,
                                    final Class<V> clazz2, final SingularAttribute<V, ? extends Object> property2, final Object value,
                                    final SingularAttribute<V, ? extends Object> orderByProperty) {

                          Method findOrderedListByEmbeddedProperty has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              <T, V> List<T> findOrderedListByEmbeddedProperty(Class<T> clazz, SingularAttribute<T, V> property, Class<V> clazz2,
                                      SingularAttribute<V, ? extends Object> property2, Object value,
                                      SingularAttribute<V, ? extends Object> orderByProperty);
                          Severity: Minor
                          Found in service.api/src/main/java/com/hack23/cia/service/api/DataContainer.java - About 45 mins to fix

                            Method createMinistryRoleSummary has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                private void createMinistryRoleSummary(final Map<String, List<GovernmentBodyAnnualOutcomeSummary>> reportByMinistry, final Map<String, List<GovernmentBodyAnnualSummary>> governmentBodyMinistryMap,
                                        final ViewRiksdagenGovermentRoleMember viewRiksdagenGovermentRoleMember,
                                        final ViewRiksdagenPolitician viewRiksdagenPolitician, final CssLayout layout) {

                              Method addDataSeries has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  private static void addDataSeries(final SimpleDateFormat simpleDateFormat,
                                          final SimpleDateFormat parseInputDateFormat, final DataSeries dataSeries, final Series series,
                                          final Entry<String, List<ViewRiksdagenDocumentTypeDailySummary>> entry) {

                                Method createButtonLink has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    protected static final void createButtonLink(final ResponsiveRow row,final String linkText,final Resource icon, final ClickListener command, final String description) {

                                  Method unmarshallXml has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      public Object unmarshallXml(final Unmarshaller unmarshaller, final String accessUrl, final String nameSpace,
                                              final String replace, final String with) throws XmlAgentException {
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language