blob: 9098988ecf01ba77dc9c09489b5d41985de604ca [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
| Generated by Apache Maven Doxia at Jun 9, 2012
| Rendered using Apache Maven Fluido Skin
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CPD Results</title>
<link rel="stylesheet" href="./css/apache-maven-fluido.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.min.js"></script>
<meta name="Date-Revision-yyyymmdd" content="20120609" />
<meta http-equiv="Content-Language" content="en" />
</head>
<body class="topBarDisabled">
<div class="container-fluid">
<div id="banner">
<div class="pull-left">
<a href="../index.html" id="bannerLeft">
<img src="../images/ls-logo.jpg" alt="Logging Services"/>
</a>
</div>
<div class="pull-right"> <div id="bannerRight">
<img src="../images/logo.jpg" />
</div>
</div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2012-06-09</li>
<li class="divider">|</li> <li id="projectVersion">Version: 2.0-alpha1-SNAPSHOT</li>
<li class="pull-right"> <a href="http://wiki.apache.org/logging" class="externalLink" title="Logging Wiki">Logging Wiki</a>
</li>
<li class="divider pull-right">|</li>
<li class="pull-right"> <a href="http://www.apache.org/" class="externalLink" title="Apache">Apache</a>
</li>
<li class="divider pull-right">|</li>
<li class="pull-right"> <a href="../../../" title="Logging Services">Logging Services</a>
</li>
<li class="divider pull-right">|</li>
<li class="pull-right"> <a href="../../" title="Log4j">Log4j</a>
</li>
<li class="divider pull-right">|</li>
<li class="pull-right"> <a href="../../companions" title="Log4j Companions">Log4j Companions</a>
</li>
<li class="divider pull-right">|</li>
<li class="pull-right"> <a href="../index.html" title="Log4j">Log4j</a>
</li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span3">
<div class="well sidebar-nav">
<h3>Apache Log4j™ 2</h3>
<ul>
<li class="none">
<a href="../index.html" title="About">About</a>
</li>
<li class="none">
<a href="../download.html" title="Download">Download</a>
</li>
<li class="none">
<a href="../build.html" title="Build and Install">Build and Install</a>
</li>
<li class="none">
<a href="../changelog.html" title="Changelog">Changelog</a>
</li>
</ul>
<h3>Manual</h3>
<ul>
<li class="none">
<a href="../manual/index.html" title="Introduction">Introduction</a>
</li>
<li class="none">
<a href="../manual/architecture.html" title="Architecture">Architecture</a>
</li>
<li class="collapsed">
<a href="../manual/api.html" title="API">API</a>
</li>
<li class="collapsed">
<a href="../manual/configuration.html" title="Configuration">Configuration</a>
</li>
<li class="collapsed">
<a href="../manual/plugins.html" title="Plugins">Plugins</a>
</li>
<li class="collapsed">
<a href="../manual/lookups.html" title="Lookups">Lookups</a>
</li>
<li class="collapsed">
<a href="../manual/appenders.html" title="Appenders">Appenders</a>
</li>
<li class="collapsed">
<a href="../manual/layouts.html" title="Layouts">Layouts</a>
</li>
<li class="collapsed">
<a href="../manual/filters.html" title="Filters">Filters</a>
</li>
<li class="none">
<a href="../manual/jmx.html" title="JMX">JMX</a>
</li>
<li class="none">
<a href="../manual/logsep.html" title="Logging Separation">Logging Separation</a>
</li>
<li class="collapsed">
<a href="../manual/extending.html" title="Extending Log4j">Extending Log4j</a>
</li>
</ul>
<h3>Logging Adapters</h3>
<ul>
<li class="none">
<a href="../log4j12-api/api.html" title="Log4j 1.x API">Log4j 1.x API</a>
</li>
<li class="none">
<a href="../log4j2-jcl/api.html" title="Commons Logging">Commons Logging</a>
</li>
<li class="none">
<a href="../slf4j-impl/api.html" title="SLF4J">SLF4J</a>
</li>
</ul>
<h3>Components</h3>
<ul>
<li class="none">
<a href="../log4j-api/index.html" title="API">API</a>
</li>
<li class="none">
<a href="../log4j-core/index.html" title="Impl">Impl</a>
</li>
<li class="none">
<a href="../log4j12-api/index.html" title="Log4J 1.2 API">Log4J 1.2 API</a>
</li>
<li class="none">
<a href="../log4j-jcl/index.html" title="Commons Logging Bridge">Commons Logging Bridge</a>
</li>
<li class="none">
<a href="../slf4j-impl/index.html" title="SLF4J Binding">SLF4J Binding</a>
</li>
<li class="none">
<a href="../log4j-flume-og/index.html" title="Flume OG">Flume OG</a>
</li>
<li class="none">
<a href="../log4j-flume-ng/index.html" title="Flume NG">Flume NG</a>
</li>
</ul>
<h3>Project Documentation</h3>
<ul>
<li class="collapsed">
<a href="project-info.html" title="Project Information">Project Information</a>
</li>
<li class="expanded">
<a href="project-reports.html" title="Project Reports">Project Reports</a>
<ul>
<li class="none">
<a href="changes-report.html" title="Changes Report">Changes Report</a>
</li>
<li class="none">
<a href="surefire-report.html" title="Surefire Report">Surefire Report</a>
</li>
<li class="none">
<a href="rat-report.html" title="RAT Report">RAT Report</a>
</li>
<li class="none">
<a href="checkstyle.html" title="Checkstyle">Checkstyle</a>
</li>
<li class="none">
<a href="apidocs/index.html" title="JavaDocs">JavaDocs</a>
</li>
<li class="none">
<a href="findbugs.html" title="FindBugs Report">FindBugs Report</a>
</li>
<li class="none">
<a href="xref/index.html" title="Source Xref">Source Xref</a>
</li>
<li class="none">
<a href="pmd.html" title="PMD Report">PMD Report</a>
</li>
<li class="none">
<strong>CPD Report</strong>
</li>
</ul>
</li>
</ul>
<hr class="divider" />
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
</a>
</div>
</div>
</div>
<div id="bodyColumn" class="span9" >
<div class="section"><h2>CPD Results<a name="CPD_Results"></a></h2><p>The following document contains the results of PMD's <a class="externalLink" href="http://pmd.sourceforge.net/cpd.html">CPD</a> 4.3.</p></div><div class="section"><h2>Duplications<a name="Duplications"></a></h2><table border="0" class="zebra-striped"><tr class="a"><th>File</th><th>Line</th></tr><tr class="b"><td>org/apache/logging/log4j/core/config/JSONConfiguration.java</td><td><a href="./xref/org/apache/logging/log4j/core/config/JSONConfiguration.html#70">70</a></td></tr><tr class="a"><td>org/apache/logging/log4j/core/config/XMLConfiguration.java</td><td><a href="./xref/org/apache/logging/log4j/core/config/XMLConfiguration.html#88">88</a></td></tr><tr class="b"><td colspan='2'><div><pre> for (Map.Entry&lt;String, String&gt; entry : rootNode.getAttributes().entrySet()) {
if (&quot;status&quot;.equalsIgnoreCase(entry.getKey())) {
status = Level.toLevel(entry.getValue().toUpperCase(), Level.OFF);
} else if (&quot;verbose&quot;.equalsIgnoreCase(entry.getKey())) {
verbose = Boolean.parseBoolean(entry.getValue());
} else if (&quot;packages&quot;.equalsIgnoreCase(entry.getKey())) {
String[] packages = entry.getValue().split(&quot;,&quot;);
for (String p : packages) {
PluginManager.addPackage(p);
}
} else if (&quot;name&quot;.equalsIgnoreCase(entry.getKey())) {
setName(entry.getValue());
} else if (&quot;monitorInterval&quot;.equalsIgnoreCase(entry.getKey())) {</pre></div></td></tr></table><table border="0" class="zebra-striped"><tr class="a"><th>File</th><th>Line</th></tr><tr class="b"><td>org/apache/logging/log4j/core/layout/HTMLLayout.java</td><td><a href="./xref/org/apache/logging/log4j/core/layout/HTMLLayout.html#150">150</a></td></tr><tr class="a"><td>org/apache/logging/log4j/core/layout/XMLLayout.java</td><td><a href="./xref/org/apache/logging/log4j/core/layout/XMLLayout.html#194">194</a></td></tr><tr class="b"><td colspan='2'><div><pre> private void appendThrowableAsHTML(Throwable throwable, StringBuilder sbuf) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
try {
throwable.printStackTrace(pw);
} catch (RuntimeException ex) {
// Ignore the exception.
}
pw.flush();
LineNumberReader reader = new LineNumberReader(new StringReader(sw.toString()));
ArrayList&lt;String&gt; lines = new ArrayList&lt;String&gt;();
try {
String line = reader.readLine();
while (line != null) {
lines.add(line);
line = reader.readLine();
}
} catch (IOException ex) {
if (ex instanceof InterruptedIOException) {
Thread.currentThread().interrupt();
}
lines.add(ex.toString());
}</pre></div></td></tr></table><table border="0" class="zebra-striped"><tr class="a"><th>File</th><th>Line</th></tr><tr class="b"><td>org/apache/logging/log4j/core/appender/rolling/helper/GZCompressAction.java</td><td><a href="./xref/org/apache/logging/log4j/core/appender/rolling/helper/GZCompressAction.html#57">57</a></td></tr><tr class="a"><td>org/apache/logging/log4j/core/appender/rolling/helper/ZipCompressAction.java</td><td><a href="./xref/org/apache/logging/log4j/core/appender/rolling/helper/ZipCompressAction.html#58">58</a></td></tr><tr class="b"><td colspan='2'><div><pre> public GZCompressAction(final File source, final File destination, final boolean deleteSource) {
if (source == null) {
throw new NullPointerException(&quot;source&quot;);
}
if (destination == null) {
throw new NullPointerException(&quot;destination&quot;);
}
this.source = source;
this.destination = destination;
this.deleteSource = deleteSource;
}
/**
* Compress.
*
* @return true if successfully compressed.
* @throws IOException on IO exception.
*/
public boolean execute() throws IOException {
return execute(source, destination, deleteSource);
}
/**
* Compress a file.
*
* @param source file to compress, may not be null.
* @param destination compressed file, may not be null.
* @param deleteSource if true, attempt to delete file on completion. Failure to delete
* does not cause an exception to be thrown or affect return value.
* @return true if source file compressed.
* @throws IOException on IO exception.
*/
public static boolean execute(final File source, final File destination, final boolean deleteSource)
throws IOException {
if (source.exists()) {
FileInputStream fis = new FileInputStream(source);
FileOutputStream fos = new FileOutputStream(destination);</pre></div></td></tr></table><table border="0" class="zebra-striped"><tr class="a"><th>File</th><th>Line</th></tr><tr class="b"><td>org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.java</td><td><a href="./xref/org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.html#66">66</a></td></tr><tr class="a"><td>org/apache/logging/log4j/core/pattern/RootThrowablePatternConverter.java</td><td><a href="./xref/org/apache/logging/log4j/core/pattern/RootThrowablePatternConverter.html#67">67</a></td></tr><tr class="b"><td colspan='2'><div><pre> String trace = t.getExtendedStackTrace();
int len = toAppendTo.length();
if (len &gt; 0 &amp;&amp; !Character.isWhitespace(toAppendTo.charAt(len - 1))) {
toAppendTo.append(&quot; &quot;);
}
if (lines &gt; 0) {
StringBuilder sb = new StringBuilder();
String[] array = trace.split(&quot;\n&quot;);
for (int i = 0; i &lt; lines; ++i) {
sb.append(array[i]).append(&quot;\n&quot;);
}
toAppendTo.append(sb.toString());
} else {
toAppendTo.append(trace);
}
}
}
}</pre></div></td></tr></table><table border="0" class="zebra-striped"><tr class="a"><th>File</th><th>Line</th></tr><tr class="b"><td>org/apache/logging/log4j/core/filter/BurstFilter.java</td><td><a href="./xref/org/apache/logging/log4j/core/filter/BurstFilter.html#87">87</a></td></tr><tr class="a"><td>org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java</td><td><a href="./xref/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.html#55">55</a></td></tr><tr class="b"><td>org/apache/logging/log4j/core/filter/ThresholdFilter.java</td><td><a href="./xref/org/apache/logging/log4j/core/filter/ThresholdFilter.html#44">44</a></td></tr><tr class="a"><td colspan='2'><div><pre> }
public Result filter(Logger logger, Level level, Marker marker, String msg, Object[] params) {
return filter(level);
}
public Result filter(Logger logger, Level level, Marker marker, Object msg, Throwable t) {
return filter(level);
}
public Result filter(Logger logger, Level level, Marker marker, Message msg, Throwable t) {
return filter(level);
}
@Override
public Result filter(LogEvent event) {
return filter(event.getLevel());
}
/**
* Decide if we're going to log &lt;code&gt;event&lt;/code&gt; based on whether the
* maximum burst of log statements has been exceeded.
*
* @param level The log level.
* @return The onMatch value if the filter passes, onMismatch otherwise.
*/
private Result filter(Level level) {</pre></div></td></tr></table></div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row span16">Copyright &copy; 1999-2012
<a href="http://www.apache.org">Apache Software Foundation</a>.
All Rights Reserved.
</div>
</div>
</footer>
</body>
</html>