Showing 239 of 782 total issues

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

    public <T extends Serializable> void createBasicBeanItemGrid(final AbstractOrderedLayout panelContent,
            final Class<T> dataType, final List<T> datasource, final String caption, final String[] columnOrder,
            final String[] hideColumns, final PageItemRendererClickListener<?> listener, final String actionId,
            final ListPropertyConverter[] collectionPropertyConverters) {

    Method getStepMapping has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        @Override
        protected StepMapping<ViewRiksdagenPartyRoleMember> getStepMapping() {
            return new StepMapping<>() {
    
                @Override

    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 evaluate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

            @Override
            public void evaluate(final PojoClass pojoClass) {
                if (pojoClass.isEnum()) {
    
                    final Object[] enumConstants = pojoClass.getClazz().getEnumConstants();

    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 run has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

            @Override
            public void run(final PojoClass pojoClass) {
                final Object classInstance = ValidationHelper.getBasicInstance(pojoClass);
                for (final PojoField fieldEntry : pojoClass.getPojoFields()) {
    
    

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

        private void createDashboardGovernmentMember(final ResponsiveRow row,
                final Map<String, List<GovernmentBodyAnnualSummary>> governmentBodyMinistryMap,
                final ViewRiksdagenGovermentRoleMember viewRiksdagenGovermentRoleMember,
                final ViewRiksdagenPolitician viewRiksdagenPolitician) {
    
    

      Method readCsvContent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private List<GovernmentBodyAnnualOutcomeSummary> readCsvContent(final InputStream is,final String[] specificFields) throws IOException {
              final CSVParser parser = CSVParser.parse(new InputStreamReader(is,StandardCharsets.UTF_8), CSVFormat.EXCEL.builder().setHeader().setDelimiter(';').build());
              final List<CSVRecord> records = parser.getRecords();
              records.remove(0);
      
      

        Method createPoliticianMenuBar has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method createContent has 26 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();
          
          

            Method unmarshallXml has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @Override
                public Object unmarshallXml(final Unmarshaller unmarshaller, final String accessUrl, final String nameSpace,
                        final String replace, final String with) throws XmlAgentException {
            
                    try {

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

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

                  Method createContent has 26 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();
                  
                  

                    Method createMinistryMenuBar has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

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

                          @Override
                          public CreateApplicationEventResponse processService(final CreateApplicationEventRequest serviceRequest) {
                              final ApplicationSession applicationSession = applicationSessionDAO
                                      .findFirstByProperty(ApplicationSession_.sessionId, serviceRequest.getSessionId());
                      
                      

                        Consider simplifying this complex logical expression.
                        Open

                                    if (proposal.getProcessedIn() != null && !proposal.getProcessedIn().isEmpty()
                                            && proposal.getCommittee() != null && !proposal.getCommittee().isEmpty()
                                            && proposal.getProcessedIn().contains(processedIn)
                                            && proposal.getChamber().length() <= "återförvisning till utskottet".length()
                                            && proposal.getChamber().length() >= "avslag".length()) {

                          Method checkValueOrLoadDefault has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              public ApplicationConfiguration checkValueOrLoadDefault(final String configTitle, final String configDescription,
                                      final ConfigurationGroup configurationGroup, final String component, final String componentTitle, final String componentDescription,
                                      final String propertyId, final String propertyValue) {

                            Method checkValueOrLoadDefault has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                ApplicationConfiguration checkValueOrLoadDefault(String configTitle, String configDescription,
                                        ConfigurationGroup configurationGroup, String component, String componentTitle, String componentDescription,
                                        String propertyId, String propertyValue);

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

                                  @Override
                                  protected StepMapping<ViewRiksdagenCommitteeRoleMember> getStepMapping() {
                                      return new StepMapping<>() {
                              
                                          @Override

                              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 unmarshal has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  @Override
                                  public Date unmarshal(final String s) {
                                      if (s == null) {
                                          return 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 getStepMapping has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  @Override
                                  protected StepMapping<ViewRiksdagenGovermentRoleMember> getStepMapping() {
                                      return new StepMapping<>() {
                              
                                          @Override

                              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

                              Severity
                              Category
                              Status
                              Source
                              Language