TODO: This method should be a full blown functional but right now address
only partial semantics.
Do all semantic checks here.
@throws java.lang.Exception
197755
@Override
    public void isValid() throws Exception {
        if (numStmnts() >= 2) {
            if (primaryJoinableHooks.size() > 0) {
                for (String joinField:primaryJoinableHooks) {
                    if (joinField.equals("timestamp")) {// timestamp is implicitly present in the result.
                        continue;
                    }
                    for (QueryMeta query: getAllStmnts()) {
                        boolean isPresent = false;
                        if (query instanceof BaseAggQueryMeta) {// Since BaseAggQueryMeta is also a PlainDimQueryMeta we go with former first.
                            for (AggItem item:((BaseAggQueryMeta)query).aggregations) {
                                if (joinField.equals(item.fieldName) || (item.asName != null && joinField.equals(item.asName))) {
                                    isPresent = true;
                                }
                            }
                        }
                        if (query instanceof PlainDimQueryMeta) {
                            Map<String, String> dims = ((PlainDimQueryMeta)query).fetchDimensions;
                            for (Map.Entry<String, String> entry :dims.entrySet()) {
                                if (joinField.equals(entry.getKey()) || (entry.getValue() != null && joinField.equals(entry.getValue()))) {
                                    isPresent = true;
                                }
                            }
                        }
                        if (!isPresent) {
                            String error = joinField + " mentioned in the composite key should appear in all the data sources being queried and joined.";
                            throw new Exception(error);
                        }
                    }
                }
            } else {
                String error = "Need atleast one field to join on";
                throw new Exception(error);
            }
        }
    }
940983
private void parseMisc() throws Exception {
        while (true) {
            skipWhitespace();
            if (tryRead(startDelimPI)) {
                parsePI();
            } else if (tryRead(startDelimComment)) {
                parseComment();
            } else {
                return;
            }
        }
    }
1211945
@Override
	public void afterPropertiesSet() throws Exception {
		super.afterPropertiesSet();
		Assert.notNull(sql, "The SQL query must be provided");
		Assert.notNull(rowMapper, "RowMapper must be provided");
	}
374648
public static void main(String[] args) throws Exception {
		File[] fs = new File("./bin").listFiles();
		//		File[] fs = new File("../testdata-groovy/bin").listFiles();
		//		File[] fs = new File("/Users/aclement/grailsreload/foo/target/classes").listFiles();

		checkThemAll(fs);
		System.out.println("total=" + total / 1000000d);
	}
1370015
public void init() throws Exception {
        try {
            unmarshalAndSetBackingMap();
        }
        //If we get to this point, the JSON file is well-formed, but its structure does not map into PersonDir backingMap generic type - fail fast.
        catch (final ClassCastException ex) {
            throw new BeanCreationException(String.format("The semantic structure of the person attributes JSON config is not correct. Please fix it in this resource: [%s]",
                    this.personAttributesConfigFile.getURI()));
        }
    }
204919
public final void mJavaLetter() throws RecognitionException {
		try {
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1379:2: ( ( 'a' .. 'z' | 'A' .. 'Z' | '$' | '_' ) |{...}?~ ( '\\u0000' .. '\\u007F' | '\\uD800' .. '\\uDBFF' ) |{...}? ( '\\uD800' .. '\\uDBFF' ) ( '\\uDC00' .. '\\uDFFF' ) )
			int alt27=3;
			int LA27_0 = input.LA(1);
			if ( (LA27_0=='$'||(LA27_0 >= 'A' && LA27_0 <= 'Z')||LA27_0=='_'||(LA27_0 >= 'a' && LA27_0 <= 'z')) ) {
				alt27=1;
			}
			else if ( ((LA27_0 >= '\u0080' && LA27_0 <= '\uD7FF')||(LA27_0 >= '\uDC00' && LA27_0 <= '\uFFFF')) ) {
				alt27=2;
			}
			else if ( ((LA27_0 >= '\uD800' && LA27_0 <= '\uDBFF')) ) {
				alt27=3;
			}

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

			switch (alt27) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1379:4: ( 'a' .. 'z' | 'A' .. 'Z' | '$' | '_' )
					{
					if ( input.LA(1)=='$'||(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:1380:6: {...}?~ ( '\\u0000' .. '\\u007F' | '\\uD800' .. '\\uDBFF' )
					{
					if ( !((Character.isJavaIdentifierStart(input.LA(1)))) ) {
						throw new FailedPredicateException(input, "JavaLetter", "Character.isJavaIdentifierStart(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:1382:9: {...}? ( '\\uD800' .. '\\uDBFF' ) ( '\\uDC00' .. '\\uDFFF' )
					{
					if ( !((Character.isJavaIdentifierStart(Character.toCodePoint((char)input.LA(-1), (char)input.LA(1))))) ) {
						throw new FailedPredicateException(input, "JavaLetter", "Character.isJavaIdentifierStart(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
		}
	}
485623
@Override
    public void afterPropertiesSet() throws Exception {
        this.transactionTemplate = new TransactionTemplate(this.transactionManager);
        this.transactionTemplate.setPropagationBehavior(
                TransactionTemplate.PROPAGATION_REQUIRES_NEW);
        this.transactionTemplate.setReadOnly(true);
        this.transactionTemplate.afterPropertiesSet();

        this.runDatabaseTests();
        if (LOG.isDebugEnabled()) LOG.debug(this.toString());
    }
814548
@Override
    public void in() throws Exception {
        if (data == null) {
            throw new ComponentException("Not connected: " + toString());
        }
        Object val = data.getFieldValue();
        // fire only if there is a listener
        if (ens.shouldFire()) {
            DataflowEvent e = new DataflowEvent(ens.getController(), this, val);
////            DataflowEvent e = new DataflowEvent(ens.getController(), this, access.toObject());
            ens.fireIn(e);
//            // the value might be altered
            val = e.getValue();
        }

//        access.pass((Access) val);
        fa.setFieldValue(val);
    }
1235327
public static void main(String[] args)
            throws Exception
        {
        if (args.length < 3)
            {
            System.out.println("Usage: java com.seovic.coherence.loader.XmlToCoherence <xmlFile> <cacheName> <itemClass>");
            System.exit(0);
            }

        new XmlToCoherence(args[0], args[1], Class.forName(args[2])).load();
        }
156040
public static void main(String[] args) throws Exception {
		CWSTagger tag = new CWSTagger("./models/seg.m");	

		RLSeg rlseg = new RLSeg(tag,"./tmpdata/FNLPDATA/all.dict");

		tag.setDictionary(tempdict);

		System.out.println("\n处理文件：");
		String s4 = tag.tagFile("../example-data/data-tag.txt");
		System.out.println(s4);
		String[] toks = s4.split("\\s+");
		int newset = rlseg.update(toks);
		rlseg.close();

		tag.setDictionary(tempdict);

		System.out.println("\n处理文件：");
		String s = tag.tagFile("../example-data/data-tag.txt");
		System.out.println(s);


	}
1051646
public <E extends Exception> boolean allMatch(Try.BooleanPredicate<E> filter) throws E {
        return allMatch(0, size(), filter);
    }
1183692
public static void main(String[] args) throws Exception {

		final List<String> arguments = new ArrayList<String>(args.length);

		final Settings settings = new Settings();
		final PartialCmdLineParser parser = new PartialCmdLineParser(settings);
		int position = 0;

		while (position < args.length) {
			final int consumed = parser.parseArgument(args, position);
			if (consumed == 0) {
				arguments.add(args[position++]);
			} else {
				position += consumed;
			}
		}

		if (!arguments.contains(JsonixPlugin.OPTION)) {
			arguments.add(JsonixPlugin.OPTION);
		}

		if (!arguments.contains("-extension")) {
			arguments.add("-extension");
		}

		// TODO
		arguments.add("-disableXmlSecurity");
		// TODO
		System.setProperty("javax.xml.accessExternalSchema", "all");
		// TODO
		System.setProperty("javax.xml.accessExternalDTD", "all");

		File targetDirectory = settings.getTargetDirectory();

		if (targetDirectory == null) {
			targetDirectory = new File(".");
		}

		if (!targetDirectory.exists()) {
			targetDirectory.mkdirs();
		}

		arguments.add("-d");
		arguments.add(targetDirectory.getAbsolutePath());

		final Options options = new Options();

		options.parseArguments(arguments.toArray(new String[arguments.size()]));

		new JsonixMain(settings, options).execute();
	}
1097224
final public void NonLiteral() throws ParseException {
    if (jj_2_6(5)) {
      LambdaExpressionOrInvocation();
    } else {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case LPAREN:
        jj_consume_token(LPAREN);
        Expression();
        jj_consume_token(RPAREN);
        break;
      default:
        jj_la1[39] = jj_gen;
        if (jj_2_7(2147483647)) {
          Function();
        } else {
          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
          case IDENTIFIER:
            Identifier();
            break;
          default:
            jj_la1[40] = jj_gen;
            if (jj_2_8(3)) {
              SetData();
            } else {
              switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
              case LBRACK:
                ListData();
                break;
              case START_SET_OR_MAP:
                MapData();
                break;
              default:
                jj_la1[41] = jj_gen;
                jj_consume_token(-1);
                throw new ParseException();
              }
            }
          }
        }
      }
    }
  }
277224
public void execute() throws IOException {
        // collect types
        try {
            collectTypes();
        } catch (Exception e) {
            throw new QueryException(e);
        }

        // go through supertypes
        Set<Supertype> additions = Sets.newHashSet();
        for (Map.Entry<Class<?>, EntityType> entry : allTypes.entrySet()) {
            EntityType entityType = entry.getValue();
            if (entityType.getSuperType() != null && !allTypes.containsKey(entityType.getSuperType().getType().getJavaClass())) {
                additions.add(entityType.getSuperType());
            }
        }

        for (Supertype type : additions) {
            type.setEntityType(createEntityType(type.getType(), this.superTypes));
        }

        // merge supertype fields into subtypes
        Set<EntityType> handled = new HashSet<EntityType>();
        for (EntityType type : superTypes.values()) {
            addSupertypeFields(type, allTypes, handled);
        }
        for (EntityType type : entityTypes.values()) {
            addSupertypeFields(type, allTypes, handled);
        }
        for (EntityType type : embeddableTypes.values()) {
            addSupertypeFields(type, allTypes, handled);
        }

        // serialize them
        serialize(superTypes, supertypeSerializer);
        serialize(embeddableTypes, embeddableSerializer);
        serialize(entityTypes, entitySerializer);
    }
1033930
public final void mFULL() throws RecognitionException {
		try {
			int _type = FULL;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:30:6: ( 'full' )
			// hql.g:30:8: 'full'
			{
			match("full"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
1271573
public <T> T execute(Callable<T> statements) throws Exception
	{
		try (HibernateTransaction tx = start().withAutoRollback())
		{
			final T ret = statements.call();

			// Success, perform a TX commit
			tx.commit();

			return ret;
		}
	}
1077997
@Execute
    public void process() throws Exception {
        if (!concatOr(outPit == null, doReset)) {
            return;
        }
        checkNull(inElev);
        HashMap<String, Double> regionMap = CoverageUtilities.getRegionParamsFromGridCoverage(inElev);
        nCols = regionMap.get(CoverageUtilities.COLS).intValue();
        nRows = regionMap.get(CoverageUtilities.ROWS).intValue();
        xRes = regionMap.get(CoverageUtilities.XRES);
        yRes = regionMap.get(CoverageUtilities.YRES);

        elevationIter = CoverageUtilities.getRandomIterator(inElev);

        // output raster
        WritableRaster pitRaster = CoverageUtilities.createWritableRaster(nCols, nRows, null, null, null);
        pitIter = CoverageUtilities.getWritableRandomIterator(pitRaster);

        for( int i = 0; i < nRows; i++ ) {
            if (pm.isCanceled()) {
                return;
            }
            for( int j = 0; j < nCols; j++ ) {
                double value = elevationIter.getSampleDouble(j, i, 0);
                if (!isNovalue(value)) {
                    pitIter.setSample(j, i, 0, value);
                } else {
                    pitIter.setSample(j, i, 0, PITNOVALUE);
                }
            }
        }

        flood();
        if (pm.isCanceled()) {
            return;
        }

        for( int i = 0; i < nRows; i++ ) {
            if (pm.isCanceled()) {
                return;
            }
            for( int j = 0; j < nCols; j++ ) {
                if (dir[j][i] == 0) {
                    return;
                }
                double value = pitIter.getSampleDouble(j, i, 0);
                if (value == PITNOVALUE || isNovalue(value)) {
                    pitIter.setSample(j, i, 0, doubleNovalue);
                }
            }
        }
        pitIter.done();

        outPit = CoverageUtilities.buildCoverage("pitfiller", pitRaster, regionMap, inElev.getCoordinateReferenceSystem());
    }