so we use javac directly, investigate why jx.l.m is not cutting it.
160670
public List<TypeMirror> interfaceTypesOf(TypeMirror type) {
        com.sun.tools.javac.util.List<com.sun.tools.javac.code.Type> interfaces =
                ((DocEnvImpl)configuration.docEnv).toolEnv.getTypes().interfaces((com.sun.tools.javac.code.Type)type);
        if (interfaces.isEmpty()) {
            return Collections.emptyList();
        }
        List<TypeMirror> list = new ArrayList<>(interfaces.size());
        for (com.sun.tools.javac.code.Type t : interfaces) {
            list.add((TypeMirror)t);
        }
        return list;
    }
664243
@SuppressWarnings("WeakerAccess")
  protected boolean isJettyWithJMX(ClassLoaderLeakPreventor preventor) {
    final ClassLoader classLoader = preventor.getClassLoader();
    try {
      // If package org.eclipse.jetty is found, we may be running under jetty
      if (classLoader.getResource("org/eclipse/jetty") == null) {
        return false;
      }

      Class.forName("org.eclipse.jetty.jmx.MBeanContainer", false, classLoader.getParent()); // JMX enabled?
      Class.forName("org.eclipse.jetty.webapp.WebAppContext", false, classLoader.getParent());
    }
    catch(Exception ex) { // For example ClassNotFoundException
      return false;
    }
    
    // Seems we are running in Jetty with JMX enabled
    return true;
  }
1339677
public static void main(String[] args) throws Exception {
      List<ObjectName> objectNames = new LinkedList<ObjectName>();
      objectNames.add(null);
      if (args.length >= 3){
            new JmxScraper(args[0], args[1], args[2], false, objectNames, new LinkedList<ObjectName>(),
                    new StdoutWriter(), new JmxMBeanPropertyCache()).doScrape();
        }
      else if (args.length > 0){
          new JmxScraper(args[0], "", "", false, objectNames, new LinkedList<ObjectName>(),
                  new StdoutWriter(), new JmxMBeanPropertyCache()).doScrape();
      }
      else {
          new JmxScraper("", "", "", false, objectNames, new LinkedList<ObjectName>(),
                  new StdoutWriter(), new JmxMBeanPropertyCache()).doScrape();
      }
    }
86365
private static void cs_augment(int k, DZcs A, int[] jmatch, int jmatch_offset, int[] cheap, int cheap_offset,
		    int[] w, int w_offset, int[] js, int js_offset, int[] is, int is_offset, int[] ps, int ps_offset)
	{
		int p, i = -1, Ap[] = A.p, Ai[] = A.i, head = 0, j ;
		boolean found = false ;
		js [js_offset + 0] = k ;				/* start with just node k in jstack */
		while (head >= 0)
		{
			/* --- Start (or continue) depth-first-search at node j ------------- */
			j = js [js_offset + head] ;			/* get j from top of jstack */
			if (w [w_offset + j] != k)			/* 1st time j visited for kth path */
			{
				w [w_offset + j] = k ;			/* mark j as visited for kth path */
				for (p = cheap [cheap_offset + j] ; p < Ap [j+1] && !found ; p++)
				{
					i = Ai [p] ;			/* try a cheap assignment (i,j) */
					found = (jmatch [jmatch_offset + i] == -1) ;
				}
				cheap [cheap_offset + j] = p ;		/* start here next time j is traversed*/
				if (found)
				{
					is [is_offset + head] = i ;  	/* column j matched with row i */
					break ;				/* end of augmenting path */
				}
				ps [ps_offset + head] = Ap [j] ;	/* no cheap match: start dfs for j */
			}
			/* --- Depth-first-search of neighbors of j ------------------------- */
			for (p = ps [ps_offset + head] ; p < Ap [j+1] ; p++)
			{
				i = Ai [p] ;				/* consider row i */
				if (w [w_offset + jmatch [jmatch_offset + i]] == k)
					continue ;			/* skip jmatch [i] if marked */
				ps [ps_offset + head] = p + 1 ;		/* pause dfs of node j */
				is [is_offset + head] = i ;		/* i will be matched with j if found */
				js [js_offset + (++head)] = jmatch [jmatch_offset + i] ;  /* start dfs at column jmatch [i] */
				break;
			}
			if (p == Ap [j+1]) head-- ;			/* node j is done; pop from stack */
		} 							/* augment the match if path found: */
		if (found) for (p = head ; p >= 0 ; p--) jmatch [jmatch_offset + is [is_offset + p]] = js [js_offset + p] ;
	}
1246929
public static void main(String[] args) 
      throws NoSuchAlgorithmException, IOException, InvalidKeyException, XmlPullParserException {
    try {
      /* play.min.io for test and development. */
      MinioClient minioClient = new MinioClient("https://play.min.io:9000", "Q3AM3UQ867SPQQA43P2F",
                                                "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

      /* Amazon S3: */
      // MinioClient minioClient = new MinioClient("https://s3.amazonaws.com", "YOUR-ACCESSKEYID",
      //                                           "YOUR-SECRETACCESSKEY");

      // Create some content for the object.
      StringBuilder builder = new StringBuilder();
      for (int i = 0; i < 1000; i++) {
        builder.append("Sphinx of black quartz, judge my vow: Used by Adobe InDesign to display font samples. ");
        builder.append("(29 letters)\n");
        builder.append("Jackdaws love my big sphinx of quartz: Similarly, used by Windows XP for some fonts. ");
        builder.append("(31 letters)\n");
        builder.append("Pack my box with five dozen liquor jugs: According to Wikipedia, this one is used on ");
        builder.append("NASAs Space Shuttle. (32 letters)\n");
        builder.append("The quick onyx goblin jumps over the lazy dwarf: Flavor text from an Unhinged Magic Card. ");
        builder.append("(39 letters)\n");
        builder.append("How razorback-jumping frogs can level six piqued gymnasts!: Not going to win any brevity ");
        builder.append("awards at 49 letters long, but old-time Mac users may recognize it.\n");
        builder.append("Cozy lummox gives smart squid who asks for job pen: A 41-letter tester sentence for Mac ");
        builder.append("computers after System 7.\n");
        builder.append("A few others we like: Amazingly few discotheques provide jukeboxes; Now fax quiz Jack! my ");
        builder.append("brave ghost pled; Watch Jeopardy!, Alex Trebeks fun TV quiz game.\n");
        builder.append("---\n");
      }
      // Create a InputStream for object upload.
      ByteArrayInputStream bais = new ByteArrayInputStream(builder.toString().getBytes("UTF-8"));
        
      // Generate a new 256 bit AES key - This key must be remembered by the client.
      byte[] key = "01234567890123456789012345678901".getBytes("UTF-8"); 
      SecretKeySpec secretKeySpec = new SecretKeySpec(key, "AES");
        
      ServerSideEncryption ssePut = ServerSideEncryption.withCustomerKey(secretKeySpec);
      ServerSideEncryption sseSource = ServerSideEncryption.copyWithCustomerKey(secretKeySpec);
        
      byte[] keyTarget = "98765432100123456789012345678901".getBytes("UTF-8"); 
      SecretKeySpec secretKeySpecTarget = new SecretKeySpec(keyTarget, "AES");

      ServerSideEncryption sseTarget = ServerSideEncryption.withCustomerKey(secretKeySpecTarget);
        
      // Create object 'my-objectname' in 'my-bucketname' with content from the input stream.
      minioClient.putObject("my-bucketname", "my-objectname", bais, bais.available(), ssePut);
      System.out.println("my-objectname is uploaded successfully");
        
      minioClient.copyObject("my-bucketname", "my-objectname", sseSource, "my-destbucketname",
                             "my-objectname-copy", null, sseTarget);

      bais.close();

      System.out.println("my-objectname-copy copied to my-destbucketname successfully.");
    } catch (MinioException e) {
      System.out.println("Error occurred: " + e);
    }
    System.out.println("finished");
  }
366621
private static File whoAmI() throws IOException {
		// JNLP returns the URL where the jar was originally placed (like http://...)
		// not the local cached file. So we need a rather round about approach to get to
		// the local file name.
		// There is no portable way to find where the locally cached copy
		// of war/jar is; JDK 6 is too smart. (See JENKINS-2326.)
		try {
			return whoAmIFromJnlp();
		} catch (final Exception x) {
			getSystemErrorStream().println(
					"INFO: ZipFile.name trick did not work (" + x.toString() + "), using fallback");
		}
		final File myself = File.createTempFile("javamelody", ".jar");
		myself.deleteOnExit();
		final InputStream is = Main.class.getProtectionDomain().getCodeSource().getLocation()
				.openStream();
		try {
			final OutputStream os = new FileOutputStream(myself);
			try {
				copyStream(is, os);
			} finally {
				os.close();
			}
		} finally {
			is.close();
		}
		return myself;
	}
1354933
@SuppressWarnings("InfiniteLoopStatement")
	public static void main(String[] args) throws Exception {
		SimonManager.callback().addCallback(new JmxRegisterCallback("org.javasimon.examples.jmx.JmxCallbackExample"));

		Counter counter = SimonManager.getCounter("org.javasimon.examples.jmx.counter");
		Stopwatch stopwatch = SimonManager.getStopwatch("org.javasimon.examples.jmx.stopwatch");
		// these created just to have more stuff in jconsole
		SimonManager.getCounter("org.javasimon.different.counter");
		SimonManager.getStopwatch("org.javasimon.some.other.jmx.stopwatch1");
		SimonManager.getStopwatch("org.javasimon.some.other.jmx.stopwatch2");
		System.out.println("Now open jconsole and check it out...\nWatch org.javasimon.examples.jmx.stopwatch for changes.");
		while (true) {
			counter.increase();
			try (Split ignored = stopwatch.start()) {
				ExampleUtils.waitRandomlySquared(40);
			}
		}
	}
537412
private void initJmxExpose() {
		final String packageName = getClass().getName().substring(0,
				getClass().getName().length() - getClass().getSimpleName().length() - 1);
		String webapp = Parameters.getContextPath(Parameters.getServletContext());
		if (webapp.length() >= 1 && webapp.charAt(0) == '/') {
			webapp = webapp.substring(1, webapp.length());
		}
		final List<Counter> counters = collector.getCounters();
		final MBeanServer platformMBeanServer = MBeans.getPlatformMBeanServer();
		try {
			for (final Counter counter : counters) {
				if (!Parameters.isCounterHidden(counter.getName())) {
					final CounterRequestMXBean.CounterRequestMXBeanImpl mxBean = new CounterRequestMXBean.CounterRequestMXBeanImpl(
							counter);
					final ObjectName name = new ObjectName(
							packageName + ":type=CounterRequest,context=" + webapp + ",name="
									+ counter.getName());
					platformMBeanServer.registerMBean(mxBean, name);
					jmxNames.add(name);
				}
			}
			LOG.debug("JMX mbeans registered");
		} catch (final JMException e) {
			LOG.warn("failed to register JMX mbeans", e);
		}
	}
865087
public boolean isEnabledForCurrentJRE() {
        if ("".equals(requireJRE)) {
            return true;
        }
        try {
            JavaVersion requiredVersion = new JavaVersion(requireJRE);
            JavaVersion runtimeVersion = JavaVersion.getRuntimeVersion();

            if (DEBUG_JAVA_VERSION) {
                System.out.println("Checking JRE version for " + getShortName() + " (requires " + requiredVersion
                        + ", running on " + runtimeVersion + ")");
            }

            boolean enabledForCurrentJRE = runtimeVersion.isSameOrNewerThan(requiredVersion);
            if (DEBUG_JAVA_VERSION) {
                System.out.println("\t==> " + enabledForCurrentJRE);
            }
            return enabledForCurrentJRE;
        } catch (JavaVersionException e) {
            if (DEBUG_JAVA_VERSION) {
                System.out.println("Couldn't check Java version: " + e.toString());
                e.printStackTrace(System.out);
            }
            return false;
        }
    }
1353383
def is_java_jni_project(self):
        
        if self._is_java_jni_project is None:
            self._is_java_jni_project = isinstance(self.arch, ArchSoot) and self.simos.is_javavm_with_jni_support
        return self._is_java_jni_project
1308428
@Override
    public JmsConnectionFactory createConnectionFactory() throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createConnectionFactory");
        JmsConnectionFactory jmscf = null;

        // get a jca managed connection factory, which is used to construct
        // the jms connection factory.
        JmsJcaFactory jcaFact = JmsJcaFactory.getInstance();

        if (jcaFact == null) {
            // This indicates that the jmsra.impl class could not be loaded by their
            // static initializer. Nothing we can do about that...

            // d238447 FFDC review. FFDC has already been generated by JmsJcaFactory, so
            //   don't generate one here.
            throw (JMSException) JmsErrorUtils.newThrowable(
                                                            JMSException.class,
                                                            "UNABLE_TO_CREATE_FACTORY_CWSIA0008",
                                                            new Object[] { "JmsJcaFactoryImpl", "sib.api.jmsraOutboundImpl.jar" },
                                                            tc
                            );
        }

        JmsJcaManagedConnectionFactory jcamcf = jcaFact.createManagedConnectionFactory();

        // invoke the construction of a jms connection factory - the jca managed
        // connection factory will call back into the jms api code by getting a
        // JmsRAFactoryFactory, and calling a create jms connection factory
        // method on it with jca connection factory and jca managed connection
        // factory objects as parameters (the jms cf will keep references to the
        // jca cf and jca mcf).
        try {
            jmscf = (JmsConnectionFactory) jcamcf.createConnectionFactory();
        } catch (ResourceException re) {
            // No FFDC code needed
            // d222942 review - no documentation for when a RE will be thrown, so
            // default exception ok. (A quick look at the RA suggests the exception isn't
            // ever thrown).
            // d238447 FFDC review. From the above comment, generating an FFDC seems ok.
            throw (JMSException) JmsErrorUtils.newThrowable(
                                                            JMSException.class,
                                                            "EXCEPTION_RECEIVED_CWSIA0007",
                                                            new Object[] { re, "JmsFactoryFactoryImpl.createConnectionFactory (#2)" },
                                                            re,
                                                            "JmsFactoryFactoryImpl.createConnectionFactory#2",
                                                            this,
                                                            tc
                            );
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "createConnectionFactory", jmscf);
        return jmscf;
    }
1190547
public static boolean compileJavaClass(String sourceCode) {
		try {
			String fileName = getClassName(sourceCode).concat(".java");
			logger.info("Compiling Java Class ({})", fileName);

			File rootDir = JKIOUtil.createTempDirectory();
			String packageDir = getPackageDir(sourceCode);
			File sourceFile ;
			if(packageDir!=null) {
				File file=new File(rootDir,packageDir);
				file.mkdirs();
				sourceFile=new File(file, fileName);
			}else {
				sourceFile=new File(rootDir, fileName);
			}

			JKIOUtil.writeDataToFile(sourceCode, sourceFile);

			// Compile source file.
			JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
			StandardJavaFileManager standardJavaFileManager = compiler.getStandardFileManager(null, null, null);

			standardJavaFileManager.setLocation(StandardLocation.CLASS_PATH, getClassPath());
			standardJavaFileManager.setLocation(StandardLocation.SOURCE_PATH, Arrays.asList(rootDir));

			List<String> options = new ArrayList<String>();

			options.add("-Xlint:unchecked");

			CompilationTask compilationTask = compiler.getTask(null, standardJavaFileManager, null, options, null,
					standardJavaFileManager.getJavaFileObjectsFromFiles(JK.toList(sourceFile)));

			return compilationTask.call();
		} catch (IOException e) {
			JK.throww(e);
			return false;
		}

//		if (compiler.run(System.in, System.out, System.err, sourceFile.getPath()) != 0) {
//			JK.error("Compilation failed, check stack trace");
//		}
	}
1238093
void checkJnlpConfig()
            throws MojoExecutionException
    {
        if ( jnlp == null )
        {
            throw new MojoExecutionException( "jnlp must be set to generate config!" );
        }
        JnlpFileType type = jnlp.getType();
        if ( type == null )
        {
            throw new MojoExecutionException( "jnlp must define a default jnlp type file to generate (among " +
                                                      Arrays.toString( JnlpFileType.values() ) + " )." );
        }
        if ( !type.isRequireMainClass() && StringUtils.isNotBlank( jnlp.getMainClass() ) )
        {
            getLog().warn( "Jnlp file of type '" + type +
                                   "' does not support mainClass, value will not be accessible in template." );
            jnlp.setMainClass( null );
            
            addApplicationFile = false;
        }
    }
470816
public static void main(String[] args) throws Exception {
    AlluxioFramework framework = new AlluxioFramework();
    JCommander jc = new JCommander(framework);
    try {
      jc.parse(args);
    } catch (Exception e) {
      System.out.println(e.getMessage());
      jc.usage();
      System.exit(1);
    }
    framework.run();
  }
330038
public boolean validateJMX() {
        if (getEdenMemoryPoolMXBean() == null ||
            getSurvivorMemoryPoolMXBean() == null ||
            getTenuredMemoryPoolMXBean() == null ||
            getPermGenMemoryPoolMXBean() == null ||
            getYoungCollectorMXBean() == null ||
            getTenuredCollectorMXBean() == null) {
            
            return false;
        }
        
        return true;
    }
1266956
private static String js_join(Context cx, Scriptable thisObj,
                                  Object[] args)
    {
        long llength = getLengthProperty(cx, thisObj, false);
        int length = (int)llength;
        if (llength != length) {
            throw Context.reportRuntimeError1(
                "msg.arraylength.too.big", String.valueOf(llength));
        }
        // if no args, use "," as separator
        String separator = (args.length < 1 || args[0] == Undefined.instance)
                           ? ","
                           : ScriptRuntime.toString(args[0]);
        if (thisObj instanceof NativeArray) {
            NativeArray na = (NativeArray) thisObj;
            if (na.denseOnly) {
                StringBuilder sb = new StringBuilder();
                for (int i = 0; i < length; i++) {
                    if (i != 0) {
                        sb.append(separator);
                    }
                    if (i < na.dense.length) {
                        Object temp = na.dense[i];
                        if (temp != null && temp != Undefined.instance &&
                            temp != Scriptable.NOT_FOUND)
                        {
                            sb.append(ScriptRuntime.toString(temp));
                        }
                    }
                }
                return sb.toString();
            }
        }
        if (length == 0) {
            return "";
        }
        String[] buf = new String[length];
        int total_size = 0;
        for (int i = 0; i != length; i++) {
            Object temp = getElem(cx, thisObj, i);
            if (temp != null && temp != Undefined.instance) {
                String str = ScriptRuntime.toString(temp);
                total_size += str.length();
                buf[i] = str;
            }
        }
        total_size += (length - 1) * separator.length();
        StringBuilder sb = new StringBuilder(total_size);
        for (int i = 0; i != length; i++) {
            if (i != 0) {
                sb.append(separator);
            }
            String str = buf[i];
            if (str != null) {
                // str == null for undefined or null
                sb.append(str);
            }
        }
        return sb.toString();
    }
81132
private void checkJodaConstructor3() {
        int COUNT = COUNT_SLOW;
        DateTime dt = new DateTime(1972, 10, 1, 0, 0, 0, 0,
                                   GJChronology.getInstance());
        for (int i = 0; i < AVERAGE; i++) {
            start("Joda", "new(YMD)");
            for (int j = 0; j < COUNT; j++) {
                dt = new DateTime(1972, 10, 1, 0, 0, 0, 0,
                                  GJChronology.getInstance());
                if (dt == null) {System.out.println("Anti optimise");}
            }
            end(COUNT);
        }
    }