CPD Results

The following document contains the results of PMD's CPD

Duplications

FileLine
org/wtfigo/controller/ViewSpringAOP.java90
org/wtfigo/controller/ViewSpringMVC.java199
            DefaultListableBeanFactory beanFactory = (DefaultListableBeanFactory) xwac.getBeanFactory();
            String beanDefinitionName = request.getParameter("showBeanDef");
            if (null != beanDefinitionName) {
                out.println("<h3>Bean: " + beanDefinitionName + "</h3>");
                out.println("<table class=\"wtf\">");
                out.println("<tr><th colspan=\"2\">Details</th></tr>");
                try {
                    RootBeanDefinition beanDefinition = beanFactory.getMergedBeanDefinition(beanDefinitionName);
                    Class bfct = xwac.getType("&" + beanDefinitionName);
                    out.println("<tr><td>Bean Type:</td><td>"
                            + JavadocHelper.showClassWithLink(bfct) + "</td></tr>");

                    String[] aliases = xwac.getAliases(beanDefinitionName);
                    out.println("<tr><td>Aliases:</td><td>");
                    if (null == aliases || aliases.length == 0) {
                        out.println("None");
                    } else {
                        for (int j = 0; j < aliases.length; j++) {
                            out.println(aliases[j] + "<br/>");
                        }
                    }
                    out.println("</td></tr>");

                    out.println("<tr><td>ResourceDescription</td><td>"
                            + beanDefinition.getResourceDescription() + "</td></tr>");

                    BeanDefinition unMergedBeanDefinition = beanFactory.getBeanDefinition(beanDefinitionName);
                    if (unMergedBeanDefinition instanceof ChildBeanDefinition) {
                        String parentBean = ((ChildBeanDefinition) unMergedBeanDefinition).getParentName();
                        out.println("<tr><td>Parent</td><td><a href=\"ViewSpring.wtf?showBean="
                                + parentBean + "\">" + parentBean + "</a></td></tr>");
                    }

                    // TODO: verify creationMode determination works when
                    // sample Factory beans/methods have bean created
                    String creationMode = "constructor";
                    if (null != beanDefinition.getFactoryMethodName()) {
                        creationMode = "factory-method";
                        if (null != beanDefinition.getFactoryBeanName()) {
                            creationMode = "factory";
                        }
                    }
                    out.println("<tr><td>Creation Mode:</td><td>" + creationMode + "</td></tr>");
                    if (null != beanDefinition.getFactoryBeanName()) {
                        out.println("<tr><td>FactoryBean</td><td>"
                                + beanDefinition.getFactoryBeanName() + "</td></tr>");
                    }
                    if (null != beanDefinition.getFactoryMethodName()) {
                        out.println("<tr><td>FactoryMethod</td><td>"
                                + beanDefinition.getFactoryMethodName() + "</td></tr>");
                    }
                    if (null != beanDefinition.getInitMethodName()) {
                        out.println("<tr><td>InitMethod</td><td>"
                                + beanDefinition.getInitMethodName() + "</td></tr>");
                    }
                    if (null != beanDefinition.getDestroyMethodName()) {
                        out.println("<tr><td>DestroyMethod</td><td>"
                                + beanDefinition.getDestroyMethodName() + "</td></tr>");
                    }

                    // behavioral
                    out.println("<tr><td>Behavioral</td><td>"
                            + "<table><tr><th>Lazy</th><th>Singleton</th><th>Autowire</th><th>Abstract</th></tr>"
                            + "<tr><td>"
                            + printBoolean(beanDefinition.isLazyInit())
                            + "</td><td>"
                            + printBoolean(beanDefinition.isSingleton())
                            + "</td><td>"
                            + AUTOWIRE_MODES[beanDefinition.getResolvedAutowireMode()]
                            + "</td><td>"
                            + (null == bfct ? "implicit" : ""
                                    + printBoolean(beanDefinition.isAbstract()))
                            + "</td></tr></table></td></tr>");

                    // dependencies
                    if (AbstractBeanDefinition.DEPENDENCY_CHECK_NONE != beanDefinition.getDependencyCheck()) {
                        out.println("<tr><th colspan=\"2\">Dependencies</th></tr>");
                        out.println("<tr><td>DependsOn</td><td>" + beanDefinition.getDependsOn()
                                + "</td></tr>");
                        out.println("<tr><td>DependencyCheck</td><td>"
                                + DEPENDENCY_MODES[beanDefinition.getDependencyCheck()]
                                + "</td></tr>");
                    }

                    // properties
                    out.println("<tr><th colspan=\"2\">Bean Properties</th></tr>");
                    if (null == beanDefinition.getBeanClassName()) {
                        out.println("<tr><td colspan=\"2\">Abstract beans cannot be inspected with WTFIGO</td></tr>");
                    } else {
                        PropertyValues pvs = beanDefinition.getPropertyValues();
                        // NOTE: show warnings for dependencies even if
                        // checking is not enabled, and multiple-auto-wire
                        // problems when 2+ classes could be autowired

                        // TODO: check when errors occur due to class not
                        // found with laziness
                        BeanWrapper wrappedBean = new BeanWrapperImpl(beanDefinition.getBeanClass());
                        Map pvMap = new HashMap();
                        for (int i = 0; i < pvs.getPropertyValues().length; i++) {
                            PropertyValue propValue = pvs.getPropertyValues()[i];
                            pvMap.put(propValue.getName(), propValue);
                        }
                        PropertyDescriptor[] pds = wrappedBean.getPropertyDescriptors();
                        out.println("<tr><td colspan=\"2\"><table width=\"100%\"><tr><th>Name</th><th>Value</th><th>Type</th><th>Specified</th></tr>");
                        for (int i = 0; i < pds.length; i++) {

                            PropertyDescriptor descriptor = pds[i];
                            if (null != descriptor.getWriteMethod()) {
                                String propName = descriptor.getName();
                                String setBy = "not set";
                                PropertyValue propVal = pvs.getPropertyValue(propName);
                                if (null != propVal) {
                                    setBy = "explicit";
                                }
                                RuntimeBeanReference autowiredBean = null;
                                if (beanDefinition.getResolvedAutowireMode() != AbstractBeanDefinition.AUTOWIRE_NO) {
                                    if (beanDefinition.getResolvedAutowireMode() == AbstractBeanDefinition.AUTOWIRE_BY_NAME) {
                                        if (xwac.containsBean(propName)) {
                                            autowiredBean = new RuntimeBeanReference(propName);
                                        }
                                    } else {
                                        Class propType = wrappedBean.getPropertyType(propName);
                                        String[] autoWireBeans = xwac.getBeanNamesForType(propType,
                                            false, false);
                                        if (autoWireBeans.length > 0) {
                                            autowiredBean = new RuntimeBeanReference(autoWireBeans[0]);
                                        }
                                    }
                                }
                                if (autowiredBean != null) {
                                    if (null == propVal) {
                                        setBy = "autowired";
                                        propVal = new PropertyValue(propName, autowiredBean);
                                    } else {
                                        setBy = "explicit overrides autowire";
                                    }
                                }

                                out.println("<tr><td>" + propName + "</td><td>");
                                printPropertyValue(out, propVal);
                                out.println("</td><td>" + descriptor.getPropertyType());
                                out.println("</td><td>" + setBy);
                                out.println("</td></tr>");
                                pvMap.remove(propName);
                            }
                        }
                        out.println("</table></td></tr>");
                        if (!pvMap.isEmpty()) {
                            // the map should be empty unless extra mappings
                            // were specified that don't have setters
                            out.println("<tr><td colspan=\"2\">Warning:  Properties specified for properties that do not exist on the bean:"
                                    + pvMap + "</td></tr>");
                        }
                    }
                    ConstructorArgumentValues cavs = beanDefinition.getConstructorArgumentValues();
                    if (!cavs.isEmpty()) {
                        out.println("<!-- <tr><td>ConstructorArgValues</td><td>");
                        Map cavMap = cavs.getIndexedArgumentValues();
                        for (Iterator iter = cavMap.entrySet().iterator(); iter.hasNext();) {
                            Map.Entry cavItem = (Map.Entry) iter.next();
                            // TODO: this needs to be completed
                            out.println(cavItem.getKey() + "=" + "TBD");
                            // printPropertyValue(out,
                            // (PropertyValue)cavItem.getValue());
                        }
                        out.println("</td></tr> -->");
                    }
                    // overrides
                    MethodOverrides mos = beanDefinition.getMethodOverrides();
                    Set moSet = mos.getOverrides();

                    if (!moSet.isEmpty()) {
                        out.println("<tr><th colspan=\"2\">Overrides</th></tr>");
                        out.println("<tr><td>MethodOverrides</td><td>");
                        for (Iterator iter = moSet.iterator(); iter.hasNext();) {
                            MethodOverride moElement = (MethodOverride) iter.next();
                            out.print(moElement + "<br/>");
                        }
                        out.println("</td></tr>");
                    }

                    out.println("<tr><th colspan=\"2\">Lifecycle/Capabilities</th></tr>");
                    out.println("<tr><td>Intefaces implemented</td><td>");
                    if (bfct != null) {
                        out.println("<b>Lifecycle</b><br/>");
                        out.println("Disposable: "
                                + printBoolean(DisposableBean.class.isAssignableFrom(bfct))
                                + "<br/>");
                        out.println("Initializing: "
                                + printBoolean(InitializingBean.class.isAssignableFrom(bfct))
                                + "<br/>");

                        out.println("<b>BeanFactory</b><br/>");
                        out.println("FactoryBean:"
                                + printBoolean(FactoryBean.class.isAssignableFrom(bfct)) + "<br/>");
                        out.println("BeanFactoryAware: "
                                + printBoolean(BeanFactoryAware.class.isAssignableFrom(bfct))
                                + "<br/>");
                        out.println("BeanNameAware: "
                                + printBoolean(BeanNameAware.class.isAssignableFrom(bfct))
                                + "<br/>");

                        out.println("<b>ApplicationAware</b><br/>");
                        out.println("ApplicationContextAware: "
                                + printBoolean(ApplicationContextAware.class.isAssignableFrom(bfct))
                                + "<br/>");
                        out.println("ApplicationListener: "
                                + printBoolean(ApplicationListener.class.isAssignableFrom(bfct))
                                + "<br/>");

                        out.println("<b>Post Processors</b><br/>");
                        out.println("Object Factory: "
                                + printBoolean(ObjectFactory.class.isAssignableFrom(bfct))
                                + "<br/>");
                        out.println("BeanPostProcessor: "
                                + printBoolean(BeanPostProcessor.class.isAssignableFrom(bfct))
                                + "<br/>");
                        out.println("BeanFactoryPostProcessor: "
                                + printBoolean(BeanFactoryPostProcessor.class.isAssignableFrom(bfct))
                                + "<br/>");
                    }
                    out.println("</td></tr>");

                } catch (Throwable t) {
                    out.println("<tr><td>Error</td><td>This bean could not be loaded.  Error message:<br/>"
                            + t.getMessage() + "</td></tr>");
                    log.warn("Failed to load bean: " + beanDefinitionName, t);
                }
                out.println("</table>");
            }

FileLine
org/wtfigo/controller/ViewSpring.java292
org/wtfigo/controller/ViewSpringAOP.java99
                out.println("<tr><td>Bean Type:</td><td>" + JavadocHelper.showClassWithLink(bfct)
                        + "</td></tr>");

                String[] aliases = xwac.getAliases(beanDefinitionName);
                out.println("<tr><td>Aliases:</td><td>");
                if (null == aliases || aliases.length == 0) {
                    out.println("None");
                } else {
                    for (int j = 0; j < aliases.length; j++) {
                        out.println(aliases[j] + "<br/>");
                    }
                }
                out.println("</td></tr>");

                out.println("<tr><td>ResourceDescription</td><td>"
                        + beanDefinition.getResourceDescription() + "</td></tr>");

                BeanDefinition unMergedBeanDefinition = beanFactory.getBeanDefinition(beanDefinitionName);
                if (unMergedBeanDefinition instanceof ChildBeanDefinition) {
                    String parentBean = ((ChildBeanDefinition) unMergedBeanDefinition).getParentName();
                    out.println("<tr><td>Parent</td><td><a href=\"ViewSpring.wtf?showBean="
                            + parentBean + "\">" + parentBean + "</a></td></tr>");
                }

                // TODO: verify creationMode determination works when
                // sample Factory beans/methods have bean created
                String creationMode = "constructor";
                if (null != beanDefinition.getFactoryMethodName()) {
                    creationMode = "factory-method";
                    if (null != beanDefinition.getFactoryBeanName()) {
                        creationMode = "factory";
                    }
                }
                out.println("<tr><td>Creation Mode:</td><td>" + creationMode + "</td></tr>");
                if (null != beanDefinition.getFactoryBeanName()) {
                    out.println("<tr><td>FactoryBean</td><td>"
                            + beanDefinition.getFactoryBeanName() + "</td></tr>");
                }
                if (null != beanDefinition.getFactoryMethodName()) {
                    out.println("<tr><td>FactoryMethod</td><td>"
                            + beanDefinition.getFactoryMethodName() + "</td></tr>");
                }
                if (null != beanDefinition.getInitMethodName()) {
                    out.println("<tr><td>InitMethod</td><td>" + beanDefinition.getInitMethodName()
                            + "</td></tr>");
                }
                if (null != beanDefinition.getDestroyMethodName()) {
                    out.println("<tr><td>DestroyMethod</td><td>"
                            + beanDefinition.getDestroyMethodName() + "</td></tr>");
                }

                // behavioral
                out.println("<tr><td>Behavioral</td><td>"
                        + "<table><tr><th>Lazy</th><th>Singleton</th><th>Autowire</th><th>Abstract</th></tr>"

FileLine
org/wtfigo/controller/ViewSpring.java427
org/wtfigo/controller/ViewSpringAOP.java229
                            out.println("</td><td>" + descriptor.getPropertyType());
                            out.println("</td><td>" + setBy);
                            out.println("</td></tr>");
                            pvMap.remove(propName);
                        }
                    }
                    out.println("</table></td></tr>");
                    if (!pvMap.isEmpty()) {
                        // the map should be empty unless extra mappings
                        // were specified that don't have setters
                        out.println("<tr><td colspan=\"2\">Warning:  Properties specified for properties that do not exist on the bean:"
                                + pvMap + "</td></tr>");
                    }
                }
                ConstructorArgumentValues cavs = beanDefinition.getConstructorArgumentValues();
                if (!cavs.isEmpty()) {
                    out.println("<!-- <tr><td>ConstructorArgValues</td><td>");
                    Map cavMap = cavs.getIndexedArgumentValues();
                    for (Iterator iter = cavMap.entrySet().iterator(); iter.hasNext();) {
                        Map.Entry cavItem = (Map.Entry) iter.next();
                        // TODO: this needs to be completed
                        out.println(cavItem.getKey() + "=" + "TBD");
                        // printPropertyValue(out,
                        // (PropertyValue)cavItem.getValue());
                    }
                    out.println("</td></tr> -->");
                }
                // overrides
                MethodOverrides mos = beanDefinition.getMethodOverrides();
                Set moSet = mos.getOverrides();

                if (!moSet.isEmpty()) {
                    out.println("<tr><th colspan=\"2\">Overrides</th></tr>");
                    out.println("<tr><td>MethodOverrides</td><td>");
                    for (Iterator iter = moSet.iterator(); iter.hasNext();) {
                        MethodOverride moElement = (MethodOverride) iter.next();
                        out.print(moElement + "<br/>");
                    }
                    out.println("</td></tr>");
                }

                out.println("<tr><th colspan=\"2\">Lifecycle/Capabilities</th></tr>");

FileLine
org/wtfigo/controller/ViewSpring.java386
org/wtfigo/controller/ViewSpringMVC.java302
                    out.println("<tr><td colspan=\"2\"><table width=\"100%\"><tr><th>Name</th><th>Value</th><th>Type</th><th>Specified</th></tr>");
                    for (int i = 0; i < pds.length; i++) {

                        PropertyDescriptor descriptor = pds[i];
                        if (null != descriptor.getWriteMethod()) {
                            String propName = descriptor.getName();
                            String setBy = "not set";
                            PropertyValue propVal = pvs.getPropertyValue(propName);
                            if (null != propVal) {
                                setBy = "explicit";
                            }
                            RuntimeBeanReference autowiredBean = null;
                            if (beanDefinition.getResolvedAutowireMode() != AbstractBeanDefinition.AUTOWIRE_NO) {
                                if (beanDefinition.getResolvedAutowireMode() == AbstractBeanDefinition.AUTOWIRE_BY_NAME) {
                                    if (xwac.containsBean(propName)) {
                                        autowiredBean = new RuntimeBeanReference(propName);
                                    }
                                } else {
                                    Class propType = wrappedBean.getPropertyType(propName);
                                    String[] autoWireBeans = xwac.getBeanNamesForType(propType,
                                        false, false);
                                    if (autoWireBeans.length > 0) {
                                        autowiredBean = new RuntimeBeanReference(autoWireBeans[0]);
                                    }
                                }
                            }
                            if (autowiredBean != null) {
                                if (null == propVal) {
                                    setBy = "autowired";
                                    propVal = new PropertyValue(propName, autowiredBean);
                                } else {
                                    setBy = "explicit overrides autowire";
                                }
                            }

                            out.println("<tr><td>" + propName + "</td><td>");
                            printPropertyValue(out, propVal);
                            out.println("</td><td>" + descriptor.getPropertyType());

FileLine
org/wtfigo/controller/ViewSpring.java535
org/wtfigo/controller/ViewSpringXfire.java149
        log.info("Not used");
    }

    public Document doGetXML(ServletContext servletContext, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        // TODO: this is just a copied stub just to get includes
        Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
        Element events = doc.createElement("springstuff");
        doc.appendChild(events);
        WtfigoEngine wtfEngine = WtfigoEngine.getInstance(servletContext);
        if (wtfEngine.significantEvents.isEmpty()) {
            // nothing
        } else {
            int i = 0;
            SimpleDateFormat dateFormatter = new SimpleDateFormat("HH:mm:ss.SSS");
            for (Iterator iter = wtfEngine.significantEvents.iterator(); iter.hasNext();) {

                LogEvent logEvent = (LogEvent) iter.next();
                String requestId = logEvent.getRequestId();
                if (null == requestId) {
                    requestId = "";
                }
                Element event = doc.createElement("event");
                event.setAttribute("time", dateFormatter.format(new Date(logEvent.getTimestamp())));
                event.setAttribute("level", logEvent.getLevel());
                event.setAttribute("requestId", requestId);
                event.setAttribute("message", logEvent.getMessage());
                events.appendChild(event);
                if (++i >= 1000) {
                    break;
                }
            }
        }
        return doc;
    }

}

FileLine
org/wtfigo/controller/ViewEvents.java121
org/wtfigo/controller/ViewEventsAjax.java225
    }

    public Document doGetXML(ServletContext servletContext, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
        Element events = doc.createElement("events");
        doc.appendChild(events);
        WtfigoEngine wtfEngine = WtfigoEngine.getInstance(servletContext);
        if (wtfEngine.significantEvents.isEmpty()) {
            // nothing
        } else {
            int i = 0;
            SimpleDateFormat dateFormatter = new SimpleDateFormat("HH:mm:ss.SSS");
            for (Iterator iter = wtfEngine.significantEvents.iterator(); iter.hasNext();) {

                LogEvent logEvent = (LogEvent) iter.next();
                String requestId = logEvent.getRequestId();
                if (null == requestId) {
                    requestId = "";
                }
                Element event = doc.createElement("event");
                event.setAttribute("time", dateFormatter.format(new Date(logEvent.getTimestamp())));
                event.setAttribute("level", logEvent.getLevel());
                event.setAttribute("requestId", requestId);
                event.setAttribute("message", logEvent.getMessage());
                events.appendChild(event);
                if (++i >= 1000) {
                    break;
                }
            }
        }

        return doc;
    }
}

FileLine
org/wtfigo/controller/ViewHibernate2Mappings.java142
org/wtfigo/controller/ViewHibernateMappings.java132
            Map hibernateCollectionMetaData = sf.getAllCollectionMetadata();
            for (Iterator iter = hibernateCollectionMetaData.keySet().iterator(); iter.hasNext();) {
                String collectionName = (String) iter.next();
                CollectionMetadata collectionMetadata = (CollectionMetadata) hibernateCollectionMetaData.get(collectionName);
                out.println("<p>" + collectionName + " - " + collectionMetadata + "</p>");
                out.println("<table class=\"wtf\">");
                out.println("<tr><th>Attribute</th><th>Value</th></tr>");
                out.println("<tr><td>Role</td><td>" + collectionMetadata.getRole() + "</td></tr>");
                out.println("<tr><td>Class</td><td>"
                        + JavadocHelper.showClassWithLink(collectionMetadata.getClass())
                        + "</td></tr>");
                out.println("<tr><td>ElementType</td><td>" + collectionMetadata.getElementType()
                        + "</td></tr>");
                out.println("<tr><td>Indexed?</td><td>" + collectionMetadata.hasIndex()
                        + "</td></tr>");
                out.println("<tr><td>IndexType</td><td>" + collectionMetadata.getIndexType()
                        + "</td></tr>");
                out.println("<tr><td>KeyType</td><td>" + collectionMetadata.getKeyType()
                        + "</td></tr>");
                out.println("<tr><td>Array</td><td>" + collectionMetadata.isArray() + "</td></tr>");
                out.println("<tr><td>PrimitiveArray?</td><td>"
                        + collectionMetadata.isPrimitiveArray() + "</td></tr>");
                out.println("<tr><td>Lazy?</td><td>" + collectionMetadata.isLazy() + "</td></tr>");
                out.println("</table>");
            }
        }

FileLine
org/wtfigo/controller/ViewEvents.java127
org/wtfigo/controller/ViewSpring.java542
        Element events = doc.createElement("springstuff");
        doc.appendChild(events);
        WtfigoEngine wtfEngine = WtfigoEngine.getInstance(servletContext);
        if (wtfEngine.significantEvents.isEmpty()) {
            // nothing
        } else {
            int i = 0;
            SimpleDateFormat dateFormatter = new SimpleDateFormat("HH:mm:ss.SSS");
            for (Iterator iter = wtfEngine.significantEvents.iterator(); iter.hasNext();) {

                LogEvent logEvent = (LogEvent) iter.next();
                String requestId = logEvent.getRequestId();
                if (null == requestId) {
                    requestId = "";
                }
                Element event = doc.createElement("event");
                event.setAttribute("time", dateFormatter.format(new Date(logEvent.getTimestamp())));
                event.setAttribute("level", logEvent.getLevel());
                event.setAttribute("requestId", requestId);
                event.setAttribute("message", logEvent.getMessage());
                events.appendChild(event);
                if (++i >= 1000) {
                    break;
                }
            }
        }
        return doc;
    }

}

FileLine
org/wtfigo/controller/ViewHibernateStatistics.java41
org/wtfigo/controller/ViewHibernateMappings.java41
    private static Log log = LogFactory.getLog(ViewHibernateMappings.class);

    public void doGet(ServletContext servletContext, HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
        if (!requireExtension(request, response, "org.hibernate.Session", "Hibernate3")) {
            return;
        }

        SessionFactory sf = null;
        try {
            Map hibernateSessionFactories = WebApplicationContextUtils.getWebApplicationContext(
                servletContext).getBeansOfType(org.hibernate.SessionFactory.class);
            if (!hibernateSessionFactories.isEmpty()) {
                for (Iterator iter = hibernateSessionFactories.values().iterator(); iter.hasNext();) {
                    Object sessionFactory = iter.next();
                    if (sessionFactory instanceof org.hibernate.SessionFactory) {
                        sf = (SessionFactory) sessionFactory;
                        break;
                    }
                }
            }
        } catch (Exception e) {
            log.warn("Trouble loading the SessionFactory", e);
        }
        
        writeHeader(request, response);
        PrintWriter out = response.getWriter();
        out.println("<h3>Hibernate3 Mappings</h3>");

FileLine
org/wtfigo/controller/ViewHibernate2Mappings.java88
org/wtfigo/controller/ViewHibernateMappings.java90
                        + JavadocHelper.showClassWithLink(classMetaData.getMappedClass(EntityMode.DOM4J))
                        + "</td></tr>");
                out.println("<tr><td>Has identifier?</td><td>"
                        + classMetaData.hasIdentifierProperty() + "</td></tr>");
                out.println("<tr><td>Identifier</td><td>"
                        + classMetaData.getIdentifierPropertyName() + "</td></tr>");
                // TODO: add more detailed checks like this per Persister type.
                // may
                // need to get package fancy to have access to protected fields
                // this is really showing internals and is a questionable idea.
                // but
                // part of the idea of wtfigo.
                // NOTE: this has been disabled because BasicEntityPersister was renamed AbstractEntityPersister between 3.0 and 3.1
				//if (classMetaData instanceof BasicEntityPersister) {
				//    out.println("<tr><td>Identifier</td><td>"
				//            + ((BasicEntityPersister) classMetaData).getIdentifierGenerator().getClass().getName()
				//            + "</td></tr>");
				//}
                out.println("<tr><td>IdentifierType</td><td>" + classMetaData.getIdentifierType()
                        + "</td></tr>");
                out.println("<tr><td>Versioned?</td><td>" + classMetaData.isVersioned()
                        + "</td></tr>");
                out.println("<tr><td>VersionProperty</td><td>" + classMetaData.getVersionProperty()
                        + "</td></tr>");
                out.println("<tr><td>Mutable?</td><td>" + classMetaData.isMutable() + "</td></tr>");
                out.println("<tr><td>Proxyable?</td><td>" + classMetaData.hasProxy() + "</td></tr>");
                String[] propertyNames = classMetaData.getPropertyNames();
                Type[] types = classMetaData.getPropertyTypes();
                boolean[] nullables = classMetaData.getPropertyNullability();

FileLine
org/wtfigo/controller/ViewEvents.java78
org/wtfigo/controller/ViewEventsAjax.java64
                WtfigoEngine wtfEngine = WtfigoEngine.getInstance(servletContext);

                if (wtfEngine.requestEvents.isEmpty()) {
                    out.println("No requests have been captured");
                } else {
                    out.println("<table class=\"wtf\">");
                    out.println("<tr><th>RequestID</th><th>HashCode</th><th>Events</th></tr>");
                    int i = 0;
                    for (Iterator iter = wtfEngine.getRequestEventsCollection().iterator(); iter.hasNext();) {
                        RequestEvent requestEvent = (RequestEvent) iter.next();
                        if (!requestEvent.isDashboardRequest()) {
                            // TODO: fix this. N/A used to be request hashCode
                            out.println("<tr><td>" + requestEvent.getRequestId() + "</td><td>"
                                    + "N/A" + "</td><td>" + requestEvent.getLogEvents()
                                    + "</td></tr>");
                            if (++i >= 1000) { // need a way to select an event
                                // range
                                break;
                            }
                        }
                    }

FileLine
org/wtfigo/controller/ViewSpring.java474
org/wtfigo/controller/ViewSpringAOP.java273
                    out.println("<b>Lifecycle</b><br/>");
                    out.println("Disposable: "
                            + printBoolean(DisposableBean.class.isAssignableFrom(bfct)) + "<br/>");
                    out.println("Initializing: "
                            + printBoolean(InitializingBean.class.isAssignableFrom(bfct)) + "<br/>");

                    out.println("<b>BeanFactory</b><br/>");
                    out.println("FactoryBean:"
                            + printBoolean(FactoryBean.class.isAssignableFrom(bfct)) + "<br/>");
                    out.println("BeanFactoryAware: "
                            + printBoolean(BeanFactoryAware.class.isAssignableFrom(bfct)) + "<br/>");
                    out.println("BeanNameAware: "
                            + printBoolean(BeanNameAware.class.isAssignableFrom(bfct)) + "<br/>");

                    out.println("<b>ApplicationAware</b><br/>");

FileLine
org/wtfigo/controller/ViewSpring.java368
org/wtfigo/controller/ViewSpringMVC.java284
                out.println("<tr><th colspan=\"2\">Bean Properties</th></tr>");
                if (null == beanDefinition.getBeanClassName()) {
                    out.println("<tr><td colspan=\"2\">Abstract beans cannot be inspected with WTFIGO</td></tr>");
                } else {
                    PropertyValues pvs = beanDefinition.getPropertyValues();
                    // NOTE: show warnings for dependencies even if
                    // checking is not enabled, and multiple-auto-wire
                    // problems when 2+ classes could be autowired

                    // TODO: check when errors occur due to class not
                    // found with laziness
                    BeanWrapper wrappedBean = new BeanWrapperImpl(beanDefinition.getBeanClass());
                    Map pvMap = new HashMap();
                    for (int i = 0; i < pvs.getPropertyValues().length; i++) {
                        PropertyValue propValue = pvs.getPropertyValues()[i];
                        pvMap.put(propValue.getName(), propValue);
                    }
                    PropertyDescriptor[] pds = wrappedBean.getPropertyDescriptors();
                    out.println("<tr><td colspan=\"2\"><table width=\"100%\"><tr><th>Name</th><th>Value</th><th>Type</th><th>Specified</th></tr>");

FileLine
org/wtfigo/controller/ViewHibernate2Mappings.java50
org/wtfigo/controller/ViewHibernate2Config.java67
        SessionFactory sf = null;
        try {
            Map hibernateSessionFactories = WebApplicationContextUtils.getWebApplicationContext(
                servletContext).getBeansOfType(net.sf.hibernate.SessionFactory.class);
            if (!hibernateSessionFactories.isEmpty()) {
                for (Iterator iter = hibernateSessionFactories.values().iterator(); iter.hasNext();) {
                    Object sessionFactory = iter.next();
                    if (sessionFactory instanceof net.sf.hibernate.SessionFactory) {
                        sf = (SessionFactory) sessionFactory;
                        break;
                    }
                }
            }
        } catch (Exception e) {
            log.warn("Trouble loading the SessionFactory", e);
        }

FileLine
org/wtfigo/controller/ViewHibernateConfig.java66
org/wtfigo/controller/ViewHibernateMappings.java49
        SessionFactory sf = null;
        try {
            Map hibernateSessionFactories = WebApplicationContextUtils.getWebApplicationContext(
                servletContext).getBeansOfType(org.hibernate.SessionFactory.class);
            if (!hibernateSessionFactories.isEmpty()) {
                for (Iterator iter = hibernateSessionFactories.values().iterator(); iter.hasNext();) {
                    Object sessionFactory = iter.next();
                    if (sessionFactory instanceof org.hibernate.SessionFactory) {
                        sf = (SessionFactory) sessionFactory;
                        break;
                    }
                }
            }
        } catch (Exception e) {
            log.warn("Trouble loading the SessionFactory", e);
        }

FileLine
org/wtfigo/controller/ViewAppConfig.java77
org/wtfigo/controller/ViewAppConfig.java111
            NodeList initParamNodes = filterElement.getElementsByTagName("init-param");
            out.println("<td>");
            for (int j = 0; i < initParamNodes.getLength(); j++) {
                Element initParamElement = (Element) initParamNodes.item(i);
                String paramName = XmlUtils.getNodeValue(initParamElement, "param-name");
                String paramValue = XmlUtils.getNodeValue(initParamElement, "param-value");
                out.print(paramName + "=" + paramValue
                        + (j + 1 < initParamNodes.getLength() ? "<br/>" : ""));
            }
            out.println("</td>");
            List mappings = (List) filterMappings.get(filterName);