code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
protected void addFlagCondition(CmsSelectQuery select, TableAlias users, int flags, boolean allowCore) {
if (flags != 0) {
I_CmsQueryFragment condition = createFlagCondition(users, flags);
if (allowCore) {
I_CmsQueryFragment coreCondition = createCoreCondition(users);
... | class class_name[name] begin[{]
method[addFlagCondition, return_type[void], modifier[protected], parameter[select, users, flags, allowCore]] begin[{]
if[binary_operation[member[.flags], !=, literal[0]]] begin[{]
local_variable[type[I_CmsQueryFragment], condition]
... | Keyword[protected] Keyword[void] identifier[addFlagCondition] operator[SEP] identifier[CmsSelectQuery] identifier[select] , identifier[TableAlias] identifier[users] , Keyword[int] identifier[flags] , Keyword[boolean] identifier[allowCore] operator[SEP] {
Keyword[if] operator[SEP] identifier[flags] operator[!=... |
@Override
public boolean isSet(String propName) {
if (propName.equals("deleteDescendants")) {
return isSetDeleteDescendants();
}
if (propName.equals("returnDeleted")) {
return isSetReturnDeleted();
}
return super.isSet(propName);
} | class class_name[name] begin[{]
method[isSet, return_type[type[boolean]], modifier[public], parameter[propName]] begin[{]
if[call[propName.equals, parameter[literal["deleteDescendants"]]]] begin[{]
return[call[.isSetDeleteDescendants, parameter[]]]
else begin[{]
None
... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isSet] operator[SEP] identifier[String] identifier[propName] operator[SEP] {
Keyword[if] operator[SEP] identifier[propName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keywor... |
@SuppressWarnings("unchecked")
public <T> T readObject(BufferInput<?> buffer) {
int code = buffer.readByte();
Identifier identifier = Identifier.forCode(code);
switch (identifier) {
case NULL:
return null;
case CLASS:
return readByClass(buffer);
default:
return re... | class class_name[name] begin[{]
method[readObject, return_type[type[T]], modifier[public], parameter[buffer]] begin[{]
local_variable[type[int], code]
local_variable[type[Identifier], identifier]
SwitchStatement(cases=[SwitchStatementCase(case=['NULL'], statements=[ReturnStatement(expre... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[readObject] operator[SEP] identifier[BufferInput] operator[<] operator[?] operator[>] identifier[buffer] operator[SEP] {
Keyword[int] identifier[co... |
@Override
public Properties getConfiguration(Environment environment) {
boolean allMissEnvironment = true;
for (ConfigurationSource source : sources) {
try {
return source.getConfiguration(environment);
} catch (MissingEnvironmentException e) {
// NOP
} catch (IllegalStateE... | class class_name[name] begin[{]
method[getConfiguration, return_type[type[Properties]], modifier[public], parameter[environment]] begin[{]
local_variable[type[boolean], allMissEnvironment]
ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[ReturnStatement(expression=Me... | annotation[@] identifier[Override] Keyword[public] identifier[Properties] identifier[getConfiguration] operator[SEP] identifier[Environment] identifier[environment] operator[SEP] {
Keyword[boolean] identifier[allMissEnvironment] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Con... |
@Override
public Object apply(Object value, Object... params) {
return super.asString(super.get(0, params)) + super.asString(value);
} | class class_name[name] begin[{]
method[apply, return_type[type[Object]], modifier[public], parameter[value, params]] begin[{]
return[binary_operation[SuperMethodInvocation(arguments=[SuperMethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[apply] operator[SEP] identifier[Object] identifier[value] , identifier[Object] operator[...] identifier[params] operator[SEP] {
Keyword[return] Keyword[super] operator[SEP] identifier[asString] operator[SEP] Keyword[super] operator... |
@Override
public void show(
Context context,
final Entity entity,
final SocialNetworkListener socialNetworkListener,
final ShareDialogListener shareDialoglistener,
final int displayOptions) {
showDialog(context,
new BeanCreationListener<SharePanelView>() {
@Override
public voi... | class class_name[name] begin[{]
method[show, return_type[void], modifier[public], parameter[context, entity, socialNetworkListener, shareDialoglistener, displayOptions]] begin[{]
call[.showDialog, parameter[member[.context], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annota... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[show] operator[SEP] identifier[Context] identifier[context] , Keyword[final] identifier[Entity] identifier[entity] , Keyword[final] identifier[SocialNetworkListener] identifier[socialNetworkListener] , Keyword[final] identifier[ShareDialogLi... |
public void marshall(ListDomainsRequest listDomainsRequest, ProtocolMarshaller protocolMarshaller) {
if (listDomainsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(listDomainsRequest.getFle... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[listDomainsRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.listDomainsRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(p... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ListDomainsRequest] identifier[listDomainsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[listDomainsRequest] operator[==] Other[null] operator[SEP] {
... |
private String getAnnotations(Annotate annotator, String stringFromClient)
throws JDOMException, IOException {
// get a breader from the string coming from the client
BufferedReader clientReader = new BufferedReader(
new StringReader(stringFromClient));
KAFDocument kaf = KAFDocument.createFrom... | class class_name[name] begin[{]
method[getAnnotations, return_type[type[String]], modifier[private], parameter[annotator, stringFromClient]] begin[{]
local_variable[type[BufferedReader], clientReader]
local_variable[type[KAFDocument], kaf]
local_variable[type[KAFDocument], newLp]
... | Keyword[private] identifier[String] identifier[getAnnotations] operator[SEP] identifier[Annotate] identifier[annotator] , identifier[String] identifier[stringFromClient] operator[SEP] Keyword[throws] identifier[JDOMException] , identifier[IOException] {
identifier[BufferedReader] identifier[clientReader] opera... |
@Override
public TopicConnection createTopicConnection(String userName, String password) throws JMSException
{
URI providerURL = getProviderURI();
String scheme = providerURL.getScheme();
if (scheme.equals(PacketTransportType.VM))
{
String engineName = prov... | class class_name[name] begin[{]
method[createTopicConnection, return_type[type[TopicConnection]], modifier[public], parameter[userName, password]] begin[{]
local_variable[type[URI], providerURL]
local_variable[type[String], scheme]
if[call[scheme.equals, parameter[member[PacketT... | annotation[@] identifier[Override] Keyword[public] identifier[TopicConnection] identifier[createTopicConnection] operator[SEP] identifier[String] identifier[userName] , identifier[String] identifier[password] operator[SEP] Keyword[throws] identifier[JMSException] {
identifier[URI] identifier[providerURL] operat... |
public void marshall(Rectangle rectangle, ProtocolMarshaller protocolMarshaller) {
if (rectangle == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(rectangle.getHeight(), HEIGHT_BINDING);
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[rectangle, protocolMarshaller]] begin[{]
if[binary_operation[member[.rectangle], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Rectangle] identifier[rectangle] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[rectangle] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[... |
public static String getPrefix(URI uri, ClassLoader classLoader) {
if (uri == null && classLoader == null) {
return null;
} else {
StringBuilder sb = new StringBuilder();
if (uri != null) {
sb.append(uri.toASCIIString()).append('/');
}
... | class class_name[name] begin[{]
method[getPrefix, return_type[type[String]], modifier[public static], parameter[uri, classLoader]] begin[{]
if[binary_operation[binary_operation[member[.uri], ==, literal[null]], &&, binary_operation[member[.classLoader], ==, literal[null]]]] begin[{]
... | Keyword[public] Keyword[static] identifier[String] identifier[getPrefix] operator[SEP] identifier[URI] identifier[uri] , identifier[ClassLoader] identifier[classLoader] operator[SEP] {
Keyword[if] operator[SEP] identifier[uri] operator[==] Other[null] operator[&&] identifier[classLoader] operator[==] Other[null... |
@Override
public int getPropagationConditions(int vIdx) {
if (vIdx == 0) {
return SetEventType.ADD_TO_KER.getMask() + SetEventType.REMOVE_FROM_ENVELOPE.getMask();
} else {
return GraphEventType.ADD_NODE.getMask() + GraphEventType.REMOVE_NODE.getMask();
}
} | class class_name[name] begin[{]
method[getPropagationConditions, return_type[type[int]], modifier[public], parameter[vIdx]] begin[{]
if[binary_operation[member[.vIdx], ==, literal[0]]] begin[{]
return[binary_operation[call[SetEventType.ADD_TO_KER.getMask, parameter[]], +, call[SetEv... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[getPropagationConditions] operator[SEP] Keyword[int] identifier[vIdx] operator[SEP] {
Keyword[if] operator[SEP] identifier[vIdx] operator[==] Other[0] operator[SEP] {
Keyword[return] identifier[SetEventType] operator[SEP] ident... |
@XmlElementDecl(namespace = "http://schema.intuit.com/finance/v3", name = "PaymentMethod", substitutionHeadNamespace = "http://schema.intuit.com/finance/v3", substitutionHeadName = "IntuitObject")
public JAXBElement<PaymentMethod> createPaymentMethod(PaymentMethod value) {
return new JAXBElement<PaymentMeth... | class class_name[name] begin[{]
method[createPaymentMethod, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_PaymentMethod_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postf... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] iden... |
public void joinQueue(Map<String,Object> metadata, Jid userID) throws XMPPException, SmackException, InterruptedException {
// If already in the queue ignore the join request.
if (inQueue) {
throw new IllegalStateException("Already in queue " + workgroupJID);
}
// Build data... | class class_name[name] begin[{]
method[joinQueue, return_type[void], modifier[public], parameter[metadata, userID]] begin[{]
if[member[.inQueue]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qu... | Keyword[public] Keyword[void] identifier[joinQueue] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[metadata] , identifier[Jid] identifier[userID] operator[SEP] Keyword[throws] identifier[XMPPException] , identifier[SmackException] , identifier[InterruptedExc... |
protected void onDecoraTag(final Tag tag) {
String tagName = tag.getName().toString();
if (tag.getType() == TagType.SELF_CLOSING) {
checkNestedDecoraTags();
decoraTagName = tagName.substring(7);
decoraTagStart = tag.getTagPosition();
decoraTagEnd = tag.getTagPosition() + tag.getTagLength();
defineDe... | class class_name[name] begin[{]
method[onDecoraTag, return_type[void], modifier[protected], parameter[tag]] begin[{]
local_variable[type[String], tagName]
if[binary_operation[call[tag.getType, parameter[]], ==, member[TagType.SELF_CLOSING]]] begin[{]
call[.checkN... | Keyword[protected] Keyword[void] identifier[onDecoraTag] operator[SEP] Keyword[final] identifier[Tag] identifier[tag] operator[SEP] {
identifier[String] identifier[tagName] operator[=] identifier[tag] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] o... |
public Object extractObject(ObjectToJsonConverter pConverter, Object pValue,
Stack<String> pPathParts,boolean pJsonify) throws AttributeNotFoundException {
TabularData td = (TabularData) pValue;
String tdPath = pPathParts.isEmpty() ? null : pPathParts.pop();
if (t... | class class_name[name] begin[{]
method[extractObject, return_type[type[Object]], modifier[public], parameter[pConverter, pValue, pPathParts, pJsonify]] begin[{]
local_variable[type[TabularData], td]
local_variable[type[String], tdPath]
if[binary_operation[member[.tdPath], !=, li... | Keyword[public] identifier[Object] identifier[extractObject] operator[SEP] identifier[ObjectToJsonConverter] identifier[pConverter] , identifier[Object] identifier[pValue] , identifier[Stack] operator[<] identifier[String] operator[>] identifier[pPathParts] , Keyword[boolean] identifier[pJsonify] operator[SEP] Keywo... |
public boolean allowAdd(@NotNull Resource contextResource, @NotNull String configName) {
return serviceResolver.resolveAll(ConfigurationEditorFilter.class, contextResource).getServices()
.filter(filter -> !filter.allowAdd(configName))
.count() == 0;
} | class class_name[name] begin[{]
method[allowAdd, return_type[type[boolean]], modifier[public], parameter[contextResource, configName]] begin[{]
return[binary_operation[call[serviceResolver.resolveAll, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=Ref... | Keyword[public] Keyword[boolean] identifier[allowAdd] operator[SEP] annotation[@] identifier[NotNull] identifier[Resource] identifier[contextResource] , annotation[@] identifier[NotNull] identifier[String] identifier[configName] operator[SEP] {
Keyword[return] identifier[serviceResolver] operator[SEP] identifie... |
private void closeStream(String msg, long length) {
if (wrappedStream != null) {
long remaining = remainingInCurrentRequest();
boolean shouldAbort = remaining > readahead;
if (!shouldAbort) {
try {
wrappedStream.close();
} catch (IOException e) {
LOG.debug("When... | class class_name[name] begin[{]
method[closeStream, return_type[void], modifier[private], parameter[msg, length]] begin[{]
if[binary_operation[member[.wrappedStream], !=, literal[null]]] begin[{]
local_variable[type[long], remaining]
local_variable[type[boolean], shouldA... | Keyword[private] Keyword[void] identifier[closeStream] operator[SEP] identifier[String] identifier[msg] , Keyword[long] identifier[length] operator[SEP] {
Keyword[if] operator[SEP] identifier[wrappedStream] operator[!=] Other[null] operator[SEP] {
Keyword[long] identifier[remaining] operator[=] ident... |
public static <T extends Iterable<? extends TypeDescription.Generic>> ElementMatcher.Junction<T> erasures(Class<?>... type) {
return erasures(new TypeList.ForLoadedTypes(type));
} | class class_name[name] begin[{]
method[erasures, return_type[type[ElementMatcher]], modifier[public static], parameter[type]] begin[{]
return[call[.erasures, parameter[ClassCreator(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, ... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[TypeDescription] operator[SEP] identifier[Generic] operator[>] operator[>] identifier[ElementMatcher] operator[SEP] identifier[Junction] operator[<] identifier[T] operator[... |
public String transform() {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < input.length(); i++) {
if (ignoreCharactersContaining != null
&& ignoreCharactersContaining.contains(String.valueOf(input.charAt(i))))
sb.append(input.charAt(i)... | class class_name[name] begin[{]
method[transform, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[StringBuilder], sb]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberRef... | Keyword[public] identifier[String] identifier[transform] operator[SEP] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] ide... |
@GwtIncompatible("Class.isInstance")
@Pure
@Inline(value="$3.$4filter($1, $2)", imported=Iterables.class)
public static <T> Iterable<T> filter(Iterable<?> unfiltered, Class<T> type) {
return Iterables.filter(unfiltered, type);
} | class class_name[name] begin[{]
method[filter, return_type[type[Iterable]], modifier[public static], parameter[unfiltered, type]] begin[{]
return[call[Iterables.filter, parameter[member[.unfiltered], member[.type]]]]
end[}]
END[}] | annotation[@] identifier[GwtIncompatible] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Pure] annotation[@] identifier[Inline] operator[SEP] identifier[value] operator[=] literal[String] , identifier[imported] operator[=] identifier[Iterables] operator[SEP] Keyword[class] operator[SEP] Keyword[p... |
public BundleLinkComponent getLinkOrCreate(String theRelation) {
org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty");
for (BundleLinkComponent next : getLink()) {
if (theRelation.equals(next.getRelation())) {
return next;
}
}
BundleL... | class class_name[name] begin[{]
method[getLinkOrCreate, return_type[type[BundleLinkComponent]], modifier[public], parameter[theRelation]] begin[{]
call[org.apache.commons.lang3.Validate.notBlank, parameter[member[.theRelation], literal["theRelation may not be null or empty"]]]
ForStatem... | Keyword[public] identifier[BundleLinkComponent] identifier[getLinkOrCreate] operator[SEP] identifier[String] identifier[theRelation] operator[SEP] {
identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[commons] operator[SEP] identifier[lang3] operator[SEP] identifier[Validate] operator[SEP] ... |
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case XbasePackage.XCASTED_EXPRESSION__TYPE:
return type != null;
case XbasePackage.XCASTED_EXPRESSION__TARGET:
return target != null;
}
return super.eIsSet(featureID);
} | class class_name[name] begin[{]
method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=XCASTED_EXPRESSION__TYPE, postfix_operators=[], prefix_operators=[], qualifier=XbasePackage, selectors=[])]... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[XbasePackage] operator[SEP] identifier[XCASTED_EXPRESSION... |
@Override
public boolean apply(final URI uri) {
if (uri.getHost() == null) throw new IllegalArgumentException("URI \"" + uri + "\" has no host");
// BURL hosts are always lower cased
return uri.getHost().equals(host);
} | class class_name[name] begin[{]
method[apply, return_type[type[boolean]], modifier[public], parameter[uri]] begin[{]
if[binary_operation[call[uri.getHost, parameter[]], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operan... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[apply] operator[SEP] Keyword[final] identifier[URI] identifier[uri] operator[SEP] {
Keyword[if] operator[SEP] identifier[uri] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] Keyword... |
public String processNested(Properties attributes) throws XDocletException
{
String name = OjbMemberTagsHandler.getMemberName();
XClass type = OjbMemberTagsHandler.getMemberType();
int dim = OjbMemberTagsHandler.getMemberDimension();
NestedDef nestedD... | class class_name[name] begin[{]
method[processNested, return_type[type[String]], modifier[public], parameter[attributes]] begin[{]
local_variable[type[String], name]
local_variable[type[XClass], type]
local_variable[type[int], dim]
local_variable[type[NestedDef], nestedDef]
... | Keyword[public] identifier[String] identifier[processNested] operator[SEP] identifier[Properties] identifier[attributes] operator[SEP] Keyword[throws] identifier[XDocletException] {
identifier[String] identifier[name] operator[=] identifier[OjbMemberTagsHandler] operator[SEP] identifier[getMemberName] operator[S... |
public CharSequence subSequence(int start, int end) {
int len = end - start;
return new StringBuilder(len).append(toArray(start, len));
} | class class_name[name] begin[{]
method[subSequence, return_type[type[CharSequence]], modifier[public], parameter[start, end]] begin[{]
local_variable[type[int], len]
return[ClassCreator(arguments=[MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])],... | Keyword[public] identifier[CharSequence] identifier[subSequence] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
Keyword[int] identifier[len] operator[=] identifier[end] operator[-] identifier[start] operator[SEP] Keyword[return] Keyword[new] identifier[StringBuilder]... |
public void writeMethod(InjectorMethod method, SourceWriter writer,
InjectorWriteContext writeContext) throws NoSourceNameException {
if (method.isNative()) {
writeNativeMethod(writer, method.getMethodSignature(), method.getMethodBody(writeContext));
} else {
writeMethod(writer, method.getMeth... | class class_name[name] begin[{]
method[writeMethod, return_type[void], modifier[public], parameter[method, writer, writeContext]] begin[{]
if[call[method.isNative, parameter[]]] begin[{]
call[.writeNativeMethod, parameter[member[.writer], call[method.getMethodSignature, ... | Keyword[public] Keyword[void] identifier[writeMethod] operator[SEP] identifier[InjectorMethod] identifier[method] , identifier[SourceWriter] identifier[writer] , identifier[InjectorWriteContext] identifier[writeContext] operator[SEP] Keyword[throws] identifier[NoSourceNameException] {
Keyword[if] operator[SEP]... |
public void initializeIntervalConf(int interval, TimeUnit unit)
{
boolean isIntervalValid = TimeIntervalFormatUtil.checkValidInterval(interval, unit);
if (isIntervalValid == false)
{
String logFormat = "File switch interval is invalid. Apply default interval 10 minutes. : ... | class class_name[name] begin[{]
method[initializeIntervalConf, return_type[void], modifier[public], parameter[interval, unit]] begin[{]
local_variable[type[boolean], isIntervalValid]
if[binary_operation[member[.isIntervalValid], ==, literal[false]]] begin[{]
local_variable[t... | Keyword[public] Keyword[void] identifier[initializeIntervalConf] operator[SEP] Keyword[int] identifier[interval] , identifier[TimeUnit] identifier[unit] operator[SEP] {
Keyword[boolean] identifier[isIntervalValid] operator[=] identifier[TimeIntervalFormatUtil] operator[SEP] identifier[checkValidInterval] operat... |
public void write(String filename)
{
try
{
write(new FileOutputStream(filename));
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[filename]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=,... | Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[String] identifier[filename] operator[SEP] {
Keyword[try] {
identifier[write] operator[SEP] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[filename] operator[SEP] operator[SEP] operator[SEP]
}
Ke... |
public void setDataChannelProtection(int protection)
throws IOException, ServerException {
String protectionStr = null;
switch(protection) {
case GridFTPSession.PROTECTION_CLEAR:
protectionStr = "C"; break;
case GridFTPSession.PROTECTION_SAFE:
protectionS... | class class_name[name] begin[{]
method[setDataChannelProtection, return_type[void], modifier[public], parameter[protection]] begin[{]
local_variable[type[String], protectionStr]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=PROTECTION_CLEAR, postfix_operators=[], prefi... | Keyword[public] Keyword[void] identifier[setDataChannelProtection] operator[SEP] Keyword[int] identifier[protection] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServerException] {
identifier[String] identifier[protectionStr] operator[=] Other[null] operator[SEP] Keyword[switch] operator[S... |
public void setCronExpression (@Nonnull final String expression) throws ParseException
{
final CronExpression newExp = new CronExpression (expression);
setCronExpression (newExp);
} | class class_name[name] begin[{]
method[setCronExpression, return_type[void], modifier[public], parameter[expression]] begin[{]
local_variable[type[CronExpression], newExp]
call[.setCronExpression, parameter[member[.newExp]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setCronExpression] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[expression] operator[SEP] Keyword[throws] identifier[ParseException] {
Keyword[final] identifier[CronExpression] identifier[newExp] operator[=] Keyword[new] ide... |
public void setWorkplaceManager(CmsWorkplaceManager manager) {
m_workplaceManager = manager;
if (CmsLog.INIT.isInfoEnabled()) {
CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_WORKPLACE_INIT_FINISHED_0));
}
} | class class_name[name] begin[{]
method[setWorkplaceManager, return_type[void], modifier[public], parameter[manager]] begin[{]
assign[member[.m_workplaceManager], member[.manager]]
if[call[CmsLog.INIT.isInfoEnabled, parameter[]]] begin[{]
call[CmsLog.INIT.... | Keyword[public] Keyword[void] identifier[setWorkplaceManager] operator[SEP] identifier[CmsWorkplaceManager] identifier[manager] operator[SEP] {
identifier[m_workplaceManager] operator[=] identifier[manager] operator[SEP] Keyword[if] operator[SEP] identifier[CmsLog] operator[SEP] identifier[INIT] operator[SEP] id... |
@JsonIgnore
public void encodeAndSetContent(byte[] byteContent) {
if (byteContent == null) {
this.content = null;
return;
}
this.content = Base64.getEncoder().encodeToString(byteContent);
encoding = "base64";
} | class class_name[name] begin[{]
method[encodeAndSetContent, return_type[void], modifier[public], parameter[byteContent]] begin[{]
if[binary_operation[member[.byteContent], ==, literal[null]]] begin[{]
assign[THIS[member[None.content]], literal[null]]
return[N... | annotation[@] identifier[JsonIgnore] Keyword[public] Keyword[void] identifier[encodeAndSetContent] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[byteContent] operator[SEP] {
Keyword[if] operator[SEP] identifier[byteContent] operator[==] Other[null] operator[SEP] {
Keyword[this] op... |
public final void mT__24() throws RecognitionException {
try {
int _type = T__24;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalPureXbase.g:22:7: ( '-=' )
// InternalPureXbase.g:22:9: '-='
{
match("-=");
}
sta... | class class_name[name] begin[{]
method[mT__24, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=T__24, postfix_operators=[], prefix_operators=[]... | Keyword[public] Keyword[final] Keyword[void] identifier[mT__24] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
Keyword[int] identifier[_type] operator[=] identifier[T__24] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKE... |
public static PropertyChangeListener getPropChangeEnabler (
String property, JComponent target, boolean invert)
{
return new PropertyChangeEnabler(property, target, invert);
} | class class_name[name] begin[{]
method[getPropChangeEnabler, return_type[type[PropertyChangeListener]], modifier[public static], parameter[property, target, invert]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors... | Keyword[public] Keyword[static] identifier[PropertyChangeListener] identifier[getPropChangeEnabler] operator[SEP] identifier[String] identifier[property] , identifier[JComponent] identifier[target] , Keyword[boolean] identifier[invert] operator[SEP] {
Keyword[return] Keyword[new] identifier[PropertyChangeEnabl... |
@AroundInvoke
public Object execute(InvocationContext context) throws Exception {
String methodName = "execute";
String classOperationName = OpenTracingService.getClassOperationName(context.getMethod());
String methodOperationName = OpenTracingService.getMethodOperationName(context.getMetho... | class class_name[name] begin[{]
method[execute, return_type[type[Object]], modifier[public], parameter[context]] begin[{]
local_variable[type[String], methodName]
local_variable[type[String], classOperationName]
local_variable[type[String], methodOperationName]
if[binary... | annotation[@] identifier[AroundInvoke] Keyword[public] identifier[Object] identifier[execute] operator[SEP] identifier[InvocationContext] identifier[context] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] identifier[String... |
public Optional<SectionHeader> maybeGetSectionHeaderByRVA(long rva) {
List<SectionHeader> headers = table.getSectionHeaders();
for (SectionHeader header : headers) {
VirtualLocation vLoc = getVirtualSectionLocation(header);
if (addressIsWithin(vLoc, rva)) {
return... | class class_name[name] begin[{]
method[maybeGetSectionHeaderByRVA, return_type[type[Optional]], modifier[public], parameter[rva]] begin[{]
local_variable[type[List], headers]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableD... | Keyword[public] identifier[Optional] operator[<] identifier[SectionHeader] operator[>] identifier[maybeGetSectionHeaderByRVA] operator[SEP] Keyword[long] identifier[rva] operator[SEP] {
identifier[List] operator[<] identifier[SectionHeader] operator[>] identifier[headers] operator[=] identifier[table] operator[S... |
public <T> T find(Class<T> classType, String id, Params params) {
assertNotEmpty(classType, "Class");
assertNotEmpty(id, "id");
final URI uri = buildUri(getDBUri()).pathEncoded(id).query(params).build();
return get(uri, classType);
} | class class_name[name] begin[{]
method[find, return_type[type[T]], modifier[public], parameter[classType, id, params]] begin[{]
call[.assertNotEmpty, parameter[member[.classType], literal["Class"]]]
call[.assertNotEmpty, parameter[member[.id], literal["id"]]]
local_varia... | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[find] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[classType] , identifier[String] identifier[id] , identifier[Params] identifier[params] operator[SEP] {
identifier[assertNotEmpty] operator[SEP] i... |
@NonNull
public static LineString lineSlice(@NonNull Point startPt, @NonNull Point stopPt,
@NonNull LineString line) {
List<Point> coords = line.coordinates();
if (coords.size() < 2) {
throw new TurfException("Turf lineSlice requires a LineString made up of at leas... | class class_name[name] begin[{]
method[lineSlice, return_type[type[LineString]], modifier[public static], parameter[startPt, stopPt, line]] begin[{]
local_variable[type[List], coords]
if[binary_operation[call[coords.size, parameter[]], <, literal[2]]] begin[{]
ThrowStatement... | annotation[@] identifier[NonNull] Keyword[public] Keyword[static] identifier[LineString] identifier[lineSlice] operator[SEP] annotation[@] identifier[NonNull] identifier[Point] identifier[startPt] , annotation[@] identifier[NonNull] identifier[Point] identifier[stopPt] , annotation[@] identifier[NonNull] identifier[L... |
@Trivial
public static void erasePassword(@Sensitive byte[] pwdBytes) {
if (pwdBytes != null) {
for (int i = 0; i < pwdBytes.length; i++) {
pwdBytes[i] = 0x00;
}
}
} | class class_name[name] begin[{]
method[erasePassword, return_type[void], modifier[public static], parameter[pwdBytes]] begin[{]
if[binary_operation[member[.pwdBytes], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression... | annotation[@] identifier[Trivial] Keyword[public] Keyword[static] Keyword[void] identifier[erasePassword] operator[SEP] annotation[@] identifier[Sensitive] Keyword[byte] operator[SEP] operator[SEP] identifier[pwdBytes] operator[SEP] {
Keyword[if] operator[SEP] identifier[pwdBytes] operator[!=] Other[null] operat... |
protected void destroy()
{
try{close();}
catch (IOException e){LogSupport.ignore(log,e);}
catch (Exception e){log.warn(LogSupport.EXCEPTION,e);}
// Destroy request and response
if (_request!=null)
_request.destroy();
if (_response!=null)
... | class class_name[name] begin[{]
method[destroy, return_type[void], modifier[protected], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=... | Keyword[protected] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[close] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] {
identifier[LogSupport] operator[SE... |
public static void main(String... args) {
final String cfgpath = "../docs/configuration/belframework.cfg";
final File cfgfile = new File(cfgpath);
try {
SystemConfiguration syscfg = createSystemConfiguration(cfgfile);
out.println(syscfg.defaultConfiguration());
} ... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
local_variable[type[String], cfgpath]
local_variable[type[File], cfgfile]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimen... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[...] identifier[args] operator[SEP] {
Keyword[final] identifier[String] identifier[cfgpath] operator[=] literal[String] operator[SEP] Keyword[final] identifier[File] identifier[cfgfile] operator[=] Keyword[ne... |
public static boolean isValid(final String cssValue) {
// TODO modify to make a strict validation
if (cssValue == null || StringUtil.isBlank(cssValue)) {
return false;
}
final List<String> cssValueParts = CssValueUtil.split(cssValue);
BorderBottomWidth borderBottomW... | class class_name[name] begin[{]
method[isValid, return_type[type[boolean]], modifier[public static], parameter[cssValue]] begin[{]
if[binary_operation[binary_operation[member[.cssValue], ==, literal[null]], ||, call[StringUtil.isBlank, parameter[member[.cssValue]]]]] begin[{]
return... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isValid] operator[SEP] Keyword[final] identifier[String] identifier[cssValue] operator[SEP] {
Keyword[if] operator[SEP] identifier[cssValue] operator[==] Other[null] operator[||] identifier[StringUtil] operator[SEP] identifier[isBlank] operator[SEP] ide... |
public <T> List<Long> insertAll(Collection<T> records, boolean withTransaction) {
return insertAll(this.getTableNameByEntity(records.iterator().next()), records, withTransaction);
} | class class_name[name] begin[{]
method[insertAll, return_type[type[List]], modifier[public], parameter[records, withTransaction]] begin[{]
return[call[.insertAll, parameter[THIS[call[None.getTableNameByEntity, parameter[call[records.iterator, parameter[]]]]], member[.records], member[.withTransaction]]... | Keyword[public] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[Long] operator[>] identifier[insertAll] operator[SEP] identifier[Collection] operator[<] identifier[T] operator[>] identifier[records] , Keyword[boolean] identifier[withTransaction] operator[SEP] {
Keyword[return] iden... |
public double generalizedSpread(Front front, Front referenceFront) {
int numberOfObjectives = front.getPoint(0).getDimension() ;
Point[] extremeValues = new Point[numberOfObjectives] ;
for (int i = 0; i < numberOfObjectives; i++) {
referenceFront.sort(new PointDimensionComparator(i));
Point new... | class class_name[name] begin[{]
method[generalizedSpread, return_type[type[double]], modifier[public], parameter[front, referenceFront]] begin[{]
local_variable[type[int], numberOfObjectives]
local_variable[type[Point], extremeValues]
ForStatement(body=BlockStatement(label=None, stateme... | Keyword[public] Keyword[double] identifier[generalizedSpread] operator[SEP] identifier[Front] identifier[front] , identifier[Front] identifier[referenceFront] operator[SEP] {
Keyword[int] identifier[numberOfObjectives] operator[=] identifier[front] operator[SEP] identifier[getPoint] operator[SEP] Other[0] opera... |
public void recoverLease(String src, String clientName) throws IOException {
namesystem.recoverLease(src, clientName, getClientMachine(), false);
} | class class_name[name] begin[{]
method[recoverLease, return_type[void], modifier[public], parameter[src, clientName]] begin[{]
call[namesystem.recoverLease, parameter[member[.src], member[.clientName], call[.getClientMachine, parameter[]], literal[false]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[recoverLease] operator[SEP] identifier[String] identifier[src] , identifier[String] identifier[clientName] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[namesystem] operator[SEP] identifier[recoverLease] operator[SEP] identifier[src] , identifier[cl... |
public static byte convertToByte (@Nonnull final Object aSrcValue)
{
if (aSrcValue == null)
throw new TypeConverterException (byte.class, EReason.NULL_SOURCE_NOT_ALLOWED);
final Byte aValue = convert (aSrcValue, Byte.class);
return aValue.byteValue ();
} | class class_name[name] begin[{]
method[convertToByte, return_type[type[byte]], modifier[public static], parameter[aSrcValue]] begin[{]
if[binary_operation[member[.aSrcValue], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[ClassReference(postfix_operators=[], pref... | Keyword[public] Keyword[static] Keyword[byte] identifier[convertToByte] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Object] identifier[aSrcValue] operator[SEP] {
Keyword[if] operator[SEP] identifier[aSrcValue] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identi... |
private void writeObject(ObjectOutputStream oos) throws IOException
{
boolean origSer = serializing;
serializing = true;
try
{
oos.defaultWriteObject();
bcsPreSerializationHook(oos);
if (this == getBeanContextPeer())
{
writeChildren(oos);
}
synchronized (bcmListeners)
{
seriali... | class class_name[name] begin[{]
method[writeObject, return_type[void], modifier[private], parameter[oos]] begin[{]
local_variable[type[boolean], origSer]
assign[member[.serializing], literal[true]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[],... | Keyword[private] Keyword[void] identifier[writeObject] operator[SEP] identifier[ObjectOutputStream] identifier[oos] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[boolean] identifier[origSer] operator[=] identifier[serializing] operator[SEP] identifier[serializing] operator[=] literal[boolean] o... |
public static Function<String, String> first(int n) {
return new FirstLimiter(Math.min(n, MAX_LIMIT));
} | class class_name[name] begin[{]
method[first, return_type[type[Function]], modifier[public static], parameter[n]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MA... | Keyword[public] Keyword[static] identifier[Function] operator[<] identifier[String] , identifier[String] operator[>] identifier[first] operator[SEP] Keyword[int] identifier[n] operator[SEP] {
Keyword[return] Keyword[new] identifier[FirstLimiter] operator[SEP] identifier[Math] operator[SEP] identifier[min] opera... |
private MetricalIndexTree<O, N, E> getMetricalIndex(Relation<? extends O> relation) throws IllegalStateException {
MetricalIndexTree<O, N, E> ret = null;
for(It<MetricalIndexTree<O, N, E>> iter = relation.getHierarchy().iterDescendants(relation).filter(MetricalIndexTree.class); iter.valid(); iter.advance()) {
... | class class_name[name] begin[{]
method[getMetricalIndex, return_type[type[MetricalIndexTree]], modifier[private], parameter[relation]] begin[{]
local_variable[type[MetricalIndexTree], ret]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Me... | Keyword[private] identifier[MetricalIndexTree] operator[<] identifier[O] , identifier[N] , identifier[E] operator[>] identifier[getMetricalIndex] operator[SEP] identifier[Relation] operator[<] operator[?] Keyword[extends] identifier[O] operator[>] identifier[relation] operator[SEP] Keyword[throws] identifier[IllegalS... |
protected Object call() {
InternalPartitionService service = getService(InternalPartitionService.SERVICE_NAME);
service.firstArrangement();
PartitionTableView partitionTableView = service.createPartitionTableView();
int partitionStateVersion = partitionTableView.getVersion();
Col... | class class_name[name] begin[{]
method[call, return_type[type[Object]], modifier[protected], parameter[]] begin[{]
local_variable[type[InternalPartitionService], service]
call[service.firstArrangement, parameter[]]
local_variable[type[PartitionTableView], partitionTableView]
... | Keyword[protected] identifier[Object] identifier[call] operator[SEP] operator[SEP] {
identifier[InternalPartitionService] identifier[service] operator[=] identifier[getService] operator[SEP] identifier[InternalPartitionService] operator[SEP] identifier[SERVICE_NAME] operator[SEP] operator[SEP] identifier[service... |
@Override
void visitEnclosingElement(ImageElement element,
ImageElement key, String value)
throws IOException {
printIndents();
write(element + " [" + key + " = " + value + "]\n");
dc.incLevel();
} | class class_name[name] begin[{]
method[visitEnclosingElement, return_type[void], modifier[default], parameter[element, key, value]] begin[{]
call[.printIndents, parameter[]]
call[.write, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operati... | annotation[@] identifier[Override] Keyword[void] identifier[visitEnclosingElement] operator[SEP] identifier[ImageElement] identifier[element] , identifier[ImageElement] identifier[key] , identifier[String] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[printIndents] operat... |
public String getFullDatabaseKey() {
if (m_fullDatabaseKey == null) {
m_fullDatabaseKey = getExtProperty("db.name") + "_sql";
}
if (CmsStringUtil.isEmpty(m_fullDatabaseKey) || m_fullDatabaseKey.equals("_sql")) {
m_fullDatabaseKey = getSortedDatabases().get(0) + "_sql";
... | class class_name[name] begin[{]
method[getFullDatabaseKey, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_fullDatabaseKey], ==, literal[null]]] begin[{]
assign[member[.m_fullDatabaseKey], binary_operation[call[.getExtProp... | Keyword[public] identifier[String] identifier[getFullDatabaseKey] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_fullDatabaseKey] operator[==] Other[null] operator[SEP] {
identifier[m_fullDatabaseKey] operator[=] identifier[getExtProperty] operator[SEP] literal[String] operator[S... |
public void marshall(Server server, ProtocolMarshaller protocolMarshaller) {
if (server == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(server.getServerId(), SERVERID_BINDING);
protocol... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[server, protocolMarshaller]] begin[{]
if[binary_operation[member[.server], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pre... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Server] identifier[server] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[server] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] iden... |
@Override
public String innerText() {
CharSequence text = realTextView.getText();
return (text == null || realTextView.getVisibility() != View.VISIBLE) ? "" : text.toString();
} | class class_name[name] begin[{]
method[innerText, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[CharSequence], text]
return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=text, postfix_operators=[], p... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[innerText] operator[SEP] operator[SEP] {
identifier[CharSequence] identifier[text] operator[=] identifier[realTextView] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identi... |
public synchronized V remove(Object key, boolean internal) {
// noinspection SuspiciousMethodCalls
CacheObject<V> cacheObject = map.remove(key);
// If the object is not in cache, stop trying to remove it.
if (cacheObject == null) {
return null;
}
// Remove fro... | class class_name[name] begin[{]
method[remove, return_type[type[V]], modifier[synchronized public], parameter[key, internal]] begin[{]
local_variable[type[CacheObject], cacheObject]
if[binary_operation[member[.cacheObject], ==, literal[null]]] begin[{]
return[literal[null]]
... | Keyword[public] Keyword[synchronized] identifier[V] identifier[remove] operator[SEP] identifier[Object] identifier[key] , Keyword[boolean] identifier[internal] operator[SEP] {
identifier[CacheObject] operator[<] identifier[V] operator[>] identifier[cacheObject] operator[=] identifier[map] operator[SEP] identifi... |
@Override
public void doRun() {
if (!cluster.isConnected()) {
LOG.info("Cluster not connected yet, delaying index field type initialization until it is reachable.");
while (true) {
try {
cluster.waitForConnectedAndDeflectorHealthy();
... | class class_name[name] begin[{]
method[doRun, return_type[void], modifier[public], parameter[]] begin[{]
if[call[cluster.isConnected, parameter[]]] begin[{]
call[LOG.info, parameter[literal["Cluster not connected yet, delaying index field type initialization until it is ... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[doRun] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[cluster] operator[SEP] identifier[isConnected] operator[SEP] operator[SEP] operator[SEP] {
identifier[LOG] operator[SEP] identifier[info] op... |
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public TagContext getCurrentTagContext(Data data) {
return data.tagger.getCurrentTagContext();
} | class class_name[name] begin[{]
method[getCurrentTagContext, return_type[type[TagContext]], modifier[public], parameter[data]] begin[{]
return[call[data.tagger.getCurrentTagContext, parameter[]]]
end[}]
END[}] | annotation[@] identifier[Benchmark] annotation[@] identifier[BenchmarkMode] operator[SEP] identifier[Mode] operator[SEP] identifier[AverageTime] operator[SEP] annotation[@] identifier[OutputTimeUnit] operator[SEP] identifier[TimeUnit] operator[SEP] identifier[NANOSECONDS] operator[SEP] Keyword[public] identifier[TagCon... |
private void invalidateCaches(Conversation conversation) {
checkConversationQueue();
conversation.setInteractionExpiration(0L);
Configuration config = Configuration.load();
config.setConfigurationCacheExpirationMillis(System.currentTimeMillis());
config.save();
} | class class_name[name] begin[{]
method[invalidateCaches, return_type[void], modifier[private], parameter[conversation]] begin[{]
call[.checkConversationQueue, parameter[]]
call[conversation.setInteractionExpiration, parameter[literal[0L]]]
local_variable[type[Configurati... | Keyword[private] Keyword[void] identifier[invalidateCaches] operator[SEP] identifier[Conversation] identifier[conversation] operator[SEP] {
identifier[checkConversationQueue] operator[SEP] operator[SEP] operator[SEP] identifier[conversation] operator[SEP] identifier[setInteractionExpiration] operator[SEP] Other[... |
public boolean hasAnnoAnywhere(Type annoType) {
if (getAnnoFor(annoType) != null) {
return true;
}
for (FieldInfo field : fields) {
if (field.hasAnno(annoType)) {
return true;
}
}
for (MethodInfo method : methods.values... | class class_name[name] begin[{]
method[hasAnnoAnywhere, return_type[type[boolean]], modifier[public], parameter[annoType]] begin[{]
if[binary_operation[call[.getAnnoFor, parameter[member[.annoType]]], !=, literal[null]]] begin[{]
return[literal[true]]
else begin[{]
None
... | Keyword[public] Keyword[boolean] identifier[hasAnnoAnywhere] operator[SEP] identifier[Type] identifier[annoType] operator[SEP] {
Keyword[if] operator[SEP] identifier[getAnnoFor] operator[SEP] identifier[annoType] operator[SEP] operator[!=] Other[null] operator[SEP] {
Keyword[return] literal[boolean] o... |
public boolean addHeader(String name, String content) {
try {
return add(new Header(name, content));
} catch (DocumentException de) {
throw new ExceptionConverter(de);
}
} | class class_name[name] begin[{]
method[addHeader, return_type[type[boolean]], modifier[public], parameter[name, content]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], q... | Keyword[public] Keyword[boolean] identifier[addHeader] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[content] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[add] operator[SEP] Keyword[new] identifier[Header] operator[SEP] identifier[name] , identifier[c... |
protected double getOldCentroidScore(DoubleVector vector,
int oldCentroidIndex,
int altClusterSize) {
return subtractedMagnitudeSqrd(centroids[oldCentroidIndex], vector) /
altClusterSize;
// Math.pow(altCurr... | class class_name[name] begin[{]
method[getOldCentroidScore, return_type[type[double]], modifier[protected], parameter[vector, oldCentroidIndex, altClusterSize]] begin[{]
return[binary_operation[call[.subtractedMagnitudeSqrd, parameter[member[.centroids], member[.vector]]], /, member[.altClusterSize]]]
... | Keyword[protected] Keyword[double] identifier[getOldCentroidScore] operator[SEP] identifier[DoubleVector] identifier[vector] , Keyword[int] identifier[oldCentroidIndex] , Keyword[int] identifier[altClusterSize] operator[SEP] {
Keyword[return] identifier[subtractedMagnitudeSqrd] operator[SEP] identifier[centroi... |
private NodeList getByName(String name) {
NodeList answer = new NodeList();
for (Object child : children()) {
if (child instanceof Node) {
Node childNode = (Node) child;
Object childNodeName = childNode.name();
if (childNodeName instanceof QNam... | class class_name[name] begin[{]
method[getByName, return_type[type[NodeList]], modifier[private], parameter[name]] begin[{]
local_variable[type[NodeList], answer]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=child... | Keyword[private] identifier[NodeList] identifier[getByName] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[NodeList] identifier[answer] operator[=] Keyword[new] identifier[NodeList] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[ch... |
public static MetricContext newContextFromReferenceContext(MetricContext context, List<Tag<?>> newTags,
Optional<String> name) {
String newName = name.orNull();
if (Strings.isNullOrEmpty(newName)) {
UUID uuid = UUID.randomUUID();
String randomIdPrefix = "uuid:";
String oldName = conte... | class class_name[name] begin[{]
method[newContextFromReferenceContext, return_type[type[MetricContext]], modifier[public static], parameter[context, newTags, name]] begin[{]
local_variable[type[String], newName]
if[call[Strings.isNullOrEmpty, parameter[member[.newName]]]] begin[{]
... | Keyword[public] Keyword[static] identifier[MetricContext] identifier[newContextFromReferenceContext] operator[SEP] identifier[MetricContext] identifier[context] , identifier[List] operator[<] identifier[Tag] operator[<] operator[?] operator[>] operator[>] identifier[newTags] , identifier[Optional] operator[<] identif... |
public static Slice rightTrim(Slice utf8, int[] whiteSpaceCodePoints)
{
int position = lastNonMatchPosition(utf8, 0, whiteSpaceCodePoints);
return utf8.slice(0, position);
} | class class_name[name] begin[{]
method[rightTrim, return_type[type[Slice]], modifier[public static], parameter[utf8, whiteSpaceCodePoints]] begin[{]
local_variable[type[int], position]
return[call[utf8.slice, parameter[literal[0], member[.position]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Slice] identifier[rightTrim] operator[SEP] identifier[Slice] identifier[utf8] , Keyword[int] operator[SEP] operator[SEP] identifier[whiteSpaceCodePoints] operator[SEP] {
Keyword[int] identifier[position] operator[=] identifier[lastNonMatchPosition] operator[SEP] identi... |
public SQLStatement judge() {
LexerEngine lexerEngine = LexerEngineFactory.newInstance(DatabaseType.MySQL, sql);
lexerEngine.nextToken();
while (true) {
TokenType tokenType = lexerEngine.getCurrentToken().getType();
if (tokenType instanceof Keyword) {
if (... | class class_name[name] begin[{]
method[judge, return_type[type[SQLStatement]], modifier[public], parameter[]] begin[{]
local_variable[type[LexerEngine], lexerEngine]
call[lexerEngine.nextToken, parameter[]]
while[literal[true]] begin[{]
local_variable[type[To... | Keyword[public] identifier[SQLStatement] identifier[judge] operator[SEP] operator[SEP] {
identifier[LexerEngine] identifier[lexerEngine] operator[=] identifier[LexerEngineFactory] operator[SEP] identifier[newInstance] operator[SEP] identifier[DatabaseType] operator[SEP] identifier[MySQL] , identifier[sql] opera... |
static String parms(String types) {
int[] pos = new int[] { 0 };
StringBuilder sb = new StringBuilder();
boolean first = true;
String t;
while ((t = desc(types, pos)) != null) {
if (first) {
first = false;
} else {
sb.app... | class class_name[name] begin[{]
method[parms, return_type[type[String]], modifier[static], parameter[types]] begin[{]
local_variable[type[int], pos]
local_variable[type[StringBuilder], sb]
local_variable[type[boolean], first]
local_variable[type[String], t]
while... | Keyword[static] identifier[String] identifier[parms] operator[SEP] identifier[String] identifier[types] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[pos] operator[=] Keyword[new] Keyword[int] operator[SEP] operator[SEP] {
Other[0]
} operator[SEP] identifier[StringBuilder]... |
@Override
public Set<String> basicRecordTypes() {
Set<String> types = new LinkedHashSet<String>();
types.addAll(Arrays.asList("A", "AAAA", "CNAME", "MX", "NS", "SRV", "TXT"));
return types;
} | class class_name[name] begin[{]
method[basicRecordTypes, return_type[type[Set]], modifier[public], parameter[]] begin[{]
local_variable[type[Set], types]
call[types.addAll, parameter[call[Arrays.asList, parameter[literal["A"], literal["AAAA"], literal["CNAME"], literal["MX"], literal["N... | annotation[@] identifier[Override] Keyword[public] identifier[Set] operator[<] identifier[String] operator[>] identifier[basicRecordTypes] operator[SEP] operator[SEP] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[types] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] iden... |
public int compareTo(Object o) {
int thisValue = this.value;
int thatValue = ((IntWritable) o).value;
return (thisValue < thatValue ? -1 : (thisValue == thatValue ? 0 : 1));
} | class class_name[name] begin[{]
method[compareTo, return_type[type[int]], modifier[public], parameter[o]] begin[{]
local_variable[type[int], thisValue]
local_variable[type[int], thatValue]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=thisValue, post... | Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
Keyword[int] identifier[thisValue] operator[=] Keyword[this] operator[SEP] identifier[value] operator[SEP] Keyword[int] identifier[thatValue] operator[=] operator[SEP] operator[SEP] identifier[IntWri... |
@Override
public void commit() {
List<Key> deletes = new ArrayList<Key>();
deletes.add(Translation.toEntity(lock, Keys.create(
Translation.toKind(entity.getClass()),
Entities.keyValue(entity))).getKey());
Key transactionKey = KeyFactory.stringToKey(lock.transaction());
if (Keys.ancestor(transaction... | class class_name[name] begin[{]
method[commit, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[List], deletes]
call[deletes.add, parameter[call[Translation.toEntity, parameter[member[.lock], call[Keys.create, parameter[call[Translation.toKind, parameter[ca... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[commit] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Key] operator[>] identifier[deletes] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Key] operator[>] operator[SEP] operator[SEP] operato... |
public void fetchFile(URL url, File outputPath) throws DownloadFailedException {
fetchFile(url, outputPath, true);
} | class class_name[name] begin[{]
method[fetchFile, return_type[void], modifier[public], parameter[url, outputPath]] begin[{]
call[.fetchFile, parameter[member[.url], member[.outputPath], literal[true]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[fetchFile] operator[SEP] identifier[URL] identifier[url] , identifier[File] identifier[outputPath] operator[SEP] Keyword[throws] identifier[DownloadFailedException] {
identifier[fetchFile] operator[SEP] identifier[url] , identifier[outputPath] , literal[boolean] operat... |
public static PTransform<PCollection<KV<String, Iterable<Mutation>>>, PDone>
writeToMultipleTables(CloudBigtableConfiguration config) {
return new CloudBigtableWriteTransform<>(new CloudBigtableMultiTableWriteFn(config), config);
} | class class_name[name] begin[{]
method[writeToMultipleTables, return_type[type[PTransform]], modifier[public static], parameter[config]] begin[{]
return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], ... | Keyword[public] Keyword[static] identifier[PTransform] operator[<] identifier[PCollection] operator[<] identifier[KV] operator[<] identifier[String] , identifier[Iterable] operator[<] identifier[Mutation] operator[>] operator[>] operator[>] , identifier[PDone] operator[>] identifier[writeToMultipleTables] operator[SE... |
public static CommercePriceEntry fetchByCPInstanceUuid_Last(
String CPInstanceUuid,
OrderByComparator<CommercePriceEntry> orderByComparator) {
return getPersistence()
.fetchByCPInstanceUuid_Last(CPInstanceUuid, orderByComparator);
} | class class_name[name] begin[{]
method[fetchByCPInstanceUuid_Last, return_type[type[CommercePriceEntry]], modifier[public static], parameter[CPInstanceUuid, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CommercePriceEntry] identifier[fetchByCPInstanceUuid_Last] operator[SEP] identifier[String] identifier[CPInstanceUuid] , identifier[OrderByComparator] operator[<] identifier[CommercePriceEntry] operator[>] identifier[orderByComparator] operator[SEP] {
Keyword[return] i... |
@CheckReturnValue
@NonNull
public final <U> ParallelFlowable<U> compose(@NonNull ParallelTransformer<T, U> composer) {
return RxJavaPlugins.onAssembly(ObjectHelper.requireNonNull(composer, "composer is null").apply(this));
} | class class_name[name] begin[{]
method[compose, return_type[type[ParallelFlowable]], modifier[final public], parameter[composer]] begin[{]
return[call[RxJavaPlugins.onAssembly, parameter[call[ObjectHelper.requireNonNull, parameter[member[.composer], literal["composer is null"]]]]]]
end[}]
END[}] | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[NonNull] Keyword[public] Keyword[final] operator[<] identifier[U] operator[>] identifier[ParallelFlowable] operator[<] identifier[U] operator[>] identifier[compose] operator[SEP] annotation[@] identifier[NonNull] identifier[ParallelTransformer] operato... |
@Pure
@Inline(value = "ReflectionUtil.forName(($1), true, ($2))", imported = {ReflectionUtil.class})
public static Class<?> forName(String name, ClassLoader loader) throws ClassNotFoundException {
return forName(name, true, loader);
} | class class_name[name] begin[{]
method[forName, return_type[type[Class]], modifier[public static], parameter[name, loader]] begin[{]
return[call[.forName, parameter[member[.name], literal[true], member[.loader]]]]
end[}]
END[}] | annotation[@] identifier[Pure] annotation[@] identifier[Inline] operator[SEP] identifier[value] operator[=] literal[String] , identifier[imported] operator[=] {
identifier[ReflectionUtil] operator[SEP] Keyword[class]
} operator[SEP] Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] op... |
public MappedListIterator<VLinkedPagedKey, LK> listIterator(LK linearKey,
boolean next,
Integer pageId) {
return new VLinkedPagedListIterator<I, LK>(_index, _serializer, linearKey, nex... | class class_name[name] begin[{]
method[listIterator, return_type[type[MappedListIterator]], modifier[public], parameter[linearKey, next, pageId]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(... | Keyword[public] identifier[MappedListIterator] operator[<] identifier[VLinkedPagedKey] , identifier[LK] operator[>] identifier[listIterator] operator[SEP] identifier[LK] identifier[linearKey] , Keyword[boolean] identifier[next] , identifier[Integer] identifier[pageId] operator[SEP] {
Keyword[return] Keyword[n... |
private void addFileToList(final CmsFileInfo file, boolean invalid, boolean existingDeleted, boolean isTooLarge) {
CmsListInfoBean infoBean = createInfoBean(file);
CmsListItemWidget listItemWidget = new CmsListItemWidget(infoBean);
listItemWidget.setIcon(CmsCoreProvider.get().getResourceTypeIco... | class class_name[name] begin[{]
method[addFileToList, return_type[void], modifier[private], parameter[file, invalid, existingDeleted, isTooLarge]] begin[{]
local_variable[type[CmsListInfoBean], infoBean]
local_variable[type[CmsListItemWidget], listItemWidget]
call[listItemWidget... | Keyword[private] Keyword[void] identifier[addFileToList] operator[SEP] Keyword[final] identifier[CmsFileInfo] identifier[file] , Keyword[boolean] identifier[invalid] , Keyword[boolean] identifier[existingDeleted] , Keyword[boolean] identifier[isTooLarge] operator[SEP] {
identifier[CmsListInfoBean] identifier[... |
public synchronized TableModel<V> insertColumn(int index, String label, V[] newColumnValues) {
columns.add(index, label);
for(int i = 0; i < rows.size(); i++) {
List<V> row = rows.get(i);
//Pad row with null if necessary
for(int j = row.size(); j < index; j++) {
... | class class_name[name] begin[{]
method[insertColumn, return_type[type[TableModel]], modifier[synchronized public], parameter[index, label, newColumnValues]] begin[{]
call[columns.add, parameter[member[.index], member[.label]]]
ForStatement(body=BlockStatement(label=None, statements=[Loc... | Keyword[public] Keyword[synchronized] identifier[TableModel] operator[<] identifier[V] operator[>] identifier[insertColumn] operator[SEP] Keyword[int] identifier[index] , identifier[String] identifier[label] , identifier[V] operator[SEP] operator[SEP] identifier[newColumnValues] operator[SEP] {
identifier[colu... |
public void raActive() {
activities = new ConcurrentHashMap<HttpClientActivityHandle, HttpClientActivity>();
executorService = Executors.newCachedThreadPool();
if (httpClientFactory != null) {
httpclient = httpClientFactory.newHttpClient();
} else {
HttpPara... | class class_name[name] begin[{]
method[raActive, return_type[void], modifier[public], parameter[]] begin[{]
assign[member[.activities], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceT... | Keyword[public] Keyword[void] identifier[raActive] operator[SEP] operator[SEP] {
identifier[activities] operator[=] Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[HttpClientActivityHandle] , identifier[HttpClientActivity] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[execut... |
public Long del(Object... keys) {
Jedis jedis = getJedis();
try {
return jedis.del(keysToBytesArray(keys));
}
finally {close(jedis);}
} | class class_name[name] begin[{]
method[del, return_type[type[Long]], modifier[public], parameter[keys]] begin[{]
local_variable[type[Jedis], jedis]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=keys, postfix_operato... | Keyword[public] identifier[Long] identifier[del] operator[SEP] identifier[Object] operator[...] identifier[keys] operator[SEP] {
identifier[Jedis] identifier[jedis] operator[=] identifier[getJedis] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[return] identifier[jedis] operator[SEP]... |
public List<Channel> listByIds(Long... identities) {
List<Channel> channels = new ArrayList<Channel>();
try {
List<ChannelDO> channelDos = null;
if (identities.length < 1) {
channelDos = channelDao.listAll();
if (channelDos.isEmpty()) {
... | class class_name[name] begin[{]
method[listByIds, return_type[type[List]], modifier[public], parameter[identities]] begin[{]
local_variable[type[List], channels]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postf... | Keyword[public] identifier[List] operator[<] identifier[Channel] operator[>] identifier[listByIds] operator[SEP] identifier[Long] operator[...] identifier[identities] operator[SEP] {
identifier[List] operator[<] identifier[Channel] operator[>] identifier[channels] operator[=] Keyword[new] identifier[ArrayList] o... |
public void marshall(IpSet ipSet, ProtocolMarshaller protocolMarshaller) {
if (ipSet == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(ipSet.getIpFamily(), IPFAMILY_BINDING);
protocolMars... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[ipSet, protocolMarshaller]] begin[{]
if[binary_operation[member[.ipSet], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefi... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[IpSet] identifier[ipSet] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[ipSet] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identif... |
public void divide(PairDblInt[] cols, double val) {
for (int i = 0; i < numLabels; i++) {
cols[i].first /= val;
}
} | class class_name[name] begin[{]
method[divide, return_type[void], modifier[public], parameter[cols, val]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cols, postfix_operators=[], prefix_operators=[], quali... | Keyword[public] Keyword[void] identifier[divide] operator[SEP] identifier[PairDblInt] operator[SEP] operator[SEP] identifier[cols] , Keyword[double] identifier[val] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numLa... |
public ParserTokenType lookAheadType(int distance) {
ParserToken token = lookAhead(distance);
return token == null ? null : token.type;
} | class class_name[name] begin[{]
method[lookAheadType, return_type[type[ParserTokenType]], modifier[public], parameter[distance]] begin[{]
local_variable[type[ParserToken], token]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=token, postfix_operators=[], pref... | Keyword[public] identifier[ParserTokenType] identifier[lookAheadType] operator[SEP] Keyword[int] identifier[distance] operator[SEP] {
identifier[ParserToken] identifier[token] operator[=] identifier[lookAhead] operator[SEP] identifier[distance] operator[SEP] operator[SEP] Keyword[return] identifier[token] operat... |
private <T> Single<PollingState<T>> pollPostOrDeleteSingleAsync(final PollingState<T> pollingState, final Type resourceType) {
pollingState.withResourceType(resourceType);
pollingState.withSerializerAdapter(restClient().serializerAdapter());
if (pollingState.isStatusTerminal()) {
if ... | class class_name[name] begin[{]
method[pollPostOrDeleteSingleAsync, return_type[type[Single]], modifier[private], parameter[pollingState, resourceType]] begin[{]
call[pollingState.withResourceType, parameter[member[.resourceType]]]
call[pollingState.withSerializerAdapter, parame... | Keyword[private] operator[<] identifier[T] operator[>] identifier[Single] operator[<] identifier[PollingState] operator[<] identifier[T] operator[>] operator[>] identifier[pollPostOrDeleteSingleAsync] operator[SEP] Keyword[final] identifier[PollingState] operator[<] identifier[T] operator[>] identifier[pollingState] , ... |
public static <CT, ET> Iterator<Pair<CT, ET>> counted(ET[] array, Range<CT> range) {
dbc.precondition(array != null, "cannot call counted with a null array");
return new ZipShortestIterator<CT, ET>(range.iterator(), new ArrayIterator<ET>(array));
} | class class_name[name] begin[{]
method[counted, return_type[type[Iterator]], modifier[public static], parameter[array, range]] begin[{]
call[dbc.precondition, parameter[binary_operation[member[.array], !=, literal[null]], literal["cannot call counted with a null array"]]]
return[ClassCr... | Keyword[public] Keyword[static] operator[<] identifier[CT] , identifier[ET] operator[>] identifier[Iterator] operator[<] identifier[Pair] operator[<] identifier[CT] , identifier[ET] operator[>] operator[>] identifier[counted] operator[SEP] identifier[ET] operator[SEP] operator[SEP] identifier[array] , identifier[Ran... |
protected static ControlCreateDurable createDurableCreateDurable(
MessageProcessor MP,
ConsumerDispatcherState subState,
long reqID,
SIBUuid8 dme)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "createDurableCreateDurable", new Object[] {MP, subState, new... | class class_name[name] begin[{]
method[createDurableCreateDurable, return_type[type[ControlCreateDurable]], modifier[static protected], parameter[MP, subState, reqID, dme]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[... | Keyword[protected] Keyword[static] identifier[ControlCreateDurable] identifier[createDurableCreateDurable] operator[SEP] identifier[MessageProcessor] identifier[MP] , identifier[ConsumerDispatcherState] identifier[subState] , Keyword[long] identifier[reqID] , identifier[SIBUuid8] identifier[dme] operator[SEP] {
... |
protected void validate(ST st, Set<String> expectedArguments){
Map<?,?> formalArgs = st.impl.formalArguments;
if(formalArgs==null){
for(String s : expectedArguments){
this.errors.addError("ST <{}> does not define argument <{}>", st.getName(), s);
}
}
else{
for(String s : expectedArguments){
if(... | class class_name[name] begin[{]
method[validate, return_type[void], modifier[protected], parameter[st, expectedArguments]] begin[{]
local_variable[type[Map], formalArgs]
if[binary_operation[member[.formalArgs], ==, literal[null]]] begin[{]
ForStatement(body=BlockStatement(la... | Keyword[protected] Keyword[void] identifier[validate] operator[SEP] identifier[ST] identifier[st] , identifier[Set] operator[<] identifier[String] operator[>] identifier[expectedArguments] operator[SEP] {
identifier[Map] operator[<] operator[?] , operator[?] operator[>] identifier[formalArgs] operator[=] ident... |
public void setStringAttribute(String name, String value) {
Attribute attribute = getAttributes().get(name);
if (!(attribute instanceof StringAttribute)) {
throw new IllegalStateException("Cannot set boolean value on attribute with different type, " +
attribute.getClass().getName() + " setting value " + val... | class class_name[name] begin[{]
method[setStringAttribute, return_type[void], modifier[public], parameter[name, value]] begin[{]
local_variable[type[Attribute], attribute]
if[binary_operation[member[.attribute], instanceof, type[StringAttribute]]] begin[{]
ThrowStatement(exp... | Keyword[public] Keyword[void] identifier[setStringAttribute] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] {
identifier[Attribute] identifier[attribute] operator[=] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[get] operat... |
public void write(XMLStreamWriter writer, AttributeDefinition<?> def, String name) throws XMLStreamException {
Attribute<?> attribute = attribute(def);
attribute.write(writer, name);
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[writer, def, name]] begin[{]
local_variable[type[Attribute], attribute]
call[attribute.write, parameter[member[.writer], member[.name]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[XMLStreamWriter] identifier[writer] , identifier[AttributeDefinition] operator[<] operator[?] operator[>] identifier[def] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[XMLStreamException] {
identifier[Attr... |
public HtmlTree getScriptProperties() {
HtmlTree script = HtmlTree.SCRIPT("text/javascript",
pathToRoot.resolve(DocPaths.JAVASCRIPT).getPath());
return script;
} | class class_name[name] begin[{]
method[getScriptProperties, return_type[type[HtmlTree]], modifier[public], parameter[]] begin[{]
local_variable[type[HtmlTree], script]
return[member[.script]]
end[}]
END[}] | Keyword[public] identifier[HtmlTree] identifier[getScriptProperties] operator[SEP] operator[SEP] {
identifier[HtmlTree] identifier[script] operator[=] identifier[HtmlTree] operator[SEP] identifier[SCRIPT] operator[SEP] literal[String] , identifier[pathToRoot] operator[SEP] identifier[resolve] operator[SEP] iden... |
public Query getOptimizedQuery() {
// if (isOptimizable()) {
// return _baseQuery;
// }
// create a copy/clone of the original query
Query q = _baseQuery.clone();
Set<Entry<FilterConsumer, FilterOutcome>> entries = _optimizedFilters.entrySet();
for (Entry<Filter... | class class_name[name] begin[{]
method[getOptimizedQuery, return_type[type[Query]], modifier[public], parameter[]] begin[{]
local_variable[type[Query], q]
local_variable[type[Set], entries]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[],... | Keyword[public] identifier[Query] identifier[getOptimizedQuery] operator[SEP] operator[SEP] {
identifier[Query] identifier[q] operator[=] identifier[_baseQuery] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Entry] operator[<] identifier[FilterCon... |
public void addMarker(T marker) {
final MarkerOptions markerOptions = new MarkerOptions();
marker.setMarkerManager(this);
marker.prepareMarker(markerOptions);
markerCache.put(marker, googleMap.addMarker(markerOptions));
marker.onAdd();
} | class class_name[name] begin[{]
method[addMarker, return_type[void], modifier[public], parameter[marker]] begin[{]
local_variable[type[MarkerOptions], markerOptions]
call[marker.setMarkerManager, parameter[THIS[]]]
call[marker.prepareMarker, parameter[member[.markerOptio... | Keyword[public] Keyword[void] identifier[addMarker] operator[SEP] identifier[T] identifier[marker] operator[SEP] {
Keyword[final] identifier[MarkerOptions] identifier[markerOptions] operator[=] Keyword[new] identifier[MarkerOptions] operator[SEP] operator[SEP] operator[SEP] identifier[marker] operator[SEP] ident... |
public FSArray getEntity_attributes() {
if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_attributes == null)
jcasType.jcas.throwFeatMissing("entity_attributes", "de.julielab.jules.types.ace.Entity");
return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((... | class class_name[name] begin[{]
method[getEntity_attributes, return_type[type[FSArray]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[Entity_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qu... | Keyword[public] identifier[FSArray] identifier[getEntity_attributes] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[Entity_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[Entity_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] ... |
@SuppressWarnings("unchecked")
protected void reduce(KEYIN key, Iterable<VALUEIN> values, Context context
) throws IOException, InterruptedException {
for(VALUEIN value: values) {
context.write((KEYOUT) key, (VALUEOUT) value);
}
} | class class_name[name] begin[{]
method[reduce, return_type[void], modifier[protected], parameter[key, values, context]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=key, postfix_operat... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[void] identifier[reduce] operator[SEP] identifier[KEYIN] identifier[key] , identifier[Iterable] operator[<] identifier[VALUEIN] operator[>] identifier[values] , identifier[Context] identifier[context] ope... |
public Matrix4f m33(float m33) {
this.m33 = m33;
if (m33 != 0.0f)
properties &= ~(PROPERTY_PERSPECTIVE);
if (m33 != 1.0f)
properties &= ~(PROPERTY_IDENTITY | PROPERTY_TRANSLATION | PROPERTY_ORTHONORMAL | PROPERTY_AFFINE);
return this;
} | class class_name[name] begin[{]
method[m33, return_type[type[Matrix4f]], modifier[public], parameter[m33]] begin[{]
assign[THIS[member[None.m33]], member[.m33]]
if[binary_operation[member[.m33], !=, literal[0.0f]]] begin[{]
assign[member[.properties], member[.PROPERT... | Keyword[public] identifier[Matrix4f] identifier[m33] operator[SEP] Keyword[float] identifier[m33] operator[SEP] {
Keyword[this] operator[SEP] identifier[m33] operator[=] identifier[m33] operator[SEP] Keyword[if] operator[SEP] identifier[m33] operator[!=] literal[Float] operator[SEP] identifier[properties] operat... |
static int mergeDelimitedFrom(DataInput in, Object message, Schema schema,
boolean decodeNestedMessageAsGroup) throws IOException
{
final byte size = in.readByte();
final int len = 0 == (size & 0x80) ? size : CodedInput.readRawVarint32(in, size);
if(len < 0)
... | class class_name[name] begin[{]
method[mergeDelimitedFrom, return_type[type[int]], modifier[static], parameter[in, message, schema, decodeNestedMessageAsGroup]] begin[{]
local_variable[type[byte], size]
local_variable[type[int], len]
if[binary_operation[member[.len], <, literal[... | Keyword[static] Keyword[int] identifier[mergeDelimitedFrom] operator[SEP] identifier[DataInput] identifier[in] , identifier[Object] identifier[message] , identifier[Schema] identifier[schema] , Keyword[boolean] identifier[decodeNestedMessageAsGroup] operator[SEP] Keyword[throws] identifier[IOException] {
Keyw... |
public static base_responses update(nitro_service client, hanode resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
hanode updateresources[] = new hanode[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new hanode();
... | class class_name[name] begin[{]
method[update, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{]
local_variable[type[base_responses], result]
if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operatio... | Keyword[public] Keyword[static] identifier[base_responses] identifier[update] operator[SEP] identifier[nitro_service] identifier[client] , identifier[hanode] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[base_responses] identifier[result] oper... |
@Override
public boolean isIntentAvailable(Context context, String action) {
Intent intent = new Intent(action);
return isIntentAvailable(context, intent);
} | class class_name[name] begin[{]
method[isIntentAvailable, return_type[type[boolean]], modifier[public], parameter[context, action]] begin[{]
local_variable[type[Intent], intent]
return[call[.isIntentAvailable, parameter[member[.context], member[.intent]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isIntentAvailable] operator[SEP] identifier[Context] identifier[context] , identifier[String] identifier[action] operator[SEP] {
identifier[Intent] identifier[intent] operator[=] Keyword[new] identifier[Intent] operator[SEP] identifi... |
protected void execute(InputStream input, OutputStream output, C context) throws IOException {
final ApplicationContext applicationContext = buildApplicationContext(context);
if (context == null) {
context = (C) applicationContext;
}
final Environment env = startEnvironment(... | class class_name[name] begin[{]
method[execute, return_type[void], modifier[protected], parameter[input, output, context]] begin[{]
local_variable[type[ApplicationContext], applicationContext]
if[binary_operation[member[.context], ==, literal[null]]] begin[{]
ass... | Keyword[protected] Keyword[void] identifier[execute] operator[SEP] identifier[InputStream] identifier[input] , identifier[OutputStream] identifier[output] , identifier[C] identifier[context] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[ApplicationContext] identifier[applica... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.