code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
private static String encodeBlob(String encodingType, String blobName) {
if (encodingType != null && encodingType.equals("url")) {
return urlEscaper.escape(blobName);
} else {
return blobName;
}
} | class class_name[name] begin[{]
method[encodeBlob, return_type[type[String]], modifier[private static], parameter[encodingType, blobName]] begin[{]
if[binary_operation[binary_operation[member[.encodingType], !=, literal[null]], &&, call[encodingType.equals, parameter[literal["url"]]]]] begin[{]... | Keyword[private] Keyword[static] identifier[String] identifier[encodeBlob] operator[SEP] identifier[String] identifier[encodingType] , identifier[String] identifier[blobName] operator[SEP] {
Keyword[if] operator[SEP] identifier[encodingType] operator[!=] Other[null] operator[&&] identifier[encodingType] operato... |
@Override
public List<CommerceCountry> findByG_A(long groupId, boolean active,
int start, int end, OrderByComparator<CommerceCountry> orderByComparator) {
return findByG_A(groupId, active, start, end, orderByComparator, true);
} | class class_name[name] begin[{]
method[findByG_A, return_type[type[List]], modifier[public], parameter[groupId, active, start, end, orderByComparator]] begin[{]
return[call[.findByG_A, parameter[member[.groupId], member[.active], member[.start], member[.end], member[.orderByComparator], literal[true]]]... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommerceCountry] operator[>] identifier[findByG_A] operator[SEP] Keyword[long] identifier[groupId] , Keyword[boolean] identifier[active] , Keyword[int] identifier[start] , Keyword[int] identifier[end] , identifier[OrderByComp... |
public boolean addActor(String objectType, String displayName, String url, String[] description)
{
Map<String, Object> container = new HashMap<String, Object>();
if (objectType != null)
{
container.put("objectType", objectType);
}
else
{
r... | class class_name[name] begin[{]
method[addActor, return_type[type[boolean]], modifier[public], parameter[objectType, displayName, url, description]] begin[{]
local_variable[type[Map], container]
if[binary_operation[member[.objectType], !=, literal[null]]] begin[{]
... | Keyword[public] Keyword[boolean] identifier[addActor] operator[SEP] identifier[String] identifier[objectType] , identifier[String] identifier[displayName] , identifier[String] identifier[url] , identifier[String] operator[SEP] operator[SEP] identifier[description] operator[SEP] {
identifier[Map] operator[<] i... |
void formatISOWeekOfYear(StringBuilder b, ZonedDateTime d, int width) {
int w = d.get(IsoFields.WEEK_OF_WEEK_BASED_YEAR);
switch (width) {
case 2:
zeroPad2(b, w, 2);
break;
case 1:
b.append(w);
break;
}
} | class class_name[name] begin[{]
method[formatISOWeekOfYear, return_type[void], modifier[default], parameter[b, d, width]] begin[{]
local_variable[type[int], w]
SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value... | Keyword[void] identifier[formatISOWeekOfYear] operator[SEP] identifier[StringBuilder] identifier[b] , identifier[ZonedDateTime] identifier[d] , Keyword[int] identifier[width] operator[SEP] {
Keyword[int] identifier[w] operator[=] identifier[d] operator[SEP] identifier[get] operator[SEP] identifier[IsoFields] o... |
private void findDeploymentAddress(final String deploymentID, Handler<AsyncResult<String>> resultHandler) {
context.execute(new Action<String>() {
@Override
public String perform() {
synchronized (deployments) {
JsonObject locatedInfo = null;
Collection<String> sdeploymentsIn... | class class_name[name] begin[{]
method[findDeploymentAddress, return_type[void], modifier[private], parameter[deploymentID, resultHandler]] begin[{]
call[context.execute, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[Sy... | Keyword[private] Keyword[void] identifier[findDeploymentAddress] operator[SEP] Keyword[final] identifier[String] identifier[deploymentID] , identifier[Handler] operator[<] identifier[AsyncResult] operator[<] identifier[String] operator[>] operator[>] identifier[resultHandler] operator[SEP] {
identifier[context]... |
public InputStream executeWithoutAccessCheck()
throws EFapsException
{
InputStream ret = null;
executeEvents(EventType.CHECKOUT_PRE);
if (!executeEvents(EventType.CHECKOUT_OVERRIDE)) {
ret = this.executeWithoutTrigger();
}
executeEvents(EventType.CHECKOUT_... | class class_name[name] begin[{]
method[executeWithoutAccessCheck, return_type[type[InputStream]], modifier[public], parameter[]] begin[{]
local_variable[type[InputStream], ret]
call[.executeEvents, parameter[member[EventType.CHECKOUT_PRE]]]
if[call[.executeEvents, parame... | Keyword[public] identifier[InputStream] identifier[executeWithoutAccessCheck] operator[SEP] operator[SEP] Keyword[throws] identifier[EFapsException] {
identifier[InputStream] identifier[ret] operator[=] Other[null] operator[SEP] identifier[executeEvents] operator[SEP] identifier[EventType] operator[SEP] identifi... |
protected static <T extends Address, S extends AddressSegment> Iterator<T> iterator(T original, AddressCreator<T, ?, ?, S> creator) {
return IPAddressSection.iterator(original, creator, null);
} | class class_name[name] begin[{]
method[iterator, return_type[type[Iterator]], modifier[static protected], parameter[original, creator]] begin[{]
return[call[IPAddressSection.iterator, parameter[member[.original], member[.creator], literal[null]]]]
end[}]
END[}] | Keyword[protected] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Address] , identifier[S] Keyword[extends] identifier[AddressSegment] operator[>] identifier[Iterator] operator[<] identifier[T] operator[>] identifier[iterator] operator[SEP] identifier[T] identifier[original] , identifier[Addres... |
@Override
public Map<String, Object> toSource() {
Map<String, Object> sourceMap = new HashMap<>();
if (createdBy != null) {
addFieldToSource(sourceMap, "createdBy", createdBy);
}
if (createdTime != null) {
addFieldToSource(sourceMap, "createdTime", createdTime... | class class_name[name] begin[{]
method[toSource, return_type[type[Map]], modifier[public], parameter[]] begin[{]
local_variable[type[Map], sourceMap]
if[binary_operation[member[.createdBy], !=, literal[null]]] begin[{]
call[.addFieldToSource, parameter[member[.so... | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[toSource] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[sourceMap] operator[=] Keyword[new] id... |
@Override
public ListLabelingJobsResult listLabelingJobs(ListLabelingJobsRequest request) {
request = beforeClientExecution(request);
return executeListLabelingJobs(request);
} | class class_name[name] begin[{]
method[listLabelingJobs, return_type[type[ListLabelingJobsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListLabelingJobs, parameter[member[.... | annotation[@] identifier[Override] Keyword[public] identifier[ListLabelingJobsResult] identifier[listLabelingJobs] operator[SEP] identifier[ListLabelingJobsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP... |
public static int cusolverRfSetupHost(
int n,
int nnzA,
Pointer h_csrRowPtrA,
Pointer h_csrColIndA,
Pointer h_csrValA,
int nnzL,
Pointer h_csrRowPtrL,
Pointer h_csrColIndL,
Pointer h_csrValL,
int nnzU,
Pointer h... | class class_name[name] begin[{]
method[cusolverRfSetupHost, return_type[type[int]], modifier[public static], parameter[n, nnzA, h_csrRowPtrA, h_csrColIndA, h_csrValA, nnzL, h_csrRowPtrL, h_csrColIndL, h_csrValL, nnzU, h_csrRowPtrU, h_csrColIndU, h_csrValU, h_P, h_Q, handle]] begin[{]
return[call[.check... | Keyword[public] Keyword[static] Keyword[int] identifier[cusolverRfSetupHost] operator[SEP] Keyword[int] identifier[n] , Keyword[int] identifier[nnzA] , identifier[Pointer] identifier[h_csrRowPtrA] , identifier[Pointer] identifier[h_csrColIndA] , identifier[Pointer] identifier[h_csrValA] , Keyword[int] identifier[n... |
public boolean sendToMatching(Msg msg)
{
// Is this end of a multipart message?
boolean msgMore = msg.hasMore();
// Push the message to matching pipes.
distribute(msg);
// If mutlipart message is fully sent, activate all the eligible pipes.
if (!msgMore) {
... | class class_name[name] begin[{]
method[sendToMatching, return_type[type[boolean]], modifier[public], parameter[msg]] begin[{]
local_variable[type[boolean], msgMore]
call[.distribute, parameter[member[.msg]]]
if[member[.msgMore]] begin[{]
assign[me... | Keyword[public] Keyword[boolean] identifier[sendToMatching] operator[SEP] identifier[Msg] identifier[msg] operator[SEP] {
Keyword[boolean] identifier[msgMore] operator[=] identifier[msg] operator[SEP] identifier[hasMore] operator[SEP] operator[SEP] operator[SEP] identifier[distribute] operator[SEP] identifier[ms... |
private void aggreagteJobStats(JobDetails jobDetails, byte[] rowKey,
Context context, AggregationConstants.AGGREGATION_TYPE aggType)
throws IOException, InterruptedException {
byte[] aggStatusCol = null;
switch (aggType) {
case DAILY:
aggStatusCol =
AggregationConstants.JOB_DAIL... | class class_name[name] begin[{]
method[aggreagteJobStats, return_type[void], modifier[private], parameter[jobDetails, rowKey, context, aggType]] begin[{]
local_variable[type[byte], aggStatusCol]
SwitchStatement(cases=[SwitchStatementCase(case=['DAILY'], statements=[StatementExpression(expressio... | Keyword[private] Keyword[void] identifier[aggreagteJobStats] operator[SEP] identifier[JobDetails] identifier[jobDetails] , Keyword[byte] operator[SEP] operator[SEP] identifier[rowKey] , identifier[Context] identifier[context] , identifier[AggregationConstants] operator[SEP] identifier[AGGREGATION_TYPE] identifier[ag... |
public void shutdown() {
if (workers == null) {
if (LOGGER.isLoggable(Level.INFO))
LOGGER.info(name + " already been shutdown");
return;
}
if (LOGGER.isLoggable(Level.INFO))
LOGGER.info("Starting shutdown " + name);
for (fin... | class class_name[name] begin[{]
method[shutdown, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.workers], ==, literal[null]]] begin[{]
if[call[LOGGER.isLoggable, parameter[member[Level.INFO]]]] begin[{]
call[LOGGER.... | Keyword[public] Keyword[void] identifier[shutdown] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[workers] operator[==] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identi... |
public void trackPageView(String argPageURL, String argPageTitle, String argHostName) {
trackPageViewFromReferrer(argPageURL, argPageTitle, argHostName, "http://www.dmurph.com", "/");
} | class class_name[name] begin[{]
method[trackPageView, return_type[void], modifier[public], parameter[argPageURL, argPageTitle, argHostName]] begin[{]
call[.trackPageViewFromReferrer, parameter[member[.argPageURL], member[.argPageTitle], member[.argHostName], literal["http://www.dmurph.com"], li... | Keyword[public] Keyword[void] identifier[trackPageView] operator[SEP] identifier[String] identifier[argPageURL] , identifier[String] identifier[argPageTitle] , identifier[String] identifier[argHostName] operator[SEP] {
identifier[trackPageViewFromReferrer] operator[SEP] identifier[argPageURL] , identifier[arg... |
Observable<ComapiResult<ConversationDetails>> doUpdateConversation(@NonNull final String token, @NonNull final String conversationId, @NonNull final ConversationUpdate request, final String eTag) {
return wrapObservable(!TextUtils.isEmpty(eTag) ? service.updateConversation(AuthManager.addAuthPrefix(token), eTag... | class class_name[name] begin[{]
method[doUpdateConversation, return_type[type[Observable]], modifier[default], parameter[token, conversationId, request, eTag]] begin[{]
return[call[.wrapObservable, parameter[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=eTag, postfix_op... | identifier[Observable] operator[<] identifier[ComapiResult] operator[<] identifier[ConversationDetails] operator[>] operator[>] identifier[doUpdateConversation] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[String] identifier[token] , annotation[@] identifier[NonNull] Keyword[final] identif... |
private void validate(JSONObject json) throws HelloSignException {
if (json.has("error")) {
try {
JSONObject error = json.getJSONObject("error");
String message = error.getString("error_msg");
String type = error.getString("error_name");
... | class class_name[name] begin[{]
method[validate, return_type[void], modifier[private], parameter[json]] begin[{]
if[call[json.has, parameter[literal["error"]]]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initi... | Keyword[private] Keyword[void] identifier[validate] operator[SEP] identifier[JSONObject] identifier[json] operator[SEP] Keyword[throws] identifier[HelloSignException] {
Keyword[if] operator[SEP] identifier[json] operator[SEP] identifier[has] operator[SEP] literal[String] operator[SEP] operator[SEP] {
... |
public SubscriptionBuilder subscription(String applicationName, Set<String> eventNames) throws IOException {
return new SubscriptionBuilder(this, applicationName, eventNames);
} | class class_name[name] begin[{]
method[subscription, return_type[type[SubscriptionBuilder]], modifier[public], parameter[applicationName, eventNames]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=applicatio... | Keyword[public] identifier[SubscriptionBuilder] identifier[subscription] operator[SEP] identifier[String] identifier[applicationName] , identifier[Set] operator[<] identifier[String] operator[>] identifier[eventNames] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] Keyword[new] identifie... |
public void put(NumberVector val, double weight) {
assert (val.getDimensionality() == elements.length);
if(weight == 0) {
return; // Skip zero weights.
}
final double nwsum = weight + wsum;
for(int i = 0; i < elements.length; i++) {
final double delta = val.doubleValue(i) - elements[i];
... | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[val, weight]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getDimensionality, postfix_operators=[], prefix_operators=[], qualifier=val, selectors=[], type_argu... | Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[NumberVector] identifier[val] , Keyword[double] identifier[weight] operator[SEP] {
Keyword[assert] operator[SEP] identifier[val] operator[SEP] identifier[getDimensionality] operator[SEP] operator[SEP] operator[==] identifier[elements] operat... |
@Override
public T addAsLibrary(URL resource, ArchivePath target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource must be specified");
Validate.notNull(target, "Target must be specified");
File resourceFile = new File(resource.getFile());
if (!resourceFile.exi... | class class_name[name] begin[{]
method[addAsLibrary, return_type[type[T]], modifier[public], parameter[resource, target]] begin[{]
call[Validate.notNull, parameter[member[.resource], literal["Resource must be specified"]]]
call[Validate.notNull, parameter[member[.target], litera... | annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[addAsLibrary] operator[SEP] identifier[URL] identifier[resource] , identifier[ArchivePath] identifier[target] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
identifier[Validate] operator[SEP] identifier[notNull] op... |
public void enter(Symbol sym, Scope s, Scope origin, boolean staticallyImported) {
Assert.check(shared == 0);
if (nelems * 3 >= hashMask * 2)
dble();
int hash = getIndex(sym.name);
Entry old = table[hash];
if (old == null) {
old = sentinel;
nel... | class class_name[name] begin[{]
method[enter, return_type[void], modifier[public], parameter[sym, s, origin, staticallyImported]] begin[{]
call[Assert.check, parameter[binary_operation[member[.shared], ==, literal[0]]]]
if[binary_operation[binary_operation[member[.nelems], *, li... | Keyword[public] Keyword[void] identifier[enter] operator[SEP] identifier[Symbol] identifier[sym] , identifier[Scope] identifier[s] , identifier[Scope] identifier[origin] , Keyword[boolean] identifier[staticallyImported] operator[SEP] {
identifier[Assert] operator[SEP] identifier[check] operator[SEP] identifie... |
public List<String> readStringSubKeys(HKey hk, String key, String charsetName) throws RegistryException {
try {
return ReflectedMethods.readStringSubKeys(hk.root(), hk.hex(), key, charsetName);
} catch (Exception e) {
throw new RegistryException("Cannot read sub keys from key " + key, e);
}
} | class class_name[name] begin[{]
method[readStringSubKeys, return_type[type[List]], modifier[public], parameter[hk, key, charsetName]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=root, postfix_operators=[], prefix_operators=[]... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[readStringSubKeys] operator[SEP] identifier[HKey] identifier[hk] , identifier[String] identifier[key] , identifier[String] identifier[charsetName] operator[SEP] Keyword[throws] identifier[RegistryException] {
Keyword[try] {... |
public SIBusMessage nextLocked()
throws SISessionUnavailableException, SISessionDroppedException,
SIResourceException, SIConnectionLostException,
SIErrorException, SIIncorrectCallException
{
if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
... | class class_name[name] begin[{]
method[nextLocked, return_type[type[SIBusMessage]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[CoreSPILockedMessageEnumeration.tc.isEntryEnabled, parameter[]]]] begin[{]
... | Keyword[public] identifier[SIBusMessage] identifier[nextLocked] operator[SEP] operator[SEP] Keyword[throws] identifier[SISessionUnavailableException] , identifier[SISessionDroppedException] , identifier[SIResourceException] , identifier[SIConnectionLostException] , identifier[SIErrorException] , identifier[SIIncor... |
public long getIPv4PrefixCount(int prefixLength) {
if(prefixLength < 0) {
throw new PrefixLenException(this, prefixLength);
}
int bitCount = getBitCount();
if(bitCount <= prefixLength) {
return getIPv4Count();
}
int shiftAdjustment = bitCount - prefixLength;
long upperAdjusted = getUpper().longValue... | class class_name[name] begin[{]
method[getIPv4PrefixCount, return_type[type[long]], modifier[public], parameter[prefixLength]] begin[{]
if[binary_operation[member[.prefixLength], <, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[This(postfix_operators=[], pr... | Keyword[public] Keyword[long] identifier[getIPv4PrefixCount] operator[SEP] Keyword[int] identifier[prefixLength] operator[SEP] {
Keyword[if] operator[SEP] identifier[prefixLength] operator[<] Other[0] operator[SEP] {
Keyword[throw] Keyword[new] identifier[PrefixLenException] operator[SEP] Keyword[this... |
@Override
public ITag readTag() {
//log.debug("Read tag");
ITag tag = null;
try {
lock.acquire();
//empty-out the pre-streaming tags first
if (!firstTags.isEmpty()) {
log.debug("Returning pre-tag");
// Return first tags befo... | class class_name[name] begin[{]
method[readTag, return_type[type[ITag]], modifier[public], parameter[]] begin[{]
local_variable[type[ITag], tag]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=acquire, postfix_operators=[], prefix_operators=[], qualifier... | annotation[@] identifier[Override] Keyword[public] identifier[ITag] identifier[readTag] operator[SEP] operator[SEP] {
identifier[ITag] identifier[tag] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[lock] operator[SEP] identifier[acquire] operator[SEP] operator[SEP] operator[SEP] Keywo... |
public URL getResource(String name) {
URL url = persistenceHandler.url(name, typeDefinitions);
// If a class resource is defined by this class loader but it is not defined in a manifest manner,
// the resource of the parent class loader should be shadowed by 'null'. Note that the del... | class class_name[name] begin[{]
method[getResource, return_type[type[URL]], modifier[public], parameter[name]] begin[{]
local_variable[type[URL], url]
return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=url, postfix_operators=[], prefix_op... | Keyword[public] identifier[URL] identifier[getResource] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[URL] identifier[url] operator[=] identifier[persistenceHandler] operator[SEP] identifier[url] operator[SEP] identifier[name] , identifier[typeDefinitions] operator[SEP] operator[S... |
private void populateBean(Object bean, Map<String, Object> values) throws PropertyException
{
BeanDescriptor beanDescriptor = getBeanDescriptor(bean.getClass());
// Lower case provided properties to easily ignore properties name case
Map<String, String> lowerKeyMap = new HashMap<String, Str... | class class_name[name] begin[{]
method[populateBean, return_type[void], modifier[private], parameter[bean, values]] begin[{]
local_variable[type[BeanDescriptor], beanDescriptor]
local_variable[type[Map], lowerKeyMap]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpr... | Keyword[private] Keyword[void] identifier[populateBean] operator[SEP] identifier[Object] identifier[bean] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[values] operator[SEP] Keyword[throws] identifier[PropertyException] {
identifier[BeanDescriptor] identifier[bean... |
String getNamespacedKey(CacheNamespace cacheNamespace, String key) {
String namespaceIndicator = getNamespaceIndicator(cacheNamespace);
if (cacheNamespace.isNamespaceExpirationRequired() == false) {
return namespaceIndicator + ":" + key;
}
String namespaceIndicatorKey = nam... | class class_name[name] begin[{]
method[getNamespacedKey, return_type[type[String]], modifier[default], parameter[cacheNamespace, key]] begin[{]
local_variable[type[String], namespaceIndicator]
if[binary_operation[call[cacheNamespace.isNamespaceExpirationRequired, parameter[]], ==, liter... | identifier[String] identifier[getNamespacedKey] operator[SEP] identifier[CacheNamespace] identifier[cacheNamespace] , identifier[String] identifier[key] operator[SEP] {
identifier[String] identifier[namespaceIndicator] operator[=] identifier[getNamespaceIndicator] operator[SEP] identifier[cacheNamespace] operat... |
public Object[] cloneArray(Object[] array) {
Class<?> clazz = array.getClass().getComponentType();
Object newArray = Array.newInstance(clazz, array.length);
System.arraycopy(array, 0, newArray, 0, array.length);
return (Object[]) newArray;
} | class class_name[name] begin[{]
method[cloneArray, return_type[type[Object]], modifier[public], parameter[array]] begin[{]
local_variable[type[Class], clazz]
local_variable[type[Object], newArray]
call[System.arraycopy, parameter[member[.array], literal[0], member[.newArray], li... | Keyword[public] identifier[Object] operator[SEP] operator[SEP] identifier[cloneArray] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[array] operator[SEP] {
identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[array] operator[SEP] identifier[getCl... |
private static void validateAsMongoDBCollectionName(String collectionName) {
Contracts.assertStringParameterNotEmpty( collectionName, "requestedName" );
//Yes it has some strange requirements.
if ( collectionName.startsWith( "system." ) ) {
throw log.collectionNameHasInvalidSystemPrefix( collectionName );
}
... | class class_name[name] begin[{]
method[validateAsMongoDBCollectionName, return_type[void], modifier[private static], parameter[collectionName]] begin[{]
call[Contracts.assertStringParameterNotEmpty, parameter[member[.collectionName], literal["requestedName"]]]
if[call[collection... | Keyword[private] Keyword[static] Keyword[void] identifier[validateAsMongoDBCollectionName] operator[SEP] identifier[String] identifier[collectionName] operator[SEP] {
identifier[Contracts] operator[SEP] identifier[assertStringParameterNotEmpty] operator[SEP] identifier[collectionName] , literal[String] operator... |
private void initSessions() throws FileNotFoundException, ClassNotFoundException, IOException,
ResourceNotExistingException, TTException {
Map<String, String> filelisteners = getFilelisteners();
mSessions = new HashMap<String, ISession>();
mTrx = new HashMap<String, IFilelistenerWriteTrx... | class class_name[name] begin[{]
method[initSessions, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[Map], filelisteners]
assign[member[.mSessions], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operat... | Keyword[private] Keyword[void] identifier[initSessions] operator[SEP] operator[SEP] Keyword[throws] identifier[FileNotFoundException] , identifier[ClassNotFoundException] , identifier[IOException] , identifier[ResourceNotExistingException] , identifier[TTException] {
identifier[Map] operator[<] identifier[St... |
private String getRow(String rowKey) {
try {
return cache.get(rowKey);
} catch (Exception e) {
if (e.getCause() instanceof RowNotFoundException) {
return null;
}
throw new RuntimeException(e);
}
} | class class_name[name] begin[{]
method[getRow, return_type[type[String]], modifier[private], parameter[rowKey]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=rowKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], membe... | Keyword[private] identifier[String] identifier[getRow] operator[SEP] identifier[String] identifier[rowKey] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[cache] operator[SEP] identifier[get] operator[SEP] identifier[rowKey] operator[SEP] operator[SEP]
}
Keyword[catch] operator... |
public static SimpleDataSet read(Reader reader, int lines_to_skip, Set<Integer> cat_cols) throws IOException
{
return read(reader, DEFAULT_DELIMITER, lines_to_skip, DEFAULT_COMMENT, cat_cols);
} | class class_name[name] begin[{]
method[read, return_type[type[SimpleDataSet]], modifier[public static], parameter[reader, lines_to_skip, cat_cols]] begin[{]
return[call[.read, parameter[member[.reader], member[.DEFAULT_DELIMITER], member[.lines_to_skip], member[.DEFAULT_COMMENT], member[.cat_cols]]]]
... | Keyword[public] Keyword[static] identifier[SimpleDataSet] identifier[read] operator[SEP] identifier[Reader] identifier[reader] , Keyword[int] identifier[lines_to_skip] , identifier[Set] operator[<] identifier[Integer] operator[>] identifier[cat_cols] operator[SEP] Keyword[throws] identifier[IOException] {
Keyw... |
public EClass getGCHST() {
if (gchstEClass == null) {
gchstEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(443);
}
return gchstEClass;
} | class class_name[name] begin[{]
method[getGCHST, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.gchstEClass], ==, literal[null]]] begin[{]
assign[member[.gchstEClass], Cast(expression=MethodInvocation(arguments=[MemberRefer... | Keyword[public] identifier[EClass] identifier[getGCHST] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[gchstEClass] operator[==] Other[null] operator[SEP] {
identifier[gchstEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identif... |
public static CasaItDocument newDocument(Container container) throws ParserConfigurationException, JAXBException {
Document document = XmlUtils.newDocument();
CasaItUtils.createMarshaller("UTF-8", true).marshal(container, document);
return new CasaItDocument(document);
} | class class_name[name] begin[{]
method[newDocument, return_type[type[CasaItDocument]], modifier[public static], parameter[container]] begin[{]
local_variable[type[Document], document]
call[CasaItUtils.createMarshaller, parameter[literal["UTF-8"], literal[true]]]
return[ClassCrea... | Keyword[public] Keyword[static] identifier[CasaItDocument] identifier[newDocument] operator[SEP] identifier[Container] identifier[container] operator[SEP] Keyword[throws] identifier[ParserConfigurationException] , identifier[JAXBException] {
identifier[Document] identifier[document] operator[=] identifier[XmlUt... |
@Override public void init(ProcessingEnvironment procEnv) {
super.init(procEnv);
if (System.getProperty("lombok.disable") != null) {
lombokDisabled = true;
return;
}
this.processingEnv = procEnv;
this.javacProcessingEnv = getJavacProcessingEnvironment(procEnv);
this.javacFiler = getJavacFiler(procEnv... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[procEnv]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=procEnv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=init, postfix_operators=[], prefix_operat... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[ProcessingEnvironment] identifier[procEnv] operator[SEP] {
Keyword[super] operator[SEP] identifier[init] operator[SEP] identifier[procEnv] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Sy... |
public HSlicePredicate<N> setStartOn(N start) {
this.start = start;
predicateType = PredicateType.Range;
return this;
} | class class_name[name] begin[{]
method[setStartOn, return_type[type[HSlicePredicate]], modifier[public], parameter[start]] begin[{]
assign[THIS[member[None.start]], member[.start]]
assign[member[.predicateType], member[PredicateType.Range]]
return[THIS[]]
end[}]
END[... | Keyword[public] identifier[HSlicePredicate] operator[<] identifier[N] operator[>] identifier[setStartOn] operator[SEP] identifier[N] identifier[start] operator[SEP] {
Keyword[this] operator[SEP] identifier[start] operator[=] identifier[start] operator[SEP] identifier[predicateType] operator[=] identifier[Predica... |
public boolean matches(MonitorConfig config) {
String name = config.getName();
TagList tags = config.getTags();
String value;
if (tagKey == null) {
value = name;
} else {
Tag t = tags.getTag(tagKey);
value = (t == null) ? null : t.getValue();
}
if (Strings.isNullOrEmpty(va... | class class_name[name] begin[{]
method[matches, return_type[type[boolean]], modifier[public], parameter[config]] begin[{]
local_variable[type[String], name]
local_variable[type[TagList], tags]
local_variable[type[String], value]
if[binary_operation[member[.tagKey], ==, l... | Keyword[public] Keyword[boolean] identifier[matches] operator[SEP] identifier[MonitorConfig] identifier[config] operator[SEP] {
identifier[String] identifier[name] operator[=] identifier[config] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[TagList] identifier[tags] opera... |
public void add(final T bagEntry)
{
if (closed) {
LOGGER.info("ConcurrentBag has been closed, ignoring add()");
throw new IllegalStateException("ConcurrentBag has been closed, ignoring add()");
}
sharedList.add(bagEntry);
// spin until a thread takes it or none are waiting... | class class_name[name] begin[{]
method[add, return_type[void], modifier[public], parameter[bagEntry]] begin[{]
if[member[.closed]] begin[{]
call[LOGGER.info, parameter[literal["ConcurrentBag has been closed, ignoring add()"]]]
ThrowStatement(expression=ClassC... | Keyword[public] Keyword[void] identifier[add] operator[SEP] Keyword[final] identifier[T] identifier[bagEntry] operator[SEP] {
Keyword[if] operator[SEP] identifier[closed] operator[SEP] {
identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword... |
private String bytesToHex(byte[] bytesToConvert) {
if(bytesToConvert == null)
{
return null;
}
if(bytesToConvert.length == 0)
{
return UtilGlobal.EMPTY;
}
char[] hexChars = new char[bytesToConvert.length * 2];
for ( int index = ... | class class_name[name] begin[{]
method[bytesToHex, return_type[type[String]], modifier[private], parameter[bytesToConvert]] begin[{]
if[binary_operation[member[.bytesToConvert], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
... | Keyword[private] identifier[String] identifier[bytesToHex] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytesToConvert] operator[SEP] {
Keyword[if] operator[SEP] identifier[bytesToConvert] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}... |
protected void configureEndpointAccessToDenyUndefined(final HttpSecurity http,
final ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry requests) {
val endpoints = casProperties.getMonitor().getEndpoints().getEndpoint().key... | class class_name[name] begin[{]
method[configureEndpointAccessToDenyUndefined, return_type[void], modifier[protected], parameter[http, requests]] begin[{]
local_variable[type[val], endpoints]
local_variable[type[val], endpointDefaults]
call[pathMappedEndpoints.forEach, parameter... | Keyword[protected] Keyword[void] identifier[configureEndpointAccessToDenyUndefined] operator[SEP] Keyword[final] identifier[HttpSecurity] identifier[http] , Keyword[final] identifier[ExpressionUrlAuthorizationConfigurer] operator[<] identifier[HttpSecurity] operator[>] operator[SEP] identifier[ExpressionInterceptUrlRe... |
public static String getContextMenuEntries(List<String> barItems) {
String result = "";
if (barItems.contains("link")) {
result += translateButton("link");
}
if (barItems.contains("downloadgallery")) {
result += " " + translateButton("downloadgallery");
}... | class class_name[name] begin[{]
method[getContextMenuEntries, return_type[type[String]], modifier[public static], parameter[barItems]] begin[{]
local_variable[type[String], result]
if[call[barItems.contains, parameter[literal["link"]]]] begin[{]
assign[member[.re... | Keyword[public] Keyword[static] identifier[String] identifier[getContextMenuEntries] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[barItems] operator[SEP] {
identifier[String] identifier[result] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[... |
public Property getProperty(String... name) {
if (name == null || name.length == 0) return null;
for (Property p : properties) {
if (Objects.equals(name[0], p.name)) {
if (name.length == 1)
return p;
else
return p.getPr... | class class_name[name] begin[{]
method[getProperty, return_type[type[Property]], modifier[public], parameter[name]] begin[{]
if[binary_operation[binary_operation[member[.name], ==, literal[null]], ||, binary_operation[member[name.length], ==, literal[0]]]] begin[{]
return[literal[null]]
... | Keyword[public] identifier[Property] identifier[getProperty] operator[SEP] identifier[String] operator[...] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[||] identifier[name] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] Keywo... |
@Override
public EClass getIfcIntersectionCurve() {
if (ifcIntersectionCurveEClass == null) {
ifcIntersectionCurveEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(326);
}
return ifcIntersectionCurveEClass;
} | class class_name[name] begin[{]
method[getIfcIntersectionCurve, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcIntersectionCurveEClass], ==, literal[null]]] begin[{]
assign[member[.ifcIntersectionCurveEClass], Cast(expre... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcIntersectionCurve] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcIntersectionCurveEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcIntersectionCurveEClass] operator[=] operator[... |
public RunInstancesRequest withElasticGpuSpecification(ElasticGpuSpecification... elasticGpuSpecification) {
if (this.elasticGpuSpecification == null) {
setElasticGpuSpecification(new com.amazonaws.internal.SdkInternalList<ElasticGpuSpecification>(elasticGpuSpecification.length));
}
... | class class_name[name] begin[{]
method[withElasticGpuSpecification, return_type[type[RunInstancesRequest]], modifier[public], parameter[elasticGpuSpecification]] begin[{]
if[binary_operation[THIS[member[None.elasticGpuSpecification]], ==, literal[null]]] begin[{]
call[.s... | Keyword[public] identifier[RunInstancesRequest] identifier[withElasticGpuSpecification] operator[SEP] identifier[ElasticGpuSpecification] operator[...] identifier[elasticGpuSpecification] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[elasticGpuSpecification] operator[==] Other[... |
@Override
public void tick(long time) {
this.time.set(time);
/*Foreign thread every 20 or so mili-seconds so we don't spend too
much time figuring out utc time. */
approxTime.set(Dates.utcNow());
} | class class_name[name] begin[{]
method[tick, return_type[void], modifier[public], parameter[time]] begin[{]
THIS[member[None.time]call[None.set, parameter[member[.time]]]]
call[approxTime.set, parameter[call[Dates.utcNow, parameter[]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[tick] operator[SEP] Keyword[long] identifier[time] operator[SEP] {
Keyword[this] operator[SEP] identifier[time] operator[SEP] identifier[set] operator[SEP] identifier[time] operator[SEP] operator[SEP] identifier[approxTime] operator[SEP]... |
public CompletableFuture<List<TopicDescription>> getTopicsAsync(int count, int skip) {
if (count > 100 || count < 1) {
throw new IllegalArgumentException("Count should be between 1 and 100");
}
if (skip < 0) {
throw new IllegalArgumentException("Skip cannot be negative")... | class class_name[name] begin[{]
method[getTopicsAsync, return_type[type[CompletableFuture]], modifier[public], parameter[count, skip]] begin[{]
if[binary_operation[binary_operation[member[.count], >, literal[100]], ||, binary_operation[member[.count], <, literal[1]]]] begin[{]
Throw... | Keyword[public] identifier[CompletableFuture] operator[<] identifier[List] operator[<] identifier[TopicDescription] operator[>] operator[>] identifier[getTopicsAsync] operator[SEP] Keyword[int] identifier[count] , Keyword[int] identifier[skip] operator[SEP] {
Keyword[if] operator[SEP] identifier[count] operator... |
public <T extends Exception, RESP> InternalExceptionHandler putHandler(Class<T> clazz,
ExceptionHandlerAction<RESP, T> action,
Type<RESP> ex) {
final InternalExce... | class class_name[name] begin[{]
method[putHandler, return_type[type[InternalExceptionHandler]], modifier[public], parameter[clazz, action, ex]] begin[{]
local_variable[type[InternalExceptionHandler], handler]
call[handlers.add, parameter[member[.handler]]]
return[member[.handler... | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Exception] , identifier[RESP] operator[>] identifier[InternalExceptionHandler] identifier[putHandler] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , identifier[ExceptionHandlerAction] operator[<] identifie... |
public void toAngelCodeText(PrintStream out, String imageName) {
out.println("info face=\""+fontName+"\" size="+size+" bold=0 italic=0 charset=\""+setName+"\" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1");
out.println("common lineHeight="+lineHeight+" base=26 scaleW="+width+" scaleH="+height+... | class class_name[name] begin[{]
method[toAngelCodeText, return_type[void], modifier[public], parameter[out, imageName]] begin[{]
call[out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["info face=\""], +, member[.... | Keyword[public] Keyword[void] identifier[toAngelCodeText] operator[SEP] identifier[PrintStream] identifier[out] , identifier[String] identifier[imageName] operator[SEP] {
identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[fontName] operator[+] literal[String] ... |
public static boolean createNewFile(File f) throws IOException {
if (null == f || f.exists())
return false;
makeDir(f.getParentFile());
return f.createNewFile();
} | class class_name[name] begin[{]
method[createNewFile, return_type[type[boolean]], modifier[public static], parameter[f]] begin[{]
if[binary_operation[binary_operation[literal[null], ==, member[.f]], ||, call[f.exists, parameter[]]]] begin[{]
return[literal[false]]
else begin[{]
None
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[createNewFile] operator[SEP] identifier[File] identifier[f] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[f] operator[||] identifier[f] operator[SEP] identifier[exists] operator[SEP... |
private void balance() {
// only try to balance when we're not terminating
if(!isTerminated()) {
Set<Map.Entry<Thread, Tracking>> threads = liveThreads.entrySet();
long liveAvgTimeTotal = 0;
long liveAvgCpuTotal = 0;
long liveCount = 0;
for (Ma... | class class_name[name] begin[{]
method[balance, return_type[void], modifier[private], parameter[]] begin[{]
if[call[.isTerminated, parameter[]]] begin[{]
local_variable[type[Set], threads]
local_variable[type[long], liveAvgTimeTotal]
local_variable[type[long]... | Keyword[private] Keyword[void] identifier[balance] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[isTerminated] operator[SEP] operator[SEP] operator[SEP] {
identifier[Set] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Thread] , iden... |
@Override
public String getPopUpURL(String CorpNum, String MgtKey)
throws PopbillException {
return getPopUpURL(CorpNum, MgtKey, null);
} | class class_name[name] begin[{]
method[getPopUpURL, return_type[type[String]], modifier[public], parameter[CorpNum, MgtKey]] begin[{]
return[call[.getPopUpURL, parameter[member[.CorpNum], member[.MgtKey], literal[null]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getPopUpURL] operator[SEP] identifier[String] identifier[CorpNum] , identifier[String] identifier[MgtKey] operator[SEP] Keyword[throws] identifier[PopbillException] {
Keyword[return] identifier[getPopUpURL] operator[SEP] identifier... |
private void calculateColor(int coord) {
coord = coord - mBarPointerHaloRadius;
if (coord < 0) {
coord = 0;
} else if (coord > mBarLength) {
coord = mBarLength;
}
mColor = Color.HSVToColor(new float[] { mHSVColor[0],
mHSVColor[1],
(float) (1 - (mPosToSatF... | class class_name[name] begin[{]
method[calculateColor, return_type[void], modifier[private], parameter[coord]] begin[{]
assign[member[.coord], binary_operation[member[.coord], -, member[.mBarPointerHaloRadius]]]
if[binary_operation[member[.coord], <, literal[0]]] begin[{]
... | Keyword[private] Keyword[void] identifier[calculateColor] operator[SEP] Keyword[int] identifier[coord] operator[SEP] {
identifier[coord] operator[=] identifier[coord] operator[-] identifier[mBarPointerHaloRadius] operator[SEP] Keyword[if] operator[SEP] identifier[coord] operator[<] Other[0] operator[SEP] {
... |
private void setContent(final EmailMessage emailWithData, final Part partToSet) throws MessagingException {
partToSet.setContent(emailWithData.getContent(), emailWithData.getMimeType() + CHARSET + emailWithData.getEncoding());
} | class class_name[name] begin[{]
method[setContent, return_type[void], modifier[private], parameter[emailWithData, partToSet]] begin[{]
call[partToSet.setContent, parameter[call[emailWithData.getContent, parameter[]], binary_operation[binary_operation[call[emailWithData.getMimeType, parameter[]]... | Keyword[private] Keyword[void] identifier[setContent] operator[SEP] Keyword[final] identifier[EmailMessage] identifier[emailWithData] , Keyword[final] identifier[Part] identifier[partToSet] operator[SEP] Keyword[throws] identifier[MessagingException] {
identifier[partToSet] operator[SEP] identifier[setContent] ... |
static public List<Record> readTable(String urlString, String format, int maxLines) throws IOException, NumberFormatException {
InputStream ios;
if (urlString.startsWith("http:")) {
URL url = new URL(urlString);
ios = url.openStream();
} else {
ios = new FileInputStream(urlString);... | class class_name[name] begin[{]
method[readTable, return_type[type[List]], modifier[public static], parameter[urlString, format, maxLines]] begin[{]
local_variable[type[InputStream], ios]
if[call[urlString.startsWith, parameter[literal["http:"]]]] begin[{]
local_variable[typ... | Keyword[static] Keyword[public] identifier[List] operator[<] identifier[Record] operator[>] identifier[readTable] operator[SEP] identifier[String] identifier[urlString] , identifier[String] identifier[format] , Keyword[int] identifier[maxLines] operator[SEP] Keyword[throws] identifier[IOException] , identifier[Numbe... |
public List<Vulnerability> load(Locale locale) {
List<String> filenames = getListOfVulnerabilitiesFiles();
String extension = fileExtension;
if (extension.startsWith(".")) {
extension = extension.substring(1);
}
List<Vulnerability> vulnerabilities = LocaleUtils.findResource(fileName, extension, loc... | class class_name[name] begin[{]
method[load, return_type[type[List]], modifier[public], parameter[locale]] begin[{]
local_variable[type[List], filenames]
local_variable[type[String], extension]
if[call[extension.startsWith, parameter[literal["."]]]] begin[{]
... | Keyword[public] identifier[List] operator[<] identifier[Vulnerability] operator[>] identifier[load] operator[SEP] identifier[Locale] identifier[locale] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[filenames] operator[=] identifier[getListOfVulnerabilitiesFiles] operator[... |
@Deprecated
public static RequestQueue getRequestQueue(Context context) {
if (InstanceRequestQueue == null) {
InstanceRequestQueue = newRequestQueue(context);
}
return InstanceRequestQueue;
} | class class_name[name] begin[{]
method[getRequestQueue, return_type[type[RequestQueue]], modifier[public static], parameter[context]] begin[{]
if[binary_operation[member[.InstanceRequestQueue], ==, literal[null]]] begin[{]
assign[member[.InstanceRequestQueue], call[.newR... | annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[RequestQueue] identifier[getRequestQueue] operator[SEP] identifier[Context] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] identifier[InstanceRequestQueue] operator[==] Other[null] operator[SEP] {
identifier... |
public Keyspace build() {
final AstyanaxContext<Keyspace> context = new AstyanaxContext.Builder()
.forCluster(clusterName)
.forKeyspace(keyspaceName)
.withAstyanaxConfiguration(new AstyanaxConfigurationImpl()
.setDiscoveryType(RING_DESCRIBE)
)
... | class class_name[name] begin[{]
method[build, return_type[type[Keyspace]], modifier[public], parameter[]] begin[{]
local_variable[type[AstyanaxContext], context]
call[context.start, parameter[]]
call[Runtime.getRuntime, parameter[]]
return[call[context.getClient,... | Keyword[public] identifier[Keyspace] identifier[build] operator[SEP] operator[SEP] {
Keyword[final] identifier[AstyanaxContext] operator[<] identifier[Keyspace] operator[>] identifier[context] operator[=] Keyword[new] identifier[AstyanaxContext] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] opera... |
public Packer useHMAC(final String hMacAlg, final String passphrase) throws NoSuchAlgorithmException,
InvalidKeyException {
hMac = Mac.getInstance(hMacAlg); // "HmacSHA256"
hMac.init(new SecretKeySpec(passphrase.getBytes(charsetUTF8), hMacAlg));
return this;
} | class class_name[name] begin[{]
method[useHMAC, return_type[type[Packer]], modifier[public], parameter[hMacAlg, passphrase]] begin[{]
assign[member[.hMac], call[Mac.getInstance, parameter[member[.hMacAlg]]]]
call[hMac.init, parameter[ClassCreator(arguments=[MethodInvocation(argu... | Keyword[public] identifier[Packer] identifier[useHMAC] operator[SEP] Keyword[final] identifier[String] identifier[hMacAlg] , Keyword[final] identifier[String] identifier[passphrase] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] , identifier[InvalidKeyException] {
identifier[hMac] operator[... |
@Override
public synchronized void searchMCS(boolean shouldMatchBonds) {
List<List<Integer>> mappings = null;
try {
if (source.getAtomCount() >= target.getAtomCount()) {
mappings = new MCSPlus().getOverlaps(source, target, shouldMatchBonds);
} else {
... | class class_name[name] begin[{]
method[searchMCS, return_type[void], modifier[synchronized public], parameter[shouldMatchBonds]] begin[{]
local_variable[type[List], mappings]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAtomCount, p... | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[searchMCS] operator[SEP] Keyword[boolean] identifier[shouldMatchBonds] operator[SEP] {
identifier[List] operator[<] identifier[List] operator[<] identifier[Integer] operator[>] operator[>] identifier[mappings] opera... |
public Form getAncestor(
Form formToGetAncestorForParam,
boolean includeFieldDataParam,
boolean includeTableFieldsParam) {
if (formToGetAncestorForParam != null && this.serviceTicket != null) {
formToGetAncestorForParam.setServiceTicket(this.serviceTicket);
}
try {
return new Form(
this.post... | class class_name[name] begin[{]
method[getAncestor, return_type[type[Form]], modifier[public], parameter[formToGetAncestorForParam, includeFieldDataParam, includeTableFieldsParam]] begin[{]
if[binary_operation[binary_operation[member[.formToGetAncestorForParam], !=, literal[null]], &&, binary_o... | Keyword[public] identifier[Form] identifier[getAncestor] operator[SEP] identifier[Form] identifier[formToGetAncestorForParam] , Keyword[boolean] identifier[includeFieldDataParam] , Keyword[boolean] identifier[includeTableFieldsParam] operator[SEP] {
Keyword[if] operator[SEP] identifier[formToGetAncestorForPara... |
public static <R> Function<Object,R[]> attrOfArrayOf(final Type<R> resultType, final String attributeName) {
return new Get<Object,R[]>(Types.arrayOf(resultType), attributeName);
} | class class_name[name] begin[{]
method[attrOfArrayOf, return_type[type[Function]], modifier[public static], parameter[resultType, attributeName]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=resultType, postfix_operators=[], prefix_operators=[], qualifier=,... | Keyword[public] Keyword[static] operator[<] identifier[R] operator[>] identifier[Function] operator[<] identifier[Object] , identifier[R] operator[SEP] operator[SEP] operator[>] identifier[attrOfArrayOf] operator[SEP] Keyword[final] identifier[Type] operator[<] identifier[R] operator[>] identifier[resultType] , Keywo... |
public void setShowOutput(String mode) {
try {
this.outputMode = OutputMode.valueOf(mode.toUpperCase(Locale.ROOT));
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("showOutput accepts any of: "
+ Arrays.toString(OutputMode.values()) + ", value is not valid: " + mo... | class class_name[name] begin[{]
method[setShowOutput, return_type[void], modifier[public], parameter[mode]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=outputMode, po... | Keyword[public] Keyword[void] identifier[setShowOutput] operator[SEP] identifier[String] identifier[mode] operator[SEP] {
Keyword[try] {
Keyword[this] operator[SEP] identifier[outputMode] operator[=] identifier[OutputMode] operator[SEP] identifier[valueOf] operator[SEP] identifier[mode] operator[SEP] ... |
public static TransactionWitness redeemP2WPKH(@Nullable TransactionSignature signature, ECKey pubKey) {
checkArgument(pubKey.isCompressed(), "only compressed keys allowed");
TransactionWitness witness = new TransactionWitness(2);
witness.setPush(0, signature != null ? signature.encodeToBitcoin()... | class class_name[name] begin[{]
method[redeemP2WPKH, return_type[type[TransactionWitness]], modifier[public static], parameter[signature, pubKey]] begin[{]
call[.checkArgument, parameter[call[pubKey.isCompressed, parameter[]], literal["only compressed keys allowed"]]]
local_variable[typ... | Keyword[public] Keyword[static] identifier[TransactionWitness] identifier[redeemP2WPKH] operator[SEP] annotation[@] identifier[Nullable] identifier[TransactionSignature] identifier[signature] , identifier[ECKey] identifier[pubKey] operator[SEP] {
identifier[checkArgument] operator[SEP] identifier[pubKey] operat... |
public <T> T asOrElse(Class<T> clazz, @NonNull Supplier<T> supplier) {
if (isNull()) {
return supplier.get();
}
T value = as(clazz);
if (value == null) {
return supplier.get();
}
return value;
} | class class_name[name] begin[{]
method[asOrElse, return_type[type[T]], modifier[public], parameter[clazz, supplier]] begin[{]
if[call[.isNull, parameter[]]] begin[{]
return[call[supplier.get, parameter[]]]
else begin[{]
None
end[}]
local_variable[type[T], val... | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[asOrElse] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , annotation[@] identifier[NonNull] identifier[Supplier] operator[<] identifier[T] operator[>] identifier[supplier] operator[SEP] {
Key... |
private int getReplicaTypeForPartition(int partitionId) {
List<Integer> routingPartitionList = routingStrategy.getReplicatingPartitionList(partitionId);
// Determine if we should host this partition, and if so, whether we are a primary,
// secondary or n-ary replica for it
int correctRe... | class class_name[name] begin[{]
method[getReplicaTypeForPartition, return_type[type[int]], modifier[private], parameter[partitionId]] begin[{]
local_variable[type[List], routingPartitionList]
local_variable[type[int], correctReplicaType]
ForStatement(body=BlockStatement(label=None, stat... | Keyword[private] Keyword[int] identifier[getReplicaTypeForPartition] operator[SEP] Keyword[int] identifier[partitionId] operator[SEP] {
identifier[List] operator[<] identifier[Integer] operator[>] identifier[routingPartitionList] operator[=] identifier[routingStrategy] operator[SEP] identifier[getReplicatingPart... |
public void setDataFormat(final String pattern, final CellFormatter cellFormatter) {
String currentPattern = POIUtils.getCellFormatPattern(cell, cellFormatter);
if(currentPattern.equalsIgnoreCase(pattern)) {
// 既に書式が同じ場合
return;
}
cloneStyle();
... | class class_name[name] begin[{]
method[setDataFormat, return_type[void], modifier[public], parameter[pattern, cellFormatter]] begin[{]
local_variable[type[String], currentPattern]
if[call[currentPattern.equalsIgnoreCase, parameter[member[.pattern]]]] begin[{]
return[None]
... | Keyword[public] Keyword[void] identifier[setDataFormat] operator[SEP] Keyword[final] identifier[String] identifier[pattern] , Keyword[final] identifier[CellFormatter] identifier[cellFormatter] operator[SEP] {
identifier[String] identifier[currentPattern] operator[=] identifier[POIUtils] operator[SEP] identifier... |
private List<SessionNode> getChangedNodesAtOrBelowChildrenFirst( Path nodePath ) {
List<SessionNode> changedNodesChildrenFirst = new ArrayList<SessionNode>();
for (NodeKey key : changedNodes.keySet()) {
SessionNode changedNode = changedNodes.get(key);
boolean isAtOrBelow = false;... | class class_name[name] begin[{]
method[getChangedNodesAtOrBelowChildrenFirst, return_type[type[List]], modifier[private], parameter[nodePath]] begin[{]
local_variable[type[List], changedNodesChildrenFirst]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotat... | Keyword[private] identifier[List] operator[<] identifier[SessionNode] operator[>] identifier[getChangedNodesAtOrBelowChildrenFirst] operator[SEP] identifier[Path] identifier[nodePath] operator[SEP] {
identifier[List] operator[<] identifier[SessionNode] operator[>] identifier[changedNodesChildrenFirst] operator[=... |
public static float isBetweenInclusive (final float fValue,
@Nonnull final Supplier <? extends String> aName,
final float fLowerBoundInclusive,
final float fUpperBoundInclusive)
{
if (isEn... | class class_name[name] begin[{]
method[isBetweenInclusive, return_type[type[float]], modifier[public static], parameter[fValue, aName, fLowerBoundInclusive, fUpperBoundInclusive]] begin[{]
if[call[.isEnabled, parameter[]]] begin[{]
if[binary_operation[binary_operation[member[.fValue... | Keyword[public] Keyword[static] Keyword[float] identifier[isBetweenInclusive] operator[SEP] Keyword[final] Keyword[float] identifier[fValue] , annotation[@] identifier[Nonnull] Keyword[final] identifier[Supplier] operator[<] operator[?] Keyword[extends] identifier[String] operator[>] identifier[aName] , Keyword[final... |
public final String getUnderscoredNameAndTypes() {
final StringBuffer sb = new StringBuffer();
sb.append(SgUtils.firstCharUpper(getName()));
sb.append("_");
for (int i = 0; i < getArguments().size(); i++) {
if (i > 0) {
sb.append("_");
}
... | class class_name[name] begin[{]
method[getUnderscoredNameAndTypes, return_type[type[String]], modifier[final public], parameter[]] begin[{]
local_variable[type[StringBuffer], sb]
call[sb.append, parameter[call[SgUtils.firstCharUpper, parameter[call[.getName, parameter[]]]]]]
... | Keyword[public] Keyword[final] identifier[String] identifier[getUnderscoredNameAndTypes] operator[SEP] operator[SEP] {
Keyword[final] identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append]... |
public final void fidiv(Mem src)
{
assert(src.size() == 2 || src.size() == 4);
emitX86(INST_FIDIV, src);
} | class class_name[name] begin[{]
method[fidiv, return_type[void], modifier[final public], parameter[src]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[... | Keyword[public] Keyword[final] Keyword[void] identifier[fidiv] operator[SEP] identifier[Mem] identifier[src] operator[SEP] {
Keyword[assert] operator[SEP] identifier[src] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[2] operator[||] identifier[src] operator[SEP] identifier[size] o... |
public static void calcScaleOffset(GribData.Bean bean1, Formatter f) {
float[] data;
try {
data = bean1.readData();
} catch (IOException e) {
f.format("IOException %s", e.getMessage());
return;
}
int npoints = data.length;
// we always use unsigned packed
// "If the packed... | class class_name[name] begin[{]
method[calcScaleOffset, return_type[void], modifier[public static], parameter[bean1, f]] begin[{]
local_variable[type[float], data]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix... | Keyword[public] Keyword[static] Keyword[void] identifier[calcScaleOffset] operator[SEP] identifier[GribData] operator[SEP] identifier[Bean] identifier[bean1] , identifier[Formatter] identifier[f] operator[SEP] {
Keyword[float] operator[SEP] operator[SEP] identifier[data] operator[SEP] Keyword[try] {
... |
public static Style createDefaultStyle( SimpleFeatureCollection featureCollection ) {
GeometryDescriptor geometryDescriptor = featureCollection.getSchema().getGeometryDescriptor();
Style style = null;
if (EGeometryType.isPoint(geometryDescriptor)) {
style = createDefaultPointStyle();... | class class_name[name] begin[{]
method[createDefaultStyle, return_type[type[Style]], modifier[public static], parameter[featureCollection]] begin[{]
local_variable[type[GeometryDescriptor], geometryDescriptor]
local_variable[type[Style], style]
if[call[EGeometryType.isPoint, par... | Keyword[public] Keyword[static] identifier[Style] identifier[createDefaultStyle] operator[SEP] identifier[SimpleFeatureCollection] identifier[featureCollection] operator[SEP] {
identifier[GeometryDescriptor] identifier[geometryDescriptor] operator[=] identifier[featureCollection] operator[SEP] identifier[getSche... |
public final PostAggItem postAggJavascriptDef() throws RecognitionException {
PostAggItem postAggItem = null;
Token str=null;
postAggItem = new PostAggItem("javascript");
try {
// druidG.g:546:2: ( JAVASCRIPT ( WS )? str= SINGLE_QUOTE_STRING )
// druidG.g:546:4: JAVASCRIPT ( WS )? str= SINGLE_QUOTE_... | class class_name[name] begin[{]
method[postAggJavascriptDef, return_type[type[PostAggItem]], modifier[final public], parameter[]] begin[{]
local_variable[type[PostAggItem], postAggItem]
local_variable[type[Token], str]
assign[member[.postAggItem], ClassCreator(arguments=[Literal... | Keyword[public] Keyword[final] identifier[PostAggItem] identifier[postAggJavascriptDef] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[PostAggItem] identifier[postAggItem] operator[=] Other[null] operator[SEP] identifier[Token] identifier[str] operator[=] Other[null] op... |
public void addStubMethods(TypeSpec.Builder classBuilder) {
MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("onTransact")
.addModifiers(Modifier.PUBLIC)
.addAnnotation(Override.class)
.returns(boolean.class)
.addException(ClassNa... | class class_name[name] begin[{]
method[addStubMethods, return_type[void], modifier[public], parameter[classBuilder]] begin[{]
local_variable[type[MethodSpec], methodBuilder]
call[methodBuilder.beginControlFlow, parameter[literal["try"]]]
call[methodBuilder.beginControlFl... | Keyword[public] Keyword[void] identifier[addStubMethods] operator[SEP] identifier[TypeSpec] operator[SEP] identifier[Builder] identifier[classBuilder] operator[SEP] {
identifier[MethodSpec] operator[SEP] identifier[Builder] identifier[methodBuilder] operator[=] identifier[MethodSpec] operator[SEP] identifier[met... |
public synchronized <S extends Service> void addService(Class<S> clazz, S service) {
for (BeanDeploymentArchiveImpl bda : beanDeploymentArchives) {
bda.getServices().add(clazz,service);
}
} | class class_name[name] begin[{]
method[addService, return_type[void], modifier[synchronized public], parameter[clazz, service]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getServices, postfix_operators=[], prefi... | Keyword[public] Keyword[synchronized] operator[<] identifier[S] Keyword[extends] identifier[Service] operator[>] Keyword[void] identifier[addService] operator[SEP] identifier[Class] operator[<] identifier[S] operator[>] identifier[clazz] , identifier[S] identifier[service] operator[SEP] {
Keyword[for] operator[... |
public <T> T executeWithUser(final String user, final String password,
final SpecificUserAction<T> userAction) {
Preconditions.checkState(!transactionManager.isTransactionActive(),
"User can't be changed during transaction");
Preconditions.checkState(spec... | class class_name[name] begin[{]
method[executeWithUser, return_type[type[T]], modifier[public], parameter[user, password, userAction]] begin[{]
call[Preconditions.checkState, parameter[call[transactionManager.isTransactionActive, parameter[]], literal["User can't be changed during transaction"]... | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[executeWithUser] operator[SEP] Keyword[final] identifier[String] identifier[user] , Keyword[final] identifier[String] identifier[password] , Keyword[final] identifier[SpecificUserAction] operator[<] identifier[T] operator[>] identifier[use... |
private static MonetaryFormatsSingletonSpi loadMonetaryFormatsSingletonSpi() {
try {
return Optional.ofNullable(Bootstrap.getService(MonetaryFormatsSingletonSpi.class))
.orElseGet(DefaultMonetaryFormatsSingletonSpi::new);
} catch (Exception e) {
Logger.getLogg... | class class_name[name] begin[{]
method[loadMonetaryFormatsSingletonSpi, return_type[type[MonetaryFormatsSingletonSpi]], modifier[private static], parameter[]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[ClassReference(postfix_operators... | Keyword[private] Keyword[static] identifier[MonetaryFormatsSingletonSpi] identifier[loadMonetaryFormatsSingletonSpi] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[Optional] operator[SEP] identifier[ofNullable] operator[SEP] identifier[Bootstrap] operator[SEP] identifier[getSe... |
@Override
public List<CommerceNotificationAttachment> findByCommerceNotificationQueueEntryId(
long commerceNotificationQueueEntryId, int start, int end,
OrderByComparator<CommerceNotificationAttachment> orderByComparator,
boolean retrieveFromCache) {
boolean pagination = true;
FinderPath finderPath = null;
... | class class_name[name] begin[{]
method[findByCommerceNotificationQueueEntryId, return_type[type[List]], modifier[public], parameter[commerceNotificationQueueEntryId, start, end, orderByComparator, retrieveFromCache]] begin[{]
local_variable[type[boolean], pagination]
local_variable[type[FinderP... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommerceNotificationAttachment] operator[>] identifier[findByCommerceNotificationQueueEntryId] operator[SEP] Keyword[long] identifier[commerceNotificationQueueEntryId] , Keyword[int] identifier[start] , Keyword[int] identifier[... |
public void printHtmlNavMenu(PrintWriter out)
throws DBException
{
if (HHelpScreen.getFirstToUpper(this.getProperty(DBParams.NAVMENUS)) != UserInfoModel.NO_ICONS.charAt(0))
super.printHtmlNavMenu(out);
else
{ // Applets frequently turn off menu bars temporarly
... | class class_name[name] begin[{]
method[printHtmlNavMenu, return_type[void], modifier[public], parameter[out]] begin[{]
if[binary_operation[call[HHelpScreen.getFirstToUpper, parameter[THIS[call[None.getProperty, parameter[member[DBParams.NAVMENUS]]]]]], !=, call[UserInfoModel.NO_ICONS.charAt, pa... | Keyword[public] Keyword[void] identifier[printHtmlNavMenu] operator[SEP] identifier[PrintWriter] identifier[out] operator[SEP] Keyword[throws] identifier[DBException] {
Keyword[if] operator[SEP] identifier[HHelpScreen] operator[SEP] identifier[getFirstToUpper] operator[SEP] Keyword[this] operator[SEP] identifier... |
public static Chart getMSDLineWithConfinedModelChart(Trajectory t, int lagMin,
int lagMax, double timelag, double a, double b, double c, double d) {
double[] xData = new double[lagMax - lagMin + 1];
double[] yData = new double[lagMax - lagMin + 1];
double[] modelData = new double[lagMax - lagMin + 1];
MeanS... | class class_name[name] begin[{]
method[getMSDLineWithConfinedModelChart, return_type[type[Chart]], modifier[public static], parameter[t, lagMin, lagMax, timelag, a, b, c, d]] begin[{]
local_variable[type[double], xData]
local_variable[type[double], yData]
local_variable[type[double], mo... | Keyword[public] Keyword[static] identifier[Chart] identifier[getMSDLineWithConfinedModelChart] operator[SEP] identifier[Trajectory] identifier[t] , Keyword[int] identifier[lagMin] , Keyword[int] identifier[lagMax] , Keyword[double] identifier[timelag] , Keyword[double] identifier[a] , Keyword[double] identifier[b]... |
public static String resolveTitle(final String title, final String reference) {
if (StringUtils.isBlank(title) && !StringUtils.isBlank(reference)) {
// If there is no title, assume the reference is a path and take the last part (the "file name")
final String[] splitReference = PATH_SEPAR... | class class_name[name] begin[{]
method[resolveTitle, return_type[type[String]], modifier[public static], parameter[title, reference]] begin[{]
if[binary_operation[call[StringUtils.isBlank, parameter[member[.title]]], &&, call[StringUtils.isBlank, parameter[member[.reference]]]]] begin[{]
... | Keyword[public] Keyword[static] identifier[String] identifier[resolveTitle] operator[SEP] Keyword[final] identifier[String] identifier[title] , Keyword[final] identifier[String] identifier[reference] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP... |
public String getNiceName() {
if (CmsStringUtil.isEmpty(m_niceName)) {
// if the nice name is empty use the system name for display
if (isExisting() && !isTemplateElement()) {
// this element was not defined with the "template-elements" property
return "... | class class_name[name] begin[{]
method[getNiceName, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[call[CmsStringUtil.isEmpty, parameter[member[.m_niceName]]]] begin[{]
if[binary_operation[call[.isExisting, parameter[]], &&, call[.isTemplateElement... | Keyword[public] identifier[String] identifier[getNiceName] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isEmpty] operator[SEP] identifier[m_niceName] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isExisting] operator[SE... |
public static String addUtf8Charset(String contentType)
{
if (contentType == null)
{
return "text/plain;charset=utf-8";
}
Matcher matcher = CHARSET_PATT.matcher(contentType);
if (matcher.find())
{
// replace what ever content-type with utf8
... | class class_name[name] begin[{]
method[addUtf8Charset, return_type[type[String]], modifier[public static], parameter[contentType]] begin[{]
if[binary_operation[member[.contentType], ==, literal[null]]] begin[{]
return[literal["text/plain;charset=utf-8"]]
else begin[{]
None
... | Keyword[public] Keyword[static] identifier[String] identifier[addUtf8Charset] operator[SEP] identifier[String] identifier[contentType] operator[SEP] {
Keyword[if] operator[SEP] identifier[contentType] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[String] operator[SEP]
}
... |
@SneakyThrows(IOException.class)
public static String compressToBase64(final String string) {
Preconditions.checkNotNull(string, "string");
@Cleanup
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
@Cleanup
final OutputStream base64OutputStream... | class class_name[name] begin[{]
method[compressToBase64, return_type[type[String]], modifier[public static], parameter[string]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.string], literal["string"]]]
local_variable[type[ByteArrayOutputStream], byteArrayOutputStream]
... | annotation[@] identifier[SneakyThrows] operator[SEP] identifier[IOException] operator[SEP] Keyword[class] operator[SEP] Keyword[public] Keyword[static] identifier[String] identifier[compressToBase64] operator[SEP] Keyword[final] identifier[String] identifier[string] operator[SEP] {
identifier[Preconditions] oper... |
@SuppressWarnings("deprecation")
public List<String> compileToJsSrc(
SoyJsSrcOptions jsSrcOptions, @Nullable SoyMsgBundle msgBundle) {
resetErrorReporter();
// JS has traditionally allowed unknown globals, as a way for soy to reference normal js enums
// and constants. For consistency/reusability of... | class class_name[name] begin[{]
method[compileToJsSrc, return_type[type[List]], modifier[public], parameter[jsSrcOptions, msgBundle]] begin[{]
call[.resetErrorReporter, parameter[]]
local_variable[type[PassManager], builder]
local_variable[type[ParseResult], result]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[compileToJsSrc] operator[SEP] identifier[SoyJsSrcOptions] identifier[jsSrcOptions] , annotation[@] identifier[Nullable] identifier[SoyMsgBundle] ... |
@Override
public void add(SegmentOperation operation) throws DataCorruptionException {
ensureInitializedAndNotClosed();
// Verify the operation is valid with respect to the state of this SegmentAggregator.
checkValidOperation(operation);
boolean isDelete = isDeleteOperation(operati... | class class_name[name] begin[{]
method[add, return_type[void], modifier[public], parameter[operation]] begin[{]
call[.ensureInitializedAndNotClosed, parameter[]]
call[.checkValidOperation, parameter[member[.operation]]]
local_variable[type[boolean], isDelete]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[SegmentOperation] identifier[operation] operator[SEP] Keyword[throws] identifier[DataCorruptionException] {
identifier[ensureInitializedAndNotClosed] operator[SEP] operator[SEP] operator[SEP] identifier[chec... |
public BinaryEncoder createBinaryEncoder(final Encoding encoding)
throws UnsupportedEncodingException {
if (Encoding.QUOTED_PRINTABLE.equals(encoding)) {
return new QuotedPrintableCodec();
}
else if (Encoding.BASE64.equals(encoding)) {
return new Base64();
... | class class_name[name] begin[{]
method[createBinaryEncoder, return_type[type[BinaryEncoder]], modifier[public], parameter[encoding]] begin[{]
if[call[Encoding.QUOTED_PRINTABLE.equals, parameter[member[.encoding]]]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_ty... | Keyword[public] identifier[BinaryEncoder] identifier[createBinaryEncoder] operator[SEP] Keyword[final] identifier[Encoding] identifier[encoding] operator[SEP] Keyword[throws] identifier[UnsupportedEncodingException] {
Keyword[if] operator[SEP] identifier[Encoding] operator[SEP] identifier[QUOTED_PRINTABLE] opera... |
@Override
public Long append(byte[] key, byte[] value) {
try {
if (isPipelined()) {
pipeline(new JedisResult(pipeline.append(key, value)));
return null;
}
return client.append(key, value);
} catch (Exception ex) {
throw ... | class class_name[name] begin[{]
method[append, return_type[type[Long]], modifier[public], parameter[key, value]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isPipelined, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None... | annotation[@] identifier[Override] Keyword[public] identifier[Long] identifier[append] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[key] , Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[isPipelined]... |
@Override
protected void postExecute(List<String> filesProcessed, int nonComplyingFiles)
throws MojoFailureException {
if (nonComplyingFiles > 0) {
String message = "Found " + nonComplyingFiles + " non-complying files, failing build";
getLog().error(message);
getLog().error("To fix formatt... | class class_name[name] begin[{]
method[postExecute, return_type[void], modifier[protected], parameter[filesProcessed, nonComplyingFiles]] begin[{]
if[binary_operation[member[.nonComplyingFiles], >, literal[0]]] begin[{]
local_variable[type[String], message]
c... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[postExecute] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[filesProcessed] , Keyword[int] identifier[nonComplyingFiles] operator[SEP] Keyword[throws] identifier[MojoFailureException] {
Keyword[i... |
public String getStringOrNull(int index) throws IllegalStateException {
Type type = stateList.get(index);
if (type == null) {
return null;
}
switch (type) {
case NULL:
return null;
case STRING:
return (String) get(index);
default:
throw new IllegalStateException("unexpected token. token=... | class class_name[name] begin[{]
method[getStringOrNull, return_type[type[String]], modifier[public], parameter[index]] begin[{]
local_variable[type[Type], type]
if[binary_operation[member[.type], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
... | Keyword[public] identifier[String] identifier[getStringOrNull] operator[SEP] Keyword[int] identifier[index] operator[SEP] Keyword[throws] identifier[IllegalStateException] {
identifier[Type] identifier[type] operator[=] identifier[stateList] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[... |
public Matrix4f setPerspectiveLH(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne) {
MemUtil.INSTANCE.zero(this);
float h = (float) Math.tan(fovy * 0.5f);
this._m00(1.0f / (h * aspect));
this._m11(1.0f / h);
boolean farInf = zFar > 0 && Float.isInfinite(zFar)... | class class_name[name] begin[{]
method[setPerspectiveLH, return_type[type[Matrix4f]], modifier[public], parameter[fovy, aspect, zNear, zFar, zZeroToOne]] begin[{]
call[MemUtil.INSTANCE.zero, parameter[THIS[]]]
local_variable[type[float], h]
THIS[call[None._m00, parameter... | Keyword[public] identifier[Matrix4f] identifier[setPerspectiveLH] operator[SEP] Keyword[float] identifier[fovy] , Keyword[float] identifier[aspect] , Keyword[float] identifier[zNear] , Keyword[float] identifier[zFar] , Keyword[boolean] identifier[zZeroToOne] operator[SEP] {
identifier[MemUtil] operator[SEP] ... |
@Override
public void dispose() {
super.dispose();
if (fields != null) {
Iterator<FieldEditor> e = fields.iterator();
while (e.hasNext()) {
FieldEditor pe = e.next();
pe.setPage(null);
pe.setPropertyChangeListener(null);
pe.setPreferenceStore(null);
}
}
} | class class_name[name] begin[{]
method[dispose, return_type[void], modifier[public], parameter[]] begin[{]
SuperMethodInvocation(arguments=[], member=dispose, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
if[binary_operation[member... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[dispose] operator[SEP] operator[SEP] {
Keyword[super] operator[SEP] identifier[dispose] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fields] operator[!=] Other[null] operator[SEP] {
identifier... |
@Override
public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectPropertyDomainAxiomImpl instance) throws SerializationException {
deserialize(streamReader, instance);
} | class class_name[name] begin[{]
method[deserializeInstance, return_type[void], modifier[public], parameter[streamReader, instance]] begin[{]
call[.deserialize, parameter[member[.streamReader], member[.instance]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[deserializeInstance] operator[SEP] identifier[SerializationStreamReader] identifier[streamReader] , identifier[OWLObjectPropertyDomainAxiomImpl] identifier[instance] operator[SEP] Keyword[throws] identifier[SerializationException] {
ide... |
@JsonCreator
public static JsonTwo create(
@JsonProperty("two") String two,
@JsonProperty("hello") String hello) {
return builder()
.setTwo(two)
.setHello(hello)
.build();
} | class class_name[name] begin[{]
method[create, return_type[type[JsonTwo]], modifier[public static], parameter[two, hello]] begin[{]
return[call[.builder, parameter[]]]
end[}]
END[}] | annotation[@] identifier[JsonCreator] Keyword[public] Keyword[static] identifier[JsonTwo] identifier[create] operator[SEP] annotation[@] identifier[JsonProperty] operator[SEP] literal[String] operator[SEP] identifier[String] identifier[two] , annotation[@] identifier[JsonProperty] operator[SEP] literal[String] operato... |
public static Double evaluateAsNumber(Node node, String xPathExpression, NamespaceContext nsContext) {
return (Double) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.NUMBER);
} | class class_name[name] begin[{]
method[evaluateAsNumber, return_type[type[Double]], modifier[public static], parameter[node, xPathExpression, nsContext]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selec... | Keyword[public] Keyword[static] identifier[Double] identifier[evaluateAsNumber] operator[SEP] identifier[Node] identifier[node] , identifier[String] identifier[xPathExpression] , identifier[NamespaceContext] identifier[nsContext] operator[SEP] {
Keyword[return] operator[SEP] identifier[Double] operator[SEP] id... |
public void editModule(String moduleName) {
CmsModule module = OpenCms.getModuleManager().getModule(moduleName);
editModule(
module,
false,
CmsVaadinUtils.getMessageText(Messages.GUI_MODULES_TITLE_EDIT_MODULE_1, module.getName()),
this::reload);
} | class class_name[name] begin[{]
method[editModule, return_type[void], modifier[public], parameter[moduleName]] begin[{]
local_variable[type[CmsModule], module]
call[.editModule, parameter[member[.module], literal[false], call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_... | Keyword[public] Keyword[void] identifier[editModule] operator[SEP] identifier[String] identifier[moduleName] operator[SEP] {
identifier[CmsModule] identifier[module] operator[=] identifier[OpenCms] operator[SEP] identifier[getModuleManager] operator[SEP] operator[SEP] operator[SEP] identifier[getModule] operator... |
private boolean hasPrimaryKey(T entity) {
Object pk = getPrimaryKey(entity);
if (pk == null) {
return false;
} else {
if (pk instanceof Number && ((Number) pk).longValue() == 0) {
return false;
}
}
return true;
} | class class_name[name] begin[{]
method[hasPrimaryKey, return_type[type[boolean]], modifier[private], parameter[entity]] begin[{]
local_variable[type[Object], pk]
if[binary_operation[member[.pk], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
... | Keyword[private] Keyword[boolean] identifier[hasPrimaryKey] operator[SEP] identifier[T] identifier[entity] operator[SEP] {
identifier[Object] identifier[pk] operator[=] identifier[getPrimaryKey] operator[SEP] identifier[entity] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pk] operator[==] Oth... |
@Override
public void close() {
try {
if (!hadWriteErrors) {
flush();
} else {
if (LOG.isDebugEnabled()) {
LOG.debug("Dirty close; ignoring last existing write batch...");
}
}
if (requiresRef... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[IfStatement(condition=MemberReference(member=hadWriteErrors, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, st... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] operator[!] identifier[hadWriteErrors] operator[SEP] {
identifier[flush] operator[SEP] operator[SEP] operator[SEP]
}
... |
@Override
public CPDAvailabilityEstimate findByUuid_C_First(String uuid,
long companyId,
OrderByComparator<CPDAvailabilityEstimate> orderByComparator)
throws NoSuchCPDAvailabilityEstimateException {
CPDAvailabilityEstimate cpdAvailabilityEstimate = fetchByUuid_C_First(uuid,
companyId, orderByComparator);
... | class class_name[name] begin[{]
method[findByUuid_C_First, return_type[type[CPDAvailabilityEstimate]], modifier[public], parameter[uuid, companyId, orderByComparator]] begin[{]
local_variable[type[CPDAvailabilityEstimate], cpdAvailabilityEstimate]
if[binary_operation[member[.cpdAvailabi... | annotation[@] identifier[Override] Keyword[public] identifier[CPDAvailabilityEstimate] identifier[findByUuid_C_First] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] , identifier[OrderByComparator] operator[<] identifier[CPDAvailabilityEstimate] operator[>] identifier[orderByCo... |
protected String getRequestName(MethodInvocation invocation) {
final String classPart = getClassPart(invocation);
final String methodPart = getMethodPart(invocation);
return classPart + '.' + methodPart;
} | class class_name[name] begin[{]
method[getRequestName, return_type[type[String]], modifier[protected], parameter[invocation]] begin[{]
local_variable[type[String], classPart]
local_variable[type[String], methodPart]
return[binary_operation[binary_operation[member[.classPart], +, literal... | Keyword[protected] identifier[String] identifier[getRequestName] operator[SEP] identifier[MethodInvocation] identifier[invocation] operator[SEP] {
Keyword[final] identifier[String] identifier[classPart] operator[=] identifier[getClassPart] operator[SEP] identifier[invocation] operator[SEP] operator[SEP] Keyword[... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.