}
private void report( final CPD cpd ) throws ReportException
{
final Renderer renderer = new XMLRenderer( encoding );
FileReporter reporter;
if ( outputFile == null )
{
reporter = new FileReporter( encoding );
}
else if ( outputFile.isAbsolute() )
{
reporter = new FileReporter( outputFile, encoding );
}
else
{
reporter = new FileReporter( new File( getProject().getBaseDir(), outputFile.toString() ), encoding );
}
reporter.report( renderer.render( cpd.getMatches() ) );
}