McPringle/sportchef

View on GitHub

Showing 38 of 86 total issues

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

    @Test
    public void toStringTest() {
        // arrange
        final String toStringExpect = String.format(
                "User(userId=%d, firstName=%s, lastName=%s, phone=%s, email=%s, role=%s, version=%d)",
Severity: Minor
Found in src/test/java/ch/sportchef/business/user/entity/UserTest.java and 1 other location - About 40 mins to fix
src/test/java/ch/sportchef/business/event/entity/EntityTest.java on lines 89..101

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

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

    @Test
    public void deleteExistingUser() {
        // arrange
        final UserRepository userRepository = new UserRepository();
        final User user = createUser(userRepository);
src/test/java/ch/sportchef/business/event/control/EventRepositoryTest.java on lines 139..150

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

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

    @Test
    public void deleteExistingEvent() {
        // arrange
        final EventRepository eventRepository = new EventRepository();
        final Event event = createEvent(eventRepository);
src/test/java/ch/sportchef/business/user/control/UserRepositoryTest.java on lines 135..146

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

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

        final Event eventToCreate = Event.builder()
                .eventId(0L)
                .title("Testevent")
                .location("Testlocation")
                .date(LocalDate.of(2099, Month.DECEMBER, 31))
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 63..69
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 95..101
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 128..134
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 146..152
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 164..170
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 186..192
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 216..222
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 86..92

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

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

        final Event testEvent = Event.builder()
                .eventId(1L)
                .title("Testevent")
                .location("Testlocation")
                .date(LocalDate.of(2099, Month.DECEMBER, 31))
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 63..69
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 95..101
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 128..134
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 164..170
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 186..192
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 216..222
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 49..55
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 86..92

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

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

        final Event testEvent = Event.builder()
                .eventId(1L)
                .title("Testevent")
                .location("Testlocation")
                .date(LocalDate.of(2099, Month.DECEMBER, 31))
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 63..69
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 128..134
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 146..152
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 164..170
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 186..192
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 216..222
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 49..55
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 86..92

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

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

        final Event testEvent = Event.builder()
                .eventId(1L)
                .title("Testevent")
                .location("Testlocation")
                .date(LocalDate.of(2099, Month.DECEMBER, 31))
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 63..69
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 95..101
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 128..134
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 146..152
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 164..170
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 186..192
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 49..55
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 86..92

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

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

        final Event testEvent = Event.builder()
                .eventId(1L)
                .title("Testevent")
                .location("Testlocation")
                .date(LocalDate.of(2099, Month.DECEMBER, 31))
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 95..101
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 128..134
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 146..152
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 164..170
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 186..192
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 216..222
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 49..55
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 86..92

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

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

        final Event testEvent = Event.builder()
                .eventId(1L)
                .title("Testevent")
                .location("Testlocation")
                .date(LocalDate.of(2099, Month.DECEMBER, 31))
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 63..69
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 95..101
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 128..134
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 146..152
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 164..170
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 216..222
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 49..55
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 86..92

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

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

        final Event testEvent = Event.builder()
                .eventId(1L)
                .title("Testevent")
                .location("Testlocation")
                .date(LocalDate.of(2099, Month.DECEMBER, 31))
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 63..69
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 95..101
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 128..134
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 146..152
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 186..192
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 216..222
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 49..55
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 86..92

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

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

        final Event event1 = Event.builder()
                .eventId(1L)
                .title("Testevent")
                .location("Testlocation")
                .date(LocalDate.of(2099, Month.DECEMBER, 31))
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 63..69
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 95..101
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 128..134
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 146..152
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 164..170
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 186..192
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 216..222
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 49..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 48.

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

        final Event testEvent = Event.builder()
                .eventId(1L)
                .title("Testevent")
                .location("Testlocation")
                .date(LocalDate.of(2099, Month.DECEMBER, 31))
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 63..69
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 95..101
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 146..152
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 164..170
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 186..192
src/test/java/ch/sportchef/business/event/boundary/EventResourceTest.java on lines 216..222
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 49..55
src/test/java/ch/sportchef/business/event/boundary/EventsResourceTest.java on lines 86..92

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

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

    @Test
    public void deleteImageNotFound() {
        // arrange
        final Long eventId = 6L;
        final EventService eventServiceMock = mock(EventService.class);
src/test/java/ch/sportchef/business/event/control/EventImageServiceTest.java on lines 107..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 47.

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

    @Test
    public void getImageNotFound() throws IOException {
        // arrange
        final Long eventId = 2L;
        final EventService eventServiceMock = mock(EventService.class);
src/test/java/ch/sportchef/business/event/control/EventImageServiceTest.java on lines 170..180

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

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

    @GET
    public Event find() {
        final Optional<Event> event = eventService.findByEventId(eventId);
        if (event.isPresent()) {
            return event.get();
src/main/java/ch/sportchef/business/user/boundary/UserResource.java on lines 46..53

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

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

    @Test
    public void findAllNotFound() {
        // arrange
        final UserRepository userRepository = new UserRepository();

src/test/java/ch/sportchef/business/event/control/EventRepositoryTest.java on lines 126..137

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

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

    @GET
    public User find() {
        final Optional<User> user = userService.findByUserId(userId);
        if (user.isPresent()) {
            return user.get();
src/main/java/ch/sportchef/business/event/boundary/EventResource.java on lines 51..58

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

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

    @Test
    public void findAllNotFound() {
        // arrange
        final EventRepository eventRepository = new EventRepository();

src/test/java/ch/sportchef/business/user/control/UserRepositoryTest.java on lines 122..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 41.

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