code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void lockClusterState(ClusterStateChange stateChange, Address initiator, String txnId, long leaseTime,
int memberListVersion, int partitionStateVersion) {
Preconditions.checkNotNull(stateChange);
clusterServiceLock.lock();
try {
if (!node.getNo... | class class_name[name] begin[{]
method[lockClusterState, return_type[void], modifier[public], parameter[stateChange, initiator, txnId, leaseTime, memberListVersion, partitionStateVersion]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.stateChange]]]
call[clusterSer... | Keyword[public] Keyword[void] identifier[lockClusterState] operator[SEP] identifier[ClusterStateChange] identifier[stateChange] , identifier[Address] identifier[initiator] , identifier[String] identifier[txnId] , Keyword[long] identifier[leaseTime] , Keyword[int] identifier[memberListVersion] , Keyword[int] identi... |
@Override
public CommerceNotificationTemplate create(
long commerceNotificationTemplateId) {
CommerceNotificationTemplate commerceNotificationTemplate = new CommerceNotificationTemplateImpl();
commerceNotificationTemplate.setNew(true);
commerceNotificationTemplate.setPrimaryKey(commerceNotificationTemplateId)... | class class_name[name] begin[{]
method[create, return_type[type[CommerceNotificationTemplate]], modifier[public], parameter[commerceNotificationTemplateId]] begin[{]
local_variable[type[CommerceNotificationTemplate], commerceNotificationTemplate]
call[commerceNotificationTemplate.setNew... | annotation[@] identifier[Override] Keyword[public] identifier[CommerceNotificationTemplate] identifier[create] operator[SEP] Keyword[long] identifier[commerceNotificationTemplateId] operator[SEP] {
identifier[CommerceNotificationTemplate] identifier[commerceNotificationTemplate] operator[=] Keyword[new] identifi... |
public com.google.api.ads.admanager.axis.v201808.Money getCost() {
return cost;
} | class class_name[name] begin[{]
method[getCost, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[member[.cost]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201808] operator[SEP] identifier[Money] identifier[getCost] operator[SEP] operator[SEP] {
Keywo... |
public Inventory newInstance(ClassLoader classLoader) {
Iterator<Inventory> it = ServiceLoader.load(Inventory.class, classLoader).iterator();
if (!it.hasNext()) {
return null;
} else {
return it.next();
}
} | class class_name[name] begin[{]
method[newInstance, return_type[type[Inventory]], modifier[public], parameter[classLoader]] begin[{]
local_variable[type[Iterator], it]
if[call[it.hasNext, parameter[]]] begin[{]
return[literal[null]]
else begin[{]
return[c... | Keyword[public] identifier[Inventory] identifier[newInstance] operator[SEP] identifier[ClassLoader] identifier[classLoader] operator[SEP] {
identifier[Iterator] operator[<] identifier[Inventory] operator[>] identifier[it] operator[=] identifier[ServiceLoader] operator[SEP] identifier[load] operator[SEP] identifi... |
static LHS getLHSObjectField( Object object, String fieldName )
throws UtilEvalError, ReflectError {
if ( object instanceof This )
return new LHS( ((This)object).namespace, fieldName, false );
try {
Invocable f = resolveExpectedJavaField(
object.getCla... | class class_name[name] begin[{]
method[getLHSObjectField, return_type[type[LHS]], modifier[static], parameter[object, fieldName]] begin[{]
if[binary_operation[member[.object], instanceof, type[This]]] begin[{]
return[ClassCreator(arguments=[Cast(expression=MemberReference(member=object, postfix... | Keyword[static] identifier[LHS] identifier[getLHSObjectField] operator[SEP] identifier[Object] identifier[object] , identifier[String] identifier[fieldName] operator[SEP] Keyword[throws] identifier[UtilEvalError] , identifier[ReflectError] {
Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] iden... |
public static String timeFormat(final long milliseconds) {
double seconds = milliseconds / 1000.0d;
final NumberFormat fmt = new DecimalFormat("#0.000");
return fmt.format(seconds);
} | class class_name[name] begin[{]
method[timeFormat, return_type[type[String]], modifier[public static], parameter[milliseconds]] begin[{]
local_variable[type[double], seconds]
local_variable[type[NumberFormat], fmt]
return[call[fmt.format, parameter[member[.seconds]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[timeFormat] operator[SEP] Keyword[final] Keyword[long] identifier[milliseconds] operator[SEP] {
Keyword[double] identifier[seconds] operator[=] identifier[milliseconds] operator[/] literal[Float] operator[SEP] Keyword[final] identifier[NumberFormat] i... |
public static synchronized void setInstrumentation(Instrumentation inst) {
if (tc.isEntryEnabled())
Tr.entry(tc, "setInstrumentation", inst);
instrumentation = inst;
if (instrumentation == null) {
} else if (isJava8TraceEnabled) {
setInjectAtTransform(true); //We a... | class class_name[name] begin[{]
method[setInstrumentation, return_type[void], modifier[synchronized public static], parameter[inst]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[Tr.entry, parameter[member[.tc], literal["setInstrumentation"], member[.inst]]]
... | Keyword[public] Keyword[static] Keyword[synchronized] Keyword[void] identifier[setInstrumentation] operator[SEP] identifier[Instrumentation] identifier[inst] operator[SEP] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] ... |
public static RootContainer getRootContainer(final EntityContainer container) {
// Root must be identifable
if (!(container instanceof Identifiable)) {
return null;
}
EntityContainer parent = container instanceof Entity ? ((Entity) container).getContainer() : null;
UUID rootID = null;
// Check not root
if... | class class_name[name] begin[{]
method[getRootContainer, return_type[type[RootContainer]], modifier[public static], parameter[container]] begin[{]
if[binary_operation[member[.container], instanceof, type[Identifiable]]] begin[{]
return[literal[null]]
else begin[{]
None
... | Keyword[public] Keyword[static] identifier[RootContainer] identifier[getRootContainer] operator[SEP] Keyword[final] identifier[EntityContainer] identifier[container] operator[SEP] {
Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[container] Keyword[instanceof] identifier[Identifiable] operator[SEP... |
public BoxRequestsFolder.UpdateFolder getDisableSharedLinkRequest(String id) {
BoxRequestsFolder.UpdateFolder request = new BoxRequestsFolder.UpdateFolder(id, getFolderInfoUrl(id), mSession)
.setSharedLink(null);
return request;
} | class class_name[name] begin[{]
method[getDisableSharedLinkRequest, return_type[type[BoxRequestsFolder]], modifier[public], parameter[id]] begin[{]
local_variable[type[BoxRequestsFolder], request]
return[member[.request]]
end[}]
END[}] | Keyword[public] identifier[BoxRequestsFolder] operator[SEP] identifier[UpdateFolder] identifier[getDisableSharedLinkRequest] operator[SEP] identifier[String] identifier[id] operator[SEP] {
identifier[BoxRequestsFolder] operator[SEP] identifier[UpdateFolder] identifier[request] operator[=] Keyword[new] identifier... |
@Override
public UpdateAccountAuditConfigurationResult updateAccountAuditConfiguration(UpdateAccountAuditConfigurationRequest request) {
request = beforeClientExecution(request);
return executeUpdateAccountAuditConfiguration(request);
} | class class_name[name] begin[{]
method[updateAccountAuditConfiguration, return_type[type[UpdateAccountAuditConfigurationResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeUpdate... | annotation[@] identifier[Override] Keyword[public] identifier[UpdateAccountAuditConfigurationResult] identifier[updateAccountAuditConfiguration] operator[SEP] identifier[UpdateAccountAuditConfigurationRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] o... |
public void onShutdown() {
for (String listenerName : registeredFileListeners.keySet()) {
logger.info("Deregistering File Listener: " + listenerName);
FileListener listener = registeredFileListeners.get(listenerName);
listener.stopListening();
}
} | class class_name[name] begin[{]
method[onShutdown, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], q... | Keyword[public] Keyword[void] identifier[onShutdown] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[listenerName] operator[:] identifier[registeredFileListeners] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] {
identifier[logger] ope... |
@Override
public LogEvent rewrite(LogEvent source) {
// get the markers for the log event. If no markers, nothing can be
// tagged confidential and we can return
Marker sourceMarker = source.getMarker();
if (sourceMarker == null) {
return source;
}
// get the message. If no message we can return
fina... | class class_name[name] begin[{]
method[rewrite, return_type[type[LogEvent]], modifier[public], parameter[source]] begin[{]
local_variable[type[Marker], sourceMarker]
if[binary_operation[member[.sourceMarker], ==, literal[null]]] begin[{]
return[member[.source]]
else ... | annotation[@] identifier[Override] Keyword[public] identifier[LogEvent] identifier[rewrite] operator[SEP] identifier[LogEvent] identifier[source] operator[SEP] {
identifier[Marker] identifier[sourceMarker] operator[=] identifier[source] operator[SEP] identifier[getMarker] operator[SEP] operator[SEP] operator[SEP... |
public void addJobToRunLater(Vector<AutoTask> vJobsToRunLater, AutoTask jobToAdd)
{
if (jobToAdd.getProperty(NO_DUPLICATE) != null)
{
Date timeJobToAdd = (Date)jobToAdd.getProperties().get(TIME_TO_RUN);
for (int iIndex = 0; iIndex < vJobsToRunLater.size(); iIndex++)
... | class class_name[name] begin[{]
method[addJobToRunLater, return_type[void], modifier[public], parameter[vJobsToRunLater, jobToAdd]] begin[{]
if[binary_operation[call[jobToAdd.getProperty, parameter[member[.NO_DUPLICATE]]], !=, literal[null]]] begin[{]
local_variable[type[Date], time... | Keyword[public] Keyword[void] identifier[addJobToRunLater] operator[SEP] identifier[Vector] operator[<] identifier[AutoTask] operator[>] identifier[vJobsToRunLater] , identifier[AutoTask] identifier[jobToAdd] operator[SEP] {
Keyword[if] operator[SEP] identifier[jobToAdd] operator[SEP] identifier[getProperty] op... |
void handleGet(Object value, MatchSpaceKey msg, EvalCache cache, Object contextValue,
SearchResults result) throws MatchingException, BadMessageFormatMatchingException
{
if (tc.isEntryEnabled())
tc.entry(this,cclass, "handleGet", new Object[] {value,msg,cache,contextValue,result});
if (!(value instan... | class class_name[name] begin[{]
method[handleGet, return_type[void], modifier[default], parameter[value, msg, cache, contextValue, result]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[tc.entry, parameter[THIS[], member[.cclass], literal["handleGet"], ArrayCreator... | Keyword[void] identifier[handleGet] operator[SEP] identifier[Object] identifier[value] , identifier[MatchSpaceKey] identifier[msg] , identifier[EvalCache] identifier[cache] , identifier[Object] identifier[contextValue] , identifier[SearchResults] identifier[result] operator[SEP] Keyword[throws] identifier[MatchingE... |
public boolean tryPublishEvents(EventTranslatorVararg<E> translator, Object[]... args) {
return tryPublishEvents(translator, 0, args.length, args);
} | class class_name[name] begin[{]
method[tryPublishEvents, return_type[type[boolean]], modifier[public], parameter[translator, args]] begin[{]
return[call[.tryPublishEvents, parameter[member[.translator], literal[0], member[args.length], member[.args]]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[tryPublishEvents] operator[SEP] identifier[EventTranslatorVararg] operator[<] identifier[E] operator[>] identifier[translator] , identifier[Object] operator[SEP] operator[SEP] operator[...] identifier[args] operator[SEP] {
Keyword[return] identifier[tryPublishEvents] ... |
private boolean tryLockJob(Properties properties) {
try {
if (Boolean.valueOf(properties.getProperty(ConfigurationKeys.JOB_LOCK_ENABLED_KEY, Boolean.TRUE.toString()))) {
this.jobLockOptional = Optional.of(getJobLock(properties, new JobLockEventListener() {
@Override
public void onL... | class class_name[name] begin[{]
method[tryLockJob, return_type[type[boolean]], modifier[private], parameter[properties]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=JOB_LOCK_ENABLED_KEY, postfix_operators=[], prefix_o... | Keyword[private] Keyword[boolean] identifier[tryLockJob] operator[SEP] identifier[Properties] identifier[properties] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[properties] operator[SEP] identifier[getProperty]... |
@Override
public <T> T findById(Object id, Class<T> entityClass) {
return findById(id, Util.determineCollectionName(entityClass));
} | class class_name[name] begin[{]
method[findById, return_type[type[T]], modifier[public], parameter[id, entityClass]] begin[{]
return[call[.findById, parameter[member[.id], call[Util.determineCollectionName, parameter[member[.entityClass]]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[findById] operator[SEP] identifier[Object] identifier[id] , identifier[Class] operator[<] identifier[T] operator[>] identifier[entityClass] operator[SEP] {
Keyword[return] identifier[findById] opera... |
public static void getHistory() throws Exception{
Client client = new Client("ProfileName", false);
// Obtain the 100 history entries starting from offset 0
History[] history = client.refreshHistory(100, 0);
client.clearHistory();
} | class class_name[name] begin[{]
method[getHistory, return_type[void], modifier[public static], parameter[]] begin[{]
local_variable[type[Client], client]
local_variable[type[History], history]
call[client.clearHistory, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[getHistory] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Client] identifier[client] operator[=] Keyword[new] identifier[Client] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[Histo... |
public boolean isActive() {
lock.readLock().lock();
try {
return !started || asynchronousExecution != null || isAlive();
} finally {
lock.readLock().unlock();
}
} | class class_name[name] begin[{]
method[isActive, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
call[lock.readLock, parameter[]]
TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=started, postfix_... | Keyword[public] Keyword[boolean] identifier[isActive] operator[SEP] operator[SEP] {
identifier[lock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[return] operator[!] identifier[started] op... |
private void BuildInitJavaScript(InteractiveObject interactiveObject) {
String gearVRinitJavaScript = "function " + GEARVR_INIT_JAVASCRIPT_FUNCTION_NAME + "()\n{\n";
//The first two arguments are for the event - could be time or an isOver/isActive boolean -
// and the second argument is for the... | class class_name[name] begin[{]
method[BuildInitJavaScript, return_type[void], modifier[private], parameter[interactiveObject]] begin[{]
local_variable[type[String], gearVRinitJavaScript]
local_variable[type[ScriptObject], scriptObject]
local_variable[type[int], argumentNum]
... | Keyword[private] Keyword[void] identifier[BuildInitJavaScript] operator[SEP] identifier[InteractiveObject] identifier[interactiveObject] operator[SEP] {
identifier[String] identifier[gearVRinitJavaScript] operator[=] literal[String] operator[+] identifier[GEARVR_INIT_JAVASCRIPT_FUNCTION_NAME] operator[+] literal... |
public void finalizeFlow(final ExecutableFlow flow, final String reason,
@Nullable final Throwable originalError) {
final int execId = flow.getExecutionId();
boolean alertUser = true;
this.updaterStage.set("finalizing flow " + execId);
// First we check if the execution in the datastore is comple... | class class_name[name] begin[{]
method[finalizeFlow, return_type[void], modifier[public], parameter[flow, reason, originalError]] begin[{]
local_variable[type[int], execId]
local_variable[type[boolean], alertUser]
THIS[member[None.updaterStage]call[None.set, parameter[binary_ope... | Keyword[public] Keyword[void] identifier[finalizeFlow] operator[SEP] Keyword[final] identifier[ExecutableFlow] identifier[flow] , Keyword[final] identifier[String] identifier[reason] , annotation[@] identifier[Nullable] Keyword[final] identifier[Throwable] identifier[originalError] operator[SEP] {
Keyword[fina... |
public static void sendMail(MailContent mailContent) throws MessagingException {
// 判断是否需要身份认证
Properties pro = mailContent.getProperties();
// 如果需要身份认证,则创建一个密码验证器
AuthEntity authEntity = new MailUtil().new AuthEntity(mailContent.getAuthUsername(), mailContent.getAuthPassword());
... | class class_name[name] begin[{]
method[sendMail, return_type[void], modifier[public static], parameter[mailContent]] begin[{]
local_variable[type[Properties], pro]
local_variable[type[AuthEntity], authEntity]
local_variable[type[Session], sendMailSession]
local_variable[type[Mes... | Keyword[public] Keyword[static] Keyword[void] identifier[sendMail] operator[SEP] identifier[MailContent] identifier[mailContent] operator[SEP] Keyword[throws] identifier[MessagingException] {
identifier[Properties] identifier[pro] operator[=] identifier[mailContent] operator[SEP] identifier[getProperties] operat... |
private static int scanUriEscape(ByteToChar converter,
byte []rawUri, int i, int len)
throws IOException
{
int ch1 = i < len ? (rawUri[i++] & 0xff) : -1;
if (ch1 == 'u') {
ch1 = i < len ? (rawUri[i++] & 0xff) : -1;
int ch2 = i < len ? (rawUri[i++] & 0xff) : ... | class class_name[name] begin[{]
method[scanUriEscape, return_type[type[int]], modifier[private static], parameter[converter, rawUri, i, len]] begin[{]
local_variable[type[int], ch1]
if[binary_operation[member[.ch1], ==, literal['u']]] begin[{]
assign[member[.ch1]... | Keyword[private] Keyword[static] Keyword[int] identifier[scanUriEscape] operator[SEP] identifier[ByteToChar] identifier[converter] , Keyword[byte] operator[SEP] operator[SEP] identifier[rawUri] , Keyword[int] identifier[i] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] {
... |
public void terminate() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "terminate");
}
AsyncLibrary.shutdown();
groups.clear();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.exit(tc, "terminate")... | class class_name[name] begin[{]
method[terminate, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Tr.entry, parameter[member[.tc... | Keyword[public] Keyword[void] identifier[terminate] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operato... |
public <T, V extends Comparable<T>> V exclusiveBetween(final T start, final T end, final V value) {
if (value.compareTo(start) <= 0 || value.compareTo(end) >= 0) {
fail(String.format(DEFAULT_EXCLUSIVE_BETWEEN_EX_MESSAGE, value, start, end));
}
return value;
} | class class_name[name] begin[{]
method[exclusiveBetween, return_type[type[V]], modifier[public], parameter[start, end, value]] begin[{]
if[binary_operation[binary_operation[call[value.compareTo, parameter[member[.start]]], <=, literal[0]], ||, binary_operation[call[value.compareTo, parameter[me... | Keyword[public] operator[<] identifier[T] , identifier[V] Keyword[extends] identifier[Comparable] operator[<] identifier[T] operator[>] operator[>] identifier[V] identifier[exclusiveBetween] operator[SEP] Keyword[final] identifier[T] identifier[start] , Keyword[final] identifier[T] identifier[end] , Keyword[final] i... |
public static UriTemplateMatcher create(Stream<? extends ImmutableFunctionalTerm> targetAtomStream,
TermFactory termFactory) {
Set<String> templateStrings = new HashSet<>();
UriTemplateMatcher uriTemplateMatcher = new UriTemplateMatcher(termFactory);
... | class class_name[name] begin[{]
method[create, return_type[type[UriTemplateMatcher]], modifier[public static], parameter[targetAtomStream, termFactory]] begin[{]
local_variable[type[Set], templateStrings]
local_variable[type[UriTemplateMatcher], uriTemplateMatcher]
local_variable[type[I... | Keyword[public] Keyword[static] identifier[UriTemplateMatcher] identifier[create] operator[SEP] identifier[Stream] operator[<] operator[?] Keyword[extends] identifier[ImmutableFunctionalTerm] operator[>] identifier[targetAtomStream] , identifier[TermFactory] identifier[termFactory] operator[SEP] {
identifier[Se... |
public final void sample()
{
long sum = _sum.getAndSet(0);
int count = _count.getAndSet(0);
if (count != 0)
_value =sum / (double) count;
else
_value = 0;
} | class class_name[name] begin[{]
method[sample, return_type[void], modifier[final public], parameter[]] begin[{]
local_variable[type[long], sum]
local_variable[type[int], count]
if[binary_operation[member[.count], !=, literal[0]]] begin[{]
assign[member[._value], bina... | Keyword[public] Keyword[final] Keyword[void] identifier[sample] operator[SEP] operator[SEP] {
Keyword[long] identifier[sum] operator[=] identifier[_sum] operator[SEP] identifier[getAndSet] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[int] identifier[count] operator[=] identifier[_count] operator[SE... |
protected void returnToTaskQueue(boolean sourcesReady)
{
if (sourcesReady) {
// If we've done something meaningful, go ahead and return ourselves to the queue immediately
m_taskQueue.offer(this);
} else {
// Otherwise, avoid spinning too aggressively, so wait a mi... | class class_name[name] begin[{]
method[returnToTaskQueue, return_type[void], modifier[protected], parameter[sourcesReady]] begin[{]
if[member[.sourcesReady]] begin[{]
call[m_taskQueue.offer, parameter[THIS[]]]
else begin[{]
call[VoltDB.ins... | Keyword[protected] Keyword[void] identifier[returnToTaskQueue] operator[SEP] Keyword[boolean] identifier[sourcesReady] operator[SEP] {
Keyword[if] operator[SEP] identifier[sourcesReady] operator[SEP] {
identifier[m_taskQueue] operator[SEP] identifier[offer] operator[SEP] Keyword[this] operator[SEP] op... |
public Tag findTag(String tagName)
{
if (null == tagName)
throw new IllegalArgumentException("Looking for null tag name.");
return definedTags.get(Tag.normalizeName(tagName));
} | class class_name[name] begin[{]
method[findTag, return_type[type[Tag]], modifier[public], parameter[tagName]] begin[{]
if[binary_operation[literal[null], ==, member[.tagName]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifie... | Keyword[public] identifier[Tag] identifier[findTag] operator[SEP] identifier[String] identifier[tagName] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[tagName] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP... |
public Object execute(final Object value, final CsvContext context) {
validateInputNotNull(value, context);
final Double result;
if( value instanceof Double ) {
result = (Double) value;
} else {
try {
result = Double.parseDouble(value.toString());
}
catch(final NumberFormatException e) {
... | class class_name[name] begin[{]
method[execute, return_type[type[Object]], modifier[public], parameter[value, context]] begin[{]
call[.validateInputNotNull, parameter[member[.value], member[.context]]]
local_variable[type[Double], result]
if[binary_operation[member[.valu... | Keyword[public] identifier[Object] identifier[execute] operator[SEP] Keyword[final] identifier[Object] identifier[value] , Keyword[final] identifier[CsvContext] identifier[context] operator[SEP] {
identifier[validateInputNotNull] operator[SEP] identifier[value] , identifier[context] operator[SEP] operator[SEP]... |
private static <E extends Comparable<E>> int partitionDescending(E[] array, int start, int end) {
E pivot = array[end];
int index = start - 1;
for(int j = start; j < end; j++) {
if(array[j].compareTo(pivot) >= 0) {
index++;
TrivialSwap.swap(ar... | class class_name[name] begin[{]
method[partitionDescending, return_type[type[int]], modifier[private static], parameter[array, start, end]] begin[{]
local_variable[type[E], pivot]
local_variable[type[int], index]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condi... | Keyword[private] Keyword[static] operator[<] identifier[E] Keyword[extends] identifier[Comparable] operator[<] identifier[E] operator[>] operator[>] Keyword[int] identifier[partitionDescending] operator[SEP] identifier[E] operator[SEP] operator[SEP] identifier[array] , Keyword[int] identifier[start] , Keyword[int] id... |
private JsonParserIterator<DataSegment> getMetadataSegments(
DruidLeaderClient coordinatorClient,
ObjectMapper jsonMapper,
BytesAccumulatingResponseHandler responseHandler,
Set<String> watchedDataSources
)
{
String query = "/druid/coordinator/v1/metadata/segments";
if (watchedDataSou... | class class_name[name] begin[{]
method[getMetadataSegments, return_type[type[JsonParserIterator]], modifier[private], parameter[coordinatorClient, jsonMapper, responseHandler, watchedDataSources]] begin[{]
local_variable[type[String], query]
if[binary_operation[binary_operation[member[.... | Keyword[private] identifier[JsonParserIterator] operator[<] identifier[DataSegment] operator[>] identifier[getMetadataSegments] operator[SEP] identifier[DruidLeaderClient] identifier[coordinatorClient] , identifier[ObjectMapper] identifier[jsonMapper] , identifier[BytesAccumulatingResponseHandler] identifier[response... |
public static <T, R> Spplr<R> map(Spplr<T> supplier, Func<T, R> function) {
if (supplier instanceof ConstSupplier || supplier instanceof CachingSupplier) {
return of(function.apply(supplier.get()));
}
return new TransformingSupplier<>(supplier, function);
} | class class_name[name] begin[{]
method[map, return_type[type[Spplr]], modifier[public static], parameter[supplier, function]] begin[{]
if[binary_operation[binary_operation[member[.supplier], instanceof, type[ConstSupplier]], ||, binary_operation[member[.supplier], instanceof, type[CachingSuppli... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[R] operator[>] identifier[Spplr] operator[<] identifier[R] operator[>] identifier[map] operator[SEP] identifier[Spplr] operator[<] identifier[T] operator[>] identifier[supplier] , identifier[Func] operator[<] identifier[T] , identifier[R] operato... |
@Override
public UpdateGlobalSettingsResult updateGlobalSettings(UpdateGlobalSettingsRequest request) {
request = beforeClientExecution(request);
return executeUpdateGlobalSettings(request);
} | class class_name[name] begin[{]
method[updateGlobalSettings, return_type[type[UpdateGlobalSettingsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeUpdateGlobalSettings, parame... | annotation[@] identifier[Override] Keyword[public] identifier[UpdateGlobalSettingsResult] identifier[updateGlobalSettings] operator[SEP] identifier[UpdateGlobalSettingsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ... |
@Bean
@Lazy
@ConditionalOnMissingBean(AbstractLoadBalancerAwareClient.class)
public RestClient ribbonRestClient(IClientConfig config, ILoadBalancer loadBalancer,
ServerIntrospector serverIntrospector, RetryHandler retryHandler) {
RestClient client = new RibbonClientConfiguration.OverrideRestClient(config,
s... | class class_name[name] begin[{]
method[ribbonRestClient, return_type[type[RestClient]], modifier[public], parameter[config, loadBalancer, serverIntrospector, retryHandler]] begin[{]
local_variable[type[RestClient], client]
call[client.setLoadBalancer, parameter[member[.loadBalancer]]]
... | annotation[@] identifier[Bean] annotation[@] identifier[Lazy] annotation[@] identifier[ConditionalOnMissingBean] operator[SEP] identifier[AbstractLoadBalancerAwareClient] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[RestClient] identifier[ribbonRestClient] operator[SEP] identifier[IClientConfig... |
@Override
public RandomVariable squared() {
return apply(new DoubleUnaryOperator() {
@Override
public double applyAsDouble(double x) {
return x * x;
}
});
} | class class_name[name] begin[{]
method[squared, return_type[type[RandomVariable]], modifier[public], parameter[]] begin[{]
return[call[.apply, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOpera... | annotation[@] identifier[Override] Keyword[public] identifier[RandomVariable] identifier[squared] operator[SEP] operator[SEP] {
Keyword[return] identifier[apply] operator[SEP] Keyword[new] identifier[DoubleUnaryOperator] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] ... |
public static SortedMap<String, Charset> availableCharsets() {
// Start with a copy of the built-in charsets...
@SuppressWarnings("unchecked")
TreeMap<String, Charset> charsets = new TreeMap<String, Charset>(String.CASE_INSENSITIVE_ORDER);
for (String charsetName : IOSCharset.getAvailabl... | class class_name[name] begin[{]
method[availableCharsets, return_type[type[SortedMap]], modifier[public static], parameter[]] begin[{]
local_variable[type[TreeMap], charsets]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableD... | Keyword[public] Keyword[static] identifier[SortedMap] operator[<] identifier[String] , identifier[Charset] operator[>] identifier[availableCharsets] operator[SEP] operator[SEP] {
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[TreeMap] operator[<] identifier[Str... |
public static String marshall(final GetMetricStatisticsResponse obj,
final String localPartQName, final String requestVersion) {
StringWriter writer = new StringWriter();
try {
/*-
* call jaxbMarshaller.marshal() synchronized (fixes the issue of
* ja... | class class_name[name] begin[{]
method[marshall, return_type[type[String]], modifier[public static], parameter[obj, localPartQName, requestVersion]] begin[{]
local_variable[type[StringWriter], writer]
TryStatement(block=[SynchronizedStatement(block=[LocalVariableDeclaration(annotations=[], decl... | Keyword[public] Keyword[static] identifier[String] identifier[marshall] operator[SEP] Keyword[final] identifier[GetMetricStatisticsResponse] identifier[obj] , Keyword[final] identifier[String] identifier[localPartQName] , Keyword[final] identifier[String] identifier[requestVersion] operator[SEP] {
identifier[S... |
public FactionWarfareLeaderboardResponse getFwLeaderboards(String datasource, String ifNoneMatch)
throws ApiException {
ApiResponse<FactionWarfareLeaderboardResponse> resp = getFwLeaderboardsWithHttpInfo(datasource, ifNoneMatch);
return resp.getData();
} | class class_name[name] begin[{]
method[getFwLeaderboards, return_type[type[FactionWarfareLeaderboardResponse]], modifier[public], parameter[datasource, ifNoneMatch]] begin[{]
local_variable[type[ApiResponse], resp]
return[call[resp.getData, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[FactionWarfareLeaderboardResponse] identifier[getFwLeaderboards] operator[SEP] identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] operator[SEP] Keyword[throws] identifier[ApiException] {
identifier[ApiResponse] operator[<] identifier[FactionWarfareL... |
public Collection<String> getStringCollection(final Collection<String> collection) {
final int len = getVInt();
for (int i = 0; i < len; i++) {
collection.add(getString());
}
return collection;
} | class class_name[name] begin[{]
method[getStringCollection, return_type[type[Collection]], modifier[public], parameter[collection]] begin[{]
local_variable[type[int], len]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodI... | Keyword[public] identifier[Collection] operator[<] identifier[String] operator[>] identifier[getStringCollection] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[String] operator[>] identifier[collection] operator[SEP] {
Keyword[final] Keyword[int] identifier[len] operator[=] identifie... |
public void insert_uc(final short[] argin) {
final byte[] values = new byte[argin.length];
for (int i = 0; i < argin.length; i++) {
values[i] = (byte) (argin[i] & 0xFF);
}
attrval.r_dim.dim_x = argin.length;
attrval.r_dim.dim_y = 0;
DevVarCharArrayHelper.insert(attrval.value, values);
} | class class_name[name] begin[{]
method[insert_uc, return_type[void], modifier[public], parameter[argin]] begin[{]
local_variable[type[byte], values]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=values, post... | Keyword[public] Keyword[void] identifier[insert_uc] operator[SEP] Keyword[final] Keyword[short] operator[SEP] operator[SEP] identifier[argin] operator[SEP] {
Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[values] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[argin] operator... |
public final void updateTableHeads(final Element root) {
final Iterable<Element> tableHeadRows; // Heads to fix
Element table; // HTML table
Element thead; // Table's head for wrapping
checkNotNull(root, "Received a null pointer as root element");
// Table rows with <th> tags... | class class_name[name] begin[{]
method[updateTableHeads, return_type[void], modifier[final public], parameter[root]] begin[{]
local_variable[type[Iterable], tableHeadRows]
local_variable[type[Element], table]
local_variable[type[Element], thead]
call[.checkNotNull, param... | Keyword[public] Keyword[final] Keyword[void] identifier[updateTableHeads] operator[SEP] Keyword[final] identifier[Element] identifier[root] operator[SEP] {
Keyword[final] identifier[Iterable] operator[<] identifier[Element] operator[>] identifier[tableHeadRows] operator[SEP] identifier[Element] identifier[table]... |
public Set<Location> getLocations() throws FlexiantException {
Set<Location> locations = new HashSet<Location>();
for (Vdc vdc : this.getResources(ResourceType.VDC, Vdc.class, null)) {
locations.add(Location.from(vdc,
this.getResource((vdc).getClusterUUID(), ResourceType.CLUS... | class class_name[name] begin[{]
method[getLocations, return_type[type[Set]], modifier[public], parameter[]] begin[{]
local_variable[type[Set], locations]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(argument... | Keyword[public] identifier[Set] operator[<] identifier[Location] operator[>] identifier[getLocations] operator[SEP] operator[SEP] Keyword[throws] identifier[FlexiantException] {
identifier[Set] operator[<] identifier[Location] operator[>] identifier[locations] operator[=] Keyword[new] identifier[HashSet] operato... |
protected BitArray getKey() {
/*
* Do this for consistency in case a subclass
* modifies byte[] key directly. Remove when
* byte[] key is deleted.
* Note: the consistency checks fail when the subclass
* modifies a non byte-aligned key (into a byte-aligned key)
... | class class_name[name] begin[{]
method[getKey, return_type[type[BitArray]], modifier[protected], parameter[]] begin[{]
assign[THIS[member[None.bitStringKey]], ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None... | Keyword[protected] identifier[BitArray] identifier[getKey] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[bitStringKey] operator[=] Keyword[new] identifier[BitArray] operator[SEP] Keyword[this] operator[SEP] identifier[key] operator[SEP] identifier[length] operator[*] Other[8] operator[-] K... |
public AggregatedStats getAggregatedStats(long id, GameMode gameMode, Season season) {
return client.sendRpcAndWait(SERVICE, "getAggregatedStats", id, gameMode, season.numeric);
} | class class_name[name] begin[{]
method[getAggregatedStats, return_type[type[AggregatedStats]], modifier[public], parameter[id, gameMode, season]] begin[{]
return[call[client.sendRpcAndWait, parameter[member[.SERVICE], literal["getAggregatedStats"], member[.id], member[.gameMode], member[season.numeric]... | Keyword[public] identifier[AggregatedStats] identifier[getAggregatedStats] operator[SEP] Keyword[long] identifier[id] , identifier[GameMode] identifier[gameMode] , identifier[Season] identifier[season] operator[SEP] {
Keyword[return] identifier[client] operator[SEP] identifier[sendRpcAndWait] operator[SEP] ide... |
@Override
public List<CPDefinitionSpecificationOptionValue> findByC_COC(
long CPDefinitionId, long CPOptionCategoryId, int start, int end) {
return findByC_COC(CPDefinitionId, CPOptionCategoryId, start, end, null);
} | class class_name[name] begin[{]
method[findByC_COC, return_type[type[List]], modifier[public], parameter[CPDefinitionId, CPOptionCategoryId, start, end]] begin[{]
return[call[.findByC_COC, parameter[member[.CPDefinitionId], member[.CPOptionCategoryId], member[.start], member[.end], literal[null]]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CPDefinitionSpecificationOptionValue] operator[>] identifier[findByC_COC] operator[SEP] Keyword[long] identifier[CPDefinitionId] , Keyword[long] identifier[CPOptionCategoryId] , Keyword[int] identifier[start] , Keyword[int] id... |
public int[] getPartialValues(ReadablePartial fieldSource, Object object, Chronology chrono) {
long instant = getInstantMillis(object, chrono);
return chrono.get(fieldSource, instant);
} | class class_name[name] begin[{]
method[getPartialValues, return_type[type[int]], modifier[public], parameter[fieldSource, object, chrono]] begin[{]
local_variable[type[long], instant]
return[call[chrono.get, parameter[member[.fieldSource], member[.instant]]]]
end[}]
END[}] | Keyword[public] Keyword[int] operator[SEP] operator[SEP] identifier[getPartialValues] operator[SEP] identifier[ReadablePartial] identifier[fieldSource] , identifier[Object] identifier[object] , identifier[Chronology] identifier[chrono] operator[SEP] {
Keyword[long] identifier[instant] operator[=] identifier[ge... |
protected String rewriteUrl(String path) throws UnsupportedEncodingException {
return new String(URLCodec.encodeUrl(URL_SAFE_CHARS, path.getBytes("ISO-8859-1")));
} | class class_name[name] begin[{]
method[rewriteUrl, return_type[type[String]], modifier[protected], parameter[path]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=URL_SAFE_CHARS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvo... | Keyword[protected] identifier[String] identifier[rewriteUrl] operator[SEP] identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[UnsupportedEncodingException] {
Keyword[return] Keyword[new] identifier[String] operator[SEP] identifier[URLCodec] operator[SEP] identifier[encodeUrl] operator[S... |
@XmlElementDecl(namespace = "http://www.opengis.net/citygml/generics/1.0", name = "_genericAttribute")
public JAXBElement<AbstractGenericAttributeType> create_GenericAttribute(AbstractGenericAttributeType value) {
return new JAXBElement<AbstractGenericAttributeType>(__GenericAttribute_QNAME, AbstractGeneric... | class class_name[name] begin[{]
method[create_GenericAttribute, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=__GenericAttribute_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReferen... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[AbstractGenericAttributeType] operator[>] identifier[create_GenericAttribute] operator[SEP... |
public static Diagram load(InputStream in, boolean offset)
throws SlickException {
return new InkscapeLoader().loadDiagram(in, offset);
} | class class_name[name] begin[{]
method[load, return_type[type[Diagram]], modifier[public static], parameter[in, offset]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(argument... | Keyword[public] Keyword[static] identifier[Diagram] identifier[load] operator[SEP] identifier[InputStream] identifier[in] , Keyword[boolean] identifier[offset] operator[SEP] Keyword[throws] identifier[SlickException] {
Keyword[return] Keyword[new] identifier[InkscapeLoader] operator[SEP] operator[SEP] operator[... |
private void doGraph(final TSDB tsdb, final HttpQuery query)
throws IOException {
final String basepath = getGnuplotBasePath(tsdb, query);
long start_time = DateTime.parseDateTimeString(
query.getRequiredQueryStringParam("start"),
query.getQueryStringParam("tz"));
final boolean nocache = que... | class class_name[name] begin[{]
method[doGraph, return_type[void], modifier[private], parameter[tsdb, query]] begin[{]
local_variable[type[String], basepath]
local_variable[type[long], start_time]
local_variable[type[boolean], nocache]
if[binary_operation[member[.start_t... | Keyword[private] Keyword[void] identifier[doGraph] operator[SEP] Keyword[final] identifier[TSDB] identifier[tsdb] , Keyword[final] identifier[HttpQuery] identifier[query] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[String] identifier[basepath] operator[=] identifier[getGnup... |
public I_CmsXmlDocument getRawContent() {
if (m_content == null) {
// content has not been provided, must unmarshal XML first
CmsFile file;
try {
file = m_cms.readFile(m_resource);
if (CmsResourceTypeXmlPage.isXmlPage(file)) {
... | class class_name[name] begin[{]
method[getRawContent, return_type[type[I_CmsXmlDocument]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_content], ==, literal[null]]] begin[{]
local_variable[type[CmsFile], file]
TryStatement(block=[StatementExpres... | Keyword[public] identifier[I_CmsXmlDocument] identifier[getRawContent] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_content] operator[==] Other[null] operator[SEP] {
identifier[CmsFile] identifier[file] operator[SEP] Keyword[try] {
identifier[file] operator[=] id... |
public void setText(CharSequence text, boolean animate) {
if (view != null) {
((TextView) view).setText(text);
}
} | class class_name[name] begin[{]
method[setText, return_type[void], modifier[public], parameter[text, animate]] begin[{]
if[binary_operation[member[.view], !=, literal[null]]] begin[{]
Cast(expression=MemberReference(member=view, postfix_operators=[], prefix_operators=[],... | Keyword[public] Keyword[void] identifier[setText] operator[SEP] identifier[CharSequence] identifier[text] , Keyword[boolean] identifier[animate] operator[SEP] {
Keyword[if] operator[SEP] identifier[view] operator[!=] Other[null] operator[SEP] {
operator[SEP] operator[SEP] identifier[TextView] operato... |
public static Configuration getDefaultFreemarkerConfiguration()
{
freemarker.template.Configuration configuration = new freemarker.template.Configuration(Configuration.VERSION_2_3_26);
DefaultObjectWrapperBuilder objectWrapperBuilder = new DefaultObjectWrapperBuilder(Configuration.VERSION_2_3_26);
... | class class_name[name] begin[{]
method[getDefaultFreemarkerConfiguration, return_type[type[Configuration]], modifier[public static], parameter[]] begin[{]
local_variable[type[freemarker], configuration]
local_variable[type[DefaultObjectWrapperBuilder], objectWrapperBuilder]
call... | Keyword[public] Keyword[static] identifier[Configuration] identifier[getDefaultFreemarkerConfiguration] operator[SEP] operator[SEP] {
identifier[freemarker] operator[SEP] identifier[template] operator[SEP] identifier[Configuration] identifier[configuration] operator[=] Keyword[new] identifier[freemarker] operato... |
@Nullable
public static VATINStructure getFromVATINCountry (@Nullable final String sVATIN)
{
if (StringHelper.getLength (sVATIN) >= 2)
{
final String sCountry = sVATIN.substring (0, 2);
for (final VATINStructure aStructure : s_aList)
if (aStructure.getExamples ().get (0).substring (0, 2)... | class class_name[name] begin[{]
method[getFromVATINCountry, return_type[type[VATINStructure]], modifier[public static], parameter[sVATIN]] begin[{]
if[binary_operation[call[StringHelper.getLength, parameter[member[.sVATIN]]], >=, literal[2]]] begin[{]
local_variable[type[String], sC... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[VATINStructure] identifier[getFromVATINCountry] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sVATIN] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringHelper] operator[SEP] iden... |
private Artifact getArtifactFromJar(File jar) {
// Lets figure the real mvn source of file.
String type = extractFileType(jar);
if (type != null) {
try {
ArrayList<Properties> options = new ArrayList<Properties>();
try (ZipInputStream in = new ZipInput... | class class_name[name] begin[{]
method[getArtifactFromJar, return_type[type[Artifact]], modifier[private], parameter[jar]] begin[{]
local_variable[type[String], type]
if[binary_operation[member[.type], !=, literal[null]]] begin[{]
TryStatement(block=[LocalVariableDeclaration... | Keyword[private] identifier[Artifact] identifier[getArtifactFromJar] operator[SEP] identifier[File] identifier[jar] operator[SEP] {
identifier[String] identifier[type] operator[=] identifier[extractFileType] operator[SEP] identifier[jar] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[type] oper... |
void generateSerializeOnJacksonInternal(BindTypeContext context, MethodSpec.Builder methodBuilder, String serializerName, TypeName beanClass, String beanName, BindProperty property, boolean onString) {
// define key and value type
ParameterizedTypeName mapTypeName=(ParameterizedTypeName) property.getPropertyType().... | class class_name[name] begin[{]
method[generateSerializeOnJacksonInternal, return_type[void], modifier[default], parameter[context, methodBuilder, serializerName, beanClass, beanName, property, onString]] begin[{]
local_variable[type[ParameterizedTypeName], mapTypeName]
local_variable[type[Type... | Keyword[void] identifier[generateSerializeOnJacksonInternal] operator[SEP] identifier[BindTypeContext] identifier[context] , identifier[MethodSpec] operator[SEP] identifier[Builder] identifier[methodBuilder] , identifier[String] identifier[serializerName] , identifier[TypeName] identifier[beanClass] , identifier[St... |
private ImageView getImageView(final int position) {
if (position < mImageViewList.size()) {
return mImageViewList.get(position);
} else {
if (mAdapter != null) {
ImageView imageView = mAdapter.generateImageView(getContext());
mImageViewList.add(i... | class class_name[name] begin[{]
method[getImageView, return_type[type[ImageView]], modifier[private], parameter[position]] begin[{]
if[binary_operation[member[.position], <, call[mImageViewList.size, parameter[]]]] begin[{]
return[call[mImageViewList.get, parameter[member[.position]... | Keyword[private] identifier[ImageView] identifier[getImageView] operator[SEP] Keyword[final] Keyword[int] identifier[position] operator[SEP] {
Keyword[if] operator[SEP] identifier[position] operator[<] identifier[mImageViewList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] {
... |
public static Collection<String> getPropertyValue(Properties properties, String propertyName,
Collection<String> defaultValue) {
Collection<String> result = defaultValue;
String propertyValue = properties.getProperty(propertyName);
if (propertyValue != null) {
result = to... | class class_name[name] begin[{]
method[getPropertyValue, return_type[type[Collection]], modifier[public static], parameter[properties, propertyName, defaultValue]] begin[{]
local_variable[type[Collection], result]
local_variable[type[String], propertyValue]
if[binary_operation[m... | Keyword[public] Keyword[static] identifier[Collection] operator[<] identifier[String] operator[>] identifier[getPropertyValue] operator[SEP] identifier[Properties] identifier[properties] , identifier[String] identifier[propertyName] , identifier[Collection] operator[<] identifier[String] operator[>] identifier[defaul... |
public String getDate() {
SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
String date = formatter.format(calendar.getTime());
return date;
} | class class_name[name] begin[{]
method[getDate, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[SimpleDateFormat], formatter]
local_variable[type[String], date]
return[member[.date]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[getDate] operator[SEP] operator[SEP] {
identifier[SimpleDateFormat] identifier[formatter] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[date] operator[=] identifier[format... |
public void reload() {
currentController
.hide(Actions.sequence(hidingActionProvider.provideAction(currentController, currentController),
Actions.run(CommonActionRunnables.getActionPosterRunnable(getViewReloadingRunnable()))));
} | class class_name[name] begin[{]
method[reload, return_type[void], modifier[public], parameter[]] begin[{]
call[currentController.hide, parameter[call[Actions.sequence, parameter[call[hidingActionProvider.provideAction, parameter[member[.currentController], member[.currentController]]], call[Act... | Keyword[public] Keyword[void] identifier[reload] operator[SEP] operator[SEP] {
identifier[currentController] operator[SEP] identifier[hide] operator[SEP] identifier[Actions] operator[SEP] identifier[sequence] operator[SEP] identifier[hidingActionProvider] operator[SEP] identifier[provideAction] operator[SEP] ide... |
public void setLongProperty(String pstrSection, String pstrProp,
long plngVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection(pstr... | class class_name[name] begin[{]
method[setLongProperty, return_type[void], modifier[public], parameter[pstrSection, pstrProp, plngVal, pstrComments]] begin[{]
local_variable[type[INISection], objSec]
assign[member[.objSec], Cast(expression=This(postfix_operators=[], prefix_operators=[],... | Keyword[public] Keyword[void] identifier[setLongProperty] operator[SEP] identifier[String] identifier[pstrSection] , identifier[String] identifier[pstrProp] , Keyword[long] identifier[plngVal] , identifier[String] identifier[pstrComments] operator[SEP] {
identifier[INISection] identifier[objSec] operator[=] O... |
@Override
public Map<URI, MatchResult> listMatchesAtMostOfType(URI origin, MatchType maxType) {
return listMatchesWithinRange(origin, LogicConceptMatchType.Fail, maxType);
} | class class_name[name] begin[{]
method[listMatchesAtMostOfType, return_type[type[Map]], modifier[public], parameter[origin, maxType]] begin[{]
return[call[.listMatchesWithinRange, parameter[member[.origin], member[LogicConceptMatchType.Fail], member[.maxType]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[URI] , identifier[MatchResult] operator[>] identifier[listMatchesAtMostOfType] operator[SEP] identifier[URI] identifier[origin] , identifier[MatchType] identifier[maxType] operator[SEP] {
Keyword[return] identifier[listMa... |
@PublicEvolving
public <ACC, R> SingleOutputStreamOperator<R> aggregate(AggregateFunction<T, ACC, R> function) {
checkNotNull(function, "function");
if (function instanceof RichFunction) {
throw new UnsupportedOperationException("This aggregation function cannot be a RichFunction.");
}
TypeInformation<ACC... | class class_name[name] begin[{]
method[aggregate, return_type[type[SingleOutputStreamOperator]], modifier[public], parameter[function]] begin[{]
call[.checkNotNull, parameter[member[.function], literal["function"]]]
if[binary_operation[member[.function], instanceof, type[RichFun... | annotation[@] identifier[PublicEvolving] Keyword[public] operator[<] identifier[ACC] , identifier[R] operator[>] identifier[SingleOutputStreamOperator] operator[<] identifier[R] operator[>] identifier[aggregate] operator[SEP] identifier[AggregateFunction] operator[<] identifier[T] , identifier[ACC] , identifier[R] o... |
boolean isManaged() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "isManaged");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(this, tc, "isManaged", isManaged);
return isManaged;
} | class class_name[name] begin[{]
method[isManaged, return_type[type[boolean]], modifier[default], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[THIS[], m... | Keyword[boolean] identifier[isManaged] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identi... |
public Impl embedded(CharSequence ref, Resource resource) {
if (StringUtils.isNotEmpty(ref) && resource != null) {
List<Resource> resources = this.embeddedMap.computeIfAbsent(ref, charSequence -> new ArrayList<>());
resources.add(resource);
}
return (Impl) this;
} | class class_name[name] begin[{]
method[embedded, return_type[type[Impl]], modifier[public], parameter[ref, resource]] begin[{]
if[binary_operation[call[StringUtils.isNotEmpty, parameter[member[.ref]]], &&, binary_operation[member[.resource], !=, literal[null]]]] begin[{]
local_varia... | Keyword[public] identifier[Impl] identifier[embedded] operator[SEP] identifier[CharSequence] identifier[ref] , identifier[Resource] identifier[resource] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[ref] operator[SEP] operator[&&]... |
public static byte[] computeHash(File file, MessageDigest digest,
long from, long until) throws IOException {
Preconditions.checkArgument(from >= 0, "negative offset");
Preconditions.checkArgument(until > from, "end offset is smaller or equal to start offset");
Preconditions.checkArg... | class class_name[name] begin[{]
method[computeHash, return_type[type[byte]], modifier[public static], parameter[file, digest, from, until]] begin[{]
call[Preconditions.checkArgument, parameter[binary_operation[member[.from], >=, literal[0]], literal["negative offset"]]]
call[Pre... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[computeHash] operator[SEP] identifier[File] identifier[file] , identifier[MessageDigest] identifier[digest] , Keyword[long] identifier[from] , Keyword[long] identifier[until] operator[SEP] Keyword[throws] identifier[IOException] {
... |
@Override
public Map<byte[], byte[]> hgetAll(final byte[] key) {
checkIsInMultiOrPipeline();
client.hgetAll(key);
final List<byte[]> flatHash = client.getBinaryMultiBulkReply();
final Map<byte[], byte[]> hash = new JedisByteHashMap();
final Iterator<byte[]> iterator = flatHash.iterator();
whil... | class class_name[name] begin[{]
method[hgetAll, return_type[type[Map]], modifier[public], parameter[key]] begin[{]
call[.checkIsInMultiOrPipeline, parameter[]]
call[client.hgetAll, parameter[member[.key]]]
local_variable[type[List], flatHash]
local_variable[type[... | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] Keyword[byte] operator[SEP] operator[SEP] , Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[hgetAll] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[key] operator[SEP] {
identifier[c... |
public static boolean supportsTray()
{
try
{
final Class trayClass = Class.forName("java.awt.SystemTray");
final Boolean bool =
(Boolean) trayClass.getDeclaredMethod("isSupported").invoke(null);
return bool.booleanValue();
... | class class_name[name] begin[{]
method[supportsTray, return_type[type[boolean]], modifier[public static], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[... | Keyword[public] Keyword[static] Keyword[boolean] identifier[supportsTray] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[final] identifier[Class] identifier[trayClass] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] literal[String] operator[SEP] operator[SEP] Keywor... |
protected void clearSession (PresentsSession session)
{
// remove the session from the username map
PresentsSession rc;
synchronized (_usermap) {
rc = _usermap.remove(session.getAuthName());
}
// sanity check just because we can
if (rc == null) {
... | class class_name[name] begin[{]
method[clearSession, return_type[void], modifier[protected], parameter[session]] begin[{]
local_variable[type[PresentsSession], rc]
SYNCHRONIZED[member[._usermap]] BEGIN[{]
assign[member[.rc], call[_usermap.remove, parameter[call[s... | Keyword[protected] Keyword[void] identifier[clearSession] operator[SEP] identifier[PresentsSession] identifier[session] operator[SEP] {
identifier[PresentsSession] identifier[rc] operator[SEP] Keyword[synchronized] operator[SEP] identifier[_usermap] operator[SEP] {
identifier[rc] operator[=] identifie... |
public List<Product> getSortedProducts() {
ArrayList<Product> result = new ArrayList<>(pcm.getProducts());
Collections.sort(result, new Comparator<Product>() {
@Override
public int compare(Product o1, Product o2) {
Integer op1 = getProductPosition(o1);
... | class class_name[name] begin[{]
method[getSortedProducts, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[ArrayList], result]
call[Collections.sort, parameter[member[.result], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation... | Keyword[public] identifier[List] operator[<] identifier[Product] operator[>] identifier[getSortedProducts] operator[SEP] operator[SEP] {
identifier[ArrayList] operator[<] identifier[Product] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identi... |
public void marshall(DescribeFileSystemsRequest describeFileSystemsRequest, ProtocolMarshaller protocolMarshaller) {
if (describeFileSystemsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(d... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[describeFileSystemsRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.describeFileSystemsRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argu... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DescribeFileSystemsRequest] identifier[describeFileSystemsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[describeFileSystemsRequest] operator[==] Other[null]... |
public static String evaluate(String xpath, String html) throws XPathExpressionException,
ParserConfigurationException {
HtmlCleaner hc = new HtmlCleaner();
TagNode tn = hc.clean(html);
Document document = new DomSerializer(new CleanerProperties()).createDOM(tn);
XPath xPath ... | class class_name[name] begin[{]
method[evaluate, return_type[type[String]], modifier[public static], parameter[xpath, html]] begin[{]
local_variable[type[HtmlCleaner], hc]
local_variable[type[TagNode], tn]
local_variable[type[Document], document]
local_variable[type[XPath], xPat... | Keyword[public] Keyword[static] identifier[String] identifier[evaluate] operator[SEP] identifier[String] identifier[xpath] , identifier[String] identifier[html] operator[SEP] Keyword[throws] identifier[XPathExpressionException] , identifier[ParserConfigurationException] {
identifier[HtmlCleaner] identifier[hc]... |
public static void main(String[] args) {
// Use the standard swing code to start this demo inside a swing thread.
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
// Create an instance of the demo.
BasicDemo basicDemo = new... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
call[SwingUtilities.invokeLater, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
identifier[SwingUtilities] operator[SEP] identifier[invokeLater] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] {
an... |
private R load(int n, Index editInPlace) {
assert Thread.holdsLock(this);
assert dir != null;
R v = load(new File(dir, String.valueOf(n)), editInPlace);
if (v==null && editInPlace!=null) {
// remember the failure.
// if editInPlace==null, we can create a new copy ... | class class_name[name] begin[{]
method[load, return_type[type[R]], modifier[private], parameter[n, editInPlace]] begin[{]
AssertStatement(condition=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=holdsLock, postfix_operators=[], prefix_... | Keyword[private] identifier[R] identifier[load] operator[SEP] Keyword[int] identifier[n] , identifier[Index] identifier[editInPlace] operator[SEP] {
Keyword[assert] identifier[Thread] operator[SEP] identifier[holdsLock] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[assert] identifier[dir] oper... |
public static File asFile(final String scriptName) {
String fileName = removeAnchorTag(scriptName).replaceAll("http:/", "FitNesseRoot");
return new File(fileName);
} | class class_name[name] begin[{]
method[asFile, return_type[type[File]], modifier[public static], parameter[scriptName]] begin[{]
local_variable[type[String], fileName]
return[ClassCreator(arguments=[MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selector... | Keyword[public] Keyword[static] identifier[File] identifier[asFile] operator[SEP] Keyword[final] identifier[String] identifier[scriptName] operator[SEP] {
identifier[String] identifier[fileName] operator[=] identifier[removeAnchorTag] operator[SEP] identifier[scriptName] operator[SEP] operator[SEP] identifier[re... |
public static Format getDateFormatter(final String pattern) {
Format format = JKFormatUtil.formatMap.get(pattern);
if (format == null) {
format = new SimpleDateFormat(pattern);
JKFormatUtil.formatMap.put(pattern, format);
}
return format;
} | class class_name[name] begin[{]
method[getDateFormatter, return_type[type[Format]], modifier[public static], parameter[pattern]] begin[{]
local_variable[type[Format], format]
if[binary_operation[member[.format], ==, literal[null]]] begin[{]
assign[member[.format]... | Keyword[public] Keyword[static] identifier[Format] identifier[getDateFormatter] operator[SEP] Keyword[final] identifier[String] identifier[pattern] operator[SEP] {
identifier[Format] identifier[format] operator[=] identifier[JKFormatUtil] operator[SEP] identifier[formatMap] operator[SEP] identifier[get] operator... |
@Override
public CompletableFuture<List<Map.Entry<UUID, Long>>> getNext() {
return this.indexIterator
.getNext()
.thenApply(this::mix);
} | class class_name[name] begin[{]
method[getNext, return_type[type[CompletableFuture]], modifier[public], parameter[]] begin[{]
return[THIS[member[None.indexIterator]call[None.getNext, parameter[]]call[None.thenApply, parameter[MethodReference(expression=This(postfix_operators=[], prefix_operators=[], qu... | annotation[@] identifier[Override] Keyword[public] identifier[CompletableFuture] operator[<] identifier[List] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[UUID] , identifier[Long] operator[>] operator[>] operator[>] identifier[getNext] operator[SEP] operator[SEP] {
Keyword[... |
public static boolean isValidLong(@Nullable final String longStr, final long lowerBound, final long upperBound, final boolean includeLowerBound, final boolean includeUpperBound) {
if (lowerBound > upperBound) {
throw new IllegalArgumentException(ExceptionValues.INVALID_BOUNDS);
} else if (!i... | class class_name[name] begin[{]
method[isValidLong, return_type[type[boolean]], modifier[public static], parameter[longStr, lowerBound, upperBound, includeLowerBound, includeUpperBound]] begin[{]
if[binary_operation[member[.lowerBound], >, member[.upperBound]]] begin[{]
ThrowStateme... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isValidLong] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[longStr] , Keyword[final] Keyword[long] identifier[lowerBound] , Keyword[final] Keyword[long] identifier[upperBound] , Keyword[final] Keyword[boolean]... |
private ClosableIterator<NodeWithEmbeddedNodes> singlePropertyIdFindEntities(HttpNeo4jClient executionEngine, EntityKey[] keys, Long txId) {
Object[] paramsValues = new Object[keys.length];
for ( int i = 0; i < keys.length; i++ ) {
paramsValues[i] = keys[i].getColumnValues()[0];
}
Map<String, Object> params ... | class class_name[name] begin[{]
method[singlePropertyIdFindEntities, return_type[type[ClosableIterator]], modifier[private], parameter[executionEngine, keys, txId]] begin[{]
local_variable[type[Object], paramsValues]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(e... | Keyword[private] identifier[ClosableIterator] operator[<] identifier[NodeWithEmbeddedNodes] operator[>] identifier[singlePropertyIdFindEntities] operator[SEP] identifier[HttpNeo4jClient] identifier[executionEngine] , identifier[EntityKey] operator[SEP] operator[SEP] identifier[keys] , identifier[Long] identifier[txId... |
public static boolean isJoinTable(final Table table) {
if (table.getPrimaryKey() == null) {
return false;
}
final boolean hasMultipartFK = (table.getPrimaryKey().getColumns().size() > 1);
for (final Column column : table.getColumns()) {
if (hasMultipartFK) {... | class class_name[name] begin[{]
method[isJoinTable, return_type[type[boolean]], modifier[public static], parameter[table]] begin[{]
if[binary_operation[call[table.getPrimaryKey, parameter[]], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isJoinTable] operator[SEP] Keyword[final] identifier[Table] identifier[table] operator[SEP] {
Keyword[if] operator[SEP] identifier[table] operator[SEP] identifier[getPrimaryKey] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] {
... |
public void addPlugin(Plugin plugin) throws OrderingConstraintException {
if (DEBUG) {
System.out.println("Adding plugin " + plugin.getPluginId() + " to execution plan");
}
pluginList.add(plugin);
// Add ordering constraints
copyTo(plugin.interPassConstraintIterator... | class class_name[name] begin[{]
method[addPlugin, return_type[void], modifier[public], parameter[plugin]] begin[{]
if[member[.DEBUG]] begin[{]
call[System.out.println, parameter[binary_operation[binary_operation[literal["Adding plugin "], +, call[plugin.getPluginId, para... | Keyword[public] Keyword[void] identifier[addPlugin] operator[SEP] identifier[Plugin] identifier[plugin] operator[SEP] Keyword[throws] identifier[OrderingConstraintException] {
Keyword[if] operator[SEP] identifier[DEBUG] operator[SEP] {
identifier[System] operator[SEP] identifier[out] operator[SEP] ide... |
protected final void writeIndexLikeList( List<String> dirs, List<String> files, PrintWriter writer )
{
// JarIndex is sorting the directories by ascending order.
// it has no value but cosmetic since it will be read into a
// hashtable by the classloader, but we'll do so anyway.
Coll... | class class_name[name] begin[{]
method[writeIndexLikeList, return_type[void], modifier[final protected], parameter[dirs, files, writer]] begin[{]
call[Collections.sort, parameter[member[.dirs]]]
call[Collections.sort, parameter[member[.files]]]
local_variable[type[Iterat... | Keyword[protected] Keyword[final] Keyword[void] identifier[writeIndexLikeList] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[dirs] , identifier[List] operator[<] identifier[String] operator[>] identifier[files] , identifier[PrintWriter] identifier[writer] operator[SEP] {
... |
public Map getSettings(InetAddress iaddr) {
Map result = new TreeMap(String.CASE_INSENSITIVE_ORDER);
List<IPRangeNode> chain = getChain(iaddr);
for (IPRangeNode<Map> ipr: chain) {
Map m = ipr.getData();
if (m != null) result.putAll(m);
}
return result;
} | class class_name[name] begin[{]
method[getSettings, return_type[type[Map]], modifier[public], parameter[iaddr]] begin[{]
local_variable[type[Map], result]
local_variable[type[List], chain]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], ... | Keyword[public] identifier[Map] identifier[getSettings] operator[SEP] identifier[InetAddress] identifier[iaddr] operator[SEP] {
identifier[Map] identifier[result] operator[=] Keyword[new] identifier[TreeMap] operator[SEP] identifier[String] operator[SEP] identifier[CASE_INSENSITIVE_ORDER] operator[SEP] operator[... |
public Observable<ServiceResponse<Page<SkuInfoInner>>> listMultiRolePoolSkusNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
}
String nextUrl = String.format("%s"... | class class_name[name] begin[{]
method[listMultiRolePoolSkusNextSinglePageAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{]
if[binary_operation[member[.nextPageLink], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argument... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[SkuInfoInner] operator[>] operator[>] operator[>] identifier[listMultiRolePoolSkusNextSinglePageAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP]... |
public static DnsResponse readDnsResponse(ByteBuf payload) throws ParseException {
try {
short transactionId = payload.readShort();
payload.moveHead(1); // skip first flags byte
// last 4 flag bits are error code
ResponseErrorCode errorCo... | class class_name[name] begin[{]
method[readDnsResponse, return_type[type[DnsResponse]], modifier[public static], parameter[payload]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=rea... | Keyword[public] Keyword[static] identifier[DnsResponse] identifier[readDnsResponse] operator[SEP] identifier[ByteBuf] identifier[payload] operator[SEP] Keyword[throws] identifier[ParseException] {
Keyword[try] {
Keyword[short] identifier[transactionId] operator[=] identifier[payload] operator[SEP] ide... |
public void write(long pos, Buffer source, long byteCount) throws IOException {
if (byteCount < 0 || byteCount > source.size()) throw new IndexOutOfBoundsException();
while (byteCount > 0L) {
long bytesWritten = fileChannel.transferFrom(source, pos, byteCount);
pos += bytesWritten;
byteCount ... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[pos, source, byteCount]] begin[{]
if[binary_operation[binary_operation[member[.byteCount], <, literal[0]], ||, binary_operation[member[.byteCount], >, call[source.size, parameter[]]]]] begin[{]
ThrowSta... | Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[long] identifier[pos] , identifier[Buffer] identifier[source] , Keyword[long] identifier[byteCount] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[byteCount] operator[<] Other[0] operator[||] ide... |
@Trivial
protected void activate(ComponentContext context) throws Exception {
Dictionary<String, ?> props = context.getProperties();
final boolean trace = TraceComponent.isAnyTracingEnabled();
if (trace && tc.isEntryEnabled())
Tr.entry(this, tc, "activate", props);
admin... | class class_name[name] begin[{]
method[activate, return_type[void], modifier[protected], parameter[context]] begin[{]
local_variable[type[Dictionary], props]
local_variable[type[boolean], trace]
if[binary_operation[member[.trace], &&, call[tc.isEntryEnabled, parameter[]]]] begin... | annotation[@] identifier[Trivial] Keyword[protected] Keyword[void] identifier[activate] operator[SEP] identifier[ComponentContext] identifier[context] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Dictionary] operator[<] identifier[String] , operator[?] operator[>] identifier[props] operator[... |
private void maybeAddEnhancedTypeMarkerField() {
if( getGosuClass() instanceof IGosuEnhancementInternal ) {
int iModifiers = Opcodes.ACC_STATIC | Opcodes.ACC_FINAL | Opcodes.ACC_SYNTHETIC;
iModifiers |= (BytecodeOptions.isSingleServingLoader() ? Opcodes.ACC_PUBLIC : Opcodes.ACC_PRIVATE);
IRFieldDe... | class class_name[name] begin[{]
method[maybeAddEnhancedTypeMarkerField, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[call[.getGosuClass, parameter[]], instanceof, type[IGosuEnhancementInternal]]] begin[{]
local_variable[type[int], iModifiers]
... | Keyword[private] Keyword[void] identifier[maybeAddEnhancedTypeMarkerField] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[getGosuClass] operator[SEP] operator[SEP] Keyword[instanceof] identifier[IGosuEnhancementInternal] operator[SEP] {
Keyword[int] identifier[iModifiers] operator[... |
public SplitDataProperties<T> splitsGroupedBy(int... groupFields) {
if (groupFields == null) {
throw new InvalidProgramException("GroupFields may not be null.");
} else if (groupFields.length == 0) {
throw new InvalidProgramException("GroupFields may not be empty.");
}
if (this.splitOrdering != null) {
... | class class_name[name] begin[{]
method[splitsGroupedBy, return_type[type[SplitDataProperties]], modifier[public], parameter[groupFields]] begin[{]
if[binary_operation[member[.groupFields], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix... | Keyword[public] identifier[SplitDataProperties] operator[<] identifier[T] operator[>] identifier[splitsGroupedBy] operator[SEP] Keyword[int] operator[...] identifier[groupFields] operator[SEP] {
Keyword[if] operator[SEP] identifier[groupFields] operator[==] Other[null] operator[SEP] {
Keyword[throw] K... |
public double totalTime(TimeUnit unit) {
T obj2 = ref.get();
if (obj2 != null) {
double prevLast = lastTime;
lastTime = Math.max(TimeUtils.convert(totalTimeFunction.applyAsDouble(obj2), totalTimeFunctionUnit, baseTimeUnit()), 0);
total.getCurrent().add(lastTime - prev... | class class_name[name] begin[{]
method[totalTime, return_type[type[double]], modifier[public], parameter[unit]] begin[{]
local_variable[type[T], obj2]
if[binary_operation[member[.obj2], !=, literal[null]]] begin[{]
local_variable[type[double], prevLast]
... | Keyword[public] Keyword[double] identifier[totalTime] operator[SEP] identifier[TimeUnit] identifier[unit] operator[SEP] {
identifier[T] identifier[obj2] operator[=] identifier[ref] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[obj2] operator[!=] Othe... |
public static String getRelativePath(final String base, final File targetFile) {
try {
//
// remove trailing file separator
//
String canonicalBase = base;
if (base.charAt(base.length() - 1) != File.separatorChar) {
canonicalBase = base + File.separatorChar;
}
//
... | class class_name[name] begin[{]
method[getRelativePath, return_type[type[String]], modifier[public static], parameter[base, targetFile]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=base, postfix_... | Keyword[public] Keyword[static] identifier[String] identifier[getRelativePath] operator[SEP] Keyword[final] identifier[String] identifier[base] , Keyword[final] identifier[File] identifier[targetFile] operator[SEP] {
Keyword[try] {
identifier[String] identifier[canonicalBase] operator[=] identifier[b... |
protected double kEvalSum(Vec y)
{
if (alphas == null)
throw new RuntimeException("alphas have not been set");
return kernel.evalSum(vecs, accelCache, alphas, y, 0, alphas.length);
} | class class_name[name] begin[{]
method[kEvalSum, return_type[type[double]], modifier[protected], parameter[y]] begin[{]
if[binary_operation[member[.alphas], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifie... | Keyword[protected] Keyword[double] identifier[kEvalSum] operator[SEP] identifier[Vec] identifier[y] operator[SEP] {
Keyword[if] operator[SEP] identifier[alphas] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP... |
public void moveBefore( Row item )
{
if( this == item )
return;
Element lastTrToMove = getLastLeafTR();
Element firstChildRow = DOM.getNextSibling( m_tr );
// remove from its current position
Row parentItem = m_parent;
if( parentItem == null )
parentItem = this.treeTable.m_rootItem;
parentItem.ge... | class class_name[name] begin[{]
method[moveBefore, return_type[void], modifier[public], parameter[item]] begin[{]
if[binary_operation[THIS[], ==, member[.item]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[Element], lastTrToMove]
local_var... | Keyword[public] Keyword[void] identifier[moveBefore] operator[SEP] identifier[Row] identifier[item] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[==] identifier[item] operator[SEP] Keyword[return] operator[SEP] identifier[Element] identifier[lastTrToMove] operator[=] identifier[getLastLeafTR] ... |
@Override
public <T> Promise<T> executeBlocking(Handler<Future<T>> blockingCodeHandler, boolean ordered) {
return adapter.toPromise(handler -> vertx.executeBlocking(blockingCodeHandler, ordered, handler));
} | class class_name[name] begin[{]
method[executeBlocking, return_type[type[Promise]], modifier[public], parameter[blockingCodeHandler, ordered]] begin[{]
return[call[adapter.toPromise, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=blockingCodeHandler, postfix_operator... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[Promise] operator[<] identifier[T] operator[>] identifier[executeBlocking] operator[SEP] identifier[Handler] operator[<] identifier[Future] operator[<] identifier[T] operator[>] operator[>] identifier[blockingCodeHandler... |
static DataBlock[] getDataBlocks(byte[] rawCodewords,
Version version) {
// Figure out the number and size of data blocks used by this version
Version.ECBlocks ecBlocks = version.getECBlocks();
// First count the total number of data blocks
int totalBlocks = 0;
Ve... | class class_name[name] begin[{]
method[getDataBlocks, return_type[type[DataBlock]], modifier[static], parameter[rawCodewords, version]] begin[{]
local_variable[type[Version], ecBlocks]
local_variable[type[int], totalBlocks]
local_variable[type[Version], ecBlockArray]
ForStatemen... | Keyword[static] identifier[DataBlock] operator[SEP] operator[SEP] identifier[getDataBlocks] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[rawCodewords] , identifier[Version] identifier[version] operator[SEP] {
identifier[Version] operator[SEP] identifier[ECBlocks] identifier[ecBlocks] opera... |
public static NodeAuthModuleContext getContext()
{
SecurityContext securityContext = SecurityContextFactory.getSecurityContext();
if (!securityContext.isInitialized()) {
securityContext.initialize();
}
AbstractModuleContext moduleContext = securityContext.getModuleContext(CONTEXT_ID);
if (!(moduleCo... | class class_name[name] begin[{]
method[getContext, return_type[type[NodeAuthModuleContext]], modifier[public static], parameter[]] begin[{]
local_variable[type[SecurityContext], securityContext]
if[call[securityContext.isInitialized, parameter[]]] begin[{]
call[s... | Keyword[public] Keyword[static] identifier[NodeAuthModuleContext] identifier[getContext] operator[SEP] operator[SEP] {
identifier[SecurityContext] identifier[securityContext] operator[=] identifier[SecurityContextFactory] operator[SEP] identifier[getSecurityContext] operator[SEP] operator[SEP] operator[SEP] Keyw... |
public void setActualImageResource(@DrawableRes int resourceId, @Nullable Object callerContext) {
setImageURI(UriUtil.getUriForResourceId(resourceId), callerContext);
} | class class_name[name] begin[{]
method[setActualImageResource, return_type[void], modifier[public], parameter[resourceId, callerContext]] begin[{]
call[.setImageURI, parameter[call[UriUtil.getUriForResourceId, parameter[member[.resourceId]]], member[.callerContext]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setActualImageResource] operator[SEP] annotation[@] identifier[DrawableRes] Keyword[int] identifier[resourceId] , annotation[@] identifier[Nullable] identifier[Object] identifier[callerContext] operator[SEP] {
identifier[setImageURI] operator[SEP] identifier[UriUtil] ope... |
private static void isCorrect(String one, String two) {
if (one != null && one.equals(two)) {
System.out.println(one + " correct");
} else {
System.out.println(one + " wrong - should be " + two);
}
} | class class_name[name] begin[{]
method[isCorrect, return_type[void], modifier[private static], parameter[one, two]] begin[{]
if[binary_operation[binary_operation[member[.one], !=, literal[null]], &&, call[one.equals, parameter[member[.two]]]]] begin[{]
call[System.out.pr... | Keyword[private] Keyword[static] Keyword[void] identifier[isCorrect] operator[SEP] identifier[String] identifier[one] , identifier[String] identifier[two] operator[SEP] {
Keyword[if] operator[SEP] identifier[one] operator[!=] Other[null] operator[&&] identifier[one] operator[SEP] identifier[equals] operator[SEP... |
public static byte[] decodeHex(char[] hexData) {
int len = hexData.length;
if ((len & 0x01) != 0) {
throw new RuntimeException("Odd number of characters.");
}
byte[] out = new byte[len >> 1];
// two characters form the hex value.
for (int i = 0, j = 0; j < len; i++) {
int f = toDigit(h... | class class_name[name] begin[{]
method[decodeHex, return_type[type[byte]], modifier[public static], parameter[hexData]] begin[{]
local_variable[type[int], len]
if[binary_operation[binary_operation[member[.len], &, literal[0x01]], !=, literal[0]]] begin[{]
ThrowStatement(expr... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[decodeHex] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[hexData] operator[SEP] {
Keyword[int] identifier[len] operator[=] identifier[hexData] operator[SEP] identifier[length] operator[SEP] Keyword[if] opera... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.