code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { // Get the LabelService. LabelServiceInterface labelService = adManagerServices.get(session, LabelServiceInterface.class); // Create a competitive exclusion label. Label c...
class class_name[name] begin[{] method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session]] begin[{] local_variable[type[LabelServiceInterface], labelService] local_variable[type[Label], competitiveExclusionLabel] call[competitiveExclusi...
Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] operator[SEP] Keyword[throws] identifier[RemoteException] { identifier[LabelServiceInterface] identifier[labelService]...
private void createPreparedStatement(final String name, final String query, final int timeout, final boolean recovering) throws NameAlreadyExistsException, DatabaseEngineException { if (!recovering) { if (stmts.containsKey(name)) { throw new NameAlreadyExistsException(String.format(...
class class_name[name] begin[{] method[createPreparedStatement, return_type[void], modifier[private], parameter[name, query, timeout, recovering]] begin[{] if[member[.recovering]] begin[{] if[call[stmts.containsKey, parameter[member[.name]]]] begin[{] Thr...
Keyword[private] Keyword[void] identifier[createPreparedStatement] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[query] , Keyword[final] Keyword[int] identifier[timeout] , Keyword[final] Keyword[boolean] identifier[recovering] operator[SEP] Keyword[th...
public static List<CommercePriceList> findByUuid_C(String uuid, long companyId) { return getPersistence().findByUuid_C(uuid, companyId); }
class class_name[name] begin[{] method[findByUuid_C, return_type[type[List]], modifier[public static], parameter[uuid, companyId]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CommercePriceList] operator[>] identifier[findByUuid_C] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[...
@RunAsSystem public Group getGroup(String groupName) { Fetch roleFetch = new Fetch().field(RoleMetadata.NAME).field(RoleMetadata.LABEL); Fetch fetch = new Fetch() .field(GroupMetadata.ROLES, roleFetch) .field(GroupMetadata.NAME) .field(GroupMetadata.LABEL) ...
class class_name[name] begin[{] method[getGroup, return_type[type[Group]], modifier[public], parameter[groupName]] begin[{] local_variable[type[Fetch], roleFetch] local_variable[type[Fetch], fetch] local_variable[type[Group], group] if[binary_operation[member[.group], ==...
annotation[@] identifier[RunAsSystem] Keyword[public] identifier[Group] identifier[getGroup] operator[SEP] identifier[String] identifier[groupName] operator[SEP] { identifier[Fetch] identifier[roleFetch] operator[=] Keyword[new] identifier[Fetch] operator[SEP] operator[SEP] operator[SEP] identifier[field] operat...
public static boolean isOrSubtype(final Class<? extends Entity> descendant, final Class<? extends Entity> ancestor) { return ancestor.isAssignableFrom(descendant); }
class class_name[name] begin[{] method[isOrSubtype, return_type[type[boolean]], modifier[public static], parameter[descendant, ancestor]] begin[{] return[call[ancestor.isAssignableFrom, parameter[member[.descendant]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isOrSubtype] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Entity] operator[>] identifier[descendant] , Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Entity] operator[...
public static String getSerializedSchema(String gdatHeader) { /*Format : GDAT\nVERSION:4\nSCHEMALENGTH:123\n FTA {\n STREAM <name> {\n <list of fields>\n }\n <query text>\n } */ int startBracketIndex = gdatHeader.indexOf("{"); startBracketIndex...
class class_name[name] begin[{] method[getSerializedSchema, return_type[type[String]], modifier[public static], parameter[gdatHeader]] begin[{] local_variable[type[int], startBracketIndex] assign[member[.startBracketIndex], call[gdatHeader.indexOf, parameter[literal["{"], binary_operati...
Keyword[public] Keyword[static] identifier[String] identifier[getSerializedSchema] operator[SEP] identifier[String] identifier[gdatHeader] operator[SEP] { Keyword[int] identifier[startBracketIndex] operator[=] identifier[gdatHeader] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] op...
public FetchRet fetch(String url, String bucket, String key) throws QiniuException { String resource = UrlSafeBase64.encodeToString(url); String to = encodedEntry(bucket, key); String path = String.format("/fetch/%s/to/%s", resource, to); Response res = ioPost(bucket, path); if (...
class class_name[name] begin[{] method[fetch, return_type[type[FetchRet]], modifier[public], parameter[url, bucket, key]] begin[{] local_variable[type[String], resource] local_variable[type[String], to] local_variable[type[String], path] local_variable[type[Response], res] ...
Keyword[public] identifier[FetchRet] identifier[fetch] operator[SEP] identifier[String] identifier[url] , identifier[String] identifier[bucket] , identifier[String] identifier[key] operator[SEP] Keyword[throws] identifier[QiniuException] { identifier[String] identifier[resource] operator[=] identifier[UrlSafeB...
@CheckReturnValue @NonNull public final <R> ParallelFlowable<R> concatMap( @NonNull Function<? super T, ? extends Publisher<? extends R>> mapper, int prefetch) { ObjectHelper.requireNonNull(mapper, "mapper is null"); ObjectHelper.verifyPositive(prefetch, "prefetch...
class class_name[name] begin[{] method[concatMap, return_type[type[ParallelFlowable]], modifier[final public], parameter[mapper, prefetch]] begin[{] call[ObjectHelper.requireNonNull, parameter[member[.mapper], literal["mapper is null"]]] call[ObjectHelper.verifyPositive, paramet...
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[NonNull] Keyword[public] Keyword[final] operator[<] identifier[R] operator[>] identifier[ParallelFlowable] operator[<] identifier[R] operator[>] identifier[concatMap] operator[SEP] annotation[@] identifier[NonNull] identifier[Function] operator[<] oper...
public static String resolveFileName(final Part part) throws MessagingException { if (!(part instanceof MimeBodyPart)) { return part.getFileName(); } final String contentType = part.getContentType(); String ret; try { ret = MimeUtility.decodeText(part.getFileName()); } catch (final Exception ex) { ...
class class_name[name] begin[{] method[resolveFileName, return_type[type[String]], modifier[public static], parameter[part]] begin[{] if[binary_operation[member[.part], instanceof, type[MimeBodyPart]]] begin[{] return[call[part.getFileName, parameter[]]] else begin[{] None ...
Keyword[public] Keyword[static] identifier[String] identifier[resolveFileName] operator[SEP] Keyword[final] identifier[Part] identifier[part] operator[SEP] Keyword[throws] identifier[MessagingException] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[part] Keyword[instanceof] identifier[MimeBody...
private List<StatementGroup> copyStatementGroups(List<StatementGroup> statementGroups) { if (filter.excludeAllProperties()) { return Collections.emptyList(); } List<StatementGroup> result = new ArrayList<>(statementGroups.size()); for (StatementGroup statementGroup : statementGroups) { if (filter.include...
class class_name[name] begin[{] method[copyStatementGroups, return_type[type[List]], modifier[private], parameter[statementGroups]] begin[{] if[call[filter.excludeAllProperties, parameter[]]] begin[{] return[call[Collections.emptyList, parameter[]]] else begin[{] None ...
Keyword[private] identifier[List] operator[<] identifier[StatementGroup] operator[>] identifier[copyStatementGroups] operator[SEP] identifier[List] operator[<] identifier[StatementGroup] operator[>] identifier[statementGroups] operator[SEP] { Keyword[if] operator[SEP] identifier[filter] operator[SEP] identifier[...
@Override public AddRoleToDBClusterResult addRoleToDBCluster(AddRoleToDBClusterRequest request) { request = beforeClientExecution(request); return executeAddRoleToDBCluster(request); }
class class_name[name] begin[{] method[addRoleToDBCluster, return_type[type[AddRoleToDBClusterResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeAddRoleToDBCluster, parameter[me...
annotation[@] identifier[Override] Keyword[public] identifier[AddRoleToDBClusterResult] identifier[addRoleToDBCluster] operator[SEP] identifier[AddRoleToDBClusterRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operat...
public int getNumPoints() { if (isEmpty()) { return 0; } int total = 0; for (Polygon polygon : polygons) { total += polygon.getNumPoints(); } return total; }
class class_name[name] begin[{] method[getNumPoints, return_type[type[int]], modifier[public], parameter[]] begin[{] if[call[.isEmpty, parameter[]]] begin[{] return[literal[0]] else begin[{] None end[}] local_variable[type[int], total] ForStatement(bo...
Keyword[public] Keyword[int] identifier[getNumPoints] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[int] identifier[total] operator[=] Other[0] operator[SEP] Keyword...
public boolean getForecast(String LATITUDE, String LONGITUDE) { try { String reply = httpGET( urlBuilder(LATITUDE, LONGITUDE) ); if(reply == null) return false; this.forecast = Json.parse(reply).asObject(); //this.forecast = JsonObject.readFrom(reply); } catch (NullPointerException e) { System....
class class_name[name] begin[{] method[getForecast, return_type[type[boolean]], modifier[public], parameter[LATITUDE, LONGITUDE]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation...
Keyword[public] Keyword[boolean] identifier[getForecast] operator[SEP] identifier[String] identifier[LATITUDE] , identifier[String] identifier[LONGITUDE] operator[SEP] { Keyword[try] { identifier[String] identifier[reply] operator[=] identifier[httpGET] operator[SEP] identifier[urlBuilder] operator[S...
public java.util.Map<String, String> getMonday() { if (monday == null) { monday = new com.amazonaws.internal.SdkInternalMap<String, String>(); } return monday; }
class class_name[name] begin[{] method[getMonday, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.monday], ==, literal[null]]] begin[{] assign[member[.monday], ClassCreator(arguments=[], body=None, constructor_type_arguments=N...
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getMonday] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[monday] operator[==] Other[null] operator[SEP] { ident...
public List<File> getOnApp(int appId, Integer limit, Integer offset) { WebResource resource = getResourceFactory().getApiResource( "/file/app/" + appId + "/"); if (limit != null) { resource = resource.queryParam("limit", limit.toString()); } if (offset != null) { resource = resource.queryParam("offset...
class class_name[name] begin[{] method[getOnApp, return_type[type[List]], modifier[public], parameter[appId, limit, offset]] begin[{] local_variable[type[WebResource], resource] if[binary_operation[member[.limit], !=, literal[null]]] begin[{] assign[member[.resou...
Keyword[public] identifier[List] operator[<] identifier[File] operator[>] identifier[getOnApp] operator[SEP] Keyword[int] identifier[appId] , identifier[Integer] identifier[limit] , identifier[Integer] identifier[offset] operator[SEP] { identifier[WebResource] identifier[resource] operator[=] identifier[getRes...
public static CreateResult create(String accessToken, CashCard cashCard) { Create<CashCard> card = new Create<CashCard>(); card.setCard(cashCard); return create(accessToken, card); }
class class_name[name] begin[{] method[create, return_type[type[CreateResult]], modifier[public static], parameter[accessToken, cashCard]] begin[{] local_variable[type[Create], card] call[card.setCard, parameter[member[.cashCard]]] return[call[.create, parameter[member[.accessTo...
Keyword[public] Keyword[static] identifier[CreateResult] identifier[create] operator[SEP] identifier[String] identifier[accessToken] , identifier[CashCard] identifier[cashCard] operator[SEP] { identifier[Create] operator[<] identifier[CashCard] operator[>] identifier[card] operator[=] Keyword[new] identifier[Cr...
public EClass getIfcAddress() { if (ifcAddressEClass == null) { ifcAddressEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(6); } return ifcAddressEClass; }
class class_name[name] begin[{] method[getIfcAddress, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcAddressEClass], ==, literal[null]]] begin[{] assign[member[.ifcAddressEClass], Cast(expression=MethodInvocation(argumen...
Keyword[public] identifier[EClass] identifier[getIfcAddress] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcAddressEClass] operator[==] Other[null] operator[SEP] { identifier[ifcAddressEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operat...
@SuppressWarnings("unchecked") static Class<?> getParameterType(Object object, Class<?> expectedType) { Collection<Class<?>> extendedAndImplementedTypes = getExtendedAndImplementedTypes(object.getClass(), new LinkedList<Class<?>>()); for (Class<?> type : extendedAndImplemented...
class class_name[name] begin[{] method[getParameterType, return_type[type[Class]], modifier[static], parameter[object, expectedType]] begin[{] local_variable[type[Collection], extendedAndImplementedTypes] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotati...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[getParameterType] operator[SEP] identifier[Object] identifier[object] , identifier[Class] operator[<] operator[?] operator[>] identifier[expectedType] ...
public DayPartitionRule build() { final Map<Weekday, List<ChronoInterval<PlainTime>>> wRules = new EnumMap<>(this.weekdayRules); final Map<PlainDate, List<ChronoInterval<PlainTime>>> eRules = new HashMap<>(this.exceptionRules); final Set<PlainDate> invalid = new HashSet<>(this.exclusions); ...
class class_name[name] begin[{] method[build, return_type[type[DayPartitionRule]], modifier[public], parameter[]] begin[{] local_variable[type[Map], wRules] local_variable[type[Map], eRules] local_variable[type[Set], invalid] return[ClassCreator(arguments=[], body=[MethodDeclara...
Keyword[public] identifier[DayPartitionRule] identifier[build] operator[SEP] operator[SEP] { Keyword[final] identifier[Map] operator[<] identifier[Weekday] , identifier[List] operator[<] identifier[ChronoInterval] operator[<] identifier[PlainTime] operator[>] operator[>] operator[>] identifier[wRules] operator[...
public DescribeSpotPriceHistoryResult withSpotPriceHistory(SpotPrice... spotPriceHistory) { if (this.spotPriceHistory == null) { setSpotPriceHistory(new com.amazonaws.internal.SdkInternalList<SpotPrice>(spotPriceHistory.length)); } for (SpotPrice ele : spotPriceHistory) { ...
class class_name[name] begin[{] method[withSpotPriceHistory, return_type[type[DescribeSpotPriceHistoryResult]], modifier[public], parameter[spotPriceHistory]] begin[{] if[binary_operation[THIS[member[None.spotPriceHistory]], ==, literal[null]]] begin[{] call[.setSpotPric...
Keyword[public] identifier[DescribeSpotPriceHistoryResult] identifier[withSpotPriceHistory] operator[SEP] identifier[SpotPrice] operator[...] identifier[spotPriceHistory] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[spotPriceHistory] operator[==] Other[null] operator[SEP] { ...
Expression genCodeForParamAccess(String paramName, VarDefn varDefn) { Expression source = OPT_DATA; if (varDefn.isInjected()) { // Special case for csp_nonce. It is created by the compiler itself, and users should not need // to set it. So, instead of generating opt_ij_data.csp_nonce, we generate op...
class class_name[name] begin[{] method[genCodeForParamAccess, return_type[type[Expression]], modifier[default], parameter[paramName, varDefn]] begin[{] local_variable[type[Expression], source] if[call[varDefn.isInjected, parameter[]]] begin[{] if[call[paramName.e...
identifier[Expression] identifier[genCodeForParamAccess] operator[SEP] identifier[String] identifier[paramName] , identifier[VarDefn] identifier[varDefn] operator[SEP] { identifier[Expression] identifier[source] operator[=] identifier[OPT_DATA] operator[SEP] Keyword[if] operator[SEP] identifier[varDefn] operato...
private static boolean checkAlreadyCompactedBasedOnCompletionFile(FileSystem fs, Dataset dataset) { Path filePath = new Path(dataset.outputPath(), MRCompactor.COMPACTION_COMPLETE_FILE_NAME); try { return fs.exists(filePath); } catch (IOException e) { LOG.error("Failed to verify the existence of ...
class class_name[name] begin[{] method[checkAlreadyCompactedBasedOnCompletionFile, return_type[type[boolean]], modifier[private static], parameter[fs, dataset]] begin[{] local_variable[type[Path], filePath] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReferen...
Keyword[private] Keyword[static] Keyword[boolean] identifier[checkAlreadyCompactedBasedOnCompletionFile] operator[SEP] identifier[FileSystem] identifier[fs] , identifier[Dataset] identifier[dataset] operator[SEP] { identifier[Path] identifier[filePath] operator[=] Keyword[new] identifier[Path] operator[SEP] ide...
@SuppressWarnings("unchecked") public ManagedUser getManagedUser(final String username) { final Query query = pm.newQuery(ManagedUser.class, "username == :username"); final List<ManagedUser> result = (List<ManagedUser>) query.execute(username); return Collections.isEmpty(result) ? null : res...
class class_name[name] begin[{] method[getManagedUser, return_type[type[ManagedUser]], modifier[public], parameter[username]] begin[{] local_variable[type[Query], query] local_variable[type[List], result] return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(mem...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[ManagedUser] identifier[getManagedUser] operator[SEP] Keyword[final] identifier[String] identifier[username] operator[SEP] { Keyword[final] identifier[Query] identifier[query] operator[=] identifier[...
public Object remove(int index) { if (index < 0 || index >= values.size()) { return null; } return values.remove(index); }
class class_name[name] begin[{] method[remove, return_type[type[Object]], modifier[public], parameter[index]] begin[{] if[binary_operation[binary_operation[member[.index], <, literal[0]], ||, binary_operation[member[.index], >=, call[values.size, parameter[]]]]] begin[{] return[lite...
Keyword[public] identifier[Object] identifier[remove] operator[SEP] Keyword[int] identifier[index] operator[SEP] { Keyword[if] operator[SEP] identifier[index] operator[<] Other[0] operator[||] identifier[index] operator[>=] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SE...
public static synchronized CarbonManager getInstanceFor(XMPPConnection connection) { CarbonManager carbonManager = INSTANCES.get(connection); if (carbonManager == null) { carbonManager = new CarbonManager(connection); INSTANCES.put(connection, carbonManager); } ...
class class_name[name] begin[{] method[getInstanceFor, return_type[type[CarbonManager]], modifier[synchronized public static], parameter[connection]] begin[{] local_variable[type[CarbonManager], carbonManager] if[binary_operation[member[.carbonManager], ==, literal[null]]] begin[{] ...
Keyword[public] Keyword[static] Keyword[synchronized] identifier[CarbonManager] identifier[getInstanceFor] operator[SEP] identifier[XMPPConnection] identifier[connection] operator[SEP] { identifier[CarbonManager] identifier[carbonManager] operator[=] identifier[INSTANCES] operator[SEP] identifier[get] operator[S...
public PagedResult<Sight> listSights(PaginationParameters paging, Date modifiedSince) throws SmartsheetException { String path = "sights"; HashMap<String, Object> parameters = new HashMap<String, Object>(); if (paging != null) { parameters = paging.toHashMap(); } if ...
class class_name[name] begin[{] method[listSights, return_type[type[PagedResult]], modifier[public], parameter[paging, modifiedSince]] begin[{] local_variable[type[String], path] local_variable[type[HashMap], parameters] if[binary_operation[member[.paging], !=, literal[null]]] b...
Keyword[public] identifier[PagedResult] operator[<] identifier[Sight] operator[>] identifier[listSights] operator[SEP] identifier[PaginationParameters] identifier[paging] , identifier[Date] identifier[modifiedSince] operator[SEP] Keyword[throws] identifier[SmartsheetException] { identifier[String] identifier[pa...
public double doubleValue(){ if(intCompact != INFLATED) { if (scale == 0) { return (double)intCompact; } else { /* * If both intCompact and the scale can be exactly * represented as double values, perform a single ...
class class_name[name] begin[{] method[doubleValue, return_type[type[double]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.intCompact], !=, member[.INFLATED]]] begin[{] if[binary_operation[member[.scale], ==, literal[0]]] begin[{] ...
Keyword[public] Keyword[double] identifier[doubleValue] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[intCompact] operator[!=] identifier[INFLATED] operator[SEP] { Keyword[if] operator[SEP] identifier[scale] operator[==] Other[0] operator[SEP] { Keyword[return] oper...
private void createReflections(String[] scanPackages) { if (scanPackages.length < 1) { LOGGER.warn("No package defined in configuration (scanPackages)!"); return; } ConfigurationBuilder configurationBuilder = new ConfigurationBuilder(); FilterBuilder filterBuilder...
class class_name[name] begin[{] method[createReflections, return_type[void], modifier[private], parameter[scanPackages]] begin[{] if[binary_operation[member[scanPackages.length], <, literal[1]]] begin[{] call[LOGGER.warn, parameter[literal["No package defined in configur...
Keyword[private] Keyword[void] identifier[createReflections] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[scanPackages] operator[SEP] { Keyword[if] operator[SEP] identifier[scanPackages] operator[SEP] identifier[length] operator[<] Other[1] operator[SEP] { identifier[LOGGER]...
@Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { LocaleContextHolder.setLocale(request.getLocale()); response = new OutputAwareHttpServletResponse(response); boole...
class class_name[name] begin[{] method[doFilterInternal, return_type[void], modifier[protected], parameter[request, response, filterChain]] begin[{] call[LocaleContextHolder.setLocale, parameter[call[request.getLocale, parameter[]]]] assign[member[.response], ClassCreator(argume...
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[doFilterInternal] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , identifier[FilterChain] identifier[filterChain] operator[SEP] Keyword[throws] identifier[ServletExc...
public String mandatoryParam(String key) { String value = param(key); checkArgument(value != null && !value.isEmpty(), format(MSG_PARAMETER_MISSING, key)); return value; }
class class_name[name] begin[{] method[mandatoryParam, return_type[type[String]], modifier[public], parameter[key]] begin[{] local_variable[type[String], value] call[.checkArgument, parameter[binary_operation[binary_operation[member[.value], !=, literal[null]], &&, call[value.isEmpty, p...
Keyword[public] identifier[String] identifier[mandatoryParam] operator[SEP] identifier[String] identifier[key] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[param] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[checkArgument] operator[SEP] identifier[value] ope...
public void marshall(ListVoiceConnectorTerminationCredentialsRequest listVoiceConnectorTerminationCredentialsRequest, ProtocolMarshaller protocolMarshaller) { if (listVoiceConnectorTerminationCredentialsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); ...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[listVoiceConnectorTerminationCredentialsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.listVoiceConnectorTerminationCredentialsRequest], ==, literal[null]]] begin[{] T...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ListVoiceConnectorTerminationCredentialsRequest] identifier[listVoiceConnectorTerminationCredentialsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[listVoiceC...
public String toCamelUpperCase(String inputParam) { if(inputParam == null) { return null; } if(inputParam.isEmpty()) { return EMPTY; } char[] original = inputParam.toCharArray(); StringBuilder titleCase = new StringBuilder(Character.toString( Character.toLowerCase(original[0]))); ...
class class_name[name] begin[{] method[toCamelUpperCase, return_type[type[String]], modifier[public], parameter[inputParam]] begin[{] if[binary_operation[member[.inputParam], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] ...
Keyword[public] identifier[String] identifier[toCamelUpperCase] operator[SEP] identifier[String] identifier[inputParam] operator[SEP] { Keyword[if] operator[SEP] identifier[inputParam] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operat...
public static String toColorWithAlpha(String red, String green, String blue, String alpha) { validateHexSingle(red); validateHexSingle(green); validateHexSingle(blue); StringBuilder color = new StringBuilder("#"); if (alpha != null) { color.append(expandShorthandHexSingle(alpha)); } color.append(exp...
class class_name[name] begin[{] method[toColorWithAlpha, return_type[type[String]], modifier[public static], parameter[red, green, blue, alpha]] begin[{] call[.validateHexSingle, parameter[member[.red]]] call[.validateHexSingle, parameter[member[.green]]] call[.v...
Keyword[public] Keyword[static] identifier[String] identifier[toColorWithAlpha] operator[SEP] identifier[String] identifier[red] , identifier[String] identifier[green] , identifier[String] identifier[blue] , identifier[String] identifier[alpha] operator[SEP] { identifier[validateHexSingle] operator[SEP] ident...
public Dataset createDataset(String datasetName) { // [START bigquery_create_dataset] Dataset dataset = null; DatasetInfo datasetInfo = DatasetInfo.newBuilder(datasetName).build(); try { // the dataset was created dataset = bigquery.create(datasetInfo); } catch (BigQueryException e) { ...
class class_name[name] begin[{] method[createDataset, return_type[type[Dataset]], modifier[public], parameter[datasetName]] begin[{] local_variable[type[Dataset], dataset] local_variable[type[DatasetInfo], datasetInfo] TryStatement(block=[StatementExpression(expression=Assignment(expres...
Keyword[public] identifier[Dataset] identifier[createDataset] operator[SEP] identifier[String] identifier[datasetName] operator[SEP] { identifier[Dataset] identifier[dataset] operator[=] Other[null] operator[SEP] identifier[DatasetInfo] identifier[datasetInfo] operator[=] identifier[DatasetInfo] operator[SEP] id...
boolean addNode(Block b, DatanodeDescriptor node, int replication) { // insert into the map if not there yet BlockInfo info = checkBlockInfo(b, replication); // add block to the data-node list and the node to the block info return node.addBlock(info); }
class class_name[name] begin[{] method[addNode, return_type[type[boolean]], modifier[default], parameter[b, node, replication]] begin[{] local_variable[type[BlockInfo], info] return[call[node.addBlock, parameter[member[.info]]]] end[}] END[}]
Keyword[boolean] identifier[addNode] operator[SEP] identifier[Block] identifier[b] , identifier[DatanodeDescriptor] identifier[node] , Keyword[int] identifier[replication] operator[SEP] { identifier[BlockInfo] identifier[info] operator[=] identifier[checkBlockInfo] operator[SEP] identifier[b] , identifier[rep...
public Double isValidSum(IMolecularFormula formula) { double result = 1.0; IMolecularFormula formulaWith = isValid(formula); Map<Object, Object> properties = formulaWith.getProperties(); Iterator<IRule> iterRules = rules.iterator(); while (iterRules.hasNext()) { res...
class class_name[name] begin[{] method[isValidSum, return_type[type[Double]], modifier[public], parameter[formula]] begin[{] local_variable[type[double], result] local_variable[type[IMolecularFormula], formulaWith] local_variable[type[Map], properties] local_variable[type[Iterat...
Keyword[public] identifier[Double] identifier[isValidSum] operator[SEP] identifier[IMolecularFormula] identifier[formula] operator[SEP] { Keyword[double] identifier[result] operator[=] literal[Float] operator[SEP] identifier[IMolecularFormula] identifier[formulaWith] operator[=] identifier[isValid] operator[SEP]...
private String promptForText(ConsoleWrapper stdin, PrintStream stdout, String enterText, String reenterText, String readError, String entriesDidNotMatch) { String read1 = stdin.readMaskedText(getMessage(enterText) + " "); String read2 = s...
class class_name[name] begin[{] method[promptForText, return_type[type[String]], modifier[private], parameter[stdin, stdout, enterText, reenterText, readError, entriesDidNotMatch]] begin[{] local_variable[type[String], read1] local_variable[type[String], read2] if[binary_operati...
Keyword[private] identifier[String] identifier[promptForText] operator[SEP] identifier[ConsoleWrapper] identifier[stdin] , identifier[PrintStream] identifier[stdout] , identifier[String] identifier[enterText] , identifier[String] identifier[reenterText] , identifier[String] identifier[readError] , identifier[Strin...
public String convertIfcStackTerminalTypeEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertIfcStackTerminalTypeEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_opera...
Keyword[public] identifier[String] identifier[convertIfcStackTerminalTypeEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] { Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] ...
public ServiceFuture<FrontendIPConfigurationInner> getAsync(String resourceGroupName, String loadBalancerName, String frontendIPConfigurationName, final ServiceCallback<FrontendIPConfigurationInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, loadBalancerN...
class class_name[name] begin[{] method[getAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, loadBalancerName, frontendIPConfigurationName, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.getWithServiceResponseAsync, parameter[memb...
Keyword[public] identifier[ServiceFuture] operator[<] identifier[FrontendIPConfigurationInner] operator[>] identifier[getAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[loadBalancerName] , identifier[String] identifier[frontendIPConfigurationName] , Keyword[final...
public void setWorkDir(String dir) throws IOException { File workDir = new File(dir); if (!workDir.exists() || !workDir.canWrite() || !workDir.canRead()) { throw new IOException("Cannot access directory "+dir); } _workDir = workDir; }
class class_name[name] begin[{] method[setWorkDir, return_type[void], modifier[public], parameter[dir]] begin[{] local_variable[type[File], workDir] if[binary_operation[binary_operation[call[workDir.exists, parameter[]], ||, call[workDir.canWrite, parameter[]]], ||, call[workDir.canRead...
Keyword[public] Keyword[void] identifier[setWorkDir] operator[SEP] identifier[String] identifier[dir] operator[SEP] Keyword[throws] identifier[IOException] { identifier[File] identifier[workDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[dir] operator[SEP] operator[SEP] Keyword[if] operat...
protected void mergeError(Object oldValue, Object newValue, boolean xml, String elementName, boolean property, String key) throws InjectionConfigurationException { ...
class class_name[name] begin[{] method[mergeError, return_type[void], modifier[protected], parameter[oldValue, newValue, xml, elementName, property, key]] begin[{] local_variable[type[JNDIEnvironmentRefType], refType] local_variable[type[String], component] local_variable[type[String], ...
Keyword[protected] Keyword[void] identifier[mergeError] operator[SEP] identifier[Object] identifier[oldValue] , identifier[Object] identifier[newValue] , Keyword[boolean] identifier[xml] , identifier[String] identifier[elementName] , Keyword[boolean] identifier[property] , identifier[String] identifier[key] operat...
protected void setTransferAction(CmsListColumnDefinition transferCol) { CmsListDirectAction transferAction = new CmsListDirectAction(LIST_ACTION_TRANSFER); transferAction.setName(Messages.get().container(Messages.GUI_GROUPS_TRANSFER_LIST_ACTION_TRANSFER_NAME_0)); transferAction.setHelpText(Mess...
class class_name[name] begin[{] method[setTransferAction, return_type[void], modifier[protected], parameter[transferCol]] begin[{] local_variable[type[CmsListDirectAction], transferAction] call[transferAction.setName, parameter[call[Messages.get, parameter[]]]] call[tran...
Keyword[protected] Keyword[void] identifier[setTransferAction] operator[SEP] identifier[CmsListColumnDefinition] identifier[transferCol] operator[SEP] { identifier[CmsListDirectAction] identifier[transferAction] operator[=] Keyword[new] identifier[CmsListDirectAction] operator[SEP] identifier[LIST_ACTION_TRANSFE...
public static boolean supports(String mediaType, ResultType expectedType) { if (mediaType == null) return true; // Assume the server will choose a reasonable media type. ResponseFormat format = mimeFormats.get(stripParams(mediaType)); return (format != null && (expectedType == null || format.resultTypes.co...
class class_name[name] begin[{] method[supports, return_type[type[boolean]], modifier[public static], parameter[mediaType, expectedType]] begin[{] if[binary_operation[member[.mediaType], ==, literal[null]]] begin[{] return[literal[true]] else begin[{] None end[}] local_v...
Keyword[public] Keyword[static] Keyword[boolean] identifier[supports] operator[SEP] identifier[String] identifier[mediaType] , identifier[ResultType] identifier[expectedType] operator[SEP] { Keyword[if] operator[SEP] identifier[mediaType] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] o...
protected static int obtainIntConfigParameter(MessageStoreImpl msi, String parameterName, String defaultValue, int minValue, int maxValue) { int value = Integer.parseInt(defaultValue); if (msi != null) { String strValue = msi.getProperty(parameterName, defaultValue); ...
class class_name[name] begin[{] method[obtainIntConfigParameter, return_type[type[int]], modifier[static protected], parameter[msi, parameterName, defaultValue, minValue, maxValue]] begin[{] local_variable[type[int], value] if[binary_operation[member[.msi], !=, literal[null]]] begin[{] ...
Keyword[protected] Keyword[static] Keyword[int] identifier[obtainIntConfigParameter] operator[SEP] identifier[MessageStoreImpl] identifier[msi] , identifier[String] identifier[parameterName] , identifier[String] identifier[defaultValue] , Keyword[int] identifier[minValue] , Keyword[int] identifier[maxValue] operato...
public Destination getDestination(String destName) throws MessagingException { Destination destination = null; JMSDestination jmsDest = getJMSDestination(destName); if(jmsDest != null) { destination = jmsDest.destination; } return destination; }
class class_name[name] begin[{] method[getDestination, return_type[type[Destination]], modifier[public], parameter[destName]] begin[{] local_variable[type[Destination], destination] local_variable[type[JMSDestination], jmsDest] if[binary_operation[member[.jmsDest], !=, literal[n...
Keyword[public] identifier[Destination] identifier[getDestination] operator[SEP] identifier[String] identifier[destName] operator[SEP] Keyword[throws] identifier[MessagingException] { identifier[Destination] identifier[destination] operator[=] Other[null] operator[SEP] identifier[JMSDestination] identifier[jmsDe...
@Override public boolean check(Arg pArg) { if (pArg.isTypeAllowed()) { // Its allowed in general, so we only need to check // the denied section, whether its forbidded return deny == null || !matches(deny, pArg); } else { // Its forbidden by default, s...
class class_name[name] begin[{] method[check, return_type[type[boolean]], modifier[public], parameter[pArg]] begin[{] if[call[pArg.isTypeAllowed, parameter[]]] begin[{] return[binary_operation[binary_operation[member[.deny], ==, literal[null]], ||, call[.matches, parameter[member[.d...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[check] operator[SEP] identifier[Arg] identifier[pArg] operator[SEP] { Keyword[if] operator[SEP] identifier[pArg] operator[SEP] identifier[isTypeAllowed] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier...
public static void main(String[] args) throws Exception { BinaryProblem problem = new OneMax(1024) ; MutationOperator<BinarySolution> mutationOperator = new BitFlipMutation(1.0 / problem.getNumberOfBits(0)) ; int improvementRounds = 10000 ; Comparator<BinarySolution> comparator = new Dominanc...
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] local_variable[type[BinaryProblem], problem] local_variable[type[MutationOperator], mutationOperator] local_variable[type[int], improvementRounds] local_variable[ty...
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] { identifier[BinaryProblem] identifier[problem] operator[=] Keyword[new] identifier[OneMax] operator[SEP] Other[1024] op...
public void marshall(UpdateCACertificateRequest updateCACertificateRequest, ProtocolMarshaller protocolMarshaller) { if (updateCACertificateRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(u...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[updateCACertificateRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.updateCACertificateRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(argu...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UpdateCACertificateRequest] identifier[updateCACertificateRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[updateCACertificateRequest] operator[==] Other[null]...
public Point2D getStartAdjusted() { final Point2D viewportLoc = new Point2D(getDragStartX(), getDragStartY()); m_vtog.transform(viewportLoc, viewportLoc); return viewportLoc; }
class class_name[name] begin[{] method[getStartAdjusted, return_type[type[Point2D]], modifier[public], parameter[]] begin[{] local_variable[type[Point2D], viewportLoc] call[m_vtog.transform, parameter[member[.viewportLoc], member[.viewportLoc]]] return[member[.viewportLoc]] ...
Keyword[public] identifier[Point2D] identifier[getStartAdjusted] operator[SEP] operator[SEP] { Keyword[final] identifier[Point2D] identifier[viewportLoc] operator[=] Keyword[new] identifier[Point2D] operator[SEP] identifier[getDragStartX] operator[SEP] operator[SEP] , identifier[getDragStartY] operator[SEP] ope...
public static <S> List<Class<? extends S>> load(Class<S> service, ClassLoader loader) { if (loader == null) { loader = Thread.currentThread().getContextClassLoader(); } List<Class<? extends S>> services = new ArrayList<>(); try { Enumeration<URL> e = l...
class class_name[name] begin[{] method[load, return_type[type[List]], modifier[public static], parameter[service, loader]] begin[{] if[binary_operation[member[.loader], ==, literal[null]]] begin[{] assign[member[.loader], call[Thread.currentThread, parameter[]]] ...
Keyword[public] Keyword[static] operator[<] identifier[S] operator[>] identifier[List] operator[<] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[S] operator[>] operator[>] identifier[load] operator[SEP] identifier[Class] operator[<] identifier[S] operator[>] identifier[service] , identifier[Cla...
public static boolean isDepthRenderable(final JCGLTextureFormat f) { switch (f) { case TEXTURE_FORMAT_DEPTH_16_2BPP: case TEXTURE_FORMAT_DEPTH_24_4BPP: case TEXTURE_FORMAT_DEPTH_24_STENCIL_8_4BPP: case TEXTURE_FORMAT_DEPTH_32F_4BPP: return true; case TEXTURE_FORMAT_R_16_2BPP:...
class class_name[name] begin[{] method[isDepthRenderable, return_type[type[boolean]], modifier[public static], parameter[f]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['TEXTURE_FORMAT_DEPTH_16_2BPP', 'TEXTURE_FORMAT_DEPTH_24_4BPP', 'TEXTURE_FORMAT_DEPTH_24_STENCIL_8_4BPP', 'TEXTURE_FORMA...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isDepthRenderable] operator[SEP] Keyword[final] identifier[JCGLTextureFormat] identifier[f] operator[SEP] { Keyword[switch] operator[SEP] identifier[f] operator[SEP] { Keyword[case] identifier[TEXTURE_FORMAT_DEPTH_16_2BPP] operator[:] Keywor...
Delta newDropTable() { Delta storageDelta = Deltas.mapBuilder() .put(StorageState.DROPPED.getMarkerAttribute().key(), now()) .build(); MapDeltaBuilder storageMapDelta = Deltas.mapBuilder(); if (_master != null) { for (Storage storage : _master.getPrim...
class class_name[name] begin[{] method[newDropTable, return_type[type[Delta]], modifier[default], parameter[]] begin[{] local_variable[type[Delta], storageDelta] local_variable[type[MapDeltaBuilder], storageMapDelta] if[binary_operation[member[._master], !=, literal[null]]] begi...
identifier[Delta] identifier[newDropTable] operator[SEP] operator[SEP] { identifier[Delta] identifier[storageDelta] operator[=] identifier[Deltas] operator[SEP] identifier[mapBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[StorageState] operator[SEP] identifier[DROPPED...
public static void setPreferredRoadBorderSize(Integer size) { final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { if (size == null || size.intValue() == DEFAULT_BORDER_SIZE) { prefs.remove("ROAD_BORDER_SIZE"); //$NON-NLS-1$ } else { prefs.put...
class class_name[name] begin[{] method[setPreferredRoadBorderSize, return_type[void], modifier[public static], parameter[size]] begin[{] local_variable[type[Preferences], prefs] if[binary_operation[member[.prefs], !=, literal[null]]] begin[{] if[binary_operation[...
Keyword[public] Keyword[static] Keyword[void] identifier[setPreferredRoadBorderSize] operator[SEP] identifier[Integer] identifier[size] operator[SEP] { Keyword[final] identifier[Preferences] identifier[prefs] operator[=] identifier[Preferences] operator[SEP] identifier[userNodeForPackage] operator[SEP] identifie...
@Bean @ConditionalOnProperty(prefix = JavaMelodyConfigurationProperties.PREFIX, name = "scheduled-monitoring-enabled", matchIfMissing = true) @ConditionalOnMissingBean(DefaultAdvisorAutoProxyCreator.class) public MonitoringSpringAdvisor monitoringSpringScheduledAdvisor() { // scheduled-monitoring-enabled was false...
class class_name[name] begin[{] method[monitoringSpringScheduledAdvisor, return_type[type[MonitoringSpringAdvisor]], modifier[public], parameter[]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=No...
annotation[@] identifier[Bean] annotation[@] identifier[ConditionalOnProperty] operator[SEP] identifier[prefix] operator[=] identifier[JavaMelodyConfigurationProperties] operator[SEP] identifier[PREFIX] , identifier[name] operator[=] literal[String] , identifier[matchIfMissing] operator[=] literal[boolean] operator[S...
@Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { Cursor result = null; if (!controller.hasPreinitialized()) { throw new IllegalStateException("Controller has not been initialized."); } int patternC...
class class_name[name] begin[{] method[query, return_type[type[Cursor]], modifier[public], parameter[uri, projection, selection, selectionArgs, sortOrder]] begin[{] local_variable[type[Cursor], result] if[call[controller.hasPreinitialized, parameter[]]] begin[{] ThrowStateme...
annotation[@] identifier[Override] Keyword[public] identifier[Cursor] identifier[query] operator[SEP] identifier[Uri] identifier[uri] , identifier[String] operator[SEP] operator[SEP] identifier[projection] , identifier[String] identifier[selection] , identifier[String] operator[SEP] operator[SEP] identifier[selectio...
private void executeScript(String script) { try { final StatementSplitter statementSplitter = new StatementSplitterResolver(scriptConfigurationInstance.get()).resolve(); final ScriptExecutor scriptExecutor = new ScriptExecutor(databaseConnection.get().getC...
class class_name[name] begin[{] method[executeScript, return_type[void], modifier[private], parameter[script]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=g...
Keyword[private] Keyword[void] identifier[executeScript] operator[SEP] identifier[String] identifier[script] operator[SEP] { Keyword[try] { Keyword[final] identifier[StatementSplitter] identifier[statementSplitter] operator[=] Keyword[new] identifier[StatementSplitterResolver] operator[SEP] identifier...
public static Object findByTextIgnoreCase(Collection<?> aCollection, String aText) { if (aText == null) throw new RequiredException("aName in Organizer.findIgnoreCase"); if (aCollection == null) throw new RequiredException( "aCollection in Organizer.findIgnoreCase"); Object element = null; ...
class class_name[name] begin[{] method[findByTextIgnoreCase, return_type[type[Object]], modifier[public static], parameter[aCollection, aText]] begin[{] if[binary_operation[member[.aText], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[...
Keyword[public] Keyword[static] identifier[Object] identifier[findByTextIgnoreCase] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] identifier[aCollection] , identifier[String] identifier[aText] operator[SEP] { Keyword[if] operator[SEP] identifier[aText] operator[==] Other[null] operato...
public INDArray inferVector(String text, double learningRate, double minLearningRate, int iterations) { if (tokenizerFactory == null) throw new IllegalStateException("TokenizerFactory should be defined, prior to predict() call"); if (this.vocab == null || this.vocab.numWords() == 0) ...
class class_name[name] begin[{] method[inferVector, return_type[type[INDArray]], modifier[public], parameter[text, learningRate, minLearningRate, iterations]] begin[{] if[binary_operation[member[.tokenizerFactory], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[L...
Keyword[public] identifier[INDArray] identifier[inferVector] operator[SEP] identifier[String] identifier[text] , Keyword[double] identifier[learningRate] , Keyword[double] identifier[minLearningRate] , Keyword[int] identifier[iterations] operator[SEP] { Keyword[if] operator[SEP] identifier[tokenizerFactory] o...
public ScatterPlot points(double[][] data, char legend, Color color) { return points(null, data, legend, color); }
class class_name[name] begin[{] method[points, return_type[type[ScatterPlot]], modifier[public], parameter[data, legend, color]] begin[{] return[call[.points, parameter[literal[null], member[.data], member[.legend], member[.color]]]] end[}] END[}]
Keyword[public] identifier[ScatterPlot] identifier[points] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[data] , Keyword[char] identifier[legend] , identifier[Color] identifier[color] operator[SEP] { Keyword[return] identifier[points] operator[SEP] Other[null]...
private void write(MultiPoint points, JsonGenerator gen) throws IOException { gen.writeStringField("type", "MultiPoint"); gen.writeFieldName("coordinates"); writeCoordinates(points.getCoordinates(), gen); }
class class_name[name] begin[{] method[write, return_type[void], modifier[private], parameter[points, gen]] begin[{] call[gen.writeStringField, parameter[literal["type"], literal["MultiPoint"]]] call[gen.writeFieldName, parameter[literal["coordinates"]]] call[.wr...
Keyword[private] Keyword[void] identifier[write] operator[SEP] identifier[MultiPoint] identifier[points] , identifier[JsonGenerator] identifier[gen] operator[SEP] Keyword[throws] identifier[IOException] { identifier[gen] operator[SEP] identifier[writeStringField] operator[SEP] literal[String] , literal[String]...
public boolean eq(final Matrix B) { final Matrix A = this; if ((B.m_rows != A.m_rows) || (B.m_columns != A.m_columns)) { return false; } for (int i = 0; i < m_rows; i++) { for (int j = 0; j < m_columns; j++) { ...
class class_name[name] begin[{] method[eq, return_type[type[boolean]], modifier[public], parameter[B]] begin[{] local_variable[type[Matrix], A] if[binary_operation[binary_operation[member[B.m_rows], !=, member[A.m_rows]], ||, binary_operation[member[B.m_columns], !=, member[A.m_columns]...
Keyword[public] Keyword[boolean] identifier[eq] operator[SEP] Keyword[final] identifier[Matrix] identifier[B] operator[SEP] { Keyword[final] identifier[Matrix] identifier[A] operator[=] Keyword[this] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[B] operator[SEP] identifier[m_rows] operator[!=]...
public static boolean inodeUfsIsContentSynced(Inode inode, Fingerprint inodeFingerprint, Fingerprint ufsFingerprint) { boolean isSyncedUnpersisted = !inode.isPersisted() && !ufsFingerprint.isValid(); boolean isSyncedPersisted; isSyncedPersisted = inode.isPersisted() && inodeFingerprin...
class class_name[name] begin[{] method[inodeUfsIsContentSynced, return_type[type[boolean]], modifier[public static], parameter[inode, inodeFingerprint, ufsFingerprint]] begin[{] local_variable[type[boolean], isSyncedUnpersisted] local_variable[type[boolean], isSyncedPersisted] a...
Keyword[public] Keyword[static] Keyword[boolean] identifier[inodeUfsIsContentSynced] operator[SEP] identifier[Inode] identifier[inode] , identifier[Fingerprint] identifier[inodeFingerprint] , identifier[Fingerprint] identifier[ufsFingerprint] operator[SEP] { Keyword[boolean] identifier[isSyncedUnpersisted] ope...
@Override public void writeMap(Collection<?> array) { writeAMF3(); buf.put(AMF3.TYPE_ARRAY); if (hasReference(array)) { putInteger(getReferenceId(array) << 1); return; } storeReference(array); // TODO: we could optimize this by storing...
class class_name[name] begin[{] method[writeMap, return_type[void], modifier[public], parameter[array]] begin[{] call[.writeAMF3, parameter[]] call[buf.put, parameter[member[AMF3.TYPE_ARRAY]]] if[call[.hasReference, parameter[member[.array]]]] begin[{] ...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeMap] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] identifier[array] operator[SEP] { identifier[writeAMF3] operator[SEP] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[put] operator[S...
public Response executeMessage(Message message, Builder<?> builder) { return executeMessage(message, builder, OperaIntervals.RESPONSE_TIMEOUT.getMs()); }
class class_name[name] begin[{] method[executeMessage, return_type[type[Response]], modifier[public], parameter[message, builder]] begin[{] return[call[.executeMessage, parameter[member[.message], member[.builder], call[OperaIntervals.RESPONSE_TIMEOUT.getMs, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[Response] identifier[executeMessage] operator[SEP] identifier[Message] identifier[message] , identifier[Builder] operator[<] operator[?] operator[>] identifier[builder] operator[SEP] { Keyword[return] identifier[executeMessage] operator[SEP] identifier[message] , identifier[builder] ...
public Object invoke(Object p_proxy, Method m, Object[] args) throws Throwable { Debug.logVerbose("<################################>Action: JdonFramework core entrance", module); Debug.logVerbose("[JdonFramework]<################>execute method=" + m.getDeclaringClass().getName() + "." + m.getName(), module); ...
class class_name[name] begin[{] method[invoke, return_type[type[Object]], modifier[public], parameter[p_proxy, m, args]] begin[{] call[Debug.logVerbose, parameter[literal["<################################>Action: JdonFramework core entrance"], member[.module]]] call[Debug.logVe...
Keyword[public] identifier[Object] identifier[invoke] operator[SEP] identifier[Object] identifier[p_proxy] , identifier[Method] identifier[m] , identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Throwable] { identifier[Debug] operator[SEP] identifier[logVer...
public double add(int index, double delta) { updated = true; int newIndex = getIndex(index); return (newIndex == -1) ? 0 : doubleVector.add(newIndex, delta); }
class class_name[name] begin[{] method[add, return_type[type[double]], modifier[public], parameter[index, delta]] begin[{] assign[member[.updated], literal[true]] local_variable[type[int], newIndex] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(memb...
Keyword[public] Keyword[double] identifier[add] operator[SEP] Keyword[int] identifier[index] , Keyword[double] identifier[delta] operator[SEP] { identifier[updated] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[newIndex] operator[=] identifier[getIndex] operator[SEP] identifier[index] opera...
public static Map<String, FieldAccess> getFieldsFromObject( Object object ) { try { Map<String, FieldAccess> fields; if ( object instanceof Map ) { fields = getFieldsFromMap( ( Map<String, Object> ) object ); } else { fields = getPropertyFiel...
class class_name[name] begin[{] method[getFieldsFromObject, return_type[type[Map]], modifier[public static], parameter[object]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=fields)], modifiers=set(), type=Ref...
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[FieldAccess] operator[>] identifier[getFieldsFromObject] operator[SEP] identifier[Object] identifier[object] operator[SEP] { Keyword[try] { identifier[Map] operator[<] identifier[String] , identifier[FieldAcc...
public static Object find(PageContext pc, String name) { Object ret = get(pc, name, PageContext.PAGE_SCOPE); if (ret == null) { ret = get(pc, name, PageContext.REQUEST_SCOPE); if (ret == null) { if (pc.getSession() != null) { // check session o...
class class_name[name] begin[{] method[find, return_type[type[Object]], modifier[public static], parameter[pc, name]] begin[{] local_variable[type[Object], ret] if[binary_operation[member[.ret], ==, literal[null]]] begin[{] assign[member[.ret], call[.get, paramet...
Keyword[public] Keyword[static] identifier[Object] identifier[find] operator[SEP] identifier[PageContext] identifier[pc] , identifier[String] identifier[name] operator[SEP] { identifier[Object] identifier[ret] operator[=] identifier[get] operator[SEP] identifier[pc] , identifier[name] , identifier[PageContext...
static HttpResponseFactory resolveDefaultResponseFactory() { Optional<ServiceDefinition<HttpResponseFactory>> definition = SoftServiceLoader.load(HttpResponseFactory.class) .firstOr("io.micronaut.http.server.netty.NettyHttpResponseFactory", HttpResponseFactory.class.getClassLoader()); i...
class class_name[name] begin[{] method[resolveDefaultResponseFactory, return_type[type[HttpResponseFactory]], modifier[static], parameter[]] begin[{] local_variable[type[Optional], definition] if[call[definition.isPresent, parameter[]]] begin[{] local_variable[type[ServiceDe...
Keyword[static] identifier[HttpResponseFactory] identifier[resolveDefaultResponseFactory] operator[SEP] operator[SEP] { identifier[Optional] operator[<] identifier[ServiceDefinition] operator[<] identifier[HttpResponseFactory] operator[>] operator[>] identifier[definition] operator[=] identifier[SoftServiceLoade...
@SuppressWarnings({ "unchecked", "PMD.ShortVariable", "PMD.AvoidDuplicateLiterals" }) public <C> C[] channels(Class<C> type) { return Arrays.stream(channels) .filter(c -> type.isAssignableFrom(c.getClass())).toArray( size -> (C[]) Array.newInstance(type, size)); }
class class_name[name] begin[{] method[channels, return_type[type[C]], modifier[public], parameter[type]] begin[{] return[call[Arrays.stream, parameter[member[.channels]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] , literal[String] } operator[SEP] Keyword[public] operator[<] identifier[C] operator[>] identifier[C] operator[SEP] operator[SEP] identifier[channels] operator[SEP] identifier[Class] operator[<] identifier[C] operat...
@CanIgnoreReturnValue @GwtIncompatible // reflection public static <V, X extends Exception> V getChecked(Future<V> future, Class<X> exceptionClass) throws X { return FuturesGetChecked.getChecked(future, exceptionClass); }
class class_name[name] begin[{] method[getChecked, return_type[type[V]], modifier[public static], parameter[future, exceptionClass]] begin[{] return[call[FuturesGetChecked.getChecked, parameter[member[.future], member[.exceptionClass]]]] end[}] END[}]
annotation[@] identifier[CanIgnoreReturnValue] annotation[@] identifier[GwtIncompatible] Keyword[public] Keyword[static] operator[<] identifier[V] , identifier[X] Keyword[extends] identifier[Exception] operator[>] identifier[V] identifier[getChecked] operator[SEP] identifier[Future] operator[<] identifier[V] operator[...
public void closeStaleConnections() { logger.debug("closeStaleConnections() count before expiring: {}", getConnectionCount()); Set<ConnectionKey> stale = getStaleConnectionKeys(); for (ConnectionKey connectionKey : stale) { connectionProvider.close(connectionKey); } ...
class class_name[name] begin[{] method[closeStaleConnections, return_type[void], modifier[public], parameter[]] begin[{] call[logger.debug, parameter[literal["closeStaleConnections() count before expiring: {}"], call[.getConnectionCount, parameter[]]]] local_variable[type[Set], stale] ...
Keyword[public] Keyword[void] identifier[closeStaleConnections] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[getConnectionCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Connectio...
public static double getRmsdAtOrigin(Point3d[] fixed, Point3d[] moved) { superposer.setCentered(true); return superposer.getRmsd(fixed, moved); }
class class_name[name] begin[{] method[getRmsdAtOrigin, return_type[type[double]], modifier[public static], parameter[fixed, moved]] begin[{] call[superposer.setCentered, parameter[literal[true]]] return[call[superposer.getRmsd, parameter[member[.fixed], member[.moved]]]] end[}] END...
Keyword[public] Keyword[static] Keyword[double] identifier[getRmsdAtOrigin] operator[SEP] identifier[Point3d] operator[SEP] operator[SEP] identifier[fixed] , identifier[Point3d] operator[SEP] operator[SEP] identifier[moved] operator[SEP] { identifier[superposer] operator[SEP] identifier[setCentered] operator[SE...
public void setPlatformApplications(java.util.Collection<PlatformApplication> platformApplications) { if (platformApplications == null) { this.platformApplications = null; return; } this.platformApplications = new com.amazonaws.internal.SdkInternalList<PlatformApplicatio...
class class_name[name] begin[{] method[setPlatformApplications, return_type[void], modifier[public], parameter[platformApplications]] begin[{] if[binary_operation[member[.platformApplications], ==, literal[null]]] begin[{] assign[THIS[member[None.platformApplications]], ...
Keyword[public] Keyword[void] identifier[setPlatformApplications] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[PlatformApplication] operator[>] identifier[platformApplications] operator[SEP] { Keyword[if] operator[SEP] identifier[platfo...
static void init(int slotId, Codec codec, org.omg.PortableInterceptor.Current piCurrent) { TxServerInterceptor.slotId = slotId; TxServerInterceptor.codec = codec; TxServerInterceptor.piCurrent = piCurrent; }
class class_name[name] begin[{] method[init, return_type[void], modifier[static], parameter[slotId, codec, piCurrent]] begin[{] assign[member[TxServerInterceptor.slotId], member[.slotId]] assign[member[TxServerInterceptor.codec], member[.codec]] assign[member[TxS...
Keyword[static] Keyword[void] identifier[init] operator[SEP] Keyword[int] identifier[slotId] , identifier[Codec] identifier[codec] , identifier[org] operator[SEP] identifier[omg] operator[SEP] identifier[PortableInterceptor] operator[SEP] identifier[Current] identifier[piCurrent] operator[SEP] { identifier[TxS...
public static <T> Collector<T, ?, List<T>> maxAll(Comparator<? super T> comparator) { return maxAll(comparator, Integer.MAX_VALUE); }
class class_name[name] begin[{] method[maxAll, return_type[type[Collector]], modifier[public static], parameter[comparator]] begin[{] return[call[.maxAll, parameter[member[.comparator], member[Integer.MAX_VALUE]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[List] operator[<] identifier[T] operator[>] operator[>] identifier[maxAll] operator[SEP] identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[T] operator...
public static int executeUpdate(PreparedStatement ps, Object... params) throws SQLException { StatementUtil.fillParams(ps, params); return ps.executeUpdate(); }
class class_name[name] begin[{] method[executeUpdate, return_type[type[int]], modifier[public static], parameter[ps, params]] begin[{] call[StatementUtil.fillParams, parameter[member[.ps], member[.params]]] return[call[ps.executeUpdate, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[executeUpdate] operator[SEP] identifier[PreparedStatement] identifier[ps] , identifier[Object] operator[...] identifier[params] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[StatementUtil] operator[SEP] identifier[fillParams] operator...
@Override public final boolean filter() { // supporting attributes here is difficult, because treetank // does not provide a way to acces the name and namespace of // the current attribute (attribute index is not known here) checkState(mRtx.getNode().getKind() != IConstants.ATTRIBUTE...
class class_name[name] begin[{] method[filter, return_type[type[boolean]], modifier[final public], parameter[]] begin[{] call[.checkState, parameter[binary_operation[call[mRtx.getNode, parameter[]], !=, member[IConstants.ATTRIBUTE]], literal["Wildcards are not supported in attribute names yet."...
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[boolean] identifier[filter] operator[SEP] operator[SEP] { identifier[checkState] operator[SEP] identifier[mRtx] operator[SEP] identifier[getNode] operator[SEP] operator[SEP] operator[SEP] identifier[getKind] operator[SEP] operator[SEP] ope...
private boolean beginBlocking() { begin(); synchronized (blockingThreads) { if (isOpen()) { blockingThreads.add(Thread.currentThread()); return true; } return false; } }
class class_name[name] begin[{] method[beginBlocking, return_type[type[boolean]], modifier[private], parameter[]] begin[{] call[.begin, parameter[]] SYNCHRONIZED[member[.blockingThreads]] BEGIN[{] if[call[.isOpen, parameter[]]] begin[{] ...
Keyword[private] Keyword[boolean] identifier[beginBlocking] operator[SEP] operator[SEP] { identifier[begin] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[blockingThreads] operator[SEP] { Keyword[if] operator[SEP] identifier[isOpen] operator[SEP] operator[SEP]...
public static Class<?> getPropertyClass(Class<?> clazz, List<String> propertyPath) { Class<?> current = clazz; for (String propertyName : propertyPath) { current = getPropertyClass(current, propertyName); } return current; }
class class_name[name] begin[{] method[getPropertyClass, return_type[type[Class]], modifier[public static], parameter[clazz, propertyPath]] begin[{] local_variable[type[Class], current] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expression...
Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[getPropertyClass] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[List] operator[<] identifier[String] operator[>] identifier[propertyPath] operator[SEP] { identifi...
public void setPointFeatureData(List<PointFeature> obsData) throws IOException { dataModel = new PointFeatureDataModel(obsData); initTable(dataModel); }
class class_name[name] begin[{] method[setPointFeatureData, return_type[void], modifier[public], parameter[obsData]] begin[{] assign[member[.dataModel], ClassCreator(arguments=[MemberReference(member=obsData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, cons...
Keyword[public] Keyword[void] identifier[setPointFeatureData] operator[SEP] identifier[List] operator[<] identifier[PointFeature] operator[>] identifier[obsData] operator[SEP] Keyword[throws] identifier[IOException] { identifier[dataModel] operator[=] Keyword[new] identifier[PointFeatureDataModel] operator[SEP] ...
public static Predicates<Object> equal(Object object) { if (object == null) { return Predicates.isNull(); } return new EqualPredicate(object); }
class class_name[name] begin[{] method[equal, return_type[type[Predicates]], modifier[public static], parameter[object]] begin[{] if[binary_operation[member[.object], ==, literal[null]]] begin[{] return[call[Predicates.isNull, parameter[]]] else begin[{] None end[}] ...
Keyword[public] Keyword[static] identifier[Predicates] operator[<] identifier[Object] operator[>] identifier[equal] operator[SEP] identifier[Object] identifier[object] operator[SEP] { Keyword[if] operator[SEP] identifier[object] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Predi...
public void performRecovery(ObjectManagerState objectManagerState) throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, "performRecovery", new...
class class_name[name] begin[{] method[performRecovery, return_type[void], modifier[public], parameter[objectManagerState]] begin[{] if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{] call[trace.entry, parameter...
Keyword[public] Keyword[void] identifier[performRecovery] operator[SEP] identifier[ObjectManagerState] identifier[objectManagerState] operator[SEP] Keyword[throws] identifier[ObjectManagerException] { Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operat...
public static void setInputFormatClass(Class<?> clazz, Job job) { job.setInputFormatClass(MultiInputFormat.class); setClassConf(clazz, HadoopCompat.getConfiguration(job)); }
class class_name[name] begin[{] method[setInputFormatClass, return_type[void], modifier[public static], parameter[clazz, job]] begin[{] call[job.setInputFormatClass, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, ...
Keyword[public] Keyword[static] Keyword[void] identifier[setInputFormatClass] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[Job] identifier[job] operator[SEP] { identifier[job] operator[SEP] identifier[setInputFormatClass] operator[SEP] identifier[MultiInputF...
@Override public EquPart morph() throws Exception { final EquPart part = Equ.getInstance().operator(this); if (part == null) return this; return part; }
class class_name[name] begin[{] method[morph, return_type[type[EquPart]], modifier[public], parameter[]] begin[{] local_variable[type[EquPart], part] if[binary_operation[member[.part], ==, literal[null]]] begin[{] return[THIS[]] else begin[{] None end[}] return[m...
annotation[@] identifier[Override] Keyword[public] identifier[EquPart] identifier[morph] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[final] identifier[EquPart] identifier[part] operator[=] identifier[Equ] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[S...
@SuppressWarnings("unchecked") public Map<String, Object> getCustomProperties() { return (Map<String, Object>) getCachedValue(ProjectField.CUSTOM_PROPERTIES); }
class class_name[name] begin[{] method[getCustomProperties, return_type[type[Map]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=CUSTOM_PROPERTIES, postfix_operators=[], prefix_operators=[], qualifier=ProjectField, selectors=[])], mem...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getCustomProperties] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[Map] operator[<] identifie...
public void push(int value) { if (value > 0 && value <= 5) { visitInsn(Constants.ICONST_0 + value); } else { visitLdcInsn(value); } }
class class_name[name] begin[{] method[push, return_type[void], modifier[public], parameter[value]] begin[{] if[binary_operation[binary_operation[member[.value], >, literal[0]], &&, binary_operation[member[.value], <=, literal[5]]]] begin[{] call[.visitInsn, parameter[bi...
Keyword[public] Keyword[void] identifier[push] operator[SEP] Keyword[int] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[>] Other[0] operator[&&] identifier[value] operator[<=] Other[5] operator[SEP] { identifier[visitInsn] operator[SEP] identifier[Constants] op...
protected void growAndCopy() { if (textLen == text.length) { int newSize = text.length << 1; char[] newText = new char[newSize]; if (textLen > 0) { System.arraycopy(text, 0, newText, 0, textLen); } text = newText; } }
class class_name[name] begin[{] method[growAndCopy, return_type[void], modifier[protected], parameter[]] begin[{] if[binary_operation[member[.textLen], ==, member[text.length]]] begin[{] local_variable[type[int], newSize] local_variable[type[char], newText] ...
Keyword[protected] Keyword[void] identifier[growAndCopy] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[textLen] operator[==] identifier[text] operator[SEP] identifier[length] operator[SEP] { Keyword[int] identifier[newSize] operator[=] identifier[text] operator[SEP] identifier[len...
public synchronized void scaleTextSize(float scaleFactor, byte zoomLevel) { if (!textScales.containsKey(zoomLevel) || scaleFactor != textScales.get(zoomLevel)) { for (int i = 0, n = this.rulesList.size(); i < n; ++i) { Rule rule = this.rulesList.get(i); if (rule.zoomM...
class class_name[name] begin[{] method[scaleTextSize, return_type[void], modifier[synchronized public], parameter[scaleFactor, zoomLevel]] begin[{] if[binary_operation[call[textScales.containsKey, parameter[member[.zoomLevel]]], ||, binary_operation[member[.scaleFactor], !=, call[textScales.get...
Keyword[public] Keyword[synchronized] Keyword[void] identifier[scaleTextSize] operator[SEP] Keyword[float] identifier[scaleFactor] , Keyword[byte] identifier[zoomLevel] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[textScales] operator[SEP] identifier[containsKey] operator[SEP] identifier[zoo...
private void touchFixed() { assert this.dense; assert this.level == 0; assert this.schedule; while (this.touched < this.trail.size()) { final int lit = this.trail.get(this.touched++); assert val(lit) > 0; assert var(lit).level() == 0; final...
class class_name[name] begin[{] method[touchFixed, return_type[void], modifier[private], parameter[]] begin[{] AssertStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=dense, postfix_operators=None, prefix_operators=None, qualifier=None...
Keyword[private] Keyword[void] identifier[touchFixed] operator[SEP] operator[SEP] { Keyword[assert] Keyword[this] operator[SEP] identifier[dense] operator[SEP] Keyword[assert] Keyword[this] operator[SEP] identifier[level] operator[==] Other[0] operator[SEP] Keyword[assert] Keyword[this] operator[SEP] identifier[...
public final void setMaxValue(final int maxValue) { Condition.INSTANCE.ensureGreater(maxValue, getMinValue(), "The maximum value must be greater than the minimum value"); this.maxValue = maxValue; setValue(Math.min(getValue(), maxValue)); }
class class_name[name] begin[{] method[setMaxValue, return_type[void], modifier[final public], parameter[maxValue]] begin[{] call[Condition.INSTANCE.ensureGreater, parameter[member[.maxValue], call[.getMinValue, parameter[]], literal["The maximum value must be greater than the minimum value"]]]...
Keyword[public] Keyword[final] Keyword[void] identifier[setMaxValue] operator[SEP] Keyword[final] Keyword[int] identifier[maxValue] operator[SEP] { identifier[Condition] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[ensureGreater] operator[SEP] identifier[maxValue] , identifier[getMinValue] operat...
private List<String> getBusinessServiceList(String firstName, String lastName){ List<String> businessServiceList = new ArrayList<>(); List<Cmdb> cmdbs = cmdbService.getAllBusServices(); /** Defining search parameters */ Predicate<Cmdb> supportOwnerLn = p -> p.getSuppor...
class class_name[name] begin[{] method[getBusinessServiceList, return_type[type[List]], modifier[private], parameter[firstName, lastName]] begin[{] local_variable[type[List], businessServiceList] local_variable[type[List], cmdbs] local_variable[type[Predicate], supportOwnerLn] l...
Keyword[private] identifier[List] operator[<] identifier[String] operator[>] identifier[getBusinessServiceList] operator[SEP] identifier[String] identifier[firstName] , identifier[String] identifier[lastName] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[businessServiceL...
private void expectedByte(int position, int count) throws UTFDataFormatException { String msg = JspCoreException.getMsg("jsp.error.xml.expectedByte", new Object[] {Integer.toString(position), Integer.toString(count)}); throw new UTFDataFormatException(msg); }
class class_name[name] begin[{] method[expectedByte, return_type[void], modifier[private], parameter[position, count]] begin[{] local_variable[type[String], msg] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, ...
Keyword[private] Keyword[void] identifier[expectedByte] operator[SEP] Keyword[int] identifier[position] , Keyword[int] identifier[count] operator[SEP] Keyword[throws] identifier[UTFDataFormatException] { identifier[String] identifier[msg] operator[=] identifier[JspCoreException] operator[SEP] identifier[getMsg]...
@Override public AttachPolicyResult attachPolicy(AttachPolicyRequest request) { request = beforeClientExecution(request); return executeAttachPolicy(request); }
class class_name[name] begin[{] method[attachPolicy, return_type[type[AttachPolicyResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeAttachPolicy, parameter[member[.request]]]] ...
annotation[@] identifier[Override] Keyword[public] identifier[AttachPolicyResult] identifier[attachPolicy] operator[SEP] identifier[AttachPolicyRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[S...
public void addMatch(String name, PseudoClassType pseudoClass) { if (names == null) names = new HashMap<String, Set<PseudoClassType>>(); Set<PseudoClassType> classes = names.get(name); if (classes == null) { classes = new HashSet<PseudoClassType>(2); ...
class class_name[name] begin[{] method[addMatch, return_type[void], modifier[public], parameter[name, pseudoClass]] begin[{] if[binary_operation[member[.names], ==, literal[null]]] begin[{] assign[member[.names], ClassCreator(arguments=[], body=None, constructor_type_arguments=None,...
Keyword[public] Keyword[void] identifier[addMatch] operator[SEP] identifier[String] identifier[name] , identifier[PseudoClassType] identifier[pseudoClass] operator[SEP] { Keyword[if] operator[SEP] identifier[names] operator[==] Other[null] operator[SEP] identifier[names] operator[=] Keyword[new] identifier[Hash...
public static <T, U> ToLongBiFunction<T, U> toLongBiFunction(CheckedToLongBiFunction<T, U> function) { return Unchecked.toLongBiFunction(function, Unchecked.RETHROW_ALL); }
class class_name[name] begin[{] method[toLongBiFunction, return_type[type[ToLongBiFunction]], modifier[public static], parameter[function]] begin[{] return[call[Unchecked.toLongBiFunction, parameter[member[.function], member[Unchecked.RETHROW_ALL]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[U] operator[>] identifier[ToLongBiFunction] operator[<] identifier[T] , identifier[U] operator[>] identifier[toLongBiFunction] operator[SEP] identifier[CheckedToLongBiFunction] operator[<] identifier[T] , identifier[U] operator[>] identifier[func...
public AVIMConversationsQuery whereNear(String key, AVGeoPoint point) { conditions.whereNear(key, point); return this; }
class class_name[name] begin[{] method[whereNear, return_type[type[AVIMConversationsQuery]], modifier[public], parameter[key, point]] begin[{] call[conditions.whereNear, parameter[member[.key], member[.point]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[AVIMConversationsQuery] identifier[whereNear] operator[SEP] identifier[String] identifier[key] , identifier[AVGeoPoint] identifier[point] operator[SEP] { identifier[conditions] operator[SEP] identifier[whereNear] operator[SEP] identifier[key] , identifier[point] operator[SEP] operato...
private void checkViewSources(ArrayList<Table> tableList) throws VoltCompilerException { HashSet<String> tableSet = new HashSet<>(); for (Table tbl : tableList) { if (! tableSet.add(tbl.getTypeName())) { String errMsg = "Table " + tbl.getTypeName() + " appeared in the table l...
class class_name[name] begin[{] method[checkViewSources, return_type[void], modifier[private], parameter[tableList]] begin[{] local_variable[type[HashSet], tableSet] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(argum...
Keyword[private] Keyword[void] identifier[checkViewSources] operator[SEP] identifier[ArrayList] operator[<] identifier[Table] operator[>] identifier[tableList] operator[SEP] Keyword[throws] identifier[VoltCompilerException] { identifier[HashSet] operator[<] identifier[String] operator[>] identifier[tableSet] ope...
private X509Certificate createCACert(PublicKey publicKey, PrivateKey privateKey) throws Exception { // signers name X500Name issuerName = new X500Name("CN=www.mockserver.com, O=MockServer, L=London, ST=England, C=UK"); // subjects name - the same as we are self signed. X500Name subject...
class class_name[name] begin[{] method[createCACert, return_type[type[X509Certificate]], modifier[private], parameter[publicKey, privateKey]] begin[{] local_variable[type[X500Name], issuerName] local_variable[type[X500Name], subjectName] local_variable[type[BigInteger], serial] ...
Keyword[private] identifier[X509Certificate] identifier[createCACert] operator[SEP] identifier[PublicKey] identifier[publicKey] , identifier[PrivateKey] identifier[privateKey] operator[SEP] Keyword[throws] identifier[Exception] { identifier[X500Name] identifier[issuerName] operator[=] Keyword[new] identifier[X5...
public boolean all(Object... targets) { if (null == targets) { return null == this.delegate; } for (Object target : targets) { if (null == target) { if (null != this.delegate) { return false; } continue; } if (target != this.delegate) { return false; } } return true; }
class class_name[name] begin[{] method[all, return_type[type[boolean]], modifier[public], parameter[targets]] begin[{] if[binary_operation[literal[null], ==, member[.targets]]] begin[{] return[binary_operation[literal[null], ==, THIS[member[None.delegate]]]] else begin[{] No...
Keyword[public] Keyword[boolean] identifier[all] operator[SEP] identifier[Object] operator[...] identifier[targets] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[targets] operator[SEP] { Keyword[return] Other[null] operator[==] Keyword[this] operator[SEP] identifier[del...