code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public boolean isInheritedIn(Symbol clazz, Types types) { switch ((int)(flags_field & Flags.AccessFlags)) { default: // error recovery case PUBLIC: return true; case PRIVATE: return this.owner == clazz; case PROTECTED: // we model interfaces as...
class class_name[name] begin[{] method[isInheritedIn, return_type[type[boolean]], modifier[public], parameter[clazz, types]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['PUBLIC'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, sel...
Keyword[public] Keyword[boolean] identifier[isInheritedIn] operator[SEP] identifier[Symbol] identifier[clazz] , identifier[Types] identifier[types] operator[SEP] { Keyword[switch] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[flags_field] operator[&] identifier[Flags] operator[...
@SuppressWarnings("rawtypes") private void restoreFromCookie(IExtendedRequest extRequest, HttpServletResponse res, String reqURL) { byte[] cookieValueBytes = extRequest.getCookieValueAsBytes(POSTPARAM_COOKIE); if (cookieValueBytes == null || cookieValueBytes.length <= 2) { return; } if (TraceComponent.isAny...
class class_name[name] begin[{] method[restoreFromCookie, return_type[void], modifier[private], parameter[extRequest, res, reqURL]] begin[{] local_variable[type[byte], cookieValueBytes] if[binary_operation[binary_operation[member[.cookieValueBytes], ==, literal[null]], ||, binary_operat...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[restoreFromCookie] operator[SEP] identifier[IExtendedRequest] identifier[extRequest] , identifier[HttpServletResponse] identifier[res] , identifier[String] identifier[reqURL] operator[SEP] ...
public static UnitResponse createException(Throwable e) { return UnitResponse .createError(Group.CODE_EXCEPTION, e, null); }
class class_name[name] begin[{] method[createException, return_type[type[UnitResponse]], modifier[public static], parameter[e]] begin[{] return[call[UnitResponse.createError, parameter[member[Group.CODE_EXCEPTION], member[.e], literal[null]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[UnitResponse] identifier[createException] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { Keyword[return] identifier[UnitResponse] operator[SEP] identifier[createError] operator[SEP] identifier[Group] operator[SEP] identifier[CODE_EXCEPTION] , identif...
@Override public CPInstance removeByC_C(long CPDefinitionId, String CPInstanceUuid) throws NoSuchCPInstanceException { CPInstance cpInstance = findByC_C(CPDefinitionId, CPInstanceUuid); return remove(cpInstance); }
class class_name[name] begin[{] method[removeByC_C, return_type[type[CPInstance]], modifier[public], parameter[CPDefinitionId, CPInstanceUuid]] begin[{] local_variable[type[CPInstance], cpInstance] return[call[.remove, parameter[member[.cpInstance]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CPInstance] identifier[removeByC_C] operator[SEP] Keyword[long] identifier[CPDefinitionId] , identifier[String] identifier[CPInstanceUuid] operator[SEP] Keyword[throws] identifier[NoSuchCPInstanceException] { identifier[CPInstance] identifier[cpInsta...
@Override public void setModel(final WebComponent component, final WebModel model) { backing.setModel(component, model); }
class class_name[name] begin[{] method[setModel, return_type[void], modifier[public], parameter[component, model]] begin[{] call[backing.setModel, parameter[member[.component], member[.model]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setModel] operator[SEP] Keyword[final] identifier[WebComponent] identifier[component] , Keyword[final] identifier[WebModel] identifier[model] operator[SEP] { identifier[backing] operator[SEP] identifier[setModel] operator[SEP] identifie...
public ExecInspection execStartVerbose(String containerId, String... commands) { this.readWriteLock.readLock().lock(); try { String id = execCreate(containerId, commands); CubeOutput output = execStartOutput(id); return new ExecInspection(output, inspectExec(id)); ...
class class_name[name] begin[{] method[execStartVerbose, return_type[type[ExecInspection]], modifier[public], parameter[containerId, commands]] begin[{] THIS[member[None.readWriteLock]call[None.readLock, parameter[]]call[None.lock, parameter[]]] TryStatement(block=[LocalVariableDeclarat...
Keyword[public] identifier[ExecInspection] identifier[execStartVerbose] operator[SEP] identifier[String] identifier[containerId] , identifier[String] operator[...] identifier[commands] operator[SEP] { Keyword[this] operator[SEP] identifier[readWriteLock] operator[SEP] identifier[readLock] operator[SEP] operator...
private Map<JSType, String> buildPropNames(Property prop) { UnionFind<JSType> pTypes = prop.getTypes(); String pname = prop.name; Map<JSType, String> names = new HashMap<>(); for (Set<JSType> set : pTypes.allEquivalenceClasses()) { checkState(!set.isEmpty()); JSType representative = pTypes.f...
class class_name[name] begin[{] method[buildPropNames, return_type[type[Map]], modifier[private], parameter[prop]] begin[{] local_variable[type[UnionFind], pTypes] local_variable[type[String], pname] local_variable[type[Map], names] ForStatement(body=BlockStatement(label=None, s...
Keyword[private] identifier[Map] operator[<] identifier[JSType] , identifier[String] operator[>] identifier[buildPropNames] operator[SEP] identifier[Property] identifier[prop] operator[SEP] { identifier[UnionFind] operator[<] identifier[JSType] operator[>] identifier[pTypes] operator[=] identifier[prop] operato...
public void setPath(List<? extends S> path, Direction1D direction) { this.path = path == null || path.isEmpty() ? null : new ArrayList<>(path); this.firstSegmentDirection = detectFirstSegmentDirection(direction); }
class class_name[name] begin[{] method[setPath, return_type[void], modifier[public], parameter[path, direction]] begin[{] assign[THIS[member[None.path]], TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=path, postfix_operators=[], prefix_opera...
Keyword[public] Keyword[void] identifier[setPath] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[S] operator[>] identifier[path] , identifier[Direction1D] identifier[direction] operator[SEP] { Keyword[this] operator[SEP] identifier[path] operator[=] identifier[path] operator[...
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int widthMode = MeasureSpec.getMode(widthMeasureSpec); int widthSize; int heightSize; final int mPaddingLeft = getPaddingLeft(); final int mPaddingTop = getPaddingTop(); final int mPadd...
class class_name[name] begin[{] method[onMeasure, return_type[void], modifier[protected], parameter[widthMeasureSpec, heightMeasureSpec]] begin[{] local_variable[type[int], widthMode] local_variable[type[int], widthSize] local_variable[type[int], heightSize] local_variable[type[...
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[onMeasure] operator[SEP] Keyword[int] identifier[widthMeasureSpec] , Keyword[int] identifier[heightMeasureSpec] operator[SEP] { Keyword[int] identifier[widthMode] operator[=] identifier[MeasureSpec] operator[SEP] identifier[getMode] ...
public SubEpochReturn<O> trainSubEpoch(O sObs, int nstep) { synchronized (getAsyncGlobal()) { current.copy(getAsyncGlobal().getCurrent()); } Stack<MiniTrans<Integer>> rewards = new Stack<>(); O obs = sObs; Policy<O, Integer> policy = getPolicy(current); Int...
class class_name[name] begin[{] method[trainSubEpoch, return_type[type[SubEpochReturn]], modifier[public], parameter[sObs, nstep]] begin[{] SYNCHRONIZED[call[.getAsyncGlobal, parameter[]]] BEGIN[{] call[current.copy, parameter[call[.getAsyncGlobal, parameter[]]]] ...
Keyword[public] identifier[SubEpochReturn] operator[<] identifier[O] operator[>] identifier[trainSubEpoch] operator[SEP] identifier[O] identifier[sObs] , Keyword[int] identifier[nstep] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[getAsyncGlobal] operator[SEP] operator[SEP] operator[SEP] { ...
public static <T> JSONArray toJSONArray(final Collection<T> collection) { final JSONArray ret = new JSONArray(); if (null == collection) { return ret; } for (final T object : collection) { ret.put(object); } return ret; }
class class_name[name] begin[{] method[toJSONArray, return_type[type[JSONArray]], modifier[public static], parameter[collection]] begin[{] local_variable[type[JSONArray], ret] if[binary_operation[literal[null], ==, member[.collection]]] begin[{] return[member[.ret]] ...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[JSONArray] identifier[toJSONArray] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[T] operator[>] identifier[collection] operator[SEP] { Keyword[final] identifier[JSONArray] identifier[ret] operator[=] Key...
static public int match(String s1, String s2) { int i = 0; while ((i < s1.length()) && (i < s2.length())) { if (s1.charAt(i) != s2.charAt(i)) { break; } i++; } return i; }
class class_name[name] begin[{] method[match, return_type[type[int]], modifier[public static], parameter[s1, s2]] begin[{] local_variable[type[int], i] while[binary_operation[binary_operation[member[.i], <, call[s1.length, parameter[]]], &&, binary_operation[member[.i], <, call[s2.lengt...
Keyword[static] Keyword[public] Keyword[int] identifier[match] operator[SEP] identifier[String] identifier[s1] , identifier[String] identifier[s2] operator[SEP] { Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[s1] ope...
public static void filterFields(File trainingCorpus, File newRawFile, int[] fieldsToKeep) throws IOException { FileTrainingCorpus ftc = new FileTrainingCorpus(trainingCorpus); Writer writer = new BufferedWriter(new FileWriter(newRawFile)); Iterator<Document> iterator = ftc.iterator()...
class class_name[name] begin[{] method[filterFields, return_type[void], modifier[public static], parameter[trainingCorpus, newRawFile, fieldsToKeep]] begin[{] local_variable[type[FileTrainingCorpus], ftc] local_variable[type[Writer], writer] local_variable[type[Iterator], iterator] ...
Keyword[public] Keyword[static] Keyword[void] identifier[filterFields] operator[SEP] identifier[File] identifier[trainingCorpus] , identifier[File] identifier[newRawFile] , Keyword[int] operator[SEP] operator[SEP] identifier[fieldsToKeep] operator[SEP] Keyword[throws] identifier[IOException] { identifier[FileT...
private static void appendDigits(final Appendable buffer, final int value) throws IOException { buffer.append((char) (value / 10 + '0')); buffer.append((char) (value % 10 + '0')); }
class class_name[name] begin[{] method[appendDigits, return_type[void], modifier[private static], parameter[buffer, value]] begin[{] call[buffer.append, parameter[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operato...
Keyword[private] Keyword[static] Keyword[void] identifier[appendDigits] operator[SEP] Keyword[final] identifier[Appendable] identifier[buffer] , Keyword[final] Keyword[int] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] { identifier[buffer] operator[SEP] identifier[append] operator[SEP]...
protected LinkedList<APIParameter> parseCustomizedParameters(MethodDoc methodDoc) { Tag[] tags = methodDoc.tags(WRParamTaglet.NAME); LinkedList<APIParameter> result = new LinkedList<APIParameter>(); for (int i = 0; i < tags.length; i++) { result.add(WRParamTaglet.parse(tags[i].text())); } return result; }
class class_name[name] begin[{] method[parseCustomizedParameters, return_type[type[LinkedList]], modifier[protected], parameter[methodDoc]] begin[{] local_variable[type[Tag], tags] local_variable[type[LinkedList], result] ForStatement(body=BlockStatement(label=None, statements=[Statemen...
Keyword[protected] identifier[LinkedList] operator[<] identifier[APIParameter] operator[>] identifier[parseCustomizedParameters] operator[SEP] identifier[MethodDoc] identifier[methodDoc] operator[SEP] { identifier[Tag] operator[SEP] operator[SEP] identifier[tags] operator[=] identifier[methodDoc] operator[SEP] i...
public ElementActionBuilder select(String ... options) { DropDownSelectAction action = new DropDownSelectAction(); action.setOptions(Arrays.asList(options)); action(action); return new ElementActionBuilder(action); }
class class_name[name] begin[{] method[select, return_type[type[ElementActionBuilder]], modifier[public], parameter[options]] begin[{] local_variable[type[DropDownSelectAction], action] call[action.setOptions, parameter[call[Arrays.asList, parameter[member[.options]]]]] ...
Keyword[public] identifier[ElementActionBuilder] identifier[select] operator[SEP] identifier[String] operator[...] identifier[options] operator[SEP] { identifier[DropDownSelectAction] identifier[action] operator[=] Keyword[new] identifier[DropDownSelectAction] operator[SEP] operator[SEP] operator[SEP] identifier...
public final void freeMem() { assert isPersisted() || _pojo != null || _key._kb[0]==Key.DVEC; _mem = null; }
class class_name[name] begin[{] method[freeMem, return_type[void], modifier[final public], parameter[]] begin[{] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isPersisted, postfix_operators=[], prefix_operators=[], qualifier=, selector...
Keyword[public] Keyword[final] Keyword[void] identifier[freeMem] operator[SEP] operator[SEP] { Keyword[assert] identifier[isPersisted] operator[SEP] operator[SEP] operator[||] identifier[_pojo] operator[!=] Other[null] operator[||] identifier[_key] operator[SEP] identifier[_kb] operator[SEP] Other[0] operator[SE...
public void processHttpRequestMessage(HttpMessage message) { // Get the session tokens for this site HttpSessionTokensSet siteTokensSet = extension.getHttpSessionTokensSet(getSite()); // No tokens for this site, so no processing if (siteTokensSet == null) { log.debug("No session tokens for: " + this.getSite...
class class_name[name] begin[{] method[processHttpRequestMessage, return_type[void], modifier[public], parameter[message]] begin[{] local_variable[type[HttpSessionTokensSet], siteTokensSet] if[binary_operation[member[.siteTokensSet], ==, literal[null]]] begin[{] ...
Keyword[public] Keyword[void] identifier[processHttpRequestMessage] operator[SEP] identifier[HttpMessage] identifier[message] operator[SEP] { identifier[HttpSessionTokensSet] identifier[siteTokensSet] operator[=] identifier[extension] operator[SEP] identifier[getHttpSessionTokensSet] operator[SEP] identifier[get...
private int reverseIndex(int k) { if (reverseIndexMap == null) { reverseIndexMap = new int[attributes.getLength()]; for (int i = 0, len = indexSet.size(); i < len; i++) reverseIndexMap[indexSet.get(i)] = i + 1; } return reverseIndexMap[k] - 1; }
class class_name[name] begin[{] method[reverseIndex, return_type[type[int]], modifier[private], parameter[k]] begin[{] if[binary_operation[member[.reverseIndexMap], ==, literal[null]]] begin[{] assign[member[.reverseIndexMap], ArrayCreator(dimensions=[MethodInvocation(ar...
Keyword[private] Keyword[int] identifier[reverseIndex] operator[SEP] Keyword[int] identifier[k] operator[SEP] { Keyword[if] operator[SEP] identifier[reverseIndexMap] operator[==] Other[null] operator[SEP] { identifier[reverseIndexMap] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[attr...
public void resolveBundles(BundleContext bContext, List<Bundle> bundlesToResolve) { if (bundlesToResolve == null || bundlesToResolve.size() == 0) { return; } FrameworkWiring wiring = adaptSystemBundle(bContext, FrameworkWiring.class); if (wiring != null) { Resolu...
class class_name[name] begin[{] method[resolveBundles, return_type[void], modifier[public], parameter[bContext, bundlesToResolve]] begin[{] if[binary_operation[binary_operation[member[.bundlesToResolve], ==, literal[null]], ||, binary_operation[call[bundlesToResolve.size, parameter[]], ==, lite...
Keyword[public] Keyword[void] identifier[resolveBundles] operator[SEP] identifier[BundleContext] identifier[bContext] , identifier[List] operator[<] identifier[Bundle] operator[>] identifier[bundlesToResolve] operator[SEP] { Keyword[if] operator[SEP] identifier[bundlesToResolve] operator[==] Other[null] operato...
public long getMinSharePreemptionTimeout(String pool) { if (minSharePreemptionTimeouts.containsKey(pool)) { return minSharePreemptionTimeouts.get(pool); } else { return defaultMinSharePreemptionTimeout; } }
class class_name[name] begin[{] method[getMinSharePreemptionTimeout, return_type[type[long]], modifier[public], parameter[pool]] begin[{] if[call[minSharePreemptionTimeouts.containsKey, parameter[member[.pool]]]] begin[{] return[call[minSharePreemptionTimeouts.get, parameter[member[...
Keyword[public] Keyword[long] identifier[getMinSharePreemptionTimeout] operator[SEP] identifier[String] identifier[pool] operator[SEP] { Keyword[if] operator[SEP] identifier[minSharePreemptionTimeouts] operator[SEP] identifier[containsKey] operator[SEP] identifier[pool] operator[SEP] operator[SEP] { K...
public InputStream getInputStream() throws IOException { acquireLock(); try { isClosed = false; forWrite = false; LOG.trace("Starts read '{}'", file); verifyAndRecover(); InputStream is = new ProxyInputStream(new FileInputStream(file.toFile())) { @Override public vo...
class class_name[name] begin[{] method[getInputStream, return_type[type[InputStream]], modifier[public], parameter[]] begin[{] call[.acquireLock, parameter[]] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isClosed, postfix_operators=[],...
Keyword[public] identifier[InputStream] identifier[getInputStream] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[acquireLock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[isClosed] operator[=] literal[boolean] operator[SEP] identifier[forWrite]...
public Collection<Block> processReport(DatanodeID nodeID, BlockListAsLongs newReport ) throws IOException { // To minimize startup time, we discard any second (or later) block reports // that we receive while still in startup phase. // Checking this without holding fsnamesystem so that duplicate ...
class class_name[name] begin[{] method[processReport, return_type[type[Collection]], modifier[public], parameter[nodeID, newReport]] begin[{] if[call[.isInStartupSafeMode, parameter[]]] begin[{] SYNCHRONIZED[member[.datanodeMap]] BEGIN[{] local_variable[t...
Keyword[public] identifier[Collection] operator[<] identifier[Block] operator[>] identifier[processReport] operator[SEP] identifier[DatanodeID] identifier[nodeID] , identifier[BlockListAsLongs] identifier[newReport] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[isI...
public static base_responses create(nitro_service client, sslcrl resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { sslcrl createresources[] = new sslcrl[resources.length]; for (int i=0;i<resources.length;i++){ createresources[i] = new sslcrl(); ...
class class_name[name] begin[{] method[create, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{] local_variable[type[base_responses], result] if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operatio...
Keyword[public] Keyword[static] identifier[base_responses] identifier[create] operator[SEP] identifier[nitro_service] identifier[client] , identifier[sslcrl] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[base_responses] identifier[result] oper...
private static String getWorkerFormattedTierValues(Map<String, Map<String, String>> map, String workerName) { return map.values().stream().map((tierMap) -> (String.format("%-14s", tierMap.getOrDefault(workerName, "-")))) .collect(Collectors.joining("")); }
class class_name[name] begin[{] method[getWorkerFormattedTierValues, return_type[type[String]], modifier[private static], parameter[map, workerName]] begin[{] return[call[map.values, parameter[]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[getWorkerFormattedTierValues] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[map] , identifier[String] identifier[workerName] operator[...
public void runBeforeApplicationCreateBootstrap( Instrumentation instrumentation, String[] bootstrapClasses) { if (!isWithExtension) { SelendroidLogger.error("Cannot run bootstrap. Must load an extension first."); return; } for (String bootstrapClassName : bootstrapClasses) { try { ...
class class_name[name] begin[{] method[runBeforeApplicationCreateBootstrap, return_type[void], modifier[public], parameter[instrumentation, bootstrapClasses]] begin[{] if[member[.isWithExtension]] begin[{] call[SelendroidLogger.error, parameter[literal["Cannot run bootst...
Keyword[public] Keyword[void] identifier[runBeforeApplicationCreateBootstrap] operator[SEP] identifier[Instrumentation] identifier[instrumentation] , identifier[String] operator[SEP] operator[SEP] identifier[bootstrapClasses] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isWithExtension] oper...
public static Locale toLocale(final String str) { if (str == null) { return null; } if (str.isEmpty()) { // LANG-941 - JDK 8 introduced an empty locale where all fields are blank return new Locale(StringUtils.EMPTY, StringUtils.EMPTY); } if (str.contains("...
class class_name[name] begin[{] method[toLocale, return_type[type[Locale]], modifier[public static], parameter[str]] begin[{] if[binary_operation[member[.str], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[call[str.is...
Keyword[public] Keyword[static] identifier[Locale] identifier[toLocale] operator[SEP] Keyword[final] identifier[String] identifier[str] operator[SEP] { Keyword[if] operator[SEP] identifier[str] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[i...
private void registerControllerFactories() { graphicsService.registerControllerFactory(new ResizeControllerFactory()); graphicsService.registerControllerFactory(new DragControllerFactory()); graphicsService.registerControllerFactory(new DeleteControllerFactory()); graphicsService.registerControllerFactory(new L...
class class_name[name] begin[{] method[registerControllerFactories, return_type[void], modifier[private], parameter[]] begin[{] call[graphicsService.registerControllerFactory, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators...
Keyword[private] Keyword[void] identifier[registerControllerFactories] operator[SEP] operator[SEP] { identifier[graphicsService] operator[SEP] identifier[registerControllerFactory] operator[SEP] Keyword[new] identifier[ResizeControllerFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[gr...
public static void setThreadInstance(Application application) { if (instance == null) { instance = new ThreadLocalApplication(); } else if (!(instance instanceof ThreadLocalApplication)) { throw new IllegalStateException(); } ((ThreadLocalApplication) instance).setCurrentApplication(application); }
class class_name[name] begin[{] method[setThreadInstance, return_type[void], modifier[public static], parameter[application]] begin[{] if[binary_operation[member[.instance], ==, literal[null]]] begin[{] assign[member[.instance], ClassCreator(arguments=[], body=None, cons...
Keyword[public] Keyword[static] Keyword[void] identifier[setThreadInstance] operator[SEP] identifier[Application] identifier[application] operator[SEP] { Keyword[if] operator[SEP] identifier[instance] operator[==] Other[null] operator[SEP] { identifier[instance] operator[=] Keyword[new] identifier[Thr...
protected void sendMessage(CmsUUID toUserId, String message, boolean hasErrors) { CmsDbContext dbc = m_dbContextFactory.getDbContext(); try { CmsUser toUser = m_driverManager.readUser(dbc, toUserId); CmsUserSettings settings = new CmsUserSettings(toUser); if (setting...
class class_name[name] begin[{] method[sendMessage, return_type[void], modifier[protected], parameter[toUserId, message, hasErrors]] begin[{] local_variable[type[CmsDbContext], dbc] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initi...
Keyword[protected] Keyword[void] identifier[sendMessage] operator[SEP] identifier[CmsUUID] identifier[toUserId] , identifier[String] identifier[message] , Keyword[boolean] identifier[hasErrors] operator[SEP] { identifier[CmsDbContext] identifier[dbc] operator[=] identifier[m_dbContextFactory] operator[SEP] ide...
private List<String> determineListOfDownloadsToProcess() { List<String> list = new ArrayList<>(); if (!Config.getBoolConfigProperty(ConfigProperty.DOWNLOAD_DEPENDENCIES)) { return list; } // for IEDriver if (SystemUtils.IS_OS_WINDOWS && !checkForPres...
class class_name[name] begin[{] method[determineListOfDownloadsToProcess, return_type[type[List]], modifier[private], parameter[]] begin[{] local_variable[type[List], list] if[call[Config.getBoolConfigProperty, parameter[member[ConfigProperty.DOWNLOAD_DEPENDENCIES]]]] begin[{] ...
Keyword[private] identifier[List] operator[<] identifier[String] operator[>] identifier[determineListOfDownloadsToProcess] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP...
public UpdateUserPoolRequest withAutoVerifiedAttributes(String... autoVerifiedAttributes) { if (this.autoVerifiedAttributes == null) { setAutoVerifiedAttributes(new java.util.ArrayList<String>(autoVerifiedAttributes.length)); } for (String ele : autoVerifiedAttributes) { ...
class class_name[name] begin[{] method[withAutoVerifiedAttributes, return_type[type[UpdateUserPoolRequest]], modifier[public], parameter[autoVerifiedAttributes]] begin[{] if[binary_operation[THIS[member[None.autoVerifiedAttributes]], ==, literal[null]]] begin[{] call[.se...
Keyword[public] identifier[UpdateUserPoolRequest] identifier[withAutoVerifiedAttributes] operator[SEP] identifier[String] operator[...] identifier[autoVerifiedAttributes] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[autoVerifiedAttributes] operator[==] Other[null] operator[SEP...
public void marshall(CreatePrivateVirtualInterfaceRequest createPrivateVirtualInterfaceRequest, ProtocolMarshaller protocolMarshaller) { if (createPrivateVirtualInterfaceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { ...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[createPrivateVirtualInterfaceRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.createPrivateVirtualInterfaceRequest], ==, literal[null]]] begin[{] ThrowStatement(expressi...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CreatePrivateVirtualInterfaceRequest] identifier[createPrivateVirtualInterfaceRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[createPrivateVirtualInterfaceReq...
public Vector3f mul(Vector3fc v, Vector3f dest) { dest.x = x * v.x(); dest.y = y * v.y(); dest.z = z * v.z(); return dest; }
class class_name[name] begin[{] method[mul, return_type[type[Vector3f]], modifier[public], parameter[v, dest]] begin[{] assign[member[dest.x], binary_operation[member[.x], *, call[v.x, parameter[]]]] assign[member[dest.y], binary_operation[member[.y], *, call[v.y, parameter[]]]]...
Keyword[public] identifier[Vector3f] identifier[mul] operator[SEP] identifier[Vector3fc] identifier[v] , identifier[Vector3f] identifier[dest] operator[SEP] { identifier[dest] operator[SEP] identifier[x] operator[=] identifier[x] operator[*] identifier[v] operator[SEP] identifier[x] operator[SEP] operator[SEP] ...
static public void copyStream(Reader reader, Writer writer, int transferBufferSize) throws IOException { if( transferBufferSize < 1 ) { throw new IOException("Transfer buffer size can not be smaller than 1"); } char[] buffer = new char[transferBufferSize]; int bytesRead = reader.read(buffer); while( byte...
class class_name[name] begin[{] method[copyStream, return_type[void], modifier[public static], parameter[reader, writer, transferBufferSize]] begin[{] if[binary_operation[member[.transferBufferSize], <, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(...
Keyword[static] Keyword[public] Keyword[void] identifier[copyStream] operator[SEP] identifier[Reader] identifier[reader] , identifier[Writer] identifier[writer] , Keyword[int] identifier[transferBufferSize] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[transferBuf...
protected void addProfileRoles(final LdapEntry userEntry, final CommonProfile profile, final LdapAttribute attribute, final String prefix) { addProfileRolesFromAttributes(profile, attribute, prefix); }
class class_name[name] begin[{] method[addProfileRoles, return_type[void], modifier[protected], parameter[userEntry, profile, attribute, prefix]] begin[{] call[.addProfileRolesFromAttributes, parameter[member[.profile], member[.attribute], member[.prefix]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[addProfileRoles] operator[SEP] Keyword[final] identifier[LdapEntry] identifier[userEntry] , Keyword[final] identifier[CommonProfile] identifier[profile] , Keyword[final] identifier[LdapAttribute] identifier[attribute] , Keyword[final] identifier[String] identifier[prefix] ...
public void initializeCounter(String name) { String escapedName = keyHandler.handle(name); for (MonitorPlugin p : getPlugins()) { p.initializeCounter(escapedName); } }
class class_name[name] begin[{] method[initializeCounter, return_type[void], modifier[public], parameter[name]] begin[{] local_variable[type[String], escapedName] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(...
Keyword[public] Keyword[void] identifier[initializeCounter] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[String] identifier[escapedName] operator[=] identifier[keyHandler] operator[SEP] identifier[handle] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[for] oper...
public static int getPageIndex() { String pageIndex = Params.get(PAGENO); int resultno = 1; if (Strings.isNotBlank(pageIndex)) resultno = Numbers.toInt(pageIndex.trim()); if (resultno < 1) resultno = Page.DEFAULT_PAGE_NUM; return resultno; }
class class_name[name] begin[{] method[getPageIndex, return_type[type[int]], modifier[public static], parameter[]] begin[{] local_variable[type[String], pageIndex] local_variable[type[int], resultno] if[call[Strings.isNotBlank, parameter[member[.pageIndex]]]] begin[{] ...
Keyword[public] Keyword[static] Keyword[int] identifier[getPageIndex] operator[SEP] operator[SEP] { identifier[String] identifier[pageIndex] operator[=] identifier[Params] operator[SEP] identifier[get] operator[SEP] identifier[PAGENO] operator[SEP] operator[SEP] Keyword[int] identifier[resultno] operator[=] Othe...
private Set<String> loadWords(InputStream stream) throws IOException { Set<String> words = new HashSet<>(); try ( InputStreamReader isr = new InputStreamReader(stream, "UTF-8"); BufferedReader br = new BufferedReader(isr) ) { String line; while ((line = br.readLine()) != null) { ...
class class_name[name] begin[{] method[loadWords, return_type[type[Set]], modifier[private], parameter[stream]] begin[{] local_variable[type[Set], words] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=line)], mo...
Keyword[private] identifier[Set] operator[<] identifier[String] operator[>] identifier[loadWords] operator[SEP] identifier[InputStream] identifier[stream] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Set] operator[<] identifier[String] operator[>] identifier[words] operator[=] Keyword[new] ...
public Observable<Page<DeletedCertificateItem>> getDeletedCertificatesNextAsync(final String nextPageLink) { return getDeletedCertificatesNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<DeletedCertificateItem>>, Page<DeletedCertificateItem>>() { @Overri...
class class_name[name] begin[{] method[getDeletedCertificatesNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] return[call[.getDeletedCertificatesNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[DeletedCertificateItem] operator[>] operator[>] identifier[getDeletedCertificatesNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[return] identifier[getDeletedCert...
public void marshall(CreateNotebookInstanceRequest createNotebookInstanceRequest, ProtocolMarshaller protocolMarshaller) { if (createNotebookInstanceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.m...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[createNotebookInstanceRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.createNotebookInstanceRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreato...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CreateNotebookInstanceRequest] identifier[createNotebookInstanceRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[createNotebookInstanceRequest] operator[==] Ot...
public static void main(final String[] args) { if (args.length > 0 && (args[0].equals("--version") || args[0].equals("-v"))) out(getLibraryHeader(false)); else { out(getLibraryHeader(true)); out(sep + "Supported protocols: " + supportedProtocols().collect(joining(", "))); } }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] if[binary_operation[binary_operation[member[args.length], >, literal[0]], &&, binary_operation[member[.args], ||, member[.args]]]] begin[{] call[.out, parameter[call[.g...
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[>] Other[0] operator[&&] operator[SEP] identifier[args] ...
@Override public int[] predict(INDArray d) { INDArray output = output(d, Layer.TrainingMode.TEST); // FIXME: int cast int[] ret = new int[(int) d.size(0)]; if (d.isRowVectorOrScalar()) ret[0] = Nd4j.getBlasWrapper().iamax(output); else { for (int i = ...
class class_name[name] begin[{] method[predict, return_type[type[int]], modifier[public], parameter[d]] begin[{] local_variable[type[INDArray], output] local_variable[type[int], ret] if[call[d.isRowVectorOrScalar, parameter[]]] begin[{] assign[member[.ret], call[Nd4j...
annotation[@] identifier[Override] Keyword[public] Keyword[int] operator[SEP] operator[SEP] identifier[predict] operator[SEP] identifier[INDArray] identifier[d] operator[SEP] { identifier[INDArray] identifier[output] operator[=] identifier[output] operator[SEP] identifier[d] , identifier[Layer] operator[SEP] id...
public static Rectangle grow (Rectangle source, Rectangle target) { if (target == null) { log.warning("Can't grow with null rectangle [src=" + source + ", tgt=" + target + "].", new Exception()); } else if (source == null) { source = new Rectangle(targ...
class class_name[name] begin[{] method[grow, return_type[type[Rectangle]], modifier[public static], parameter[source, target]] begin[{] if[binary_operation[member[.target], ==, literal[null]]] begin[{] call[log.warning, parameter[binary_operation[binary_operation[binary_...
Keyword[public] Keyword[static] identifier[Rectangle] identifier[grow] operator[SEP] identifier[Rectangle] identifier[source] , identifier[Rectangle] identifier[target] operator[SEP] { Keyword[if] operator[SEP] identifier[target] operator[==] Other[null] operator[SEP] { identifier[log] operator[SEP] ...
public static Invoker getInvoker(Object proxyObject, String proxyType) { try { ExtensionClass<Proxy> ext = ExtensionLoaderFactory.getExtensionLoader(Proxy.class) .getExtensionClass(proxyType); if (ext == null) { throw ExceptionUtils.buildRuntime("consumer....
class class_name[name] begin[{] method[getInvoker, return_type[type[Invoker]], modifier[public static], parameter[proxyObject, proxyType]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassRe...
Keyword[public] Keyword[static] identifier[Invoker] identifier[getInvoker] operator[SEP] identifier[Object] identifier[proxyObject] , identifier[String] identifier[proxyType] operator[SEP] { Keyword[try] { identifier[ExtensionClass] operator[<] identifier[Proxy] operator[>] identifier[ext] operator[=...
public void reset() { this.state = State.FREE; this.level = Integer.MAX_VALUE; this.mark = 0; this.reason = null; }
class class_name[name] begin[{] method[reset, return_type[void], modifier[public], parameter[]] begin[{] assign[THIS[member[None.state]], member[State.FREE]] assign[THIS[member[None.level]], member[Integer.MAX_VALUE]] assign[THIS[member[None.mark]], literal[0]] ...
Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[state] operator[=] identifier[State] operator[SEP] identifier[FREE] operator[SEP] Keyword[this] operator[SEP] identifier[level] operator[=] identifier[Integer] operator[SEP] identifier[MAX_VALUE] ...
public TwoColors getTexturedButtonInteriorColors(CommonControlState type) { switch (type) { case DISABLED: return texturedButtonInteriorDisabled; case DISABLED_SELECTED: return texturedButtonInteriorDisabledSelected; case ENABLED: return texturedBut...
class class_name[name] begin[{] method[getTexturedButtonInteriorColors, return_type[type[TwoColors]], modifier[public], parameter[type]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['DISABLED'], statements=[ReturnStatement(expression=MemberReference(member=texturedButtonInteriorDisabled, p...
Keyword[public] identifier[TwoColors] identifier[getTexturedButtonInteriorColors] operator[SEP] identifier[CommonControlState] identifier[type] operator[SEP] { Keyword[switch] operator[SEP] identifier[type] operator[SEP] { Keyword[case] identifier[DISABLED] operator[:] Keyword[return] identifier[text...
public com.squareup.okhttp.Call getCharactersCharacterIdCalendarEventIdAsync(Integer characterId, Integer eventId, String datasource, String ifNoneMatch, String token, final ApiCallback<CharacterCalendarEventResponse> callback) throws ApiException { com.squareup.okhttp.Call call = getCh...
class class_name[name] begin[{] method[getCharactersCharacterIdCalendarEventIdAsync, return_type[type[com]], modifier[public], parameter[characterId, eventId, datasource, ifNoneMatch, token, callback]] begin[{] local_variable[type[com], call] local_variable[type[Type], localVarReturnType] ...
Keyword[public] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[getCharactersCharacterIdCalendarEventIdAsync] operator[SEP] identifier[Integer] identifier[characterId] , identifier[Integer] identifier[eventId] , identifier[String] identifie...
protected void setRegion(float cx, float cy) { x0 = cx - radius; y0 = cy - radius; if( x0 < 0 ) { x0 = 0;} else if( x0+width > image.width ) { x0 = image.width-width; } if( y0 < 0 ) { y0 = 0;} else if( y0+width > image.height ) { y0 = image.height-width; } }
class class_name[name] begin[{] method[setRegion, return_type[void], modifier[protected], parameter[cx, cy]] begin[{] assign[member[.x0], binary_operation[member[.cx], -, member[.radius]]] assign[member[.y0], binary_operation[member[.cy], -, member[.radius]]] if[...
Keyword[protected] Keyword[void] identifier[setRegion] operator[SEP] Keyword[float] identifier[cx] , Keyword[float] identifier[cy] operator[SEP] { identifier[x0] operator[=] identifier[cx] operator[-] identifier[radius] operator[SEP] identifier[y0] operator[=] identifier[cy] operator[-] identifier[radius] opera...
public String dialogTitle() { StringBuffer html = new StringBuffer(512); String toolPath = getCurrentToolPath(); String parentPath = getParentPath(); String rootKey = getToolManager().getCurrentRoot(this).getKey(); String upLevelLink = computeUpLevelLink(); html.append(...
class class_name[name] begin[{] method[dialogTitle, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuffer], html] local_variable[type[String], toolPath] local_variable[type[String], parentPath] local_variable[type[String], rootKey] ...
Keyword[public] identifier[String] identifier[dialogTitle] operator[SEP] operator[SEP] { identifier[StringBuffer] identifier[html] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] Other[512] operator[SEP] operator[SEP] identifier[String] identifier[toolPath] operator[=] identifier[getCurrentToolPa...
public Observable<Page<ExpressRouteCrossConnectionInner>> listByResourceGroupNextAsync(final String nextPageLink) { return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<ExpressRouteCrossConnectionInner>>, Page<ExpressRouteCrossConnectionInner>>() {...
class class_name[name] begin[{] method[listByResourceGroupNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] return[call[.listByResourceGroupNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[ExpressRouteCrossConnectionInner] operator[>] operator[>] identifier[listByResourceGroupNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[return] identifier[listByR...
public static void main(String args[]) throws IOException { String url = "C:/data/badmodels/RUC_CONUS_80km_20051211_1900.nc"; try (NetcdfDatasetInfo info = new NetcdfDatasetInfo(url)) { String infoString = info.writeXML(); System.out.println(infoString); } }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] local_variable[type[String], url] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments...
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] identifier[args] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[url] operator[=] literal[String] operator[SEP] Keyword[try] operator[SEP] identifier[N...
public void marshall(ParameterInlinePolicy parameterInlinePolicy, ProtocolMarshaller protocolMarshaller) { if (parameterInlinePolicy == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(parameterInlineP...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[parameterInlinePolicy, protocolMarshaller]] begin[{] if[binary_operation[member[.parameterInlinePolicy], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Lit...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ParameterInlinePolicy] identifier[parameterInlinePolicy] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[parameterInlinePolicy] operator[==] Other[null] operator[SEP] ...
public static long getTimestampMillis(Binary timestampBinary) { if (timestampBinary.length() != BYTES_IN_INT96_TIMESTAMP) { throw new IllegalArgumentException("Parquet timestamp must be 12 bytes long, actual " + timestampBinary.length()); } byte[] bytes = timestampBinary.getBytes(); // little end...
class class_name[name] begin[{] method[getTimestampMillis, return_type[type[long]], modifier[public static], parameter[timestampBinary]] begin[{] if[binary_operation[call[timestampBinary.length, parameter[]], !=, member[.BYTES_IN_INT96_TIMESTAMP]]] begin[{] ThrowStatement(expression...
Keyword[public] Keyword[static] Keyword[long] identifier[getTimestampMillis] operator[SEP] identifier[Binary] identifier[timestampBinary] operator[SEP] { Keyword[if] operator[SEP] identifier[timestampBinary] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] identifier[BYTES_IN_INT96_TIMES...
@Override public boolean createFeatureTileLinkTable() { verifyWritable(); boolean created = false; FeatureTileLinkDao dao = getFeatureTileLinkDao(); try { if (!dao.isTableExists()) { created = tableCreator.createFeatureTileLink() > 0; } } catch (SQLException e) { throw new GeoPackageException("...
class class_name[name] begin[{] method[createFeatureTileLinkTable, return_type[type[boolean]], modifier[public], parameter[]] begin[{] call[.verifyWritable, parameter[]] local_variable[type[boolean], created] local_variable[type[FeatureTileLinkDao], dao] TryStatement(blo...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[createFeatureTileLinkTable] operator[SEP] operator[SEP] { identifier[verifyWritable] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[created] operator[=] literal[boolean] operator[SEP] identifier[FeatureTileLinkD...
public <A, B, C, D, E, R> R callAdd(A a, B b, C c, D d, E e, Notifier<A, B, C, D, E, R> notifier){ R result = notifier.apply(a, b, c, d, e); return result; }
class class_name[name] begin[{] method[callAdd, return_type[type[R]], modifier[public], parameter[a, b, c, d, e, notifier]] begin[{] local_variable[type[R], result] return[member[.result]] end[}] END[}]
Keyword[public] operator[<] identifier[A] , identifier[B] , identifier[C] , identifier[D] , identifier[E] , identifier[R] operator[>] identifier[R] identifier[callAdd] operator[SEP] identifier[A] identifier[a] , identifier[B] identifier[b] , identifier[C] identifier[c] , identifier[D] identifier[d] , identifie...
public synchronized boolean reloadConfigsIfNecessary() { long time = RaidNode.now(); if (time > lastReloadAttempt + reloadInterval) { lastReloadAttempt = time; try { File file = new File(configFileName); long lastModified = file.lastModified(); if (lastModified > lastSuccessf...
class class_name[name] begin[{] method[reloadConfigsIfNecessary, return_type[type[boolean]], modifier[synchronized public], parameter[]] begin[{] local_variable[type[long], time] if[binary_operation[member[.time], >, binary_operation[member[.lastReloadAttempt], +, member[.reloadInterval...
Keyword[public] Keyword[synchronized] Keyword[boolean] identifier[reloadConfigsIfNecessary] operator[SEP] operator[SEP] { Keyword[long] identifier[time] operator[=] identifier[RaidNode] operator[SEP] identifier[now] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[time] operator[>] ...
public WebSocket recognizeUsingWebSocket(RecognizeOptions recognizeOptions, RecognizeCallback callback) { Validator.notNull(recognizeOptions, "recognizeOptions cannot be null"); Validator.notNull(recognizeOptions.audio(), "audio cannot be null"); Validator.notNull(callback, "callback cannot be null"); ...
class class_name[name] begin[{] method[recognizeUsingWebSocket, return_type[type[WebSocket]], modifier[public], parameter[recognizeOptions, callback]] begin[{] call[Validator.notNull, parameter[member[.recognizeOptions], literal["recognizeOptions cannot be null"]]] call[Validato...
Keyword[public] identifier[WebSocket] identifier[recognizeUsingWebSocket] operator[SEP] identifier[RecognizeOptions] identifier[recognizeOptions] , identifier[RecognizeCallback] identifier[callback] operator[SEP] { identifier[Validator] operator[SEP] identifier[notNull] operator[SEP] identifier[recognizeOptions...
void dump(PrintWriter stream) { stream.print("[size=" + count); for (int i = 0; i < count; i++) { if (i != 0) { stream.print(", "); stream.print(timeStamps[i] - timeStamps[i - 1]); } else { stream.print(" " + timeStamps[i]); } } str...
class class_name[name] begin[{] method[dump, return_type[void], modifier[default], parameter[stream]] begin[{] call[stream.print, parameter[binary_operation[literal["[size="], +, member[.count]]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOpera...
Keyword[void] identifier[dump] operator[SEP] identifier[PrintWriter] identifier[stream] operator[SEP] { identifier[stream] operator[SEP] identifier[print] operator[SEP] literal[String] operator[+] identifier[count] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Othe...
public Map<String, DateTimeZone> compile(File outputDir, File[] sources) throws IOException { if (sources != null) { for (int i=0; i<sources.length; i++) { BufferedReader in = null; try { in = new BufferedReader(new FileReader(sources[i])); ...
class class_name[name] begin[{] method[compile, return_type[type[Map]], modifier[public], parameter[outputDir, sources]] begin[{] if[binary_operation[member[.sources], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(anno...
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[DateTimeZone] operator[>] identifier[compile] operator[SEP] identifier[File] identifier[outputDir] , identifier[File] operator[SEP] operator[SEP] identifier[sources] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] o...
public static Object readPrimitive(Class<?> clazz, String value) throws Exception { if (clazz == String.class) { return value; } else if (clazz == Long.class) { return Long.parseLong(value); } else if (clazz == Integer.class) { return Integer.parseInt(value); ...
class class_name[name] begin[{] method[readPrimitive, return_type[type[Object]], modifier[public static], parameter[clazz, value]] begin[{] if[binary_operation[member[.clazz], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=No...
Keyword[public] Keyword[static] identifier[Object] identifier[readPrimitive] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[value] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[clazz] operator[==]...
public void stopTime() { this.elapsedTime = System.currentTimeMillis() - this.startTime; this.elapsedCpuTime = (ManagementFactory.getThreadMXBean().getCurrentThreadCpuTime() - this.startCpuTime)/1000000; }
class class_name[name] begin[{] method[stopTime, return_type[void], modifier[public], parameter[]] begin[{] assign[THIS[member[None.elapsedTime]], binary_operation[call[System.currentTimeMillis, parameter[]], -, THIS[member[None.startTime]]]] assign[THIS[member[None.elapsedCpuTi...
Keyword[public] Keyword[void] identifier[stopTime] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[elapsedTime] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[-] Keyword[this] operator[SEP] identifier[startTime] operator[SEP] K...
@Override public DeleteTransitGatewayResult deleteTransitGateway(DeleteTransitGatewayRequest request) { request = beforeClientExecution(request); return executeDeleteTransitGateway(request); }
class class_name[name] begin[{] method[deleteTransitGateway, return_type[type[DeleteTransitGatewayResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDeleteTransitGateway, parame...
annotation[@] identifier[Override] Keyword[public] identifier[DeleteTransitGatewayResult] identifier[deleteTransitGateway] operator[SEP] identifier[DeleteTransitGatewayRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ...
public void addAnnotationTypeDeprecationInfo(Content annotationInfoTree) { Content hr = new HtmlTree(HtmlTag.HR); annotationInfoTree.addContent(hr); Tag[] deprs = annotationType.tags("deprecated"); if (Util.isDeprecated(annotationType)) { Content deprLabel = HtmlTree.SPAN(Htm...
class class_name[name] begin[{] method[addAnnotationTypeDeprecationInfo, return_type[void], modifier[public], parameter[annotationInfoTree]] begin[{] local_variable[type[Content], hr] call[annotationInfoTree.addContent, parameter[member[.hr]]] local_variable[type[Tag], deprs] ...
Keyword[public] Keyword[void] identifier[addAnnotationTypeDeprecationInfo] operator[SEP] identifier[Content] identifier[annotationInfoTree] operator[SEP] { identifier[Content] identifier[hr] operator[=] Keyword[new] identifier[HtmlTree] operator[SEP] identifier[HtmlTag] operator[SEP] identifier[HR] operator[SEP]...
boolean isQueryBean(String owner) { int subPackagePos = owner.lastIndexOf("/query/"); if (subPackagePos > -1) { String suffix = owner.substring(subPackagePos); if (isQueryBeanSuffix(suffix)) { String domainPackage = owner.substring(0, subPackagePos + 1); return isQueryBeanPackage(do...
class class_name[name] begin[{] method[isQueryBean, return_type[type[boolean]], modifier[default], parameter[owner]] begin[{] local_variable[type[int], subPackagePos] if[binary_operation[member[.subPackagePos], >, literal[1]]] begin[{] local_variable[type[String], suffix] ...
Keyword[boolean] identifier[isQueryBean] operator[SEP] identifier[String] identifier[owner] operator[SEP] { Keyword[int] identifier[subPackagePos] operator[=] identifier[owner] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sub...
private synchronized void initModuleExportPoints() { Set<CmsExportPoint> exportPoints = new HashSet<CmsExportPoint>(); Iterator<CmsModule> i = m_modules.values().iterator(); while (i.hasNext()) { CmsModule module = i.next(); List<CmsExportPoint> moduleExportPoints = modu...
class class_name[name] begin[{] method[initModuleExportPoints, return_type[void], modifier[synchronized private], parameter[]] begin[{] local_variable[type[Set], exportPoints] local_variable[type[Iterator], i] while[call[i.hasNext, parameter[]]] begin[{] local_variab...
Keyword[private] Keyword[synchronized] Keyword[void] identifier[initModuleExportPoints] operator[SEP] operator[SEP] { identifier[Set] operator[<] identifier[CmsExportPoint] operator[>] identifier[exportPoints] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[CmsExportPoint] operator[>] operato...
public void submitContextString(final String evaluatorConfigurationString, final String contextConfigurationString) { if (evaluatorConfigurationString.isEmpty()) { throw new RuntimeException("empty evaluatorConfigurationString provided."); } if (contextConfigurationSt...
class class_name[name] begin[{] method[submitContextString, return_type[void], modifier[public], parameter[evaluatorConfigurationString, contextConfigurationString]] begin[{] if[call[evaluatorConfigurationString.isEmpty, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(...
Keyword[public] Keyword[void] identifier[submitContextString] operator[SEP] Keyword[final] identifier[String] identifier[evaluatorConfigurationString] , Keyword[final] identifier[String] identifier[contextConfigurationString] operator[SEP] { Keyword[if] operator[SEP] identifier[evaluatorConfigurationString] ope...
private void addNthChild() { for (Node node : nodes) { int count = 1; Node n = DOMHelper.getPreviousSiblingElement(node); while (n != null) { count++; n = DOMHelper.getPreviousSiblingElement(n); } if...
class class_name[name] begin[{] method[addNthChild, return_type[void], modifier[private], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], pref...
Keyword[private] Keyword[void] identifier[addNthChild] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Node] identifier[node] operator[:] identifier[nodes] operator[SEP] { Keyword[int] identifier[count] operator[=] Other[1] operator[SEP] identifier[Node] identifier[n] operator[=] ...
public void onInviteEvent(javax.sip.RequestEvent requestEvent, ActivityContextInterface aci) { final ServerTransaction serverTransaction = requestEvent .getServerTransaction(); try { // send "trying" response Response response = messageFactory.createResponse(Response.TRYING, requestEvent.getRequ...
class class_name[name] begin[{] method[onInviteEvent, return_type[void], modifier[public], parameter[requestEvent, aci]] begin[{] local_variable[type[ServerTransaction], serverTransaction] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[]...
Keyword[public] Keyword[void] identifier[onInviteEvent] operator[SEP] identifier[javax] operator[SEP] identifier[sip] operator[SEP] identifier[RequestEvent] identifier[requestEvent] , identifier[ActivityContextInterface] identifier[aci] operator[SEP] { Keyword[final] identifier[ServerTransaction] identifier[ser...
private String calculateDynamicSkinUrlPathToUse(PortletRequest request, String lessfileBaseName) throws IOException { final DynamicSkinInstanceData data = new DefaultDynamicSkinInstanceDataImpl(request); if (!service.skinCssFileExists(data)) { // Trigger the LESS compilation ...
class class_name[name] begin[{] method[calculateDynamicSkinUrlPathToUse, return_type[type[String]], modifier[private], parameter[request, lessfileBaseName]] begin[{] local_variable[type[DynamicSkinInstanceData], data] if[call[service.skinCssFileExists, parameter[member[.data]]]] begin[{...
Keyword[private] identifier[String] identifier[calculateDynamicSkinUrlPathToUse] operator[SEP] identifier[PortletRequest] identifier[request] , identifier[String] identifier[lessfileBaseName] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[DynamicSkinInstanceData] identifier[da...
public void format(XtextResource resource) { assert resource != null; final String result = formatResource(resource); // Write back to the resource try (StringInputStream stringInputStream = new StringInputStream(result)) { resource.load(stringInputStream, Collections.emptyMap()); } catch (Exception except...
class class_name[name] begin[{] method[format, return_type[void], modifier[public], parameter[resource]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=...
Keyword[public] Keyword[void] identifier[format] operator[SEP] identifier[XtextResource] identifier[resource] operator[SEP] { Keyword[assert] identifier[resource] operator[!=] Other[null] operator[SEP] Keyword[final] identifier[String] identifier[result] operator[=] identifier[formatResource] operator[SEP] ident...
public static boolean match(Object value1, Object value2) { if (value1 == null && value2 == null) return true; if (value1 == null || value2 == null) return false; String string1 = value1.toString(); String string2 = value2.toString(); return string1.matches(string2); }
class class_name[name] begin[{] method[match, return_type[type[boolean]], modifier[public static], parameter[value1, value2]] begin[{] if[binary_operation[binary_operation[member[.value1], ==, literal[null]], &&, binary_operation[member[.value2], ==, literal[null]]]] begin[{] return[literal[tru...
Keyword[public] Keyword[static] Keyword[boolean] identifier[match] operator[SEP] identifier[Object] identifier[value1] , identifier[Object] identifier[value2] operator[SEP] { Keyword[if] operator[SEP] identifier[value1] operator[==] Other[null] operator[&&] identifier[value2] operator[==] Other[null] operator[S...
public List<Revision> getDiscussionArchiveRevisionsForArticleRevision(int revisionId) throws WikiApiException, WikiPageNotFoundException{ List<Revision> result = new LinkedList<Revision>(); //get article revision Revision rev = revApi.getRevision(revisionId); Timestamp revTime = rev.getTimeStamp(); /...
class class_name[name] begin[{] method[getDiscussionArchiveRevisionsForArticleRevision, return_type[type[List]], modifier[public], parameter[revisionId]] begin[{] local_variable[type[List], result] local_variable[type[Revision], rev] local_variable[type[Timestamp], revTime] loca...
Keyword[public] identifier[List] operator[<] identifier[Revision] operator[>] identifier[getDiscussionArchiveRevisionsForArticleRevision] operator[SEP] Keyword[int] identifier[revisionId] operator[SEP] Keyword[throws] identifier[WikiApiException] , identifier[WikiPageNotFoundException] { identifier[List] operat...
public URI getPath(final org.eclipse.aether.artifact.Artifact artifact) { return toUri(pathOf(new DefaultArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getBaseVersion(), "", artifact.getExtension(), artifact.getClassifier(), new DefaultArtifactHandler...
class class_name[name] begin[{] method[getPath, return_type[type[URI]], modifier[public], parameter[artifact]] begin[{] return[call[.toUri, parameter[call[.pathOf, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getGroupId, postfix_operators=[], prefix_operators=[], qualifier=ar...
Keyword[public] identifier[URI] identifier[getPath] operator[SEP] Keyword[final] identifier[org] operator[SEP] identifier[eclipse] operator[SEP] identifier[aether] operator[SEP] identifier[artifact] operator[SEP] identifier[Artifact] identifier[artifact] operator[SEP] { Keyword[return] identifier[toUri] operator...
static String createAuthorizationSignatureV4( HttpServletRequest request, S3AuthorizationHeader authHeader, byte[] payload, String uri, String credential) throws InvalidKeyException, IOException, NoSuchAlgorithmException, S3Exception { String canonicalRequest = cr...
class class_name[name] begin[{] method[createAuthorizationSignatureV4, return_type[type[String]], modifier[static], parameter[request, authHeader, payload, uri, credential]] begin[{] local_variable[type[String], canonicalRequest] local_variable[type[String], algorithm] local_variable[ty...
Keyword[static] identifier[String] identifier[createAuthorizationSignatureV4] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[S3AuthorizationHeader] identifier[authHeader] , Keyword[byte] operator[SEP] operator[SEP] identifier[payload] , identifier[String] identifier[uri] , identifier[...
private String fixRequestPath(String path) { return path.endsWith("/") ? path.substring(0, path.length() - 1) : path; }
class class_name[name] begin[{] method[fixRequestPath, return_type[type[String]], modifier[private], parameter[path]] begin[{] return[TernaryExpression(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=endsWith, po...
Keyword[private] identifier[String] identifier[fixRequestPath] operator[SEP] identifier[String] identifier[path] operator[SEP] { Keyword[return] identifier[path] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[?] identifier[path] operator[SEP] identifier[substring] operato...
@Override public EClass getIfcBlock() { if (ifcBlockEClass == null) { ifcBlockEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI).getEClassifiers() .get(42); } return ifcBlockEClass; }
class class_name[name] begin[{] method[getIfcBlock, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcBlockEClass], ==, literal[null]]] begin[{] assign[member[.ifcBlockEClass], Cast(expression=MethodInvocation(arguments=[Me...
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcBlock] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcBlockEClass] operator[==] Other[null] operator[SEP] { identifier[ifcBlockEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP...
public String getValueFromCell(int row, int column) { if (row < 1 || column < 1) { throw new IllegalArgumentException("Row and column must start from 1"); } List<WebElement> elements = HtmlElementUtils.locateElements(getXPathBase() + "tr"); List<WebElement> cells = elements.g...
class class_name[name] begin[{] method[getValueFromCell, return_type[type[String]], modifier[public], parameter[row, column]] begin[{] if[binary_operation[binary_operation[member[.row], <, literal[1]], ||, binary_operation[member[.column], <, literal[1]]]] begin[{] ThrowStatement(ex...
Keyword[public] identifier[String] identifier[getValueFromCell] operator[SEP] Keyword[int] identifier[row] , Keyword[int] identifier[column] operator[SEP] { Keyword[if] operator[SEP] identifier[row] operator[<] Other[1] operator[||] identifier[column] operator[<] Other[1] operator[SEP] { Keyword[thro...
protected String getOptionsString() { final ArrayList<String> vars = new ArrayList<String>(); if (!tags.isEmpty()) { vars.addAll(tags); } if (!removeTags.isEmpty()) { for (final String removeTag : removeTags) { vars.add("-" + removeTag); ...
class class_name[name] begin[{] method[getOptionsString, return_type[type[String]], modifier[protected], parameter[]] begin[{] local_variable[type[ArrayList], vars] if[call[tags.isEmpty, parameter[]]] begin[{] call[vars.addAll, parameter[member[.tags]]] e...
Keyword[protected] identifier[String] identifier[getOptionsString] operator[SEP] operator[SEP] { Keyword[final] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[vars] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] o...
public void setResponses(Map<String, List<Map<String, AttributeValue>>> responses) { this.responses = responses; }
class class_name[name] begin[{] method[setResponses, return_type[void], modifier[public], parameter[responses]] begin[{] assign[THIS[member[None.responses]], member[.responses]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setResponses] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[AttributeValue] operator[>] operator[>] operator[>] identifier[responses] operator[SEP] { Keyword[this] ...
final void add(Level level, String message) throws NullPointerException, IllegalArgumentException { add(Message.create(level, message)); }
class class_name[name] begin[{] method[add, return_type[void], modifier[final], parameter[level, message]] begin[{] call[.add, parameter[call[Message.create, parameter[member[.level], member[.message]]]]] end[}] END[}]
Keyword[final] Keyword[void] identifier[add] operator[SEP] identifier[Level] identifier[level] , identifier[String] identifier[message] operator[SEP] Keyword[throws] identifier[NullPointerException] , identifier[IllegalArgumentException] { identifier[add] operator[SEP] identifier[Message] operator[SEP] identif...
public List<LogEntry> truncateEntriesFrom(long entryIndex) { if (entryIndex <= snapshotIndex()) { throw new IllegalArgumentException("Illegal index: " + entryIndex + ", snapshot index: " + snapshotIndex()); } if (entryIndex > lastLogOrSnapshotIndex()) { throw new IllegalA...
class class_name[name] begin[{] method[truncateEntriesFrom, return_type[type[List]], modifier[public], parameter[entryIndex]] begin[{] if[binary_operation[member[.entryIndex], <=, call[.snapshotIndex, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOp...
Keyword[public] identifier[List] operator[<] identifier[LogEntry] operator[>] identifier[truncateEntriesFrom] operator[SEP] Keyword[long] identifier[entryIndex] operator[SEP] { Keyword[if] operator[SEP] identifier[entryIndex] operator[<=] identifier[snapshotIndex] operator[SEP] operator[SEP] operator[SEP] { ...
@Override public boolean weekdayRange(String wd1, String wd2, String gmt) { boolean useGmt = GMT.equalsIgnoreCase(wd2) || GMT.equalsIgnoreCase(gmt); Calendar cal = getCurrentTime(useGmt); int currentDay = cal.get(Calendar.DAY_OF_WEEK) - 1; int from = DAYS.indexOf(wd1 == null ? null : wd1 .toU...
class class_name[name] begin[{] method[weekdayRange, return_type[type[boolean]], modifier[public], parameter[wd1, wd2, gmt]] begin[{] local_variable[type[boolean], useGmt] local_variable[type[Calendar], cal] local_variable[type[int], currentDay] local_variable[type[int], from] ...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[weekdayRange] operator[SEP] identifier[String] identifier[wd1] , identifier[String] identifier[wd2] , identifier[String] identifier[gmt] operator[SEP] { Keyword[boolean] identifier[useGmt] operator[=] identifier[GMT] operator[SEP] i...
protected GroovyCodeSource getScriptSource(boolean isScriptFile, String script) throws IOException, URISyntaxException { //check the script is currently valid before starting a server against the script if (isScriptFile) { if (uriPattern.matcher(script).matches()) { return ne...
class class_name[name] begin[{] method[getScriptSource, return_type[type[GroovyCodeSource]], modifier[protected], parameter[isScriptFile, script]] begin[{] if[member[.isScriptFile]] begin[{] if[call[uriPattern.matcher, parameter[member[.script]]]] begin[{] ...
Keyword[protected] identifier[GroovyCodeSource] identifier[getScriptSource] operator[SEP] Keyword[boolean] identifier[isScriptFile] , identifier[String] identifier[script] operator[SEP] Keyword[throws] identifier[IOException] , identifier[URISyntaxException] { Keyword[if] operator[SEP] identifier[isScriptFile]...
@Override public boolean doList(String path, ResourceFilter filter) { if(_root == null) return false; RAMEntry entry = _root.getEntryByPath(path); if(entry instanceof RAMDirectory) { RAMDirectory ramDirectory = (RAMDirectory) entry; for(RAMEntry ramEntry : ramDirectory.ls()) ...
class class_name[name] begin[{] method[doList, return_type[type[boolean]], modifier[public], parameter[path, filter]] begin[{] if[binary_operation[member[._root], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[RAMEntry],...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[doList] operator[SEP] identifier[String] identifier[path] , identifier[ResourceFilter] identifier[filter] operator[SEP] { Keyword[if] operator[SEP] identifier[_root] operator[==] Other[null] operator[SEP] Keyword[return] literal[bool...
public static char[] decrypt(char[] password) { if(password == null || password.length == 0) return null; String passwordString = String.valueOf(password); try { byte[] decrypted = null; if (passwordString.startsWith("encrypted(") && passwordString.endsWith(")")) { passwordString = pas...
class class_name[name] begin[{] method[decrypt, return_type[type[char]], modifier[public static], parameter[password]] begin[{] if[binary_operation[binary_operation[member[.password], ==, literal[null]], ||, binary_operation[member[password.length], ==, literal[0]]]] begin[{] return[literal[nul...
Keyword[public] Keyword[static] Keyword[char] operator[SEP] operator[SEP] identifier[decrypt] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[password] operator[SEP] { Keyword[if] operator[SEP] identifier[password] operator[==] Other[null] operator[||] identifier[password] operator[SEP] identi...
public static InputStream fromFile(String filepath) throws FileNotFoundException { if(Strings.isValid(filepath)) { return fromFile(new File(filepath)); } return null; }
class class_name[name] begin[{] method[fromFile, return_type[type[InputStream]], modifier[public static], parameter[filepath]] begin[{] if[call[Strings.isValid, parameter[member[.filepath]]]] begin[{] return[call[.fromFile, parameter[ClassCreator(arguments=[MemberReference(member=fi...
Keyword[public] Keyword[static] identifier[InputStream] identifier[fromFile] operator[SEP] identifier[String] identifier[filepath] operator[SEP] Keyword[throws] identifier[FileNotFoundException] { Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isValid] operator[SEP] identifier[filepath] o...
public static boolean entryEquals(File f1, File f2, String path1, String path2) { ZipFile zf1 = null; ZipFile zf2 = null; try { zf1 = new ZipFile(f1); zf2 = new ZipFile(f2); return doEntryEquals(zf1, zf2, path1, path2); } catch (IOException e) { throw ZipExceptionUtil.rethr...
class class_name[name] begin[{] method[entryEquals, return_type[type[boolean]], modifier[public static], parameter[f1, f2, path1, path2]] begin[{] local_variable[type[ZipFile], zf1] local_variable[type[ZipFile], zf2] TryStatement(block=[StatementExpression(expression=Assignment(expressi...
Keyword[public] Keyword[static] Keyword[boolean] identifier[entryEquals] operator[SEP] identifier[File] identifier[f1] , identifier[File] identifier[f2] , identifier[String] identifier[path1] , identifier[String] identifier[path2] operator[SEP] { identifier[ZipFile] identifier[zf1] operator[=] Other[null] ope...
public void marshall(TerminateJobFlowsRequest terminateJobFlowsRequest, ProtocolMarshaller protocolMarshaller) { if (terminateJobFlowsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(termina...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[terminateJobFlowsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.terminateJobFlowsRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(argument...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[TerminateJobFlowsRequest] identifier[terminateJobFlowsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[terminateJobFlowsRequest] operator[==] Other[null] opera...
public static Class<? extends Command<? extends CLIContext>> getCommandClass( CLIContext context, String commandName) { return context.getHostApplication().getCommands().get(commandName.toLowerCase()); }
class class_name[name] begin[{] method[getCommandClass, return_type[type[Class]], modifier[public static], parameter[context, commandName]] begin[{] return[call[context.getHostApplication, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Command] operator[<] operator[?] Keyword[extends] identifier[CLIContext] operator[>] operator[>] identifier[getCommandClass] operator[SEP] identifier[CLIContext] identifier[context] , identifier[String] identifier[com...
@ArgumentsChecked @Throws(IllegalNullArgumentException.class) public static float checkFloat(@Nonnull final Number number) { Check.notNull(number, "number"); if (!isInFloatRange(number)) { throw new IllegalNumberRangeException(number.toString(), FLOAT_MIN, FLOAT_MAX); } return number.floatValue(); }
class class_name[name] begin[{] method[checkFloat, return_type[type[float]], modifier[public static], parameter[number]] begin[{] call[Check.notNull, parameter[member[.number], literal["number"]]] if[call[.isInFloatRange, parameter[member[.number]]]] begin[{] ThrowSt...
annotation[@] identifier[ArgumentsChecked] annotation[@] identifier[Throws] operator[SEP] identifier[IllegalNullArgumentException] operator[SEP] Keyword[class] operator[SEP] Keyword[public] Keyword[static] Keyword[float] identifier[checkFloat] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Nu...
public void replace(PushbackReader in, int bufferSize, Writer out, ObsoleteReplacer replacer) throws IOException { InputReader reader = Input.getInstance(in, bufferSize); replace(reader, out, replacer); }
class class_name[name] begin[{] method[replace, return_type[void], modifier[public], parameter[in, bufferSize, out, replacer]] begin[{] local_variable[type[InputReader], reader] call[.replace, parameter[member[.reader], member[.out], member[.replacer]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[replace] operator[SEP] identifier[PushbackReader] identifier[in] , Keyword[int] identifier[bufferSize] , identifier[Writer] identifier[out] , identifier[ObsoleteReplacer] identifier[replacer] operator[SEP] Keyword[throws] identifier[IOException] { identifier[InputReade...
private Animator prepareStyle1Animation() { AnimatorSet animation = new AnimatorSet(); final Animator indeterminateAnimation = ObjectAnimator.ofFloat(drawable, CircularProgressDrawable.PROGRESS_PROPERTY, 0, 3600); indeterminateAnimation.setDuration(3600); Animator innerCircleAnimation ...
class class_name[name] begin[{] method[prepareStyle1Animation, return_type[type[Animator]], modifier[private], parameter[]] begin[{] local_variable[type[AnimatorSet], animation] local_variable[type[Animator], indeterminateAnimation] call[indeterminateAnimation.setDuration, param...
Keyword[private] identifier[Animator] identifier[prepareStyle1Animation] operator[SEP] operator[SEP] { identifier[AnimatorSet] identifier[animation] operator[=] Keyword[new] identifier[AnimatorSet] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Animator] identifier[indeterminateAnimation] op...
public void marshall(DeleteDocumentRequest deleteDocumentRequest, ProtocolMarshaller protocolMarshaller) { if (deleteDocumentRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteDocumentRe...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[deleteDocumentRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deleteDocumentRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Lit...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeleteDocumentRequest] identifier[deleteDocumentRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deleteDocumentRequest] operator[==] Other[null] operator[SEP] ...
public void addHandler(CacheMissHandler handler) { if(handler != null) { logger.debug("adding handler of class '{}'", handler.getClass()); handlers.add(handler); } }
class class_name[name] begin[{] method[addHandler, return_type[void], modifier[public], parameter[handler]] begin[{] if[binary_operation[member[.handler], !=, literal[null]]] begin[{] call[logger.debug, parameter[literal["adding handler of class '{}'"], call[handler.getC...
Keyword[public] Keyword[void] identifier[addHandler] operator[SEP] identifier[CacheMissHandler] identifier[handler] operator[SEP] { Keyword[if] operator[SEP] identifier[handler] operator[!=] Other[null] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , ...
public static void consumeMessage(BigEndianBinaryReader in) throws IOException { FieldInfo fieldInfo; while ((fieldInfo = readFieldInfo(in)) != null) { readFieldValue(in, fieldInfo, null, false); } }
class class_name[name] begin[{] method[consumeMessage, return_type[void], modifier[public static], parameter[in]] begin[{] local_variable[type[FieldInfo], fieldInfo] while[binary_operation[assign[member[.fieldInfo], call[.readFieldInfo, parameter[member[.in]]]], !=, literal[null]]] begi...
Keyword[public] Keyword[static] Keyword[void] identifier[consumeMessage] operator[SEP] identifier[BigEndianBinaryReader] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] { identifier[FieldInfo] identifier[fieldInfo] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[fieldInfo...
public void setMaxExcerptLength(String maxExcerptLength) { try { setMaxExcerptLength(Integer.parseInt(maxExcerptLength)); } catch (Exception e) { LOG.error( Messages.get().getBundle().key( Messages.LOG_PARSE_EXCERPT_LENGTH_FAILED_2, ...
class class_name[name] begin[{] method[setMaxExcerptLength, return_type[void], modifier[public], parameter[maxExcerptLength]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=maxExcerptLength, postfix_operators=[]...
Keyword[public] Keyword[void] identifier[setMaxExcerptLength] operator[SEP] identifier[String] identifier[maxExcerptLength] operator[SEP] { Keyword[try] { identifier[setMaxExcerptLength] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[maxExcerptLength] ope...
public void afterThrowing(Throwable original) throws Throwable { Class<?> candidateType = original.getClass(); Throwable candidate = original; if (ClassUtils.isAssignable(MessageException.class, candidateType)) { MessageException me = (MessageException) candidate; if (S...
class class_name[name] begin[{] method[afterThrowing, return_type[void], modifier[public], parameter[original]] begin[{] local_variable[type[Class], candidateType] local_variable[type[Throwable], candidate] if[call[ClassUtils.isAssignable, parameter[ClassReference(postfix_operat...
Keyword[public] Keyword[void] identifier[afterThrowing] operator[SEP] identifier[Throwable] identifier[original] operator[SEP] Keyword[throws] identifier[Throwable] { identifier[Class] operator[<] operator[?] operator[>] identifier[candidateType] operator[=] identifier[original] operator[SEP] identifier[getClass...
public static IBundleProvider newEmptyList() { final InstantDt published = InstantDt.withCurrentTime(); return new IBundleProvider() { @Override public List<IBaseResource> getResources(int theFromIndex, int theToIndex) { return Collections.emptyList(); } @Override public Integer size() { ret...
class class_name[name] begin[{] method[newEmptyList, return_type[type[IBundleProvider]], modifier[public static], parameter[]] begin[{] local_variable[type[InstantDt], published] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], bod...
Keyword[public] Keyword[static] identifier[IBundleProvider] identifier[newEmptyList] operator[SEP] operator[SEP] { Keyword[final] identifier[InstantDt] identifier[published] operator[=] identifier[InstantDt] operator[SEP] identifier[withCurrentTime] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keywo...
protected boolean checkClass(final Class clazz) { try { if (clazz.isAnonymousClass()) { return false; } if (clazz.isArray() || clazz.isEnum()) { return false; } if (clazz.isInterface()) { return false; } if (clazz.isLocalClass()) { return false; } if ((clazz.isMemberClass() ...
class class_name[name] begin[{] method[checkClass, return_type[type[boolean]], modifier[protected], parameter[clazz]] begin[{] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isAnonymousClass, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type...
Keyword[protected] Keyword[boolean] identifier[checkClass] operator[SEP] Keyword[final] identifier[Class] identifier[clazz] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[clazz] operator[SEP] identifier[isAnonymousClass] operator[SEP] operator[SEP] operator[SEP] { K...