Examples of Analyzer


Examples of org.apache.lucene.analysis.Analyzer

  /*
   * This test is the same as the above, except using an ideographic space as a separator.
   * This tests to ensure the stopwords are working correctly.
   */
  public void testChineseStopWordsDefaultTwoPhrasesIdeoSpace() throws Exception {
    Analyzer ca = new SmartChineseAnalyzer(Version.LUCENE_CURRENT); /* will load stopwords */
    String sentence = "我购买了道具和服装 我购买了道具和服装。";
    String result[] = { "我", "购买", "了", "道具", "和", "服装", "我", "购买", "了", "道具", "和", "服装" };
    assertAnalyzesTo(ca, sentence, result);
  }
View Full Code Here

Examples of org.apache.muse.tools.generator.analyzer.Analyzer

   
    boolean overwrite = checkOverwriteArg(arguments);
    File wsdl = checkWsdlArg(arguments);
    File descriptorFile = checkDescriptorArg(arguments);
   
    Analyzer analyzer = checkAnalyzerArg(arguments);
    Synthesizer synthesizer = checkSynthesizerArg(arguments);
    Projectizer projectizer = checkProjectizerArg(arguments);
   
    Wsdl2Java app = null;
    try {
View Full Code Here

Examples of org.apache.tapestry5.internal.plastic.asm.tree.analysis.Analyzer

        final MethodVisitor mv,
        final Map labels)
    {
        this(new MethodNode(access, name, desc, null, null) {
            public void visitEnd() {
                Analyzer a = new Analyzer(new BasicVerifier());
                try {
                    a.analyze("dummy", this);
                } catch (Exception e) {
                    if (e instanceof IndexOutOfBoundsException
                            && maxLocals == 0 && maxStack == 0)
                    {
                        throw new RuntimeException("Data flow checking option requires valid, non zero maxLocals and maxStack values.");
View Full Code Here

Examples of org.deuce.objectweb.asm.tree.analysis.Analyzer

        final MethodVisitor mv,
        final Map labels)
    {
        this(new MethodNode(access, name, desc, null, null) {
            public void visitEnd() {
                Analyzer a = new Analyzer(new BasicVerifier());
                try {
                    a.analyze("dummy", this);
                } catch (Exception e) {
                    e.printStackTrace();
                    StringWriter sw = new StringWriter();
                    PrintWriter pw = new PrintWriter(sw, true);
                    CheckClassAdapter.printAnalyzerResult(this, a, pw);
View Full Code Here

Examples of org.drools.analytics.Analyzer

    try {
     
      // create a specialized classloader

      Analyzer droolsanalyzer = new Analyzer();

      // get the list of files to be added to the rulebase
      String[] fileNames = getFileList();

      for (int i = 0; i < fileNames.length; i++) {
        compileAndAnalyzeFile(droolsanalyzer, fileNames[i]);
      }
     
      droolsanalyzer.fireAnalysis();
      droolsanalyzer.writeComponentsHTML(toFile.getAbsolutePath() + "/");
     
      System.out.println("Writing analytics report to " + toFile.getAbsolutePath() + "/report");
     
    } catch (Exception e) {
      throw new BuildException("RuleBaseTask failed: " + e.getMessage(),
View Full Code Here

Examples of org.eclipse.persistence.internal.libraries.asm.tree.analysis.Analyzer

   
    List methods = ca.classNode.methods;
    for (int i = 0; i < methods.size(); ++i) {
      MethodNode method = (MethodNode)methods.get(i);
      if (method.instructions.size() > 0) {
        Analyzer a = new Analyzer(new SimpleVerifier());
        try {
          a.analyze(ca.classNode, method);
          continue;
        } catch (Exception e) {
          e.printStackTrace();
        }
        final Frame[] frames = a.getFrames();
       
        System.out.println(method.name + method.desc);
        TraceCodeVisitor cv = new TraceCodeVisitor(null) {
          public void visitMaxs (int maxStack, int maxLocals) {
            for (int i = 0; i < text.size(); ++i) {
View Full Code Here

Examples of org.enclojure.ide.asm.tree.analysis.Analyzer

                ? null
                : Type.getObjectType(cn.superName);
        List methods = cn.methods;
        for (int i = 0; i < methods.size(); ++i) {
            MethodNode method = (MethodNode) methods.get(i);
            Analyzer a = new Analyzer(new SimpleVerifier(Type.getObjectType(cn.name),
                    syperType,
                    false));
            try {
                a.analyze(cn.name, method);
                if (!dump) {
                    continue;
                }
            } catch (Exception e) {
                e.printStackTrace(pw);
            }
            Frame[] frames = a.getFrames();

            TraceMethodVisitor mv = new TraceMethodVisitor();

            pw.println(method.name + method.desc);
            for (int j = 0; j < method.instructions.size(); ++j) {
View Full Code Here

Examples of org.hotswap.agent.javassist.bytecode.analysis.Analyzer

        return frames[pos - offset]; // Adjust pos
    }

    private void initFrames(CtClass clazz, MethodInfo minfo) throws BadBytecode {
        if (frames == null) {
            frames = ((new Analyzer())).analyze(clazz, minfo);
            offset = 0; // start tracking changes
        }
    }
View Full Code Here

Examples of org.jacoco.core.analysis.Analyzer

    fis.close();
  }

  private IBundleCoverage analyzeStructure() throws IOException {
    final CoverageBuilder coverageBuilder = new CoverageBuilder();
    final Analyzer analyzer = new Analyzer(executionDataStore,
        coverageBuilder);

    analyzer.analyzeAll(classesDirectory);

    return coverageBuilder.getBundle(title);
  }
View Full Code Here

Examples of org.jacoco.core.instr.Analyzer

  protected abstract void run(final Class<?> targetClass) throws Exception;

  private void analyze(final ClassReader reader,
      final ExecutionDataStore store) {
    final CoverageBuilder builder = new CoverageBuilder(store);
    final Analyzer analyzer = new Analyzer(builder);
    analyzer.analyzeClass(reader);
    final Collection<ClassCoverage> classes = builder.getClasses();
    assertEquals(1, classes.size(), 0.0);
    classCoverage = classes.iterator().next();
    final Collection<SourceFileCoverage> files = builder.getSourceFiles();
    assertEquals(1, files.size(), 0.0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.