Files
2017-01-22 17:22:46 -05:00

390 lines
15 KiB
HTML

<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.7.1 at 2017-01-22
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20170122" />
<meta http-equiv="Content-Language" content="en" />
<title>dependency-check-core &#x2013; CPD Results</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script type="text/javascript" src="./js/apache-maven-fluido-1.5.min.js"></script>
<style type="text/css">
#bannerLeft { margin-top:-20px;margin-bottom:5px !important }
</style>
</head>
<body class="topBarDisabled">
<a href="https://github.com/jeremylong/DependencyCheck">
<img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"
alt="Fork me on GitHub">
</a>
<div class="container-fluid">
<div id="banner">
<div class="pull-left">
<div id="bannerLeft">
<img src="images/dc-core.svg" alt="OWASP dependency-check-core"/>
</div>
</div>
<div class="pull-right"> </div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li class="">
<a href="../../../../../../target/site/1.4.5/#" title="">
</a>
<span class="divider">/</span>
</li>
<li class="">
<a href="../index.html" title="dependency-check">
dependency-check</a>
<span class="divider">/</span>
</li>
<li class="active ">CPD Results</li>
<li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2017-01-22</li>
<li id="projectVersion" class="pull-right">
Version: 1.4.5
</li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span2">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li>
<a href="index.html" title="About">
<span class="none"></span>
About</a>
</li>
<li class="nav-header">Project Documentation</li>
<li>
<a href="project-info.html" title="Project Information">
<span class="icon-chevron-right"></span>
Project Information</a>
</li>
<li>
<a href="project-reports.html" title="Project Reports">
<span class="icon-chevron-down"></span>
Project Reports</a>
<ul class="nav nav-list">
<li>
<a href="dependency-analysis.html" title="Dependency Analysis">
<span class="none"></span>
Dependency Analysis</a>
</li>
<li>
<a href="apidocs/index.html" title="JavaDocs">
<span class="none"></span>
JavaDocs</a>
</li>
<li>
<a href="xref/index.html" title="Source Xref">
<span class="none"></span>
Source Xref</a>
</li>
<li>
<a href="xref-test/index.html" title="Test Source Xref">
<span class="none"></span>
Test Source Xref</a>
</li>
<li>
<a href="surefire-report.html" title="Surefire Report">
<span class="none"></span>
Surefire Report</a>
</li>
<li>
<a href="failsafe-report.html" title="Failsafe Report">
<span class="none"></span>
Failsafe Report</a>
</li>
<li>
<a href="cobertura/index.html" title="Cobertura Test Coverage">
<span class="none"></span>
Cobertura Test Coverage</a>
</li>
<li>
<a href="findbugs.html" title="FindBugs">
<span class="none"></span>
FindBugs</a>
</li>
<li>
<a href="taglist.html" title="Tag List">
<span class="none"></span>
Tag List</a>
</li>
<li>
<a href="dependency-updates-report.html" title="Dependency Updates Report">
<span class="none"></span>
Dependency Updates Report</a>
</li>
<li>
<a href="plugin-updates-report.html" title="Plugin Updates Report">
<span class="none"></span>
Plugin Updates Report</a>
</li>
<li>
<a href="checkstyle.html" title="Checkstyle">
<span class="none"></span>
Checkstyle</a>
</li>
<li class="active">
<a href="#"><span class="none"></span>CPD</a>
</li>
<li>
<a href="pmd.html" title="PMD">
<span class="none"></span>
PMD</a>
</li>
</ul>
</li>
</ul>
<hr />
<div id="poweredBy">
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<div class="g-plusone" data-href="https://github.com/jeremylong/DependencyCheck.git/dependency-check-core" data-size="tall" ></div>
<div class="clear"></div>
<div class="clear"></div>
<div id="twitter">
<a href="https://twitter.com/ctxt" class="twitter-follow-button" data-show-count="true" data-align="left" data-size="medium" data-show-screen-name="true" data-lang="en">Follow ctxt</a>
<script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
<div class="clear"></div>
<div class="clear"></div>
<a href="http://maven.apache.org/" title="Maven" class="builtBy">
<img class="builtBy" alt="built with maven" src="http://jeremylong.github.io/DependencyCheck/images/logos/maven-feather.png" />
</a>
<a href="http://www.jetbrains.com/idea/" title="IntelliJ" class="builtBy">
<img class="builtBy" alt="developed using" src="http://jeremylong.github.io/DependencyCheck/images/logos/logo_intellij_idea.png" width="170px" />
</a>
</div>
</div>
</div>
<div id="bodyColumn" class="span10" >
<div class="section">
<h2><a name="CPD_Results"></a>CPD Results</h2>
<p>The following document contains the results of PMD's <a class="externalLink" href="http://pmd.sourceforge.net/cpd.html">CPD</a> 5.3.5.</p></div>
<div class="section">
<h2><a name="Duplications"></a>Duplications</h2>
<table border="0" class="table table-striped">
<tr class="a">
<th>File</th>
<th>Line</th></tr>
<tr class="b">
<td>org\owasp\dependencycheck\analyzer\ArchiveAnalyzer.java</td>
<td><a href="./xref/org/owasp/dependencycheck/analyzer/ArchiveAnalyzer.html#L179">179</a></td></tr>
<tr class="a">
<td>org\owasp\dependencycheck\analyzer\PythonDistributionAnalyzer.java</td>
<td><a href="./xref/org/owasp/dependencycheck/analyzer/PythonDistributionAnalyzer.html#L248">248</a></td></tr>
<tr class="b"><td colspan='2'>
<div>
<pre> public void initializeFileTypeAnalyzer() throws InitializationException {
try {
final File baseDir = Settings.getTempDirectory();
tempFileLocation = File.createTempFile(&quot;check&quot;, &quot;tmp&quot;, baseDir);
if (!tempFileLocation.delete()) {
setEnabled(false);
final String msg = String.format(&quot;Unable to delete temporary file '%s'.&quot;, tempFileLocation.getAbsolutePath());
throw new InitializationException(msg);
}
if (!tempFileLocation.mkdirs()) {
setEnabled(false);
final String msg = String.format(&quot;Unable to create directory '%s'.&quot;, tempFileLocation.getAbsolutePath());
throw new InitializationException(msg);
}
} catch (IOException ex) {
setEnabled(false);
throw new InitializationException(&quot;Unable to create a temporary file&quot;, ex);
}
}
/**
* The close method deletes any temporary files and directories created
* during analysis.
*
* @throws Exception thrown if there is an exception deleting temporary
* files
*/
@Override
public void closeAnalyzer() throws Exception {</pre></div></td></tr></table>
<table border="0" class="table table-striped">
<tr class="a">
<th>File</th>
<th>Line</th></tr>
<tr class="b">
<td>org\owasp\dependencycheck\analyzer\DependencyBundlingAnalyzer.java</td>
<td><a href="./xref/org/owasp/dependencycheck/analyzer/DependencyBundlingAnalyzer.html#L132">132</a></td></tr>
<tr class="a">
<td>org\owasp\dependencycheck\analyzer\DependencyMergingAnalyzer.java</td>
<td><a href="./xref/org/owasp/dependencycheck/analyzer/DependencyMergingAnalyzer.html#L114">114</a></td></tr>
<tr class="b"><td colspan='2'>
<div>
<pre> }
/**
* Analyzes a set of dependencies. If they have been found to have the same
* base path and the same set of identifiers they are likely related. The
* related dependencies are bundled into a single reportable item.
*
* @param ignore this analyzer ignores the dependency being analyzed
* @param engine the engine that is scanning the dependencies
* @throws AnalysisException is thrown if there is an error reading the JAR
* file.
*/
@Override
protected synchronized void analyzeDependency(Dependency ignore, Engine engine) throws AnalysisException {
if (!analyzed) {
analyzed = true;
final Set&lt;Dependency&gt; dependenciesToRemove = new HashSet&lt;Dependency&gt;();
final ListIterator&lt;Dependency&gt; mainIterator = engine.getDependencies().listIterator();
//for (Dependency nextDependency : engine.getDependencies()) {
while (mainIterator.hasNext()) {
final Dependency dependency = mainIterator.next();
if (mainIterator.hasNext() &amp;&amp; !dependenciesToRemove.contains(dependency)) {
final ListIterator&lt;Dependency&gt; subIterator = engine.getDependencies().listIterator(mainIterator.nextIndex());
while (subIterator.hasNext()) {
final Dependency nextDependency = subIterator.next();</pre></div></td></tr></table>
<table border="0" class="table table-striped">
<tr class="a">
<th>File</th>
<th>Line</th></tr>
<tr class="b">
<td>org\owasp\dependencycheck\analyzer\JarAnalyzer.java</td>
<td><a href="./xref/org/owasp/dependencycheck/analyzer/JarAnalyzer.html#L902">902</a></td></tr>
<tr class="a">
<td>org\owasp\dependencycheck\analyzer\PythonDistributionAnalyzer.java</td>
<td><a href="./xref/org/owasp/dependencycheck/analyzer/PythonDistributionAnalyzer.html#L263">263</a></td></tr>
<tr class="b"><td colspan='2'>
<div>
<pre> setEnabled(false);
throw new InitializationException(msg);
}
} catch (IOException ex) {
setEnabled(false);
throw new InitializationException(&quot;Unable to create a temporary file&quot;, ex);
}
}
/**
* Deletes any files extracted from the JAR during analysis.
*/
@Override
public void closeAnalyzer() {
if (tempFileLocation != null &amp;&amp; tempFileLocation.exists()) {
LOGGER.debug(&quot;Attempting to delete temporary files&quot;);
final boolean success = FileUtils.delete(tempFileLocation);
if (!success &amp;&amp; tempFileLocation.exists()) {
final String[] l = tempFileLocation.list();
if (l != null &amp;&amp; l.length &gt; 0) {
LOGGER.warn(&quot;Failed to delete some temporary files, see the log for more details&quot;);
}
}
}
}
/**
* Determines if the key value pair from the manifest is for an &quot;import&quot;
* type entry for package names.
*
* @param key the key from the manifest
* @param value the value from the manifest
* @return true or false depending on if it is believed the entry is an
* &quot;import&quot; entry
*/
private boolean isImportPackage(String key, String value) {</pre></div></td></tr></table></div>
</div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p >Copyright &copy; 2012&#x2013;2017
<a href="http://www.owasp.org">OWASP</a>.
All rights reserved.
</p>
</div>
</div>
</footer>
</body>
</html>