code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
private Set<String> getCSSHeadIncludes(CmsObject cms, CmsResource resource) {
if (CmsResourceTypeXmlContent.isXmlContent(resource)) {
try {
CmsXmlContentDefinition contentDefinition = CmsXmlContentDefinition.getContentDefinitionForResource(
cms,
... | class class_name[name] begin[{]
method[getCSSHeadIncludes, return_type[type[Set]], modifier[private], parameter[cms, resource]] begin[{]
if[call[CmsResourceTypeXmlContent.isXmlContent, parameter[member[.resource]]]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[... | Keyword[private] identifier[Set] operator[<] identifier[String] operator[>] identifier[getCSSHeadIncludes] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[CmsResource] identifier[resource] operator[SEP] {
Keyword[if] operator[SEP] identifier[CmsResourceTypeXmlContent] operator[SEP] identifier[i... |
public static <E> String listAsString(List<E> list, String separator) {
StringBuffer string = new StringBuffer(128);
Iterator<E> it = list.iterator();
while (it.hasNext()) {
string.append(it.next());
if (it.hasNext()) {
string.append(separator);
... | class class_name[name] begin[{]
method[listAsString, return_type[type[String]], modifier[public static], parameter[list, separator]] begin[{]
local_variable[type[StringBuffer], string]
local_variable[type[Iterator], it]
while[call[it.hasNext, parameter[]]] begin[{]
... | Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[String] identifier[listAsString] operator[SEP] identifier[List] operator[<] identifier[E] operator[>] identifier[list] , identifier[String] identifier[separator] operator[SEP] {
identifier[StringBuffer] identifier[string] operator[... |
public void write(OutputStream outStream) throws IOException
{
try
{
XMLStreamWriter xmlStreamWriter =
XMLOutputFactory.newInstance().createXMLStreamWriter(outStream, Constants.DEFAULT_ENCODING);
xmlStreamWriter.setNamespaceContext(nsContext);
xmlStreamWr... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[outStream]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix_operators=... | Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[OutputStream] identifier[outStream] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
identifier[XMLStreamWriter] identifier[xmlStreamWriter] operator[=] identifier[XMLOutputFactory] operator[SEP] identifier[... |
public SDVariable replaceWhere(String name, SDVariable update, SDVariable from, Condition condition) {
SDVariable ret = f().replaceWhere(update, from, condition);
return updateVariableNameAndReference(ret, name);
} | class class_name[name] begin[{]
method[replaceWhere, return_type[type[SDVariable]], modifier[public], parameter[name, update, from, condition]] begin[{]
local_variable[type[SDVariable], ret]
return[call[.updateVariableNameAndReference, parameter[member[.ret], member[.name]]]]
end[}]
END[}] | Keyword[public] identifier[SDVariable] identifier[replaceWhere] operator[SEP] identifier[String] identifier[name] , identifier[SDVariable] identifier[update] , identifier[SDVariable] identifier[from] , identifier[Condition] identifier[condition] operator[SEP] {
identifier[SDVariable] identifier[ret] operator[... |
private static void fillNSMapWithPrefixesDeclaredInElement(final Map<String, String> nsMap, final Element element) throws DOMException {
NamedNodeMap attributes = element.getAttributes();
for (int i = 0; i < attributes.getLength(); i++) {
Node attribute = attributes.item(i);
if (... | class class_name[name] begin[{]
method[fillNSMapWithPrefixesDeclaredInElement, return_type[void], modifier[private static], parameter[nsMap, element]] begin[{]
local_variable[type[NamedNodeMap], attributes]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annota... | Keyword[private] Keyword[static] Keyword[void] identifier[fillNSMapWithPrefixesDeclaredInElement] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[nsMap] , Keyword[final] identifier[Element] identifier[element] operator[SEP] Keyword[throws] identi... |
protected Boolean compareList( // was BooleanValue
ArrayList firstList,
Object val1,
boolean lessThan,
boolean permissive,
boolean overallTrue) // If true we are searching for at least one TRUE result, else at least one FALSE.
{
if (tc.isAnyTracingEnabled() && tc.isEntryEnabled()... | class class_name[name] begin[{]
method[compareList, return_type[type[Boolean]], modifier[protected], parameter[firstList, val1, lessThan, permissive, overallTrue]] begin[{]
if[binary_operation[call[tc.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
... | Keyword[protected] identifier[Boolean] identifier[compareList] operator[SEP] identifier[ArrayList] identifier[firstList] , identifier[Object] identifier[val1] , Keyword[boolean] identifier[lessThan] , Keyword[boolean] identifier[permissive] , Keyword[boolean] identifier[overallTrue] operator[SEP] {
Keyword[i... |
public Set<DagNode<T>> getDependencyNodes(Set<DagNode<T>> forkNodes) {
Set<DagNode<T>> dependencyNodes = new HashSet<>();
for (DagNode<T> endNode : endNodes) {
if (!forkNodes.contains(endNode)) {
dependencyNodes.add(endNode);
}
}
//Get all ancestors of non-forkable nodes
Set<Dag... | class class_name[name] begin[{]
method[getDependencyNodes, return_type[type[Set]], modifier[public], parameter[forkNodes]] begin[{]
local_variable[type[Set], dependencyNodes]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReferen... | Keyword[public] identifier[Set] operator[<] identifier[DagNode] operator[<] identifier[T] operator[>] operator[>] identifier[getDependencyNodes] operator[SEP] identifier[Set] operator[<] identifier[DagNode] operator[<] identifier[T] operator[>] operator[>] identifier[forkNodes] operator[SEP] {
identifier[Set] op... |
List<LogSegment> markDeletedWhile(LogSegmentFilter filter) throws IOException {
synchronized (lock) {
List<LogSegment> view = segments.getView();
List<LogSegment> deletable = new ArrayList<LogSegment>();
for (LogSegment seg : view) {
if (filter.filter(seg)) {
... | class class_name[name] begin[{]
method[markDeletedWhile, return_type[type[List]], modifier[default], parameter[filter]] begin[{]
SYNCHRONIZED[member[.lock]] BEGIN[{]
local_variable[type[List], view]
local_variable[type[List], deletable]
ForStatement(body=Bloc... | identifier[List] operator[<] identifier[LogSegment] operator[>] identifier[markDeletedWhile] operator[SEP] identifier[LogSegmentFilter] identifier[filter] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] {
identifier[List] opera... |
public void setNLNDccp(Integer newNLNDccp) {
Integer oldNLNDccp = nlnDccp;
nlnDccp = newNLNDccp;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.LND__NLN_DCCP, oldNLNDccp, nlnDccp));
} | class class_name[name] begin[{]
method[setNLNDccp, return_type[void], modifier[public], parameter[newNLNDccp]] begin[{]
local_variable[type[Integer], oldNLNDccp]
assign[member[.nlnDccp], member[.newNLNDccp]]
if[call[.eNotificationRequired, parameter[]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setNLNDccp] operator[SEP] identifier[Integer] identifier[newNLNDccp] operator[SEP] {
identifier[Integer] identifier[oldNLNDccp] operator[=] identifier[nlnDccp] operator[SEP] identifier[nlnDccp] operator[=] identifier[newNLNDccp] operator[SEP] Keyword[if] operator[SEP] ide... |
public static boolean areEqual(SparseArray<?> sparseArray, Object o) {
if (sparseArray == o) {
return true;
}
if (o == null) {
return false;
}
SparseArray<?> other = (SparseArray<?>) o;
if (sparseArray.size() == other.size()) {
return sparseArray.keyStream().allMatch(key -> Obj... | class class_name[name] begin[{]
method[areEqual, return_type[type[boolean]], modifier[public static], parameter[sparseArray, o]] begin[{]
if[binary_operation[member[.sparseArray], ==, member[.o]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[areEqual] operator[SEP] identifier[SparseArray] operator[<] operator[?] operator[>] identifier[sparseArray] , identifier[Object] identifier[o] operator[SEP] {
Keyword[if] operator[SEP] identifier[sparseArray] operator[==] identifier[o] operator[SEP] {... |
public synchronized void setStorageDirectories(Collection<URI> fsNameDirs,
Collection<URI> fsEditsDirs,
Map<URI, NNStorageLocation> locationMap)
throws IOException {
this.storageDirs.clear();
this.removedStorageDirs.c... | class class_name[name] begin[{]
method[setStorageDirectories, return_type[void], modifier[synchronized public], parameter[fsNameDirs, fsEditsDirs, locationMap]] begin[{]
THIS[member[None.storageDirs]call[None.clear, parameter[]]]
THIS[member[None.removedStorageDirs]call[None.cle... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[setStorageDirectories] operator[SEP] identifier[Collection] operator[<] identifier[URI] operator[>] identifier[fsNameDirs] , identifier[Collection] operator[<] identifier[URI] operator[>] identifier[fsEditsDirs] , identifier[Map] operator[<] identifier[UR... |
public Set<Constructor> getConstructorsWithAnyParamAnnotated(Class<? extends Annotation> annotation) {
return getConstructorsFromDescriptors(store.get(index(MethodParameterScanner.class), annotation.getName()), loaders());
} | class class_name[name] begin[{]
method[getConstructorsWithAnyParamAnnotated, return_type[type[Set]], modifier[public], parameter[annotation]] begin[{]
return[call[.getConstructorsFromDescriptors, parameter[call[store.get, parameter[call[.index, parameter[ClassReference(postfix_operators=[], prefix_oper... | Keyword[public] identifier[Set] operator[<] identifier[Constructor] operator[>] identifier[getConstructorsWithAnyParamAnnotated] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Annotation] operator[>] identifier[annotation] operator[SEP] {
Keyword[return] identifier[getConstru... |
private static ReloadableType getReloadableTypeIfHasBeenReloaded(Class<?> clazz) {
if (TypeRegistry.nothingReloaded) {
return null;
}
ReloadableType rtype = getRType(clazz);
if (rtype != null && rtype.hasBeenReloaded()) {
return rtype;
}
else {
return null;
}
} | class class_name[name] begin[{]
method[getReloadableTypeIfHasBeenReloaded, return_type[type[ReloadableType]], modifier[private static], parameter[clazz]] begin[{]
if[member[TypeRegistry.nothingReloaded]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
... | Keyword[private] Keyword[static] identifier[ReloadableType] identifier[getReloadableTypeIfHasBeenReloaded] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] {
Keyword[if] operator[SEP] identifier[TypeRegistry] operator[SEP] identifier[nothingReloaded] operator[SE... |
@Override
public IRenderingElement generate(IAtomContainer container, RendererModel parameters) {
if (container.getAtomCount() == 0) return new ElementGroup();
Map<IAtom,String> symbolRemap = new HashMap<>();
StandardSgroupGenerator.prepareDisplayShortcuts(container, symbolRemap);
... | class class_name[name] begin[{]
method[generate, return_type[type[IRenderingElement]], modifier[public], parameter[container, parameters]] begin[{]
if[binary_operation[call[container.getAtomCount, parameter[]], ==, literal[0]]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_t... | annotation[@] identifier[Override] Keyword[public] identifier[IRenderingElement] identifier[generate] operator[SEP] identifier[IAtomContainer] identifier[container] , identifier[RendererModel] identifier[parameters] operator[SEP] {
Keyword[if] operator[SEP] identifier[container] operator[SEP] identifier[getAtom... |
public final int compare(MemorySegment seg2, int offset1, int offset2, int len) {
while (len >= 8) {
long l1 = this.getLongBigEndian(offset1);
long l2 = seg2.getLongBigEndian(offset2);
if (l1 != l2) {
return (l1 < l2) ^ (l1 < 0) ^ (l2 < 0) ? -1 : 1;
}
offset1 += 8;
offset2 += 8;
len -= 8;
... | class class_name[name] begin[{]
method[compare, return_type[type[int]], modifier[final public], parameter[seg2, offset1, offset2, len]] begin[{]
while[binary_operation[member[.len], >=, literal[8]]] begin[{]
local_variable[type[long], l1]
local_variable[type[long], l2]
... | Keyword[public] Keyword[final] Keyword[int] identifier[compare] operator[SEP] identifier[MemorySegment] identifier[seg2] , Keyword[int] identifier[offset1] , Keyword[int] identifier[offset2] , Keyword[int] identifier[len] operator[SEP] {
Keyword[while] operator[SEP] identifier[len] operator[>=] Other[8] opera... |
protected void joinInputs(DiGraphNode<N, Branch> node) {
FlowState<L> state = node.getAnnotation();
if (isForward()) {
if (cfg.getEntry() == node) {
state.setIn(createEntryLattice());
} else {
List<DiGraphNode<N, Branch>> inNodes = cfg.getDirectedPredNodes(node);
if (inNodes.... | class class_name[name] begin[{]
method[joinInputs, return_type[void], modifier[protected], parameter[node]] begin[{]
local_variable[type[FlowState], state]
if[call[.isForward, parameter[]]] begin[{]
if[binary_operation[call[cfg.getEntry, parameter[]], ==, member[... | Keyword[protected] Keyword[void] identifier[joinInputs] operator[SEP] identifier[DiGraphNode] operator[<] identifier[N] , identifier[Branch] operator[>] identifier[node] operator[SEP] {
identifier[FlowState] operator[<] identifier[L] operator[>] identifier[state] operator[=] identifier[node] operator[SEP] ident... |
@XmlElementDecl(namespace = "http://www.w3.org/ns/prov#", name = "wasInformedBy")
public JAXBElement<WasInformedBy> createWasInformedBy(WasInformedBy value) {
return new JAXBElement<WasInformedBy>(_WasInformedBy_QNAME, WasInformedBy.class, null, value);
} | class class_name[name] begin[{]
method[createWasInformedBy, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_WasInformedBy_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postf... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[WasInformedBy] operator[>] identifier[createWasInformedBy] operator[SEP] identifier[WasInf... |
public final static void addCookie(String name, String value, int maxAgeInSeconds) {
addCookie(name, value, maxAgeInSeconds, "/", null);
} | class class_name[name] begin[{]
method[addCookie, return_type[void], modifier[final public static], parameter[name, value, maxAgeInSeconds]] begin[{]
call[.addCookie, parameter[member[.name], member[.value], member[.maxAgeInSeconds], literal["/"], literal[null]]]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[static] Keyword[void] identifier[addCookie] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] , Keyword[int] identifier[maxAgeInSeconds] operator[SEP] {
identifier[addCookie] operator[SEP] identifier[name] , identifier[value] , ide... |
public static <FACETEDTYPE extends Faceted<?>, FACETTYPE extends Facet<FACETEDTYPE>> boolean isConstraintSatisfied(
Faceted<FACETTYPE> faceted, Set<Class<FACETTYPE>> requiredFacets)
{
boolean constraintsSatisfied = true;
for (Class<FACETTYPE> type : requiredFacets)
{
if (!facet... | class class_name[name] begin[{]
method[isConstraintSatisfied, return_type[type[boolean]], modifier[public static], parameter[faceted, requiredFacets]] begin[{]
local_variable[type[boolean], constraintsSatisfied]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Meth... | Keyword[public] Keyword[static] operator[<] identifier[FACETEDTYPE] Keyword[extends] identifier[Faceted] operator[<] operator[?] operator[>] , identifier[FACETTYPE] Keyword[extends] identifier[Facet] operator[<] identifier[FACETEDTYPE] operator[>] operator[>] Keyword[boolean] identifier[isConstraintSatisfied] operator... |
@Override
protected JedisConnector buildJedisConnector() {
JedisConnector jedisConnector = new JedisConnector();
jedisConnector.setJedisPoolConfig(JedisUtils.defaultJedisPoolConfig())
.setRedisHostsAndPorts(getRedisHostAndPort()).setRedisPassword(getRedisPassword())
.... | class class_name[name] begin[{]
method[buildJedisConnector, return_type[type[JedisConnector]], modifier[protected], parameter[]] begin[{]
local_variable[type[JedisConnector], jedisConnector]
call[jedisConnector.setJedisPoolConfig, parameter[call[JedisUtils.defaultJedisPoolConfig, parame... | annotation[@] identifier[Override] Keyword[protected] identifier[JedisConnector] identifier[buildJedisConnector] operator[SEP] operator[SEP] {
identifier[JedisConnector] identifier[jedisConnector] operator[=] Keyword[new] identifier[JedisConnector] operator[SEP] operator[SEP] operator[SEP] identifier[jedisConnec... |
public void setAccesskey(java.lang.String accesskey) {
getStateHelper().put(PropertyKeys.accesskey, accesskey);
handleAttribute("accesskey", accesskey);
} | class class_name[name] begin[{]
method[setAccesskey, return_type[void], modifier[public], parameter[accesskey]] begin[{]
call[.getStateHelper, parameter[]]
call[.handleAttribute, parameter[literal["accesskey"], member[.accesskey]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setAccesskey] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[accesskey] operator[SEP] {
identifier[getStateHelper] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[PropertyKeys] o... |
public static boolean isVisible(Class<?> clazz, ClassLoader classLoader) {
if (classLoader == null) {
return true;
}
try {
Class<?> actualClass = classLoader.loadClass(clazz.getName());
return (clazz == actualClass);
// Else: different interface cl... | class class_name[name] begin[{]
method[isVisible, return_type[type[boolean]], modifier[public static], parameter[clazz, classLoader]] begin[{]
if[binary_operation[member[.classLoader], ==, literal[null]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isVisible] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[ClassLoader] identifier[classLoader] operator[SEP] {
Keyword[if] operator[SEP] identifier[classLoader] operator[==] Other[null] operator[SEP] ... |
@Override
public CPDefinitionSpecificationOptionValue[] findByGroupId_PrevAndNext(
long CPDefinitionSpecificationOptionValueId, long groupId,
OrderByComparator<CPDefinitionSpecificationOptionValue> orderByComparator)
throws NoSuchCPDefinitionSpecificationOptionValueException {
CPDefinitionSpecificationOptionVa... | class class_name[name] begin[{]
method[findByGroupId_PrevAndNext, return_type[type[CPDefinitionSpecificationOptionValue]], modifier[public], parameter[CPDefinitionSpecificationOptionValueId, groupId, orderByComparator]] begin[{]
local_variable[type[CPDefinitionSpecificationOptionValue], cpDefinitionSpe... | annotation[@] identifier[Override] Keyword[public] identifier[CPDefinitionSpecificationOptionValue] operator[SEP] operator[SEP] identifier[findByGroupId_PrevAndNext] operator[SEP] Keyword[long] identifier[CPDefinitionSpecificationOptionValueId] , Keyword[long] identifier[groupId] , identifier[OrderByComparator] opera... |
public void init(SimpleNode node, Object source, boolean setOperation)
{
this.node = node;
this.source = source;
this.setOperation = setOperation;
result = null;
exception = null;
parent = null;
next = null;
previous = null;
firstChild = null;
... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[node, source, setOperation]] begin[{]
assign[THIS[member[None.node]], member[.node]]
assign[THIS[member[None.source]], member[.source]]
assign[THIS[member[None.setOperatio... | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[SimpleNode] identifier[node] , identifier[Object] identifier[source] , Keyword[boolean] identifier[setOperation] operator[SEP] {
Keyword[this] operator[SEP] identifier[node] operator[=] identifier[node] operator[SEP] Keyword[this] operator... |
@Override
protected String convertToString(Object value) throws Throwable {
Key key = (Key) value;
return KeyFactory.keyToString(key);
} | class class_name[name] begin[{]
method[convertToString, return_type[type[String]], modifier[protected], parameter[value]] begin[{]
local_variable[type[Key], key]
return[call[KeyFactory.keyToString, parameter[member[.key]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[convertToString] operator[SEP] identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[Throwable] {
identifier[Key] identifier[key] operator[=] operator[SEP] identifier[Key] operator[SEP] identifier[value] o... |
private void runCommand(TaskCommands taskCommand, String user,
List<String> cmdArgs, File workDir, Map<String, String> env)
throws IOException {
ShellCommandExecutor shExec =
buildTaskControllerExecutor(taskCommand, user, cmdArgs, workDir, env);
try {
shExec.execute();
} catch (Ex... | class class_name[name] begin[{]
method[runCommand, return_type[void], modifier[private], parameter[taskCommand, user, cmdArgs, workDir, env]] begin[{]
local_variable[type[ShellCommandExecutor], shExec]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=exec... | Keyword[private] Keyword[void] identifier[runCommand] operator[SEP] identifier[TaskCommands] identifier[taskCommand] , identifier[String] identifier[user] , identifier[List] operator[<] identifier[String] operator[>] identifier[cmdArgs] , identifier[File] identifier[workDir] , identifier[Map] operator[<] identifier... |
@SuppressWarnings("unchecked") /* See constructor comments. */
public void setAuthorization(Object soapClient, AdsSession adsSession)
throws AuthenticationException {
final String authorizationHeader =
authorizationHeaderProvider.getAuthorizationHeader(adsSession,
soapClientHandler.getEn... | class class_name[name] begin[{]
method[setAuthorization, return_type[void], modifier[public], parameter[soapClient, adsSession]] begin[{]
local_variable[type[String], authorizationHeader]
call[soapClientHandler.putAllHttpHeaders, parameter[member[.soapClient], ClassCreator(arguments=[],... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setAuthorization] operator[SEP] identifier[Object] identifier[soapClient] , identifier[AdsSession] identifier[adsSession] operator[SEP] Keyword[throws] identifier[AuthenticationException] {
... |
static public byte[] shortToBytes(short v) {
byte[] b = new byte[2];
int allbits = 255;
for (int i = 0; i < 2; i++) {
b[1 - i] = (byte) ((v & (allbits << i * 8)) >> i * 8);
}
return b;
} | class class_name[name] begin[{]
method[shortToBytes, return_type[type[byte]], modifier[public static], parameter[v]] begin[{]
local_variable[type[byte], b]
local_variable[type[int], allbits]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignme... | Keyword[static] Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[shortToBytes] operator[SEP] Keyword[short] identifier[v] operator[SEP] {
Keyword[byte] operator[SEP] operator[SEP] identifier[b] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[i... |
@Override
public List<CPDefinitionOptionValueRel> findByCPDefinitionOptionRelId(
long CPDefinitionOptionRelId, int start, int end,
OrderByComparator<CPDefinitionOptionValueRel> orderByComparator) {
return findByCPDefinitionOptionRelId(CPDefinitionOptionRelId, start,
end, orderByComparator, true);
} | class class_name[name] begin[{]
method[findByCPDefinitionOptionRelId, return_type[type[List]], modifier[public], parameter[CPDefinitionOptionRelId, start, end, orderByComparator]] begin[{]
return[call[.findByCPDefinitionOptionRelId, parameter[member[.CPDefinitionOptionRelId], member[.start], member[.en... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CPDefinitionOptionValueRel] operator[>] identifier[findByCPDefinitionOptionRelId] operator[SEP] Keyword[long] identifier[CPDefinitionOptionRelId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] , identifier[Ord... |
@Override
public ListTagsForResourcesResult listTagsForResources(ListTagsForResourcesRequest request) {
request = beforeClientExecution(request);
return executeListTagsForResources(request);
} | class class_name[name] begin[{]
method[listTagsForResources, return_type[type[ListTagsForResourcesResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListTagsForResources, parame... | annotation[@] identifier[Override] Keyword[public] identifier[ListTagsForResourcesResult] identifier[listTagsForResources] operator[SEP] identifier[ListTagsForResourcesRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ... |
public void marshall(JobRun jobRun, ProtocolMarshaller protocolMarshaller) {
if (jobRun == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(jobRun.getId(), ID_BINDING);
protocolMarshaller.m... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[jobRun, protocolMarshaller]] begin[{]
if[binary_operation[member[.jobRun], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pre... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[JobRun] identifier[jobRun] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[jobRun] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] iden... |
protected String prependJoin(String queryString, @Nullable SolrDataQuery query, @Nullable Class<?> domainType) {
if (query == null || query.getJoin() == null) {
return queryString;
}
String fromIndex = query.getJoin().getFromIndex() != null ? " fromIndex=" + query.getJoin().getFromIndex() : "";
return "{!jo... | class class_name[name] begin[{]
method[prependJoin, return_type[type[String]], modifier[protected], parameter[queryString, query, domainType]] begin[{]
if[binary_operation[binary_operation[member[.query], ==, literal[null]], ||, binary_operation[call[query.getJoin, parameter[]], ==, literal[nul... | Keyword[protected] identifier[String] identifier[prependJoin] operator[SEP] identifier[String] identifier[queryString] , annotation[@] identifier[Nullable] identifier[SolrDataQuery] identifier[query] , annotation[@] identifier[Nullable] identifier[Class] operator[<] operator[?] operator[>] identifier[domainType] oper... |
public com.google.protobuf.ByteString
getHttpHeaderBytes() {
java.lang.Object ref = httpHeader_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
httpHeader_ = b;
retur... | class class_name[name] begin[{]
method[getHttpHeaderBytes, return_type[type[com]], modifier[public], parameter[]] begin[{]
local_variable[type[java], ref]
if[binary_operation[member[.ref], instanceof, type[java]]] begin[{]
local_variable[type[com], b]
... | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[getHttpHeaderBytes] operator[SEP] operator[SEP] {
identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] identi... |
protected void updateModel(final ModelNode operation, final Resource resource) throws OperationFailedException {
updateModel(operation, resource.getModel());
} | class class_name[name] begin[{]
method[updateModel, return_type[void], modifier[protected], parameter[operation, resource]] begin[{]
call[.updateModel, parameter[member[.operation], call[resource.getModel, parameter[]]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[updateModel] operator[SEP] Keyword[final] identifier[ModelNode] identifier[operation] , Keyword[final] identifier[Resource] identifier[resource] operator[SEP] Keyword[throws] identifier[OperationFailedException] {
identifier[updateModel] operator[SEP] identifier[opera... |
private void loadParserTrainingParameters() {
this.parserTrainerParser.addArgument("-p", "--params").required(true)
.help("Load the parsing training parameters file.\n");
this.parserTrainerParser.addArgument("-t", "--taggerParams").required(true)
.help(
"Load the tagger training para... | class class_name[name] begin[{]
method[loadParserTrainingParameters, return_type[void], modifier[private], parameter[]] begin[{]
THIS[member[None.parserTrainerParser]call[None.addArgument, parameter[literal["-p"], literal["--params"]]]call[None.required, parameter[literal[true]]]call[None.help,... | Keyword[private] Keyword[void] identifier[loadParserTrainingParameters] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[parserTrainerParser] operator[SEP] identifier[addArgument] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[required] operator[SEP] l... |
public boolean zoneNAryExists(int zoneId, int zoneNAry, int partitionId) {
int currentZoneNAry = -1;
for(int replicatingNodeId: getReplicationNodeList(partitionId)) {
Node replicatingNode = cluster.getNodeById(replicatingNodeId);
if(replicatingNode.getZoneId() == zoneId) {
... | class class_name[name] begin[{]
method[zoneNAryExists, return_type[type[boolean]], modifier[public], parameter[zoneId, zoneNAry, partitionId]] begin[{]
local_variable[type[int], currentZoneNAry]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], de... | Keyword[public] Keyword[boolean] identifier[zoneNAryExists] operator[SEP] Keyword[int] identifier[zoneId] , Keyword[int] identifier[zoneNAry] , Keyword[int] identifier[partitionId] operator[SEP] {
Keyword[int] identifier[currentZoneNAry] operator[=] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP]... |
public long countClass(final String iClassName, final boolean iPolymorphic) {
final OClass cls = getMetadata().getImmutableSchemaSnapshot().getClass(iClassName);
if (cls == null)
throw new IllegalArgumentException("Class '" + cls + "' not found in database");
return countClass(cls, iPolymorphic);
} | class class_name[name] begin[{]
method[countClass, return_type[type[long]], modifier[public], parameter[iClassName, iPolymorphic]] begin[{]
local_variable[type[OClass], cls]
if[binary_operation[member[.cls], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[... | Keyword[public] Keyword[long] identifier[countClass] operator[SEP] Keyword[final] identifier[String] identifier[iClassName] , Keyword[final] Keyword[boolean] identifier[iPolymorphic] operator[SEP] {
Keyword[final] identifier[OClass] identifier[cls] operator[=] identifier[getMetadata] operator[SEP] operator[SEP]... |
public Event withResources(Resource... resources) {
if (this.resources == null) {
setResources(new com.amazonaws.internal.SdkInternalList<Resource>(resources.length));
}
for (Resource ele : resources) {
this.resources.add(ele);
}
return this;
} | class class_name[name] begin[{]
method[withResources, return_type[type[Event]], modifier[public], parameter[resources]] begin[{]
if[binary_operation[THIS[member[None.resources]], ==, literal[null]]] begin[{]
call[.setResources, parameter[ClassCreator(arguments=[MemberRef... | Keyword[public] identifier[Event] identifier[withResources] operator[SEP] identifier[Resource] operator[...] identifier[resources] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[resources] operator[==] Other[null] operator[SEP] {
identifier[setResources] operator[SEP]... |
@Override
public CPFriendlyURLEntry create(long CPFriendlyURLEntryId) {
CPFriendlyURLEntry cpFriendlyURLEntry = new CPFriendlyURLEntryImpl();
cpFriendlyURLEntry.setNew(true);
cpFriendlyURLEntry.setPrimaryKey(CPFriendlyURLEntryId);
String uuid = PortalUUIDUtil.generate();
cpFriendlyURLEntry.setUuid(uuid);
... | class class_name[name] begin[{]
method[create, return_type[type[CPFriendlyURLEntry]], modifier[public], parameter[CPFriendlyURLEntryId]] begin[{]
local_variable[type[CPFriendlyURLEntry], cpFriendlyURLEntry]
call[cpFriendlyURLEntry.setNew, parameter[literal[true]]]
call[c... | annotation[@] identifier[Override] Keyword[public] identifier[CPFriendlyURLEntry] identifier[create] operator[SEP] Keyword[long] identifier[CPFriendlyURLEntryId] operator[SEP] {
identifier[CPFriendlyURLEntry] identifier[cpFriendlyURLEntry] operator[=] Keyword[new] identifier[CPFriendlyURLEntryImpl] operator[SEP]... |
public Observable<ServiceResponse<Void>> updateFaceWithServiceResponseAsync(String personGroupId, UUID personId, UUID persistedFaceId, UpdateFaceOptionalParameter updateFaceOptionalParameter) {
if (this.client.azureRegion() == null) {
throw new IllegalArgumentException("Parameter this.client.azureRe... | class class_name[name] begin[{]
method[updateFaceWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[personGroupId, personId, persistedFaceId, updateFaceOptionalParameter]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.azureRegion, parameter[]]]... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] operator[>] identifier[updateFaceWithServiceResponseAsync] operator[SEP] identifier[String] identifier[personGroupId] , identifier[UUID] identifier[personId] , identifier[UUID] identifier[persistedF... |
private String nextLiteral(boolean assignOffsetsOnly) throws IOException {
StringBuilder builder = null;
valuePos = -1;
valueLength = 0;
int i = 0;
findNonLiteralCharacter:
while (true) {
for (; pos + i < limit; i++) {
switch (buffer[pos + i])... | class class_name[name] begin[{]
method[nextLiteral, return_type[type[String]], modifier[private], parameter[assignOffsetsOnly]] begin[{]
local_variable[type[StringBuilder], builder]
assign[member[.valuePos], literal[1]]
assign[member[.valueLength], literal[0]]
lo... | Keyword[private] identifier[String] identifier[nextLiteral] operator[SEP] Keyword[boolean] identifier[assignOffsetsOnly] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[StringBuilder] identifier[builder] operator[=] Other[null] operator[SEP] identifier[valuePos] operator[=] operator[-] Other[1... |
public static ClassNode lowestUpperBound(List<ClassNode> nodes) {
if (nodes.size()==1) return nodes.get(0);
return lowestUpperBound(nodes.get(0), lowestUpperBound(nodes.subList(1, nodes.size())));
} | class class_name[name] begin[{]
method[lowestUpperBound, return_type[type[ClassNode]], modifier[public static], parameter[nodes]] begin[{]
if[binary_operation[call[nodes.size, parameter[]], ==, literal[1]]] begin[{]
return[call[nodes.get, parameter[literal[0]]]]
else begin[{]
None
... | Keyword[public] Keyword[static] identifier[ClassNode] identifier[lowestUpperBound] operator[SEP] identifier[List] operator[<] identifier[ClassNode] operator[>] identifier[nodes] operator[SEP] {
Keyword[if] operator[SEP] identifier[nodes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Oth... |
public Matrix4x3d set(AxisAngle4f axisAngle) {
double x = axisAngle.x;
double y = axisAngle.y;
double z = axisAngle.z;
double angle = axisAngle.angle;
double invLength = 1.0 / Math.sqrt(x*x + y*y + z*z);
x *= invLength;
y *= invLength;
z *= invLength;
... | class class_name[name] begin[{]
method[set, return_type[type[Matrix4x3d]], modifier[public], parameter[axisAngle]] begin[{]
local_variable[type[double], x]
local_variable[type[double], y]
local_variable[type[double], z]
local_variable[type[double], angle]
local_variable[... | Keyword[public] identifier[Matrix4x3d] identifier[set] operator[SEP] identifier[AxisAngle4f] identifier[axisAngle] operator[SEP] {
Keyword[double] identifier[x] operator[=] identifier[axisAngle] operator[SEP] identifier[x] operator[SEP] Keyword[double] identifier[y] operator[=] identifier[axisAngle] operator[SEP... |
public Node mutate(Random rng, Probability mutationProbability, TreeFactory treeFactory)
{
if (mutationProbability.nextEvent(rng))
{
return treeFactory.generateRandomCandidate(rng);
}
else
{
// Node is unchanged.
return this;
}
... | class class_name[name] begin[{]
method[mutate, return_type[type[Node]], modifier[public], parameter[rng, mutationProbability, treeFactory]] begin[{]
if[call[mutationProbability.nextEvent, parameter[member[.rng]]]] begin[{]
return[call[treeFactory.generateRandomCandidate, parameter[m... | Keyword[public] identifier[Node] identifier[mutate] operator[SEP] identifier[Random] identifier[rng] , identifier[Probability] identifier[mutationProbability] , identifier[TreeFactory] identifier[treeFactory] operator[SEP] {
Keyword[if] operator[SEP] identifier[mutationProbability] operator[SEP] identifier[nex... |
public synchronized EventData[] getEvents(int event_type) {
ArrayList<EventData> v = new ArrayList<EventData>();
for (EventData event : events)
if (event.event_type == event_type)
v.add(event);
EventData[] periodic = new EventData[v.size()];
for (int i = 0; i ... | class class_name[name] begin[{]
method[getEvents, return_type[type[EventData]], modifier[synchronized public], parameter[event_type]] begin[{]
local_variable[type[ArrayList], v]
ForStatement(body=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=event_type, postfix_operators... | Keyword[public] Keyword[synchronized] identifier[EventData] operator[SEP] operator[SEP] identifier[getEvents] operator[SEP] Keyword[int] identifier[event_type] operator[SEP] {
identifier[ArrayList] operator[<] identifier[EventData] operator[>] identifier[v] operator[=] Keyword[new] identifier[ArrayList] operator... |
@Deprecated
public AtomixClusterBuilder withAddress(String host, int port) {
return withAddress(Address.from(host, port));
} | class class_name[name] begin[{]
method[withAddress, return_type[type[AtomixClusterBuilder]], modifier[public], parameter[host, port]] begin[{]
return[call[.withAddress, parameter[call[Address.from, parameter[member[.host], member[.port]]]]]]
end[}]
END[}] | annotation[@] identifier[Deprecated] Keyword[public] identifier[AtomixClusterBuilder] identifier[withAddress] operator[SEP] identifier[String] identifier[host] , Keyword[int] identifier[port] operator[SEP] {
Keyword[return] identifier[withAddress] operator[SEP] identifier[Address] operator[SEP] identifier[from]... |
ActivityContextHandle _startActivity(ActivityHandle handle,
int activityFlags, final SleeTransaction barrierTx) {
ActivityContext ac = null;
if (raEntity.getHandleReferenceFactory() != null
&& !ActivityFlags.hasSleeMayMarshal(activityFlags)) {
final ActivityHandleReference reference = raEntity
.getH... | class class_name[name] begin[{]
method[_startActivity, return_type[type[ActivityContextHandle]], modifier[default], parameter[handle, activityFlags, barrierTx]] begin[{]
local_variable[type[ActivityContext], ac]
if[binary_operation[binary_operation[call[raEntity.getHandleReferenceFactor... | identifier[ActivityContextHandle] identifier[_startActivity] operator[SEP] identifier[ActivityHandle] identifier[handle] , Keyword[int] identifier[activityFlags] , Keyword[final] identifier[SleeTransaction] identifier[barrierTx] operator[SEP] {
identifier[ActivityContext] identifier[ac] operator[=] Other[null]... |
protected OptionalThing<Integer> createOptionalSqlExecutionCountLimit(ExecuteOption executeOption) {
final int specifiedLimit = executeOption.getSqlExecutionCountLimit();
return OptionalThing.ofNullable(specifiedLimit >= 0 ? specifiedLimit : null, () -> {
throw new IllegalStateException("Not... | class class_name[name] begin[{]
method[createOptionalSqlExecutionCountLimit, return_type[type[OptionalThing]], modifier[protected], parameter[executeOption]] begin[{]
local_variable[type[int], specifiedLimit]
return[call[OptionalThing.ofNullable, parameter[TernaryExpression(condition=BinaryOper... | Keyword[protected] identifier[OptionalThing] operator[<] identifier[Integer] operator[>] identifier[createOptionalSqlExecutionCountLimit] operator[SEP] identifier[ExecuteOption] identifier[executeOption] operator[SEP] {
Keyword[final] Keyword[int] identifier[specifiedLimit] operator[=] identifier[executeOption] ... |
@SuppressWarnings("unchecked")
public <T> Sequence<T> runSimple(
final Query<T> query,
final AuthenticationResult authenticationResult,
@Nullable final String remoteAddress
)
{
initialize(query);
final Sequence<T> results;
try {
final Access access = authorize(authenticationR... | class class_name[name] begin[{]
method[runSimple, return_type[type[Sequence]], modifier[public], parameter[query, authenticationResult, remoteAddress]] begin[{]
call[.initialize, parameter[member[.query]]]
local_variable[type[Sequence], results]
TryStatement(block=[LocalVariable... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[Sequence] operator[<] identifier[T] operator[>] identifier[runSimple] operator[SEP] Keyword[final] identifier[Query] operator[<] identifier[T] operator[>] identifier[qu... |
@Override
public List<String> getConf(String groupName) {
ZookeeperMgr zooKeeperMgr = ZookeeperMgr.getInstance();
ZooKeeper zooKeeper = zooKeeperMgr.getZk();
List<String> retList = new ArrayList<String>();
try {
getConf(zooKeeper, groupName, groupName, retList);
... | class class_name[name] begin[{]
method[getConf, return_type[type[List]], modifier[public], parameter[groupName]] begin[{]
local_variable[type[ZookeeperMgr], zooKeeperMgr]
local_variable[type[ZooKeeper], zooKeeper]
local_variable[type[List], retList]
TryStatement(block=[Statement... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getConf] operator[SEP] identifier[String] identifier[groupName] operator[SEP] {
identifier[ZookeeperMgr] identifier[zooKeeperMgr] operator[=] identifier[ZookeeperMgr] operator[SEP] identifier... |
public boolean recordXidGenerator() {
if (!currentInfo.isXidGenerator()) {
currentInfo.setXidGenerator(true);
populated = true;
return true;
} else {
return false;
}
} | class class_name[name] begin[{]
method[recordXidGenerator, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[call[currentInfo.isXidGenerator, parameter[]]] begin[{]
call[currentInfo.setXidGenerator, parameter[literal[true]]]
a... | Keyword[public] Keyword[boolean] identifier[recordXidGenerator] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[currentInfo] operator[SEP] identifier[isXidGenerator] operator[SEP] operator[SEP] operator[SEP] {
identifier[currentInfo] operator[SEP] identifier[setXidGenera... |
@Beta
public final Predicate<T> equivalentTo(@Nullable T target) {
return new EquivalentToPredicate<T>(this, target);
} | class class_name[name] begin[{]
method[equivalentTo, return_type[type[Predicate]], modifier[final public], parameter[target]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=target, postfix_operators=[], prefi... | annotation[@] identifier[Beta] Keyword[public] Keyword[final] identifier[Predicate] operator[<] identifier[T] operator[>] identifier[equivalentTo] operator[SEP] annotation[@] identifier[Nullable] identifier[T] identifier[target] operator[SEP] {
Keyword[return] Keyword[new] identifier[EquivalentToPredicate] opera... |
public static nsxmlnamespace get(nitro_service service, String prefix) throws Exception{
nsxmlnamespace obj = new nsxmlnamespace();
obj.set_prefix(prefix);
nsxmlnamespace response = (nsxmlnamespace) obj.get_resource(service);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[nsxmlnamespace]], modifier[public static], parameter[service, prefix]] begin[{]
local_variable[type[nsxmlnamespace], obj]
call[obj.set_prefix, parameter[member[.prefix]]]
local_variable[type[nsxmlnamespace], response]
... | Keyword[public] Keyword[static] identifier[nsxmlnamespace] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[prefix] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[nsxmlnamespace] identifier[obj] operator[=] Keyword[new] identifier[nsxm... |
public ListStateMachinesResult withStateMachines(StateMachineListItem... stateMachines) {
if (this.stateMachines == null) {
setStateMachines(new java.util.ArrayList<StateMachineListItem>(stateMachines.length));
}
for (StateMachineListItem ele : stateMachines) {
this.state... | class class_name[name] begin[{]
method[withStateMachines, return_type[type[ListStateMachinesResult]], modifier[public], parameter[stateMachines]] begin[{]
if[binary_operation[THIS[member[None.stateMachines]], ==, literal[null]]] begin[{]
call[.setStateMachines, parameter... | Keyword[public] identifier[ListStateMachinesResult] identifier[withStateMachines] operator[SEP] identifier[StateMachineListItem] operator[...] identifier[stateMachines] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[stateMachines] operator[==] Other[null] operator[SEP] {
... |
@Override
public SingleObjectBundle delete(DBIDRef id) {
// Prepare bundle to return
SingleObjectBundle bundle = new SingleObjectBundle();
for(Relation<?> relation : relations) {
bundle.append(relation.getDataTypeInformation(), relation.get(id));
}
doDelete(id);
// fire deletion event
... | class class_name[name] begin[{]
method[delete, return_type[type[SingleObjectBundle]], modifier[public], parameter[id]] begin[{]
local_variable[type[SingleObjectBundle], bundle]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Me... | annotation[@] identifier[Override] Keyword[public] identifier[SingleObjectBundle] identifier[delete] operator[SEP] identifier[DBIDRef] identifier[id] operator[SEP] {
identifier[SingleObjectBundle] identifier[bundle] operator[=] Keyword[new] identifier[SingleObjectBundle] operator[SEP] operator[SEP] operator[SEP]... |
@Reference(authors = "G. Marsaglia", //
title = "Evaluating the Normal Distribution", //
booktitle = "Journal of Statistical Software 11(4)", //
url = "https://doi.org/10.18637/jss.v011.i04", //
bibkey = "doi:10.18637/jss.v011.i04")
public static double cdf(double x, double mu, double sigma) {... | class class_name[name] begin[{]
method[cdf, return_type[type[double]], modifier[public static], parameter[x, mu, sigma]] begin[{]
assign[member[.x], binary_operation[binary_operation[member[.x], -, member[.mu]], /, member[.sigma]]]
if[binary_operation[member[.x], >=, literal[8.2... | annotation[@] identifier[Reference] operator[SEP] identifier[authors] operator[=] literal[String] , identifier[title] operator[=] literal[String] , identifier[booktitle] operator[=] literal[String] , identifier[url] operator[=] literal[String] , identifier[bibkey] operator[=] literal[String] operator[SEP] Keyword[p... |
public Type getPropertyType(String property) {
Type type = (Type) propertyTypes.get(property);
if (null == type) {
Class<?> propertyType = PropertyUtils.getPropertyType(entityClass, property);
if (null != propertyType) {
if (Entity.class.isAssignableFrom(propertyType)) type = new EntityType(... | class class_name[name] begin[{]
method[getPropertyType, return_type[type[Type]], modifier[public], parameter[property]] begin[{]
local_variable[type[Type], type]
if[binary_operation[literal[null], ==, member[.type]]] begin[{]
local_variable[type[Class], propertyType]
... | Keyword[public] identifier[Type] identifier[getPropertyType] operator[SEP] identifier[String] identifier[property] operator[SEP] {
identifier[Type] identifier[type] operator[=] operator[SEP] identifier[Type] operator[SEP] identifier[propertyTypes] operator[SEP] identifier[get] operator[SEP] identifier[property] ... |
public static String getPackagePath(Proto proto) {
String javaPackage = getPackage(proto);
return javaPackage.replace('.', '/');
} | class class_name[name] begin[{]
method[getPackagePath, return_type[type[String]], modifier[public static], parameter[proto]] begin[{]
local_variable[type[String], javaPackage]
return[call[javaPackage.replace, parameter[literal['.'], literal['/']]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[getPackagePath] operator[SEP] identifier[Proto] identifier[proto] operator[SEP] {
identifier[String] identifier[javaPackage] operator[=] identifier[getPackage] operator[SEP] identifier[proto] operator[SEP] operator[SEP] Keyword[return] identifier[java... |
private void init(final SecurityContext securityContext, final Class type, final Field field, final String path) throws FrameworkException {
final QueryConfig config = getConfig(path);
config.handleTypeArguments(securityContext, type, field.getArguments());
final SelectionSet selectionSet = field.getSelectionS... | class class_name[name] begin[{]
method[init, return_type[void], modifier[private], parameter[securityContext, type, field, path]] begin[{]
local_variable[type[QueryConfig], config]
call[config.handleTypeArguments, parameter[member[.securityContext], member[.type], call[field.getArgument... | Keyword[private] Keyword[void] identifier[init] operator[SEP] Keyword[final] identifier[SecurityContext] identifier[securityContext] , Keyword[final] identifier[Class] identifier[type] , Keyword[final] identifier[Field] identifier[field] , Keyword[final] identifier[String] identifier[path] operator[SEP] Keyword[thro... |
private CompletableFuture<PrimaryBackupServiceContext> getService(PrimitiveRequest request) {
return services.computeIfAbsent(request.primitive().name(), n -> {
PrimitiveType primitiveType = primitiveTypes.getPrimitiveType(request.primitive().type());
PrimaryBackupServiceContext service = new PrimaryBac... | class class_name[name] begin[{]
method[getService, return_type[type[CompletableFuture]], modifier[private], parameter[request]] begin[{]
return[call[services.computeIfAbsent, parameter[call[request.primitive, parameter[]], LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[Var... | Keyword[private] identifier[CompletableFuture] operator[<] identifier[PrimaryBackupServiceContext] operator[>] identifier[getService] operator[SEP] identifier[PrimitiveRequest] identifier[request] operator[SEP] {
Keyword[return] identifier[services] operator[SEP] identifier[computeIfAbsent] operator[SEP] identif... |
public void loadClassFromByteCodes(Map<String, byte[]> inputByteCodes) {
if (inputByteCodes == null || inputByteCodes.isEmpty()) {
throw new IllegalArgumentException("byteCodes can not be null");
}
for (Map.Entry<String, byte[]> byteCode : inputByteCodes.entrySet()) {
b... | class class_name[name] begin[{]
method[loadClassFromByteCodes, return_type[void], modifier[public], parameter[inputByteCodes]] begin[{]
if[binary_operation[binary_operation[member[.inputByteCodes], ==, literal[null]], ||, call[inputByteCodes.isEmpty, parameter[]]]] begin[{]
ThrowSta... | Keyword[public] Keyword[void] identifier[loadClassFromByteCodes] operator[SEP] identifier[Map] operator[<] identifier[String] , Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[inputByteCodes] operator[SEP] {
Keyword[if] operator[SEP] identifier[inputByteCodes] operator[==] Other[null] operator[... |
private static String buildId(String name, String counterName) {
final MessageDigest messageDigest = getMessageDigestInstance();
messageDigest.update(name.getBytes());
final byte[] digest = messageDigest.digest();
final int l = counterName.length();
final char[] chars = new char[l + digest.length * 2];... | class class_name[name] begin[{]
method[buildId, return_type[type[String]], modifier[private static], parameter[name, counterName]] begin[{]
local_variable[type[MessageDigest], messageDigest]
call[messageDigest.update, parameter[call[name.getBytes, parameter[]]]]
local_variable[t... | Keyword[private] Keyword[static] identifier[String] identifier[buildId] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[counterName] operator[SEP] {
Keyword[final] identifier[MessageDigest] identifier[messageDigest] operator[=] identifier[getMessageDigestInstance] operator[SEP]... |
public static String firstCharToLowerCase(String str) {
char firstChar = str.charAt(0);
if (firstChar >= 'A' && firstChar <= 'Z') {
char[] arr = str.toCharArray();
arr[0] += ('a' - 'A');
return new String(arr);
}
return str;
} | class class_name[name] begin[{]
method[firstCharToLowerCase, return_type[type[String]], modifier[public static], parameter[str]] begin[{]
local_variable[type[char], firstChar]
if[binary_operation[binary_operation[member[.firstChar], >=, literal['A']], &&, binary_operation[member[.firstC... | Keyword[public] Keyword[static] identifier[String] identifier[firstCharToLowerCase] operator[SEP] identifier[String] identifier[str] operator[SEP] {
Keyword[char] identifier[firstChar] operator[=] identifier[str] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] oper... |
public Observable<UUID> createRegexEntityRoleAsync(UUID appId, String versionId, UUID entityId, CreateRegexEntityRoleOptionalParameter createRegexEntityRoleOptionalParameter) {
return createRegexEntityRoleWithServiceResponseAsync(appId, versionId, entityId, createRegexEntityRoleOptionalParameter).map(new Func1<... | class class_name[name] begin[{]
method[createRegexEntityRoleAsync, return_type[type[Observable]], modifier[public], parameter[appId, versionId, entityId, createRegexEntityRoleOptionalParameter]] begin[{]
return[call[.createRegexEntityRoleWithServiceResponseAsync, parameter[member[.appId], member[.versi... | Keyword[public] identifier[Observable] operator[<] identifier[UUID] operator[>] identifier[createRegexEntityRoleAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[entityId] , identifier[CreateRegexEntityRoleOptionalParameter] identifier[cr... |
public static String encodeJavaEntities(String input, String encoding) {
StringBuffer result = new StringBuffer(input.length() * 2);
CharBuffer buffer = CharBuffer.wrap(input.toCharArray());
Charset charset = Charset.forName(encoding);
CharsetEncoder encoder = charset.newEncoder();
... | class class_name[name] begin[{]
method[encodeJavaEntities, return_type[type[String]], modifier[public static], parameter[input, encoding]] begin[{]
local_variable[type[StringBuffer], result]
local_variable[type[CharBuffer], buffer]
local_variable[type[Charset], charset]
local_va... | Keyword[public] Keyword[static] identifier[String] identifier[encodeJavaEntities] operator[SEP] identifier[String] identifier[input] , identifier[String] identifier[encoding] operator[SEP] {
identifier[StringBuffer] identifier[result] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] identifier[in... |
public static int fnvHash(byte[] data) {
final int p = 16777619;
int hash = (int) 2166136261L;
for (byte b : data) {
hash = (hash ^ b) * p;
}
hash += hash << 13;
hash ^= hash >> 7;
hash += hash << 3;
hash ^= hash >> 17;
hash += hash << 5;
return hash;
} | class class_name[name] begin[{]
method[fnvHash, return_type[type[int]], modifier[public static], parameter[data]] begin[{]
local_variable[type[int], p]
local_variable[type[int], hash]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expr... | Keyword[public] Keyword[static] Keyword[int] identifier[fnvHash] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] {
Keyword[final] Keyword[int] identifier[p] operator[=] Other[16777619] operator[SEP] Keyword[int] identifier[hash] operator[=] operator[SEP] Keyword[int] operat... |
public Observable<DiagnosticAnalysisInner> executeSiteAnalysisAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) {
return executeSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName).map(new Func1<ServiceResponse<Diagnos... | class class_name[name] begin[{]
method[executeSiteAnalysisAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, siteName, diagnosticCategory, analysisName]] begin[{]
return[call[.executeSiteAnalysisWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.si... | Keyword[public] identifier[Observable] operator[<] identifier[DiagnosticAnalysisInner] operator[>] identifier[executeSiteAnalysisAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[siteName] , identifier[String] identifier[diagnosticCategory] , identifier[String] ide... |
@Override
public void sawOpcode(final int seen) {
try {
stack.precomputation(this);
if (seen == Const.INVOKEINTERFACE) {
processInvokeInterface();
} else if (seen == Const.INVOKEVIRTUAL) {
processInvokeVirtual();
} else if ((seen == Const.ARETURN) && (stack.getStackDepth() > 0)) {
OpcodeStac... | class class_name[name] begin[{]
method[sawOpcode, return_type[void], modifier[public], parameter[seen]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=precomputation, postfix_... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[sawOpcode] operator[SEP] Keyword[final] Keyword[int] identifier[seen] operator[SEP] {
Keyword[try] {
identifier[stack] operator[SEP] identifier[precomputation] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[if... |
public Map<String, ImplT> convertToUnmodifiableMap(List<InnerT> innerList) {
Map<String, ImplT> result = new HashMap<>();
for (InnerT inner : innerList) {
result.put(name(inner), impl(inner));
}
return Collections.unmodifiableMap(result);
} | class class_name[name] begin[{]
method[convertToUnmodifiableMap, return_type[type[Map]], modifier[public], parameter[innerList]] begin[{]
local_variable[type[Map], result]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodI... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[ImplT] operator[>] identifier[convertToUnmodifiableMap] operator[SEP] identifier[List] operator[<] identifier[InnerT] operator[>] identifier[innerList] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[ImplT] ... |
public void in2in(String in, Object to, String to_in) {
controller.mapIn(in, to, to_in);
} | class class_name[name] begin[{]
method[in2in, return_type[void], modifier[public], parameter[in, to, to_in]] begin[{]
call[controller.mapIn, parameter[member[.in], member[.to], member[.to_in]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[in2in] operator[SEP] identifier[String] identifier[in] , identifier[Object] identifier[to] , identifier[String] identifier[to_in] operator[SEP] {
identifier[controller] operator[SEP] identifier[mapIn] operator[SEP] identifier[in] , identifier[to] , identifier[to_in] o... |
public Map<String,String> getResolvedArguments(String filterArgs, AnalyzedTokenReadings[] patternTokens, List<Integer> tokenPositions) {
Map<String,String> result = new HashMap<>();
String[] arguments = filterArgs.split("\\s+");
for (String arg : arguments) {
int delimPos = arg.indexOf(':');
if ... | class class_name[name] begin[{]
method[getResolvedArguments, return_type[type[Map]], modifier[public], parameter[filterArgs, patternTokens, tokenPositions]] begin[{]
local_variable[type[Map], result]
local_variable[type[String], arguments]
ForStatement(body=BlockStatement(label=None, st... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getResolvedArguments] operator[SEP] identifier[String] identifier[filterArgs] , identifier[AnalyzedTokenReadings] operator[SEP] operator[SEP] identifier[patternTokens] , identifier[List] operator[<] identifier[... |
public void debug( String format, Object[] argArray )
{
if( m_delegate.isDebugEnabled() )
{
FormattingTuple tuple = MessageFormatter.arrayFormat( format, argArray );
m_delegate.debug( tuple.getMessage(), tuple.getThrowable() );
}
} | class class_name[name] begin[{]
method[debug, return_type[void], modifier[public], parameter[format, argArray]] begin[{]
if[call[m_delegate.isDebugEnabled, parameter[]]] begin[{]
local_variable[type[FormattingTuple], tuple]
call[m_delegate.debug, parameter[ca... | Keyword[public] Keyword[void] identifier[debug] operator[SEP] identifier[String] identifier[format] , identifier[Object] operator[SEP] operator[SEP] identifier[argArray] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_delegate] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator... |
public static String[] getNames(JSONObject jo) {
int length = jo.length();
if (length == 0) {
return null;
}
String[] names = jo.m_map.keySet().toArray(new String[length]);
return names;
} | class class_name[name] begin[{]
method[getNames, return_type[type[String]], modifier[public static], parameter[jo]] begin[{]
local_variable[type[int], length]
if[binary_operation[member[.length], ==, literal[0]]] begin[{]
return[literal[null]]
else begin[{]
None
... | Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[getNames] operator[SEP] identifier[JSONObject] identifier[jo] operator[SEP] {
Keyword[int] identifier[length] operator[=] identifier[jo] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if]... |
@RequestMapping("/note")
public final String note(
@RequestParam(value = "id",
required = false,
defaultValue = "N0") final String idString,
@RequestParam(value = "db",
required = false,
defaultValue = "schoeller") final String ... | class class_name[name] begin[{]
method[note, return_type[type[String]], modifier[final public], parameter[idString, dbName, model]] begin[{]
call[logger.debug, parameter[literal["Entering source"]]]
local_variable[type[Root], root]
local_variable[type[RenderingContext], context]... | annotation[@] identifier[RequestMapping] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[String] identifier[note] operator[SEP] annotation[@] identifier[RequestParam] operator[SEP] identifier[value] operator[=] literal[String] , identifier[required] operator[=] literal[boolean] , ... |
private void evict(Node candidate) {
if (data.size() > maximumSize) {
Node victim = nextVictim(candidate);
boolean admit = admittor.admit(candidate.key, victim.key);
if (admit) {
evictEntry(victim);
} else {
evictEntry(candidate);
}
policyStats.recordEviction();
... | class class_name[name] begin[{]
method[evict, return_type[void], modifier[private], parameter[candidate]] begin[{]
if[binary_operation[call[data.size, parameter[]], >, member[.maximumSize]]] begin[{]
local_variable[type[Node], victim]
local_variable[type[boolean], admit]... | Keyword[private] Keyword[void] identifier[evict] operator[SEP] identifier[Node] identifier[candidate] operator[SEP] {
Keyword[if] operator[SEP] identifier[data] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] identifier[maximumSize] operator[SEP] {
identifier[Node] identifier[vi... |
private static ResultPoint[] findVertices(BitMatrix matrix, int startRow, int startColumn) {
int height = matrix.getHeight();
int width = matrix.getWidth();
ResultPoint[] result = new ResultPoint[8];
copyToResult(result, findRowsWithPattern(matrix, height, width, startRow, startColumn, START_PATTERN),
... | class class_name[name] begin[{]
method[findVertices, return_type[type[ResultPoint]], modifier[private static], parameter[matrix, startRow, startColumn]] begin[{]
local_variable[type[int], height]
local_variable[type[int], width]
local_variable[type[ResultPoint], result]
... | Keyword[private] Keyword[static] identifier[ResultPoint] operator[SEP] operator[SEP] identifier[findVertices] operator[SEP] identifier[BitMatrix] identifier[matrix] , Keyword[int] identifier[startRow] , Keyword[int] identifier[startColumn] operator[SEP] {
Keyword[int] identifier[height] operator[=] identifier[... |
private void rebase() {
for (int k = 0; k < flow.getWidgetCount(); k++) {
Widget widget = flow.getWidget(k);
String cellStyleName = getCellStyleName(k);
removeAllCellStyles(widget.getElement());
prepareCellPercentStyle(k, widget);
widget.getElement().a... | class class_name[name] begin[{]
method[rebase, return_type[void], modifier[private], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberRefer... | Keyword[private] Keyword[void] identifier[rebase] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[flow] operator[SEP] identifier[getWidgetCount] operator[SEP] operator[SEP] operator[SEP] identifier[k] oper... |
public void unlockSet(SIMessageHandle[] msgHandles, boolean incrementLockCount)
throws SISessionUnavailableException, SISessionDroppedException,
SIConnectionUnavailableException, SIConnectionDroppedException,
SIResourceException, SIConnectionLostException,
SIIncorrectCallException, SI... | class class_name[name] begin[{]
method[unlockSet, return_type[void], modifier[public], parameter[msgHandles, incrementLockCount]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry,... | Keyword[public] Keyword[void] identifier[unlockSet] operator[SEP] identifier[SIMessageHandle] operator[SEP] operator[SEP] identifier[msgHandles] , Keyword[boolean] identifier[incrementLockCount] operator[SEP] Keyword[throws] identifier[SISessionUnavailableException] , identifier[SISessionDroppedException] , identifi... |
private boolean isCacheable(PipelineContext context) throws GeomajasException {
VectorLayer layer = context.get(PipelineCode.LAYER_KEY, VectorLayer.class);
return !(layer instanceof VectorLayerLazyFeatureConversionSupport &&
((VectorLayerLazyFeatureConversionSupport) layer).useLazyFeatureConversion());
} | class class_name[name] begin[{]
method[isCacheable, return_type[type[boolean]], modifier[private], parameter[context]] begin[{]
local_variable[type[VectorLayer], layer]
return[binary_operation[binary_operation[member[.layer], instanceof, type[VectorLayerLazyFeatureConversionSupport]], &&, Cast(... | Keyword[private] Keyword[boolean] identifier[isCacheable] operator[SEP] identifier[PipelineContext] identifier[context] operator[SEP] Keyword[throws] identifier[GeomajasException] {
identifier[VectorLayer] identifier[layer] operator[=] identifier[context] operator[SEP] identifier[get] operator[SEP] identifier[Pi... |
private void addToTotalCount(final List<TotalTargetCountActionStatus> targetCountActionStatus) {
if (targetCountActionStatus == null) {
statusTotalCountMap.put(TotalTargetCountStatus.Status.NOTSTARTED, totalTargetCount);
return;
}
statusTotalCountMap.put(Status.RUNNING, 0... | class class_name[name] begin[{]
method[addToTotalCount, return_type[void], modifier[private], parameter[targetCountActionStatus]] begin[{]
if[binary_operation[member[.targetCountActionStatus], ==, literal[null]]] begin[{]
call[statusTotalCountMap.put, parameter[member[To... | Keyword[private] Keyword[void] identifier[addToTotalCount] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[TotalTargetCountActionStatus] operator[>] identifier[targetCountActionStatus] operator[SEP] {
Keyword[if] operator[SEP] identifier[targetCountActionStatus] operator[==] Other[null] oper... |
protected void maybeBuildAndSetRetryManager(AbstractDraweeController controller) {
if (!mTapToRetryEnabled) {
return;
}
controller.getRetryManager().setTapToRetryEnabled(mTapToRetryEnabled);
maybeBuildAndSetGestureDetector(controller);
} | class class_name[name] begin[{]
method[maybeBuildAndSetRetryManager, return_type[void], modifier[protected], parameter[controller]] begin[{]
if[member[.mTapToRetryEnabled]] begin[{]
return[None]
else begin[{]
None
end[}]
call[controller.getRetryManage... | Keyword[protected] Keyword[void] identifier[maybeBuildAndSetRetryManager] operator[SEP] identifier[AbstractDraweeController] identifier[controller] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[mTapToRetryEnabled] operator[SEP] {
Keyword[return] operator[SEP]
}
identif... |
private void initializeBackground() {
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) {
int navigationViewBannerBackgroundColor = ThemeSwitcher.retrieveThemeColor(getContext(),
R.attr.navigationViewBannerBackground);
int navigationViewListBackgroundColor = ThemeSw... | class class_name[name] begin[{]
method[initializeBackground, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[member[android.os.Build.VERSION.SDK_INT], <, member[android.os.Build.VERSION_CODES.LOLLIPOP]]] begin[{]
local_variable[type[int], navigationVi... | Keyword[private] Keyword[void] identifier[initializeBackground] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[android] operator[SEP] identifier[os] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION] operator[SEP] identifier[SDK_INT] operator[<] identifier[android] operator[SEP... |
public URL getResource(String name, BeanContextChild bcc)
throws IllegalArgumentException
{
ServletContext sc = getServletContext();
if ( sc != null )
{
try
{
return sc.getResource( name );
}
catch ( MalformedURLExceptio... | class class_name[name] begin[{]
method[getResource, return_type[type[URL]], modifier[public], parameter[name, bcc]] begin[{]
local_variable[type[ServletContext], sc]
if[binary_operation[member[.sc], !=, literal[null]]] begin[{]
TryStatement(block=[ReturnStatement(expression=... | Keyword[public] identifier[URL] identifier[getResource] operator[SEP] identifier[String] identifier[name] , identifier[BeanContextChild] identifier[bcc] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
identifier[ServletContext] identifier[sc] operator[=] identifier[getServletContext] operat... |
public String getAttribute(String name)
{
Params.notNullOrEmpty(name, "Attribute name");
return attributes.get(name);
} | class class_name[name] begin[{]
method[getAttribute, return_type[type[String]], modifier[public], parameter[name]] begin[{]
call[Params.notNullOrEmpty, parameter[member[.name], literal["Attribute name"]]]
return[call[attributes.get, parameter[member[.name]]]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[getAttribute] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[Params] operator[SEP] identifier[notNullOrEmpty] operator[SEP] identifier[name] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[attributes] operator[S... |
public static CorpusFormat forName(@NonNull String name) {
String format = StringUtils.trim(name).toUpperCase();
boolean isOPL = format.endsWith("_OPL");
final String normFormat = format.replaceAll("_OPL$", "").trim();
if (formats.containsKey(normFormat)) {
return isOPL ? new OnePerLine... | class class_name[name] begin[{]
method[forName, return_type[type[CorpusFormat]], modifier[public static], parameter[name]] begin[{]
local_variable[type[String], format]
local_variable[type[boolean], isOPL]
local_variable[type[String], normFormat]
if[call[formats.contains... | Keyword[public] Keyword[static] identifier[CorpusFormat] identifier[forName] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[name] operator[SEP] {
identifier[String] identifier[format] operator[=] identifier[StringUtils] operator[SEP] identifier[trim] operator[SEP] identifier[name] ... |
public static Object tryInstance(String clsName,ClassLoader loader)
{
try
{
return instance(clsName,loader);
}
catch (Exception ex)
{
return null;
}
} | class class_name[name] begin[{]
method[tryInstance, return_type[type[Object]], modifier[public static], parameter[clsName, loader]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=clsName, postfix_operators=[], prefix_operators=[], qualifier=, ... | Keyword[public] Keyword[static] identifier[Object] identifier[tryInstance] operator[SEP] identifier[String] identifier[clsName] , identifier[ClassLoader] identifier[loader] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[instance] operator[SEP] identifier[clsName] , identifier[loader] oper... |
public static String camelize(String s) {
if (s == null) {
return null;
}
s = s.toLowerCase();
String[] array = StringUtil.split(s, "_");
if (array.length == 1) {
return StringUtil.capitalize(s);
}
StringBuffer buf = new StringBuff... | class class_name[name] begin[{]
method[camelize, return_type[type[String]], modifier[public static], parameter[s]] begin[{]
if[binary_operation[member[.s], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
assign[member[.s],... | Keyword[public] Keyword[static] identifier[String] identifier[camelize] operator[SEP] identifier[String] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
identifier[s] operator[=] id... |
public static double[] toN(int n) {
double[] result = new double[n];
for (int i = 0; i < n; i++) {
result[i] = i;
}
return result;
} | class class_name[name] begin[{]
method[toN, return_type[type[double]], modifier[public static], parameter[n]] begin[{]
local_variable[type[double], result]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=resul... | Keyword[public] Keyword[static] Keyword[double] operator[SEP] operator[SEP] identifier[toN] operator[SEP] Keyword[int] identifier[n] operator[SEP] {
Keyword[double] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyw... |
private boolean checkExistingCertificate() {
boolean alreadyexists = txt_PubCert.getDocument().getLength() > MIN_CERT_LENGTH;
if (alreadyexists) {
final int result = JOptionPane.showConfirmDialog(this,
Constant.messages.getString("dynssl.message2.caalreadyexists")
+ "\n"
+ Constant.messages.... | class class_name[name] begin[{]
method[checkExistingCertificate, return_type[type[boolean]], modifier[private], parameter[]] begin[{]
local_variable[type[boolean], alreadyexists]
if[member[.alreadyexists]] begin[{]
local_variable[type[int], result]
as... | Keyword[private] Keyword[boolean] identifier[checkExistingCertificate] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[alreadyexists] operator[=] identifier[txt_PubCert] operator[SEP] identifier[getDocument] operator[SEP] operator[SEP] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] ope... |
public static LocationImpl parse(String text) throws IllegalArgumentException {
if (text == null || text.length() == 0) {
return null;
}
String description;
int uriStart = text.lastIndexOf(" - ");
if (uriStart > -1) {
description = text.substring(0, uriStart);
uriStart += 3;
} else {
d... | class class_name[name] begin[{]
method[parse, return_type[type[LocationImpl]], modifier[public static], parameter[text]] begin[{]
if[binary_operation[binary_operation[member[.text], ==, literal[null]], ||, binary_operation[call[text.length, parameter[]], ==, literal[0]]]] begin[{]
r... | Keyword[public] Keyword[static] identifier[LocationImpl] identifier[parse] operator[SEP] identifier[String] identifier[text] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
Keyword[if] operator[SEP] identifier[text] operator[==] Other[null] operator[||] identifier[text] operator[SEP] identif... |
public static Class<?> getClass(String className)
throws ClassNotFoundException {
Class<?> clazz = PRIMITIVE_NAME_TO_TYPE.get(className);
if (clazz == null) {
clazz = Class.forName(className);
}
return clazz;
} | class class_name[name] begin[{]
method[getClass, return_type[type[Class]], modifier[public static], parameter[className]] begin[{]
local_variable[type[Class], clazz]
if[binary_operation[member[.clazz], ==, literal[null]]] begin[{]
assign[member[.clazz], call[Clas... | Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[getClass] operator[SEP] identifier[String] identifier[className] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] {
identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] ... |
public ListTagsRequest withResourceIdList(String... resourceIdList) {
if (this.resourceIdList == null) {
setResourceIdList(new com.amazonaws.internal.SdkInternalList<String>(resourceIdList.length));
}
for (String ele : resourceIdList) {
this.resourceIdList.add(ele);
... | class class_name[name] begin[{]
method[withResourceIdList, return_type[type[ListTagsRequest]], modifier[public], parameter[resourceIdList]] begin[{]
if[binary_operation[THIS[member[None.resourceIdList]], ==, literal[null]]] begin[{]
call[.setResourceIdList, parameter[Cla... | Keyword[public] identifier[ListTagsRequest] identifier[withResourceIdList] operator[SEP] identifier[String] operator[...] identifier[resourceIdList] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[resourceIdList] operator[==] Other[null] operator[SEP] {
identifier[setR... |
public ResourceFormatGenerator getGeneratorForMIMEType(final String mimeType) throws UnsupportedFormatException {
//clean up encoding
final String cleanMime;
if (mimeType.indexOf(";") > 0) {
cleanMime = mimeType.substring(0, mimeType.indexOf(";"));
} else {
cleanM... | class class_name[name] begin[{]
method[getGeneratorForMIMEType, return_type[type[ResourceFormatGenerator]], modifier[public], parameter[mimeType]] begin[{]
local_variable[type[String], cleanMime]
if[binary_operation[call[mimeType.indexOf, parameter[literal[";"]]], >, literal[0]]] begin[... | Keyword[public] identifier[ResourceFormatGenerator] identifier[getGeneratorForMIMEType] operator[SEP] Keyword[final] identifier[String] identifier[mimeType] operator[SEP] Keyword[throws] identifier[UnsupportedFormatException] {
Keyword[final] identifier[String] identifier[cleanMime] operator[SEP] Keyword[if] ope... |
protected void commitTempFile() throws CmsException {
CmsObject cms = getCms();
CmsFile tempFile;
List<CmsProperty> properties;
try {
switchToTempProject();
tempFile = cms.readFile(getParamTempfile(), CmsResourceFilter.ALL);
properties = cms.readPrope... | class class_name[name] begin[{]
method[commitTempFile, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[CmsObject], cms]
local_variable[type[CmsFile], tempFile]
local_variable[type[List], properties]
TryStatement(block=[StatementExpression(expres... | Keyword[protected] Keyword[void] identifier[commitTempFile] operator[SEP] operator[SEP] Keyword[throws] identifier[CmsException] {
identifier[CmsObject] identifier[cms] operator[=] identifier[getCms] operator[SEP] operator[SEP] operator[SEP] identifier[CmsFile] identifier[tempFile] operator[SEP] identifier[List]... |
@Override
public final void resetCredentials() {
for (final SecurityUser user : users) {
user.setPassword(passwordEncoder.encode("123"));
users.add(user);
}
} | class class_name[name] begin[{]
method[resetCredentials, return_type[void], modifier[final public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[resetCredentials] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[final] identifier[SecurityUser] identifier[user] operator[:] identifier[users] operator[SEP] {
identifier[user] operator[SEP] i... |
public float getFloat(final String key, final float defaultValue) {
String val = getStringInternal(key);
if (val == null) {
return defaultValue;
} else {
return Float.parseFloat(val);
}
} | class class_name[name] begin[{]
method[getFloat, return_type[type[float]], modifier[public], parameter[key, defaultValue]] begin[{]
local_variable[type[String], val]
if[binary_operation[member[.val], ==, literal[null]]] begin[{]
return[member[.defaultValue]]
else beg... | Keyword[public] Keyword[float] identifier[getFloat] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] Keyword[float] identifier[defaultValue] operator[SEP] {
identifier[String] identifier[val] operator[=] identifier[getStringInternal] operator[SEP] identifier[key] operator[SEP] op... |
public void setMessage(String data, boolean isSecure) throws HttpMalformedHeaderException {
super.setMessage(data);
try {
parse(isSecure);
} catch (HttpMalformedHeaderException e) {
mMalformedHeader = true;
if (log.isDebugEnabled()) {... | class class_name[name] begin[{]
method[setMessage, return_type[void], modifier[public], parameter[data, isSecure]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setMessage, postfix_operators=[... | Keyword[public] Keyword[void] identifier[setMessage] operator[SEP] identifier[String] identifier[data] , Keyword[boolean] identifier[isSecure] operator[SEP] Keyword[throws] identifier[HttpMalformedHeaderException] {
Keyword[super] operator[SEP] identifier[setMessage] operator[SEP] identifier[data] operator[SEP]... |
public synchronized boolean isLoaderFor(final ProviderIdent ident) {
final String[] strings = getClassnames();
for (final String classname : strings) {
try {
if (matchesProviderDeclaration(ident, loadClass(classname))) {
return true;
}
... | class class_name[name] begin[{]
method[isLoaderFor, return_type[type[boolean]], modifier[synchronized public], parameter[ident]] begin[{]
local_variable[type[String], strings]
ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[IfStatement(condition=MethodInvocation(arg... | Keyword[public] Keyword[synchronized] Keyword[boolean] identifier[isLoaderFor] operator[SEP] Keyword[final] identifier[ProviderIdent] identifier[ident] operator[SEP] {
Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[strings] operator[=] identifier[getClassnames] operator[SEP] operator[SE... |
public static Logging init(String ds_name, int trace_level, Database db) {
if (_instance == null) {
_instance = new Logging(ds_name, trace_level, db);
}
return _instance;
} | class class_name[name] begin[{]
method[init, return_type[type[Logging]], modifier[public static], parameter[ds_name, trace_level, db]] begin[{]
if[binary_operation[member[._instance], ==, literal[null]]] begin[{]
assign[member[._instance], ClassCreator(arguments=[MemberR... | Keyword[public] Keyword[static] identifier[Logging] identifier[init] operator[SEP] identifier[String] identifier[ds_name] , Keyword[int] identifier[trace_level] , identifier[Database] identifier[db] operator[SEP] {
Keyword[if] operator[SEP] identifier[_instance] operator[==] Other[null] operator[SEP] {
... |
private static String renderRange(String name, Node<PluralType> node) {
if (node.type() == PluralType.RANGE) {
Struct<PluralType> range = node.asStruct();
int start = (Integer) range.nodes().get(0).asAtom().value();
int end = (Integer) range.nodes().get(1).asAtom().value();
return String.f... | class class_name[name] begin[{]
method[renderRange, return_type[type[String]], modifier[private static], parameter[name, node]] begin[{]
if[binary_operation[call[node.type, parameter[]], ==, member[PluralType.RANGE]]] begin[{]
local_variable[type[Struct], range]
local_va... | Keyword[private] Keyword[static] identifier[String] identifier[renderRange] operator[SEP] identifier[String] identifier[name] , identifier[Node] operator[<] identifier[PluralType] operator[>] identifier[node] operator[SEP] {
Keyword[if] operator[SEP] identifier[node] operator[SEP] identifier[type] operator[SEP]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.