Showing 366 of 795 total issues

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

    @Override
    protected CreateApplicationEventRequest createApplicationEventForService(
            final RegisterUserRequest serviceRequest) {
        final CreateApplicationEventRequest eventRequest = createBaseApplicationEventRequest();
        eventRequest.setEventGroup(ApplicationEventGroup.USER);
service.impl/src/main/java/com/hack23/cia/service/impl/action/application/LoginService.java on lines 161..170

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

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

    protected final String getPartyName(final String party) {
        final DataContainer<ViewRiksdagenParty, String> dataContainer = applicationManager
                .getDataContainer(ViewRiksdagenParty.class);

        final Optional<ViewRiksdagenParty> matchingObjects =dataContainer.getAll().stream().
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/dataseriesfactory/impl/PartyDataSeriesFactoryImpl.java on lines 137..151

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

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

/*
 * 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.val.kommunvalkrets.impl/src/main/java/com/hack23/cia/model/external/val/kommunvalkrets/impl/ObjectFactory.java on lines 1..96

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

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

/*
 * Copyright 2010-2024 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.
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/pageclicklistener/RemoveDataClickListener.java on lines 1..55

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

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

/*
 * Copyright 2010-2024 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.
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/pageclicklistener/RefreshDataViewsClickListener.java on lines 1..55

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

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

    private static final String[] DOCUMENT_GRID_HIDE_COLUMNS = { "rm", "lang", "noteTitle", "origin", "subType","note", "subTitle", "status", "label", "id", "hit", "madePublicDate", "databaseSource", "domainOrg", "relatedId",
            "org", "documentType","docType", "debateName", "tempLabel", "numberValue", "systemDate", "kallId",
            "documentFormat", "documentUrlText", "documentUrlHtml", "documentStatusUrlXml",
            "committeeReportUrlXml" };
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/document/pagemode/DocumentsOverviewPageModContentFactoryImpl.java on lines 50..54

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

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

    private static final String[] HIDE_COLUMNS = { "rm", "lang", "noteTitle", "origin", "subType", "note", "subTitle", "status", "label",
            "id", "hit", "madePublicDate", "databaseSource", "domainOrg", "relatedId", "org",
            "documentType", "docType", "debateName", "tempLabel", "numberValue", "systemDate", "kallId",
            "documentFormat", "documentUrlText", "documentUrlHtml", "documentStatusUrlXml",
            "committeeReportUrlXml" };
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/pageclicklisteners/handlers/impl/SearchDocumentResponseHandlerImpl.java on lines 44..47

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

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

/*
 * Copyright 2010-2024 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.
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/chartfactory/impl/ViewRiksdagenVoteDataBallotPoliticianSummaryChartDataManagerImpl.java on lines 1..67

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

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

/*
 * Copyright 2010-2024 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.
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/chartfactory/impl/ViewRiksdagenVoteDataBallotPartySummaryChartDataManagerImpl.java on lines 1..65

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

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

/*
 * Copyright 2010-2024 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.
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/DashboardView.java on lines 1..54

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

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

    @Override
    public Link createRegisterPageLink() {
        final Link pageLink = new Link("Register", new ExternalResource(
                LINK_SEPARATOR + CommonsViews.MAIN_VIEW_NAME + PAGE_SEPARATOR + ApplicationPageMode.REGISTER));
        pageLink.setId(ViewAction.VISIT_REGISTER.name());
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/pagelinks/impl/PageLinkFactoryImpl.java on lines 116..123

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

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

    @Override
    public Link createLoginPageLink() {
        final Link pageLink = new Link("Login", new ExternalResource(
                LINK_SEPARATOR + CommonsViews.MAIN_VIEW_NAME + PAGE_SEPARATOR + ApplicationPageMode.LOGIN));
        pageLink.setId(ViewAction.VISIT_LOGIN.name());
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/pagelinks/impl/PageLinkFactoryImpl.java on lines 159..166

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

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

    @Override
    public List<VoteDataEmbeddedId> getBallotIdList() {
        final CriteriaQuery<VoteDataEmbeddedId> criteria = getCriteriaBuilder().createQuery(
                VoteDataEmbeddedId.class);
        final Root<VoteData> root = criteria.from(VoteData.class);
service.data.impl/src/main/java/com/hack23/cia/service/data/impl/CommitteeProposalComponentDataDAOImpl.java on lines 67..74

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

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

    @Override
    public DataSeries createPartyChartTimeSeriesAll() {
        DataSeries dataSeries = new DataSeries();

        final DataContainer<ViewRiksdagenParty, String> dataContainer = applicationManager
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/dataseriesfactory/impl/MinistryDataSeriesFactoryImpl.java on lines 77..88

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

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

    @Override
    public List<String> getIdList() {
        final CriteriaQuery<String> criteria = getCriteriaBuilder().createQuery(String.class);
        final Root<CommitteeDocumentData> root = criteria.from(CommitteeDocumentData.class);
        criteria.select(root.get(CommitteeDocumentData_.id));
service.data.impl/src/main/java/com/hack23/cia/service/data/impl/VoteDataDAOImpl.java on lines 47..55

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

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

/*
 * Copyright 2010-2024 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.
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/MainView.java on lines 1..54

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

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

    @Override
    public DataSeries createMinistryChartTimeSeriesAll() {
        DataSeries dataSeries = new DataSeries();

        final DataContainer<ViewRiksdagenMinistry, String> dataContainer = applicationManager
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/dataseriesfactory/impl/PartyDataSeriesFactoryImpl.java on lines 98..110

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

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

                for (final List<ViewRiksdagenVoteDataBallotPartySummary> partyBallotSummaryList : concernIssuePartyBallotSummaryMap.values()) {
                    final HorizontalLayout tabContent = new HorizontalLayout();
                    tabContent.setWidth(100, Unit.PERCENTAGE);
                    tabContent.setHeight(100, Unit.PERCENTAGE);
                    final Tab tab = tabsheet.addTab(tabContent);
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/ballot/pagemode/BallotChartsPageModContentFactoryImpl.java on lines 126..133

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

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

                for (final ViewRiksdagenVoteDataBallotSummary viewRiksdagenVoteDataBallotSummary : ballots) {
                    final HorizontalLayout tabContent = new HorizontalLayout();
                    tabContent.setWidth(100, Unit.PERCENTAGE);
                    tabContent.setHeight(100, Unit.PERCENTAGE);
                    final Tab tab = tabsheet.addTab(tabContent);
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/ballot/pagemode/BallotChartsPageModContentFactoryImpl.java on lines 137..144

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

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

/*
 * Copyright 2010-2024 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.
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/admin/agentoperations/AgentOperationView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/admin/datasummary/AdminDataSummaryView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/admin/system/AdminAgencyView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/admin/system/AdminApplicationConfigurationView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/admin/system/AdminApplicationEventsView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/admin/system/AdminApplicationSessionView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/admin/system/AdminCountryView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/admin/system/AdminEmailView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/admin/system/AdminLanguageContentView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/admin/system/AdminMonitoringView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/admin/system/AdminPortalView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/admin/system/AdminUseraccountView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/ballot/BallotView.java on lines 1..56
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/committee/CommitteeRankingView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/committee/CommitteeView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/country/CountryRankingView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/document/DocumentView.java on lines 1..56
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/document/DocumentsView.java on lines 1..56
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/document/SearchDocumentView.java on lines 1..56
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/goverment/MinistryRankingView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/goverment/MinistryView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/govermentbody/GovernmenBodyView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/govermentbody/GovernmentBodyRankingView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/home/UserHomeView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/parliament/ParliamentRankingView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/party/PartyRankingView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/party/PartyView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/politician/PoliticianRankingView.java on lines 1..55
citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/user/politician/PoliticianView.java on lines 1..55

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

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