aws-samples / amazon-codeguru-reviewer-java-detectors
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 234 units with 1,545 lines of code in units (63.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 2 simple units (44 lines of code)
    • 232 very simple units (1,501 lines of code)
0% | 0% | 0% | 2% | 97%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
java0% | 0% | 0% | 2% | 97%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
detectors/code_clone0% | 0% | 0% | 43% | 56%
detectors/amazon_sqs_enable_long_polling0% | 0% | 0% | 0% | 100%
detectors/aws_batch_write_output_ignored0% | 0% | 0% | 0% | 100%
stubs0% | 0% | 0% | 0% | 100%
detectors/sync_metric_publish0% | 0% | 0% | 0% | 100%
detectors/improper_locking0% | 0% | 0% | 0% | 100%
detectors/ldap_injection0% | 0% | 0% | 0% | 100%
detectors/mutually_exclusive_calls_found0% | 0% | 0% | 0% | 100%
detectors/concurrency_deadlock0% | 0% | 0% | 0% | 100%
detectors/lambda_client_reuse0% | 0% | 0% | 0% | 100%
detectors/aws_dynamodb_getitem_null_check0% | 0% | 0% | 0% | 100%
detectors/thread_safety_violation0% | 0% | 0% | 0% | 100%
detectors/aws_iam_error_prone_policy0% | 0% | 0% | 0% | 100%
detectors/aws_parse_error_message0% | 0% | 0% | 0% | 100%
detectors/missing_specifically_thrown_exception_handling0% | 0% | 0% | 0% | 100%
detectors/sql_injection0% | 0% | 0% | 0% | 100%
detectors/s3_object_metadata_content_length_check0% | 0% | 0% | 0% | 100%
detectors/aws_custom_retries0% | 0% | 0% | 0% | 100%
detectors/infinite_loop0% | 0% | 0% | 0% | 100%
detectors/amazon_s3_transfer_manager_shutdown0% | 0% | 0% | 0% | 100%
detectors/thread_safety_class_violations0% | 0% | 0% | 0% | 100%
detectors/http_response_splitting0% | 0% | 0% | 0% | 100%
detectors/os_command_injection0% | 0% | 0% | 0% | 100%
detectors/insecure_connection0% | 0% | 0% | 0% | 100%
detectors/kcl_with_call_process_records0% | 0% | 0% | 0% | 100%
detectors/out_of_sync_input_and_output0% | 0% | 0% | 0% | 100%
detectors/resource_leak0% | 0% | 0% | 0% | 100%
detectors/s3_verify_bucket_owner0% | 0% | 0% | 0% | 100%
detectors/partial_encryption0% | 0% | 0% | 0% | 100%
detectors/batches_preferred_over_loops0% | 0% | 0% | 0% | 100%
detectors/aws_kms_reencryption0% | 0% | 0% | 0% | 100%
detectors/concurrency_atomicity_violation0% | 0% | 0% | 0% | 100%
detectors/amazon_s3_auto_paginated_with_prefix0% | 0% | 0% | 0% | 100%
detectors/not_recommended_apis0% | 0% | 0% | 0% | 100%
detectors/log_injection0% | 0% | 0% | 0% | 100%
detectors/xml_external_entity0% | 0% | 0% | 0% | 100%
detectors/dynamodb_transaction_library0% | 0% | 0% | 0% | 100%
detectors/throw_exception_with_trace0% | 0% | 0% | 0% | 100%
detectors/ldap_authentication0% | 0% | 0% | 0% | 100%
detectors/concurrency_over_synchronization0% | 0% | 0% | 0% | 100%
detectors/code_injection0% | 0% | 0% | 0% | 100%
detectors/xpath_injection0% | 0% | 0% | 0% | 100%
detectors/object_presence0% | 0% | 0% | 0% | 100%
detectors/avoid_reset_exception_rule0% | 0% | 0% | 0% | 100%
detectors/missing_file_deletion_result_check0% | 0% | 0% | 0% | 100%
detectors/finalize_on_super_class0% | 0% | 0% | 0% | 100%
detectors/untrusted_ami_images0% | 0% | 0% | 0% | 100%
detectors/reassign_synchronized_object0% | 0% | 0% | 0% | 100%
detectors/aws_inefficient_chain0% | 0% | 0% | 0% | 100%
detectors/sensitive_information_leak0% | 0% | 0% | 0% | 100%
detectors/amazon_sqs_change_message_visibility_check_status0% | 0% | 0% | 0% | 100%
detectors/aws_dynamodb_mapper_batch_output_ignored0% | 0% | 0% | 0% | 100%
detectors/null_check_cache_response_metadata0% | 0% | 0% | 0% | 100%
detectors/file_syntax_error0% | 0% | 0% | 0% | 100%
detectors/aws_service_client_initialization0% | 0% | 0% | 0% | 100%
detectors/lambda_override_reserved0% | 0% | 0% | 0% | 100%
detectors/incorrect_null_check_before_setting0% | 0% | 0% | 0% | 100%
detectors/missing_position_check_before_substring0% | 0% | 0% | 0% | 100%
detectors/aws_region_enumeration0% | 0% | 0% | 0% | 100%
detectors/path_traversal0% | 0% | 0% | 0% | 100%
detectors/hardcoded_credentials0% | 0% | 0% | 0% | 100%
detectors/clear_text_credentials0% | 0% | 0% | 0% | 100%
detectors/untrusted_deserialization0% | 0% | 0% | 0% | 100%
detectors/insecure_cryptography0% | 0% | 0% | 0% | 100%
detectors/insecure_temporary_file0% | 0% | 0% | 0% | 100%
detectors/string_equality_check0% | 0% | 0% | 0% | 100%
detectors/string_format_arguments0% | 0% | 0% | 0% | 100%
detectors/null_pointer_dereference0% | 0% | 0% | 0% | 100%
detectors/weak_random_number_generation0% | 0% | 0% | 0% | 100%
detectors/untrusted_data_in_decision0% | 0% | 0% | 0% | 100%
detectors/stream_anymatch_vs_findfirst0% | 0% | 0% | 0% | 100%
detectors/iterate_on_map_entries0% | 0% | 0% | 0% | 100%
detectors/insecure_cookie0% | 0% | 0% | 0% | 100%
detectors/mandatory_methods0% | 0% | 0% | 0% | 100%
detectors/stream_min_max_vs_sort0% | 0% | 0% | 0% | 100%
detectors/deprecated_method0% | 0% | 0% | 0% | 100%
detectors/simple_date_format_time_zone0% | 0% | 0% | 0% | 100%
detectors/amazon_sqs_name_url0% | 0% | 0% | 0% | 100%
detectors/loose_file_permissions0% | 0% | 0% | 0% | 100%
detectors/ui_thread_starvation0% | 0% | 0% | 0% | 100%
detectors/insecure_cors_policy0% | 0% | 0% | 0% | 100%
detectors/s3_object_user_metadata_key_case_sensitivity0% | 0% | 0% | 0% | 100%
detectors/session_fixation0% | 0% | 0% | 0% | 100%
detectors/json_parser_length0% | 0% | 0% | 0% | 100%
detectors/incorrect_authentication_exploitation0% | 0% | 0% | 0% | 100%
detectors/client_constructor_deprecated_rule0% | 0% | 0% | 0% | 100%
detectors/aws_bad_params0% | 0% | 0% | 0% | 100%
detectors/cross_site_request_forgery0% | 0% | 0% | 0% | 100%
detectors/weak_obfuscation_of_request0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private void updateVideoInfoInDynamoDBNoncompliant()
in src/java/detectors/code_clone/CodeCloneNoncompliant.java
22 7 4
private boolean doesVideoStreamExistForJobNoncompliant()
in src/java/detectors/code_clone/CodeCloneNoncompliant.java
22 6 4
public void flushCompliant()
in src/java/detectors/aws_batch_write_output_ignored/AwsBatchWriteOutputIgnored.java
22 5 3
public static void createQueuesNoncompliant()
in src/java/detectors/amazon_sqs_enable_long_polling/AmazonSqsEnableLongPollingNoncompliant.java
37 5 4
public static void createQueues()
in src/java/detectors/amazon_sqs_enable_long_polling/AmazonSqsEnableLongPollingCompliant.java
38 5 4
public ActivityJobItem getJobFromArnAndActivityType()
in src/java/detectors/code_clone/CodeCloneCompliant.java
11 4 2
private void UpdateVideoInfoInDynamoDBCompliant()
in src/java/detectors/code_clone/CodeCloneCompliant.java
16 4 4
public void exceptionHandlingCompliant()
in src/java/detectors/missing_specifically_thrown_exception_handling/MissingSpecificallyThrownExceptionHandling.java
12 4 0
public void executeSqlStatementCompliant()
in src/java/detectors/sql_injection/SqlInjection.java
13 3 2
public void changeSqsMessageVisibilityCompliant()
in src/java/detectors/amazon_sqs_change_message_visibility_check_status/AmazonSqsChangeMessageVisibilityCheckStatus.java
9 3 2
public void ldapSearchCompliant()
in src/java/detectors/ldap_injection/LdapInjection.java
17 3 1
public void dynamoDBGetItemCompliant()
in src/java/detectors/aws_dynamodb_getitem_null_check/AwsDynamodbGetitemNullCheck.java
14 3 2
public void branchingNoncompliant()
in src/java/detectors/aws_parse_error_message/AwsParseErrorMessage.java
12 3 0
public void branchingCompliant()
in src/java/detectors/aws_parse_error_message/AwsParseErrorMessage.java
13 3 0
public void fileDeletionCompliant()
in src/java/detectors/missing_file_deletion_result_check/MissingFileDeletionResultCheck.java
8 3 1
private boolean doesVideoStreamExistForJobCompliant()
in src/java/detectors/code_clone/CodeCloneCompliant.java
16 3 4
public void logSessionIdNoncompliant()
in src/java/detectors/untrusted_data_in_decision/UntrustedDataInDecision.java
6 3 1
public void s3GetObjectsNoncompliant()
in src/java/detectors/amazon_s3_auto_paginated_with_prefix/AmazonS3AutoPaginatedWithPrefix.java
13 3 2
public void exceptionHandlingNoncompliant()
in src/java/detectors/missing_specifically_thrown_exception_handling/MissingSpecificallyThrownExceptionHandling.java
10 3 0
public InvokeResult invokeLambdaNoncompliant()
in src/java/detectors/aws_custom_retries/AwsCustomRetries.java
12 3 0