code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void close() throws IOException
{
if (!this.closed)
{
this.closed = true;
this.is.close();
this.dataIn.close();
this.is = null;
this.dataIn = null;
int typeCount = 0;
if (this.resourceTypeTable != null)
{ // fix for bug 32320
for (int i = 0; i < this.resourceTypeTable.length; i++... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
if[THIS[member[None.closed]]] begin[{]
assign[THIS[member[None.closed]], literal[true]]
THIS[member[None.is]call[None.close, parameter[]]]
... | Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[closed] operator[SEP] {
Keyword[this] operator[SEP] identifier[closed] operator[=] literal[boolean] operato... |
@SuppressWarnings("unchecked")
private <E> View createDateView(final DateProfileField field, Date currentValue, final FieldValueListener<Date> listener, ViewGroup container) {
View result = mInflater.inflate(R.layout.profileedit_field_date, container, false);
String friendlyName = mHelper.getFriendlyNameOfField(fi... | class class_name[name] begin[{]
method[createDateView, return_type[type[View]], modifier[private], parameter[field, currentValue, listener, container]] begin[{]
local_variable[type[View], result]
local_variable[type[String], friendlyName]
Cast(expression=MethodInvocation(argumen... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] operator[<] identifier[E] operator[>] identifier[View] identifier[createDateView] operator[SEP] Keyword[final] identifier[DateProfileField] identifier[field] , identifier[Date] identifier[currentValue] , Keyword[fi... |
public void createColumnsFromModel(TableModel newModel) {
if (newModel != model) {
if (model != null) {
model.removeTableModelListener(this); // Stop listening to old model.
}
newModel.addTableModelListener(this); // Start listening to new one.
... | class class_name[name] begin[{]
method[createColumnsFromModel, return_type[void], modifier[public], parameter[newModel]] begin[{]
if[binary_operation[member[.newModel], !=, member[.model]]] begin[{]
if[binary_operation[member[.model], !=, literal[null]]] begin[{]
... | Keyword[public] Keyword[void] identifier[createColumnsFromModel] operator[SEP] identifier[TableModel] identifier[newModel] operator[SEP] {
Keyword[if] operator[SEP] identifier[newModel] operator[!=] identifier[model] operator[SEP] {
Keyword[if] operator[SEP] identifier[model] operator[!=] Other[null] ... |
public <E extends Exception> void replaceAll(Try.BiFunction<? super T, ? super Integer, Integer, E> function) throws E {
List<T> keyToRemove = null;
Integer newVal = null;
for (Map.Entry<T, MutableInt> entry : this.valueMap.entrySet()) {
newVal = function.apply(entry.getKey(), ... | class class_name[name] begin[{]
method[replaceAll, return_type[void], modifier[public], parameter[function]] begin[{]
local_variable[type[List], keyToRemove]
local_variable[type[Integer], newVal]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Ass... | Keyword[public] operator[<] identifier[E] Keyword[extends] identifier[Exception] operator[>] Keyword[void] identifier[replaceAll] operator[SEP] identifier[Try] operator[SEP] identifier[BiFunction] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[super] identifier[Integer] , identifier[Intege... |
private ForeachStatement parseForeachStatement(Token token)
throws IOException {
SourceInfo info = token.getSourceInfo();
token = peek();
if (token.getID() == Token.LPAREN) {
read();
}
else {
error("foreach.lparen.expected", token);
}
... | class class_name[name] begin[{]
method[parseForeachStatement, return_type[type[ForeachStatement]], modifier[private], parameter[token]] begin[{]
local_variable[type[SourceInfo], info]
assign[member[.token], call[.peek, parameter[]]]
if[binary_operation[call[token.getID, ... | Keyword[private] identifier[ForeachStatement] identifier[parseForeachStatement] operator[SEP] identifier[Token] identifier[token] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[SourceInfo] identifier[info] operator[=] identifier[token] operator[SEP] identifier[getSourceInfo] operator[SEP] ope... |
public static CmsListInfoBean getPageInfo(CmsObject cms, CmsResource res) throws CmsException {
CmsListInfoBean result = new CmsListInfoBean();
addPageInfo(cms, res, result);
return result;
} | class class_name[name] begin[{]
method[getPageInfo, return_type[type[CmsListInfoBean]], modifier[public static], parameter[cms, res]] begin[{]
local_variable[type[CmsListInfoBean], result]
call[.addPageInfo, parameter[member[.cms], member[.res], member[.result]]]
return[member[.... | Keyword[public] Keyword[static] identifier[CmsListInfoBean] identifier[getPageInfo] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[CmsResource] identifier[res] operator[SEP] Keyword[throws] identifier[CmsException] {
identifier[CmsListInfoBean] identifier[result] operator[=] Keyword[new] ident... |
public BasicNDArrayCompressor setDefaultCompression(@NonNull String algorithm) {
algorithm = algorithm.toUpperCase();
// if (!codecs.containsKey(algorithm))
// throw new RuntimeException("Non-existent compression algorithm requested: [" + algorithm + "]");
synchronized ... | class class_name[name] begin[{]
method[setDefaultCompression, return_type[type[BasicNDArrayCompressor]], modifier[public], parameter[algorithm]] begin[{]
assign[member[.algorithm], call[algorithm.toUpperCase, parameter[]]]
SYNCHRONIZED[THIS[]] BEGIN[{]
as... | Keyword[public] identifier[BasicNDArrayCompressor] identifier[setDefaultCompression] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[algorithm] operator[SEP] {
identifier[algorithm] operator[=] identifier[algorithm] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] o... |
public Observable<ResourceListKeysInner> regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1<ServiceResponse<ResourceListKeysInner>, ResourceListKe... | class class_name[name] begin[{]
method[regenerateKeysAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, namespaceName, authorizationRuleName]] begin[{]
return[call[.regenerateKeysWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.namespaceName], me... | Keyword[public] identifier[Observable] operator[<] identifier[ResourceListKeysInner] operator[>] identifier[regenerateKeysAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[namespaceName] , identifier[String] identifier[authorizationRuleName] operator[SEP] {
K... |
protected <T> URI buidURI(Request<T> request){
URL url = null;
try {
url = api.getURL();
} catch (MalformedURLException e) {
throw new ClientException(e);
}
String path = inquirePath(request);
Map<String,String> qry = RequestUtil.resolveQueryPart(request);
Set<String> keys = qry.keySet();
Strin... | class class_name[name] begin[{]
method[buidURI, return_type[type[URI]], modifier[protected], parameter[request]] begin[{]
local_variable[type[URL], url]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=url, postfix_operators=[], prefix_operators=[... | Keyword[protected] operator[<] identifier[T] operator[>] identifier[URI] identifier[buidURI] operator[SEP] identifier[Request] operator[<] identifier[T] operator[>] identifier[request] operator[SEP] {
identifier[URL] identifier[url] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[url] ... |
public static Endpoint update(final String domainId, final String endpointId, final String endpointPassword)
throws AppPlatformException, ParseException, Exception {
return update(domainId, endpointId, endpointPassword, null, false);
} | class class_name[name] begin[{]
method[update, return_type[type[Endpoint]], modifier[public static], parameter[domainId, endpointId, endpointPassword]] begin[{]
return[call[.update, parameter[member[.domainId], member[.endpointId], member[.endpointPassword], literal[null], literal[false]]]]
end[}]
... | Keyword[public] Keyword[static] identifier[Endpoint] identifier[update] operator[SEP] Keyword[final] identifier[String] identifier[domainId] , Keyword[final] identifier[String] identifier[endpointId] , Keyword[final] identifier[String] identifier[endpointPassword] operator[SEP] Keyword[throws] identifier[AppPlatformE... |
protected Boolean _hasSideEffects(XUnaryOperation expression, ISideEffectContext context) {
if (expression.isTypeLiteral() || expression.isPackageFragment()) {
return Boolean.FALSE;
}
if (hasSideEffects(expression.getOperand(), context)) {
return true;
}
return false;
} | class class_name[name] begin[{]
method[_hasSideEffects, return_type[type[Boolean]], modifier[protected], parameter[expression, context]] begin[{]
if[binary_operation[call[expression.isTypeLiteral, parameter[]], ||, call[expression.isPackageFragment, parameter[]]]] begin[{]
return[me... | Keyword[protected] identifier[Boolean] identifier[_hasSideEffects] operator[SEP] identifier[XUnaryOperation] identifier[expression] , identifier[ISideEffectContext] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] identifier[expression] operator[SEP] identifier[isTypeLiteral] operator[SEP] operator... |
public @NotNull ParameterTypes<T> withParameterTypes(@NotNull Class<?>... parameterTypes) {
return new ParameterTypes<T>(checkNotNullOrEmpty(methodName), checkNotNull(value), parameterTypes);
} | class class_name[name] begin[{]
method[withParameterTypes, return_type[type[ParameterTypes]], modifier[public], parameter[parameterTypes]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, select... | Keyword[public] annotation[@] identifier[NotNull] identifier[ParameterTypes] operator[<] identifier[T] operator[>] identifier[withParameterTypes] operator[SEP] annotation[@] identifier[NotNull] identifier[Class] operator[<] operator[?] operator[>] operator[...] identifier[parameterTypes] operator[SEP] {
Keyword[... |
public String toTimeStr() {
if (null != this.timeZone) {
final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DatePattern.NORM_TIME_PATTERN);
simpleDateFormat.setTimeZone(this.timeZone);
return toString(simpleDateFormat);
}
return toString(DatePattern.NORM_TIME_FORMAT);
} | class class_name[name] begin[{]
method[toTimeStr, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[literal[null], !=, THIS[member[None.timeZone]]]] begin[{]
local_variable[type[SimpleDateFormat], simpleDateFormat]
call[si... | Keyword[public] identifier[String] identifier[toTimeStr] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[!=] Keyword[this] operator[SEP] identifier[timeZone] operator[SEP] {
Keyword[final] identifier[SimpleDateFormat] identifier[simpleDateFormat] operator[=] Keyword[new] i... |
public DescribeSessionsResult withSessions(Session... sessions) {
if (this.sessions == null) {
setSessions(new java.util.ArrayList<Session>(sessions.length));
}
for (Session ele : sessions) {
this.sessions.add(ele);
}
return this;
} | class class_name[name] begin[{]
method[withSessions, return_type[type[DescribeSessionsResult]], modifier[public], parameter[sessions]] begin[{]
if[binary_operation[THIS[member[None.sessions]], ==, literal[null]]] begin[{]
call[.setSessions, parameter[ClassCreator(argumen... | Keyword[public] identifier[DescribeSessionsResult] identifier[withSessions] operator[SEP] identifier[Session] operator[...] identifier[sessions] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[sessions] operator[==] Other[null] operator[SEP] {
identifier[setSessions] o... |
public static boolean addListener(String destination, RtfDestinationListener listener) {
RtfDestination dest = getDestination(destination);
if(dest != null) {
return dest.addListener(listener);
}
return false;
} | class class_name[name] begin[{]
method[addListener, return_type[type[boolean]], modifier[public static], parameter[destination, listener]] begin[{]
local_variable[type[RtfDestination], dest]
if[binary_operation[member[.dest], !=, literal[null]]] begin[{]
return[call[dest.add... | Keyword[public] Keyword[static] Keyword[boolean] identifier[addListener] operator[SEP] identifier[String] identifier[destination] , identifier[RtfDestinationListener] identifier[listener] operator[SEP] {
identifier[RtfDestination] identifier[dest] operator[=] identifier[getDestination] operator[SEP] identifier[... |
public static vpnglobal_authenticationsamlpolicy_binding[] get(nitro_service service) throws Exception{
vpnglobal_authenticationsamlpolicy_binding obj = new vpnglobal_authenticationsamlpolicy_binding();
vpnglobal_authenticationsamlpolicy_binding response[] = (vpnglobal_authenticationsamlpolicy_binding[]) obj.get_re... | class class_name[name] begin[{]
method[get, return_type[type[vpnglobal_authenticationsamlpolicy_binding]], modifier[public static], parameter[service]] begin[{]
local_variable[type[vpnglobal_authenticationsamlpolicy_binding], obj]
local_variable[type[vpnglobal_authenticationsamlpolicy_binding],... | Keyword[public] Keyword[static] identifier[vpnglobal_authenticationsamlpolicy_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[vpnglobal_authenticationsamlpolicy_binding] identifier[ob... |
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case SimpleExpressionsPackage.NUMBER_LITERAL__VALUE:
setValue((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
} | class class_name[name] begin[{]
method[eSet, return_type[void], modifier[public], parameter[featureID, newValue]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=NUMBER_LITERAL__VALUE, postfix_operators=[], prefix_operators=[], qualifier=SimpleExpressionsPackage, select... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eSet] operator[SEP] Keyword[int] identifier[featureID] , identifier[Object] identifier[newValue] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[SimpleExpressionsPa... |
public EventBatch enhanceFromMetadata(final EventBatch<AuditEvent> batch) {
for (AuditEvent event : batch) {
enhanceFromMetadata((AuditEvent)event);
}
return batch;
} | class class_name[name] begin[{]
method[enhanceFromMetadata, return_type[type[EventBatch]], modifier[public], parameter[batch]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=event, postf... | Keyword[public] identifier[EventBatch] identifier[enhanceFromMetadata] operator[SEP] Keyword[final] identifier[EventBatch] operator[<] identifier[AuditEvent] operator[>] identifier[batch] operator[SEP] {
Keyword[for] operator[SEP] identifier[AuditEvent] identifier[event] operator[:] identifier[batch] operator[S... |
public void setFragments(java.util.Collection<Fragment> fragments) {
if (fragments == null) {
this.fragments = null;
return;
}
this.fragments = new java.util.ArrayList<Fragment>(fragments);
} | class class_name[name] begin[{]
method[setFragments, return_type[void], modifier[public], parameter[fragments]] begin[{]
if[binary_operation[member[.fragments], ==, literal[null]]] begin[{]
assign[THIS[member[None.fragments]], literal[null]]
return[None]
... | Keyword[public] Keyword[void] identifier[setFragments] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[Fragment] operator[>] identifier[fragments] operator[SEP] {
Keyword[if] operator[SEP] identifier[fragments] operator[==] Other[null] ope... |
private static boolean containsCollisionFormula(TileCollision tile, CollisionCategory category)
{
final Collection<CollisionFormula> formulas = tile.getCollisionFormulas();
for (final CollisionFormula formula : category.getFormulas())
{
if (formulas.contains(formula))
... | class class_name[name] begin[{]
method[containsCollisionFormula, return_type[type[boolean]], modifier[private static], parameter[tile, category]] begin[{]
local_variable[type[Collection], formulas]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(a... | Keyword[private] Keyword[static] Keyword[boolean] identifier[containsCollisionFormula] operator[SEP] identifier[TileCollision] identifier[tile] , identifier[CollisionCategory] identifier[category] operator[SEP] {
Keyword[final] identifier[Collection] operator[<] identifier[CollisionFormula] operator[>] identifi... |
public int compareTo(WordTag wordTag) {
int first = (word != null ? word().compareTo(wordTag.word()) : 0);
if(first != 0)
return first;
else {
if (tag() == null) {
if (wordTag.tag() == null)
return 0;
else
return -1;
}
return tag().c... | class class_name[name] begin[{]
method[compareTo, return_type[type[int]], modifier[public], parameter[wordTag]] begin[{]
local_variable[type[int], first]
if[binary_operation[member[.first], !=, literal[0]]] begin[{]
return[member[.first]]
else begin[{]
if... | Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[WordTag] identifier[wordTag] operator[SEP] {
Keyword[int] identifier[first] operator[=] operator[SEP] identifier[word] operator[!=] Other[null] operator[?] identifier[word] operator[SEP] operator[SEP] operator[SEP] identifier[compareTo] ... |
public void setAreas(final List<Section> AREAS) {
areas.setAll(AREAS);
Collections.sort(areas, new SectionComparator());
fireUpdateEvent(SECTION_EVENT);
} | class class_name[name] begin[{]
method[setAreas, return_type[void], modifier[public], parameter[AREAS]] begin[{]
call[areas.setAll, parameter[member[.AREAS]]]
call[Collections.sort, parameter[member[.areas], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, ... | Keyword[public] Keyword[void] identifier[setAreas] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Section] operator[>] identifier[AREAS] operator[SEP] {
identifier[areas] operator[SEP] identifier[setAll] operator[SEP] identifier[AREAS] operator[SEP] operator[SEP] identifier[Collections] ope... |
@SuppressWarnings({ "rawtypes", "unchecked" })
public Future<Void> close() {
log.info("Shutting down.");
final Future<Void> closeFuture;
if (this.isClosed.compareAndSet(false, true)) {
// Since we're (maybe) going to clobber the main event loop group, we should have this promis... | class class_name[name] begin[{]
method[close, return_type[type[Future]], modifier[public], parameter[]] begin[{]
call[log.info, parameter[literal["Shutting down."]]]
local_variable[type[Future], closeFuture]
if[THIS[member[None.isClosed]call[None.compareAndSet, parameter... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String]
} operator[SEP] Keyword[public] identifier[Future] operator[<] identifier[Void] operator[>] identifier[close] operator[SEP] operator[SEP] {
identifier[log] operator[SEP] identifier[info] operator[SEP] literal[... |
private void parseORBConnectionConfig(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
// parse the orb connection config attributes.
EnumSet<Attribute> attributes = EnumSet.of(Attribute.ORB_CONN_RETRIES, Attribute.ORB_CONN_RETRY_INTERVAL,
Attribute.ORB_CONN_CL... | class class_name[name] begin[{]
method[parseORBConnectionConfig, return_type[void], modifier[private], parameter[reader, node]] begin[{]
local_variable[type[EnumSet], attributes]
THIS[call[None.parseAttributes, parameter[member[.reader], member[.node], member[.attributes], literal[null]... | Keyword[private] Keyword[void] identifier[parseORBConnectionConfig] operator[SEP] identifier[XMLExtendedStreamReader] identifier[reader] , identifier[ModelNode] identifier[node] operator[SEP] Keyword[throws] identifier[XMLStreamException] {
identifier[EnumSet] operator[<] identifier[Attribute] operator[>] ident... |
private boolean signatureMoreSpecific(List<Type> actuals, Env<AttrContext> env, Type site, Symbol m1, Symbol m2, boolean allowBoxing, boolean useVarargs) {
noteWarner.clear();
int maxLength = Math.max(
Math.max(m1.type.getParameterTypes().length(), actuals.length()),
... | class class_name[name] begin[{]
method[signatureMoreSpecific, return_type[type[boolean]], modifier[private], parameter[actuals, env, site, m1, m2, allowBoxing, useVarargs]] begin[{]
call[noteWarner.clear, parameter[]]
local_variable[type[int], maxLength]
local_variable[type[Meth... | Keyword[private] Keyword[boolean] identifier[signatureMoreSpecific] operator[SEP] identifier[List] operator[<] identifier[Type] operator[>] identifier[actuals] , identifier[Env] operator[<] identifier[AttrContext] operator[>] identifier[env] , identifier[Type] identifier[site] , identifier[Symbol] identifier[m1] , ... |
public void unlock() throws IOException {
if (fileLock != null) {
try {
fileLock.release();
} catch (ClosedChannelException e) {
}
fileLock = null;
}
} | class class_name[name] begin[{]
method[unlock, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.fileLock], !=, literal[null]]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=release, postfix_ope... | Keyword[public] Keyword[void] identifier[unlock] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[fileLock] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
identifier[fileLock] operator[SEP] identifier[release] operator[S... |
protected void appendSummarySize(StringBuilder buffer, String fieldName, int size) {
buffer.append(sizeStartText);
buffer.append(size);
buffer.append(sizeEndText);
} | class class_name[name] begin[{]
method[appendSummarySize, return_type[void], modifier[protected], parameter[buffer, fieldName, size]] begin[{]
call[buffer.append, parameter[member[.sizeStartText]]]
call[buffer.append, parameter[member[.size]]]
call[buffer.append,... | Keyword[protected] Keyword[void] identifier[appendSummarySize] operator[SEP] identifier[StringBuilder] identifier[buffer] , identifier[String] identifier[fieldName] , Keyword[int] identifier[size] operator[SEP] {
identifier[buffer] operator[SEP] identifier[append] operator[SEP] identifier[sizeStartText] operat... |
public Object invokeGetterMethodOnTarget( String javaPropertyName,
Object target )
throws NoSuchMethodException, SecurityException, IllegalArgumentException, IllegalAccessException,
InvocationTargetException {
String[] methodNamesArray = findMethodNa... | class class_name[name] begin[{]
method[invokeGetterMethodOnTarget, return_type[type[Object]], modifier[public], parameter[javaPropertyName, target]] begin[{]
local_variable[type[String], methodNamesArray]
if[binary_operation[member[methodNamesArray.length], <=, literal[0]]] begin[{]
... | Keyword[public] identifier[Object] identifier[invokeGetterMethodOnTarget] operator[SEP] identifier[String] identifier[javaPropertyName] , identifier[Object] identifier[target] operator[SEP] Keyword[throws] identifier[NoSuchMethodException] , identifier[SecurityException] , identifier[IllegalArgumentException] , ide... |
@Override
public Long ssAdd(byte[] key, byte[] field, byte[] name, byte[]... values) {
try {
if (isPipelined()) {
pipeline(new JedisResult(pipeline.ssadd(key, field, name, values)));
return null;
}
return this.client.ssadd(key, field, name... | class class_name[name] begin[{]
method[ssAdd, return_type[type[Long]], modifier[public], parameter[key, field, name, values]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isPipelined, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_a... | annotation[@] identifier[Override] Keyword[public] identifier[Long] identifier[ssAdd] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[key] , Keyword[byte] operator[SEP] operator[SEP] identifier[field] , Keyword[byte] operator[SEP] operator[SEP] identifier[name] , Keyword[byte] operator[SEP] operat... |
private void updateLocalCache(Object key, Object value) {
localCache.compute(key, (k, v) -> {
if (v instanceof Number && value instanceof Number) {
return Math.max(((Number) v).longValue(), ((Number) value).longValue());
} else {
return value;
}
});
} | class class_name[name] begin[{]
method[updateLocalCache, return_type[void], modifier[private], parameter[key, value]] begin[{]
call[localCache.compute, parameter[member[.key], LambdaExpression(body=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=v... | Keyword[private] Keyword[void] identifier[updateLocalCache] operator[SEP] identifier[Object] identifier[key] , identifier[Object] identifier[value] operator[SEP] {
identifier[localCache] operator[SEP] identifier[compute] operator[SEP] identifier[key] , operator[SEP] identifier[k] , identifier[v] operator[SEP]... |
public final CountedCompleter<?> firstComplete() {
for (int c;;) {
if ((c = pending) == 0)
return this;
else if (U.compareAndSwapInt(this, PENDING, c, c - 1))
return null;
}
} | class class_name[name] begin[{]
method[firstComplete, return_type[type[CountedCompleter]], modifier[final public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=c, postfix_opera... | Keyword[public] Keyword[final] identifier[CountedCompleter] operator[<] operator[?] operator[>] identifier[firstComplete] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[c] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[c... |
@Nullable
private static String _unifySinglePart (@Nonnull final String sPart, @Nonnull final Locale aSortLocale)
{
// empty name?
String s = sPart.trim ();
final int nLength = s.length ();
if (nLength == 0)
return null;
// all upper case name?
if (nLength == 1)
return s.toUpper... | class class_name[name] begin[{]
method[_unifySinglePart, return_type[type[String]], modifier[private static], parameter[sPart, aSortLocale]] begin[{]
local_variable[type[String], s]
local_variable[type[int], nLength]
if[binary_operation[member[.nLength], ==, literal[0]]] begin[{... | annotation[@] identifier[Nullable] Keyword[private] Keyword[static] identifier[String] identifier[_unifySinglePart] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[sPart] , annotation[@] identifier[Nonnull] Keyword[final] identifier[Locale] identifier[aSortLocale] operator[... |
private void notifyHandlers(ApiUser apiUser) {
for(ServerUserHandlerClass handler : serverUserEventHandler) {
Object userAgent = checkUserAgent(handler, apiUser);
ReflectMethodUtil.invokeHandleMethod(
handler.getHandleMethod(),
handler.newInstance... | class class_name[name] begin[{]
method[notifyHandlers, return_type[void], modifier[private], parameter[apiUser]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argumen... | Keyword[private] Keyword[void] identifier[notifyHandlers] operator[SEP] identifier[ApiUser] identifier[apiUser] operator[SEP] {
Keyword[for] operator[SEP] identifier[ServerUserHandlerClass] identifier[handler] operator[:] identifier[serverUserEventHandler] operator[SEP] {
identifier[Object] identifie... |
@XmlElementDecl(namespace = "http://www.ibm.com/websphere/wim", name = "carLicense")
public JAXBElement<String> createCarLicense(String value) {
return new JAXBElement<String>(_CarLicense_QNAME, String.class, null, value);
} | class class_name[name] begin[{]
method[createCarLicense, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_CarLicense_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_ope... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[String] operator[>] identifier[createCarLicense] operator[SEP] identifier[String] identifi... |
<T> void findFlowDefinition(@Observes ProcessProducer<T, Flow> processProducer)
{
if (processProducer.getAnnotatedMember().isAnnotationPresent(FlowDefinition.class))
{
flowProducers.add(processProducer.getProducer());
}
} | class class_name[name] begin[{]
method[findFlowDefinition, return_type[void], modifier[default], parameter[processProducer]] begin[{]
if[call[processProducer.getAnnotatedMember, parameter[]]] begin[{]
call[flowProducers.add, parameter[call[processProducer.getProducer, pa... | operator[<] identifier[T] operator[>] Keyword[void] identifier[findFlowDefinition] operator[SEP] annotation[@] identifier[Observes] identifier[ProcessProducer] operator[<] identifier[T] , identifier[Flow] operator[>] identifier[processProducer] operator[SEP] {
Keyword[if] operator[SEP] identifier[processProduce... |
public static PolygonOptions createPolygonOptions(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) {
PolygonOptions polygonOptions = new PolygonOptions();
setFeatureStyle(polygonOptions, featureStyleExtension, featureRow, density);
return polygonOptions;
} | class class_name[name] begin[{]
method[createPolygonOptions, return_type[type[PolygonOptions]], modifier[public static], parameter[featureStyleExtension, featureRow, density]] begin[{]
local_variable[type[PolygonOptions], polygonOptions]
call[.setFeatureStyle, parameter[member[.polygonO... | Keyword[public] Keyword[static] identifier[PolygonOptions] identifier[createPolygonOptions] operator[SEP] identifier[FeatureStyleExtension] identifier[featureStyleExtension] , identifier[FeatureRow] identifier[featureRow] , Keyword[float] identifier[density] operator[SEP] {
identifier[PolygonOptions] identifie... |
private List<String> loadRenameFile(URL url) throws IOException {
List<String> lines = new ArrayList<String>();
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), Charset.forName("UTF-8")));
try {
String line;
while ((line = reader.readLine... | class class_name[name] begin[{]
method[loadRenameFile, return_type[type[List]], modifier[private], parameter[url]] begin[{]
local_variable[type[List], lines]
local_variable[type[BufferedReader], reader]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDe... | Keyword[private] identifier[List] operator[<] identifier[String] operator[>] identifier[loadRenameFile] operator[SEP] identifier[URL] identifier[url] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[List] operator[<] identifier[String] operator[>] identifier[lines] operator[=] Keyword[new] iden... |
public void marshall(AggregatedSourceStatus aggregatedSourceStatus, ProtocolMarshaller protocolMarshaller) {
if (aggregatedSourceStatus == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(aggregatedSou... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[aggregatedSourceStatus, protocolMarshaller]] begin[{]
if[binary_operation[member[.aggregatedSourceStatus], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[L... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[AggregatedSourceStatus] identifier[aggregatedSourceStatus] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[aggregatedSourceStatus] operator[==] Other[null] operator[SE... |
private <T> T processFunction(SplitFunction<T> function) {
synchronized (splits) {
if (splits.isEmpty()) {
return null;
}
for (Split split : splits) {
function.evaluate(split);
}
return function.result();
}
} | class class_name[name] begin[{]
method[processFunction, return_type[type[T]], modifier[private], parameter[function]] begin[{]
SYNCHRONIZED[member[.splits]] BEGIN[{]
if[call[splits.isEmpty, parameter[]]] begin[{]
return[literal[null]]
else beg... | Keyword[private] operator[<] identifier[T] operator[>] identifier[T] identifier[processFunction] operator[SEP] identifier[SplitFunction] operator[<] identifier[T] operator[>] identifier[function] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[splits] operator[SEP] {
Keyword[if] operato... |
private List<Integer> extractRgroups(String data){
Pattern pattern = Pattern.compile("R[1-9]\\d*");
Matcher matcher = pattern.matcher(data);
List<Integer> listValues = new ArrayList<Integer>();
while(matcher.find()){
listValues.add(Integer.parseInt(matcher.group().split("R")[1]));
}
re... | class class_name[name] begin[{]
method[extractRgroups, return_type[type[List]], modifier[private], parameter[data]] begin[{]
local_variable[type[Pattern], pattern]
local_variable[type[Matcher], matcher]
local_variable[type[List], listValues]
while[call[matcher.find, para... | Keyword[private] identifier[List] operator[<] identifier[Integer] operator[>] identifier[extractRgroups] operator[SEP] identifier[String] identifier[data] operator[SEP] {
identifier[Pattern] identifier[pattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] literal[String] operat... |
public String getProperty(String strProperty)
{
String strValue = null;
// Add this code if Task sessions need local properties
if (m_properties != null)
{ // Try local properties
if (m_properties.get(strProperty) != null)
return m_properties.get(strProperty).t... | class class_name[name] begin[{]
method[getProperty, return_type[type[String]], modifier[public], parameter[strProperty]] begin[{]
local_variable[type[String], strValue]
if[binary_operation[member[.m_properties], !=, literal[null]]] begin[{]
if[binary_operation[ca... | Keyword[public] identifier[String] identifier[getProperty] operator[SEP] identifier[String] identifier[strProperty] operator[SEP] {
identifier[String] identifier[strValue] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[m_properties] operator[!=] Other[null] operator[SEP] {
... |
public static boolean removeHandle(VirtualFile owner, Closeable handle) {
RegistryEntry entry = getEntry(owner);
return entry.handles.remove(handle);
} | class class_name[name] begin[{]
method[removeHandle, return_type[type[boolean]], modifier[public static], parameter[owner, handle]] begin[{]
local_variable[type[RegistryEntry], entry]
return[call[entry.handles.remove, parameter[member[.handle]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[removeHandle] operator[SEP] identifier[VirtualFile] identifier[owner] , identifier[Closeable] identifier[handle] operator[SEP] {
identifier[RegistryEntry] identifier[entry] operator[=] identifier[getEntry] operator[SEP] identifier[owner] operator[SEP] ... |
public static boolean hasAnnotation(Tree tree, String annotationClass, VisitorState state) {
Symbol sym = getDeclaredSymbol(tree);
return hasAnnotation(sym, annotationClass, state);
} | class class_name[name] begin[{]
method[hasAnnotation, return_type[type[boolean]], modifier[public static], parameter[tree, annotationClass, state]] begin[{]
local_variable[type[Symbol], sym]
return[call[.hasAnnotation, parameter[member[.sym], member[.annotationClass], member[.state]]]]
end[... | Keyword[public] Keyword[static] Keyword[boolean] identifier[hasAnnotation] operator[SEP] identifier[Tree] identifier[tree] , identifier[String] identifier[annotationClass] , identifier[VisitorState] identifier[state] operator[SEP] {
identifier[Symbol] identifier[sym] operator[=] identifier[getDeclaredSymbol] o... |
void makePackageDoc(PackageSymbol pack, TreePath treePath) {
PackageDocImpl result = packageMap.get(pack);
if (result != null) {
if (treePath != null) result.setTreePath(treePath);
} else {
result = new PackageDocImpl(this, pack, treePath);
packageMap.put(pack... | class class_name[name] begin[{]
method[makePackageDoc, return_type[void], modifier[default], parameter[pack, treePath]] begin[{]
local_variable[type[PackageDocImpl], result]
if[binary_operation[member[.result], !=, literal[null]]] begin[{]
if[binary_operation[mem... | Keyword[void] identifier[makePackageDoc] operator[SEP] identifier[PackageSymbol] identifier[pack] , identifier[TreePath] identifier[treePath] operator[SEP] {
identifier[PackageDocImpl] identifier[result] operator[=] identifier[packageMap] operator[SEP] identifier[get] operator[SEP] identifier[pack] operator[SEP... |
@Override
public String getParameter(String name) {
String value = super.getParameter(name);
if (value == null) {
value = parameters.get(name);
}
return value;
} | class class_name[name] begin[{]
method[getParameter, return_type[type[String]], modifier[public], parameter[name]] begin[{]
local_variable[type[String], value]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
assign[member[.value], call[parameters... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getParameter] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[String] identifier[value] operator[=] Keyword[super] operator[SEP] identifier[getParameter] operator[SEP] identifier[name] operator[SEP] oper... |
public static boolean gradient( FunctionNtoS func , FunctionNtoN gradient ,
double param[] , double tol )
{
return gradient(func, gradient, param, tol, Math.sqrt(UtilEjml.EPS));
} | class class_name[name] begin[{]
method[gradient, return_type[type[boolean]], modifier[public static], parameter[func, gradient, param, tol]] begin[{]
return[call[.gradient, parameter[member[.func], member[.gradient], member[.param], member[.tol], call[Math.sqrt, parameter[member[UtilEjml.EPS]]]]]]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[gradient] operator[SEP] identifier[FunctionNtoS] identifier[func] , identifier[FunctionNtoN] identifier[gradient] , Keyword[double] identifier[param] operator[SEP] operator[SEP] , Keyword[double] identifier[tol] operator[SEP] {
Keyword[return] identi... |
public boolean enterSipAppHa(boolean startCacheActivity) {
if(logger.isDebugEnabled()) {
logger.debug("enterSipAppHa " + getName());
}
boolean batchStarted = false;
// FIXME: distributable not supported
// if(getDistributable() && hasDistributableManager) {
// batchStarted = startBatchTransaction();
/... | class class_name[name] begin[{]
method[enterSipAppHa, return_type[type[boolean]], modifier[public], parameter[startCacheActivity]] begin[{]
if[call[logger.isDebugEnabled, parameter[]]] begin[{]
call[logger.debug, parameter[binary_operation[literal["enterSipAppHa "], +, c... | Keyword[public] Keyword[boolean] identifier[enterSipAppHa] operator[SEP] Keyword[boolean] identifier[startCacheActivity] operator[SEP] {
Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[logger] operator[SEP] id... |
private boolean isRecent(ByteBuffer slabId) {
UUID uuid = TimeUUIDSerializer.get().fromByteBuffer(slabId.duplicate());
long age = System.currentTimeMillis() - TimeUUIDs.getTimeMillis(uuid);
return age <= Constants.OPEN_SLAB_MARKER_TTL.toMillis();
} | class class_name[name] begin[{]
method[isRecent, return_type[type[boolean]], modifier[private], parameter[slabId]] begin[{]
local_variable[type[UUID], uuid]
local_variable[type[long], age]
return[binary_operation[member[.age], <=, call[Constants.OPEN_SLAB_MARKER_TTL.toMillis, parameter[... | Keyword[private] Keyword[boolean] identifier[isRecent] operator[SEP] identifier[ByteBuffer] identifier[slabId] operator[SEP] {
identifier[UUID] identifier[uuid] operator[=] identifier[TimeUUIDSerializer] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[fromByteBuffer] operator[S... |
public ServiceFuture<AssetInner> createOrUpdateAsync(String resourceGroupName, String accountName, String assetName, AssetInner parameters, final ServiceCallback<AssetInner> serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, assetName, par... | class class_name[name] begin[{]
method[createOrUpdateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, accountName, assetName, parameters, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.createOrUpdateWithServiceResponseAsync, par... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[AssetInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[accountName] , identifier[String] identifier[assetName] , identifier[AssetInner] identifier[parameter... |
private static void registerSlotFilled(
UpdateSpec updateSpec, QueueSettings queueSettings, Slot slot, Object value) {
slot.fill(value);
updateSpec.getNonTransactionalGroup().includeSlot(slot);
Task task = new HandleSlotFilledTask(slot.getKey(), queueSettings);
updateSpec.getFinalTransaction().reg... | class class_name[name] begin[{]
method[registerSlotFilled, return_type[void], modifier[private static], parameter[updateSpec, queueSettings, slot, value]] begin[{]
call[slot.fill, parameter[member[.value]]]
call[updateSpec.getNonTransactionalGroup, parameter[]]
local_var... | Keyword[private] Keyword[static] Keyword[void] identifier[registerSlotFilled] operator[SEP] identifier[UpdateSpec] identifier[updateSpec] , identifier[QueueSettings] identifier[queueSettings] , identifier[Slot] identifier[slot] , identifier[Object] identifier[value] operator[SEP] {
identifier[slot] operator[S... |
@Programmatic
public List<DocumentTemplate> findByApplicableToAtPathAndCurrent(final String atPath) {
final LocalDate now = clockService.now();
return repositoryService.allMatches(
new QueryDefault<>(DocumentTemplate.class,
"findByApplicableToAtPathAndCurrent"... | class class_name[name] begin[{]
method[findByApplicableToAtPathAndCurrent, return_type[type[List]], modifier[public], parameter[atPath]] begin[{]
local_variable[type[LocalDate], now]
return[call[repositoryService.allMatches, parameter[ClassCreator(arguments=[ClassReference(postfix_operators=[],... | annotation[@] identifier[Programmatic] Keyword[public] identifier[List] operator[<] identifier[DocumentTemplate] operator[>] identifier[findByApplicableToAtPathAndCurrent] operator[SEP] Keyword[final] identifier[String] identifier[atPath] operator[SEP] {
Keyword[final] identifier[LocalDate] identifier[now] opera... |
public void run(IAction action) {
// Ignore non structured selections
if (!(this.selection instanceof IStructuredSelection))
return;
// operate on the DFS asynchronously to prevent blocking the main UI
final IStructuredSelection ss = (IStructuredSelection) selection;
final String actionId = ... | class class_name[name] begin[{]
method[run, return_type[void], modifier[public], parameter[action]] begin[{]
if[binary_operation[THIS[member[None.selection]], instanceof, type[IStructuredSelection]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[ISt... | Keyword[public] Keyword[void] identifier[run] operator[SEP] identifier[IAction] identifier[action] operator[SEP] {
Keyword[if] operator[SEP] operator[!] operator[SEP] Keyword[this] operator[SEP] identifier[selection] Keyword[instanceof] identifier[IStructuredSelection] operator[SEP] operator[SEP] Keyword[return]... |
@Override
public List<CPDefinitionLink> findByCP_T(long CProductId, String type) {
return findByCP_T(CProductId, type, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, null);
} | class class_name[name] begin[{]
method[findByCP_T, return_type[type[List]], modifier[public], parameter[CProductId, type]] begin[{]
return[call[.findByCP_T, parameter[member[.CProductId], member[.type], member[QueryUtil.ALL_POS], member[QueryUtil.ALL_POS], literal[null]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CPDefinitionLink] operator[>] identifier[findByCP_T] operator[SEP] Keyword[long] identifier[CProductId] , identifier[String] identifier[type] operator[SEP] {
Keyword[return] identifier[findByCP_T] operator[SEP] identifier... |
public static void bufferedandWithContainer(
final BitmapStorage32 container, final int bufSize,
final EWAHCompressedBitmap32... bitmaps) {
java.util.LinkedList<IteratingBufferedRunningLengthWord32> al = new java.util.LinkedList<IteratingBufferedRunningLengthWord32>();
for (EWAH... | class class_name[name] begin[{]
method[bufferedandWithContainer, return_type[void], modifier[public static], parameter[container, bufSize, bitmaps]] begin[{]
local_variable[type[java], al]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(a... | Keyword[public] Keyword[static] Keyword[void] identifier[bufferedandWithContainer] operator[SEP] Keyword[final] identifier[BitmapStorage32] identifier[container] , Keyword[final] Keyword[int] identifier[bufSize] , Keyword[final] identifier[EWAHCompressedBitmap32] operator[...] identifier[bitmaps] operator[SEP] {
... |
private boolean isNonPrivateLogField(@SlashedClassName String fieldClsName, String fieldName, String fieldSig) {
String fieldType = SignatureUtils.trimSignature(fieldSig);
if (!SLF4J_LOGGER.equals(fieldType) && !COMMONS_LOGGER.equals(fieldType) && !LOG4J_LOGGER.equals(fieldType) && !LOG4J2_LOGGER.equal... | class class_name[name] begin[{]
method[isNonPrivateLogField, return_type[type[boolean]], modifier[private], parameter[fieldClsName, fieldName, fieldSig]] begin[{]
local_variable[type[String], fieldType]
if[binary_operation[binary_operation[binary_operation[call[SLF4J_LOGGER.equals, para... | Keyword[private] Keyword[boolean] identifier[isNonPrivateLogField] operator[SEP] annotation[@] identifier[SlashedClassName] identifier[String] identifier[fieldClsName] , identifier[String] identifier[fieldName] , identifier[String] identifier[fieldSig] operator[SEP] {
identifier[String] identifier[fieldType] o... |
@Override
public void processElement2(StreamRecord<T2> record) throws Exception {
processElement(record, rightBuffer, leftBuffer, -upperBound, -lowerBound, false);
} | class class_name[name] begin[{]
method[processElement2, return_type[void], modifier[public], parameter[record]] begin[{]
call[.processElement, parameter[member[.record], member[.rightBuffer], member[.leftBuffer], member[.upperBound], member[.lowerBound], literal[false]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[processElement2] operator[SEP] identifier[StreamRecord] operator[<] identifier[T2] operator[>] identifier[record] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[processElement] operator[SEP] identifier[record] , identi... |
public void init(final SerializedDataTypeRegistry typeRegistry, final DeserializerRegistry deserRegistry,
final SerializerRegistry serRegistry) {
if (initialized) {
throw new IllegalStateException("Instance already initialized - Don't call the init methods more than once");
}... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[typeRegistry, deserRegistry, serRegistry]] begin[{]
if[member[.initialized]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qual... | Keyword[public] Keyword[void] identifier[init] operator[SEP] Keyword[final] identifier[SerializedDataTypeRegistry] identifier[typeRegistry] , Keyword[final] identifier[DeserializerRegistry] identifier[deserRegistry] , Keyword[final] identifier[SerializerRegistry] identifier[serRegistry] operator[SEP] {
Keyword... |
public void processProjectProperties(List<Row> rows, Integer projectID)
{
if (rows.isEmpty() == false)
{
Row row = rows.get(0);
ProjectProperties properties = m_project.getProjectProperties();
properties.setCreationDate(row.getDate("create_date"));
properties.setFinish... | class class_name[name] begin[{]
method[processProjectProperties, return_type[void], modifier[public], parameter[rows, projectID]] begin[{]
if[binary_operation[call[rows.isEmpty, parameter[]], ==, literal[false]]] begin[{]
local_variable[type[Row], row]
local_variable[typ... | Keyword[public] Keyword[void] identifier[processProjectProperties] operator[SEP] identifier[List] operator[<] identifier[Row] operator[>] identifier[rows] , identifier[Integer] identifier[projectID] operator[SEP] {
Keyword[if] operator[SEP] identifier[rows] operator[SEP] identifier[isEmpty] operator[SEP] operat... |
public static Money of(BigDecimal number, CurrencyUnit currency, MonetaryContext monetaryContext) {
return new Money(number, currency, monetaryContext);
} | class class_name[name] begin[{]
method[of, return_type[type[Money]], modifier[public static], parameter[number, currency, monetaryContext]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=number, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member... | Keyword[public] Keyword[static] identifier[Money] identifier[of] operator[SEP] identifier[BigDecimal] identifier[number] , identifier[CurrencyUnit] identifier[currency] , identifier[MonetaryContext] identifier[monetaryContext] operator[SEP] {
Keyword[return] Keyword[new] identifier[Money] operator[SEP] identif... |
protected void sendInternalServerError(HttpServletRequest request, HttpServletResponse response, Throwable cause) throws IOException {
if (cause != null) {
processServerErrorCallback(request, response, cause);
request.setAttribute(ERROR_EXCEPTION_ATTRIBUTE_KEY, cause); // for something o... | class class_name[name] begin[{]
method[sendInternalServerError, return_type[void], modifier[protected], parameter[request, response, cause]] begin[{]
if[binary_operation[member[.cause], !=, literal[null]]] begin[{]
call[.processServerErrorCallback, parameter[member[.requ... | Keyword[protected] Keyword[void] identifier[sendInternalServerError] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , identifier[Throwable] identifier[cause] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP... |
public <OUT> DataStreamSource<OUT> fromParallelCollection(SplittableIterator<OUT> iterator, Class<OUT> type) {
return fromParallelCollection(iterator, TypeExtractor.getForClass(type));
} | class class_name[name] begin[{]
method[fromParallelCollection, return_type[type[DataStreamSource]], modifier[public], parameter[iterator, type]] begin[{]
return[call[.fromParallelCollection, parameter[member[.iterator], call[TypeExtractor.getForClass, parameter[member[.type]]]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[OUT] operator[>] identifier[DataStreamSource] operator[<] identifier[OUT] operator[>] identifier[fromParallelCollection] operator[SEP] identifier[SplittableIterator] operator[<] identifier[OUT] operator[>] identifier[iterator] , identifier[Class] operator[<] identifier[OUT] opera... |
public OkHttpClient createClient(boolean loggingEnabled, boolean tls12Enforced, int connectTimeout, int readTimeout, int writeTimeout) {
return modifyClient(new OkHttpClient(), loggingEnabled, tls12Enforced, connectTimeout, readTimeout, writeTimeout);
} | class class_name[name] begin[{]
method[createClient, return_type[type[OkHttpClient]], modifier[public], parameter[loggingEnabled, tls12Enforced, connectTimeout, readTimeout, writeTimeout]] begin[{]
return[call[.modifyClient, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=Non... | Keyword[public] identifier[OkHttpClient] identifier[createClient] operator[SEP] Keyword[boolean] identifier[loggingEnabled] , Keyword[boolean] identifier[tls12Enforced] , Keyword[int] identifier[connectTimeout] , Keyword[int] identifier[readTimeout] , Keyword[int] identifier[writeTimeout] operator[SEP] {
Key... |
public static void main(String[] args)
{
final int argsLength = args.length;
if (argsLength < 1)
{
usage();
System.exit(OTHER);
}
String rarFile = "";
String[] cps = null;
boolean stdout = false;
String reportFile = "";
for (int i = 0; i < args... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
local_variable[type[int], argsLength]
if[binary_operation[member[.argsLength], <, literal[1]]] begin[{]
call[.usage, parameter[]]
... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
Keyword[final] Keyword[int] identifier[argsLength] operator[=] identifier[args] operator[SEP] identifier[length] operator[SEP] Keyword[if] operator[SEP] ide... |
public void fill_1(byte[] v, int byteoff, int nbits, int bitoff) {
if (nbits < 0) throw new NegativeArraySizeException("nbits < 0: " + nbits);
if (byteoff < 0) throw new IndexOutOfBoundsException("byteoff < 0: "+ byteoff);
if (bitoff < 0) throw new IndexOutOfBoundsException("bitoff < 0: " + bitoff);
... | class class_name[name] begin[{]
method[fill_1, return_type[void], modifier[public], parameter[v, byteoff, nbits, bitoff]] begin[{]
if[binary_operation[member[.nbits], <, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[]... | Keyword[public] Keyword[void] identifier[fill_1] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[v] , Keyword[int] identifier[byteoff] , Keyword[int] identifier[nbits] , Keyword[int] identifier[bitoff] operator[SEP] {
Keyword[if] operator[SEP] identifier[nbits] operator[<] Other[0] operator... |
@Override
public Message<?> postReceive(Message<?> message, MessageChannel channel) {
if (emptyMessage(message)) {
return message;
}
MessageHeaderAccessor headers = mutableHeaderAccessor(message);
TraceContextOrSamplingFlags extracted = this.extractor.extract(headers);
Span span = this.threadLocalSpan.nex... | class class_name[name] begin[{]
method[postReceive, return_type[type[Message]], modifier[public], parameter[message, channel]] begin[{]
if[call[.emptyMessage, parameter[member[.message]]]] begin[{]
return[member[.message]]
else begin[{]
None
end[}]
local_vari... | annotation[@] identifier[Override] Keyword[public] identifier[Message] operator[<] operator[?] operator[>] identifier[postReceive] operator[SEP] identifier[Message] operator[<] operator[?] operator[>] identifier[message] , identifier[MessageChannel] identifier[channel] operator[SEP] {
Keyword[if] operator[SEP] ... |
public Offering getOffering(String offeringName) {
BasicDBObject query = new BasicDBObject("offering_name", offeringName);
FindIterable<Document> cursor = this.offeringsCollection.find(query);
return Offering.fromDB(cursor.first());
} | class class_name[name] begin[{]
method[getOffering, return_type[type[Offering]], modifier[public], parameter[offeringName]] begin[{]
local_variable[type[BasicDBObject], query]
local_variable[type[FindIterable], cursor]
return[call[Offering.fromDB, parameter[call[cursor.first, parameter[... | Keyword[public] identifier[Offering] identifier[getOffering] operator[SEP] identifier[String] identifier[offeringName] operator[SEP] {
identifier[BasicDBObject] identifier[query] operator[=] Keyword[new] identifier[BasicDBObject] operator[SEP] literal[String] , identifier[offeringName] operator[SEP] operator[SE... |
public void unsubscribe( String clientID , String subscriptionName ) throws JMSException
{
String subscriberID = clientID+"-"+subscriptionName;
subscriptionsLock.writeLock().lock();
try
{
LocalTopicSubscription subscription = subscriptionMap.get(subscriberID);
if (subscripti... | class class_name[name] begin[{]
method[unsubscribe, return_type[void], modifier[public], parameter[clientID, subscriptionName]] begin[{]
local_variable[type[String], subscriberID]
call[subscriptionsLock.writeLock, parameter[]]
TryStatement(block=[LocalVariableDeclaration(annotat... | Keyword[public] Keyword[void] identifier[unsubscribe] operator[SEP] identifier[String] identifier[clientID] , identifier[String] identifier[subscriptionName] operator[SEP] Keyword[throws] identifier[JMSException] {
identifier[String] identifier[subscriberID] operator[=] identifier[clientID] operator[+] literal[... |
private CheckpointData queryCheckpointData(Object key) {
logger.entering(CLASSNAME, "queryCheckpointData", new Object[] {key, SELECT_CHECKPOINTDATA});
Connection conn = null;
PreparedStatement statement = null;
ResultSet rs = null;
ObjectInputStream objectIn = null;
CheckpointData data = null;
try ... | class class_name[name] begin[{]
method[queryCheckpointData, return_type[type[CheckpointData]], modifier[private], parameter[key]] begin[{]
call[logger.entering, parameter[member[.CLASSNAME], literal["queryCheckpointData"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializer... | Keyword[private] identifier[CheckpointData] identifier[queryCheckpointData] operator[SEP] identifier[Object] identifier[key] operator[SEP] {
identifier[logger] operator[SEP] identifier[entering] operator[SEP] identifier[CLASSNAME] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] ... |
@Override
public JarEntryDirectoryImpl getOrCreateDirectory(String relativeName) {
IResource resource = _resources.get(relativeName);
if(resource instanceof IFile){
throw new UnsupportedOperationException("The requested resource " + relativeName + " is now being accessed as a directory, but was previous... | class class_name[name] begin[{]
method[getOrCreateDirectory, return_type[type[JarEntryDirectoryImpl]], modifier[public], parameter[relativeName]] begin[{]
local_variable[type[IResource], resource]
if[binary_operation[member[.resource], instanceof, type[IFile]]] begin[{]
Thro... | annotation[@] identifier[Override] Keyword[public] identifier[JarEntryDirectoryImpl] identifier[getOrCreateDirectory] operator[SEP] identifier[String] identifier[relativeName] operator[SEP] {
identifier[IResource] identifier[resource] operator[=] identifier[_resources] operator[SEP] identifier[get] operator[SEP]... |
private void initModeSwitch(final EditMode current) {
FormLayout modes = new FormLayout();
modes.setHeight("100%");
modes.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
m_modeSelect = new ComboBox();
m_modeSelect.setCaption(m_messages.key(Messages.GUI_VIEW_SWITCHER_LABEL_... | class class_name[name] begin[{]
method[initModeSwitch, return_type[void], modifier[private], parameter[current]] begin[{]
local_variable[type[FormLayout], modes]
call[modes.setHeight, parameter[literal["100%"]]]
call[modes.setDefaultComponentAlignment, parameter[member[A... | Keyword[private] Keyword[void] identifier[initModeSwitch] operator[SEP] Keyword[final] identifier[EditMode] identifier[current] operator[SEP] {
identifier[FormLayout] identifier[modes] operator[=] Keyword[new] identifier[FormLayout] operator[SEP] operator[SEP] operator[SEP] identifier[modes] operator[SEP] identi... |
@Override
public int getMinAxis() {
int value = x;
int axis = 0;
if (y < value) {
value = y;
axis = 1;
}
if (z < value) {
value = z;
axis = 2;
}
if (w < value) {
axis = 3;
}
return axi... | class class_name[name] begin[{]
method[getMinAxis, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], value]
local_variable[type[int], axis]
if[binary_operation[member[.y], <, member[.value]]] begin[{]
assign[member[... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[getMinAxis] operator[SEP] operator[SEP] {
Keyword[int] identifier[value] operator[=] identifier[x] operator[SEP] Keyword[int] identifier[axis] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[y] operator[<] identifi... |
public String toEscapedString() {
List<String> parts = Lists.newArrayList( getName() );
parts.addAll( getValues() );
String escapedString = escape( Joiner.on( '-' ).join( parts ) );
return escapedString.substring( 0, Math.min( escapedString.length(), 255 ) );
} | class class_name[name] begin[{]
method[toEscapedString, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[List], parts]
call[parts.addAll, parameter[call[.getValues, parameter[]]]]
local_variable[type[String], escapedString]
return[ca... | Keyword[public] identifier[String] identifier[toEscapedString] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[parts] operator[=] identifier[Lists] operator[SEP] identifier[newArrayList] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SE... |
private void clearTextProgressAlign() {
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) tvProgress.getLayoutParams();
params.addRule(RelativeLayout.ALIGN_LEFT, 0);
params.addRule(RelativeLayout.ALIGN_RIGHT, 0);
params.addRule(RelativeLayout.LEFT_OF, 0);
params.... | class class_name[name] begin[{]
method[clearTextProgressAlign, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[RelativeLayout], params]
call[params.addRule, parameter[member[RelativeLayout.ALIGN_LEFT], literal[0]]]
call[params.addRule, par... | Keyword[private] Keyword[void] identifier[clearTextProgressAlign] operator[SEP] operator[SEP] {
identifier[RelativeLayout] operator[SEP] identifier[LayoutParams] identifier[params] operator[=] operator[SEP] identifier[RelativeLayout] operator[SEP] identifier[LayoutParams] operator[SEP] identifier[tvProgress] ope... |
public void save() {
SC.ask("Do you want to save changes", new BooleanCallback() {
@Override
public void execute(Boolean yesSelected) {
if (yesSelected) {
jcrService().save(repository(), workspace(), new BaseCallback<Object>() {
... | class class_name[name] begin[{]
method[save, return_type[void], modifier[public], parameter[]] begin[{]
call[SC.ask, parameter[literal["Do you want to save changes"], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(cond... | Keyword[public] Keyword[void] identifier[save] operator[SEP] operator[SEP] {
identifier[SC] operator[SEP] identifier[ask] operator[SEP] literal[String] , Keyword[new] identifier[BooleanCallback] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[... |
@Override
public ListFacetNamesResult listFacetNames(ListFacetNamesRequest request) {
request = beforeClientExecution(request);
return executeListFacetNames(request);
} | class class_name[name] begin[{]
method[listFacetNames, return_type[type[ListFacetNamesResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListFacetNames, parameter[member[.reques... | annotation[@] identifier[Override] Keyword[public] identifier[ListFacetNamesResult] identifier[listFacetNames] operator[SEP] identifier[ListFacetNamesRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] oper... |
public String diff_prettyHtml(LinkedList<Diff> diffs) {
StringBuilder html = new StringBuilder();
for (Diff aDiff : diffs) {
String text = aDiff.text.replace("&", "&").replace("<", "<")
.replace(">", ">").replace("\n", "¶<br>");
switch (aDiff.op... | class class_name[name] begin[{]
method[diff_prettyHtml, return_type[type[String]], modifier[public], parameter[diffs]] begin[{]
local_variable[type[StringBuilder], html]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclar... | Keyword[public] identifier[String] identifier[diff_prettyHtml] operator[SEP] identifier[LinkedList] operator[<] identifier[Diff] operator[>] identifier[diffs] operator[SEP] {
identifier[StringBuilder] identifier[html] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Ke... |
@Override
protected Object[] convertParameters(Object[] params) {
List<Object> converted = getBinding().getKeyBinding().getKeyParameters(Arrays.asList(params));
return converted.toArray(new Object[converted.size()]);
} | class class_name[name] begin[{]
method[convertParameters, return_type[type[Object]], modifier[protected], parameter[params]] begin[{]
local_variable[type[List], converted]
return[call[converted.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_opera... | annotation[@] identifier[Override] Keyword[protected] identifier[Object] operator[SEP] operator[SEP] identifier[convertParameters] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[params] operator[SEP] {
identifier[List] operator[<] identifier[Object] operator[>] identifier[converted] oper... |
@JmxOperation
public String stopAsyncOperation(int requestId) {
try {
stopOperation(requestId);
} catch(VoldemortException e) {
return e.getMessage();
}
return "Stopping operation " + requestId;
} | class class_name[name] begin[{]
method[stopAsyncOperation, return_type[type[String]], modifier[public], parameter[requestId]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=requestId, postfix_operators=[], prefix_operators=[], qualifier=, ... | annotation[@] identifier[JmxOperation] Keyword[public] identifier[String] identifier[stopAsyncOperation] operator[SEP] Keyword[int] identifier[requestId] operator[SEP] {
Keyword[try] {
identifier[stopOperation] operator[SEP] identifier[requestId] operator[SEP] operator[SEP]
}
Keyword[cat... |
public StatementBuilder withQualifierValue(PropertyIdValue propertyIdValue,
Value value) {
withQualifier(factory.getValueSnak(propertyIdValue, value));
return getThis();
} | class class_name[name] begin[{]
method[withQualifierValue, return_type[type[StatementBuilder]], modifier[public], parameter[propertyIdValue, value]] begin[{]
call[.withQualifier, parameter[call[factory.getValueSnak, parameter[member[.propertyIdValue], member[.value]]]]]
return[call[.get... | Keyword[public] identifier[StatementBuilder] identifier[withQualifierValue] operator[SEP] identifier[PropertyIdValue] identifier[propertyIdValue] , identifier[Value] identifier[value] operator[SEP] {
identifier[withQualifier] operator[SEP] identifier[factory] operator[SEP] identifier[getValueSnak] operator[SEP]... |
static public WsByteBuffer[] putByte(WsByteBuffer[] buffers, byte value, BNFHeadersImpl bnfObj) {
// verify input buffer information
if (null == buffers) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Null buffers sent to putByte");
... | class class_name[name] begin[{]
method[putByte, return_type[type[WsByteBuffer]], modifier[public static], parameter[buffers, value, bnfObj]] begin[{]
if[binary_operation[literal[null], ==, member[.buffers]]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEn... | Keyword[static] Keyword[public] identifier[WsByteBuffer] operator[SEP] operator[SEP] identifier[putByte] operator[SEP] identifier[WsByteBuffer] operator[SEP] operator[SEP] identifier[buffers] , Keyword[byte] identifier[value] , identifier[BNFHeadersImpl] identifier[bnfObj] operator[SEP] {
Keyword[if] operator[... |
@NonNull
public static MarkwonAdapter create(
@LayoutRes int defaultEntryLayoutResId,
@IdRes int defaultEntryTextViewResId
) {
return builder(defaultEntryLayoutResId, defaultEntryTextViewResId).build();
} | class class_name[name] begin[{]
method[create, return_type[type[MarkwonAdapter]], modifier[public static], parameter[defaultEntryLayoutResId, defaultEntryTextViewResId]] begin[{]
return[call[.builder, parameter[member[.defaultEntryLayoutResId], member[.defaultEntryTextViewResId]]]]
end[}]
END[}] | annotation[@] identifier[NonNull] Keyword[public] Keyword[static] identifier[MarkwonAdapter] identifier[create] operator[SEP] annotation[@] identifier[LayoutRes] Keyword[int] identifier[defaultEntryLayoutResId] , annotation[@] identifier[IdRes] Keyword[int] identifier[defaultEntryTextViewResId] operator[SEP] {
... |
public void setSchemaSources(Source... s) {
if (s != null) {
sourceLocations = Arrays.copyOf(s, s.length);
} else {
sourceLocations = null;
}
} | class class_name[name] begin[{]
method[setSchemaSources, return_type[void], modifier[public], parameter[s]] begin[{]
if[binary_operation[member[.s], !=, literal[null]]] begin[{]
assign[member[.sourceLocations], call[Arrays.copyOf, parameter[member[.s], member[s.length]]]... | Keyword[public] Keyword[void] identifier[setSchemaSources] operator[SEP] identifier[Source] operator[...] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] identifier[s] operator[!=] Other[null] operator[SEP] {
identifier[sourceLocations] operator[=] identifier[Arrays] operator[SEP] identifier[c... |
public void notDisplayed(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
double timeTook = elementPresent(seconds);
WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) (seconds - timeTook), DEFAULT_POLLING_INTERVAL);
... | class class_name[name] begin[{]
method[notDisplayed, return_type[void], modifier[public], parameter[seconds]] begin[{]
local_variable[type[double], end]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argum... | Keyword[public] Keyword[void] identifier[notDisplayed] operator[SEP] Keyword[double] identifier[seconds] operator[SEP] {
Keyword[double] identifier[end] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[+] operator[SEP] identifier[seconds] operator[*]... |
public GMOperation gravity(final Gravity value) {
if (value == null) {
throw new IllegalArgumentException("Gravity value must be defined");
}
gravity(value.toString());
return this;
} | class class_name[name] begin[{]
method[gravity, return_type[type[GMOperation]], modifier[public], parameter[value]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operat... | Keyword[public] identifier[GMOperation] identifier[gravity] operator[SEP] Keyword[final] identifier[Gravity] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[... |
public Observable<Page<DomainInner>> listByResourceGroupNextAsync(final String nextPageLink) {
return listByResourceGroupNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<DomainInner>>, Page<DomainInner>>() {
@Override
public Page<DomainIn... | class class_name[name] begin[{]
method[listByResourceGroupNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{]
return[call[.listByResourceGroupNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[DomainInner] operator[>] operator[>] identifier[listByResourceGroupNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] {
Keyword[return] identifier[listByResourceGroupNextWithS... |
public static boolean isSeq1(Object subject)
{
if (subject instanceof VDMSeq)
{
VDMSeq seq = (VDMSeq) subject;
return !seq.isEmpty();
} else
{
return false;
}
} | class class_name[name] begin[{]
method[isSeq1, return_type[type[boolean]], modifier[public static], parameter[subject]] begin[{]
if[binary_operation[member[.subject], instanceof, type[VDMSeq]]] begin[{]
local_variable[type[VDMSeq], seq]
return[call[seq.isEmpty, parameter... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isSeq1] operator[SEP] identifier[Object] identifier[subject] operator[SEP] {
Keyword[if] operator[SEP] identifier[subject] Keyword[instanceof] identifier[VDMSeq] operator[SEP] {
identifier[VDMSeq] identifier[seq] operator[=] operator[SEP] ide... |
public static LongBinding asLong(final ObservableValue<Number> source) {
return Bindings.createLongBinding(() -> nonNullNumber(source.getValue()).longValue(), source);
} | class class_name[name] begin[{]
method[asLong, return_type[type[LongBinding]], modifier[public static], parameter[source]] begin[{]
return[call[Bindings.createLongBinding, parameter[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], p... | Keyword[public] Keyword[static] identifier[LongBinding] identifier[asLong] operator[SEP] Keyword[final] identifier[ObservableValue] operator[<] identifier[Number] operator[>] identifier[source] operator[SEP] {
Keyword[return] identifier[Bindings] operator[SEP] identifier[createLongBinding] operator[SEP] operator... |
public void marshall(GetInsightsRequest getInsightsRequest, ProtocolMarshaller protocolMarshaller) {
if (getInsightsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(getInsightsRequest.getIns... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getInsightsRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getInsightsRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(p... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetInsightsRequest] identifier[getInsightsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getInsightsRequest] operator[==] Other[null] operator[SEP] {
... |
public void setOwner(ListenerOwner owner)
{
super.setOwner(owner);
if (owner != null)
{
BaseField field = m_field;
if (field != null)
if (field.getRecord() != owner)
{ // Points to different file... make sure this is removed if the other ... | class class_name[name] begin[{]
method[setOwner, return_type[void], modifier[public], parameter[owner]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=owner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOwner, postfix_operators=[], prefix_op... | Keyword[public] Keyword[void] identifier[setOwner] operator[SEP] identifier[ListenerOwner] identifier[owner] operator[SEP] {
Keyword[super] operator[SEP] identifier[setOwner] operator[SEP] identifier[owner] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[owner] operator[!=] Other[null] operator[... |
@Override
public void compute(float x, float y, Point2D_F32 out) {
narrowToNorm.compute(x,y, norm);
// Convert from 2D homogenous to 3D
unit.set( norm.x , norm.y , 1.0f);
// Rotate then make it a unit vector
GeometryMath_F32.mult(rotateWideToNarrow,unit,unit);
float n = unit.norm();
unit.x /= n;
unit... | class class_name[name] begin[{]
method[compute, return_type[void], modifier[public], parameter[x, y, out]] begin[{]
call[narrowToNorm.compute, parameter[member[.x], member[.y], member[.norm]]]
call[unit.set, parameter[member[norm.x], member[norm.y], literal[1.0f]]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[compute] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] , identifier[Point2D_F32] identifier[out] operator[SEP] {
identifier[narrowToNorm] operator[SEP] identifier[compute] operator[SEP] identifier[x] , iden... |
protected void freeBuffer(final ByteBuffer buffer) throws IOException {
if (buffer == null) {
return;
}
if (UNMAP_SUPPORTED) {
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
@Override
public Void run() throws Exception {
final ... | class class_name[name] begin[{]
method[freeBuffer, return_type[void], modifier[protected], parameter[buffer]] begin[{]
if[binary_operation[member[.buffer], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
if[member[.UNMAP_SUPPORTED]... | Keyword[protected] Keyword[void] identifier[freeBuffer] operator[SEP] Keyword[final] identifier[ByteBuffer] identifier[buffer] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[buffer] operator[==] Other[null] operator[SEP] {
Keyword[return] operator[SEP]
... |
public static <K, V> Collection<V> addAllValuesTo(Map<K, V> map, Collection<V> targetCollection)
{
MapIterate.forEachValue(map, CollectionAddProcedure.on(targetCollection));
return targetCollection;
} | class class_name[name] begin[{]
method[addAllValuesTo, return_type[type[Collection]], modifier[public static], parameter[map, targetCollection]] begin[{]
call[MapIterate.forEachValue, parameter[member[.map], call[CollectionAddProcedure.on, parameter[member[.targetCollection]]]]]
return[... | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Collection] operator[<] identifier[V] operator[>] identifier[addAllValuesTo] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[map] , identifier[Collection] operator[<] identi... |
public static IntSet mutableCopyFrom(Set<Integer> mutableSet) {
if (mutableSet instanceof SingletonIntSet) {
return mutableSet(((SingletonIntSet) mutableSet).value);
}
return new SmallIntSet(mutableSet);
} | class class_name[name] begin[{]
method[mutableCopyFrom, return_type[type[IntSet]], modifier[public static], parameter[mutableSet]] begin[{]
if[binary_operation[member[.mutableSet], instanceof, type[SingletonIntSet]]] begin[{]
return[call[.mutableSet, parameter[Cast(expression=Member... | Keyword[public] Keyword[static] identifier[IntSet] identifier[mutableCopyFrom] operator[SEP] identifier[Set] operator[<] identifier[Integer] operator[>] identifier[mutableSet] operator[SEP] {
Keyword[if] operator[SEP] identifier[mutableSet] Keyword[instanceof] identifier[SingletonIntSet] operator[SEP] {
... |
@Override
protected AbstractMessage retrieveMessage(int handle) throws JMSException
{
return (AbstractMessage)((InMemoryLinkedDataStore)dataStore).retrieve(handle);
} | class class_name[name] begin[{]
method[retrieveMessage, return_type[type[AbstractMessage]], modifier[protected], parameter[handle]] begin[{]
return[Cast(expression=Cast(expression=MemberReference(member=dataStore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(... | annotation[@] identifier[Override] Keyword[protected] identifier[AbstractMessage] identifier[retrieveMessage] operator[SEP] Keyword[int] identifier[handle] operator[SEP] Keyword[throws] identifier[JMSException] {
Keyword[return] operator[SEP] identifier[AbstractMessage] operator[SEP] operator[SEP] operator[SEP] ... |
static QrCodeMaskPattern selectMask( QrCode qr ) {
int N = qr.getNumberOfModules();
int totalBytes = QrCode.VERSION_INFO[qr.version].codewords;
List<Point2D_I32> locations = QrCode.LOCATION_BITS[qr.version];
QrCodeMaskPattern bestMask = null;
double bestScore = Double.MAX_VALUE;
PackedBits8 bits = new Pac... | class class_name[name] begin[{]
method[selectMask, return_type[type[QrCodeMaskPattern]], modifier[static], parameter[qr]] begin[{]
local_variable[type[int], N]
local_variable[type[int], totalBytes]
local_variable[type[List], locations]
local_variable[type[QrCodeMaskPattern], bes... | Keyword[static] identifier[QrCodeMaskPattern] identifier[selectMask] operator[SEP] identifier[QrCode] identifier[qr] operator[SEP] {
Keyword[int] identifier[N] operator[=] identifier[qr] operator[SEP] identifier[getNumberOfModules] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[totalBytes] ope... |
public Observable<List<ApplicationInsightsComponentExportConfigurationInner>> listAsync(String resourceGroupName, String resourceName) {
return listWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<List<ApplicationInsightsComponentExportConfigurationInner>>, List<Applicatio... | class class_name[name] begin[{]
method[listAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, resourceName]] begin[{]
return[call[.listWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.resourceName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[List] operator[<] identifier[ApplicationInsightsComponentExportConfigurationInner] operator[>] operator[>] identifier[listAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceName] operator[SEP] {
... |
@Bean
@Conditional(BackwardsCompatibilityCondition.class)
@Deprecated
Reporter<Span> reporter(ReporterMetrics reporterMetrics, ZipkinProperties zipkin,
BytesEncoder<Span> spanBytesEncoder, DefaultListableBeanFactory beanFactory) {
List<String> beanNames = new ArrayList<>(
Arrays.asList(beanFactory.getBeanNa... | class class_name[name] begin[{]
method[reporter, return_type[type[Reporter]], modifier[default], parameter[reporterMetrics, zipkin, spanBytesEncoder, beanFactory]] begin[{]
local_variable[type[List], beanNames]
call[beanNames.remove, parameter[member[ZipkinAutoConfiguration.SENDER_BEAN_... | annotation[@] identifier[Bean] annotation[@] identifier[Conditional] operator[SEP] identifier[BackwardsCompatibilityCondition] operator[SEP] Keyword[class] operator[SEP] annotation[@] identifier[Deprecated] identifier[Reporter] operator[<] identifier[Span] operator[>] identifier[reporter] operator[SEP] identifier[Repor... |
public void updateGroupMembers(long logIndex, Collection<Endpoint> members) {
state.updateGroupMembers(logIndex, members);
printMemberState();
} | class class_name[name] begin[{]
method[updateGroupMembers, return_type[void], modifier[public], parameter[logIndex, members]] begin[{]
call[state.updateGroupMembers, parameter[member[.logIndex], member[.members]]]
call[.printMemberState, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[updateGroupMembers] operator[SEP] Keyword[long] identifier[logIndex] , identifier[Collection] operator[<] identifier[Endpoint] operator[>] identifier[members] operator[SEP] {
identifier[state] operator[SEP] identifier[updateGroupMembers] operator[SEP] identifier[logIndex... |
public boolean matchCompleteTransactionTask(long txnId, long timestamp) {
if (!m_compTasks.isEmpty()) {
long lowestTxnId = m_compTasks.firstKey();
if (txnId == lowestTxnId) {
Pair<CompleteTransactionTask, Boolean> pair = m_compTasks.get(lowestTxnId);
retur... | class class_name[name] begin[{]
method[matchCompleteTransactionTask, return_type[type[boolean]], modifier[public], parameter[txnId, timestamp]] begin[{]
if[call[m_compTasks.isEmpty, parameter[]]] begin[{]
local_variable[type[long], lowestTxnId]
if[binary_oper... | Keyword[public] Keyword[boolean] identifier[matchCompleteTransactionTask] operator[SEP] Keyword[long] identifier[txnId] , Keyword[long] identifier[timestamp] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[m_compTasks] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] ... |
public void tryMerge(Component component, Collection<DefaultIssue> newIssues) {
Collection<SiblingIssue> siblingIssues = siblingsIssuesLoader.loadCandidateSiblingIssuesForMerging(component);
Tracking<DefaultIssue, SiblingIssue> tracking = tracker.track(newIssues, siblingIssues);
Map<DefaultIssue, SiblingIs... | class class_name[name] begin[{]
method[tryMerge, return_type[void], modifier[public], parameter[component, newIssues]] begin[{]
local_variable[type[Collection], siblingIssues]
local_variable[type[Tracking], tracking]
local_variable[type[Map], matchedRaws]
local_variable[type[Map... | Keyword[public] Keyword[void] identifier[tryMerge] operator[SEP] identifier[Component] identifier[component] , identifier[Collection] operator[<] identifier[DefaultIssue] operator[>] identifier[newIssues] operator[SEP] {
identifier[Collection] operator[<] identifier[SiblingIssue] operator[>] identifier[siblingI... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.