Showing 102 of 390 total issues
Function 19
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
},{}],19:[function(require,module,exports){
'use strict';
var EXPANDED = 'aria-expanded';
var CONTROLS = 'aria-controls';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return Patient;
Avoid too many return
statements within this method. Open
return Group;
Avoid too many return
statements within this method. Open
return Practitioner;
Avoid too many return
statements within this method. Open
return Schedule;
Avoid too many return
statements within this method. Open
return Organization;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this method. Open
return OperationOutcome;
Avoid too many return
statements within this function. Open
return true;
Method categoriesToLoincCode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static String categoriesToLoincCode(List<CodeableConcept> categories) {
if (categories == null || categories.size() != 1) {
throw new WebApplicationException("Must include one category", HttpStatus.UNPROCESSABLE_ENTITY_422);
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method equals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof RangeHeader)) return false;
RangeHeader that = (RangeHeader) o;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method processJobBatch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Trace
protected void processJobBatch(JobQueueBatch job) {
final String queueCompleteTime = SplunkTimestamp.getSplunkTimestamp();
try {
MDC.put(MDCConstants.JOB_ID, job.getJobID().toString());
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method deserializeMacaroon
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static List<Macaroon> deserializeMacaroon(String serializedString) {
if (serializedString.isEmpty()) {
throw new BakeryException("Cannot deserialize empty string");
}
// Determine if we're Base64 encoded or not
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method fromPolicyUrl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static PolicyType fromPolicyUrl(String url) {
if (url != null) {
for (PolicyType policyType : PolicyType.values()) {
if (policyType.policyUrl.equalsIgnoreCase(url)) {
return policyType;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method equals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof MacaroonCaveat)) return false;
MacaroonCaveat that = (MacaroonCaveat) o;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getKeyStoreStream
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private InputStream getKeyStoreStream() {
final InputStream keyStoreStream;
if (this.bbClientConfiguration.getKeystore().getLocation() == null) {
keyStoreStream = BlueButtonClientImpl.class.getResourceAsStream(KEYSTORE_RESOURCE_KEY);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method searchPatients
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@GET
@FHIR
@UnitOfWork
@Override
public List<Patient> searchPatients(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method create
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create
@organization = current_user.organizations.find(org_id)
reg_org = @organization.registered_organization
manager = ClientTokenManager.new(registered_organization: reg_org)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method search
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
@GET
@FHIR
@Timed
@ExceptionMetered
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method errorHandler
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static void errorHandler(Throwable e) {
logger.error("Caught exception during RxJava processing flow: ", e);
// Undeliverable Exceptions may happen because of parallel execution. One thread will
// throw an exception which will cause the job to fail and (close its consumer).
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"