added from java-adornments.txt:
171405
public void checkNoModifiers(String noun, String verb) throws FHIRException {
        if (hasModifierExtension()) {
          throw new FHIRException("Found unknown Modifier Exceptions on "+noun+" doing "+verb);
        }
        
  }
471178
async function collecticonsBundle (params) {
  const {
    dirPath,
    destFile
  } = params;

  await validateDirPath(dirPath);

  const resultFiles = await collecticonsCompile({
    dirPath,
    styleFormats: ['css'],
    styleDest: './styles',
    fontDest: './',
    fontTypes: ['woff', 'woff2'],
    previewDest: './',
    noFileOutput: true
  });

  if (resultFiles === null) return;

  // Create zip.
  let zip = new JSZip();

  // Add generated files.
  resultFiles.forEach(file => {
    zip.file(file.path, file.contents);
  });

  // Add the icons.
  const dir = await fs.readdir(dirPath);
  const svgs = await Promise.all(dir.map(async file => {
    return file.endsWith('.svg')
      ? (
        {
          path: `icons/${file}`,
          contents: await fs.readFile(path.resolve(dirPath, file))
        }
      )
      : null;
  }));

  svgs.forEach(file => {
    zip.file(file.path, file.contents);
  });

  await fs.ensureDir(path.dirname(destFile));
  await fs.writeFile(destFile, zip.generate({ base64: false, compression: 'DEFLATE' }), 'binary');
}
1063473
private void addInfoLayoutComponents() {

        TextField siteTableFilter = new TextField();
        siteTableFilter.setIcon(FontOpenCms.FILTER);
        siteTableFilter.setInputPrompt(
            Messages.get().getBundle(UI.getCurrent().getLocale()).key(Messages.GUI_EXPLORER_FILTER_0));
        siteTableFilter.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
        siteTableFilter.setWidth("200px");
        siteTableFilter.addTextChangeListener(new TextChangeListener() {

            private static final long serialVersionUID = 1L;

            public void textChange(TextChangeEvent event) {

                m_table.filterTable(event.getText());
            }
        });
        m_infoLayout.addComponent(siteTableFilter);

    }
576337
public void decorate(Object element, IDecoration decoration)
	{
		int adornmentFlags = computeAdornmentFlags(element);
		if (adornmentFlags == ERRORTICK_ERROR)
		{
			decoration.addOverlay(VdmPluginImages.DESC_OVR_ERROR);
		} else if (adornmentFlags == ERRORTICK_WARNING)
		{
			decoration.addOverlay(VdmPluginImages.DESC_OVR_WARNING);
		}
	}
678203
public static void main(final String args[])
		throws Exception {
		if (hasParameter(args,"--help") ||
			hasParameter(args,"-h")) {
			showUsage(null);
		}
		String  url				 = getParameter(args, "--url");
		String  outfile			 = getParameter(args, "--out");
		String  fontPath	 	 = getParameter(args, "--fontpath");
		String  password		 = getParameter(args, "--password");
		String  keystorePath     = getParameter(args, "--ks");
		String  keystorePassword = getParameter(args, "--kspassword");
		String  keyPassword		 = getParameter(args, "--keypassword");
		String  cryptReason		 = getParameter(args, "--cryptreason");
		String  cryptLocation    = getParameter(args, "--cryptlocation");
		
		if (outfile == null) {
			showUsage("--out file must exists !");
		} // end if

		try {
			new URL(url);
		} // end try
		catch (final Exception e) {
			showUsage("--url must be a valid URL !");
		} // end catch
		try {
			File fout = new File(outfile);

			List			 headerFooterList = new ArrayList();

			FileOutputStream out = new FileOutputStream(fout);
			System.out.println("before conversion");

			Map properties = new HashMap();

			headerFooterList.add(new IHtmlToPdfTransformer.CHeaderFooter(
					"<table width=\"100%\"><tbody><tr><td align=\"left\">Generated with YaHPConverter.</td><td align=\"right\">Page <pagenumber>/<pagecount></td></tr></tbody></table>",
					IHtmlToPdfTransformer.CHeaderFooter.HEADER));
			headerFooterList.add(new IHtmlToPdfTransformer.CHeaderFooter(
					"© 2011 Quentin Anciaux",
					IHtmlToPdfTransformer.CHeaderFooter.FOOTER));
			
			properties.put(IHtmlToPdfTransformer.PDF_RENDERER_CLASS,
					IHtmlToPdfTransformer.FLYINGSAUCER_PDF_RENDERER);
			if (fontPath != null)
				properties.put(IHtmlToPdfTransformer.FOP_TTF_FONT_PATH, fontPath);

			if (password != null) {
				System.out.println(password);
				properties.put(IHtmlToPdfTransformer.USE_PDF_ENCRYPTION,
					"true");
				properties.put(IHtmlToPdfTransformer.PDF_ALLOW_SCREEN_READERS,
					"true");
				properties.put(IHtmlToPdfTransformer.PDF_ENCRYPTION_PASSWORD,
					password);

				if (keystorePath != null) {
					properties.put(IHtmlToPdfTransformer.USE_PDF_SIGNING,
						"true");
					properties.put(IHtmlToPdfTransformer.PDF_SIGNING_PRIVATE_KEY_FILE,
						keystorePath);
					properties.put(IHtmlToPdfTransformer.PDF_SIGNING_KEYSTORE_PASSWORD,
						keystorePassword);
					properties.put(IHtmlToPdfTransformer.PDF_SIGNING_PRIVATE_KEY_PASSWORD,
						keyPassword);

					if (cryptReason != null) {
						properties.put(IHtmlToPdfTransformer.PDF_SIGNING_REASON,
							cryptReason);
					} // end if

					if (cryptLocation != null) {
						properties.put(IHtmlToPdfTransformer.PDF_SIGNING_LOCATION,
							cryptLocation);
					} // end if
				} // end if
			} // end if

			converter.convertToPdf(new URL(url),
				IHtmlToPdfTransformer.A4P, headerFooterList, out,
				properties);
			System.out.println("after conversion");
			out.flush();
			out.close();
		} // end try
		catch (final Throwable t) {
			t.printStackTrace();
			System.err.println("An error occurs while converting '" +
				url + "' to '" + outfile + "'. Cause : " +
				t.getMessage());
			System.exit(-1);
		} // end catch

		System.exit(0);
	}
184972
function(f) {
				f.mime && f.mime !== 'directory' && !addedBadges[f.mime] && addBadgeStyle(f.mime, f.name);
				return templates[list ? 'row' : 'icon']
						.replace(/\{([a-z0-9_]+)\}/g, function(s, e) { 
							return replacement[e] ? replacement[e](f, fm) : (f[e] ? f[e] : ''); 
						});
			}
944062
public static void main(String[] args) throws IOException {
		String s = doc(svg(
				160,
				200,
				rect(0, 0, 160, 200, "fill:red;")
						+ svg(10,
								10,
								100,
								100,
								rect(0, 0, 100, 100,
										"fill:orange; stroke:rgb(0,0,0);"))
						+ line(20, 20, 100, 100,
								"stroke:black; stroke-width:2px;")
						+ line(20, 100, 100, 20,
								"stroke:black; stroke-width:2px;")
						+ text(10,
								140,
								"font-family:verdana; font-size:20px; font-weight:bold;",
								"Hello world")));

		File file = new File("demo.svg");
		FileWriter w = null;
		try {
		    w = new FileWriter(file);
	        w.write(s);
		} finally {
		    if (w != null) {
		        w.close();
		    }
		}
		System.out.println(String.format("File written: %s",
				file.getAbsolutePath()));

		// optionally view the just created file
		if (args.length > 0 && args[0].equals("-view")) {
			if (!viewSVG(file)) {
				System.err.println("'-view' not supported on this platform");
			}
		}
	}
392378
public static void main(String[] args) throws IOException, PageNotFoundException {
    if (args.length != 1) {
      System.out.println("Usage: " + WikipediaQuickCheck.class.getName() + " <url>");
      System.exit(1);
    }
    WikipediaQuickCheck check = new WikipediaQuickCheck();
    // URL examples:
    //String urlString = "http://de.wikipedia.org/wiki/Angela_Merkel";
    //String urlString = "https://de.wikipedia.org/wiki/Benutzer_Diskussion:Dnaber";
    //String urlString = "https://secure.wikimedia.org/wikipedia/de/wiki/Gütersloh";
    String urlString = args[0];
    MarkupAwareWikipediaResult result = check.checkPage(new URL(urlString), new ErrorMarker("***", "***"));
    int errorCount = 0;
    for (AppliedRuleMatch match : result.getAppliedRuleMatches()) {
      RuleMatchApplication matchApplication = match.getRuleMatchApplications().get(0);
      RuleMatch ruleMatch = match.getRuleMatch();
      Rule rule = ruleMatch.getRule();
      System.out.println("");
      String message = ruleMatch.getMessage().replace("<suggestion>", "'").replace("</suggestion>", "'");
      errorCount++;
      System.out.print(errorCount + ". " + message);
      if (rule instanceof AbstractPatternRule) {
        System.out.println(" (" + ((AbstractPatternRule) rule).getFullId() + ")");
      } else {
        System.out.println(" (" + rule.getId() + ")");
      }
      System.out.println("    ..." + matchApplication.getOriginalErrorContext(50).replace("\n", "\\n") + "...");
    }
  }
1175863
public final void mJavaLetterOrDigit() throws RecognitionException {
		try {
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1388:2: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '$' | '_' ) |{...}?~ ( '\\u0000' .. '\\u007F' | '\\uD800' .. '\\uDBFF' ) |{...}? ( '\\uD800' .. '\\uDBFF' ) ( '\\uDC00' .. '\\uDFFF' ) )
			int alt28=3;
			int LA28_0 = input.LA(1);
			if ( (LA28_0=='$'||(LA28_0 >= '0' && LA28_0 <= '9')||(LA28_0 >= 'A' && LA28_0 <= 'Z')||LA28_0=='_'||(LA28_0 >= 'a' && LA28_0 <= 'z')) ) {
				alt28=1;
			}
			else if ( ((LA28_0 >= '\u0080' && LA28_0 <= '\uD7FF')||(LA28_0 >= '\uDC00' && LA28_0 <= '\uFFFF')) ) {
				alt28=2;
			}
			else if ( ((LA28_0 >= '\uD800' && LA28_0 <= '\uDBFF')) ) {
				alt28=3;
			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 28, 0, input);
				throw nvae;
			}

			switch (alt28) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1388:4: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '$' | '_' )
					{
					if ( input.LA(1)=='$'||(input.LA(1) >= '0' && input.LA(1) <= '9')||(input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
						input.consume();
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						recover(mse);
						throw mse;
					}
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1389:9: {...}?~ ( '\\u0000' .. '\\u007F' | '\\uD800' .. '\\uDBFF' )
					{
					if ( !((Character.isJavaIdentifierPart(input.LA(1)))) ) {
						throw new FailedPredicateException(input, "JavaLetterOrDigit", "Character.isJavaIdentifierPart(input.LA(1))");
					}
					if ( (input.LA(1) >= '\u0080' && input.LA(1) <= '\uD7FF')||(input.LA(1) >= '\uDC00' && input.LA(1) <= '\uFFFF') ) {
						input.consume();
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						recover(mse);
						throw mse;
					}
					}
					break;
				case 3 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1391:9: {...}? ( '\\uD800' .. '\\uDBFF' ) ( '\\uDC00' .. '\\uDFFF' )
					{
					if ( !((Character.isJavaIdentifierPart(Character.toCodePoint((char)input.LA(-1), (char)input.LA(1))))) ) {
						throw new FailedPredicateException(input, "JavaLetterOrDigit", "Character.isJavaIdentifierPart(Character.toCodePoint((char)input.LA(-1), (char)input.LA(1)))");
					}
					if ( (input.LA(1) >= '\uD800' && input.LA(1) <= '\uDBFF') ) {
						input.consume();
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						recover(mse);
						throw mse;
					}
					if ( (input.LA(1) >= '\uDC00' && input.LA(1) <= '\uDFFF') ) {
						input.consume();
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						recover(mse);
						throw mse;
					}
					}
					break;

			}
		}
		finally {
			// do for sure before leaving
		}
	}
1345460
public static void main(String[] args) {
        try {
            File[] files = new File("statuses").listFiles(new FilenameFilter() {
                @Override
                public boolean accept(File dir, String name) {
                    return name.endsWith(".json");
                }
            });
            for (File file : files) {
                String rawJSON = readFirstLine(file);
                Status status = TwitterObjectFactory.createStatus(rawJSON);
                System.out.println("@" + status.getUser().getScreenName() + " - " + status.getText());
            }
            System.exit(0);
        } catch (IOException ioe) {
            ioe.printStackTrace();
            System.out.println("Failed to store tweets: " + ioe.getMessage());
        } catch (TwitterException te) {
            te.printStackTrace();
            System.out.println("Failed to get timeline: " + te.getMessage());
            System.exit(-1);
        }
    }
260595
public void jmolColorByChain(){
		String script =
				"function color_by_chain(objtype, color_list) {"+ String.format("%n") +
				""+ String.format("%n") +
				"		 if (color_list) {"+ String.format("%n") +
				"		   if (color_list.type == \"string\") {"+ String.format("%n") +
				"		     color_list = color_list.split(\",\").trim();"+ String.format("%n") +
				"		   }"+ String.format("%n") +
				"		 } else {"+ String.format("%n") +
				"		   color_list = [\"104BA9\",\"AA00A2\",\"C9F600\",\"FFA200\",\"284A7E\",\"7F207B\",\"9FB82E\",\"BF8B30\",\"052D6E\",\"6E0069\",\"83A000\",\"A66A00\",\"447BD4\",\"D435CD\",\"D8FA3F\",\"FFBA40\",\"6A93D4\",\"D460CF\",\"E1FA71\",\"FFCC73\"];"+ String.format("%n") +
				"		 }"+ String.format("%n") +

				"		 var cmd2 = \"\";"+ String.format("%n") +

				"		 if (!objtype) {"+ String.format("%n") +
				"		   var type_list  = [ \"backbone\",\"cartoon\",\"dots\",\"halo\",\"label\",\"meshribbon\",\"polyhedra\",\"rocket\",\"star\",\"strand\",\"strut\",\"trace\"];"+ String.format("%n") +
				"		   cmd2 = \"color \" + type_list.join(\" none; color \") + \" none;\";"+ String.format("%n") +
				"		   objtype = \"atoms\";"+ String.format("%n") +

				"		 }"+ String.format("%n") +

				"		 var chain_list  = script(\"show chain\").trim().lines;"+ String.format("%n") +
				"		 var chain_count = chain_list.length;"+ String.format("%n") +

				"		 var color_count = color_list.length;"+ String.format("%n") +
				"		 var sel = {selected};"+ String.format("%n") +
				"		 var cmds = \"\";"+ String.format("%n") +


				"		 for (var chain_number=1; chain_number<=chain_count; chain_number++) {"+ String.format("%n") +
				"		   // remember, Jmol arrays start with 1, but % can return 0"+ String.format("%n") +
				"		   cmds += \"select sel and :\" + chain_list[chain_number] + \";color \" + objtype + \" [x\" + color_list[(chain_number-1) % color_count + 1] + \"];\" + cmd2;"+ String.format("%n") +
				"		 }"+ String.format("%n") +
				"		 script INLINE @{cmds + \"select sel\"}"+ String.format("%n") +
				"}";

		executeCmd(script);
	}
169530
public static void main(String[] argv) throws IOException {
		File dir = new File(".");
		dir = new File("C:\\eclipse\\grobot-workspace\\anon\\res\\tiles\\indoor1");
		
		ArrayList list = new ArrayList();
		File[] files = dir.listFiles();
		for (int i=0;i<files.length;i++) {
			if (files[i].getName().endsWith(".png")) {
				if (!files[i].getName().startsWith("output")) {
					list.add(files[i]);
				}
			}
		}
		
		Pack packer = new Pack();
		packer.pack(list, 512, 512, 1, new File(dir, "output.png"));
		System.out.println("Output Generated.");
	}
1100037
private void showRobotsTxt() throws Exception {

        CmsObject cms = getCmsObject();
        StringBuffer buffer = new StringBuffer();
        I_CmsResourceType seoFileType = OpenCms.getResourceManager().getResourceType(
            CmsXmlSeoConfiguration.SEO_FILE_TYPE);
        List<CmsResource> seoFiles = cms.readResources(
            "/",
            CmsResourceFilter.DEFAULT_FILES.addRequireVisible().addRequireType(seoFileType));
        for (CmsResource seoFile : seoFiles) {
            try {
                if (seoFile.getName().contains("test")) {
                    continue;
                }
                CmsXmlSeoConfiguration seoFileConfig = new CmsXmlSeoConfiguration();
                seoFileConfig.load(cms, seoFile);
                if (seoFileConfig.isXmlSitemapMode()) {
                    buffer.append(
                        "Sitemap: "
                            + CmsXmlSitemapGenerator.replaceServerUri(
                                OpenCms.getLinkManager().getOnlineLink(cms, cms.getSitePath(seoFile)),
                                m_configuration.getServerUrl()));
                    buffer.append("\n");
                }
            } catch (CmsException e) {
                LOG.error("Error while generating robots.txt : " + e.getLocalizedMessage(), e);
            }
        }
        buffer.append("\n");
        buffer.append(m_configuration.getRobotsTxtText());
        buffer.append("\n");
        getResponse().getWriter().print(buffer.toString());
    }
1326046
function dotNotation(path) {
   if (path instanceof Array) {
      return {
         path: path,
         str: path.join('.')
      }
   }
   if (typeof path !== 'string') {
      return;
   }
   return {
      path: path.split('\.'),
      str: path
   }
}
655252
private void displayNode(JspWriter out, ViewNode node, String url_Path, int level, int width) throws IOException {

		// ----------------------------------------显示节点本身信息，如节点名称等开始
		String encodedNodeKey = URLEncoder.encode(node.getKey(), "UTF-8");
		String action = replace(nodeAction, "${key}", encodedNodeKey);
		StringBuilder url = new StringBuilder(url_Path);
		url.append(action);
		if (nodeAction.indexOf("?") < 0)
			url.append("?");
		else
			url.append("&");
		url.append("key=").append(node.getKey());
		String treeNodeAction = url.toString();

		url = new StringBuilder(url_Path);
		url.append(treeAction);
		if (treeAction.indexOf("?") < 0)
			url.append("?");
		else
			url.append("&");
		url.append("select=").append(node.getKey());
		String updateNodeAction = url.toString();

		// Render the label for this node (if any)
		out.print("    <td colspan=\"");
		out.print(width - level + 1);
		out.print("\">");

		// 这里省略了icon

		if (node.getLabel() != null) {
			String labelStyle = null;
			if (node.isSelected())
				labelStyle = CSS_STYLE_SELECTED;
			else if (!node.isSelected())
				labelStyle = CSS_STYLE_UN_SELECTED;
			if (treeNodeAction != null) {
				// Note the leading space so that the text has some space
				// between it and any preceding images
				out.print(" <a href=\"");
				out.print(treeNodeAction);
				out.print("\"");
				if (target != null) {
					out.print(" target=\"");
					out.print(target);
					out.print("\"");
				}
				if (labelStyle != null) {
					out.print(" class=\"");
					out.print(labelStyle);
					out.print("\"");
				}
				// to refresh the tree in the same 'self' frame
				out.print(" onclick=\"");
				out.print("self.location.href='" + updateNodeAction + "'");
				out.print("\"");
				out.print(">");
			} else if (labelStyle != null) {
				out.print("<span class=\"");
				out.print(labelStyle);
				out.print("\">");
			}
			out.print(node.getLabel());
			if (treeNodeAction != null)
				out.print("</a>");
			else if (labelStyle != null)
				out.print("</span>");
		}

		out.println("</td>");

		// ----------------------------------------显示节点本身信息，如节点名称等结束

	}
371192
private void addDots(int length) {
        removeAllViews();
        final int pinLength = styledAttributes.getInt(R.styleable.PinLock_pinLength, 4);
        for (int i = 0; i < pinLength; i++) {
            Dot dot = new Dot(context, styledAttributes, i < length);
            addView(dot);
        }
    }
435501
final public void DotSuffix() throws ParseException {
                               /*@bgen(jjtree) DotSuffix */
                                AstDotSuffix jjtn000 = new AstDotSuffix(JJTDOTSUFFIX);
                                boolean jjtc000 = true;
                                jjtree.openNodeScope(jjtn000);Token t = null;
    try {
      jj_consume_token(DOT);
      t = jj_consume_token(IDENTIFIER);
                           jjtree.closeNodeScope(jjtn000, true);
                           jjtc000 = false;
                           jjtn000.setImage(t.image);
    } finally {
      if (jjtc000) {
        jjtree.closeNodeScope(jjtn000, true);
      }
    }
  }