CMSgov/dpc-app

View on GitHub
dpc-queue/src/main/java/gov/cms/dpc/queue/JobQueueCommon.java

Summary

Maintainability
A
50 mins
Test Coverage
C
76%

Method createJob has 11 arguments (exceeds 4 allowed). Consider refactoring.
Wontfix

    public UUID createJob(UUID orgID, String orgNPI, String providerNPI, List<String> patients, List<DPCResourceType> resourceTypes,
                          OffsetDateTime since, OffsetDateTime transactionTime, String requestingIP, String requestUrl, boolean isBulk, boolean isSmoke) {
Severity: Major
Found in dpc-queue/src/main/java/gov/cms/dpc/queue/JobQueueCommon.java - About 1 hr to fix

    Method createJobBatch has 11 arguments (exceeds 4 allowed). Consider refactoring.
    Wontfix

        protected JobQueueBatch createJobBatch(UUID jobID,
                                               UUID orgID,
                                               String orgNPI,
                                               String providerNPI,
                                               List<String> patients,
    Severity: Major
    Found in dpc-queue/src/main/java/gov/cms/dpc/queue/JobQueueCommon.java - About 1 hr to fix

      Method createEmptyBatch has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          protected List<JobQueueBatch> createEmptyBatch(UUID jobID,
                                                         UUID orgID,
                                                         String orgNPI,
                                                         String providerNPI,
                                                         List<DPCResourceType> resourceTypes,
      Severity: Major
      Found in dpc-queue/src/main/java/gov/cms/dpc/queue/JobQueueCommon.java - About 50 mins to fix

        Method has 11 parameters, which is greater than 7 authorized.
        Open

            protected JobQueueBatch createJobBatch(UUID jobID,

        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

        Noncompliant Code Example

        With a maximum number of 4 parameters:

        public void doSomething(int param1, int param2, int param3, String param4, long param5) {
        ...
        }
        

        Compliant Solution

        public void doSomething(int param1, int param2, int param3, String param4) {
        ...
        }
        

        Exceptions

        Methods annotated with :

        • Spring's @RequestMapping (and related shortcut annotations, like @GetRequest)
        • JAX-RS API annotations (like @javax.ws.rs.GET)
        • Bean constructor injection with @org.springframework.beans.factory.annotation.Autowired
        • CDI constructor injection with @javax.inject.Inject
        • @com.fasterxml.jackson.annotation.JsonCreator

        may have a lot of parameters, encapsulation being possible. Such methods are therefore ignored.

        There are no issues that match your filters.

        Category
        Status