code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
@Override
public void render() {
if(null == this.in){
throw new RenderException("InputStream is null !");
}
Response.setContentType(this.contentType);
Response.write(this.in, this.bufferSize);
} | class class_name[name] begin[{]
method[render, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[literal[null], ==, THIS[member[None.in]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qual... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[render] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] Keyword[this] operator[SEP] identifier[in] operator[SEP] {
Keyword[throw] Keyword[new] identifier[RenderException] operator[SEP] literal[... |
@XmlElementDecl(namespace = "http://www.w3.org/1998/Math/MathML", name = "malignmark")
public JAXBElement<MalignmarkType> createMalignmark(MalignmarkType value) {
return new JAXBElement<MalignmarkType>(_Malignmark_QNAME, MalignmarkType.class, null, value);
} | class class_name[name] begin[{]
method[createMalignmark, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_Malignmark_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[MalignmarkType] operator[>] identifier[createMalignmark] operator[SEP] identifier[Malignma... |
public Map<Class<?>, Set<Class<?>>> loadVetoed(ClassLoader classLoader) {
Validate.notNull(classLoader, "ClassLoader must be provided");
final Map<Class<?>, Set<Class<?>>> vetoed = new LinkedHashMap<Class<?>, Set<Class<?>>>();
try {
final Enumeration<URL> exclusions = classLoader.... | class class_name[name] begin[{]
method[loadVetoed, return_type[type[Map]], modifier[public], parameter[classLoader]] begin[{]
call[Validate.notNull, parameter[member[.classLoader], literal["ClassLoader must be provided"]]]
local_variable[type[Map], vetoed]
TryStatement(block=[Lo... | Keyword[public] identifier[Map] operator[<] identifier[Class] operator[<] operator[?] operator[>] , identifier[Set] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] operator[>] identifier[loadVetoed] operator[SEP] identifier[ClassLoader] identifier[classLoader] operator[SEP] {
ident... |
protected boolean bindsHydrogen(IBond bond) {
for (int i = 0; i < bond.getAtomCount(); i++) {
IAtom atom = bond.getAtom(i);
if ("H".equals(atom.getSymbol())) return true;
}
return false;
} | class class_name[name] begin[{]
method[bindsHydrogen, return_type[type[boolean]], modifier[protected], parameter[bond]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(... | Keyword[protected] Keyword[boolean] identifier[bindsHydrogen] operator[SEP] identifier[IBond] identifier[bond] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[bond] operator[SEP] identifier[getAtomCount] operator[SEP] o... |
public static void serializeCopyableDataset(State state, CopyableDatasetMetadata copyableDataset) {
state.setProp(SERIALIZED_COPYABLE_DATASET, copyableDataset.serialize());
} | class class_name[name] begin[{]
method[serializeCopyableDataset, return_type[void], modifier[public static], parameter[state, copyableDataset]] begin[{]
call[state.setProp, parameter[member[.SERIALIZED_COPYABLE_DATASET], call[copyableDataset.serialize, parameter[]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[serializeCopyableDataset] operator[SEP] identifier[State] identifier[state] , identifier[CopyableDatasetMetadata] identifier[copyableDataset] operator[SEP] {
identifier[state] operator[SEP] identifier[setProp] operator[SEP] identifier[SERIALIZED_COPYABLE_... |
@Override
public ClientResponse callProcedureWithTimeout(
int batchTimeout,
String procName,
Object... parameters)
throws IOException, NoConnectionsException, ProcCallException
{
return callProcedureWithClientTimeout(batchTimeout, procName,
... | class class_name[name] begin[{]
method[callProcedureWithTimeout, return_type[type[ClientResponse]], modifier[public], parameter[batchTimeout, procName, parameters]] begin[{]
return[call[.callProcedureWithClientTimeout, parameter[member[.batchTimeout], member[.procName], member[Distributer.USE_DEFAULT_C... | annotation[@] identifier[Override] Keyword[public] identifier[ClientResponse] identifier[callProcedureWithTimeout] operator[SEP] Keyword[int] identifier[batchTimeout] , identifier[String] identifier[procName] , identifier[Object] operator[...] identifier[parameters] operator[SEP] Keyword[throws] identifier[IOExceptio... |
public PartialViewContext getPartialViewContext() {
if (defaultFacesContext != null) {
return defaultFacesContext.getPartialViewContext();
}
if (!isCreatedFromValidFactory) {
if (partialViewContextForInvalidFactoryConstruction == null) {
PartialViewContex... | class class_name[name] begin[{]
method[getPartialViewContext, return_type[type[PartialViewContext]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.defaultFacesContext], !=, literal[null]]] begin[{]
return[call[defaultFacesContext.getPartialViewContext, paramete... | Keyword[public] identifier[PartialViewContext] identifier[getPartialViewContext] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[defaultFacesContext] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[defaultFacesContext] operator[SEP] identifier[getPartialViewConte... |
public Constructor<?> getEnterpriseBeanClassConstructor() {
Constructor<?> constructor = ivEnterpriseBeanClassConstructor;
if (constructor == null) {
constructor = ivEnterpriseBeanFactory.getConstructor();
}
return constructor;
} | class class_name[name] begin[{]
method[getEnterpriseBeanClassConstructor, return_type[type[Constructor]], modifier[public], parameter[]] begin[{]
local_variable[type[Constructor], constructor]
if[binary_operation[member[.constructor], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[Constructor] operator[<] operator[?] operator[>] identifier[getEnterpriseBeanClassConstructor] operator[SEP] operator[SEP] {
identifier[Constructor] operator[<] operator[?] operator[>] identifier[constructor] operator[=] identifier[ivEnterpriseBeanClassConstructor] operator[SEP] Keywor... |
public void marshall(InitializeClusterRequest initializeClusterRequest, ProtocolMarshaller protocolMarshaller) {
if (initializeClusterRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(initial... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[initializeClusterRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.initializeClusterRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argument... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[InitializeClusterRequest] identifier[initializeClusterRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[initializeClusterRequest] operator[==] Other[null] opera... |
public static Metadata of(
final String name,
final String description,
final Person author,
final Copyright copyright,
final List<Link> links,
final ZonedDateTime time,
final String keywords,
final Bounds bounds
) {
return new Metadata(
name,
description,
author == null || author.isEmpty() ... | class class_name[name] begin[{]
method[of, return_type[type[Metadata]], modifier[public static], parameter[name, description, author, copyright, links, time, keywords, bounds]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, se... | Keyword[public] Keyword[static] identifier[Metadata] identifier[of] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[description] , Keyword[final] identifier[Person] identifier[author] , Keyword[final] identifier[Copyright] identifier[copyright] , Keywo... |
public static void writeFully(FileChannel fc, ByteBuffer buf,
long offset) throws IOException {
do {
offset += fc.write(buf, offset);
} while (buf.remaining() > 0);
} | class class_name[name] begin[{]
method[writeFully, return_type[void], modifier[public static], parameter[fc, buf, offset]] begin[{]
do[binary_operation[call[buf.remaining, parameter[]], >, literal[0]]] begin[{]
assign[member[.offset], call[fc.write, parameter[member[.buf... | Keyword[public] Keyword[static] Keyword[void] identifier[writeFully] operator[SEP] identifier[FileChannel] identifier[fc] , identifier[ByteBuffer] identifier[buf] , Keyword[long] identifier[offset] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[do] {
identifier[offset] operator[+=] ... |
public void addChildren(List<? extends Tree> kids) {
for (int i = 0; i < kids.size(); i++) {
Tree t = kids.get(i);
addChild(t);
}
} | class class_name[name] begin[{]
method[addChildren, return_type[void], modifier[public], parameter[kids]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Mem... | Keyword[public] Keyword[void] identifier[addChildren] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[Tree] operator[>] identifier[kids] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier... |
@Override
public void eUnset(int featureID) {
switch (featureID) {
case AfplibPackage.IRD__IMDATA:
setIMdata(IMDATA_EDEFAULT);
return;
}
super.eUnset(featureID);
} | class class_name[name] begin[{]
method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=IRD__IMDATA, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[Stateme... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[IRD__IMDATA] operato... |
public List<String> selectGlobalPermissionsOfGroup(DbSession session, String organizationUuid, @Nullable Integer groupId) {
return mapper(session).selectGlobalPermissionsOfGroup(organizationUuid, groupId);
} | class class_name[name] begin[{]
method[selectGlobalPermissionsOfGroup, return_type[type[List]], modifier[public], parameter[session, organizationUuid, groupId]] begin[{]
return[call[.mapper, parameter[member[.session]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[selectGlobalPermissionsOfGroup] operator[SEP] identifier[DbSession] identifier[session] , identifier[String] identifier[organizationUuid] , annotation[@] identifier[Nullable] identifier[Integer] identifier[groupId] operator[SEP] {... |
public void removeInventory(MalisisInventory inventory)
{
checkNotNull(inventory);
inventory.removeOpenedContainer(this);
inventories.remove(inventory.getInventoryId());
if (isServer())
inventoryCaches.remove(inventory);
} | class class_name[name] begin[{]
method[removeInventory, return_type[void], modifier[public], parameter[inventory]] begin[{]
call[.checkNotNull, parameter[member[.inventory]]]
call[inventory.removeOpenedContainer, parameter[THIS[]]]
call[inventories.remove, parame... | Keyword[public] Keyword[void] identifier[removeInventory] operator[SEP] identifier[MalisisInventory] identifier[inventory] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[inventory] operator[SEP] operator[SEP] identifier[inventory] operator[SEP] identifier[removeOpenedContainer] operator[SEP] K... |
private void processIncludeCmd(String parms, int cmdTPosBegin, int cmdTPosEnd)
throws MiniTemplator.TemplateSyntaxException {
if (conditionalExclude(cmdTPosBegin, cmdTPosEnd)) {
return;
}
int p0 = skipBlanks(parms, 0);
if (p0 >= parms.length()) {
... | class class_name[name] begin[{]
method[processIncludeCmd, return_type[void], modifier[private], parameter[parms, cmdTPosBegin, cmdTPosEnd]] begin[{]
if[call[.conditionalExclude, parameter[member[.cmdTPosBegin], member[.cmdTPosEnd]]]] begin[{]
return[None]
else begin[{]
None
... | Keyword[private] Keyword[void] identifier[processIncludeCmd] operator[SEP] identifier[String] identifier[parms] , Keyword[int] identifier[cmdTPosBegin] , Keyword[int] identifier[cmdTPosEnd] operator[SEP] Keyword[throws] identifier[MiniTemplator] operator[SEP] identifier[TemplateSyntaxException] {
Keyword[if] o... |
public T message(final String text, final String mimeType, final String encoding) {
return message(new EmailMessage(text, mimeType, encoding));
} | class class_name[name] begin[{]
method[message, return_type[type[T]], modifier[public], parameter[text, mimeType, encoding]] begin[{]
return[call[.message, parameter[ClassCreator(arguments=[MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReferenc... | Keyword[public] identifier[T] identifier[message] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[String] identifier[mimeType] , Keyword[final] identifier[String] identifier[encoding] operator[SEP] {
Keyword[return] identifier[message] operator[SEP] Keyword[new] ide... |
public boolean shouldTerminate(PopulationData<?> populationData)
{
if (natural)
{
// If we're using "natural" fitness scores, higher values are better.
return populationData.getBestCandidateFitness() >= targetFitness;
}
else
{
// If we're u... | class class_name[name] begin[{]
method[shouldTerminate, return_type[type[boolean]], modifier[public], parameter[populationData]] begin[{]
if[member[.natural]] begin[{]
return[binary_operation[call[populationData.getBestCandidateFitness, parameter[]], >=, member[.targetFitness]]]
... | Keyword[public] Keyword[boolean] identifier[shouldTerminate] operator[SEP] identifier[PopulationData] operator[<] operator[?] operator[>] identifier[populationData] operator[SEP] {
Keyword[if] operator[SEP] identifier[natural] operator[SEP] {
Keyword[return] identifier[populationData] operator[SEP] id... |
public void handle(Object event) throws EventException {
try {
this.handler.invoke(listener, event);
} catch (IllegalAccessException e) {
throw new Error("Access level changed, method " + handler + " is no longer accessible!", e);
} catch (IllegalArgumentException e) {
throw new Error("Method " + handler... | class class_name[name] begin[{]
method[handle, return_type[void], modifier[public], parameter[event]] begin[{]
TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=handler, postfix_operators=None, prefix_ope... | Keyword[public] Keyword[void] identifier[handle] operator[SEP] identifier[Object] identifier[event] operator[SEP] Keyword[throws] identifier[EventException] {
Keyword[try] {
Keyword[this] operator[SEP] identifier[handler] operator[SEP] identifier[invoke] operator[SEP] identifier[listener] , identifie... |
public void setBulkProcessor(Listener bulkProcessorListener,
int bulkActions, long bulkSizeKB, int flushIntervalSeconds) {
this.bulkProcessor = buildBulkProcessor(bulkProcessorListener,
bulkActions, bulkSizeKB, flushIntervalSeconds);
} | class class_name[name] begin[{]
method[setBulkProcessor, return_type[void], modifier[public], parameter[bulkProcessorListener, bulkActions, bulkSizeKB, flushIntervalSeconds]] begin[{]
assign[THIS[member[None.bulkProcessor]], call[.buildBulkProcessor, parameter[member[.bulkProcessorListener], me... | Keyword[public] Keyword[void] identifier[setBulkProcessor] operator[SEP] identifier[Listener] identifier[bulkProcessorListener] , Keyword[int] identifier[bulkActions] , Keyword[long] identifier[bulkSizeKB] , Keyword[int] identifier[flushIntervalSeconds] operator[SEP] {
Keyword[this] operator[SEP] identifier[b... |
public static Name
fromAddress(byte [] addr) {
if (addr.length != 4 && addr.length != 16)
throw new IllegalArgumentException("array must contain " +
"4 or 16 elements");
StringBuffer sb = new StringBuffer();
if (addr.length == 4) {
for (int i = addr.length - 1; i >= 0; i--) {
sb.append(addr[i] & 0xF... | class class_name[name] begin[{]
method[fromAddress, return_type[type[Name]], modifier[public static], parameter[addr]] begin[{]
if[binary_operation[binary_operation[member[addr.length], !=, literal[4]], &&, binary_operation[member[addr.length], !=, literal[16]]]] begin[{]
ThrowStatement(express... | Keyword[public] Keyword[static] identifier[Name] identifier[fromAddress] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[addr] operator[SEP] {
Keyword[if] operator[SEP] identifier[addr] operator[SEP] identifier[length] operator[!=] Other[4] operator[&&] identifier[addr] operator[SEP] identifie... |
private static Map<Method, EventType> findMethods(Class<?> type) {
Map<Method, EventType> events = new HashMap<>();
for (Method method : type.getDeclaredMethods()) {
Event event = method.getAnnotation(Event.class);
if (event != null) {
String name = event.value().equals("") ? method.getName(... | class class_name[name] begin[{]
method[findMethods, return_type[type[Map]], modifier[private static], parameter[type]] begin[{]
local_variable[type[Map], events]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dim... | Keyword[private] Keyword[static] identifier[Map] operator[<] identifier[Method] , identifier[EventType] operator[>] identifier[findMethods] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[SEP] {
identifier[Map] operator[<] identifier[Method] , identifier[EventType]... |
public static ByteBuf copiedBuffer(CharSequence string, Charset charset) {
if (string == null) {
throw new NullPointerException("string");
}
if (string instanceof CharBuffer) {
return copiedBuffer((CharBuffer) string, charset);
}
return copiedBuffer(Char... | class class_name[name] begin[{]
method[copiedBuffer, return_type[type[ByteBuf]], modifier[public static], parameter[string, charset]] begin[{]
if[binary_operation[member[.string], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operator... | Keyword[public] Keyword[static] identifier[ByteBuf] identifier[copiedBuffer] operator[SEP] identifier[CharSequence] identifier[string] , identifier[Charset] identifier[charset] operator[SEP] {
Keyword[if] operator[SEP] identifier[string] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword... |
@Inject
static void setPipeline(FilterPipeline pipeline) {
// This can happen if you create many injectors and they all have their own
// servlet module. This is legal, caveat a small warning.
if (GuiceFilter.pipeline instanceof ManagedFilterPipeline) {
LOGGER.warning(MULTIPLE_INJECTORS_WARNING);
... | class class_name[name] begin[{]
method[setPipeline, return_type[void], modifier[static], parameter[pipeline]] begin[{]
if[binary_operation[member[GuiceFilter.pipeline], instanceof, type[ManagedFilterPipeline]]] begin[{]
call[LOGGER.warning, parameter[member[.MULTIPLE_INJ... | annotation[@] identifier[Inject] Keyword[static] Keyword[void] identifier[setPipeline] operator[SEP] identifier[FilterPipeline] identifier[pipeline] operator[SEP] {
Keyword[if] operator[SEP] identifier[GuiceFilter] operator[SEP] identifier[pipeline] Keyword[instanceof] identifier[ManagedFilterPipeline] operator[... |
public ServiceInstanceQuery getNotEqualQueryCriterion(String key, String value){
QueryCriterion c = new NotEqualQueryCriterion(key, value);
addQueryCriterion(c);
return this;
} | class class_name[name] begin[{]
method[getNotEqualQueryCriterion, return_type[type[ServiceInstanceQuery]], modifier[public], parameter[key, value]] begin[{]
local_variable[type[QueryCriterion], c]
call[.addQueryCriterion, parameter[member[.c]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[ServiceInstanceQuery] identifier[getNotEqualQueryCriterion] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[value] operator[SEP] {
identifier[QueryCriterion] identifier[c] operator[=] Keyword[new] identifier[NotEqualQueryCriterion] operator[SEP] identi... |
public <F, T> Castor<F, T> find(Class<F> from, Class<T> to) {
return find(Mirror.me(from), to);
} | class class_name[name] begin[{]
method[find, return_type[type[Castor]], modifier[public], parameter[from, to]] begin[{]
return[call[.find, parameter[call[Mirror.me, parameter[member[.from]]], member[.to]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[F] , identifier[T] operator[>] identifier[Castor] operator[<] identifier[F] , identifier[T] operator[>] identifier[find] operator[SEP] identifier[Class] operator[<] identifier[F] operator[>] identifier[from] , identifier[Class] operator[<] identifier[T] operator[>] identifier[t... |
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case TypesPackage.JVM_LONG_ANNOTATION_VALUE__VALUES:
getValues().clear();
return;
}
super.eUnset(featureID);
} | class class_name[name] begin[{]
method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=JVM_LONG_ANNOTATION_VALUE__VALUES, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, selectors=[])]... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[TypesPackage] operator[SEP] identifier[JVM_LONG_ANNOTATION_V... |
protected void calculateExchangeHash() throws SshException {
Digest hash = (Digest) ComponentManager.getInstance()
.supportedDigests().getInstance("SHA-1");
// The local software version comments
hash.putString(clientId);
// The remote software version comments
hash.putString(serverId);
// The local... | class class_name[name] begin[{]
method[calculateExchangeHash, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[Digest], hash]
call[hash.putString, parameter[member[.clientId]]]
call[hash.putString, parameter[member[.serverId]]]
... | Keyword[protected] Keyword[void] identifier[calculateExchangeHash] operator[SEP] operator[SEP] Keyword[throws] identifier[SshException] {
identifier[Digest] identifier[hash] operator[=] operator[SEP] identifier[Digest] operator[SEP] identifier[ComponentManager] operator[SEP] identifier[getInstance] operator[SEP]... |
@Override
@PublicAPI(usage = ACCESS)
public Slice as(String pattern) {
return new Slice(sliceAssignment, matchingGroups, new Description(pattern), classes);
} | class class_name[name] begin[{]
method[as, return_type[type[Slice]], modifier[public], parameter[pattern]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=sliceAssignment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=matchingGroups, postfix... | annotation[@] identifier[Override] annotation[@] identifier[PublicAPI] operator[SEP] identifier[usage] operator[=] identifier[ACCESS] operator[SEP] Keyword[public] identifier[Slice] identifier[as] operator[SEP] identifier[String] identifier[pattern] operator[SEP] {
Keyword[return] Keyword[new] identifier[Slice] ... |
public Throwable findChainPartThrowable(ChainPart chainPart, Throwable firstThrowable) {
Throwable e = firstThrowable;
int relativeDepth = 0;
int minimumRelativeDepth = chainPart.getMinimumRelativeDepth();
int maximumRelativeDepth = chainPart.getMaximumRelativeDepth();
while (!ch... | class class_name[name] begin[{]
method[findChainPartThrowable, return_type[type[Throwable]], modifier[public], parameter[chainPart, firstThrowable]] begin[{]
local_variable[type[Throwable], e]
local_variable[type[int], relativeDepth]
local_variable[type[int], minimumRelativeDepth]
... | Keyword[public] identifier[Throwable] identifier[findChainPartThrowable] operator[SEP] identifier[ChainPart] identifier[chainPart] , identifier[Throwable] identifier[firstThrowable] operator[SEP] {
identifier[Throwable] identifier[e] operator[=] identifier[firstThrowable] operator[SEP] Keyword[int] identifier[r... |
public boolean unlockThisRecord(Task objSession, String strDatabaseName, String strRecordName, Object bookmark)
throws DBException
{
SessionInfo sessionInfo = this.getLockSessionInfo(objSession, null);
try {
boolean bSuccess = this.getRemoteLockSession(sessionInfo).unlockThisReco... | class class_name[name] begin[{]
method[unlockThisRecord, return_type[type[boolean]], modifier[public], parameter[objSession, strDatabaseName, strRecordName, bookmark]] begin[{]
local_variable[type[SessionInfo], sessionInfo]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarator... | Keyword[public] Keyword[boolean] identifier[unlockThisRecord] operator[SEP] identifier[Task] identifier[objSession] , identifier[String] identifier[strDatabaseName] , identifier[String] identifier[strRecordName] , identifier[Object] identifier[bookmark] operator[SEP] Keyword[throws] identifier[DBException] {
... |
private void writeNode(Node node) {
try {
this.pStmtNodesC.setLong(1, node.getId());
this.pStmtNodesC.setDouble(2, node.getLatitude());
this.pStmtNodesC.setDouble(3, node.getLongitude());
this.pStmtNodesC.addBatch();
if (this.nNodes % BATCH_LIMIT == ... | class class_name[name] begin[{]
method[writeNode, return_type[void], modifier[private], parameter[node]] begin[{]
TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=pStmtNodesC, postfix_operators=None, pre... | Keyword[private] Keyword[void] identifier[writeNode] operator[SEP] identifier[Node] identifier[node] operator[SEP] {
Keyword[try] {
Keyword[this] operator[SEP] identifier[pStmtNodesC] operator[SEP] identifier[setLong] operator[SEP] Other[1] , identifier[node] operator[SEP] identifier[getId] operator[... |
@Benchmark
public Object map() {
final FastCharBuffer sb = new FastCharBuffer();
for (final int index : indexes) {
sb.append(map.get(TYPES[index]));
}
return sb;
} | class class_name[name] begin[{]
method[map, return_type[type[Object]], modifier[public], parameter[]] begin[{]
local_variable[type[FastCharBuffer], sb]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=... | annotation[@] identifier[Benchmark] Keyword[public] identifier[Object] identifier[map] operator[SEP] operator[SEP] {
Keyword[final] identifier[FastCharBuffer] identifier[sb] operator[=] Keyword[new] identifier[FastCharBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] Key... |
protected int getAsyncThreads(Dsn dsn) {
return Util.parseInteger(Lookup.lookup(ASYNC_THREADS_OPTION, dsn),
Runtime.getRuntime().availableProcessors());
} | class class_name[name] begin[{]
method[getAsyncThreads, return_type[type[int]], modifier[protected], parameter[dsn]] begin[{]
return[call[Util.parseInteger, parameter[call[Lookup.lookup, parameter[member[.ASYNC_THREADS_OPTION], member[.dsn]]], call[Runtime.getRuntime, parameter[]]]]]
end[}]
END[}] | Keyword[protected] Keyword[int] identifier[getAsyncThreads] operator[SEP] identifier[Dsn] identifier[dsn] operator[SEP] {
Keyword[return] identifier[Util] operator[SEP] identifier[parseInteger] operator[SEP] identifier[Lookup] operator[SEP] identifier[lookup] operator[SEP] identifier[ASYNC_THREADS_OPTION] , ide... |
public void reset(Object[] btree, Comparator<K> comparator, K lowerBound, K upperBound, boolean forwards)
{
_reset(btree, comparator, lowerBound, true, upperBound, false, forwards);
} | class class_name[name] begin[{]
method[reset, return_type[void], modifier[public], parameter[btree, comparator, lowerBound, upperBound, forwards]] begin[{]
call[._reset, parameter[member[.btree], member[.comparator], member[.lowerBound], literal[true], member[.upperBound], literal[false], membe... | Keyword[public] Keyword[void] identifier[reset] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[btree] , identifier[Comparator] operator[<] identifier[K] operator[>] identifier[comparator] , identifier[K] identifier[lowerBound] , identifier[K] identifier[upperBound] , Keyword[boolean] identi... |
@Subscribe
public void onSendBroadcastMessage(HandlerSendBroadcastEvent e) {
try {
this.sendMessageBroadcast(e.getMessage());
} catch (GroupException e1) {
WfdLog.e(TAG, "GroupException " + e.getMessage());
} catch (IOException e1) {
WfdLog.e(TAG, "handleM... | class class_name[name] begin[{]
method[onSendBroadcastMessage, return_type[void], modifier[public], parameter[e]] begin[{]
TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments... | annotation[@] identifier[Subscribe] Keyword[public] Keyword[void] identifier[onSendBroadcastMessage] operator[SEP] identifier[HandlerSendBroadcastEvent] identifier[e] operator[SEP] {
Keyword[try] {
Keyword[this] operator[SEP] identifier[sendMessageBroadcast] operator[SEP] identifier[e] operator[SEP] i... |
@SuppressWarnings({"WeakerAccess"})
public static void createNotification(final Context context, final Bundle extras, final int notificationId) {
String _accountId = extras.getString(Constants.WZRK_ACCT_ID_KEY);
if (instances == null) {
CleverTapAPI instance = createInstanceIfAvailable(c... | class class_name[name] begin[{]
method[createNotification, return_type[void], modifier[public static], parameter[context, extras, notificationId]] begin[{]
local_variable[type[String], _accountId]
if[binary_operation[member[.instances], ==, literal[null]]] begin[{]
local_var... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String]
} operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[createNotification] operator[SEP] Keyword[final] identifier[Context] identifier[context] , Keyword[final] identifier[Bundle] identifier[extras] , Keyword[final]... |
private void removeDynamic(DynamicProperty dynamic) {
List<String> placeholders = dynamic.placeholders;
for (String placeholder : placeholders) {
List<DynamicProperty> l = placeholderToDynamics.get(placeholder);
l.remove(dynamic);
}
dynamic.placeholders.clear();
... | class class_name[name] begin[{]
method[removeDynamic, return_type[void], modifier[private], parameter[dynamic]] begin[{]
local_variable[type[List], placeholders]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dim... | Keyword[private] Keyword[void] identifier[removeDynamic] operator[SEP] identifier[DynamicProperty] identifier[dynamic] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[placeholders] operator[=] identifier[dynamic] operator[SEP] identifier[placeholders] operator[SEP] Keyword[... |
private void handleStep2(GrayS32 labeled, int label) {
// if the blob is not labeled and in this state it cannot be against the left side of the image
if( label == 0 )
label = labeled.data[indexOut-1];
ContourPacked c = contours.get(label-1);
c.internalIndexes.add( packedPoints.size() );
packedPoints.grow... | class class_name[name] begin[{]
method[handleStep2, return_type[void], modifier[private], parameter[labeled, label]] begin[{]
if[binary_operation[member[.label], ==, literal[0]]] begin[{]
assign[member[.label], member[labeled.data]]
else begin[{]
None
end[}]
... | Keyword[private] Keyword[void] identifier[handleStep2] operator[SEP] identifier[GrayS32] identifier[labeled] , Keyword[int] identifier[label] operator[SEP] {
Keyword[if] operator[SEP] identifier[label] operator[==] Other[0] operator[SEP] identifier[label] operator[=] identifier[labeled] operator[SEP] identifier... |
private boolean loginInternal(String nic, String password, int timeInSec) throws IOException {
// Due to per IP login rate limiting, we synchronize this part of the code.
// if multiple IP available, it can be sync on public IP based token
synchronized (ApiOvhCore.class) {
String oldCK = config.getConsumerKey(... | class class_name[name] begin[{]
method[loginInternal, return_type[type[boolean]], modifier[private], parameter[nic, password, timeInSec]] begin[{]
SYNCHRONIZED[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None,... | Keyword[private] Keyword[boolean] identifier[loginInternal] operator[SEP] identifier[String] identifier[nic] , identifier[String] identifier[password] , Keyword[int] identifier[timeInSec] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[synchronized] operator[SEP] identifier[ApiOvhCore] operator... |
public float DistanceTo(IntPoint anotherPoint) {
float dx = this.x - anotherPoint.x;
float dy = this.y - anotherPoint.y;
return (float) Math.sqrt(dx * dx + dy * dy);
} | class class_name[name] begin[{]
method[DistanceTo, return_type[type[float]], modifier[public], parameter[anotherPoint]] begin[{]
local_variable[type[float], dx]
local_variable[type[float], dy]
return[Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(op... | Keyword[public] Keyword[float] identifier[DistanceTo] operator[SEP] identifier[IntPoint] identifier[anotherPoint] operator[SEP] {
Keyword[float] identifier[dx] operator[=] Keyword[this] operator[SEP] identifier[x] operator[-] identifier[anotherPoint] operator[SEP] identifier[x] operator[SEP] Keyword[float] ident... |
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onTaskRemoved(Intent rootIntent) {
LOGGER.d("try to restart service on task Removed");
if (isAutoWakeUp) {
Intent restartServiceIntent = new Intent(getApplicationContext(), this.getClass());
restartServiceIntent.setPackage... | class class_name[name] begin[{]
method[onTaskRemoved, return_type[void], modifier[public], parameter[rootIntent]] begin[{]
call[LOGGER.d, parameter[literal["try to restart service on task Removed"]]]
if[member[.isAutoWakeUp]] begin[{]
local_variable[type[Intent], res... | annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[ICE_CREAM_SANDWICH] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onTaskRemoved] operator[SEP] identifier[Intent] identifier[rootIntent] operat... |
private URL getCleanedUrl(URL originalUrl,
String originalPath) {
try {
return new URL(StringUtils.cleanPath(originalPath));
} catch (MalformedURLException ex) {
// Cleaned URL path cannot be converted to URL
// -> take original URL.
return ori... | class class_name[name] begin[{]
method[getCleanedUrl, return_type[type[URL]], modifier[private], parameter[originalUrl, originalPath]] begin[{]
TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=originalPath, postfix_operators=[], p... | Keyword[private] identifier[URL] identifier[getCleanedUrl] operator[SEP] identifier[URL] identifier[originalUrl] , identifier[String] identifier[originalPath] operator[SEP] {
Keyword[try] {
Keyword[return] Keyword[new] identifier[URL] operator[SEP] identifier[StringUtils] operator[SEP] identifier[cle... |
public static String getRelativePathName(Path root, Path path) {
Path relative = root.relativize(path);
return Files.isDirectory(path) && !relative.toString().endsWith("/") ? String.format("%s/", relative.toString()) : relative.toString();
} | class class_name[name] begin[{]
method[getRelativePathName, return_type[type[String]], modifier[public static], parameter[root, path]] begin[{]
local_variable[type[Path], relative]
return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=pat... | Keyword[public] Keyword[static] identifier[String] identifier[getRelativePathName] operator[SEP] identifier[Path] identifier[root] , identifier[Path] identifier[path] operator[SEP] {
identifier[Path] identifier[relative] operator[=] identifier[root] operator[SEP] identifier[relativize] operator[SEP] identifier[... |
@Override
public DescribeEventDetailsResult describeEventDetails(DescribeEventDetailsRequest request) {
request = beforeClientExecution(request);
return executeDescribeEventDetails(request);
} | class class_name[name] begin[{]
method[describeEventDetails, return_type[type[DescribeEventDetailsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDescribeEventDetails, parame... | annotation[@] identifier[Override] Keyword[public] identifier[DescribeEventDetailsResult] identifier[describeEventDetails] operator[SEP] identifier[DescribeEventDetailsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ... |
public static List<String> readLines(URL self, String charset) throws IOException {
return IOGroovyMethods.readLines(newReader(self, charset));
} | class class_name[name] begin[{]
method[readLines, return_type[type[List]], modifier[public static], parameter[self, charset]] begin[{]
return[call[IOGroovyMethods.readLines, parameter[call[.newReader, parameter[member[.self], member[.charset]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[readLines] operator[SEP] identifier[URL] identifier[self] , identifier[String] identifier[charset] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[IOGroovyMethods] operator[S... |
public void initializePackageContents()
{
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Create type parameters
addETypeParameter(iterableEDataType, "E");
addETypeParameter(iTypeReferenceVisitorEDataType, "Result... | class class_name[name] begin[{]
method[initializePackageContents, return_type[void], modifier[public], parameter[]] begin[{]
if[member[.isInitialized]] begin[{]
return[None]
else begin[{]
None
end[}]
assign[member[.isInitialized], literal[true]]
c... | Keyword[public] Keyword[void] identifier[initializePackageContents] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isInitialized] operator[SEP] Keyword[return] operator[SEP] identifier[isInitialized] operator[=] literal[boolean] operator[SEP] identifier[setName] operator[SEP] identifier[eNAME... |
public boolean readRecord() throws IOException {
checkClosed();
columnsCount = 0;
rawBuffer.Position = 0;
dataBuffer.LineStart = dataBuffer.Position;
hasReadNextLine = false;
// check to see if we've already found the end of data
if (hasMoreData) {
// loop over the data stream until the end of dat... | class class_name[name] begin[{]
method[readRecord, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
call[.checkClosed, parameter[]]
assign[member[.columnsCount], literal[0]]
assign[member[rawBuffer.Position], literal[0]]
assign[... | Keyword[public] Keyword[boolean] identifier[readRecord] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[checkClosed] operator[SEP] operator[SEP] operator[SEP] identifier[columnsCount] operator[=] Other[0] operator[SEP] identifier[rawBuffer] operator[SEP] identifier[Position] oper... |
public static void setStyle(Element el, String d) {
el.setAttribute(SVGConstants.SVG_STYLE_ATTRIBUTE, d);
} | class class_name[name] begin[{]
method[setStyle, return_type[void], modifier[public static], parameter[el, d]] begin[{]
call[el.setAttribute, parameter[member[SVGConstants.SVG_STYLE_ATTRIBUTE], member[.d]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[setStyle] operator[SEP] identifier[Element] identifier[el] , identifier[String] identifier[d] operator[SEP] {
identifier[el] operator[SEP] identifier[setAttribute] operator[SEP] identifier[SVGConstants] operator[SEP] identifier[SVG_STYLE_ATTRIBUTE] , ide... |
@Override
public CPDefinitionOptionRel findByCompanyId_Last(long companyId,
OrderByComparator<CPDefinitionOptionRel> orderByComparator)
throws NoSuchCPDefinitionOptionRelException {
CPDefinitionOptionRel cpDefinitionOptionRel = fetchByCompanyId_Last(companyId,
orderByComparator);
if (cpDefinitionOptionRel... | class class_name[name] begin[{]
method[findByCompanyId_Last, return_type[type[CPDefinitionOptionRel]], modifier[public], parameter[companyId, orderByComparator]] begin[{]
local_variable[type[CPDefinitionOptionRel], cpDefinitionOptionRel]
if[binary_operation[member[.cpDefinitionOptionRel... | annotation[@] identifier[Override] Keyword[public] identifier[CPDefinitionOptionRel] identifier[findByCompanyId_Last] operator[SEP] Keyword[long] identifier[companyId] , identifier[OrderByComparator] operator[<] identifier[CPDefinitionOptionRel] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] i... |
public static ExpectedCondition<List<WebElement>> visibilityOfNbElementsLocatedBy(final By locator, final int nb) {
return new ExpectedCondition<List<WebElement>>() {
@Override
public List<WebElement> apply(WebDriver driver) {
int nbElementIsDisplayed = 0;
... | class class_name[name] begin[{]
method[visibilityOfNbElementsLocatedBy, return_type[type[ExpectedCondition]], modifier[public static], parameter[locator, nb]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDec... | Keyword[public] Keyword[static] identifier[ExpectedCondition] operator[<] identifier[List] operator[<] identifier[WebElement] operator[>] operator[>] identifier[visibilityOfNbElementsLocatedBy] operator[SEP] Keyword[final] identifier[By] identifier[locator] , Keyword[final] Keyword[int] identifier[nb] operator[SEP] {... |
@SuppressWarnings("WeakerAccess")
public static void sort(double[] key, int start, int n, double[]... values) {
quickSort(key, values, start, start + n, 8);
insertionSort(key, values, start, start + n, 8);
} | class class_name[name] begin[{]
method[sort, return_type[void], modifier[public static], parameter[key, start, n, values]] begin[{]
call[.quickSort, parameter[member[.key], member[.values], member[.start], binary_operation[member[.start], +, member[.n]], literal[8]]]
call[.inser... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[sort] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[key] , Keyword[int] identifier[start] , Keyword[int] identifier[n] , Keyword[double] operator[SEP]... |
public final void setGeneratingDebug(boolean generatingDebug)
{
if (sealed) onSealedMutation();
generatingDebugChanged = true;
if (generatingDebug && getOptimizationLevel() > 0)
setOptimizationLevel(0);
this.generatingDebug = generatingDebug;
} | class class_name[name] begin[{]
method[setGeneratingDebug, return_type[void], modifier[final public], parameter[generatingDebug]] begin[{]
if[member[.sealed]] begin[{]
call[.onSealedMutation, parameter[]]
else begin[{]
None
end[}]
assign[member[.gener... | Keyword[public] Keyword[final] Keyword[void] identifier[setGeneratingDebug] operator[SEP] Keyword[boolean] identifier[generatingDebug] operator[SEP] {
Keyword[if] operator[SEP] identifier[sealed] operator[SEP] identifier[onSealedMutation] operator[SEP] operator[SEP] operator[SEP] identifier[generatingDebugChange... |
@Override public final String getHeaderField(String fieldName) {
try {
return fieldName == null
? StatusLine.get(getResponse().getResponse()).toString()
: getHeaders().get(fieldName);
} catch (IOException e) {
return null;
}
} | class class_name[name] begin[{]
method[getHeaderField, return_type[type[String]], modifier[final public], parameter[fieldName]] begin[{]
TryStatement(block=[ReturnStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=fieldName, postfix_operators=[], prefix_ope... | annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[String] identifier[getHeaderField] operator[SEP] identifier[String] identifier[fieldName] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[fieldName] operator[==] Other[null] operator[?] identifier[StatusLine] operat... |
public void marshall(ConditionCheck conditionCheck, ProtocolMarshaller protocolMarshaller) {
if (conditionCheck == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(conditionCheck.getKey(), KEY_BINDING)... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[conditionCheck, protocolMarshaller]] begin[{]
if[binary_operation[member[.conditionCheck], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_o... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ConditionCheck] identifier[conditionCheck] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[conditionCheck] operator[==] Other[null] operator[SEP] {
Keyword[... |
public CountDownLatchConfig getCountDownLatchConfig(String name) {
return ConfigUtils.getConfig(configPatternMatcher, countDownLatchConfigs, name, CountDownLatchConfig.class);
} | class class_name[name] begin[{]
method[getCountDownLatchConfig, return_type[type[CountDownLatchConfig]], modifier[public], parameter[name]] begin[{]
return[call[ConfigUtils.getConfig, parameter[member[.configPatternMatcher], member[.countDownLatchConfigs], member[.name], ClassReference(postfix_operator... | Keyword[public] identifier[CountDownLatchConfig] identifier[getCountDownLatchConfig] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[return] identifier[ConfigUtils] operator[SEP] identifier[getConfig] operator[SEP] identifier[configPatternMatcher] , identifier[countDownLatchConfigs] , ... |
public static void logOperationFinish(String operationName, Logger logger,
LogLevel priority) {
if (LoggerWrap.isEnabledFor(logger, priority)) {
ElkTimer timer = ElkTimer.getNamedTimer(operationName,
ElkTimer.RECORD_WALLTIME);
timer.stop();
LoggerWrap.log(logger, priority, operationName + " took "
... | class class_name[name] begin[{]
method[logOperationFinish, return_type[void], modifier[public static], parameter[operationName, logger, priority]] begin[{]
if[call[LoggerWrap.isEnabledFor, parameter[member[.logger], member[.priority]]]] begin[{]
local_variable[type[ElkTimer], timer]... | Keyword[public] Keyword[static] Keyword[void] identifier[logOperationFinish] operator[SEP] identifier[String] identifier[operationName] , identifier[Logger] identifier[logger] , identifier[LogLevel] identifier[priority] operator[SEP] {
Keyword[if] operator[SEP] identifier[LoggerWrap] operator[SEP] identifier[i... |
public void addPointToTail( int x , int y ) {
int index = tail.start + tail.length*2;
int block[];
int blockIndex = tail.block + index/blockLength;
if( blockIndex == blocks.size ) {
tailBlockSize = 0;
block = blocks.grow();
} else {
block = blocks.get( blockIndex );
}
tailBlockSize += 2;
index... | class class_name[name] begin[{]
method[addPointToTail, return_type[void], modifier[public], parameter[x, y]] begin[{]
local_variable[type[int], index]
local_variable[type[int], block]
local_variable[type[int], blockIndex]
if[binary_operation[member[.blockIndex], ==, memb... | Keyword[public] Keyword[void] identifier[addPointToTail] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] operator[SEP] {
Keyword[int] identifier[index] operator[=] identifier[tail] operator[SEP] identifier[start] operator[+] identifier[tail] operator[SEP] identifier[length] operator[*] Oth... |
@Override
public EClass getIfcAsymmetricIShapeProfileDef() {
if (ifcAsymmetricIShapeProfileDefEClass == null) {
ifcAsymmetricIShapeProfileDefEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(28);
}
return ifcAsymmetricIShapeProfileDefEClass;
} | class class_name[name] begin[{]
method[getIfcAsymmetricIShapeProfileDef, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcAsymmetricIShapeProfileDefEClass], ==, literal[null]]] begin[{]
assign[member[.ifcAsymmetricIShapePr... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcAsymmetricIShapeProfileDef] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcAsymmetricIShapeProfileDefEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcAsymmetricIShapeProfileDefEC... |
@Override
public String ideaOpenAndNavigate(String fileName, int line, int column) throws Exception {
if (line < 0) line = 0;
if (column < 0) column = 0;
String xml = "<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\n" +
"<methodCall>\n" +
" <methodName>fi... | class class_name[name] begin[{]
method[ideaOpenAndNavigate, return_type[type[String]], modifier[public], parameter[fileName, line, column]] begin[{]
if[binary_operation[member[.line], <, literal[0]]] begin[{]
assign[member[.line], literal[0]]
else begin[{]
None
end[}... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[ideaOpenAndNavigate] operator[SEP] identifier[String] identifier[fileName] , Keyword[int] identifier[line] , Keyword[int] identifier[column] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifie... |
@Deprecated
public void addLibrary(Class<?> clazz, int port) {
if (!server.isStopped()) // old behavior
throw new IllegalStateException("Cannot add a library once the server is started");
if (connector.getPort() != 0 && connector.getPort() != port) {
throw new RuntimeExceptio... | class class_name[name] begin[{]
method[addLibrary, return_type[void], modifier[public], parameter[clazz, port]] begin[{]
if[call[server.isStopped, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selector... | annotation[@] identifier[Deprecated] Keyword[public] Keyword[void] identifier[addLibrary] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , Keyword[int] identifier[port] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[server] operator[SEP] identifier[isStop... |
public static SingularValueDecomposition_F64<DMatrixRMaj> svd(int numRows , int numCols ,
boolean needU , boolean needV , boolean compact ) {
// Don't allow the tall decomposition by default since it *might* be less stable
return new SvdI... | class class_name[name] begin[{]
method[svd, return_type[type[SingularValueDecomposition_F64]], modifier[public static], parameter[numRows, numCols, needU, needV, compact]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=compact, postfix_operators=[], prefix_operators=[], qualifier=, sele... | Keyword[public] Keyword[static] identifier[SingularValueDecomposition_F64] operator[<] identifier[DMatrixRMaj] operator[>] identifier[svd] operator[SEP] Keyword[int] identifier[numRows] , Keyword[int] identifier[numCols] , Keyword[boolean] identifier[needU] , Keyword[boolean] identifier[needV] , Keyword[boolean] id... |
public FacesMessage getFacesMessage() {
FacesMessage result = this.message;
if (null == result && null != this.messages && !this.messages.isEmpty()) {
result = messages.iterator().next();
}
return result;
} | class class_name[name] begin[{]
method[getFacesMessage, return_type[type[FacesMessage]], modifier[public], parameter[]] begin[{]
local_variable[type[FacesMessage], result]
if[binary_operation[binary_operation[binary_operation[literal[null], ==, member[.result]], &&, binary_operation[lit... | Keyword[public] identifier[FacesMessage] identifier[getFacesMessage] operator[SEP] operator[SEP] {
identifier[FacesMessage] identifier[result] operator[=] Keyword[this] operator[SEP] identifier[message] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[result] operator[&&] Other[null] o... |
private T retrieveAndProcessFeed (String originalId) {
// see if we have it cached locally
String id = cleanId(originalId);
String key = bucketFolder != null ? String.join("/", bucketFolder, id) : id;
File dbFile = new File(cacheDir, id + ".db");
GTFSFeed feed;
if (dbFile... | class class_name[name] begin[{]
method[retrieveAndProcessFeed, return_type[type[T]], modifier[private], parameter[originalId]] begin[{]
local_variable[type[String], id]
local_variable[type[String], key]
local_variable[type[File], dbFile]
local_variable[type[GTFSFeed], feed]
... | Keyword[private] identifier[T] identifier[retrieveAndProcessFeed] operator[SEP] identifier[String] identifier[originalId] operator[SEP] {
identifier[String] identifier[id] operator[=] identifier[cleanId] operator[SEP] identifier[originalId] operator[SEP] operator[SEP] identifier[String] identifier[key] operator[... |
public void marshall(GroupVersion groupVersion, ProtocolMarshaller protocolMarshaller) {
if (groupVersion == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(groupVersion.getConnectorDefinitionVersionA... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[groupVersion, protocolMarshaller]] begin[{]
if[binary_operation[member[.groupVersion], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_opera... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GroupVersion] identifier[groupVersion] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[groupVersion] operator[==] Other[null] operator[SEP] {
Keyword[throw]... |
public void error(SourcePosition pos, String key, Object... args) {
printError(pos, getText(key, args));
} | class class_name[name] begin[{]
method[error, return_type[void], modifier[public], parameter[pos, key, args]] begin[{]
call[.printError, parameter[member[.pos], call[.getText, parameter[member[.key], member[.args]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[error] operator[SEP] identifier[SourcePosition] identifier[pos] , identifier[String] identifier[key] , identifier[Object] operator[...] identifier[args] operator[SEP] {
identifier[printError] operator[SEP] identifier[pos] , identifier[getText] operator[SEP] identifier[... |
public void writeObject(Object o) throws IOException {
ObjectOutputStream oos = AnonymousClassWarnings.checkingObjectOutputStream(out);
oos.writeObject(o);
// don't close oss, which will close the underlying stream
// no need to flush either, given the way oos is implemented
} | class class_name[name] begin[{]
method[writeObject, return_type[void], modifier[public], parameter[o]] begin[{]
local_variable[type[ObjectOutputStream], oos]
call[oos.writeObject, parameter[member[.o]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[writeObject] operator[SEP] identifier[Object] identifier[o] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[ObjectOutputStream] identifier[oos] operator[=] identifier[AnonymousClassWarnings] operator[SEP] identifier[checkingObjectOutputStream] operator[... |
private static Thread[] getThreads(ThreadGroup g) {
int mul = 1;
do {
Thread[] arr = new Thread[g.activeCount() * mul + 1];
if (g.enumerate(arr) < arr.length) {
return arr;
}
mul++;
} while (true);
} | class class_name[name] begin[{]
method[getThreads, return_type[type[Thread]], modifier[private static], parameter[g]] begin[{]
local_variable[type[int], mul]
do[literal[true]] begin[{]
local_variable[type[Thread], arr]
if[binary_operation[call[g.enume... | Keyword[private] Keyword[static] identifier[Thread] operator[SEP] operator[SEP] identifier[getThreads] operator[SEP] identifier[ThreadGroup] identifier[g] operator[SEP] {
Keyword[int] identifier[mul] operator[=] Other[1] operator[SEP] Keyword[do] {
identifier[Thread] operator[SEP] operator[SEP] identi... |
@Override
protected void nodeRecovered(Node node) {
NodeStatus nodeStatus = getNodeStatus(node);
synchronized(nodeStatus) {
nodeStatus.resetCounters(getConfig().getTime().getMilliseconds());
super.nodeRecovered(node);
}
} | class class_name[name] begin[{]
method[nodeRecovered, return_type[void], modifier[protected], parameter[node]] begin[{]
local_variable[type[NodeStatus], nodeStatus]
SYNCHRONIZED[member[.nodeStatus]] BEGIN[{]
call[nodeStatus.resetCounters, parameter[call[.getConfi... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[nodeRecovered] operator[SEP] identifier[Node] identifier[node] operator[SEP] {
identifier[NodeStatus] identifier[nodeStatus] operator[=] identifier[getNodeStatus] operator[SEP] identifier[node] operator[SEP] operator[SEP] Keyword[sync... |
@Override
public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) {
if (pvalue == null) {
return true;
}
try {
final Object field1Value = BeanPropertyReaderUtil.getNullSaveProperty(pvalue, field1Name);
final Object field2Value = BeanPropertyReaderUtil... | class class_name[name] begin[{]
method[isValid, return_type[type[boolean]], modifier[final public], parameter[pvalue, pcontext]] begin[{]
if[binary_operation[member[.pvalue], ==, literal[null]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
TryStat... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[boolean] identifier[isValid] operator[SEP] Keyword[final] identifier[Object] identifier[pvalue] , Keyword[final] identifier[ConstraintValidatorContext] identifier[pcontext] operator[SEP] {
Keyword[if] operator[SEP] identifier[pvalue] oper... |
public String getMessageInfoType(BaseMessage externalMessage)
{
if (externalMessage != null)
if (externalMessage.getMessageHeader() != null)
if (externalMessage.getMessageHeader().get(TrxMessageHeader.MESSAGE_INFO_TYPE) != null)
return (String)externalMessage.... | class class_name[name] begin[{]
method[getMessageInfoType, return_type[type[String]], modifier[public], parameter[externalMessage]] begin[{]
if[binary_operation[member[.externalMessage], !=, literal[null]]] begin[{]
if[binary_operation[call[externalMessage.getMessageHeader, paramete... | Keyword[public] identifier[String] identifier[getMessageInfoType] operator[SEP] identifier[BaseMessage] identifier[externalMessage] operator[SEP] {
Keyword[if] operator[SEP] identifier[externalMessage] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[externalMessage] operator[SEP] iden... |
private void resetMenuItems(boolean enable) {
for (int i = 0; i < severityItemList.length; ++i) {
MenuItem menuItem = severityItemList[i];
menuItem.setEnabled(enable);
menuItem.setSelection(false);
}
} | class class_name[name] begin[{]
method[resetMenuItems, return_type[void], modifier[private], parameter[enable]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=se... | Keyword[private] Keyword[void] identifier[resetMenuItems] operator[SEP] Keyword[boolean] identifier[enable] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[severityItemList] operator[SEP] identifier[length] operator[SEP... |
public Object getAttributeValue(String name) throws IOException {
ObjectIdentifier oid = PKCS9Attribute.getOID(name);
if (oid == null)
throw new IOException("Attribute name " + name +
" not recognized or not supported.");
return getAttributeValue(o... | class class_name[name] begin[{]
method[getAttributeValue, return_type[type[Object]], modifier[public], parameter[name]] begin[{]
local_variable[type[ObjectIdentifier], oid]
if[binary_operation[member[.oid], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[B... | Keyword[public] identifier[Object] identifier[getAttributeValue] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[ObjectIdentifier] identifier[oid] operator[=] identifier[PKCS9Attribute] operator[SEP] identifier[getOID] operator[SEP] identifier[... |
@Override
public String getResourceId() {
Preconditions.checkArgument(
this.urlType == UrlType.RESOURCE,
"UrlType must be %s but was %s",
UrlType.RESOURCE,
this.urlType);
return this.resourceId;
} | class class_name[name] begin[{]
method[getResourceId, return_type[type[String]], modifier[public], parameter[]] begin[{]
call[Preconditions.checkArgument, parameter[binary_operation[THIS[member[None.urlType]], ==, member[UrlType.RESOURCE]], literal["UrlType must be %s but was %s"], member[UrlTy... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getResourceId] operator[SEP] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] Keyword[this] operator[SEP] identifier[urlType] operator[==] identifier[UrlType] operator[SEP] identifier[R... |
public static List<TextChunk> mergeWords(List<TextElement> textElements, List<Ruling> verticalRulings) {
List<TextChunk> textChunks = new ArrayList<>();
if (textElements.isEmpty()) {
return textChunks;
}
// it's a problem that this `remove` is side-effecty
// other... | class class_name[name] begin[{]
method[mergeWords, return_type[type[List]], modifier[public static], parameter[textElements, verticalRulings]] begin[{]
local_variable[type[List], textChunks]
if[call[textElements.isEmpty, parameter[]]] begin[{]
return[member[.textChunks]]
... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[TextChunk] operator[>] identifier[mergeWords] operator[SEP] identifier[List] operator[<] identifier[TextElement] operator[>] identifier[textElements] , identifier[List] operator[<] identifier[Ruling] operator[>] identifier[verticalRulings] operato... |
public synchronized void paintRow(Graphics2D g2d, AbstractGraphRow row, Color color, double zoomFactor, int limitPointFactor) {
Iterator<Entry<Long, AbstractGraphPanelChartElement>> it = row.iterator();
Entry<Long, AbstractGraphPanelChartElement> element;
Stroke olStroke;
prevX = -1;
... | class class_name[name] begin[{]
method[paintRow, return_type[void], modifier[synchronized public], parameter[g2d, row, color, zoomFactor, limitPointFactor]] begin[{]
local_variable[type[Iterator], it]
local_variable[type[Entry], element]
local_variable[type[Stroke], olStroke]
... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[paintRow] operator[SEP] identifier[Graphics2D] identifier[g2d] , identifier[AbstractGraphRow] identifier[row] , identifier[Color] identifier[color] , Keyword[double] identifier[zoomFactor] , Keyword[int] identifier[limitPointFactor] operator[SEP] {
... |
public void encode(AsnOutputStream aos) throws EncodeException {
if (this.errorCode == null)
throw new EncodeException("Error encoding ReturnError: ErrorCode must not be null");
if (this.correlationId == null)
throw new EncodeException("Error encoding ReturnError: correlationId ... | class class_name[name] begin[{]
method[encode, return_type[void], modifier[public], parameter[aos]] begin[{]
if[binary_operation[THIS[member[None.errorCode]], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualif... | Keyword[public] Keyword[void] identifier[encode] operator[SEP] identifier[AsnOutputStream] identifier[aos] operator[SEP] Keyword[throws] identifier[EncodeException] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[errorCode] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] ide... |
public InetSocketAddress getLocalAddress()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getLocalAddress");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getLocalAddress","rc="+null);
return null;
} | class class_name[name] begin[{]
method[getLocalAddress, return_type[type[InetSocketAddress]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, para... | Keyword[public] identifier[InetSocketAddress] identifier[getLocalAddress] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP]... |
private Feature getFeature(AnnotationFS annotation, FeatureDescription featureDescription) {
if(feature == null) {
String name = featureDescription.getName();
feature = annotation.getType().getFeatureByBaseName(name);
}
return feature;
} | class class_name[name] begin[{]
method[getFeature, return_type[type[Feature]], modifier[private], parameter[annotation, featureDescription]] begin[{]
if[binary_operation[member[.feature], ==, literal[null]]] begin[{]
local_variable[type[String], name]
assign[... | Keyword[private] identifier[Feature] identifier[getFeature] operator[SEP] identifier[AnnotationFS] identifier[annotation] , identifier[FeatureDescription] identifier[featureDescription] operator[SEP] {
Keyword[if] operator[SEP] identifier[feature] operator[==] Other[null] operator[SEP] {
identifier[S... |
public static final boolean isListItem(String pattern)
{
int idx = pattern.lastIndexOf(Lim);
if (idx != -1)
{
try
{
Integer.parseInt(pattern.substring(idx+1));
return true;
}
catch (NumberFormatExceptio... | class class_name[name] begin[{]
method[isListItem, return_type[type[boolean]], modifier[final public static], parameter[pattern]] begin[{]
local_variable[type[int], idx]
if[binary_operation[member[.idx], !=, literal[1]]] begin[{]
TryStatement(block=[StatementExpression(expre... | Keyword[public] Keyword[static] Keyword[final] Keyword[boolean] identifier[isListItem] operator[SEP] identifier[String] identifier[pattern] operator[SEP] {
Keyword[int] identifier[idx] operator[=] identifier[pattern] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[Lim] operator[SEP] operator[SEP] ... |
public boolean unlockIfLocked(Record record, Object bookmark) throws DBException
{
if (record != null)
{ // unlock record
BaseApplication app = null;
org.jbundle.model.Task task = null;
if (record.getRecordOwner() != null)
task = record.getRecord... | class class_name[name] begin[{]
method[unlockIfLocked, return_type[type[boolean]], modifier[public], parameter[record, bookmark]] begin[{]
if[binary_operation[member[.record], !=, literal[null]]] begin[{]
local_variable[type[BaseApplication], app]
local_variable[type[org... | Keyword[public] Keyword[boolean] identifier[unlockIfLocked] operator[SEP] identifier[Record] identifier[record] , identifier[Object] identifier[bookmark] operator[SEP] Keyword[throws] identifier[DBException] {
Keyword[if] operator[SEP] identifier[record] operator[!=] Other[null] operator[SEP] {
ident... |
public long run(String partitionValue, long maxTotalRows, long targetMaxRowsToDelete) {
if (targetMaxRowsToDelete <= 0) {
throw new VoltAbortException("maxRowsToDeletePerProc must be > 0.");
}
if (maxTotalRows < 0) {
throw new VoltAbortException("maxTotalRows must be >= 0... | class class_name[name] begin[{]
method[run, return_type[type[long]], modifier[public], parameter[partitionValue, maxTotalRows, targetMaxRowsToDelete]] begin[{]
if[binary_operation[member[.targetMaxRowsToDelete], <=, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(argume... | Keyword[public] Keyword[long] identifier[run] operator[SEP] identifier[String] identifier[partitionValue] , Keyword[long] identifier[maxTotalRows] , Keyword[long] identifier[targetMaxRowsToDelete] operator[SEP] {
Keyword[if] operator[SEP] identifier[targetMaxRowsToDelete] operator[<=] Other[0] operator[SEP] {... |
private XmlElement getXMLParam(Object o) throws XMLRPCException {
XmlElement param = new XmlElement(XMLRPCClient.PARAM);
XmlElement value = new XmlElement(XMLRPCClient.VALUE);
param.addChildren(value);
value.addChildren(serializerHandler.serialize(o));
return param;
} | class class_name[name] begin[{]
method[getXMLParam, return_type[type[XmlElement]], modifier[private], parameter[o]] begin[{]
local_variable[type[XmlElement], param]
local_variable[type[XmlElement], value]
call[param.addChildren, parameter[member[.value]]]
call[va... | Keyword[private] identifier[XmlElement] identifier[getXMLParam] operator[SEP] identifier[Object] identifier[o] operator[SEP] Keyword[throws] identifier[XMLRPCException] {
identifier[XmlElement] identifier[param] operator[=] Keyword[new] identifier[XmlElement] operator[SEP] identifier[XMLRPCClient] operator[SEP] ... |
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case AfplibPackage.BDX__DMX_NAME:
return getDMXName();
}
return super.eGet(featureID, resolve, coreType);
} | class class_name[name] begin[{]
method[eGet, return_type[type[Object]], modifier[public], parameter[featureID, resolve, coreType]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=BDX__DMX_NAME, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selector... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[eGet] operator[SEP] Keyword[int] identifier[featureID] , Keyword[boolean] identifier[resolve] , Keyword[boolean] identifier[coreType] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
K... |
public static boolean isEmpty(Object value) throws IOException {
if(value instanceof String) {
// If A is a string, then the result is A.
return ((String)value).isEmpty();
} else if(value == null) {
// Otherwise, if A is null, then the result is "".
return true;
} else if(value instanceof Writable) {
... | class class_name[name] begin[{]
method[isEmpty, return_type[type[boolean]], modifier[public static], parameter[value]] begin[{]
if[binary_operation[member[.value], instanceof, type[String]]] begin[{]
return[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_o... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isEmpty] operator[SEP] identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[String] operator[SEP] {
Keyword[return] operator[SE... |
protected void fillItem(CmsObject cms, CmsResource resource, Locale locale) {
Item resourceItem = m_container.getItem(resource.getStructureId().toString());
if (resourceItem == null) {
resourceItem = m_container.addItem(resource.getStructureId().toString());
}
fillItemDefaul... | class class_name[name] begin[{]
method[fillItem, return_type[void], modifier[protected], parameter[cms, resource, locale]] begin[{]
local_variable[type[Item], resourceItem]
if[binary_operation[member[.resourceItem], ==, literal[null]]] begin[{]
assign[member[.res... | Keyword[protected] Keyword[void] identifier[fillItem] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[CmsResource] identifier[resource] , identifier[Locale] identifier[locale] operator[SEP] {
identifier[Item] identifier[resourceItem] operator[=] identifier[m_container] operator[SEP] identifier... |
protected void processParentEvent() throws Exception {
// get current children snapshot and reset this watch.
Set<String> children = new TreeSet<String>(m_zk.getChildren(m_rootNode, m_parentWatch));
// intersect to get newChildren and update m_lastChildren to the current set.
Set<String>... | class class_name[name] begin[{]
method[processParentEvent, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[Set], children]
local_variable[type[Set], newChildren]
call[newChildren.removeAll, parameter[member[.m_lastChildren]]]
ass... | Keyword[protected] Keyword[void] identifier[processParentEvent] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[children] operator[=] Keyword[new] identifier[TreeSet] operator[<] identifier[String] operator[>] operator[SEP]... |
public Reduction asReduction(CSTNode second) {
Reduction created = asReduction();
created.add(second);
return created;
} | class class_name[name] begin[{]
method[asReduction, return_type[type[Reduction]], modifier[public], parameter[second]] begin[{]
local_variable[type[Reduction], created]
call[created.add, parameter[member[.second]]]
return[member[.created]]
end[}]
END[}] | Keyword[public] identifier[Reduction] identifier[asReduction] operator[SEP] identifier[CSTNode] identifier[second] operator[SEP] {
identifier[Reduction] identifier[created] operator[=] identifier[asReduction] operator[SEP] operator[SEP] operator[SEP] identifier[created] operator[SEP] identifier[add] operator[SEP... |
protected void _generate(SarlBehavior behavior, IExtraLanguageGeneratorContext context) {
final JvmDeclaredType jvmType = getJvmModelAssociations().getInferredType(behavior);
final PyAppendable appendable = createAppendable(jvmType, context);
final List<JvmTypeReference> superTypes;
if (behavior.getExtends() !=... | class class_name[name] begin[{]
method[_generate, return_type[void], modifier[protected], parameter[behavior, context]] begin[{]
local_variable[type[JvmDeclaredType], jvmType]
local_variable[type[PyAppendable], appendable]
local_variable[type[List], superTypes]
if[binary... | Keyword[protected] Keyword[void] identifier[_generate] operator[SEP] identifier[SarlBehavior] identifier[behavior] , identifier[IExtraLanguageGeneratorContext] identifier[context] operator[SEP] {
Keyword[final] identifier[JvmDeclaredType] identifier[jvmType] operator[=] identifier[getJvmModelAssociations] opera... |
private static LinkedHashMap<String, Type> trackGenerics(final Class<?> type,
final Class<?> known,
final LinkedHashMap<String, Type> knownGenerics) {
final Map<Class<?>, LinkedHashMap<Strin... | class class_name[name] begin[{]
method[trackGenerics, return_type[type[LinkedHashMap]], modifier[private static], parameter[type, known, knownGenerics]] begin[{]
local_variable[type[Map], generics]
local_variable[type[Map], tracedRootGenerics]
local_variable[type[Map], rawRootGenerics]
... | Keyword[private] Keyword[static] identifier[LinkedHashMap] operator[<] identifier[String] , identifier[Type] operator[>] identifier[trackGenerics] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , Keyword[final] identifier[Class] operator[<] operator[?] operator[>] ... |
public GetDomainStatisticsResponse getDomainStatistics(GetDomainStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty.");
InternalRequest internalRequest = createRequest(HttpMethodNam... | class class_name[name] begin[{]
method[getDomainStatistics, return_type[type[GetDomainStatisticsResponse]], modifier[public], parameter[request]] begin[{]
call[.checkNotNull, parameter[member[.request], literal["The parameter request should NOT be null."]]]
call[.checkStringNotE... | Keyword[public] identifier[GetDomainStatisticsResponse] identifier[getDomainStatistics] operator[SEP] identifier[GetDomainStatisticsRequest] identifier[request] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[request] , literal[String] operator[SEP] operator[SEP] identifier[checkStringNotEmpty... |
public ByteVector putUTF8(final String stringValue) {
int charLength = stringValue.length();
if (charLength > 65535) {
throw new IllegalArgumentException();
}
int currentLength = length;
if (currentLength + 2 + charLength > data.length) {
enlarge(2 + charLength);
}
byte[] current... | class class_name[name] begin[{]
method[putUTF8, return_type[type[ByteVector]], modifier[public], parameter[stringValue]] begin[{]
local_variable[type[int], charLength]
if[binary_operation[member[.charLength], >, literal[65535]]] begin[{]
ThrowStatement(expression=ClassCreato... | Keyword[public] identifier[ByteVector] identifier[putUTF8] operator[SEP] Keyword[final] identifier[String] identifier[stringValue] operator[SEP] {
Keyword[int] identifier[charLength] operator[=] identifier[stringValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operato... |
public static <K, V extends Comparable<? super V>> Map<K, V> sortByValue(
Map<K, V> map) {
return sortByValue(map, false);
} | class class_name[name] begin[{]
method[sortByValue, return_type[type[Map]], modifier[public static], parameter[map]] begin[{]
return[call[.sortByValue, parameter[member[.map], literal[false]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[V] operator[>] operator[>] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[sortByValue] operator[SEP] identifier[Map] ope... |
protected void eventPreUnlocked(SIMPMessage msg, TransactionCommon tran)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "eventPreUnlocked", new Object[]{ msg, tran});
if ((msg.guessRedeliveredCount() + 1) >= _baseDestHandler.getMaxFailedDeliveries())
{
... | class class_name[name] begin[{]
method[eventPreUnlocked, return_type[void], modifier[protected], parameter[msg, tran]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[... | Keyword[protected] Keyword[void] identifier[eventPreUnlocked] operator[SEP] identifier[SIMPMessage] identifier[msg] , identifier[TransactionCommon] identifier[tran] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] oper... |
public IntronSequence removeIntron(String accession) {
for (IntronSequence intronSequence : intronSequenceList) {
if (intronSequence.getAccession().getID().equals(accession)) {
intronSequenceList.remove(intronSequence);
intronSequenceHashMap.remove(accession);
return intronSequence;
}
}
return n... | class class_name[name] begin[{]
method[removeIntron, return_type[type[IntronSequence]], modifier[public], parameter[accession]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getAccession, postfix_operators=[], prefix_operat... | Keyword[public] identifier[IntronSequence] identifier[removeIntron] operator[SEP] identifier[String] identifier[accession] operator[SEP] {
Keyword[for] operator[SEP] identifier[IntronSequence] identifier[intronSequence] operator[:] identifier[intronSequenceList] operator[SEP] {
Keyword[if] operator[S... |
public static AlipayEbppBillGetResponse ebppBillGet(String orderType, String merchantOrderNo)
throws AlipayApiException {
AlipayEbppBillGetRequest request = new AlipayEbppBillGetRequest();
request.setOrderType(orderType);
request.setMerchantOrderNo(merchantOrderNo);
return AliPayApiConfigKit.getAliPayApiConf... | class class_name[name] begin[{]
method[ebppBillGet, return_type[type[AlipayEbppBillGetResponse]], modifier[public static], parameter[orderType, merchantOrderNo]] begin[{]
local_variable[type[AlipayEbppBillGetRequest], request]
call[request.setOrderType, parameter[member[.orderType]]]
... | Keyword[public] Keyword[static] identifier[AlipayEbppBillGetResponse] identifier[ebppBillGet] operator[SEP] identifier[String] identifier[orderType] , identifier[String] identifier[merchantOrderNo] operator[SEP] Keyword[throws] identifier[AlipayApiException] {
identifier[AlipayEbppBillGetRequest] identifier[req... |
public static String extractMimeType(final String contentType) {
final int ndx = contentType.indexOf(';');
final String mime;
if (ndx != -1) {
mime = contentType.substring(0, ndx);
} else {
mime = contentType;
}
return mime;
} | class class_name[name] begin[{]
method[extractMimeType, return_type[type[String]], modifier[public static], parameter[contentType]] begin[{]
local_variable[type[int], ndx]
local_variable[type[String], mime]
if[binary_operation[member[.ndx], !=, literal[1]]] begin[{]
... | Keyword[public] Keyword[static] identifier[String] identifier[extractMimeType] operator[SEP] Keyword[final] identifier[String] identifier[contentType] operator[SEP] {
Keyword[final] Keyword[int] identifier[ndx] operator[=] identifier[contentType] operator[SEP] identifier[indexOf] operator[SEP] literal[String] op... |
private void populateTopics(String[] topics) {
for (String t : topics) {
// Clean up leading and trailing white space as appropriate
t = t.trim();
// Ignore topics that start or end with a '/'
if (t.startsWith("/") || t.endsWith("/") || t.contains("//") || t.isEm... | class class_name[name] begin[{]
method[populateTopics, return_type[void], modifier[private], parameter[topics]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qu... | Keyword[private] Keyword[void] identifier[populateTopics] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[topics] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[t] operator[:] identifier[topics] operator[SEP] {
identifier[t] operator[=] identifier[t] ... |
public void put_device_alias(Database database, String deviceName, String aliasname)
throws DevFailed {
String[] array = new String[2];
array[0] = deviceName;
array[1] = aliasname;
DeviceData argIn = new DeviceData();
argIn.insert(array);
command_inout(databas... | class class_name[name] begin[{]
method[put_device_alias, return_type[void], modifier[public], parameter[database, deviceName, aliasname]] begin[{]
local_variable[type[String], array]
assign[member[.array], member[.deviceName]]
assign[member[.array], member[.aliasname]]
... | Keyword[public] Keyword[void] identifier[put_device_alias] operator[SEP] identifier[Database] identifier[database] , identifier[String] identifier[deviceName] , identifier[String] identifier[aliasname] operator[SEP] Keyword[throws] identifier[DevFailed] {
identifier[String] operator[SEP] operator[SEP] identifi... |
public LNGIntVector upZeroLiterals() {
final LNGIntVector upZeroLiterals = new LNGIntVector();
for (int i = 0; i < this.trail.size(); ++i) {
final int lit = this.trail.get(i);
if (var(lit).level() > 0) {
break;
} else {
upZeroLiterals.p... | class class_name[name] begin[{]
method[upZeroLiterals, return_type[type[LNGIntVector]], modifier[public], parameter[]] begin[{]
local_variable[type[LNGIntVector], upZeroLiterals]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Varia... | Keyword[public] identifier[LNGIntVector] identifier[upZeroLiterals] operator[SEP] operator[SEP] {
Keyword[final] identifier[LNGIntVector] identifier[upZeroLiterals] operator[=] Keyword[new] identifier[LNGIntVector] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] op... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.