final ExecutionDataStore executionData) throws IOException {
if (group.children.size() > 0) {
return new CoverageNodeImpl(ElementType.GROUP, group.name, false);
} else {
final CoverageBuilder builder = new CoverageBuilder(executionData);
final Analyzer analyzer = new Analyzer(builder);
for (final Iterator<?> i = group.classfiles.iterator(); i.hasNext();) {
final Resource resource = (Resource) i.next();
if (resource.isDirectory() && resource instanceof FileResource) {
analyzer.analyzeAll(((FileResource) resource).getFile());
continue;
}
if (resource.getName().toLowerCase().endsWith(".jar")) {
final InputStream in = resource.getInputStream();
analyzer.analyzeJAR(in);
in.close();
continue;
}
if (resource.getName().toLowerCase().endsWith(".class")) {
final InputStream in = resource.getInputStream();
analyzer.analyze(in);
in.close();
}
}
return builder.getBundle(group.name);
}