Package org.netbeans.server.componentsmatch

Examples of org.netbeans.server.componentsmatch.Component


        if (component == null){
            if (manager != null){
                component = manager.getComponent(em);
            }
            if ((component == null || Component.UNKNOWN.equals(component)) && latestAction !=null){
                Component compFromAction = Matcher.getDefault().matchMethod(em, latestAction);
                if (compFromAction != null){
                    component = compFromAction;
                }
            }
        }
View Full Code Here


        List<MethodItem> prefix = getSuspiciousStackPrefix(searchRoot);
        ListIterator<MethodItem> li = prefix.listIterator(prefix.size());
        Matcher mr = Matcher.getDefault();
        while (li.hasPrevious()) {
            MethodItem candidate = li.previous();
            Component comp = mr.matchMethod(em, candidate.getMethodName());
            if (comp != null) {
                return candidate;
            }
        }
        return null;
View Full Code Here

        final Matcher matcher = Matcher.getDefault();
        Utils.processPersistable(new Persistable.Query() {

            public TransactionResult runQuery(EntityManager em) throws Exception {
                PrestimeCPUCCTNode node = getBiggestChild(root);
                Component componentCandidate = null;
                long selfTime;
                boolean canContinue = true;
                do {
                    selfTime = getSelfTime(node);
                    String methodName = getMethodName(node);
                    suspiciousStackPrefix.add(new MethodItem(methodName, node.getTotalTime0(), selfTime));
                    Component nodeComponent = matcher.matchMethod(em, node.getNodeName());
                    if (nodeComponent != null) {
                        componentCandidate = nodeComponent;// find deepest known component
                    }
                    if (isMoreThan(selfTime, PERCENTAGE_OF_SELF_NODE, node.getTotalTime0())) {
                        if (nodeComponent != null) {
View Full Code Here

                return em.merge(actual);
               
            }
            Report newReport = new Report();
            newReport.setId(Utils.getNextId(Report.class));
            Component comp = Matcher.getDefault().match(em, actual.getMockThrowable());
            newReport.setComponent(comp);
            em.persist(newReport);

            moveSimilarExceptions(em, actual.getReportId(), actual, newReport);
View Full Code Here

            actual = em.merge(slownParam);
            BugReporter.LOG.log(Level.INFO, "reopening issue based on slowness{0} from {1}",
                    new Object[]{actual.getId().toString(), actual.getReportId().getId().toString()});
            Report newReport = new Report();
            newReport.setId(Utils.getNextId(Report.class));
            Component comp = recountComponent(em);
            newReport.setComponent(comp);
            em.persist(newReport);

            actual.setReportId(newReport);
            return em.merge(actual);
View Full Code Here

    public void testSuspicousMethodWithoutMapping() throws IOException{
        setUp("snapshot-278271.nps");
        EntityManager em = perUtils.createEntityManager();
        MethodItem mi = sm.getSuspiciousMethodItem(em);
        assertEquals("correct method", "org.openide.nodes.EntrySupport$Default.getArray", mi.getMethodName());
        Component cmp = sm.getComponent(em);
        assertEquals("correct component", new Component("openide", "nodes"), cmp);
        em.getTransaction().begin();
    }
View Full Code Here

    }

    @Test
    public void testSuspicousMethodWithMapping() throws IOException{
        setUp("snapshot-278271.nps");
        doTest("org.netbeans.modules.websvc.rest.spi.RestSupport.getRestServicesModel", new Component("websvc", "rest"));
    }
View Full Code Here

    }

    @Test
    public void testSuspicousMethodWithMapping2() throws IOException{
        setUp("snapshot-257279.nps");
        doTest("org.netbeans.modules.websvc.rest.spi.RestSupport.extendClassPath", new Component("websvc", "rest"));
    }
View Full Code Here

    }

    @Test
    public void testSuspicousMethodWithMapping3() throws IOException{
        setUp("snapshot-275525.nps");
        doTest("org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory.getCachedOnly", new Component("openide", "filesystems"));
    }
View Full Code Here

    }

    @Test
    public void testSuspicousMethodWithMapping4() throws IOException{
        setUp("snapshot-255494.nps");
        doTest("org.netbeans.api.queries.VisibilityQuery.isVisible", new Component("projects", "code"));
    }
View Full Code Here

TOP

Related Classes of org.netbeans.server.componentsmatch.Component

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.