<b>Example:</b>
{@code >}
550214
@Override
    public void renderNothing( PositionedText target, double x, double y, boolean forward )
    {
        target.add( x, y, ">" );
    }
715870
public void execute( Example example )
    {
        try
        {
            List<Fixture> fixtures = getFixtureList();

            Example headers = example.at( 0, 0 );
            if (columns == null) {
                columns = getHeaderColumns(headers);
            }

            if (example.hasSibling()) {

                RowFixtureSplitter splitter = new RowFixtureSplitter();

                splitter.split(example.at(1), fixtures, columns);

                for (RowFixture rowFixture : splitter.getMatch()) {
                    Example row = rowFixture.getRow();
                    executeRow(row.firstChild(), headers, rowFixture.getAdapter());

                    if (shouldStop(stats)) {
                        row.addChild().annotate(Annotations.stopped());
                        break;
                    }
                }

                if (mustProcessMissing() && canContinue(stats)) {
                    for (Example row : splitter.getMissing()) {
                        missingRow(row);

                        if (shouldStop(stats)) {
                            row.addChild().annotate(Annotations.stopped());
                            break;
                        }
                    }
                }

                if (mustProcessSurplus() && canContinue(stats)) {
                    for (Fixture adapter : splitter.getSurplus()) {
                        addSurplusRow(example, headers, adapter);

                        if (shouldStop(stats)) {
                            example.lastSibling().addChild().annotate(Annotations.stopped());
                            break;
                        }
                    }
                }
            }
        }
        catch (Exception e)
        {
            stats.exception();
            example.firstChild().annotate( exception( e ) );

			if (shouldStop( stats ))
			{
				example.addChild().annotate(Annotations.stopped());
			}
        }
    }
831730
@Override
	public Iterator<T> sample(Iterator<T> input) {
		return sampleInCoordinator(sampleInPartition(input));
	}
755168
@Override
    public Object createExample() {
        AnnotationDto result = new AnnotationDto();
        Map<String, String> sampleFields = new HashMap<>();

        fields.put("fieldName", "fieldValue");
        result.setFields(sampleFields);
        result.setId("datasourceSpecificUniqueID");
        result.setMetric("metric");
        result.setScope("scope");
        result.setSource("splunk");

        Map<String, String> sampleTags = new HashMap<>();

        sampleTags.put("tagk", "tagv");
        result.setTags(sampleTags);
        result.setTimestamp(System.currentTimeMillis());
        result.setType("erelease");
        return result;
    }
312194
public List<Writable> joinExamples(List<Writable> leftExample, List<Writable> rightExample) {

        List<Writable> out = new ArrayList<>();
        if (leftExample == null) {
            if (rightExample == null)
                throw new IllegalArgumentException(
                                "Cannot join examples: Both examples are null (max 1 allowed to be null)");

            //Insert a set of null writables...
            //Complication here: the **key values** should still exist (we have to extract them from second value)
            int nLeft = leftSchema.numColumns();
            List<String> leftNames = leftSchema.getColumnNames();
            int keysSoFar = 0;
            for (int i = 0; i < nLeft; i++) {
                String name = leftNames.get(i);
                if (ArrayUtils.contains(joinColumnsLeft, name)) {
                    //This would normally be where the left key came from...
                    //So let's get the key value from the *right* example
                    String rightKeyName = joinColumnsRight[keysSoFar];
                    int idxOfRightKey = rightSchema.getIndexOfColumn(rightKeyName);
                    out.add(rightExample.get(idxOfRightKey));
                } else {
                    //Not a key column, so just add a NullWritable
                    out.add(NullWritable.INSTANCE);
                }
            }
        } else {
            out.addAll(leftExample);
        }

        List<String> rightNames = rightSchema.getColumnNames();
        if (rightExample == null) {
            //Insert a set of null writables...
            int nRight = rightSchema.numColumns();
            for (int i = 0; i < nRight; i++) {
                String name = rightNames.get(i);
                if (ArrayUtils.contains(joinColumnsRight, name))
                    continue; //Skip the key column value
                out.add(NullWritable.INSTANCE);
            }
        } else {
            //Add all values from right, except for key columns...
            for (int i = 0; i < rightExample.size(); i++) {
                String name = rightNames.get(i);
                if (ArrayUtils.contains(joinColumnsRight, name))
                    continue; //Skip the key column value
                out.add(rightExample.get(i));
            }
        }

        return out;
    }
592187
public static List<StringContext> getContextsFromExamples(List<CcgExample> examples) {
    List<StringContext> contexts = Lists.newArrayList();
    for (CcgExample example : examples) {
      AnnotatedSentence sentence = example.getSentence();
      int numTerminals = sentence.size();
      for (int i = 0; i < numTerminals; i++) {
        for (int j = i; j < numTerminals; j++) {
          contexts.add(new StringContext(i, j, sentence));
        }
      }
    }
    return contexts;
  }
1090505
public DocServiceBuilder exampleRequestForMethod(String serviceName, String methodName,
                                                     Iterable<?> exampleRequests) {
        requireNonNull(serviceName, "serviceName");
        requireNonNull(methodName, "methodName");
        requireNonNull(exampleRequests, "exampleRequests");

        for (Object e : exampleRequests) {
            requireNonNull(e, "exampleRequests contains null.");
            exampleRequest0(serviceName, methodName,
                            serializeExampleRequest(serviceName, methodName, e));
        }
        return this;
    }
910184
public ExampleSet copy()
	{
		ExampleSet copy = new SentenceSetCopy();
		for (int i=0;i<size();i++)
			copy.add(x(i), y(i), id(i));

		return copy;
	}
336966
public DocServiceBuilder exampleHttpHeaders(String serviceName, HttpHeaders... exampleHttpHeaders) {
        requireNonNull(exampleHttpHeaders, "exampleHttpHeaders");
        return exampleHttpHeaders(serviceName, ImmutableList.copyOf(exampleHttpHeaders));
    }
528505
private void constructExample() {
		add(new WHeading(HeadingLevel.H2, "Examples showing TabSet Type property."));
		add(new WHeading(HeadingLevel.H3, "Tabs at the top"));
		WTabSet tabset0 = new SampleWTabset();
		add(tabset0);

		add(new WHeading(HeadingLevel.H3, "Tabs at the top with explicit TYPE"));
		/* Explicitly setting TYPE_TOP is superfluous */
		WTabSet tabset1 = new SampleWTabset(WTabSet.TYPE_TOP);
		add(tabset1);

		add(new WHeading(HeadingLevel.H3, "Tabs on the LEFT"));
		WTabSet tabset1a = new SampleWTabset(WTabSet.TYPE_LEFT);
		add(tabset1a);

		add(new WHeading(HeadingLevel.H3, "Tabs on the RIGHT"));
		WTabSet tabset1b = new SampleWTabset(WTabSet.TYPE_RIGHT);
		add(tabset1b);

		add(new WHeading(HeadingLevel.H3, "ACCORDION tabs"));
		WTabSet tabset1c = new SampleWTabset(TabSetType.ACCORDION);
		add(tabset1c);

		add(new WHorizontalRule());

		/* Content height */
		add(new WHeading(HeadingLevel.H2, "Examples showing content height property."));
		add(new WHeading(HeadingLevel.H3, "Tall content."));
		WTabSet htabset1 = new SampleWTabset();
		htabset1.setContentHeight(TALL_CONTENT);
		add(htabset1);

		WTabSet htabset1a = new SampleWTabset(WTabSet.TYPE_LEFT);
		htabset1a.setContentHeight(TALL_CONTENT);
		add(htabset1a);

		WTabSet htabset1b = new SampleWTabset(WTabSet.TYPE_RIGHT);
		htabset1b.setContentHeight(TALL_CONTENT);
		add(htabset1b);

		WTabSet htabset1c = new SampleWTabset(TabSetType.ACCORDION);
		htabset1c.setContentHeight(TALL_CONTENT);
		add(htabset1c);

		add(new WHeading(HeadingLevel.H3, "Short content."));
		WTabSet htabset1d = new SampleWTabset();
		htabset1d.setContentHeight(SHORT_CONTENT);
		add(htabset1d);

		WTabSet htabset1e = new SampleWTabset(WTabSet.TYPE_LEFT);
		htabset1e.setContentHeight(SHORT_CONTENT);
		add(htabset1e);

		WTabSet htabset1f = new SampleWTabset(WTabSet.TYPE_RIGHT);
		htabset1f.setContentHeight(SHORT_CONTENT);
		add(htabset1f);

		WTabSet htabset1g = new SampleWTabset(TabSetType.ACCORDION);
		htabset1g.setContentHeight(SHORT_CONTENT);
		add(htabset1g);

		add(new WHorizontalRule());
		add(new WHeading(HeadingLevel.H2, "Examples showing disabled property."));

		/* NOTE: WTabSet does not currently implement SubordinateTarget therefore one cannot create a subordinate
		 * control to disable/enable a WTabSet.
		 */
		WTabSet disabledTabset = new SampleWTabset();
		disabledTabset.setDisabled(true);
		add(disabledTabset);


		add(new WHeading(HeadingLevel.H2, "Examples showing accordion's single property."));
		WTabSet singleOpenAccordionabset = new SampleWTabset(WTabSet.TYPE_ACCORDION);
		singleOpenAccordionabset.setSingle(true);
		add(singleOpenAccordionabset);

		add(new WHorizontalRule());

		/* NOTE: no example of the hidden property because WTabSet is not a subordinate target. This is inconsistent
		 * with the schema. */
		add(new WHeading(HeadingLevel.H2, "Setting the initially active tab"));
		add(new WHeading(HeadingLevel.H3,
				"Server side with tabs on the left, with second tab initially active."));
		WTabSet tabset3 = new WTabSet(WTabSet.TYPE_LEFT);
		tabset3.setContentHeight("10em");
		tabset3.addTab(new WText("Some content should go in here."), "First tab",
				WTabSet.TAB_MODE_SERVER, 'i');

		WPanel largeContent2 = new WPanel();
		largeContent2.setLayout(new FlowLayout(Alignment.VERTICAL));
		largeContent2.add(new WText(LONG_TEXT));
		largeContent2.add(new WText(LONG_TEXT));
		largeContent2.add(new WText(LONG_TEXT));
		tabset3.addTab(largeContent2, "Second tab which is much longer", WTabSet.TAB_MODE_SERVER,
				'e');

		WImage image = new WImage("/image/success.png", "success");
		image.setCacheKey("eg-image-tab");
		WDecoratedLabel tabLabel = new WDecoratedLabel(image, new WText("Third tab"), null);

		tabset3.addTab(new WText("The tab button for this tab has an image!"), tabLabel,
				WTabSet.TAB_MODE_SERVER, 'h');

		// Set 2nd tab active
		tabset3.setActiveIndex(1);
		add(tabset3);

		add(new WHeading(HeadingLevel.H3,
				"Client side with tabs on the right and the third tab initially active."));
		WText thirdContent = new WText("Some more content should go into here.");
		WTabSet tabset4 = new WTabSet(WTabSet.TYPE_RIGHT);
		tabset4.setContentHeight("10em");
		tabset4.addTab(new WText("Some content should go into here."), "First tab",
				WTabSet.TAB_MODE_CLIENT);
		tabset4.addTab(new WText(LONG_TEXT), "Second tab which is longer", WTabSet.TAB_MODE_CLIENT);
		tabset4.addTab(thirdContent, "Third tab", WTabSet.TAB_MODE_CLIENT);

		// Set 3rd tab active
		tabset4.setActiveTab(thirdContent);
		add(tabset4);

		add(new WHeading(HeadingLevel.H3, "Client side with showing lots of tabs."));
		add(new ExplanatoryText(
				"This will effectively show what happens when tabs need to wrap. You should do everything possible to avoid this situation."));
		WTabSet tabset5 = new WTabSet();
		tabset5.addTab(new WText("Tab 1."), "First tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 2."), "Second tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 3."), "Third tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 4."), "Fourth tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 5."), "Fifth tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 6."), "Sixth tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 7."), "Seventh tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 8."), "Eighth tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 9."), "Nineth tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 10."), "Tenth tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 11."), "Eleventh tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 12."), "Twelfth tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 13."), "Thirteenth tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 14."), "Fourteenth tab", WTabSet.TAB_MODE_CLIENT);
		tabset5.addTab(new WText("Tab 15."), "Fifteenth tab", WTabSet.TAB_MODE_CLIENT);
		add(tabset5);

		add(new WHorizontalRule());

		add(new WHeading(HeadingLevel.H2, "Using WSubordinateControl"));
		WTabSet targetTabset = new SampleWTabset();
		add(targetTabset);

		WFieldLayout layout = new WFieldLayout(WFieldLayout.LAYOUT_STACKED);
		add(layout);
		final WCheckBox disabledControllerCb = new WCheckBox();
		final WCheckBox hiddenControllerCb = new WCheckBox();
		layout.addField("disable tabset", disabledControllerCb);
		layout.addField("hide tabset", hiddenControllerCb);


		// Build & add the subordinate
		SubordinateBuilder builder = new SubordinateBuilder();
		builder.condition().equals(hiddenControllerCb, String.valueOf(true));
		builder.whenTrue().hide(targetTabset);
		builder.whenFalse().show(targetTabset);
		add(builder.build());

		builder = new SubordinateBuilder();
		builder.condition().equals(disabledControllerCb, String.valueOf(true));
		builder.whenTrue().disable(targetTabset);
		builder.whenFalse().enable(targetTabset);
		add(builder.build());

	}
1018623
public static PactDslRootValue stringType(String example) {
    PactDslRootValue value = new PactDslRootValue();
    value.setValue(example);
    value.setMatcher(TypeMatcher.INSTANCE);
    return value;
  }
1319083
public void justificationOf(Datum<L, F> example, PrintWriter pw) {
    justificationOf(example, pw, null);
  }
553928
public BEValue bdecodeList() throws IOException {
    int c = this.getNextIndicator();
    if (c != 'l') {
      throw new InvalidBEncodingException("Expected 'l', not '" +
              (char) c + "'");
    }
    this.indicator = 0;

    List<BEValue> result = new ArrayList<BEValue>();
    c = this.getNextIndicator();
    while (c != 'e') {
      result.add(this.bdecode());
      c = this.getNextIndicator();
    }
    this.indicator = 0;

    return new BEValue(result);
  }
868578
public DocServiceBuilder exampleHttpHeaders(String serviceName, String methodName,
                                                Iterable<? extends HttpHeaders> exampleHttpHeaders) {
        requireNonNull(serviceName, "serviceName");
        checkArgument(!serviceName.isEmpty(), "serviceName is empty.");
        requireNonNull(methodName, "methodName");
        checkArgument(!methodName.isEmpty(), "methodName is empty.");
        requireNonNull(exampleHttpHeaders, "exampleHttpHeaders");
        return exampleHttpHeaders0(serviceName, methodName, exampleHttpHeaders);
    }
156328
public static void main(String[] args) throws Exception {
		
		NERTagger tag = new NERTagger("../models/seg.m","../models/pos.m");
		String str = " 新浪体育讯　北京时间4月15日03:00(英国当地时间14日20:00)，2009/10赛季英格兰足球超级联赛第34轮一场焦点战在白鹿巷球场展开角逐，阿森纳客场1比2不敌托特纳姆热刺，丹尼-罗斯和拜尔先入两球，本特纳扳回一城。阿森纳仍落后切尔西6分(净胜球少15个)，夺冠几成泡影。热刺近 7轮联赛取得6胜，继续以1分之差紧逼曼城。";
		HashMap<String, String> map = new HashMap<String, String>();
		tag.tag(str,map);
		System.out.println(map);
		map = tag.tagFile("../example-data/data-tag.txt");
		System.out.println(map);
		System.out.println("Done!");
	}
712346
public BinaryTree<String> createExample() {
        // START SNIPPET: sampleTree
        BinaryTree<String> empty = BinaryTree.<String>_EmptyTree();

        return _Node("hello", _Node("goodbye", empty, empty), _Node("whatever", empty, _Node("foo", empty, empty)));        
        // END SNIPPET: sampleTree
    }
469208
public static void main(String[] args) throws Exception{
        String google = "http://google.com";
        String yahoo = "http://yahoo.com";

        XMLDocument xml = new XMLDocument(new StreamResult(System.out), false, 4, null);

        xml.startDocument();{
            xml.addProcessingInstruction("san", "test='1.2'");
            xml.declarePrefix("google", google);
            xml.declarePrefix("yahoo", yahoo);
            xml.declarePrefix("http://msn.com");

            xml.startElement(google, "hello");{
                xml.addAttribute("name", "value");
                xml.addElement("xyz", "helloworld");
                xml.addElement(google, "hai", "test");
                xml.addXML(new InputSource("xml/xsds/note.xsd"), true);
                xml.addComment("this is comment");
                xml.addCDATA("this is sample cdata");
            }
        }
        xml.endDocument();
    }