ci.jenkins.io / CPD
succeeded
Jan 8, 2024 in 0s
5 new issues, 302 total
Total | New | Outstanding | Fixed | Trend |
---|---|---|---|---|
302 | 5 | 297 | 6 | 👍 |
Reference build: Plugins » warnings-ng-plugin » main #25
Details
Severity distribution of new issues
Error | Warning High | Warning Normal | Warning Low |
---|---|---|---|
0 | 1 | 1 | 3 |
Annotations
ci-jenkins-io / CPD
CPD
HIGH:
Found duplicated code.
Raw output
<pre><code>} @CheckForNull public String getSourceCodeEncoding() { return sourceCodeEncoding; } /** * Sets the encoding to use to read source files. * * @param sourceCodeEncoding * the encoding, e.g. "ISO-8859-1" */ @DataBoundSetter public void setSourceCodeEncoding(final String sourceCodeEncoding) { this.sourceCodeEncoding = sourceCodeEncoding; } public String getSourceDirectory() { return sourceDirectory; } /** * Sets the path to the folder that contains the source code. If not relative and thus not part of the workspace * then this folder needs to be added in Jenkins global configuration. * * @param sourceDirectory * a folder containing the source code */ @DataBoundSetter public void setSourceDirectory(final String sourceDirectory) { this.sourceDirectory = sourceDirectory; } /** * Sets the paths to the directories that contain the source code. If not relative and thus not part of the * workspace then these directories need to be added in Jenkins global configuration to prevent accessing of * forbidden resources. * * @param sourceDirectories * directories containing the source code */ @DataBoundSetter public void setSourceDirectories(final List<SourceCodeDirectory> sourceDirectories) { this.sourceDirectories = new HashSet<>(sourceDirectories); } public List<SourceCodeDirectory> getSourceDirectories() { return new ArrayList<>(sourceDirectories); } private List<SourceCodeDirectory> getAllSourceDirectories() {<!-- --></code></pre>
ci-jenkins-io / CPD
CPD
NORMAL:
Found duplicated code.
Raw output
<pre><code>} @CheckForNull public String getSourceCodeEncoding() { return sourceCodeEncoding; } /** * Sets the encoding to use to read source files. * * @param sourceCodeEncoding * the encoding, e.g. "ISO-8859-1" */ @DataBoundSetter public void setSourceCodeEncoding(final String sourceCodeEncoding) { this.sourceCodeEncoding = sourceCodeEncoding; } public String getSourceDirectory() { return sourceDirectory; } /** * Sets the path to the directory that contains the source code. If not relative and thus not part of the workspace * then this directory needs to be added in Jenkins global configuration to prevent accessing of forbidden resources. * * @param sourceDirectory * directory containing the source code */ @DataBoundSetter public void setSourceDirectory(final String sourceDirectory) { this.sourceDirectory = sourceDirectory; } /** * Sets the paths to the directories that contain the source code. If not relative and thus not part of the workspace * then these directories need to be added in Jenkins global configuration to prevent accessing of forbidden resources. * * @param sourceDirectories * directories containing the source code */ @DataBoundSetter public void setSourceDirectories(final List<SourceCodeDirectory> sourceDirectories) { this.sourceDirectories = new HashSet<>(sourceDirectories); } public List<SourceCodeDirectory> getSourceDirectories() { return new ArrayList<>(sourceDirectories); }</code></pre>
ci-jenkins-io / CPD
CPD
LOW:
Found duplicated code.
Raw output
<pre><code>void shouldShowModulesForVariousModulesDetectedForOsgiMavenAndAntInTheHtmlOutput() { String[] workspaceFiles = { BUILD_FILE_PATH + ANT_BUILD_FILE_LOCATION + "build.xml", BUILD_FILE_PATH + ANT_BUILD_FILE_LOCATION + "m1/build.xml", BUILD_FILE_PATH + MAVEN_BUILD_FILE_LOCATION + "pom.xml", BUILD_FILE_PATH + MAVEN_BUILD_FILE_LOCATION + "m1/pom.xml", BUILD_FILE_PATH + MAVEN_BUILD_FILE_LOCATION + "m2/pom.xml", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "META-INF/MANIFEST.MF", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "m1/META-INF/MANIFEST.MF", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "m2/META-INF/MANIFEST.MF", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "m3/META-INF/MANIFEST.MF", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "plugin.properties"};</code></pre>
ci-jenkins-io / CPD
CPD
LOW:
Found duplicated code.
Raw output
<pre><code>void shouldShowModulesForVariousModulesDetectedForOsgiMavenAndAntInTheHtmlOutput() { String[] workspaceFiles = { BUILD_FILE_PATH + ANT_BUILD_FILE_LOCATION + "build.xml", BUILD_FILE_PATH + ANT_BUILD_FILE_LOCATION + "m1/build.xml", BUILD_FILE_PATH + MAVEN_BUILD_FILE_LOCATION + "pom.xml", BUILD_FILE_PATH + MAVEN_BUILD_FILE_LOCATION + "m1/pom.xml", BUILD_FILE_PATH + MAVEN_BUILD_FILE_LOCATION + "m2/pom.xml", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "META-INF/MANIFEST.MF", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "m1/META-INF/MANIFEST.MF", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "m2/META-INF/MANIFEST.MF", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "m3/META-INF/MANIFEST.MF", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "plugin.properties"};</code></pre>
ci-jenkins-io / CPD
CPD
LOW:
Found duplicated code.
Raw output
<pre><code>void shouldShowModulesForVariousModulesDetectedForOsgiMavenAndAntInTheHtmlOutput() { String[] workspaceFiles = { BUILD_FILE_PATH + ANT_BUILD_FILE_LOCATION + "build.xml", BUILD_FILE_PATH + ANT_BUILD_FILE_LOCATION + "m1/build.xml", BUILD_FILE_PATH + MAVEN_BUILD_FILE_LOCATION + "pom.xml", BUILD_FILE_PATH + MAVEN_BUILD_FILE_LOCATION + "m1/pom.xml", BUILD_FILE_PATH + MAVEN_BUILD_FILE_LOCATION + "m2/pom.xml", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "META-INF/MANIFEST.MF", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "m1/META-INF/MANIFEST.MF", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "m2/META-INF/MANIFEST.MF", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "m3/META-INF/MANIFEST.MF", BUILD_FILE_PATH + OSGI_BUILD_FILE_LOCATION + "plugin.properties"};</code></pre>
Loading