IBM/scc-java-sdk

View on GitHub

Showing 183 of 183 total issues

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListControlLibrariesOptions.java on lines 1..200
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListProfilesOptions.java on lines 1..200

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListControlLibrariesOptions.java on lines 1..200
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListRulesOptions.java on lines 1..200

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/AttachmentsPager.java on lines 1..107
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ControlLibrariesPager.java on lines 1..107
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ProfilesPager.java on lines 1..107

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/AttachmentsAccountPager.java on lines 1..107
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ControlLibrariesPager.java on lines 1..107
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ProfilesPager.java on lines 1..107

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/AttachmentsAccountPager.java on lines 1..107
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/AttachmentsPager.java on lines 1..107
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ProfilesPager.java on lines 1..107

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/AttachmentsAccountPager.java on lines 1..107
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/AttachmentsPager.java on lines 1..107
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ControlLibrariesPager.java on lines 1..107

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportEvaluationOptions.java on lines 1..185

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportViolationsDriftOptions.java on lines 1..185

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProviderTypeByIdOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportSummaryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportTagsOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListProviderTypeInstancesOptions.java on lines 1..159

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/CreateScanOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProviderTypeByIdOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportSummaryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportTagsOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListProviderTypeInstancesOptions.java on lines 1..159

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/CreateScanOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportSummaryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportTagsOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListProviderTypeInstancesOptions.java on lines 1..159

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

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

  public ServiceCall<ProfileCollection> listProfiles(ListProfilesOptions listProfilesOptions) {
    if (listProfilesOptions == null) {
      listProfilesOptions = new ListProfilesOptions.Builder().build();
    }
    RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/profiles"));
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApi.java on lines 341..369
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApi.java on lines 805..833

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

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

  public ServiceCall<RulesPageBase> listRules(ListRulesOptions listRulesOptions) {
    if (listRulesOptions == null) {
      listRulesOptions = new ListRulesOptions.Builder().build();
    }
    RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/rules"));
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApi.java on lines 341..369
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApi.java on lines 613..641

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/CreateScanOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProviderTypeByIdOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportSummaryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportTagsOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListProviderTypeInstancesOptions.java on lines 1..159

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/CreateScanOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProviderTypeByIdOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportSummaryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportTagsOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListProviderTypeInstancesOptions.java on lines 1..159

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/CreateScanOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProviderTypeByIdOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportSummaryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportTagsOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListProviderTypeInstancesOptions.java on lines 1..159

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/CreateScanOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProviderTypeByIdOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportTagsOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListProviderTypeInstancesOptions.java on lines 1..159

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/CreateScanOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProviderTypeByIdOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportSummaryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListProviderTypeInstancesOptions.java on lines 1..159

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/CreateScanOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProviderTypeByIdOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportSummaryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportTagsOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListProviderTypeInstancesOptions.java on lines 1..159

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

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

/*
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/CreateScanOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteCustomProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/DeleteRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetControlLibraryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProfileOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetProviderTypeByIdOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportSummaryOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportTagsOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetRuleOptions.java on lines 1..159
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListProviderTypeInstancesOptions.java on lines 1..159

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

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