florianschmitt/connection-backend

View on GitHub

Showing 67 of 67 total issues

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

    @GetMapping(path = ["/$declineRequest/{requestIdentifier}"])
    @ResponseStatus(HttpStatus.NO_CONTENT)
    fun declineRequest(@PathVariable(name = "requestIdentifier") requestIdentifier: String) {
        service.declineRequest(requestIdentifier)
    }
Severity: Major
Found in src/main/kotlin/de/florianschmitt/rest/RequestController.kt and 1 other location - About 1 hr to fix
src/main/kotlin/de/florianschmitt/rest/RequestController.kt on lines 67..71

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

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

    @GetMapping(path = ["/$answerRequest/{voucherIdentifier}/status"])
    @ResponseStatus(HttpStatus.NO_CONTENT)
    fun answerRequestStatus(@PathVariable(name = "voucherIdentifier") voucherIdentifier: String) {
        service.checkVoucherValid(voucherIdentifier)
    }
Severity: Major
Found in src/main/kotlin/de/florianschmitt/rest/RequestController.kt and 1 other location - About 1 hr to fix
src/main/kotlin/de/florianschmitt/rest/RequestController.kt on lines 49..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 128.

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

    @EventListener
    fun handleWasAcceptedEvent(event: RequestWasAcceptedEvent) {
        log.info("request id='${event.request.requestIdentifier}' was accepted")

        mailService.requestAcceptedConfirmationForVolunteer(event.request)
src/main/kotlin/de/florianschmitt/service/events/EventProcessor.kt on lines 51..56

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

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

    @EventListener
    fun handleIsFinishedEvent(event: RequestIsFinishedEvent) {
        log.info("request id='${event.request.requestIdentifier}' is finished")
        mailService.requestFinishedInformVolunteer(event.request)
        mailService.requestFinishedInformRequester(event.request)
src/main/kotlin/de/florianschmitt/service/events/EventProcessor.kt on lines 27..33

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

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

    fun findFeedback(requestIdentifier: String) : EFeedback? {
        val request = requestRepository.findByRequestIdentifier(requestIdentifier)
                .orElseThrow { RequestNotFoundException() }
        return repository.findByRequest(request).orElse(null)
    }
src/main/kotlin/de/florianschmitt/service/FeedbackVolunteerService.kt on lines 41..45

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

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

    fun findFeedback(requestIdentifier: String) : EFeedbackVolunteer? {
        val request = requestRepository.findByRequestIdentifier(requestIdentifier)
                .orElseThrow { RequestNotFoundException() }
        return repository.findByRequest(request).orElse(null)
    }
src/main/kotlin/de/florianschmitt/service/FeedbackService.kt on lines 41..45

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

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

@ResponseStatus(value = HttpStatus.OK, reason = RequestNotYetFinishedException.MSG)
class RequestNotYetFinishedException : RuntimeException() {
    companion object {
        const val MSG = "request is not yet finished"
    }
src/main/kotlin/de/florianschmitt/rest/exception/exceptions.kt on lines 21..26
src/main/kotlin/de/florianschmitt/rest/exception/exceptions.kt on lines 35..40
src/main/kotlin/de/florianschmitt/rest/exception/exceptions.kt on lines 42..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 90.

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

@ResponseStatus(value = HttpStatus.OK, reason = RequestWasCanceledException.MSG)
class RequestWasCanceledException : RuntimeException() {
    companion object {
        const val MSG = "request was canceled"
    }
src/main/kotlin/de/florianschmitt/rest/exception/exceptions.kt on lines 21..26
src/main/kotlin/de/florianschmitt/rest/exception/exceptions.kt on lines 28..33
src/main/kotlin/de/florianschmitt/rest/exception/exceptions.kt on lines 42..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 90.

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

@ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = SystemMustHaveAtLeastASingleActiveAdmin.MSG)
class SystemMustHaveAtLeastASingleActiveAdmin : RuntimeException() {
    companion object {
        const val MSG = "system must have at least a single active admin"
    }
src/main/kotlin/de/florianschmitt/rest/exception/exceptions.kt on lines 21..26
src/main/kotlin/de/florianschmitt/rest/exception/exceptions.kt on lines 28..33
src/main/kotlin/de/florianschmitt/rest/exception/exceptions.kt on lines 35..40

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

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

@ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = FeedbackAlreadyGivenException.MSG)
class FeedbackAlreadyGivenException : RuntimeException() {
    companion object {
        const val MSG = "feedback already given"
    }
src/main/kotlin/de/florianschmitt/rest/exception/exceptions.kt on lines 28..33
src/main/kotlin/de/florianschmitt/rest/exception/exceptions.kt on lines 35..40
src/main/kotlin/de/florianschmitt/rest/exception/exceptions.kt on lines 42..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 90.

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

@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@Profile("!test")
annotation class NotTestProfile
src/main/kotlin/de/florianschmitt/system/util/authorizationannotations.kt on lines 5..8
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 5..8
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 10..13
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 15..18
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 20..23
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 25..28

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

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

@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@Profile("dev-postgres")
annotation class DevPostgresProfile
src/main/kotlin/de/florianschmitt/system/util/authorizationannotations.kt on lines 5..8
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 10..13
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 15..18
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 20..23
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 25..28
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 30..33

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

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

@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@Profile("test")
annotation class TestProfile
src/main/kotlin/de/florianschmitt/system/util/authorizationannotations.kt on lines 5..8
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 5..8
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 10..13
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 15..18
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 20..23
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 30..33

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

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

@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@Profile("prod")
annotation class ProductiveProfile
src/main/kotlin/de/florianschmitt/system/util/authorizationannotations.kt on lines 5..8
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 5..8
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 10..13
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 20..23
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 25..28
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 30..33

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

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

@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@Profile("testing")
annotation class TestingProfile
src/main/kotlin/de/florianschmitt/system/util/authorizationannotations.kt on lines 5..8
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 5..8
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 10..13
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 15..18
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 25..28
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 30..33

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

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

@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@PreAuthorize("hasRole('ROLE_REQUESTER')")
annotation class HasRequesterRole
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 5..8
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 10..13
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 15..18
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 20..23
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 25..28
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 30..33

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

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

@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@Profile("dev")
annotation class DevProfile
src/main/kotlin/de/florianschmitt/system/util/authorizationannotations.kt on lines 5..8
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 5..8
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 15..18
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 20..23
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 25..28
src/main/kotlin/de/florianschmitt/system/util/profileannotations.kt on lines 30..33

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

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

    @Column(nullable = false)
    @NotNull
    @Enumerated(EnumType.STRING)
    var occasionEnum: EOccasionEnum? = EOccasionEnum.DOCTOR
Severity: Minor
Found in src/main/kotlin/de/florianschmitt/model/entities/ERequest.kt and 1 other location - About 55 mins to fix
src/main/kotlin/de/florianschmitt/model/entities/ERequest.kt on lines 18..21

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

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

    @Column(nullable = false)
    @NotNull
    @Enumerated(EnumType.STRING)
    var state: ERequestStateEnum? = ERequestStateEnum.OPEN
Severity: Minor
Found in src/main/kotlin/de/florianschmitt/model/entities/ERequest.kt and 1 other location - About 55 mins to fix
src/main/kotlin/de/florianschmitt/model/entities/ERequest.kt on lines 33..36

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

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

    fun feedbackRequester(@PathVariable(name = "requestIdentifier") requestIdentifier: String,
                          @RequestBody @Valid data: EFeedbackDTO) {
Severity: Minor
Found in src/main/kotlin/de/florianschmitt/rest/FeedbackController.kt and 1 other location - About 50 mins to fix
src/main/kotlin/de/florianschmitt/rest/FeedbackController.kt on lines 40..41

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

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