String[] result = null;
String[] result;
    protected String[] getSourceFiles( CompilerConfiguration config )    {        Set sources = new HashSet();        Set sourceFiles = config.getSourceFiles();        if ( sourceFiles != null && !sourceFiles.isEmpty() )        {            for ( Iterator it = sourceFiles.iterator(); it.hasNext(); )            {                File sourceFile = (File) it.next();                sources.add( sourceFile.getAbsolutePath() );            }        }        else        {            for ( Iterator it = config.getSourceLocations().iterator(); it.hasNext(); )            {                String sourceLocation = (String) it.next();                DirectoryScanner scanner = new DirectoryScanner();                scanner.setBasedir( sourceLocation );                Set includes = config.getIncludes();                if ( includes != null && !includes.isEmpty() )                {                    String[] inclStrs = (String[]) includes.toArray( new String[includes.size()] );                    scanner.setIncludes( inclStrs );                }                else                {                    scanner.setIncludes( new String[] { "**/*.java" } );                }                Set excludes = config.getExcludes();                if ( excludes != null && !excludes.isEmpty() )                {                    String[] exclStrs = (String[]) excludes.toArray( new String[excludes.size()] );                    scanner.setIncludes( exclStrs );                }                scanner.scan();                String[] sourceDirectorySources = scanner.getIncludedFiles();                for ( int j = 0; j < sourceDirectorySources.length; j++ )                {                    File f = new File( sourceLocation, sourceDirectorySources[j] );                    sources.add( f.getPath() );                }            }        }        String[] result = null;        if ( sources.isEmpty() )        {            result = new String[0];        }        else        {            result = (String[]) sources.toArray( new String[sources.size()] );        }        return result;    }