Showing 239 of 782 total issues

Method createContent has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Secured({ "ROLE_ANONYMOUS" })
    @Override
    public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
        final VerticalLayout content = createPanelContent();
        final String pageId = getPageId(parameters);

    Method processService has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @Override
        @Secured({ "ROLE_USER", "ROLE_ADMIN" })
        public ChangePasswordResponse processService(
                final ChangePasswordRequest serviceRequest) {
            final ChangePasswordResponse inputValidation = inputValidation(serviceRequest);

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

              @Override
              public void run(final PojoClass pojoClass) {
                  final Object classInstance = ValidationHelper.getBasicInstance(pojoClass);
      
                  if (classInstance.getClass().getSimpleName().startsWith("ObjectFactory")) {

      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 createBasicBeanItemNestedPropertiesGrid has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          <T extends Serializable> void createBasicBeanItemNestedPropertiesGrid(AbstractOrderedLayout panelContent,Class<T> dataType,List<T> datasource, String caption, String[] nestedProperties,String[] columnOrder, String[] hideColumns,
                  PageItemRendererClickListener<?> listener, String actionId, ListPropertyConverter[] collectionPropertyConverters);

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

            private static Converter getConverterForType(final Class<?> typeOfProperty) {
                Converter converter;
        
                if (Date.class.equals(typeOfProperty)) {
                    converter = new StringToDateConverter();

        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 createBasicBeanItemNestedPropertiesGrid has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                    final AbstractOrderedLayout panelContent, final Class<T> dataType, final List<T> datasource,
                    final String caption, final String[] nestedProperties, final String[] columnOrder,
                    final String[] hideColumns, final PageItemRendererClickListener<?> listener, final String actionId,
                    final ListPropertyConverter[] collectionPropertyConverters) {

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

              @Override
              @Secured({ "ROLE_USER", "ROLE_ADMIN" })
              public ChangePasswordResponse processService(
                      final ChangePasswordRequest serviceRequest) {
                  final ChangePasswordResponse 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 addIncomeSpending has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private void addIncomeSpending(final CssLayout layout) {
          
                  final Link pageLink = new Link("Regeringskansliet(Government Offices)", new ExternalResource(PAGE_PREFIX
                          + UserViews.GOVERNMENT_BODY_VIEW_NAME + PAGE_SEPARATOR + ORG_CODE_GOV_OFFICES));
                  pageLink.setId(ViewAction.VISIT_GOVERNMENT_BODY_VIEW.name() + PAGE_SEPARATOR

            Method createPagingControls has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @Override
                public void createPagingControls(final AbstractOrderedLayout content, final String name, final String pageId, final Long size, final int pageNr,
                        final int resultPerPage) {
                            final HorizontalLayout pagingControls = new HorizontalLayout();
                            pagingControls.setSpacing(true);

              Method createOverviewPage has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  @Override
                  public void createOverviewPage(final VerticalLayout panelContent, final String pageId) {
                      final ResponsiveRow grid = RowUtil.createGridLayout(panelContent);
              
                      createButtonLink(grid,CURRENT_LEADERS, VaadinIcons.GROUP,

                Method createContent has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    @Secured({ "ROLE_ANONYMOUS" })
                    @Override
                    public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
                        final VerticalLayout content = createPanelContent();
                        final String pageId = getPageId(parameters);

                  Method processService has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      @Override
                      @Secured({ "ROLE_USER", "ROLE_ADMIN"})
                      public SetGoogleAuthenticatorCredentialResponse processService(
                              final SetGoogleAuthenticatorCredentialRequest serviceRequest) {
                  
                  

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

                        private void blockBySessionOrIpFailedLoginAttempts(final String sessionId, final LoginBlockResultImpl loginBlockResultImpl) {
                            final ApplicationSession applicationSession = applicationSessionDAO
                                    .findFirstByProperty(ApplicationSession_.sessionId, sessionId);
                    
                            if (applicationSession != null) {

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

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

                        Method createContent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            @Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
                            @Override
                            public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
                                final VerticalLayout panelContent = createPanelContent();
                                getParliamentMenuItemFactory().createParliamentTopicMenu(menuBar);

                          Method buttonClick has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              @Override
                              public void buttonClick(final ClickEvent event) {
                                  final SetGoogleAuthenticatorCredentialResponse response = (SetGoogleAuthenticatorCredentialResponse) getApplicationManager().service(googleAuthRequest);
                          
                                  if (ServiceResult.SUCCESS == response.getResult()) {

                            Method createCommitteeeMenuBar has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                @Override
                                public void createCommitteeeMenuBar(final MenuBar menuBar, final String pageId) {
                                    initApplicationMenuBar(menuBar);
                            
                                    applicationMenuItemFactory.addRankingMenu(menuBar);

                              Method createContent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  @Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
                                  @Override
                                  public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
                                      final VerticalLayout panelContent = createPanelContent();
                                      final String pageId = getPageId(parameters);

                                Method generateWorkOrders has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    @Override
                                    public void generateWorkOrders() {
                                        try {
                                            final Map<String, String> documentStatusContainerMap = getImportService()
                                                    .getDocumentStatusContainerMap();

                                  Method createBasicBeanItemGrid has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      <T extends Serializable> void createBasicBeanItemGrid(AbstractOrderedLayout panelContent,Class<T> dataType, List<T> datasource, String caption, String[] columnOrder,
                                              String[] hideColumns, PageItemRendererClickListener<?> listener, String actionId, ListPropertyConverter[] collectionPropertyConverters);
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language