Showing 366 of 795 total issues

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

    @Override
    protected CreateApplicationEventRequest createApplicationEventForService(
            final DeleteAccountRequest serviceRequest) {
        final CreateApplicationEventRequest eventRequest = createBaseApplicationEventRequest();
        eventRequest.setEventGroup(ApplicationEventGroup.USER);
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/ManageUserAccountService.java on lines 137..145
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/RefreshDataViewsService.java on lines 76..84
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/SendEmailService.java on lines 72..80
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/UpdateApplicationConfigurationService.java on lines 94..103
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/UpdateSearchIndexService.java on lines 90..98
service.impl/src/main/java/com/hack23/cia/service/impl/action/application/LogoutService.java on lines 95..103
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/ChangePasswordService.java on lines 155..164
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/DisableGoogleAuthenticatorCredentialService.java on lines 104..113
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/SearchDocumentService.java on lines 109..117
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/SetGoogleAuthenticatorCredentialService.java on lines 129..138

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

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

    @Override
    protected CreateApplicationEventRequest createApplicationEventForService(
            final ChangePasswordRequest serviceRequest) {
        final CreateApplicationEventRequest eventRequest = createBaseApplicationEventRequest();
        eventRequest.setEventGroup(ApplicationEventGroup.USER);
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/ManageUserAccountService.java on lines 137..145
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/RefreshDataViewsService.java on lines 76..84
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/SendEmailService.java on lines 72..80
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/UpdateApplicationConfigurationService.java on lines 94..103
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/UpdateSearchIndexService.java on lines 90..98
service.impl/src/main/java/com/hack23/cia/service/impl/action/application/LogoutService.java on lines 95..103
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/DeleteAccountService.java on lines 153..162
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/DisableGoogleAuthenticatorCredentialService.java on lines 104..113
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/SearchDocumentService.java on lines 109..117
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/SetGoogleAuthenticatorCredentialService.java on lines 129..138

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

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

    @Override
    protected CreateApplicationEventRequest createApplicationEventForService(
            final SetGoogleAuthenticatorCredentialRequest serviceRequest) {
        final CreateApplicationEventRequest eventRequest = createBaseApplicationEventRequest();
        eventRequest.setEventGroup(ApplicationEventGroup.USER);
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/ManageUserAccountService.java on lines 137..145
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/RefreshDataViewsService.java on lines 76..84
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/SendEmailService.java on lines 72..80
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/UpdateApplicationConfigurationService.java on lines 94..103
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/UpdateSearchIndexService.java on lines 90..98
service.impl/src/main/java/com/hack23/cia/service/impl/action/application/LogoutService.java on lines 95..103
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/ChangePasswordService.java on lines 155..164
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/DeleteAccountService.java on lines 153..162
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/DisableGoogleAuthenticatorCredentialService.java on lines 104..113
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/SearchDocumentService.java on lines 109..117

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

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

    @Override
    protected CreateApplicationEventRequest createApplicationEventForService(final SendEmailRequest serviceRequest) {
        final CreateApplicationEventRequest eventRequest = createBaseApplicationEventRequest();
        eventRequest.setEventGroup(ApplicationEventGroup.ADMIN);
        eventRequest.setApplicationOperation(ApplicationOperationType.CREATE);
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/ManageUserAccountService.java on lines 137..145
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/RefreshDataViewsService.java on lines 76..84
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/UpdateApplicationConfigurationService.java on lines 94..103
service.impl/src/main/java/com/hack23/cia/service/impl/action/admin/UpdateSearchIndexService.java on lines 90..98
service.impl/src/main/java/com/hack23/cia/service/impl/action/application/LogoutService.java on lines 95..103
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/ChangePasswordService.java on lines 155..164
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/DeleteAccountService.java on lines 153..162
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/DisableGoogleAuthenticatorCredentialService.java on lines 104..113
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/SearchDocumentService.java on lines 109..117
service.impl/src/main/java/com/hack23/cia/service/impl/action/user/SetGoogleAuthenticatorCredentialService.java on lines 129..138

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

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

    private static void addPartyData(final DataSeries dataSeries, final SimpleDateFormat simpleDateFormat,
            final List<ViewRiksdagenVoteDataBallotPartySummaryDaily> list, final Function<ViewRiksdagenVoteDataBallotPartySummaryDaily, Object> t) {
        dataSeries.newSeries();
        for (final ViewRiksdagenVoteDataBallotPartySummaryDaily viewRiksdagenVoteDataBallotPartySummaryDaily : list) {
            if (viewRiksdagenVoteDataBallotPartySummaryDaily != null) {
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/chartfactory/impl/PoliticianDataManagerImpl.java on lines 80..91

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

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

    private static void addPoliticanData(final List<ViewRiksdagenVoteDataBallotPoliticianSummaryDaily> list,
            final DataSeries dataSeries, final SimpleDateFormat simpleDateFormat, final Function<ViewRiksdagenVoteDataBallotPoliticianSummaryDaily, Object> t) {
        dataSeries.newSeries();
        for (final ViewRiksdagenVoteDataBallotPoliticianSummaryDaily viewRiksdagenVoteDataBallotPoliticianSummaryDaily : list) {
            if (viewRiksdagenVoteDataBallotPoliticianSummaryDaily != null) {
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/chartfactory/impl/PartyChartDataManagerImpl.java on lines 84..95

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

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

Identical blocks of code found in 8 locations. Consider refactoring.
Open

    @Override
    public boolean matches(final String page, final String parameters) {
        final String pageId = getPageId(parameters);
        return NAME.equals(page) && (StringUtils.isEmpty(parameters) || parameters.equals(pageId)
                || parameters.contains(PageMode.OVERVIEW.toString()));
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/ballot/pagemode/BallotOverviewPageModContentFactoryImpl.java on lines 174..179
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/committee/pagemode/CommitteeOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/country/pagemode/CountryRankingOverviewPageModContentFactoryImpl.java on lines 70..75
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/document/pagemode/DocumentOverviewPageModContentFactoryImpl.java on lines 112..117
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/goverment/pagemode/MinistryOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/govermentbody/pagemode/GovernmentBodyOverviewPageModContentFactoryImpl.java on lines 91..96
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/party/pagemode/PartyOverviewPageModContentFactoryImpl.java on lines 110..115

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

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

Identical blocks of code found in 8 locations. Consider refactoring.
Open

    @Override
    public boolean matches(final String page, final String parameters) {
        final String pageId = getPageId(parameters);
        return NAME.equals(page) && (StringUtils.isEmpty(parameters) || parameters.equals(pageId)
                || parameters.contains(PageMode.OVERVIEW.toString()));
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/ballot/pagemode/BallotOverviewPageModContentFactoryImpl.java on lines 174..179
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/committee/pagemode/CommitteeOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/country/pagemode/CountryRankingOverviewPageModContentFactoryImpl.java on lines 70..75
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/document/pagemode/DocumentOverviewPageModContentFactoryImpl.java on lines 112..117
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/goverment/pagemode/MinistryOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/govermentbody/pagemode/GovernmentBodyOverviewPageModContentFactoryImpl.java on lines 91..96
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/politician/pagemode/PoliticianOverviewPageModContentFactoryImpl.java on lines 127..132

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

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

Identical blocks of code found in 8 locations. Consider refactoring.
Open

    @Override
    public boolean matches(final String page, final String parameters) {
        final String pageId = getPageId(parameters);
        return NAME.equals(page) && (StringUtils.isEmpty(parameters) || parameters.equals(pageId)
                || parameters.contains(PageMode.OVERVIEW.toString()));
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/ballot/pagemode/BallotOverviewPageModContentFactoryImpl.java on lines 174..179
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/committee/pagemode/CommitteeOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/document/pagemode/DocumentOverviewPageModContentFactoryImpl.java on lines 112..117
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/goverment/pagemode/MinistryOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/govermentbody/pagemode/GovernmentBodyOverviewPageModContentFactoryImpl.java on lines 91..96
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/party/pagemode/PartyOverviewPageModContentFactoryImpl.java on lines 110..115
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/politician/pagemode/PoliticianOverviewPageModContentFactoryImpl.java on lines 127..132

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

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

Identical blocks of code found in 8 locations. Consider refactoring.
Open

    @Override
    public boolean matches(final String page, final String parameters) {
        final String pageId = getPageId(parameters);
        return NAME.equals(page) && (StringUtils.isEmpty(parameters) || parameters.equals(pageId)
                || parameters.contains(PageMode.OVERVIEW.toString()));
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/ballot/pagemode/BallotOverviewPageModContentFactoryImpl.java on lines 174..179
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/committee/pagemode/CommitteeOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/country/pagemode/CountryRankingOverviewPageModContentFactoryImpl.java on lines 70..75
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/goverment/pagemode/MinistryOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/govermentbody/pagemode/GovernmentBodyOverviewPageModContentFactoryImpl.java on lines 91..96
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/party/pagemode/PartyOverviewPageModContentFactoryImpl.java on lines 110..115
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/politician/pagemode/PoliticianOverviewPageModContentFactoryImpl.java on lines 127..132

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

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

Identical blocks of code found in 8 locations. Consider refactoring.
Open

    @Override
    public boolean matches(final String page, final String parameters) {
        final String pageId = getPageId(parameters);
        return NAME.equals(page) && (StringUtils.isEmpty(parameters) || parameters.equals(pageId)
                || parameters.contains(PageMode.OVERVIEW.toString()));
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/ballot/pagemode/BallotOverviewPageModContentFactoryImpl.java on lines 174..179
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/committee/pagemode/CommitteeOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/country/pagemode/CountryRankingOverviewPageModContentFactoryImpl.java on lines 70..75
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/document/pagemode/DocumentOverviewPageModContentFactoryImpl.java on lines 112..117
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/govermentbody/pagemode/GovernmentBodyOverviewPageModContentFactoryImpl.java on lines 91..96
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/party/pagemode/PartyOverviewPageModContentFactoryImpl.java on lines 110..115
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/politician/pagemode/PoliticianOverviewPageModContentFactoryImpl.java on lines 127..132

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

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

Identical blocks of code found in 8 locations. Consider refactoring.
Open

    @Override
    public boolean matches(final String page, final String parameters) {
        final String pageId = getPageId(parameters);
        return NAME.equals(page) && (StringUtils.isEmpty(parameters) || parameters.equals(pageId)
                || parameters.contains(PageMode.OVERVIEW.toString()));
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/ballot/pagemode/BallotOverviewPageModContentFactoryImpl.java on lines 174..179
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/country/pagemode/CountryRankingOverviewPageModContentFactoryImpl.java on lines 70..75
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/document/pagemode/DocumentOverviewPageModContentFactoryImpl.java on lines 112..117
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/goverment/pagemode/MinistryOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/govermentbody/pagemode/GovernmentBodyOverviewPageModContentFactoryImpl.java on lines 91..96
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/party/pagemode/PartyOverviewPageModContentFactoryImpl.java on lines 110..115
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/politician/pagemode/PoliticianOverviewPageModContentFactoryImpl.java on lines 127..132

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

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

Identical blocks of code found in 8 locations. Consider refactoring.
Open

    @Override
    public boolean matches(final String page, final String parameters) {
        final String pageId = getPageId(parameters);
        return NAME.equals(page) && (StringUtils.isEmpty(parameters) || parameters.equals(pageId)
                || parameters.contains(PageMode.OVERVIEW.toString()));
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/ballot/pagemode/BallotOverviewPageModContentFactoryImpl.java on lines 174..179
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/committee/pagemode/CommitteeOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/country/pagemode/CountryRankingOverviewPageModContentFactoryImpl.java on lines 70..75
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/document/pagemode/DocumentOverviewPageModContentFactoryImpl.java on lines 112..117
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/goverment/pagemode/MinistryOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/party/pagemode/PartyOverviewPageModContentFactoryImpl.java on lines 110..115
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/politician/pagemode/PoliticianOverviewPageModContentFactoryImpl.java on lines 127..132

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

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

Identical blocks of code found in 8 locations. Consider refactoring.
Open

    @Override
    public boolean matches(final String page, final String parameters) {
        final String pageId = getPageId(parameters);
        return NAME.equals(page) && (StringUtils.isEmpty(parameters) || parameters.equals(pageId)
                || parameters.contains(PageMode.OVERVIEW.toString()));
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/committee/pagemode/CommitteeOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/country/pagemode/CountryRankingOverviewPageModContentFactoryImpl.java on lines 70..75
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/document/pagemode/DocumentOverviewPageModContentFactoryImpl.java on lines 112..117
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/goverment/pagemode/MinistryOverviewPageModContentFactoryImpl.java on lines 98..103
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/govermentbody/pagemode/GovernmentBodyOverviewPageModContentFactoryImpl.java on lines 91..96
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/party/pagemode/PartyOverviewPageModContentFactoryImpl.java on lines 110..115
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/politician/pagemode/PoliticianOverviewPageModContentFactoryImpl.java on lines 127..132

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

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

/*
 * Copyright 2010 James Pether Sörling
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
model.external.riksdagen.dokumentlista.impl/src/main/java/com/hack23/cia/model/external/riksdagen/dokumentlista/impl/ObjectFactory.java on lines 1..78
model.external.val.riksdagsvalkrets.impl/src/main/java/com/hack23/cia/model/external/val/riksdagsvalkrets/impl/ObjectFactory.java on lines 1..78
model.external.worldbank.topic.impl/src/main/java/com/hack23/cia/model/external/worldbank/topic/impl/ObjectFactory.java on lines 1..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 52.

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

/*
 * Copyright 2010 James Pether Sörling
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
model.external.riksdagen.dokumentlista.impl/src/main/java/com/hack23/cia/model/external/riksdagen/dokumentlista/impl/ObjectFactory.java on lines 1..78
model.external.riksdagen.voteringlista.impl/src/main/java/com/hack23/cia/model/external/riksdagen/voteringlista/impl/ObjectFactory.java on lines 1..78
model.external.val.riksdagsvalkrets.impl/src/main/java/com/hack23/cia/model/external/val/riksdagsvalkrets/impl/ObjectFactory.java on lines 1..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 52.

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

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

        if (parameters != null && parameters.contains("[") && parameters.contains("]")) {
            selectedYear = parameters.substring(parameters.indexOf('[') + 1, parameters.lastIndexOf(']'));
        }
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/committee/pagemode/CommitteeDecisionFlowPageModContentFactoryImpl.java on lines 79..81

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

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

/*
 * Copyright 2010 James Pether Sörling
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
model.external.riksdagen.dokumentlista.impl/src/main/java/com/hack23/cia/model/external/riksdagen/dokumentlista/impl/ObjectFactory.java on lines 1..78
model.external.riksdagen.voteringlista.impl/src/main/java/com/hack23/cia/model/external/riksdagen/voteringlista/impl/ObjectFactory.java on lines 1..78
model.external.worldbank.topic.impl/src/main/java/com/hack23/cia/model/external/worldbank/topic/impl/ObjectFactory.java on lines 1..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 52.

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

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

        if (parameters != null && parameters.contains("[") && parameters.contains("]")) {
            selectedYear = parameters.substring(parameters.indexOf('[') + 1, parameters.lastIndexOf(']'));
        }
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/parliament/pagemode/ParliamentDecisionFlowPageModContentFactoryImpl.java on lines 77..79

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

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

/*
 * Copyright 2010 James Pether Sörling
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
model.external.riksdagen.voteringlista.impl/src/main/java/com/hack23/cia/model/external/riksdagen/voteringlista/impl/ObjectFactory.java on lines 1..78
model.external.val.riksdagsvalkrets.impl/src/main/java/com/hack23/cia/model/external/val/riksdagsvalkrets/impl/ObjectFactory.java on lines 1..78
model.external.worldbank.topic.impl/src/main/java/com/hack23/cia/model/external/worldbank/topic/impl/ObjectFactory.java on lines 1..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 52.

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

Severity
Category
Status
Source
Language