IBM/scc-java-sdk

View on GitHub

Showing 183 of 183 total issues

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/EvaluationPage.java on lines 1..127

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

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

    try {
      System.out.println("getReportRule() result:");
      // begin-get_report_rule
      GetReportRuleOptions getReportRuleOptions = new GetReportRuleOptions.Builder()
        .reportId(reportIdForReportLink)
examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 298..316

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

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

    try {
      System.out.println("getReportControls() result:");
      // begin-get_report_controls
      GetReportControlsOptions getReportControlsOptions = new GetReportControlsOptions.Builder()
        .reportId(reportIdForReportLink)
examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 278..296

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

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

    private Builder(GetReportControlsOptions getReportControlsOptions) {
      this.reportId = getReportControlsOptions.reportId;
      this.xCorrelationId = getReportControlsOptions.xCorrelationId;
      this.xRequestId = getReportControlsOptions.xRequestId;
      this.controlId = getReportControlsOptions.controlId;
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ListReportsOptions.java on lines 61..71

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

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/ResourcePage.java on lines 1..127

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

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

    private Builder(ListReportsOptions listReportsOptions) {
      this.xCorrelationId = listReportsOptions.xCorrelationId;
      this.xRequestId = listReportsOptions.xRequestId;
      this.attachmentId = listReportsOptions.attachmentId;
      this.groupId = listReportsOptions.groupId;
modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/GetReportControlsOptions.java on lines 78..88

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

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

Method listReportResources has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public ServiceCall<ResourcePage> listReportResources(ListReportResourcesOptions listReportResourcesOptions) {
    com.ibm.cloud.sdk.core.util.Validator.notNull(listReportResourcesOptions,
      "listReportResourcesOptions cannot be null");
    Map<String, String> pathParamsMap = new HashMap<String, String>();
    pathParamsMap.put("report_id", listReportResourcesOptions.reportId());

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

        try {
          System.out.println("getReportViolationsDrift() result:");
          // begin-get_report_violations_drift
          GetReportViolationsDriftOptions getReportViolationsDriftOptions = new GetReportViolationsDriftOptions.Builder()
            .reportId(reportIdForReportLink)
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 198..215
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 318..335
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 337..354
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 356..373
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 560..577

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

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

        try {
          System.out.println("getReportSummary() result:");
          // begin-get_report_summary
          GetReportSummaryOptions getReportSummaryOptions = new GetReportSummaryOptions.Builder()
            .reportId(reportIdForReportLink)
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 179..196
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 198..215
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 318..335
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 356..373
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 560..577

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

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

        try {
          System.out.println("getReport() result:");
          // begin-get_report
          GetReportOptions getReportOptions = new GetReportOptions.Builder()
            .reportId(reportIdForReportLink)
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 179..196
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 198..215
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 318..335
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 337..354
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 560..577

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

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

        try {
          System.out.println("getReportEvaluation() result:");
          // begin-get_report_evaluation
          GetReportEvaluationOptions getReportEvaluationOptions = new GetReportEvaluationOptions.Builder()
            .reportId(reportIdForReportLink)
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 179..196
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 198..215
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 337..354
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 356..373
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 560..577

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

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

        try {
          System.out.println("getRule() result:");
          // begin-get_rule
          GetRuleOptions getRuleOptions = new GetRuleOptions.Builder()
            .ruleId(ruleIdLink)
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 179..196
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 198..215
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 318..335
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 337..354
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 356..373

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

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

        try {
          System.out.println("getReportTags() result:");
          // begin-get_report_tags
          GetReportTagsOptions getReportTagsOptions = new GetReportTagsOptions.Builder()
            .reportId(reportIdForReportLink)
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 179..196
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 318..335
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 337..354
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 356..373
    examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 560..577

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

    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

    Method listReports has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      public ServiceCall<ReportPage> listReports(ListReportsOptions listReportsOptions) {
        if (listReportsOptions == null) {
          listReportsOptions = new ListReportsOptions.Builder().build();
        }
        RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reports"));

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

          private Builder(CreateRuleOptions createRuleOptions) {
            this.description = createRuleOptions.description;
            this.target = createRuleOptions.target;
            this.requiredConfig = createRuleOptions.requiredConfig;
            this.version = createRuleOptions.version;
      modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/AttachmentsPrototype.java on lines 76..85
      modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ControlSpecifications.java on lines 66..75
      modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ReplaceProfileOptions.java on lines 62..71

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

      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

          private Builder(AttachmentsPrototype attachmentsPrototype) {
            this.id = attachmentsPrototype.id;
            this.name = attachmentsPrototype.name;
            this.description = attachmentsPrototype.description;
            this.scope = attachmentsPrototype.scope;
      modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ControlSpecifications.java on lines 66..75
      modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/CreateRuleOptions.java on lines 52..61
      modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ReplaceProfileOptions.java on lines 62..71

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

      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

          private Builder(ControlSpecifications controlSpecifications) {
            this.controlSpecificationId = controlSpecifications.controlSpecificationId;
            this.responsibility = controlSpecifications.responsibility;
            this.componentId = controlSpecifications.componentId;
            this.componentName = controlSpecifications.componentName;
      modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/AttachmentsPrototype.java on lines 76..85
      modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/CreateRuleOptions.java on lines 52..61
      modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ReplaceProfileOptions.java on lines 62..71

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

      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

          private Builder(ReplaceProfileOptions replaceProfileOptions) {
            this.profileId = replaceProfileOptions.profileId;
            this.profileName = replaceProfileOptions.profileName;
            this.profileDescription = replaceProfileOptions.profileDescription;
            this.profileType = replaceProfileOptions.profileType;
      modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/AttachmentsPrototype.java on lines 76..85
      modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/ControlSpecifications.java on lines 66..75
      modules/security-and-compliance-center-api/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/model/CreateRuleOptions.java on lines 52..61

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

      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

      Method getReportControls has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        public ServiceCall<ReportControls> getReportControls(GetReportControlsOptions getReportControlsOptions) {
          com.ibm.cloud.sdk.core.util.Validator.notNull(getReportControlsOptions,
            "getReportControlsOptions cannot be null");
          Map<String, String> pathParamsMap = new HashMap<String, String>();
          pathParamsMap.put("report_id", getReportControlsOptions.reportId());

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

            try {
              System.out.println("getProviderTypeInstance() result:");
              // begin-get_provider_type_instance
              GetProviderTypeInstanceOptions getProviderTypeInstanceOptions = new GetProviderTypeInstanceOptions.Builder()
                .providerTypeId(providerTypeIdLink)
        examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 985..1001
        examples/src/main/java/com/ibm/cloud/security_and_compliance_center_api/v3/SecurityAndComplianceCenterApiExamples.java on lines 1269..1285

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

        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