code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public <T> DataSet<T> groupReduceOnNeighbors(NeighborsFunction<K, VV, EV, T> neighborsFunction,
EdgeDirection direction, TypeInformation<T> typeInfo) throws IllegalArgumentException {
switch (direction) {
case IN:
// create <edge-sourceVertex> pairs
DataSet<Tuple3<K, Edge<K, EV>, Vertex<K, VV>>> edgesWi... | class class_name[name] begin[{]
method[groupReduceOnNeighbors, return_type[type[DataSet]], modifier[public], parameter[neighborsFunction, direction, typeInfo]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['IN'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDecl... | Keyword[public] operator[<] identifier[T] operator[>] identifier[DataSet] operator[<] identifier[T] operator[>] identifier[groupReduceOnNeighbors] operator[SEP] identifier[NeighborsFunction] operator[<] identifier[K] , identifier[VV] , identifier[EV] , identifier[T] operator[>] identifier[neighborsFunction] , ident... |
public void delete(WriteOptions writeOptions, String key) throws RocksDbException {
delete(DEFAULT_COLUMN_FAMILY, writeOptions, key);
} | class class_name[name] begin[{]
method[delete, return_type[void], modifier[public], parameter[writeOptions, key]] begin[{]
call[.delete, parameter[member[.DEFAULT_COLUMN_FAMILY], member[.writeOptions], member[.key]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[delete] operator[SEP] identifier[WriteOptions] identifier[writeOptions] , identifier[String] identifier[key] operator[SEP] Keyword[throws] identifier[RocksDbException] {
identifier[delete] operator[SEP] identifier[DEFAULT_COLUMN_FAMILY] , identifier[writeOptions] , ide... |
public static final String compact(String name) {
Set<String> parts = new LinkedHashSet<String>();
for (String part : name.split(SPLITTER_REGEX)) {
parts.add(part);
}
return join(parts,"");
} | class class_name[name] begin[{]
method[compact, return_type[type[String]], modifier[final public static], parameter[name]] begin[{]
local_variable[type[Set], parts]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReferenc... | Keyword[public] Keyword[static] Keyword[final] identifier[String] identifier[compact] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[parts] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] identifier[String] op... |
public static <T> Boolean isEqualList(List<T> list1, List<T> list2) {
if (list1 == list2) {
return Boolean.TRUE;
} else if ((list1 == null) || (list2 == null) || (list1.size() != list2.size())) {
return Boolean.FALSE;
}
final Iterator<T> itr1 = list1.iterator();... | class class_name[name] begin[{]
method[isEqualList, return_type[type[Boolean]], modifier[public static], parameter[list1, list2]] begin[{]
if[binary_operation[member[.list1], ==, member[.list2]]] begin[{]
return[member[Boolean.TRUE]]
else begin[{]
if[binary_opera... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Boolean] identifier[isEqualList] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[list1] , identifier[List] operator[<] identifier[T] operator[>] identifier[list2] operator[SEP] {
Keyword[if] operator... |
public void close()
{
// stop index merger
// when calling this method we must not lock this MultiIndex, otherwise
// a deadlock might occur
if (merger != null)
{
merger.dispose();
merger = null;
}
synchronized (this)
{
try
{
... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.merger], !=, literal[null]]] begin[{]
call[merger.dispose, parameter[]]
assign[member[.merger], literal[null]]
... | Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[merger] operator[!=] Other[null] operator[SEP] {
identifier[merger] operator[SEP] identifier[dispose] operator[SEP] operator[SEP] operator[SEP] identifier[merger] operator[=] Other[null] ... |
public void addMessagingFactory( IMessagingClientFactory clientFactory ) {
if( this.messagingClient.getRegistry() == null ) {
MessagingClientFactoryRegistry registry = new MessagingClientFactoryRegistry();
this.messagingClient.setRegistry( registry );
}
this.messagingClient.getRegistry().addMessagingClien... | class class_name[name] begin[{]
method[addMessagingFactory, return_type[void], modifier[public], parameter[clientFactory]] begin[{]
if[binary_operation[THIS[member[None.messagingClient]call[None.getRegistry, parameter[]]], ==, literal[null]]] begin[{]
local_variable[type[MessagingCl... | Keyword[public] Keyword[void] identifier[addMessagingFactory] operator[SEP] identifier[IMessagingClientFactory] identifier[clientFactory] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[messagingClient] operator[SEP] identifier[getRegistry] operator[SEP] operator[SEP] operator[==... |
public void setIdleMax(int max)
{
if (max == _idleMax) {
// avoid update() overhead if unchanged
return;
}
if (max <= 0) {
max = DEFAULT_IDLE_MAX;
}
if (_threadMax < max)
throw new ConfigException(L.l("IdleMax ({0}) must be less than ThreadMax ({1})", max, _threadM... | class class_name[name] begin[{]
method[setIdleMax, return_type[void], modifier[public], parameter[max]] begin[{]
if[binary_operation[member[.max], ==, member[._idleMax]]] begin[{]
return[None]
else begin[{]
None
end[}]
if[binary_operation[member[.max]... | Keyword[public] Keyword[void] identifier[setIdleMax] operator[SEP] Keyword[int] identifier[max] operator[SEP] {
Keyword[if] operator[SEP] identifier[max] operator[==] identifier[_idleMax] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[if] operator[SEP] identifier[max] operator[<... |
public Observable<Page<NetworkWatcherInner>> listByResourceGroupAsync(String resourceGroupName) {
return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1<ServiceResponse<List<NetworkWatcherInner>>, Page<NetworkWatcherInner>>() {
@Override
public Page<NetworkWa... | class class_name[name] begin[{]
method[listByResourceGroupAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName]] begin[{]
return[call[.listByResourceGroupWithServiceResponseAsync, parameter[member[.resourceGroupName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[NetworkWatcherInner] operator[>] operator[>] identifier[listByResourceGroupAsync] operator[SEP] identifier[String] identifier[resourceGroupName] operator[SEP] {
Keyword[return] identifier[listByResourceGroupWithServiceResp... |
public static List<IndexInfo> deserializeIndex(FileDataInput in, CType type) throws IOException
{
int columnIndexSize = in.readInt();
if (columnIndexSize == 0)
return Collections.<IndexInfo>emptyList();
ArrayList<IndexInfo> indexList = new ArrayList<IndexInfo>();
FileMark... | class class_name[name] begin[{]
method[deserializeIndex, return_type[type[List]], modifier[public static], parameter[in, type]] begin[{]
local_variable[type[int], columnIndexSize]
if[binary_operation[member[.columnIndexSize], ==, literal[0]]] begin[{]
return[call[.Collections, parameter... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[IndexInfo] operator[>] identifier[deserializeIndex] operator[SEP] identifier[FileDataInput] identifier[in] , identifier[CType] identifier[type] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[columnIndexSize]... |
@Override
public long getCountHighWaterMark() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getCountHighWaterMark");
long destHigh = _destHighMsgs + getSubscriberCount();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
... | class class_name[name] begin[{]
method[getCountHighWaterMark, return_type[type[long]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[m... | annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[getCountHighWaterMark] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEn... |
public synchronized void storeInteractionForCurrentAppVersion(double timestamp, int versionCode, String versionName, String interactionId) {
EventRecord eventRecord = interactions.get(interactionId);
if (eventRecord == null) {
eventRecord = new EventRecord();
interactions.put(interactionId, eventRecord);
}
... | class class_name[name] begin[{]
method[storeInteractionForCurrentAppVersion, return_type[void], modifier[synchronized public], parameter[timestamp, versionCode, versionName, interactionId]] begin[{]
local_variable[type[EventRecord], eventRecord]
if[binary_operation[member[.eventRecord],... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[storeInteractionForCurrentAppVersion] operator[SEP] Keyword[double] identifier[timestamp] , Keyword[int] identifier[versionCode] , identifier[String] identifier[versionName] , identifier[String] identifier[interactionId] operator[SEP] {
identifier... |
public void setMethod(String method)
throws JspException
{
if (FORM_POST.equals(method) || FORM_GET.equals(method)) {
_state.method = method;
return;
}
String s = Bundle.getString("Tags_FormMethodError", new Object[]{method});
registerTagError(s, n... | class class_name[name] begin[{]
method[setMethod, return_type[void], modifier[public], parameter[method]] begin[{]
if[binary_operation[call[FORM_POST.equals, parameter[member[.method]]], ||, call[FORM_GET.equals, parameter[member[.method]]]]] begin[{]
assign[member[_stat... | Keyword[public] Keyword[void] identifier[setMethod] operator[SEP] identifier[String] identifier[method] operator[SEP] Keyword[throws] identifier[JspException] {
Keyword[if] operator[SEP] identifier[FORM_POST] operator[SEP] identifier[equals] operator[SEP] identifier[method] operator[SEP] operator[||] identifier[... |
public static URL baseUrlOfClass(Class<?> clazz) {
try {
String name = clazz.getName();
URL url = clazz.getResource("/" + name.replace('.', '/') + ".class");
int curPos = 0;
do {
curPos = name.indexOf('.', curPos + 1);
if (curPos >=... | class class_name[name] begin[{]
method[baseUrlOfClass, return_type[type[URL]], modifier[public static], parameter[clazz]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postf... | Keyword[public] Keyword[static] identifier[URL] identifier[baseUrlOfClass] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] {
Keyword[try] {
identifier[String] identifier[name] operator[=] identifier[clazz] operator[SEP] identifier[getName] operator[S... |
protected Object
readAtomic(List<Slice> slices)
throws DapException
{
if(slices == null)
throw new DapException("DataCursor.read: null set of slices");
assert this.scheme == Scheme.ATOMIC;
DapVariable atomvar = (DapVariable) getTemplate();
int rank = atomv... | class class_name[name] begin[{]
method[readAtomic, return_type[type[Object]], modifier[protected], parameter[slices]] begin[{]
if[binary_operation[member[.slices], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], q... | Keyword[protected] identifier[Object] identifier[readAtomic] operator[SEP] identifier[List] operator[<] identifier[Slice] operator[>] identifier[slices] operator[SEP] Keyword[throws] identifier[DapException] {
Keyword[if] operator[SEP] identifier[slices] operator[==] Other[null] operator[SEP] Keyword[throw] Keyw... |
public static ModelControllerClient createAndAdd(final ManagementChannelHandler handler) {
final ExistingChannelModelControllerClient client = new ExistingChannelModelControllerClient(handler);
handler.addHandlerFactory(client);
return client;
} | class class_name[name] begin[{]
method[createAndAdd, return_type[type[ModelControllerClient]], modifier[public static], parameter[handler]] begin[{]
local_variable[type[ExistingChannelModelControllerClient], client]
call[handler.addHandlerFactory, parameter[member[.client]]]
ret... | Keyword[public] Keyword[static] identifier[ModelControllerClient] identifier[createAndAdd] operator[SEP] Keyword[final] identifier[ManagementChannelHandler] identifier[handler] operator[SEP] {
Keyword[final] identifier[ExistingChannelModelControllerClient] identifier[client] operator[=] Keyword[new] identifier[E... |
@Override
public final boolean moveTo(final long pNodeKey) throws TTIOException {
checkState(!mPageReadTrx.isClosed(), "Transaction is already closed.");
if (pNodeKey == NULL_NODE) {
return false;
} else {
// Remember old node and fetch new one.
final ITre... | class class_name[name] begin[{]
method[moveTo, return_type[type[boolean]], modifier[final public], parameter[pNodeKey]] begin[{]
call[.checkState, parameter[call[mPageReadTrx.isClosed, parameter[]], literal["Transaction is already closed."]]]
if[binary_operation[member[.pNodeKey... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[boolean] identifier[moveTo] operator[SEP] Keyword[final] Keyword[long] identifier[pNodeKey] operator[SEP] Keyword[throws] identifier[TTIOException] {
identifier[checkState] operator[SEP] operator[!] identifier[mPageReadTrx] operator[SEP] i... |
@Override
public Map<String, String> loadDocStrings(Set<ServiceConfig> serviceConfigs) {
return serviceConfigs.stream()
.flatMap(c -> c.service().as(THttpService.class).get().entries().values().stream())
.flatMap(entry -> entry.interfaces().stream().... | class class_name[name] begin[{]
method[loadDocStrings, return_type[type[Map]], modifier[public], parameter[serviceConfigs]] begin[{]
return[call[serviceConfigs.stream, parameter[]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[loadDocStrings] operator[SEP] identifier[Set] operator[<] identifier[ServiceConfig] operator[>] identifier[serviceConfigs] operator[SEP] {
Keyword[return] identifier[serv... |
@Override
public void processRequest(ProfileRequestContext<?, ?> context) throws ExternalAutenticationErrorCodeException {
final String logId = this.getLogString(context);
boolean isSignatureService = this.isSignatureServicePeer(context);
SignMessageContext signMessageContext = this.getSignMessageCon... | class class_name[name] begin[{]
method[processRequest, return_type[void], modifier[public], parameter[context]] begin[{]
local_variable[type[String], logId]
local_variable[type[boolean], isSignatureService]
local_variable[type[SignMessageContext], signMessageContext]
if[... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[processRequest] operator[SEP] identifier[ProfileRequestContext] operator[<] operator[?] , operator[?] operator[>] identifier[context] operator[SEP] Keyword[throws] identifier[ExternalAutenticationErrorCodeException] {
Keyword[final] ide... |
public Collection<String> getShardingLogicTableNames(final Collection<String> logicTableNames) {
Collection<String> result = new LinkedList<>();
for (String each : logicTableNames) {
Optional<TableRule> tableRule = findTableRule(each);
if (tableRule.isPresent()) {
... | class class_name[name] begin[{]
method[getShardingLogicTableNames, return_type[type[Collection]], modifier[public], parameter[logicTableNames]] begin[{]
local_variable[type[Collection], result]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], dec... | Keyword[public] identifier[Collection] operator[<] identifier[String] operator[>] identifier[getShardingLogicTableNames] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[String] operator[>] identifier[logicTableNames] operator[SEP] {
identifier[Collection] operator[<] identifier[String]... |
public boolean isOneOf( Type first,
Type... rest ) {
return isOneOf(EnumSet.of(first, rest));
} | class class_name[name] begin[{]
method[isOneOf, return_type[type[boolean]], modifier[public], parameter[first, rest]] begin[{]
return[call[.isOneOf, parameter[call[EnumSet.of, parameter[member[.first], member[.rest]]]]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[isOneOf] operator[SEP] identifier[Type] identifier[first] , identifier[Type] operator[...] identifier[rest] operator[SEP] {
Keyword[return] identifier[isOneOf] operator[SEP] identifier[EnumSet] operator[SEP] identifier[of] operator[SEP] identifier[first] , identifier... |
public Panel addComponent(int index, Component component) {
if(component == null) {
throw new IllegalArgumentException("Cannot add null component");
}
synchronized(components) {
if(components.contains(component)) {
return this;
}
if... | class class_name[name] begin[{]
method[addComponent, return_type[type[Panel]], modifier[public], parameter[index, component]] begin[{]
if[binary_operation[member[.component], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[],... | Keyword[public] identifier[Panel] identifier[addComponent] operator[SEP] Keyword[int] identifier[index] , identifier[Component] identifier[component] operator[SEP] {
Keyword[if] operator[SEP] identifier[component] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Illegal... |
public void checkTags(Doc doc, Tag[] tags, boolean areInlineTags) {
if (tags == null) {
return;
}
Taglet taglet;
for (int i = 0; i < tags.length; i++) {
String name = tags[i].name();
if (name.length() > 0 && name.charAt(0) == '@') {
nam... | class class_name[name] begin[{]
method[checkTags, return_type[void], modifier[public], parameter[doc, tags, areInlineTags]] begin[{]
if[binary_operation[member[.tags], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[Tag... | Keyword[public] Keyword[void] identifier[checkTags] operator[SEP] identifier[Doc] identifier[doc] , identifier[Tag] operator[SEP] operator[SEP] identifier[tags] , Keyword[boolean] identifier[areInlineTags] operator[SEP] {
Keyword[if] operator[SEP] identifier[tags] operator[==] Other[null] operator[SEP] {
... |
public boolean isEquivalent(final Plugin testPlugin) {
if (testPlugin != null && testPlugin instanceof SocketHubReceiver) {
SocketHubReceiver sReceiver = (SocketHubReceiver) testPlugin;
return (port == sReceiver.getPort()
&& host.equals(sReceiver.getHost())
&& reconnectionDe... | class class_name[name] begin[{]
method[isEquivalent, return_type[type[boolean]], modifier[public], parameter[testPlugin]] begin[{]
if[binary_operation[binary_operation[member[.testPlugin], !=, literal[null]], &&, binary_operation[member[.testPlugin], instanceof, type[SocketHubReceiver]]]] begin... | Keyword[public] Keyword[boolean] identifier[isEquivalent] operator[SEP] Keyword[final] identifier[Plugin] identifier[testPlugin] operator[SEP] {
Keyword[if] operator[SEP] identifier[testPlugin] operator[!=] Other[null] operator[&&] identifier[testPlugin] Keyword[instanceof] identifier[SocketHubReceiver] operator... |
public void importRtfFragment(InputStream documentSource, RtfImportMappings mappings, EventListener[] events ) throws IOException, DocumentException {
if(!this.open) {
throw new DocumentException("The document must be open to import RTF fragments.");
}
RtfParser rtfImport = new RtfParse... | class class_name[name] begin[{]
method[importRtfFragment, return_type[void], modifier[public], parameter[documentSource, mappings, events]] begin[{]
if[THIS[member[None.open]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=... | Keyword[public] Keyword[void] identifier[importRtfFragment] operator[SEP] identifier[InputStream] identifier[documentSource] , identifier[RtfImportMappings] identifier[mappings] , identifier[EventListener] operator[SEP] operator[SEP] identifier[events] operator[SEP] Keyword[throws] identifier[IOException] , identifi... |
public static String propertyTagAction(
String property,
String action,
String defaultValue,
boolean escape,
ServletRequest req)
throws CmsException {
return propertyTagAction(property, action, defaultValue, escape, req, null);
} | class class_name[name] begin[{]
method[propertyTagAction, return_type[type[String]], modifier[public static], parameter[property, action, defaultValue, escape, req]] begin[{]
return[call[.propertyTagAction, parameter[member[.property], member[.action], member[.defaultValue], member[.escape], member[.re... | Keyword[public] Keyword[static] identifier[String] identifier[propertyTagAction] operator[SEP] identifier[String] identifier[property] , identifier[String] identifier[action] , identifier[String] identifier[defaultValue] , Keyword[boolean] identifier[escape] , identifier[ServletRequest] identifier[req] operator[SEP... |
public List<WebhookClient> closeIf(Predicate<WebhookClient> predicate)
{
Checks.notNull(predicate, "Filter");
List<WebhookClient> clients = new ArrayList<>();
for (WebhookClient client : webhooks)
{
if (predicate.test(client))
clients.add(client);
... | class class_name[name] begin[{]
method[closeIf, return_type[type[List]], modifier[public], parameter[predicate]] begin[{]
call[Checks.notNull, parameter[member[.predicate], literal["Filter"]]]
local_variable[type[List], clients]
ForStatement(body=BlockStatement(label=None, state... | Keyword[public] identifier[List] operator[<] identifier[WebhookClient] operator[>] identifier[closeIf] operator[SEP] identifier[Predicate] operator[<] identifier[WebhookClient] operator[>] identifier[predicate] operator[SEP] {
identifier[Checks] operator[SEP] identifier[notNull] operator[SEP] identifier[predicat... |
private String parseAttributeNameOrWildcard() {
String name;
if (is(TokenType.STAR, true)) {
name = mToken.getContent();
} else {
name = parseAttributeName();
}
return name;
} | class class_name[name] begin[{]
method[parseAttributeNameOrWildcard, return_type[type[String]], modifier[private], parameter[]] begin[{]
local_variable[type[String], name]
if[call[.is, parameter[member[TokenType.STAR], literal[true]]]] begin[{]
assign[member[.nam... | Keyword[private] identifier[String] identifier[parseAttributeNameOrWildcard] operator[SEP] operator[SEP] {
identifier[String] identifier[name] operator[SEP] Keyword[if] operator[SEP] identifier[is] operator[SEP] identifier[TokenType] operator[SEP] identifier[STAR] , literal[boolean] operator[SEP] operator[SEP] ... |
protected Runnable wrapTask(Runnable command) {
final Callable<Object> wrapped = wrapTask(
Executors.callable(command, null));
return new Runnable() {
@Override public void run() {
try {
wrapped.call();
} catch (Exception e) {
Throwables.propagate(e);
}
... | class class_name[name] begin[{]
method[wrapTask, return_type[type[Runnable]], modifier[protected], parameter[command]] begin[{]
local_variable[type[Callable], wrapped]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[TryState... | Keyword[protected] identifier[Runnable] identifier[wrapTask] operator[SEP] identifier[Runnable] identifier[command] operator[SEP] {
Keyword[final] identifier[Callable] operator[<] identifier[Object] operator[>] identifier[wrapped] operator[=] identifier[wrapTask] operator[SEP] identifier[Executors] operator[SEP]... |
@Override
public final String lazyGetQuTxInvBas() throws IOException {
if (this.quTxInvBas == null) {
this.quTxInvBas = loadString("/accounting/trade/" + this.flTxInvBas);
}
return this.quTxInvBas;
} | class class_name[name] begin[{]
method[lazyGetQuTxInvBas, return_type[type[String]], modifier[final public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.quTxInvBas]], ==, literal[null]]] begin[{]
assign[THIS[member[None.quTxInvBas]], call[.loadString, para... | annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[String] identifier[lazyGetQuTxInvBas] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[quTxInvBas] operator[==] Other[null] operator[SEP] {
... |
public static void printTrace(String str) {
String trace = System.getenv("ApiTrace");
if (trace!=null) {
if (trace.equals("true")) {
System.out.println(str);
}
}
} | class class_name[name] begin[{]
method[printTrace, return_type[void], modifier[public static], parameter[str]] begin[{]
local_variable[type[String], trace]
if[binary_operation[member[.trace], !=, literal[null]]] begin[{]
if[call[trace.equals, parameter[literal["t... | Keyword[public] Keyword[static] Keyword[void] identifier[printTrace] operator[SEP] identifier[String] identifier[str] operator[SEP] {
identifier[String] identifier[trace] operator[=] identifier[System] operator[SEP] identifier[getenv] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator... |
public ServiceFuture<OperationStatus> updatePublishSettingsAsync(UUID appId, PublishSettingUpdateObject publishSettingUpdateObject, final ServiceCallback<OperationStatus> serviceCallback) {
return ServiceFuture.fromResponse(updatePublishSettingsWithServiceResponseAsync(appId, publishSettingUpdateObject), servic... | class class_name[name] begin[{]
method[updatePublishSettingsAsync, return_type[type[ServiceFuture]], modifier[public], parameter[appId, publishSettingUpdateObject, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.updatePublishSettingsWithServiceResponseAsync, parameter... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[OperationStatus] operator[>] identifier[updatePublishSettingsAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[PublishSettingUpdateObject] identifier[publishSettingUpdateObject] , Keyword[final] identifier[ServiceCallback] operator[<]... |
void putIntoCanonical( SquareGrid grid ) {
boolean rowOdd = grid.rows%2 == 1;
boolean colOdd = grid.columns%2 == 1;
if( colOdd == rowOdd ) {
// if odd and square then 4 solutions. Otherwise just two solution that are on
// opposite sides on the grid
if( rowOdd && grid.rows == grid.columns ) {
int ... | class class_name[name] begin[{]
method[putIntoCanonical, return_type[void], modifier[default], parameter[grid]] begin[{]
local_variable[type[boolean], rowOdd]
local_variable[type[boolean], colOdd]
if[binary_operation[member[.colOdd], ==, member[.rowOdd]]] begin[{]
... | Keyword[void] identifier[putIntoCanonical] operator[SEP] identifier[SquareGrid] identifier[grid] operator[SEP] {
Keyword[boolean] identifier[rowOdd] operator[=] identifier[grid] operator[SEP] identifier[rows] operator[%] Other[2] operator[==] Other[1] operator[SEP] Keyword[boolean] identifier[colOdd] operator[=]... |
private void addHook( ByteArray ba )
{
// Check first() is zero, otherwise cursor might not work.
// TODO: Remove this restriction?
if ( ba.first() != 0 )
{
throw new IllegalArgumentException( "Cannot add byte array that doesn't start from 0: " + ba.first() );
}
... | class class_name[name] begin[{]
method[addHook, return_type[void], modifier[private], parameter[ba]] begin[{]
if[binary_operation[call[ba.first, parameter[]], !=, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operato... | Keyword[private] Keyword[void] identifier[addHook] operator[SEP] identifier[ByteArray] identifier[ba] operator[SEP] {
Keyword[if] operator[SEP] identifier[ba] operator[SEP] identifier[first] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Illega... |
public void buildBranchGraphs(Map<Integer, Instruction> pcMap) {
for (Instruction instruction = pcHead; instruction != null; instruction = instruction.getNextPC()) {
if (instruction.isBranch()) {
final Branch branch = instruction.asBranch();
final Instruction targetInstruction = p... | class class_name[name] begin[{]
method[buildBranchGraphs, return_type[void], modifier[public], parameter[pcMap]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isBranch, postfix_operators=[], prefix_operators=[], qualifier=i... | Keyword[public] Keyword[void] identifier[buildBranchGraphs] operator[SEP] identifier[Map] operator[<] identifier[Integer] , identifier[Instruction] operator[>] identifier[pcMap] operator[SEP] {
Keyword[for] operator[SEP] identifier[Instruction] identifier[instruction] operator[=] identifier[pcHead] operator[SEP... |
@BetaApi
public final ListInstanceGroupManagersPagedResponse listInstanceGroupManagers(String zone) {
ListInstanceGroupManagersHttpRequest request =
ListInstanceGroupManagersHttpRequest.newBuilder().setZone(zone).build();
return listInstanceGroupManagers(request);
} | class class_name[name] begin[{]
method[listInstanceGroupManagers, return_type[type[ListInstanceGroupManagersPagedResponse]], modifier[final public], parameter[zone]] begin[{]
local_variable[type[ListInstanceGroupManagersHttpRequest], request]
return[call[.listInstanceGroupManagers, parameter[me... | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[ListInstanceGroupManagersPagedResponse] identifier[listInstanceGroupManagers] operator[SEP] identifier[String] identifier[zone] operator[SEP] {
identifier[ListInstanceGroupManagersHttpRequest] identifier[request] operator[=] identifier[L... |
public Observable<Page<ManagedInstanceEncryptionProtectorInner>> listByInstanceAsync(final String resourceGroupName, final String managedInstanceName) {
return listByInstanceWithServiceResponseAsync(resourceGroupName, managedInstanceName)
.map(new Func1<ServiceResponse<Page<ManagedInstanceEncryption... | class class_name[name] begin[{]
method[listByInstanceAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, managedInstanceName]] begin[{]
return[call[.listByInstanceWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.managedInstanceName]]]]
end[}]
... | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[ManagedInstanceEncryptionProtectorInner] operator[>] operator[>] identifier[listByInstanceAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[manage... |
JmsJcaManagedConnection getManagedConnection() throws IllegalStateException {
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, "getManagedConnection");
}
if (_managedConnection == null) {
final ConnectionManager connectionM... | class class_name[name] begin[{]
method[getManagedConnection, return_type[type[JmsJcaManagedConnection]], modifier[default], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[TRACE.isEntryEnabled, parameter[]]]] begin[{]
... | identifier[JmsJcaManagedConnection] identifier[getManagedConnection] operator[SEP] operator[SEP] Keyword[throws] identifier[IllegalStateException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[TRACE] operat... |
@Nonnull
public static String getServletContextBasePath (@Nonnull final ServletContext aSC)
{
String sPath = aSC.getRealPath (".");
if (sPath == null)
{
// Fallback for Undertow
sPath = aSC.getRealPath ("");
}
if (StringHelper.hasNoText (sPath))
throw new IllegalStateException ... | class class_name[name] begin[{]
method[getServletContextBasePath, return_type[type[String]], modifier[public static], parameter[aSC]] begin[{]
local_variable[type[String], sPath]
if[binary_operation[member[.sPath], ==, literal[null]]] begin[{]
assign[member[.sPat... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[String] identifier[getServletContextBasePath] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[ServletContext] identifier[aSC] operator[SEP] {
identifier[String] identifier[sPath] operator[=] identifier[aSC] ope... |
@Bean
public MethodSecurityMetadataSource methodSecurityMetadataSource() {
List<MethodSecurityMetadataSource> sources = new ArrayList<>();
ExpressionBasedAnnotationAttributeFactory attributeFactory = new ExpressionBasedAnnotationAttributeFactory(
getExpressionHandler());
MethodSecurityMetadataSource customMe... | class class_name[name] begin[{]
method[methodSecurityMetadataSource, return_type[type[MethodSecurityMetadataSource]], modifier[public], parameter[]] begin[{]
local_variable[type[List], sources]
local_variable[type[ExpressionBasedAnnotationAttributeFactory], attributeFactory]
local_varia... | annotation[@] identifier[Bean] Keyword[public] identifier[MethodSecurityMetadataSource] identifier[methodSecurityMetadataSource] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[MethodSecurityMetadataSource] operator[>] identifier[sources] operator[=] Keyword[new] identifier[ArrayList] opera... |
public CalendarModel getCalendarModel(FieldTable table)
{
if (m_model == null)
if (table != null)
m_model = new CalendarThinTableModel(table);
return m_model;
} | class class_name[name] begin[{]
method[getCalendarModel, return_type[type[CalendarModel]], modifier[public], parameter[table]] begin[{]
if[binary_operation[member[.m_model], ==, literal[null]]] begin[{]
if[binary_operation[member[.table], !=, literal[null]]] begin[{]
... | Keyword[public] identifier[CalendarModel] identifier[getCalendarModel] operator[SEP] identifier[FieldTable] identifier[table] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_model] operator[==] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[table] operator[!=] Other[null] operator[SEP] ide... |
@Override
public boolean exists() {
if (this.cachedResource != null)
return true;
try {
InputStream is = get();
if (is != null) {
is.close();
return true;
}
return false;
} catch (IOException ex) {
... | class class_name[name] begin[{]
method[exists, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.cachedResource]], !=, literal[null]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
TryStatement(block=[Loca... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[exists] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[cachedResource] operator[!=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[try] {
ide... |
protected ResourceEntry findResourceInternal(File file, String path){
ResourceEntry entry = new ResourceEntry();
try {
entry.source = getURI(new File(file, path));
entry.codeBase = getURL(new File(file, path), false);
} catch (MalformedURLException e) {
return... | class class_name[name] begin[{]
method[findResourceInternal, return_type[type[ResourceEntry]], modifier[protected], parameter[file, path]] begin[{]
local_variable[type[ResourceEntry], entry]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=source,... | Keyword[protected] identifier[ResourceEntry] identifier[findResourceInternal] operator[SEP] identifier[File] identifier[file] , identifier[String] identifier[path] operator[SEP] {
identifier[ResourceEntry] identifier[entry] operator[=] Keyword[new] identifier[ResourceEntry] operator[SEP] operator[SEP] operator[... |
@SuppressWarnings("unchecked")
private static <K, V> Node<K,V> append(Node<? extends K,? extends V> left,
Node<? extends K,? extends V> right) {
if (left == null)
return (Node<K,V>) right;
else if (right == null)
return (Node<K,V>) left;
... | class class_name[name] begin[{]
method[append, return_type[type[Node]], modifier[private static], parameter[left, right]] begin[{]
if[binary_operation[member[.left], ==, literal[null]]] begin[{]
return[Cast(expression=MemberReference(member=right, postfix_operators=[], prefix_operators=[], qual... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Node] operator[<] identifier[K] , identifier[V] operator[>] identifier[append] operator[SEP] identifier[Node] operator[<] operator[?]... |
public final Flux<T> doOnTerminate(Runnable onTerminate) {
Objects.requireNonNull(onTerminate, "onTerminate");
return doOnSignal(this,
null,
null,
e -> onTerminate.run(),
onTerminate,
null,
null,
null);
} | class class_name[name] begin[{]
method[doOnTerminate, return_type[type[Flux]], modifier[final public], parameter[onTerminate]] begin[{]
call[Objects.requireNonNull, parameter[member[.onTerminate], literal["onTerminate"]]]
return[call[.doOnSignal, parameter[THIS[], literal[null], literal... | Keyword[public] Keyword[final] identifier[Flux] operator[<] identifier[T] operator[>] identifier[doOnTerminate] operator[SEP] identifier[Runnable] identifier[onTerminate] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[onTerminate] , literal[String] operator... |
private static void checkWriterCompatibility(RouteDefinition definition) {
try { // no way to know the accept content at this point
getWriter(injectionProvider, definition.getReturnType(), definition, null, GenericResponseWriter.class);
}
catch (ClassFactoryException e) {
// ignoring instance creation ... b... | class class_name[name] begin[{]
method[checkWriterCompatibility, return_type[void], modifier[private static], parameter[definition]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=injectionProvider, postfix_operators=[], prefix_operators=[... | Keyword[private] Keyword[static] Keyword[void] identifier[checkWriterCompatibility] operator[SEP] identifier[RouteDefinition] identifier[definition] operator[SEP] {
Keyword[try] {
identifier[getWriter] operator[SEP] identifier[injectionProvider] , identifier[definition] operator[SEP] identifier[getRe... |
public static service_stats[] get(nitro_service service) throws Exception{
service_stats obj = new service_stats();
service_stats[] response = (service_stats[])obj.stat_resources(service);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[service_stats]], modifier[public static], parameter[service]] begin[{]
local_variable[type[service_stats], obj]
local_variable[type[service_stats], response]
return[member[.response]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[service_stats] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[service_stats] identifier[obj] operator[=] Keyword[new] identifier[service_stats] oper... |
public static <X> X runWithFile(InputStream stream, Function<File, X> function) throws IOException {
File f = File.createTempFile("run-with-file", null);
try {
try (FileOutputStream out = new FileOutputStream(f)) {
IOUtils.copy(stream, out);
}
return function.apply(f);
} finally {
f.delete();
}
... | class class_name[name] begin[{]
method[runWithFile, return_type[type[X]], modifier[public static], parameter[stream, function]] begin[{]
local_variable[type[File], f]
TryStatement(block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stream... | Keyword[public] Keyword[static] operator[<] identifier[X] operator[>] identifier[X] identifier[runWithFile] operator[SEP] identifier[InputStream] identifier[stream] , identifier[Function] operator[<] identifier[File] , identifier[X] operator[>] identifier[function] operator[SEP] Keyword[throws] identifier[IOException... |
private int collectCandidates(Map<Long, Score> candidates,
List<Bucket> buckets,
int threshold) {
int ix;
for (ix = 0; ix < threshold &&
candidates.size() < (CUTOFF_FACTOR_1 * max_search_hits); ix++) {
Bucket b = buckets.get(ix);
... | class class_name[name] begin[{]
method[collectCandidates, return_type[type[int]], modifier[private], parameter[candidates, buckets, threshold]] begin[{]
local_variable[type[int], ix]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[V... | Keyword[private] Keyword[int] identifier[collectCandidates] operator[SEP] identifier[Map] operator[<] identifier[Long] , identifier[Score] operator[>] identifier[candidates] , identifier[List] operator[<] identifier[Bucket] operator[>] identifier[buckets] , Keyword[int] identifier[threshold] operator[SEP] {
K... |
@Override
@NullSafe
public synchronized void add(T element) {
Optional.ofNullable(element)
.ifPresent(it -> {
int hashCode = it.hashCode();
int index = (hashCode % getScale());
BloomFilter<T> bloomFilter = resolveBloomFilter(index);
bloomFilter.add(it);
});
} | class class_name[name] begin[{]
method[add, return_type[void], modifier[synchronized public], parameter[element]] begin[{]
call[Optional.ofNullable, parameter[member[.element]]]
end[}]
END[}] | annotation[@] identifier[Override] annotation[@] identifier[NullSafe] Keyword[public] Keyword[synchronized] Keyword[void] identifier[add] operator[SEP] identifier[T] identifier[element] operator[SEP] {
identifier[Optional] operator[SEP] identifier[ofNullable] operator[SEP] identifier[element] operator[SEP] opera... |
private void stopMessagingEngine(String busName, String name, int mode)
throws Exception {
String thisMethodName = CLASS_NAME
+ ".stopMessagingEngine(String, String, int)";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
... | class class_name[name] begin[{]
method[stopMessagingEngine, return_type[void], modifier[private], parameter[busName, name, mode]] begin[{]
local_variable[type[String], thisMethodName]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, ... | Keyword[private] Keyword[void] identifier[stopMessagingEngine] operator[SEP] identifier[String] identifier[busName] , identifier[String] identifier[name] , Keyword[int] identifier[mode] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[thisMethodName] operator[=] identifier[CL... |
@Override
public void setValueAt(final Object value, final int row, final int col) {
if (!isEditable()) {
throw new IllegalStateException("Attempted to set a value on an uneditable model");
}
data[row][col] = (Serializable) value;
} | class class_name[name] begin[{]
method[setValueAt, return_type[void], modifier[public], parameter[value, row, col]] begin[{]
if[call[.isEditable, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=Non... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setValueAt] operator[SEP] Keyword[final] identifier[Object] identifier[value] , Keyword[final] Keyword[int] identifier[row] , Keyword[final] Keyword[int] identifier[col] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[... |
public OUser createMetadata() {
final ODatabaseDocument database = getDatabase();
OClass identityClass = database.getMetadata().getSchema().getClass(OIdentity.CLASS_NAME); // SINCE 1.2.0
if (identityClass == null)
identityClass = database.getMetadata().getSchema().createAbstractClass(OIdentity.CLASS_... | class class_name[name] begin[{]
method[createMetadata, return_type[type[OUser]], modifier[public], parameter[]] begin[{]
local_variable[type[ODatabaseDocument], database]
local_variable[type[OClass], identityClass]
if[binary_operation[member[.identityClass], ==, literal[null]]] ... | Keyword[public] identifier[OUser] identifier[createMetadata] operator[SEP] operator[SEP] {
Keyword[final] identifier[ODatabaseDocument] identifier[database] operator[=] identifier[getDatabase] operator[SEP] operator[SEP] operator[SEP] identifier[OClass] identifier[identityClass] operator[=] identifier[database] ... |
public void resume(Location location) {
if (location != null) {
currentRouteInformation = buildRouteInformationFromLocation(location, null);
}
navigation.addProgressChangeListener(progressChangeListener);
} | class class_name[name] begin[{]
method[resume, return_type[void], modifier[public], parameter[location]] begin[{]
if[binary_operation[member[.location], !=, literal[null]]] begin[{]
assign[member[.currentRouteInformation], call[.buildRouteInformationFromLocation, paramet... | Keyword[public] Keyword[void] identifier[resume] operator[SEP] identifier[Location] identifier[location] operator[SEP] {
Keyword[if] operator[SEP] identifier[location] operator[!=] Other[null] operator[SEP] {
identifier[currentRouteInformation] operator[=] identifier[buildRouteInformationFromLocation]... |
@Nullable
public <R> R collect(@NotNull Supplier<R> supplier,
@NotNull ObjLongConsumer<R> accumulator) {
final R result = supplier.get();
while (iterator.hasNext()) {
final long value = iterator.nextLong();
accumulator.accept(result, value);
}... | class class_name[name] begin[{]
method[collect, return_type[type[R]], modifier[public], parameter[supplier, accumulator]] begin[{]
local_variable[type[R], result]
while[call[iterator.hasNext, parameter[]]] begin[{]
local_variable[type[long], value]
ca... | annotation[@] identifier[Nullable] Keyword[public] operator[<] identifier[R] operator[>] identifier[R] identifier[collect] operator[SEP] annotation[@] identifier[NotNull] identifier[Supplier] operator[<] identifier[R] operator[>] identifier[supplier] , annotation[@] identifier[NotNull] identifier[ObjLongConsumer] oper... |
public static AlipayTradePayResponse tradePayToResponse(AlipayTradePayModel model, String notifyUrl)
throws AlipayApiException {
AlipayTradePayRequest request = new AlipayTradePayRequest();
request.setBizModel(model);// 填充业务参数
request.setNotifyUrl(notifyUrl);
return AliPayApiConfigKit.getAliPayApiConfig().ge... | class class_name[name] begin[{]
method[tradePayToResponse, return_type[type[AlipayTradePayResponse]], modifier[public static], parameter[model, notifyUrl]] begin[{]
local_variable[type[AlipayTradePayRequest], request]
call[request.setBizModel, parameter[member[.model]]]
... | Keyword[public] Keyword[static] identifier[AlipayTradePayResponse] identifier[tradePayToResponse] operator[SEP] identifier[AlipayTradePayModel] identifier[model] , identifier[String] identifier[notifyUrl] operator[SEP] Keyword[throws] identifier[AlipayApiException] {
identifier[AlipayTradePayRequest] identifier... |
@SuppressWarnings("unchecked")
public static <T> boolean containsAny(T[] array, T... values) {
for (T value : values) {
if(contains(array, value)) {
return true;
}
}
return false;
} | class class_name[name] begin[{]
method[containsAny, return_type[type[boolean]], modifier[public static], parameter[array, values]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], pref... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[boolean] identifier[containsAny] operator[SEP] identifier[T] operator[SEP] operator[SEP] identifier[array] , identifier[T] operator[...] identifier[values... |
public D getDestination(final S source,final NullPointerControl nullPointerControl,final MappingType mtSource){
try{
switch(nullPointerControl){
case ALL:
case DESTINATION:
case SOURCE: switch(mtSource){
case ALL_FIELDS: return mapper.nullVSou... | class class_name[name] begin[{]
method[getDestination, return_type[type[D]], modifier[public], parameter[source, nullPointerControl, mtSource]] begin[{]
TryStatement(block=[SwitchStatement(cases=[SwitchStatementCase(case=['ALL', 'DESTINATION', 'SOURCE'], statements=[SwitchStatement(cases=[SwitchStateme... | Keyword[public] identifier[D] identifier[getDestination] operator[SEP] Keyword[final] identifier[S] identifier[source] , Keyword[final] identifier[NullPointerControl] identifier[nullPointerControl] , Keyword[final] identifier[MappingType] identifier[mtSource] operator[SEP] {
Keyword[try] {
Keyword[s... |
@Override
public boolean start() {
Set<String> excludedMethodName = buildExcludedMethodName();
ConcurrentMap<String, AuthzHandler> authzMaps = Maps.newConcurrentMap();
//逐个访问所有注册的Controller,解析Controller及action上的所有Shiro注解。
//并依据这些注解,actionKey提前构建好权限检查处理器。
final List<Routes.Rou... | class class_name[name] begin[{]
method[start, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[Set], excludedMethodName]
local_variable[type[ConcurrentMap], authzMaps]
local_variable[type[List], routeItemList]
ForStatement(body=BlockStateme... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[start] operator[SEP] operator[SEP] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[excludedMethodName] operator[=] identifier[buildExcludedMethodName] operator[SEP] operator[SEP] operator[SEP] identifier[Concur... |
public Resource updateArchived(Resource resource, Boolean archived, User modifier) {
return updateUrlNameAndArchived(resource, resource.getUrlName(), archived, modifier);
} | class class_name[name] begin[{]
method[updateArchived, return_type[type[Resource]], modifier[public], parameter[resource, archived, modifier]] begin[{]
return[call[.updateUrlNameAndArchived, parameter[member[.resource], call[resource.getUrlName, parameter[]], member[.archived], member[.modifier]]]]
... | Keyword[public] identifier[Resource] identifier[updateArchived] operator[SEP] identifier[Resource] identifier[resource] , identifier[Boolean] identifier[archived] , identifier[User] identifier[modifier] operator[SEP] {
Keyword[return] identifier[updateUrlNameAndArchived] operator[SEP] identifier[resource] , i... |
public static <T extends Item> Iterable<T> allItems(Authentication authentication, ItemGroup root, Class<T> type) {
return new AllItemsIterable<>(root, authentication, type);
} | class class_name[name] begin[{]
method[allItems, return_type[type[Iterable]], modifier[public static], parameter[authentication, root, type]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Item] operator[>] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[allItems] operator[SEP] identifier[Authentication] identifier[authentication] , identifier[ItemGroup] identifier[root] , identifier[Class] opera... |
void writeUnary(ByteBuf out, int value) {
if (value < 0) {
throw new IllegalArgumentException("value: " + value + " (expected 0 or more)");
}
while (value-- > 0) {
writeBoolean(out, true);
}
writeBoolean(out, false);
} | class class_name[name] begin[{]
method[writeUnary, return_type[void], modifier[default], parameter[out, value]] begin[{]
if[binary_operation[member[.value], <, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=L... | Keyword[void] identifier[writeUnary] operator[SEP] identifier[ByteBuf] identifier[out] , Keyword[int] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[<] Other[0] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] liter... |
protected <E extends Event> void linkCommand(final Node node, final javafx.event.EventType<E> eventType,
final Class<? extends Command> commandClass, final WaveData<?>... waveData) {
linkCommand(node, eventType, commandClass, null, waveData);
} | class class_name[name] begin[{]
method[linkCommand, return_type[void], modifier[protected], parameter[node, eventType, commandClass, waveData]] begin[{]
call[.linkCommand, parameter[member[.node], member[.eventType], member[.commandClass], literal[null], member[.waveData]]]
end[}]
END[}] | Keyword[protected] operator[<] identifier[E] Keyword[extends] identifier[Event] operator[>] Keyword[void] identifier[linkCommand] operator[SEP] Keyword[final] identifier[Node] identifier[node] , Keyword[final] identifier[javafx] operator[SEP] identifier[event] operator[SEP] identifier[EventType] operator[<] identifier... |
public MockSecurityGroup authorizeSecurityGroupIngress(final String groupId, final String ipProtocol,
final Integer fromPort, final Integer toPort, final String cidrIp) {
if (groupId == null) {
return null;
}
MockSecurityGroup ret = allMockSecurityGroup.get(groupId);
if ... | class class_name[name] begin[{]
method[authorizeSecurityGroupIngress, return_type[type[MockSecurityGroup]], modifier[public], parameter[groupId, ipProtocol, fromPort, toPort, cidrIp]] begin[{]
if[binary_operation[member[.groupId], ==, literal[null]]] begin[{]
return[literal[null]]
... | Keyword[public] identifier[MockSecurityGroup] identifier[authorizeSecurityGroupIngress] operator[SEP] Keyword[final] identifier[String] identifier[groupId] , Keyword[final] identifier[String] identifier[ipProtocol] , Keyword[final] identifier[Integer] identifier[fromPort] , Keyword[final] identifier[Integer] identif... |
@Override
public Stream<DataCenterMetadata> findLazy(DataCenterFilter criteria) {
return findAll().stream().filter(criteria.getPredicate());
} | class class_name[name] begin[{]
method[findLazy, return_type[type[Stream]], modifier[public], parameter[criteria]] begin[{]
return[call[.findAll, parameter[]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Stream] operator[<] identifier[DataCenterMetadata] operator[>] identifier[findLazy] operator[SEP] identifier[DataCenterFilter] identifier[criteria] operator[SEP] {
Keyword[return] identifier[findAll] operator[SEP] operator[SEP] operator[SEP] identifie... |
public EClass getIfcWallType() {
if (ifcWallTypeEClass == null) {
ifcWallTypeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(642);
}
return ifcWallTypeEClass;
} | class class_name[name] begin[{]
method[getIfcWallType, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcWallTypeEClass], ==, literal[null]]] begin[{]
assign[member[.ifcWallTypeEClass], Cast(expression=MethodInvocation(argu... | Keyword[public] identifier[EClass] identifier[getIfcWallType] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcWallTypeEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcWallTypeEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] ope... |
public static Map<IProject, List<WorkItem>> getResourcesPerProject(IStructuredSelection structuredSelection) {
Map<IProject, List<WorkItem>> projectsMap = new HashMap<>();
for (Iterator<?> iter = structuredSelection.iterator(); iter.hasNext();) {
Object element = iter.next();
Wor... | class class_name[name] begin[{]
method[getResourcesPerProject, return_type[type[Map]], modifier[public static], parameter[structuredSelection]] begin[{]
local_variable[type[Map], projectsMap]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], decla... | Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[IProject] , identifier[List] operator[<] identifier[WorkItem] operator[>] operator[>] identifier[getResourcesPerProject] operator[SEP] identifier[IStructuredSelection] identifier[structuredSelection] operator[SEP] {
identifier[Map] operator[... |
public static NodeList<Element> copyNodeList(NodeList<Element> oldNodes,
NodeList<Element> newNodes, boolean create) {
NodeList<Element> ret = oldNodes == null || create ? JsNodeArray.create()
: oldNodes;
JsCache idlist = JsCache.create();
for (int i = 0; oldNodes != null && i < oldNodes.getLe... | class class_name[name] begin[{]
method[copyNodeList, return_type[type[NodeList]], modifier[public static], parameter[oldNodes, newNodes, create]] begin[{]
local_variable[type[NodeList], ret]
local_variable[type[JsCache], idlist]
ForStatement(body=BlockStatement(label=None, statements=[L... | Keyword[public] Keyword[static] identifier[NodeList] operator[<] identifier[Element] operator[>] identifier[copyNodeList] operator[SEP] identifier[NodeList] operator[<] identifier[Element] operator[>] identifier[oldNodes] , identifier[NodeList] operator[<] identifier[Element] operator[>] identifier[newNodes] , Keywor... |
public FutureData<PylonRecordingId> start(PylonStream stream, String name) {
if (stream == null || stream.hash.isEmpty()) {
throw new IllegalArgumentException("A valid hash is required to start a stream");
}
FutureData<PylonRecordingId> future = new FutureData<>();
URI uri = ... | class class_name[name] begin[{]
method[start, return_type[type[FutureData]], modifier[public], parameter[stream, name]] begin[{]
if[binary_operation[binary_operation[member[.stream], ==, literal[null]], ||, call[stream.hash.isEmpty, parameter[]]]] begin[{]
ThrowStatement(expression=... | Keyword[public] identifier[FutureData] operator[<] identifier[PylonRecordingId] operator[>] identifier[start] operator[SEP] identifier[PylonStream] identifier[stream] , identifier[String] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[stream] operator[==] Other[null] operator[||] identifi... |
public String getSubString(long pos, int length) throws SQLException {
if (pos < 1) {
throw ExceptionMapper.getSqlException("position must be >= 1");
}
if (length < 0) {
throw ExceptionMapper.getSqlException("length must be > 0");
}
try {
String val = toString();
return va... | class class_name[name] begin[{]
method[getSubString, return_type[type[String]], modifier[public], parameter[pos, length]] begin[{]
if[binary_operation[member[.pos], <, literal[1]]] begin[{]
ThrowStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_op... | Keyword[public] identifier[String] identifier[getSubString] operator[SEP] Keyword[long] identifier[pos] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[pos] operator[<] Other[1] operator[SEP] {
Keyword[throw] identifier[E... |
@SuppressWarnings("unchecked")
private Object parse(Element element) {
List<Element> elements = element.elements();
if (elements.size() == 0) {
return element.getText();
} else {
Map<String, Object> map = new HashMap<>();
for (Element ele : elements) {
... | class class_name[name] begin[{]
method[parse, return_type[type[Object]], modifier[private], parameter[element]] begin[{]
local_variable[type[List], elements]
if[binary_operation[call[elements.size, parameter[]], ==, literal[0]]] begin[{]
return[call[element.getText, paramete... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] identifier[Object] identifier[parse] operator[SEP] identifier[Element] identifier[element] operator[SEP] {
identifier[List] operator[<] identifier[Element] operator[>] identifier[elements] operator[=] identifi... |
public int update(String sql) throws SQLException {
AssertUtils.assertNotNull(sql, nullException());
Integer rows = (Integer) this.update(this.getStatementHandler(), sql, HandlersConstants.UPDATE_ROW_COUNT_HANDLER, HandlersConstants.EMPTY_QUERY_PARAMS);
return rows.intValue();
} | class class_name[name] begin[{]
method[update, return_type[type[int]], modifier[public], parameter[sql]] begin[{]
call[AssertUtils.assertNotNull, parameter[member[.sql], call[.nullException, parameter[]]]]
local_variable[type[Integer], rows]
return[call[rows.intValue, parameter[... | Keyword[public] Keyword[int] identifier[update] operator[SEP] identifier[String] identifier[sql] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[AssertUtils] operator[SEP] identifier[assertNotNull] operator[SEP] identifier[sql] , identifier[nullException] operator[SEP] operator[SEP] operator... |
public static AuditEntryBean planUpdated(PlanBean bean, EntityUpdatedData data,
ISecurityContext securityContext) {
if (data.getChanges().isEmpty()) {
return null;
}
AuditEntryBean entry = newEntry(bean.getOrganization().getId(), AuditEntityType.Plan, securityContext);
... | class class_name[name] begin[{]
method[planUpdated, return_type[type[AuditEntryBean]], modifier[public static], parameter[bean, data, securityContext]] begin[{]
if[call[data.getChanges, parameter[]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
lo... | Keyword[public] Keyword[static] identifier[AuditEntryBean] identifier[planUpdated] operator[SEP] identifier[PlanBean] identifier[bean] , identifier[EntityUpdatedData] identifier[data] , identifier[ISecurityContext] identifier[securityContext] operator[SEP] {
Keyword[if] operator[SEP] identifier[data] operator[... |
private void setup(final Handler<AsyncResult<Void>> doneHandler) {
// Retrieve the component context from the coordinator (the current cluster).
// If the context has changed due to a network configuration change, the
// internal context and input/output connections will be automatically updated.
log.de... | class class_name[name] begin[{]
method[setup, return_type[void], modifier[private], parameter[doneHandler]] begin[{]
call[log.debug, parameter[call[String.format, parameter[literal["%s - Starting cluster coordination"], THIS[]]]]]
call[coordinator.start, parameter[ClassCreator(a... | Keyword[private] Keyword[void] identifier[setup] operator[SEP] Keyword[final] identifier[Handler] operator[<] identifier[AsyncResult] operator[<] identifier[Void] operator[>] operator[>] identifier[doneHandler] operator[SEP] {
identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[String] opera... |
public ProxyDataSourceBuilder logQueryByCommons(CommonsLogLevel logLevel, String commonsLoggerName) {
this.createCommonsQueryListener = true;
this.commonsLogLevel = logLevel;
this.commonsLoggerName = commonsLoggerName;
return this;
} | class class_name[name] begin[{]
method[logQueryByCommons, return_type[type[ProxyDataSourceBuilder]], modifier[public], parameter[logLevel, commonsLoggerName]] begin[{]
assign[THIS[member[None.createCommonsQueryListener]], literal[true]]
assign[THIS[member[None.commonsLogLevel]],... | Keyword[public] identifier[ProxyDataSourceBuilder] identifier[logQueryByCommons] operator[SEP] identifier[CommonsLogLevel] identifier[logLevel] , identifier[String] identifier[commonsLoggerName] operator[SEP] {
Keyword[this] operator[SEP] identifier[createCommonsQueryListener] operator[=] literal[boolean] opera... |
public ArrayList<Long> serviceName_consumption_GET(String serviceName, Date hpcspotItemEndDate_from, Date hpcspotItemEndDate_to, Long hpcspotItemId, Long orderId, OvhConsumptionTypeEnum type) throws IOException {
String qPath = "/hpcspot/{serviceName}/consumption";
StringBuilder sb = path(qPath, serviceName);
que... | class class_name[name] begin[{]
method[serviceName_consumption_GET, return_type[type[ArrayList]], modifier[public], parameter[serviceName, hpcspotItemEndDate_from, hpcspotItemEndDate_to, hpcspotItemId, orderId, type]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilde... | Keyword[public] identifier[ArrayList] operator[<] identifier[Long] operator[>] identifier[serviceName_consumption_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[Date] identifier[hpcspotItemEndDate_from] , identifier[Date] identifier[hpcspotItemEndDate_to] , identifier[Long] identifier[hpc... |
public final void removeElementsWithTag(@Nonnull String tag) {
getElements().stream()
.map(ElementView::getElement)
.filter(e -> e.hasTag(tag))
.forEach(this::removeElement);
} | class class_name[name] begin[{]
method[removeElementsWithTag, return_type[void], modifier[final public], parameter[tag]] begin[{]
call[.getElements, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[void] identifier[removeElementsWithTag] operator[SEP] annotation[@] identifier[Nonnull] identifier[String] identifier[tag] operator[SEP] {
identifier[getElements] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifi... |
protected void updateCoreLength() {
if (getBlockSets().size() == 0) {
throw new IndexOutOfBoundsException(
"Empty MultipleAlignment: blockSets size == 0.");
} // Otherwise try to calculate it from the BlockSet information
else {
coreLength = 0;
for (BlockSet blockSet : blockSets)
coreLength += b... | class class_name[name] begin[{]
method[updateCoreLength, return_type[void], modifier[protected], parameter[]] begin[{]
if[binary_operation[call[.getBlockSets, parameter[]], ==, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pref... | Keyword[protected] Keyword[void] identifier[updateCoreLength] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[getBlockSets] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] {
Keyword[throw] Keyword[new] identi... |
@Override
public void handleMessage(Object objectToProcess) {
//There is an error...
if(objectToProcess instanceof Error) {
Error fluidError = ((Error)objectToProcess);
this.errors.add(fluidError);
//Do a message callback...
if(this.messageReceivedCallback != null)
{
this.messageReceivedCallb... | class class_name[name] begin[{]
method[handleMessage, return_type[void], modifier[public], parameter[objectToProcess]] begin[{]
if[binary_operation[member[.objectToProcess], instanceof, type[Error]]] begin[{]
local_variable[type[Error], fluidError]
THIS[membe... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleMessage] operator[SEP] identifier[Object] identifier[objectToProcess] operator[SEP] {
Keyword[if] operator[SEP] identifier[objectToProcess] Keyword[instanceof] identifier[Error] operator[SEP] {
identifier[Error] identifi... |
public static <R> Set<R> filterAndListKeys(Iterator<R> keys, KeyFilter<R> filter) {
Set<R> ret = new HashSet<R>();
while (keys.hasNext()) {
R key = keys.next();
R filtered = filter.filter(key);
if (filtered != null) {
ret.add(filtered);
}
... | class class_name[name] begin[{]
method[filterAndListKeys, return_type[type[Set]], modifier[public static], parameter[keys, filter]] begin[{]
local_variable[type[Set], ret]
while[call[keys.hasNext, parameter[]]] begin[{]
local_variable[type[R], key]
local_variable... | Keyword[public] Keyword[static] operator[<] identifier[R] operator[>] identifier[Set] operator[<] identifier[R] operator[>] identifier[filterAndListKeys] operator[SEP] identifier[Iterator] operator[<] identifier[R] operator[>] identifier[keys] , identifier[KeyFilter] operator[<] identifier[R] operator[>] identifier[fi... |
public static PrototypeMeasurementFilterSpecification loadFromPath(String path)
throws IOException {
byte[] jsonData = Files.readAllBytes(Paths.get(path));
ObjectMapper objectMapper = new ObjectMapper();
return objectMapper.readValue(
jsonData, PrototypeMeasurementFilterSpecification.class);
... | class class_name[name] begin[{]
method[loadFromPath, return_type[type[PrototypeMeasurementFilterSpecification]], modifier[public static], parameter[path]] begin[{]
local_variable[type[byte], jsonData]
local_variable[type[ObjectMapper], objectMapper]
return[call[objectMapper.readValue, p... | Keyword[public] Keyword[static] identifier[PrototypeMeasurementFilterSpecification] identifier[loadFromPath] operator[SEP] identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[jsonData] operator[=] identifier[Files] opera... |
static String jsonStringify(String stringValue) {
StringBuilder sb = new StringBuilder();
for (char ch : stringValue.toCharArray()) {
switch (ch) {
case '"':
sb.append("\\\"");
break;
case '\\':
sb.ap... | class class_name[name] begin[{]
method[jsonStringify, return_type[type[String]], modifier[static], parameter[stringValue]] begin[{]
local_variable[type[StringBuilder], sb]
ForStatement(body=BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_o... | Keyword[static] identifier[String] identifier[jsonStringify] operator[SEP] identifier[String] identifier[stringValue] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[char] iden... |
private static TypeMirror paramAsMemberOf(
Types types, DeclaredType type, TypeParameterElement param) {
TypeMirror resolved = paramAsMemberOfImpl(types, type, param);
checkState(resolved != null, "Could not resolve parameter: " + param);
return resolved;
} | class class_name[name] begin[{]
method[paramAsMemberOf, return_type[type[TypeMirror]], modifier[private static], parameter[types, type, param]] begin[{]
local_variable[type[TypeMirror], resolved]
call[.checkState, parameter[binary_operation[member[.resolved], !=, literal[null]], binary_... | Keyword[private] Keyword[static] identifier[TypeMirror] identifier[paramAsMemberOf] operator[SEP] identifier[Types] identifier[types] , identifier[DeclaredType] identifier[type] , identifier[TypeParameterElement] identifier[param] operator[SEP] {
identifier[TypeMirror] identifier[resolved] operator[=] identifi... |
public static ExecutionEntityImpl createWithEmptyRelationshipCollections() {
ExecutionEntityImpl execution = new ExecutionEntityImpl();
execution.executions = new ArrayList<ExecutionEntityImpl>(1);
execution.tasks = new ArrayList<TaskEntity>(1);
execution.variableInstances = new HashMap<String, Variable... | class class_name[name] begin[{]
method[createWithEmptyRelationshipCollections, return_type[type[ExecutionEntityImpl]], modifier[public static], parameter[]] begin[{]
local_variable[type[ExecutionEntityImpl], execution]
assign[member[execution.executions], ClassCreator(arguments=[Literal... | Keyword[public] Keyword[static] identifier[ExecutionEntityImpl] identifier[createWithEmptyRelationshipCollections] operator[SEP] operator[SEP] {
identifier[ExecutionEntityImpl] identifier[execution] operator[=] Keyword[new] identifier[ExecutionEntityImpl] operator[SEP] operator[SEP] operator[SEP] identifier[exec... |
public VersionResource getVersion(String name) throws RepositoryException, IllegalResourceTypeException
{
return new VersionResource(versionURI(name), versionedResource, versionHistory.getVersion(name), namespaceContext);
} | class class_name[name] begin[{]
method[getVersion, return_type[type[VersionResource]], modifier[public], parameter[name]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=versio... | Keyword[public] identifier[VersionResource] identifier[getVersion] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[RepositoryException] , identifier[IllegalResourceTypeException] {
Keyword[return] Keyword[new] identifier[VersionResource] operator[SEP] identifier[versio... |
public List<ExtendedRelation> getRelations(String baseTable,
String relatedTable) throws SQLException {
return getRelations(baseTable, null, relatedTable, null, null, null);
} | class class_name[name] begin[{]
method[getRelations, return_type[type[List]], modifier[public], parameter[baseTable, relatedTable]] begin[{]
return[call[.getRelations, parameter[member[.baseTable], literal[null], member[.relatedTable], literal[null], literal[null], literal[null]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[ExtendedRelation] operator[>] identifier[getRelations] operator[SEP] identifier[String] identifier[baseTable] , identifier[String] identifier[relatedTable] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[return] identifier[getRelations] op... |
@Override
public int readInt() throws JMSException
{
backupState();
try
{
return MessageConvertTools.asInt(internalReadObject());
}
catch (JMSException e)
{
restoreState();
throw e;
}
catch (RuntimeException e)
{
restoreState();
throw e;
}
} | class class_name[name] begin[{]
method[readInt, return_type[type[int]], modifier[public], parameter[]] begin[{]
call[.backupState, parameter[]]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=internalReadObject, postfix_op... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[readInt] operator[SEP] operator[SEP] Keyword[throws] identifier[JMSException] {
identifier[backupState] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[return] identifier[MessageConvertTools] operator[SEP] iden... |
private Map<String, PersistenceUnitMetadata> findPersistenceMetadatas() throws InvalidConfigurationException
{
String puLocation = (String) (externalPropertyMap != null
&& externalPropertyMap.get(Constants.PERSISTENCE_UNIT_LOCATIION) != null ? externalPropertyMap
.get(Con... | class class_name[name] begin[{]
method[findPersistenceMetadatas, return_type[type[Map]], modifier[private], parameter[]] begin[{]
local_variable[type[String], puLocation]
local_variable[type[Enumeration], xmls]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=Me... | Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[PersistenceUnitMetadata] operator[>] identifier[findPersistenceMetadatas] operator[SEP] operator[SEP] Keyword[throws] identifier[InvalidConfigurationException] {
identifier[String] identifier[puLocation] operator[=] operator[SEP] ident... |
private void clear(Process entity) {
Cache<String, String> nameCache = ensureAvailableNameCache();
Cache<String, Process> entityCache = ensureAvailableEntityCache();
String processName = entity.getName() + DEFAULT_SEPARATOR + entity.getVersion();
if(nameCache != null && entityCache != null) {
nameCache.remov... | class class_name[name] begin[{]
method[clear, return_type[void], modifier[private], parameter[entity]] begin[{]
local_variable[type[Cache], nameCache]
local_variable[type[Cache], entityCache]
local_variable[type[String], processName]
if[binary_operation[binary_operation[... | Keyword[private] Keyword[void] identifier[clear] operator[SEP] identifier[Process] identifier[entity] operator[SEP] {
identifier[Cache] operator[<] identifier[String] , identifier[String] operator[>] identifier[nameCache] operator[=] identifier[ensureAvailableNameCache] operator[SEP] operator[SEP] operator[SEP]... |
public void clearModified() {
for (String field : mStatus.keySet()) {
switch (getStatus(field)) {
case DELETED:
mStatus.remove(field);
break;
case MODIFIED:
setStatus(field, FieldStatus.ORIGINAL);
... | class class_name[name] begin[{]
method[clearModified, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=['DELETED'], statements=[StatementExpression(expression=MethodInvocation(arguments=[M... | Keyword[public] Keyword[void] identifier[clearModified] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[field] operator[:] identifier[mStatus] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] {
Keyword[switch] operator[SEP] identifier[g... |
private static void streamResource(ServiceRequestContext ctx, HttpResponseWriter res,
ReadableByteChannel in, long remainingBytes) {
final int chunkSize = (int) Math.min(8192, remainingBytes);
final ByteBuf buf = ctx.alloc().buffer(chunkSize);
final int re... | class class_name[name] begin[{]
method[streamResource, return_type[void], modifier[private static], parameter[ctx, res, in, remainingBytes]] begin[{]
local_variable[type[int], chunkSize]
local_variable[type[ByteBuf], buf]
local_variable[type[int], readBytes]
local_variable[type[... | Keyword[private] Keyword[static] Keyword[void] identifier[streamResource] operator[SEP] identifier[ServiceRequestContext] identifier[ctx] , identifier[HttpResponseWriter] identifier[res] , identifier[ReadableByteChannel] identifier[in] , Keyword[long] identifier[remainingBytes] operator[SEP] {
Keyword[final] ... |
public CmsUgcSession createSession(CmsObject cms, HttpServletRequest request, String sitePath)
throws CmsUgcException {
CmsUgcConfigurationReader reader = new CmsUgcConfigurationReader(cms);
CmsUgcConfiguration config = null;
try {
CmsFile configFile = cms.readFile(sitePath);
... | class class_name[name] begin[{]
method[createSession, return_type[type[CmsUgcSession]], modifier[public], parameter[cms, request, sitePath]] begin[{]
local_variable[type[CmsUgcConfigurationReader], reader]
local_variable[type[CmsUgcConfiguration], config]
TryStatement(block=[LocalVariab... | Keyword[public] identifier[CmsUgcSession] identifier[createSession] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[HttpServletRequest] identifier[request] , identifier[String] identifier[sitePath] operator[SEP] Keyword[throws] identifier[CmsUgcException] {
identifier[CmsUgcConfigurationReader... |
@Override
public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException {
Integer page = null;
Integer limit = null;
if (params instanceof TradeHistoryParamPaging) {
page = ((TradeHistoryParamPaging) params).getPageNumber() + 1;
limit = ((TradeHistoryParamPaging) params).get... | class class_name[name] begin[{]
method[getTradeHistory, return_type[type[UserTrades]], modifier[public], parameter[params]] begin[{]
local_variable[type[Integer], page]
local_variable[type[Integer], limit]
if[binary_operation[member[.params], instanceof, type[TradeHistoryParamPa... | annotation[@] identifier[Override] Keyword[public] identifier[UserTrades] identifier[getTradeHistory] operator[SEP] identifier[TradeHistoryParams] identifier[params] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Integer] identifier[page] operator[=] Other[null] operator[SEP] identifier[Integ... |
public Set<Constructor> getConstructorsMatchParams(Class<?>... types) {
return getConstructorsFromDescriptors(store.get(index(MethodParameterScanner.class), names(types).toString()), loaders());
} | class class_name[name] begin[{]
method[getConstructorsMatchParams, return_type[type[Set]], modifier[public], parameter[types]] begin[{]
return[call[.getConstructorsFromDescriptors, parameter[call[store.get, parameter[call[.index, parameter[ClassReference(postfix_operators=[], prefix_operators=[], quali... | Keyword[public] identifier[Set] operator[<] identifier[Constructor] operator[>] identifier[getConstructorsMatchParams] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[...] identifier[types] operator[SEP] {
Keyword[return] identifier[getConstructorsFromDescriptors] operator[SEP] ident... |
public void insert(final int index, final Object item) {
if (mAnimateAdditionAdapter == null) {
throw new IllegalStateException("Adapter should implement Insertable!");
}
mAnimateAdditionAdapter.insert(index, item);
} | class class_name[name] begin[{]
method[insert, return_type[void], modifier[public], parameter[index, item]] begin[{]
if[binary_operation[member[.mAnimateAdditionAdapter], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pre... | Keyword[public] Keyword[void] identifier[insert] operator[SEP] Keyword[final] Keyword[int] identifier[index] , Keyword[final] identifier[Object] identifier[item] operator[SEP] {
Keyword[if] operator[SEP] identifier[mAnimateAdditionAdapter] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keywo... |
public static byte[] sha1(@NotNull String input, @Nullable byte[] salt, int iterations) {
return digest(input.getBytes(Charsets.UTF_8), get(SHA_1_DIGEST), salt, iterations);
} | class class_name[name] begin[{]
method[sha1, return_type[type[byte]], modifier[public static], parameter[input, salt, iterations]] begin[{]
return[call[.digest, parameter[call[input.getBytes, parameter[member[Charsets.UTF_8]]], call[.get, parameter[member[.SHA_1_DIGEST]]], member[.salt], member[.iterat... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[sha1] operator[SEP] annotation[@] identifier[NotNull] identifier[String] identifier[input] , annotation[@] identifier[Nullable] Keyword[byte] operator[SEP] operator[SEP] identifier[salt] , Keyword[int] identifier[iterations] operator... |
static List<ListItem> createItemsV1(Context context) {
final List<ListItem> items = new ArrayList<>();
final Painting[] paintings = Painting.list(context.getResources());
items.add(new ListItem("Donec sem arcu, feugiat sit amet purus ut, cursus tristique"
+ " justo. Quisque eu l... | class class_name[name] begin[{]
method[createItemsV1, return_type[type[List]], modifier[static], parameter[context]] begin[{]
local_variable[type[List], items]
local_variable[type[Painting], paintings]
call[items.add, parameter[ClassCreator(arguments=[BinaryOperation(operandl=Li... | Keyword[static] identifier[List] operator[<] identifier[ListItem] operator[>] identifier[createItemsV1] operator[SEP] identifier[Context] identifier[context] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[ListItem] operator[>] identifier[items] operator[=] Keyword[new] identifier[ArrayLis... |
public Dimension getScaledSize() {
if (scaledPicture != null)
return new Dimension(scaledPicture.getWidth(), scaledPicture.getHeight());
else
return new Dimension(0, 0);
} | class class_name[name] begin[{]
method[getScaledSize, return_type[type[Dimension]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.scaledPicture], !=, literal[null]]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getWidth, postfix_operators=[... | Keyword[public] identifier[Dimension] identifier[getScaledSize] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[scaledPicture] operator[!=] Other[null] operator[SEP] Keyword[return] Keyword[new] identifier[Dimension] operator[SEP] identifier[scaledPicture] operator[SEP] identifier[getWidth] op... |
public static long parse(final String string) {
if (string.length() == 0) {
throw new NumberFormatException("empty string");
}
int radix = 10;
int maxSafePos = MAX_SAFE_DIGITS[radix] - 1;
long value = 0;
for (int pos = 0; pos < string.length(); pos++) {
... | class class_name[name] begin[{]
method[parse, return_type[type[long]], modifier[public static], parameter[string]] begin[{]
if[binary_operation[call[string.length, parameter[]], ==, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[],... | Keyword[public] Keyword[static] Keyword[long] identifier[parse] operator[SEP] Keyword[final] identifier[String] identifier[string] operator[SEP] {
Keyword[if] operator[SEP] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] {
Keyword[thr... |
public void setPixelSize(int width, int height) {
layerHtmlContainer.setPixelSize(width, height);
drawingArea.setWidth(width);
drawingArea.setHeight(height);
canvasPanel.setPixelSize(width, height);
for (CanvasContainer container : worldCanvases) {
container.setPixelSize(width, height);
}
super.setPixe... | class class_name[name] begin[{]
method[setPixelSize, return_type[void], modifier[public], parameter[width, height]] begin[{]
call[layerHtmlContainer.setPixelSize, parameter[member[.width], member[.height]]]
call[drawingArea.setWidth, parameter[member[.width]]]
ca... | Keyword[public] Keyword[void] identifier[setPixelSize] operator[SEP] Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] {
identifier[layerHtmlContainer] operator[SEP] identifier[setPixelSize] operator[SEP] identifier[width] , identifier[height] operator[SEP] operator[SEP] identifier... |
public void forEach(@NotNull final Consumer<? super T> action) {
while (iterator.hasNext()) {
action.accept(iterator.next());
}
} | class class_name[name] begin[{]
method[forEach, return_type[void], modifier[public], parameter[action]] begin[{]
while[call[iterator.hasNext, parameter[]]] begin[{]
call[action.accept, parameter[call[iterator.next, parameter[]]]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[forEach] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[action] operator[SEP] {
Keyword[while] operator[SEP] identifier[iterator] operator[SEP] identifier[hasN... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.