jenkinsci/hpe-application-automation-tools-plugin

View on GitHub

Showing 716 of 716 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            function showError(message) {
                var container = $("<div class='error'/>");
                container.html(message);
                target.append(container);
                target.show();
Severity: Minor
Found in src/main/resources/lib/octane/configure.js and 1 other location - About 50 mins to fix
src/main/resources/lib/octane/configure.js on lines 669..674

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

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                function showError(message) {
                    var container = $("<div class='error'/>");
                    container.html(message);
                    target.append(container);
                    target.show();
Severity: Minor
Found in src/main/resources/lib/octane/configure.js and 1 other location - About 50 mins to fix
src/main/resources/lib/octane/configure.js on lines 1069..1074

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

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

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

                if (Pattern.matches(".*" + quotedTerm + ".*", NOT_SPECIFIED.toLowerCase())) {
                    JSONObject notSpecifiedItemJson = new JSONObject();
                    notSpecifiedItemJson.put(ID_FIELD, -1);
                    notSpecifiedItemJson.put(TEXT_FIELD, NOT_SPECIFIED);
                    retArray.add(notSpecifiedItemJson);
src/main/java/com/microfocus/application/automation/tools/octane/configuration/JobConfigurationProxy.java on lines 631..636
src/main/java/com/microfocus/application/automation/tools/octane/configuration/JobConfigurationProxy.java on lines 667..672

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

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

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

            if (Pattern.matches(".*" + quotedTerm + ".*", NOT_SPECIFIED.toLowerCase())) {
                JSONObject notSpecifiedItemJson = new JSONObject();
                notSpecifiedItemJson.put(ID_FIELD, -1);
                notSpecifiedItemJson.put(TEXT_FIELD, NOT_SPECIFIED);
                retArray.add(notSpecifiedItemJson);
src/main/java/com/microfocus/application/automation/tools/octane/configuration/JobConfigurationProxy.java on lines 582..587
src/main/java/com/microfocus/application/automation/tools/octane/configuration/JobConfigurationProxy.java on lines 667..672

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

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

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

            if (Pattern.matches(".*" + quotedTerm + ".*", NOT_SPECIFIED.toLowerCase())) {
                JSONObject notSpecifiedItemJson = new JSONObject();
                notSpecifiedItemJson.put(ID_FIELD, -1);
                notSpecifiedItemJson.put(TEXT_FIELD, NOT_SPECIFIED);
                retArray.add(notSpecifiedItemJson);
src/main/java/com/microfocus/application/automation/tools/octane/configuration/JobConfigurationProxy.java on lines 582..587
src/main/java/com/microfocus/application/automation/tools/octane/configuration/JobConfigurationProxy.java on lines 631..636

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

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    private static final class ResultFilesCallable extends MasterToSlaveFileCallable<String[]> {
        private final String glob;

        private ResultFilesCallable(String glob) {
            this.glob = glob;
src/main/java/com/microfocus/application/automation/tools/octane/actions/cucumber/CucumberResultsService.java on lines 116..129

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

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    private static final class ResultFilesCallable extends MasterToSlaveFileCallable<String[]> {
        private final String glob;

        private ResultFilesCallable(String glob) {
            this.glob = glob;
src/main/java/com/microfocus/application/automation/tools/octane/actions/coverage/CoverageService.java on lines 119..132

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

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            try {
                TestSetReader tr = new TestSetReader(file, entitiesFieldMap);
                xmlResultEntities.addAll(tr.readTestsets());
            } catch (Exception e) {
                logger.error(e.getMessage());
src/main/java/com/microfocus/application/automation/tools/commonResultUpload/xmlreader/XmlReader.java on lines 111..118

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

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            try {
                TestSetReader tr = new TestSetReader(fullpath, entitiesFieldMap);
                xmlResultEntities.addAll(tr.readTestsets());
            } catch (Exception e) {
                logger.error(e.getMessage());
src/main/java/com/microfocus/application/automation/tools/commonResultUpload/xmlreader/XmlReader.java on lines 95..102

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

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

Avoid deeply nested control flow statements.
Open

                                default:
                                    throw new ArgumentException(
                                                 "Malformed \\uxxxx encoding.");
Severity: Major
Found in HpToolsLauncher/JavaProperties/JavaProperties.cs - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                  if (property instanceof Mailer.UserProperty) {
                    userEmail = ((Mailer.UserProperty) property).getAddress();
                  }

      Avoid deeply nested control flow statements.
      Open

                                          case SlaRuleStatus.Failed:
                                              failed++;
                                              break;
      Severity: Major
      Found in LRAnalysisLauncher/Program.cs - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                            case SlaRuleStatus.NoData:
                                                noData++;
                                                break;
        Severity: Major
        Found in LRAnalysisLauncher/Program.cs - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                              default:
                                                  break;
          Severity: Major
          Found in LRAnalysisLauncher/Program.cs - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if(!StringUtils.isNullOrEmpty(almUsername) || !StringUtils.isNullOrEmpty(almClientID)) {
                                        listener.getLogger().println("Migrating credentials from task " + job.getDisplayName());
            
                                        for (AlmServerSettingsModel model : models) {
                                            if (model.getAlmServerName().equals(almBuilder.getAlmServerName())) {

              Avoid deeply nested control flow statements.
              Open

                                              case 'A':
                                              case 'B':
                                              case 'C':
                                              case 'D':
                                              case 'E':
              Severity: Major
              Found in HpToolsLauncher/Interfaces/JavaProperties/JavaProperties.cs - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if (!testCaseElement.hasAttribute(REPORT_NAME_FIELD)) {
                                            continue;
                                        }

                  Avoid deeply nested control flow statements.
                  Open

                                          if (property instanceof Mailer.UserProperty) {
                                              userEmail = ((Mailer.UserProperty) property).getAddress();
                                          }

                    Avoid deeply nested control flow statements.
                    Open

                                                if (!("testinstanceid".equals(name) && "AUTO".equals(getPcModel().getAutoTestInstanceID()))
                                                        && !(("retrydelay".equals(name) && "NO_RETRY".equals(getPcModel().getRetry())) || getPcModel().getRetry().isEmpty())
                                                        && !(("retryoccurrences".equals(name) && "NO_RETRY".equals(getPcModel().getRetry())) || getPcModel().getRetry().isEmpty())
                                                ) {
                                                    if ("doCheckCredentialsId".equals(method.getName()) && "credentialsid".equals(name) && "getCredentialsId".equals(modelMethodName)

                      Avoid deeply nested control flow statements.
                      Open

                                                  if (!obj.equals(FormValidation.ok())) {
                                                      logger.println(obj);
                                                      ret = false;
                                                  }
                        Severity
                        Category
                        Status
                        Source
                        Language