Showing 100 of 394 total issues
Method equals
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof RosterEntity)) return false;
RosterEntity that = (RosterEntity) 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 to_csv
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def self.to_csv(user_ids)
users = User.find(user_ids)
CSV.generate(headers: true) do |csv|
csv << ATTRS
users.each do |user|
- 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 execute
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void execute(Map<String, List<String>> parameters, PrintWriter output) {
final List<String> expirationCollection = parameters.get("expiration");
final List<String> labelCollection = parameters.get("label");
final List<String> organizationCollection = parameters.get("organization");
- 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 getCaveats
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static List<MacaroonCaveat> getCaveats(Macaroon macaroon) {
List<MacaroonCaveat> caveats = new ArrayList<>();
MacaroonCaveat currentCaveat = new MacaroonCaveat();
- 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 processJobBatchPartial
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public List<JobQueueBatchFile> processJobBatchPartial(UUID aggregatorID, IJobQueue queue, JobQueueBatch job, String mbi) {
StopWatch stopWatch = StopWatch.createStarted();
Optional<OutcomeReason> failReason = Optional.empty();
Optional<Flowable<Resource>> flowable = Optional.empty();
- 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 to_csv
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def self.to_csv(user_ids)
users = User.find(user_ids)
CSV.generate(headers: true) do |csv|
csv << ATTRS
users.each do |user|
- 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 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,
Function generateRequestFile
has 8 return statements (exceeds 4 allowed). Open
func generateRequestFile() (string, error) {
session, sessErr := getAwsSession()
if sessErr != nil {
return "", sessErr
}
Method equals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof ProviderEntity)) return false;
ProviderEntity that = (ProviderEntity) 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 getTrustingManager
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static TrustManager[] getTrustingManager() {
return new TrustManager[]{new X509TrustManager() {
@Override
public X509Certificate[] getAcceptedIssuers() {
return null;
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof AttributionRelationship)) return false;
AttributionRelationship that = (AttributionRelationship) 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 handleExpirationTime
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
private OffsetDateTime handleExpirationTime(Optional<OffsetDateTimeParam> expiresQueryParam, Optional<CreateTokenRequest> token) {
// Compute default expiration
final OffsetDateTime now = OffsetDateTime.now(ZoneOffset.UTC);
final OffsetDateTime defaultExpiration = now.plus(this.policy.getExpirationPolicy().getExpirationOffset(), this.policy.getExpirationPolicy().getExpirationUnit());
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof TokenEntity)) return false;
TokenEntity that = (TokenEntity) 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 initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(env, jwt, golden_macaroon, org_key, org_signature, path_to_org_pub_key)
Function getAssumeRoleArn
has 6 return statements (exceeds 4 allowed). Open
func getAssumeRoleArn() (string, error) {
if isTesting {
val := os.Getenv("AWS_ASSUME_ROLE_ARN")
if val == "" {
return "", fmt.Errorf("AWS_ASSUME_ROLE_ARN must be set during testing")
Consider simplifying this complex logical expression. Open
if (typeof ElementProto.matches !== 'function') {
ElementProto.matches = ElementProto.msMatchesSelector || ElementProto.mozMatchesSelector || ElementProto.webkitMatchesSelector || function matches(selector) {
var element = this;
var elements = (element.document || element.ownerDocument).querySelectorAll(selector);
var index = 0;
Method fetchBundle
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private <T extends IBaseResource> Bundle fetchBundle(Class<T> resourceClass,
List<ICriterion<? extends IParam>> criteria,
String patientID,
DateRangeParam lastUpdated,
Map<String, String> headers) {
Method generate_credentials
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_credentials(credentials, org_bundle, public_key_label, path_to_org_pub_key, expiration)
Method exportDataAndHandleResults
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private void exportDataAndHandleResults(IGenericClient exportClient, Bundle providerBundle, String clientToken, Pair<UUID,PrivateKey> keyTuple, SampleResult parentSampler){
Method retrieveData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public Resource retrieveData(UUID organizationId, String orgNPI, String providerNPI, List<String> patientIds, DPCResourceType... resourceTypes) {