code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static double variance( GrayF64 img , double mean ) {
if( BoofConcurrency.USE_CONCURRENT ) {
return ImplImageStatistics_MT.variance(img,mean);
} else {
return ImplImageStatistics.variance(img,mean);
}
} | class class_name[name] begin[{]
method[variance, return_type[type[double]], modifier[public static], parameter[img, mean]] begin[{]
if[member[BoofConcurrency.USE_CONCURRENT]] begin[{]
return[call[ImplImageStatistics_MT.variance, parameter[member[.img], member[.mean]]]]
else ... | Keyword[public] Keyword[static] Keyword[double] identifier[variance] operator[SEP] identifier[GrayF64] identifier[img] , Keyword[double] identifier[mean] operator[SEP] {
Keyword[if] operator[SEP] identifier[BoofConcurrency] operator[SEP] identifier[USE_CONCURRENT] operator[SEP] {
Keyword[return] iden... |
public ProcedurePerformerComponent addPerformer() { //3
ProcedurePerformerComponent t = new ProcedurePerformerComponent();
if (this.performer == null)
this.performer = new ArrayList<ProcedurePerformerComponent>();
this.performer.add(t);
return t;
} | class class_name[name] begin[{]
method[addPerformer, return_type[type[ProcedurePerformerComponent]], modifier[public], parameter[]] begin[{]
local_variable[type[ProcedurePerformerComponent], t]
if[binary_operation[THIS[member[None.performer]], ==, literal[null]]] begin[{]
as... | Keyword[public] identifier[ProcedurePerformerComponent] identifier[addPerformer] operator[SEP] operator[SEP] {
identifier[ProcedurePerformerComponent] identifier[t] operator[=] Keyword[new] identifier[ProcedurePerformerComponent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] o... |
public void marshall(DescribeOfferingRequest describeOfferingRequest, ProtocolMarshaller protocolMarshaller) {
if (describeOfferingRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(describeOf... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[describeOfferingRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.describeOfferingRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DescribeOfferingRequest] identifier[describeOfferingRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[describeOfferingRequest] operator[==] Other[null] operator... |
protected void processTopicSectionInfo(final BuildData buildData, final BaseTopicWrapper<?> topic, final Document doc) {
if (doc == null || topic == null) return;
final String infoName;
if (buildData.getDocBookVersion() == DocBookVersion.DOCBOOK_50) {
infoName = "info";
} el... | class class_name[name] begin[{]
method[processTopicSectionInfo, return_type[void], modifier[protected], parameter[buildData, topic, doc]] begin[{]
if[binary_operation[binary_operation[member[.doc], ==, literal[null]], ||, binary_operation[member[.topic], ==, literal[null]]]] begin[{]
return[Non... | Keyword[protected] Keyword[void] identifier[processTopicSectionInfo] operator[SEP] Keyword[final] identifier[BuildData] identifier[buildData] , Keyword[final] identifier[BaseTopicWrapper] operator[<] operator[?] operator[>] identifier[topic] , Keyword[final] identifier[Document] identifier[doc] operator[SEP] {
... |
private void parseConversationPayload(WsByteBuffer contextBuffer)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "parseConversationPayload", contextBuffer);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) JFapUtils.debugTraceWsByteBufferInfo(this... | class class_name[name] begin[{]
method[parseConversationPayload, return_type[void], modifier[private], parameter[contextBuffer]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, ... | Keyword[private] Keyword[void] identifier[parseConversationPayload] operator[SEP] identifier[WsByteBuffer] identifier[contextBuffer] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[... |
public StreamEx<T> mapFirst(Function<? super T, ? extends T> mapper) {
return supply(new PairSpliterator.PSOfRef<>(mapper, spliterator(), true));
} | class class_name[name] begin[{]
method[mapFirst, return_type[type[StreamEx]], modifier[public], parameter[mapper]] begin[{]
return[call[.supply, parameter[ClassCreator(arguments=[MemberReference(member=mapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(argume... | Keyword[public] identifier[StreamEx] operator[<] identifier[T] operator[>] identifier[mapFirst] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[T] operator[>] identifier[mapper] operator[SEP] {
Keyword[return] identifier[supply] o... |
public QrCodeEncoder addNumeric(byte[] numbers) {
for (int i = 0; i < numbers.length; i++) {
if (numbers[i] < 0 || numbers[i] > 9)
throw new IllegalArgumentException("All numbers must have a value from 0 to 9");
}
StringBuilder builder = new StringBuilder(numbers.length);
for (int i = 0; i < numbers.len... | class class_name[name] begin[{]
method[addNumeric, return_type[type[QrCodeEncoder]], modifier[public], parameter[numbers]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=numbers, postfix_op... | Keyword[public] identifier[QrCodeEncoder] identifier[addNumeric] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[numbers] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numbers] operator[SEP] identif... |
protected String getPreviousForwardPath()
{
PreviousPageInfo prevPageInfo = getPreviousPageInfo();
if ( prevPageInfo != null )
{
ActionForward prevForward = prevPageInfo.getForward();
return prevForward != null ? prevForward.getPath() : null;
}
else
... | class class_name[name] begin[{]
method[getPreviousForwardPath, return_type[type[String]], modifier[protected], parameter[]] begin[{]
local_variable[type[PreviousPageInfo], prevPageInfo]
if[binary_operation[member[.prevPageInfo], !=, literal[null]]] begin[{]
local_variable[ty... | Keyword[protected] identifier[String] identifier[getPreviousForwardPath] operator[SEP] operator[SEP] {
identifier[PreviousPageInfo] identifier[prevPageInfo] operator[=] identifier[getPreviousPageInfo] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[prevPageInfo] operator[!=] Other[... |
@SuppressWarnings("unchecked")
private Zipper<K, V> unzipBoth(Tree<K, V> left, Tree<K, V> right, List<Tree<K, V>> leftZipper, List<Tree<K, V>> rightZipper, int smallerDepth) {
if (isBlackTree(left) && isBlackTree(right)) {
return unzipBoth(left.getRight(), right.getLeft(), cons(left, leftZipper)... | class class_name[name] begin[{]
method[unzipBoth, return_type[type[Zipper]], modifier[private], parameter[left, right, leftZipper, rightZipper, smallerDepth]] begin[{]
if[binary_operation[call[.isBlackTree, parameter[member[.left]]], &&, call[.isBlackTree, parameter[member[.right]]]]] begin[{]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] identifier[Zipper] operator[<] identifier[K] , identifier[V] operator[>] identifier[unzipBoth] operator[SEP] identifier[Tree] operator[<] identifier[K] , identifier[V] operator[>] identifier[left] , identifier[Tre... |
public void setSuppressWarnings(Boolean value) throws CoreException
{
addBuilder(getProject(), ICoreConstants.BUILDER_ID, SUPRESS_WARNINGS_ARGUMENT_KEY, value.toString());
} | class class_name[name] begin[{]
method[setSuppressWarnings, return_type[void], modifier[public], parameter[value]] begin[{]
call[.addBuilder, parameter[call[.getProject, parameter[]], member[ICoreConstants.BUILDER_ID], member[.SUPRESS_WARNINGS_ARGUMENT_KEY], call[value.toString, parameter[]]]]
... | Keyword[public] Keyword[void] identifier[setSuppressWarnings] operator[SEP] identifier[Boolean] identifier[value] operator[SEP] Keyword[throws] identifier[CoreException] {
identifier[addBuilder] operator[SEP] identifier[getProject] operator[SEP] operator[SEP] , identifier[ICoreConstants] operator[SEP] identifie... |
private void changeReplicas(PrimaryTerm term) {
threadContext.execute(() -> {
if (this.term == null || term.term() > this.term.term()) {
this.term = term;
}
});
} | class class_name[name] begin[{]
method[changeReplicas, return_type[void], modifier[private], parameter[term]] begin[{]
call[threadContext.execute, parameter[LambdaExpression(body=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators... | Keyword[private] Keyword[void] identifier[changeReplicas] operator[SEP] identifier[PrimaryTerm] identifier[term] operator[SEP] {
identifier[threadContext] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] operator[->] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] id... |
protected static BindingSet addOrCheckDefinition(String varName, Variable variable, BindingSet bindingSet) {
Variable existingVariable = lookup(varName, bindingSet);
if (existingVariable == null) {
bindingSet = new BindingSet(new Binding(varName, variable), bindingSet);
} else {
... | class class_name[name] begin[{]
method[addOrCheckDefinition, return_type[type[BindingSet]], modifier[static protected], parameter[varName, variable, bindingSet]] begin[{]
local_variable[type[Variable], existingVariable]
if[binary_operation[member[.existingVariable], ==, literal[null]]] ... | Keyword[protected] Keyword[static] identifier[BindingSet] identifier[addOrCheckDefinition] operator[SEP] identifier[String] identifier[varName] , identifier[Variable] identifier[variable] , identifier[BindingSet] identifier[bindingSet] operator[SEP] {
identifier[Variable] identifier[existingVariable] operator[... |
private String getNeighborGroup(Tile tile, Tile neighbor)
{
final String neighborGroup;
if (isTransition(neighbor))
{
if (isTransition(tile))
{
neighborGroup = getOtherGroup(tile, neighbor);
}
else
{
... | class class_name[name] begin[{]
method[getNeighborGroup, return_type[type[String]], modifier[private], parameter[tile, neighbor]] begin[{]
local_variable[type[String], neighborGroup]
if[call[.isTransition, parameter[member[.neighbor]]]] begin[{]
if[call[.isTransi... | Keyword[private] identifier[String] identifier[getNeighborGroup] operator[SEP] identifier[Tile] identifier[tile] , identifier[Tile] identifier[neighbor] operator[SEP] {
Keyword[final] identifier[String] identifier[neighborGroup] operator[SEP] Keyword[if] operator[SEP] identifier[isTransition] operator[SEP] iden... |
public static byte[] generateRandomUUIDBytes()
{
if (rand == null)
rand = new SecureRandom();
byte[] buffer = new byte[16];
rand.nextBytes(buffer);
// Set version to 3 (Random)
buffer[6] = (byte) ((buffer[6] & 0x0f) | 0x40);
// Set variant to 2 (IETF)
buffe... | class class_name[name] begin[{]
method[generateRandomUUIDBytes, return_type[type[byte]], modifier[public static], parameter[]] begin[{]
if[binary_operation[member[.rand], ==, literal[null]]] begin[{]
assign[member[.rand], ClassCreator(arguments=[], body=None, constructor_type_argume... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[generateRandomUUIDBytes] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[rand] operator[==] Other[null] operator[SEP] identifier[rand] operator[=] Keyword[new] identifier[SecureRandom] operator[SEP] operator[S... |
private List<URL> getDirUrls(String xmlPackage) {
try {
return Collections.list(Thread.currentThread().getContextClassLoader().getResources(xmlPackage));
} catch (IOException e) {
log.error("无法解析配置的zealot xml路径下文件的URL,将被忽略.该路径为:" + xmlPackage + ",请检查!", e);
return Col... | class class_name[name] begin[{]
method[getDirUrls, return_type[type[List]], modifier[private], parameter[xmlPackage]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], quali... | Keyword[private] identifier[List] operator[<] identifier[URL] operator[>] identifier[getDirUrls] operator[SEP] identifier[String] identifier[xmlPackage] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[Collections] operator[SEP] identifier[list] operator[SEP] identifier[Thread] operator[SEP] ... |
public void localDoWork(Work work) throws WorkException
{
if (transport != null)
{
checkTransport();
if (getLongRunningThreadPool() != null && WorkManagerUtil.isLongRunning(work))
{
transport.updateLongRunningFree(getLocalAddress(),
... | class class_name[name] begin[{]
method[localDoWork, return_type[void], modifier[public], parameter[work]] begin[{]
if[binary_operation[member[.transport], !=, literal[null]]] begin[{]
call[.checkTransport, parameter[]]
if[binary_operation[binary_o... | Keyword[public] Keyword[void] identifier[localDoWork] operator[SEP] identifier[Work] identifier[work] operator[SEP] Keyword[throws] identifier[WorkException] {
Keyword[if] operator[SEP] identifier[transport] operator[!=] Other[null] operator[SEP] {
identifier[checkTransport] operator[SEP] operator[SEP... |
public void displayField() // init this field override for other value
{
if (m_vScreenField == null)
return;
for (Enumeration<Object> e = m_vScreenField.elements() ; e.hasMoreElements() ;) {
ScreenComponent sField = (ScreenComponent)e.nextElement();
... | class class_name[name] begin[{]
method[displayField, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_vScreenField], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
ForStatement(body=BlockStatement(label=None, s... | Keyword[public] Keyword[void] identifier[displayField] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_vScreenField] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] Keyword[for] operator[SEP] identifier[Enumeration] operator[<] identifier[Object] operator[>] identifier[e... |
private Map<String, OperationResult<ModelService>> getChangedServices(Map<String, ModelService> serviceMap){
return this.getDirectoryServiceClient().getChangedServices(serviceMap);
} | class class_name[name] begin[{]
method[getChangedServices, return_type[type[Map]], modifier[private], parameter[serviceMap]] begin[{]
return[THIS[call[None.getDirectoryServiceClient, parameter[]]call[None.getChangedServices, parameter[member[.serviceMap]]]]]
end[}]
END[}] | Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[OperationResult] operator[<] identifier[ModelService] operator[>] operator[>] identifier[getChangedServices] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[ModelService] operator[>] identifier[serviceMap] operator[... |
@SuppressWarnings({ "PMD.CollapsibleIfStatements",
"PMD.GuardLogStatement" })
public void awaitExhaustion() throws InterruptedException {
synchronized (this) {
if (generators != null) {
if (running != generators.size()) {
generatorTracking
... | class class_name[name] begin[{]
method[awaitExhaustion, return_type[void], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[THIS[]] BEGIN[{]
if[binary_operation[member[.generators], !=, literal[null]]] begin[{]
if[binary_operation[memb... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String]
} operator[SEP] Keyword[public] Keyword[void] identifier[awaitExhaustion] operator[SEP] operator[SEP] Keyword[throws] identifier[InterruptedException] {
Keyword[synchronized] operator[SEP] Keyword[this] operat... |
private int getTextColor(int item) {
int scrollX = getScrollX();
// set color of text
int color = textColor.getDefaultColor();
int itemWithPadding = (int) (itemWidth + dividerSize);
if (scrollX > itemWithPadding * item - itemWithPadding / 2 &&
scrollX < itemWith... | class class_name[name] begin[{]
method[getTextColor, return_type[type[int]], modifier[private], parameter[item]] begin[{]
local_variable[type[int], scrollX]
local_variable[type[int], color]
local_variable[type[int], itemWithPadding]
if[binary_operation[binary_operation[m... | Keyword[private] Keyword[int] identifier[getTextColor] operator[SEP] Keyword[int] identifier[item] operator[SEP] {
Keyword[int] identifier[scrollX] operator[=] identifier[getScrollX] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[color] operator[=] identifier[textColor] operator[SEP] identifie... |
public C4BlobReadStream openReadStream(C4BlobKey blobKey) throws LiteCoreException {
return new C4BlobReadStream(openReadStream(handle, blobKey.getHandle()));
} | class class_name[name] begin[{]
method[openReadStream, return_type[type[C4BlobReadStream]], modifier[public], parameter[blobKey]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Meth... | Keyword[public] identifier[C4BlobReadStream] identifier[openReadStream] operator[SEP] identifier[C4BlobKey] identifier[blobKey] operator[SEP] Keyword[throws] identifier[LiteCoreException] {
Keyword[return] Keyword[new] identifier[C4BlobReadStream] operator[SEP] identifier[openReadStream] operator[SEP] identifier... |
public PutRestApiResult withBinaryMediaTypes(String... binaryMediaTypes) {
if (this.binaryMediaTypes == null) {
setBinaryMediaTypes(new java.util.ArrayList<String>(binaryMediaTypes.length));
}
for (String ele : binaryMediaTypes) {
this.binaryMediaTypes.add(ele);
}... | class class_name[name] begin[{]
method[withBinaryMediaTypes, return_type[type[PutRestApiResult]], modifier[public], parameter[binaryMediaTypes]] begin[{]
if[binary_operation[THIS[member[None.binaryMediaTypes]], ==, literal[null]]] begin[{]
call[.setBinaryMediaTypes, para... | Keyword[public] identifier[PutRestApiResult] identifier[withBinaryMediaTypes] operator[SEP] identifier[String] operator[...] identifier[binaryMediaTypes] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[binaryMediaTypes] operator[==] Other[null] operator[SEP] {
identifi... |
public static Method[] getBeanMethods(Class<?> type, String propertyName, Class<?> propertyType, boolean caseSensitive)
throws IllegalAccessException, NoSuchMethodException {
Method methods[] = new Method[2];
// search for the "get"
methods[0] = getMethod(type, "get"+propertyName, proper... | class class_name[name] begin[{]
method[getBeanMethods, return_type[type[Method]], modifier[public static], parameter[type, propertyName, propertyType, caseSensitive]] begin[{]
local_variable[type[Method], methods]
assign[member[.methods], call[.getMethod, parameter[member[.type], binary... | Keyword[public] Keyword[static] identifier[Method] operator[SEP] operator[SEP] identifier[getBeanMethods] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , identifier[String] identifier[propertyName] , identifier[Class] operator[<] operator[?] operator[>] identifier[propertyType] ... |
public com.google.api.ads.adwords.axis.v201809.cm.FeedItemAdGroupTargeting getAdGroupTargeting() {
return adGroupTargeting;
} | class class_name[name] begin[{]
method[getAdGroupTargeting, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[member[.adGroupTargeting]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[FeedItemAdGroupTargeting] identifier[getAd... |
@Override
public void registerRequestManager(final RequestManager ruleProvider) {
Validate.notNull(ruleProvider, "ruleProvider cannot be null");
server.setHandler(new JadlerHandler(ruleProvider));
} | class class_name[name] begin[{]
method[registerRequestManager, return_type[void], modifier[public], parameter[ruleProvider]] begin[{]
call[Validate.notNull, parameter[member[.ruleProvider], literal["ruleProvider cannot be null"]]]
call[server.setHandler, parameter[ClassCreator(a... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[registerRequestManager] operator[SEP] Keyword[final] identifier[RequestManager] identifier[ruleProvider] operator[SEP] {
identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[ruleProvider] , literal[String] ope... |
public static <T> T min(T lhs, T rhs, Comparator<T> comparator) {
return BinaryOperator.minBy(comparator).apply(lhs, rhs);
} | class class_name[name] begin[{]
method[min, return_type[type[T]], modifier[public static], parameter[lhs, rhs, comparator]] begin[{]
return[call[BinaryOperator.minBy, parameter[member[.comparator]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[min] operator[SEP] identifier[T] identifier[lhs] , identifier[T] identifier[rhs] , identifier[Comparator] operator[<] identifier[T] operator[>] identifier[comparator] operator[SEP] {
Keyword[return] identifier[Binary... |
public static byte[] download(final URI uri) throws IOException
{
final File tmpFile = new File(uri);
return ReadFileExtensions.toByteArray(tmpFile);
} | class class_name[name] begin[{]
method[download, return_type[type[byte]], modifier[public static], parameter[uri]] begin[{]
local_variable[type[File], tmpFile]
return[call[ReadFileExtensions.toByteArray, parameter[member[.tmpFile]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[download] operator[SEP] Keyword[final] identifier[URI] identifier[uri] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[File] identifier[tmpFile] operator[=] Keyword[new] identifier[File] operato... |
protected InstanceNode<ElkClass, ElkNamedIndividual> getInstanceNode(
ElkNamedIndividual elkNamedIndividual) throws ElkException {
final InstanceTaxonomy<ElkClass, ElkNamedIndividual> instanceTaxonomy = getInstanceTaxonomy();
final InstanceNode<ElkClass, ElkNamedIndividual> node = instanceTaxonomy
.getInstan... | class class_name[name] begin[{]
method[getInstanceNode, return_type[type[InstanceNode]], modifier[protected], parameter[elkNamedIndividual]] begin[{]
local_variable[type[InstanceTaxonomy], instanceTaxonomy]
local_variable[type[InstanceNode], node]
if[binary_operation[member[.nod... | Keyword[protected] identifier[InstanceNode] operator[<] identifier[ElkClass] , identifier[ElkNamedIndividual] operator[>] identifier[getInstanceNode] operator[SEP] identifier[ElkNamedIndividual] identifier[elkNamedIndividual] operator[SEP] Keyword[throws] identifier[ElkException] {
Keyword[final] identifier[Ins... |
public void endElement() throws KNXMLException
{
if (layout.empty())
throw new KNXIllegalStateException("no elements to end");
try {
((Tag) layout.pop()).endTag();
if (layout.empty())
w.flush();
}
catch (final IOException e) {
throw new KNXMLException(e.getMessage());
}
} | class class_name[name] begin[{]
method[endElement, return_type[void], modifier[public], parameter[]] begin[{]
if[call[layout.empty, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="no... | Keyword[public] Keyword[void] identifier[endElement] operator[SEP] operator[SEP] Keyword[throws] identifier[KNXMLException] {
Keyword[if] operator[SEP] identifier[layout] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[KNXIllegalStateException] ope... |
public static void copyFile(File from, File to) throws IOException {
InputStream in = new BufferedInputStream(new FileInputStream(from));
try {
OutputStream out = new BufferedOutputStream(new FileOutputStream(to));
try {
IoUtils.copyAllBytes(in, out);
... | class class_name[name] begin[{]
method[copyFile, return_type[void], modifier[public static], parameter[from, to]] begin[{]
local_variable[type[InputStream], in]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(a... | Keyword[public] Keyword[static] Keyword[void] identifier[copyFile] operator[SEP] identifier[File] identifier[from] , identifier[File] identifier[to] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[InputStream] identifier[in] operator[=] Keyword[new] identifier[BufferedInputStream] operator[SE... |
public static String getLocalProperty(final String key) {
String ret = localProps.getProperty(key);
if (StringUtils.isBlank(ret)) {
return ret;
}
ret = replaceEnvVars(ret);
return ret;
} | class class_name[name] begin[{]
method[getLocalProperty, return_type[type[String]], modifier[public static], parameter[key]] begin[{]
local_variable[type[String], ret]
if[call[StringUtils.isBlank, parameter[member[.ret]]]] begin[{]
return[member[.ret]]
else begin[{]
... | Keyword[public] Keyword[static] identifier[String] identifier[getLocalProperty] operator[SEP] Keyword[final] identifier[String] identifier[key] operator[SEP] {
identifier[String] identifier[ret] operator[=] identifier[localProps] operator[SEP] identifier[getProperty] operator[SEP] identifier[key] operator[SEP] o... |
private static Druids.ScanQueryBuilder basicA(final BenchmarkSchemaInfo basicSchema)
{
final QuerySegmentSpec intervalSpec =
new MultipleIntervalSegmentSpec(Collections.singletonList(basicSchema.getDataInterval()));
return Druids.newScanQueryBuilder()
.dataSource("blah")
... | class class_name[name] begin[{]
method[basicA, return_type[type[Druids]], modifier[private static], parameter[basicSchema]] begin[{]
local_variable[type[QuerySegmentSpec], intervalSpec]
return[call[Druids.newScanQueryBuilder, parameter[]]]
end[}]
END[}] | Keyword[private] Keyword[static] identifier[Druids] operator[SEP] identifier[ScanQueryBuilder] identifier[basicA] operator[SEP] Keyword[final] identifier[BenchmarkSchemaInfo] identifier[basicSchema] operator[SEP] {
Keyword[final] identifier[QuerySegmentSpec] identifier[intervalSpec] operator[=] Keyword[new] iden... |
public boolean checkEquivalenceHelper(
TemplateTypeMap that, EquivalenceMethod eqMethod, SubtypingMode subtypingMode) {
return checkEquivalenceHelper(that, eqMethod, EqCache.create(), subtypingMode);
} | class class_name[name] begin[{]
method[checkEquivalenceHelper, return_type[type[boolean]], modifier[public], parameter[that, eqMethod, subtypingMode]] begin[{]
return[call[.checkEquivalenceHelper, parameter[member[.that], member[.eqMethod], call[EqCache.create, parameter[]], member[.subtypingMode]]]]
... | Keyword[public] Keyword[boolean] identifier[checkEquivalenceHelper] operator[SEP] identifier[TemplateTypeMap] identifier[that] , identifier[EquivalenceMethod] identifier[eqMethod] , identifier[SubtypingMode] identifier[subtypingMode] operator[SEP] {
Keyword[return] identifier[checkEquivalenceHelper] operator[S... |
public static void setInputTable(Configuration configuration, TableReference tableReference)
throws IOException {
setInputTable(
configuration,
tableReference.getProjectId(),
tableReference.getDatasetId(),
tableReference.getTableId());
} | class class_name[name] begin[{]
method[setInputTable, return_type[void], modifier[public static], parameter[configuration, tableReference]] begin[{]
call[.setInputTable, parameter[member[.configuration], call[tableReference.getProjectId, parameter[]], call[tableReference.getDatasetId, parameter... | Keyword[public] Keyword[static] Keyword[void] identifier[setInputTable] operator[SEP] identifier[Configuration] identifier[configuration] , identifier[TableReference] identifier[tableReference] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[setInputTable] operator[SEP] identifier[configurati... |
public void updateTenantDef(TenantDefinition tenantDef) {
synchronized (m_tenantDBMap) {
DBService dbservice = m_tenantDBMap.get(tenantDef.getName());
if (dbservice != null) {
Tenant updatedTenant = new Tenant(tenantDef);
m_logger.info("Updating DBService ... | class class_name[name] begin[{]
method[updateTenantDef, return_type[void], modifier[public], parameter[tenantDef]] begin[{]
SYNCHRONIZED[member[.m_tenantDBMap]] BEGIN[{]
local_variable[type[DBService], dbservice]
if[binary_operation[member[.dbservice], !=, li... | Keyword[public] Keyword[void] identifier[updateTenantDef] operator[SEP] identifier[TenantDefinition] identifier[tenantDef] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[m_tenantDBMap] operator[SEP] {
identifier[DBService] identifier[dbservice] operator[=] identifier[m_tenantDBMap] ope... |
private ItemStack handleDropSlot(MalisisSlot hoveredSlot, boolean fullStack)
{
ItemStack itemStack = hoveredSlot.getItemStack();
if (itemStack.isEmpty() || !hoveredSlot.isState(PLAYER_EXTRACT))
return itemStack;
ItemUtils.ItemStackSplitter iss = new ItemUtils.ItemStackSplitter(hoveredSlot.getItemStack());
... | class class_name[name] begin[{]
method[handleDropSlot, return_type[type[ItemStack]], modifier[private], parameter[hoveredSlot, fullStack]] begin[{]
local_variable[type[ItemStack], itemStack]
if[binary_operation[call[itemStack.isEmpty, parameter[]], ||, call[hoveredSlot.isState, paramete... | Keyword[private] identifier[ItemStack] identifier[handleDropSlot] operator[SEP] identifier[MalisisSlot] identifier[hoveredSlot] , Keyword[boolean] identifier[fullStack] operator[SEP] {
identifier[ItemStack] identifier[itemStack] operator[=] identifier[hoveredSlot] operator[SEP] identifier[getItemStack] operator... |
public static synchronized void setBlastPath(String path) {
// Adding "/" at the end of the sequence
if (!path.endsWith(File.separator))
path += File.separatorChar;
// Setting path
Blast.path = path;
// Resetting all cached command paths
commandPaths.clear()... | class class_name[name] begin[{]
method[setBlastPath, return_type[void], modifier[synchronized public static], parameter[path]] begin[{]
if[call[path.endsWith, parameter[member[File.separator]]]] begin[{]
assign[member[.path], member[File.separatorChar]]
else begin[{]
None
... | Keyword[public] Keyword[static] Keyword[synchronized] Keyword[void] identifier[setBlastPath] operator[SEP] identifier[String] identifier[path] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[path] operator[SEP] identifier[endsWith] operator[SEP] identifier[File] operator[SEP] identifier[separato... |
public static <T> MutableIntCollection collectInt(
Iterable<T> iterable,
IntFunction<? super T> intFunction)
{
if (iterable instanceof MutableCollection)
{
return ((MutableCollection<T>) iterable).collectInt(intFunction);
}
if (iterable instanceof ... | class class_name[name] begin[{]
method[collectInt, return_type[type[MutableIntCollection]], modifier[public static], parameter[iterable, intFunction]] begin[{]
if[binary_operation[member[.iterable], instanceof, type[MutableCollection]]] begin[{]
return[Cast(expression=MemberReferenc... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[MutableIntCollection] identifier[collectInt] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[iterable] , identifier[IntFunction] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifi... |
public boolean canBeLinked(D declaration, ServiceReference<S> declarationBinderRef) {
// Evaluate the target filter of the ImporterService on the Declaration
Filter filter = bindersManager.getTargetFilter(declarationBinderRef);
return filter.matches(declaration.getMetadata());
} | class class_name[name] begin[{]
method[canBeLinked, return_type[type[boolean]], modifier[public], parameter[declaration, declarationBinderRef]] begin[{]
local_variable[type[Filter], filter]
return[call[filter.matches, parameter[call[declaration.getMetadata, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[canBeLinked] operator[SEP] identifier[D] identifier[declaration] , identifier[ServiceReference] operator[<] identifier[S] operator[>] identifier[declarationBinderRef] operator[SEP] {
identifier[Filter] identifier[filter] operator[=] identifier[bindersManager] operator... |
public void setBeta(javax.el.ValueExpression _beta) {
getStateHelper().put(PropertyKeys.beta, _beta);
} | class class_name[name] begin[{]
method[setBeta, return_type[void], modifier[public], parameter[_beta]] begin[{]
call[.getStateHelper, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setBeta] operator[SEP] identifier[javax] operator[SEP] identifier[el] operator[SEP] identifier[ValueExpression] identifier[_beta] operator[SEP] {
identifier[getStateHelper] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[PropertyKeys] op... |
public boolean setNodeText(Document domDocument, Node n, String value) {
if (n == null)
return false;
Node nc = null;
while ((nc = n.getFirstChild()) != null) {
n.removeChild(nc);
}
n.appendChild(domDocument.createTextNode(value));
return t... | class class_name[name] begin[{]
method[setNodeText, return_type[type[boolean]], modifier[public], parameter[domDocument, n, value]] begin[{]
if[binary_operation[member[.n], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[type[... | Keyword[public] Keyword[boolean] identifier[setNodeText] operator[SEP] identifier[Document] identifier[domDocument] , identifier[Node] identifier[n] , identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[n] operator[==] Other[null] operator[SEP] Keyword[return] literal[bool... |
public IdentityProviderType withAttributeMapping(java.util.Map<String, String> attributeMapping) {
setAttributeMapping(attributeMapping);
return this;
} | class class_name[name] begin[{]
method[withAttributeMapping, return_type[type[IdentityProviderType]], modifier[public], parameter[attributeMapping]] begin[{]
call[.setAttributeMapping, parameter[member[.attributeMapping]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[IdentityProviderType] identifier[withAttributeMapping] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[attributeMapping] operator[SEP] {
identifier[setAttributeMappin... |
public <R extends BProgramRunnerListener> R addListener(R aListener) {
listeners.add(aListener);
return aListener;
} | class class_name[name] begin[{]
method[addListener, return_type[type[R]], modifier[public], parameter[aListener]] begin[{]
call[listeners.add, parameter[member[.aListener]]]
return[member[.aListener]]
end[}]
END[}] | Keyword[public] operator[<] identifier[R] Keyword[extends] identifier[BProgramRunnerListener] operator[>] identifier[R] identifier[addListener] operator[SEP] identifier[R] identifier[aListener] operator[SEP] {
identifier[listeners] operator[SEP] identifier[add] operator[SEP] identifier[aListener] operator[SEP] o... |
@Action(name = "Validate",
outputs = {
@Output(RETURN_CODE),
@Output(RESULT_TEXT),
@Output(RETURN_RESULT),
@Output(ERROR_MESSAGE)},
responses = {
@Response(text = ResponseNames.SUCCESS, field = RE... | class class_name[name] begin[{]
method[execute, return_type[type[Map]], modifier[public], parameter[xmlDocument, xmlDocumentSource, xsdDocument, xsdDocumentSource, username, password, trustAllRoots, keystore, keystorePassword, trustKeystore, trustPassword, x509HostnameVerifier, proxyHost, proxyPort, proxyUsern... | annotation[@] identifier[Action] operator[SEP] identifier[name] operator[=] literal[String] , identifier[outputs] operator[=] {
annotation[@] identifier[Output] operator[SEP] identifier[RETURN_CODE] operator[SEP] , annotation[@] identifier[Output] operator[SEP] identifier[RESULT_TEXT] operator[SEP] , annotati... |
public static Point2D_F64 center( Quadrilateral_F64 quad , Point2D_F64 center ) {
if( center == null )
center = new Point2D_F64();
center.x = quad.a.x + quad.b.x + quad.c.x + quad.d.x;
center.y = quad.a.y + quad.b.y + quad.c.y + quad.d.y;
center.x /= 4.0;
center.y /= 4.0;
return center;
} | class class_name[name] begin[{]
method[center, return_type[type[Point2D_F64]], modifier[public static], parameter[quad, center]] begin[{]
if[binary_operation[member[.center], ==, literal[null]]] begin[{]
assign[member[.center], ClassCreator(arguments=[], body=None, constructor_type_... | Keyword[public] Keyword[static] identifier[Point2D_F64] identifier[center] operator[SEP] identifier[Quadrilateral_F64] identifier[quad] , identifier[Point2D_F64] identifier[center] operator[SEP] {
Keyword[if] operator[SEP] identifier[center] operator[==] Other[null] operator[SEP] identifier[center] operator[=] ... |
public static Sample readSample(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readSample(reader);
}
} | class class_name[name] begin[{]
method[readSample, return_type[type[Sample]], modifier[public static], parameter[url]] begin[{]
call[.checkNotNull, parameter[member[.url]]]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=reader, postfix_... | Keyword[public] Keyword[static] identifier[Sample] identifier[readSample] operator[SEP] Keyword[final] identifier[URL] identifier[url] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[checkNotNull] operator[SEP] identifier[url] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[B... |
@Override
public HashMap<String, Object> getApplicationMap() {
return (HashMap<String, Object>) JKThreadLocal.getValue(JKContextConstants.APPLICATION_MAP);
} | class class_name[name] begin[{]
method[getApplicationMap, return_type[type[HashMap]], modifier[public], parameter[]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=APPLICATION_MAP, postfix_operators=[], prefix_operators=[], qualifier=JKContextConstants, selectors=[])... | annotation[@] identifier[Override] Keyword[public] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getApplicationMap] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] op... |
public JSONObject invokeJson() throws InternalException, CloudException {
ClientAndResponse clientAndResponse = null;
String content;
try {
clientAndResponse = invokeInternal();
Header contentType = clientAndResponse.response.getFirstHeader("content-type");
if... | class class_name[name] begin[{]
method[invokeJson, return_type[type[JSONObject]], modifier[public], parameter[]] begin[{]
local_variable[type[ClientAndResponse], clientAndResponse]
local_variable[type[String], content]
TryStatement(block=[StatementExpression(expression=Assignment(expres... | Keyword[public] identifier[JSONObject] identifier[invokeJson] operator[SEP] operator[SEP] Keyword[throws] identifier[InternalException] , identifier[CloudException] {
identifier[ClientAndResponse] identifier[clientAndResponse] operator[=] Other[null] operator[SEP] identifier[String] identifier[content] operator... |
public final void synpred51_InternalSARL_fragment() throws RecognitionException {
// InternalSARL.g:14825:4: ( ( () ( ( ( ( ( 'var' ) ) | 'val' ) ( ( 'extension' ) )? ) | ( ( ( 'extension' ) ) ( ( ( 'var' ) ) | 'val' ) ) ) ) )
// InternalSARL.g:14825:5: ( () ( ( ( ( ( 'var' ) ) | 'val' ) ( ( 'extensi... | class class_name[name] begin[{]
method[synpred51_InternalSARL_fragment, return_type[void], modifier[final public], parameter[]] begin[{]
local_variable[type[int], alt404]
local_variable[type[int], LA404_0]
if[binary_operation[binary_operation[member[.LA4... | Keyword[public] Keyword[final] Keyword[void] identifier[synpred51_InternalSARL_fragment] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
{
{
{
}
Keyword[int] identifier[alt404] operator[=] Other[2] operator[... |
public static void paintCheckedBackground(Component c, Graphics g, int x, int y, int width, int height) {
if ( backgroundImage == null ) {
backgroundImage = new BufferedImage( 64, 64, BufferedImage.TYPE_INT_ARGB );
Graphics bg = backgroundImage.createGraphics();
for ( int by = 0; by < 64; by += 8 ) {
for... | class class_name[name] begin[{]
method[paintCheckedBackground, return_type[void], modifier[public static], parameter[c, g, x, y, width, height]] begin[{]
if[binary_operation[member[.backgroundImage], ==, literal[null]]] begin[{]
assign[member[.backgroundImage], ClassCrea... | Keyword[public] Keyword[static] Keyword[void] identifier[paintCheckedBackground] operator[SEP] identifier[Component] identifier[c] , identifier[Graphics] identifier[g] , Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] {
... |
public String[] buildWhereArgs(Collection<Object> values) {
List<String> selectionArgs = new ArrayList<String>();
for (Object value : values) {
if (value != null) {
selectionArgs.add(value.toString());
}
}
return selectionArgs.isEmpty() ? null : selectionArgs
.toArray(new String[] {});
} | class class_name[name] begin[{]
method[buildWhereArgs, return_type[type[String]], modifier[public], parameter[values]] begin[{]
local_variable[type[List], selectionArgs]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(membe... | Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[buildWhereArgs] operator[SEP] identifier[Collection] operator[<] identifier[Object] operator[>] identifier[values] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[selectionArgs] operator[=] Keyword[ne... |
private void addConfiguredStorageServices(Set<String> serviceSet) {
List<String> ssList = ServerParams.instance().getModuleParamList("DoradusServer", "storage_services");
if (ssList != null) {
serviceSet.addAll(ssList);
}
} | class class_name[name] begin[{]
method[addConfiguredStorageServices, return_type[void], modifier[private], parameter[serviceSet]] begin[{]
local_variable[type[List], ssList]
if[binary_operation[member[.ssList], !=, literal[null]]] begin[{]
call[serviceSet.addAll,... | Keyword[private] Keyword[void] identifier[addConfiguredStorageServices] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[serviceSet] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[ssList] operator[=] identifier[ServerParams] operator[SEP]... |
private static String getTempDir(Class<?> loader)
{
final File temp = new File(TEMP, loader.getSimpleName());
final String path = temp.getAbsolutePath();
if (!temp.isDirectory() && !temp.mkdir())
{
Verbose.warning(ERROR_CREATE_TEMP_DIR, path);
}
re... | class class_name[name] begin[{]
method[getTempDir, return_type[type[String]], modifier[private static], parameter[loader]] begin[{]
local_variable[type[File], temp]
local_variable[type[String], path]
if[binary_operation[call[temp.isDirectory, parameter[]], &&, call[temp.mkdir, p... | Keyword[private] Keyword[static] identifier[String] identifier[getTempDir] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[loader] operator[SEP] {
Keyword[final] identifier[File] identifier[temp] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[TEMP] , identifier... |
public static Expression parseResource(final String path, Charset encoding) throws IOException {
return simplifiedParse(EXPRESSION, resourceProvider(path, encoding));
} | class class_name[name] begin[{]
method[parseResource, return_type[type[Expression]], modifier[public static], parameter[path, encoding]] begin[{]
return[call[.simplifiedParse, parameter[member[.EXPRESSION], call[.resourceProvider, parameter[member[.path], member[.encoding]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Expression] identifier[parseResource] operator[SEP] Keyword[final] identifier[String] identifier[path] , identifier[Charset] identifier[encoding] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[simplifiedParse] operator[SEP] identifie... |
public List<String> getPreReleaseLabels() {
return preReleases == null ? null : Collections.unmodifiableList(Arrays.asList(preReleases));
} | class class_name[name] begin[{]
method[getPreReleaseLabels, return_type[type[List]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=preReleases, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Lit... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getPreReleaseLabels] operator[SEP] operator[SEP] {
Keyword[return] identifier[preReleases] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[Collections] operator[SEP] identifier[unmodifiableList] operat... |
public void setQueryExecutions(java.util.Collection<QueryExecution> queryExecutions) {
if (queryExecutions == null) {
this.queryExecutions = null;
return;
}
this.queryExecutions = new java.util.ArrayList<QueryExecution>(queryExecutions);
} | class class_name[name] begin[{]
method[setQueryExecutions, return_type[void], modifier[public], parameter[queryExecutions]] begin[{]
if[binary_operation[member[.queryExecutions], ==, literal[null]]] begin[{]
assign[THIS[member[None.queryExecutions]], literal[null]]
... | Keyword[public] Keyword[void] identifier[setQueryExecutions] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[QueryExecution] operator[>] identifier[queryExecutions] operator[SEP] {
Keyword[if] operator[SEP] identifier[queryExecutions] oper... |
protected List<String> readFromFile(String filename) {
Path path = new File(filename).toPath();
List<String> result = new ArrayList<>();
try {
List<String> tempResult = Files.readAllLines(path);
if (tempResult != null) {
result.addAll(tempResult);
}
} catch (IOException e) {
... | class class_name[name] begin[{]
method[readFromFile, return_type[type[List]], modifier[protected], parameter[filename]] begin[{]
local_variable[type[Path], path]
local_variable[type[List], result]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarat... | Keyword[protected] identifier[List] operator[<] identifier[String] operator[>] identifier[readFromFile] operator[SEP] identifier[String] identifier[filename] operator[SEP] {
identifier[Path] identifier[path] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[filename] operator[SEP] operator[SEP] ... |
@Override
protected int writeBytesWireFormat ( byte[] dst, int dstIndex ) {
int start = dstIndex;
SMBUtil.writeInt2(32, dst, dstIndex);
SMBUtil.writeInt2(this.notifyFlags, dst, dstIndex + 2);
dstIndex += 4;
SMBUtil.writeInt4(this.outputBufferLength, dst, dstIndex);
d... | class class_name[name] begin[{]
method[writeBytesWireFormat, return_type[type[int]], modifier[protected], parameter[dst, dstIndex]] begin[{]
local_variable[type[int], start]
call[SMBUtil.writeInt2, parameter[literal[32], member[.dst], member[.dstIndex]]]
call[SMBUtil.wri... | annotation[@] identifier[Override] Keyword[protected] Keyword[int] identifier[writeBytesWireFormat] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[dst] , Keyword[int] identifier[dstIndex] operator[SEP] {
Keyword[int] identifier[start] operator[=] identifier[dstIndex] operator[SEP] identifier... |
public void logRename(String src, String dst, long timestamp) {
RenameOp op = RenameOp.getInstance();
op.set(src, dst, timestamp);
logEdit(op);
} | class class_name[name] begin[{]
method[logRename, return_type[void], modifier[public], parameter[src, dst, timestamp]] begin[{]
local_variable[type[RenameOp], op]
call[op.set, parameter[member[.src], member[.dst], member[.timestamp]]]
call[.logEdit, parameter[member[.op]... | Keyword[public] Keyword[void] identifier[logRename] operator[SEP] identifier[String] identifier[src] , identifier[String] identifier[dst] , Keyword[long] identifier[timestamp] operator[SEP] {
identifier[RenameOp] identifier[op] operator[=] identifier[RenameOp] operator[SEP] identifier[getInstance] operator[SEP... |
private Object writeReplace() throws ObjectStreamException {
return new UnbackedMemberIdentifier<X>(getDeclaringType(), AnnotatedTypes.createMethodId(method, getAnnotations(), getParameters()));
} | class class_name[name] begin[{]
method[writeReplace, return_type[type[Object]], modifier[private], parameter[]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getDeclaringType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Meth... | Keyword[private] identifier[Object] identifier[writeReplace] operator[SEP] operator[SEP] Keyword[throws] identifier[ObjectStreamException] {
Keyword[return] Keyword[new] identifier[UnbackedMemberIdentifier] operator[<] identifier[X] operator[>] operator[SEP] identifier[getDeclaringType] operator[SEP] operator[SE... |
public String getLocalNameFromExpandedNameID(int ExpandedNameID) {
// Get expanded name
String expandedName = m_localNames.indexToString(ExpandedNameID);
// Remove prefix from expanded name
int colonpos = expandedName.indexOf(":");
String localName = expandedName.... | class class_name[name] begin[{]
method[getLocalNameFromExpandedNameID, return_type[type[String]], modifier[public], parameter[ExpandedNameID]] begin[{]
local_variable[type[String], expandedName]
local_variable[type[int], colonpos]
local_variable[type[String], localName]
return[m... | Keyword[public] identifier[String] identifier[getLocalNameFromExpandedNameID] operator[SEP] Keyword[int] identifier[ExpandedNameID] operator[SEP] {
identifier[String] identifier[expandedName] operator[=] identifier[m_localNames] operator[SEP] identifier[indexToString] operator[SEP] identifier[ExpandedNameID] ope... |
public Sink reloadAsync() throws ExecutionException, InterruptedException {
// [START reloadAsync]
Future<Sink> future = sink.reloadAsync();
// ...
Sink latestSink = future.get();
if (latestSink == null) {
// the sink was not found
}
// [END reloadAsync]
return latestSink;
} | class class_name[name] begin[{]
method[reloadAsync, return_type[type[Sink]], modifier[public], parameter[]] begin[{]
local_variable[type[Future], future]
local_variable[type[Sink], latestSink]
if[binary_operation[member[.latestSink], ==, literal[null]]] begin[{]
else be... | Keyword[public] identifier[Sink] identifier[reloadAsync] operator[SEP] operator[SEP] Keyword[throws] identifier[ExecutionException] , identifier[InterruptedException] {
identifier[Future] operator[<] identifier[Sink] operator[>] identifier[future] operator[=] identifier[sink] operator[SEP] identifier[reloadAsyn... |
public boolean undoPendingDismiss() {
boolean existPendingDismisses = existPendingDismisses();
if (existPendingDismisses) {
mPendingDismiss.rowContainer.undoContainer.setVisibility(View.GONE);
mPendingDismiss.rowContainer.dataContainer
.animate()
... | class class_name[name] begin[{]
method[undoPendingDismiss, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], existPendingDismisses]
if[member[.existPendingDismisses]] begin[{]
call[mPendingDismiss.rowContainer.undoC... | Keyword[public] Keyword[boolean] identifier[undoPendingDismiss] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[existPendingDismisses] operator[=] identifier[existPendingDismisses] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[existPendingDismisses] operator[SEP] {
... |
public boolean syncClonedListener(BaseField field, FieldListener listener, boolean bInitCalled)
{
if (!bInitCalled)
((MainFieldHandler)listener).init(null, keyName);
return super.syncClonedListener(field, listener, true);
} | class class_name[name] begin[{]
method[syncClonedListener, return_type[type[boolean]], modifier[public], parameter[field, listener, bInitCalled]] begin[{]
if[member[.bInitCalled]] begin[{]
Cast(expression=MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qu... | Keyword[public] Keyword[boolean] identifier[syncClonedListener] operator[SEP] identifier[BaseField] identifier[field] , identifier[FieldListener] identifier[listener] , Keyword[boolean] identifier[bInitCalled] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[bInitCalled] operator[SEP] operator[... |
public <N extends Number & Comparable<?>> NumberExpression<T> divide(Expression<N> right) {
@SuppressWarnings("unchecked")
Class<T> type = (Class<T>) getDivisionType(getType(), right.getType());
return Expressions.numberOperation(type, Ops.DIV, mixin, right);
} | class class_name[name] begin[{]
method[divide, return_type[type[NumberExpression]], modifier[public], parameter[right]] begin[{]
local_variable[type[Class], type]
return[call[Expressions.numberOperation, parameter[member[.type], member[Ops.DIV], member[.mixin], member[.right]]]]
end[}]
END[... | Keyword[public] operator[<] identifier[N] Keyword[extends] identifier[Number] operator[&] identifier[Comparable] operator[<] operator[?] operator[>] operator[>] identifier[NumberExpression] operator[<] identifier[T] operator[>] identifier[divide] operator[SEP] identifier[Expression] operator[<] identifier[N] operator[>... |
@Override
protected ProcessingItem addInputStream(Stream inputStream, PartitioningScheme scheme) {
SamzaSystemStream stream = ((SamzaStream) inputStream).addDestination(new StreamDestination(this,this.getParallelism(),scheme));
this.inputStreams.add(stream);
return this;
} | class class_name[name] begin[{]
method[addInputStream, return_type[type[ProcessingItem]], modifier[protected], parameter[inputStream, scheme]] begin[{]
local_variable[type[SamzaSystemStream], stream]
THIS[member[None.inputStreams]call[None.add, parameter[member[.stream]]]]
retur... | annotation[@] identifier[Override] Keyword[protected] identifier[ProcessingItem] identifier[addInputStream] operator[SEP] identifier[Stream] identifier[inputStream] , identifier[PartitioningScheme] identifier[scheme] operator[SEP] {
identifier[SamzaSystemStream] identifier[stream] operator[=] operator[SEP] oper... |
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case AfplibPackage.EMO__OVLY_NAME:
return OVLY_NAME_EDEFAULT == null ? ovlyName != null : !OVLY_NAME_EDEFAULT.equals(ovlyName);
case AfplibPackage.EMO__TRIPLETS:
return triplets != null && !triplets.isEmpty();
}
return super.eIsS... | class class_name[name] begin[{]
method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=EMO__OVLY_NAME, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], stateme... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[EMO__OVLY_NAME] o... |
public ApiResponse<ApiSuccessResponse> updateNicknameWithHttpInfo(String id, UpdateNicknameData updateNicknameData) throws ApiException {
com.squareup.okhttp.Call call = updateNicknameValidateBeforeCall(id, updateNicknameData, null, null);
Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.... | class class_name[name] begin[{]
method[updateNicknameWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[id, updateNicknameData]] begin[{]
local_variable[type[com], call]
local_variable[type[Type], localVarReturnType]
return[call[apiClient.execute, parameter[member... | Keyword[public] identifier[ApiResponse] operator[<] identifier[ApiSuccessResponse] operator[>] identifier[updateNicknameWithHttpInfo] operator[SEP] identifier[String] identifier[id] , identifier[UpdateNicknameData] identifier[updateNicknameData] operator[SEP] Keyword[throws] identifier[ApiException] {
identifie... |
protected void handleInstalledSREsButtonSelected() {
PreferencesUtil.createPreferenceDialogOn(
getControl().getShell(),
SREsPreferencePage.ID,
new String[] {SREsPreferencePage.ID},
null).open();
} | class class_name[name] begin[{]
method[handleInstalledSREsButtonSelected, return_type[void], modifier[protected], parameter[]] begin[{]
call[PreferencesUtil.createPreferenceDialogOn, parameter[call[.getControl, parameter[]], member[SREsPreferencePage.ID], ArrayCreator(dimensions=[None], initial... | Keyword[protected] Keyword[void] identifier[handleInstalledSREsButtonSelected] operator[SEP] operator[SEP] {
identifier[PreferencesUtil] operator[SEP] identifier[createPreferenceDialogOn] operator[SEP] identifier[getControl] operator[SEP] operator[SEP] operator[SEP] identifier[getShell] operator[SEP] operator[SE... |
public String []list() throws IOException
{
try {
String []list = getFile().list();
if (list != null)
return list;
} catch (AccessControlException e) {
log.finer(e.toString());
}
return new String[0];
} | class class_name[name] begin[{]
method[list, return_type[type[String]], modifier[public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getFile, postfix_operators=[], pr... | Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[list] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
identifier[String] operator[SEP] operator[SEP] identifier[list] operator[=] identifier[getFile] operator[SEP] operator[SEP] operator[SEP]... |
private void menuEditMenuSelected(javax.swing.event.MenuEvent evt) {//GEN-FIRST:event_menuEditMenuSelected
final TabTitle title = this.getFocusedTab();
updateMenuItemsForProvider(title == null ? null : title.getProvider());
this.menuEditShowTreeContextMenu.setEnabled(this.explorerTree.hasSelectedItem());
... | class class_name[name] begin[{]
method[menuEditMenuSelected, return_type[void], modifier[private], parameter[evt]] begin[{]
local_variable[type[TabTitle], title]
call[.updateMenuItemsForProvider, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=title... | Keyword[private] Keyword[void] identifier[menuEditMenuSelected] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[event] operator[SEP] identifier[MenuEvent] identifier[evt] operator[SEP] {
Keyword[final] identifier[TabTitle] identifier[title] operator[=] Keyword[this] opera... |
@Route(method = HttpMethod.POST, uri = "/json/hello2")
public Result helloWithBody(@NotNull @Body JsonNode json) {
String name = json.findPath("name").textValue();
if (name == null) {
return badRequest("Missing parameter [name]");
} else {
return ok("Hello " + name);
... | class class_name[name] begin[{]
method[helloWithBody, return_type[type[Result]], modifier[public], parameter[json]] begin[{]
local_variable[type[String], name]
if[binary_operation[member[.name], ==, literal[null]]] begin[{]
return[call[.badRequest, parameter[literal["Missing... | annotation[@] identifier[Route] operator[SEP] identifier[method] operator[=] identifier[HttpMethod] operator[SEP] identifier[POST] , identifier[uri] operator[=] literal[String] operator[SEP] Keyword[public] identifier[Result] identifier[helloWithBody] operator[SEP] annotation[@] identifier[NotNull] annotation[@] ident... |
public static WaveletDescription<WlCoef_F32> biorthogonal_F32( int J ,
BorderType borderType ) {
if( J != 5 ) {
throw new IllegalArgumentException("Only 5 is currently supported");
}
WlCoef_F32 forward = new WlCoef_F32();
forward.offsetScaling = -2;
forward.offsetWavelet = 0;
forwar... | class class_name[name] begin[{]
method[biorthogonal_F32, return_type[type[WaveletDescription]], modifier[public static], parameter[J, borderType]] begin[{]
if[binary_operation[member[.J], !=, literal[5]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_ope... | Keyword[public] Keyword[static] identifier[WaveletDescription] operator[<] identifier[WlCoef_F32] operator[>] identifier[biorthogonal_F32] operator[SEP] Keyword[int] identifier[J] , identifier[BorderType] identifier[borderType] operator[SEP] {
Keyword[if] operator[SEP] identifier[J] operator[!=] Other[5] operat... |
void initialSearch() {
CmsRpcAction<CmsGallerySearchBean> searchAction = new CmsRpcAction<CmsGallerySearchBean>() {
@Override
public void execute() {
start(0, true);
m_dialogBean.setTreeToken(getTreeToken());
getGalleryService().getSearc... | class class_name[name] begin[{]
method[initialSearch, return_type[void], modifier[default], parameter[]] begin[{]
local_variable[type[CmsRpcAction], searchAction]
call[searchAction.execute, parameter[]]
end[}]
END[}] | Keyword[void] identifier[initialSearch] operator[SEP] operator[SEP] {
identifier[CmsRpcAction] operator[<] identifier[CmsGallerySearchBean] operator[>] identifier[searchAction] operator[=] Keyword[new] identifier[CmsRpcAction] operator[<] identifier[CmsGallerySearchBean] operator[>] operator[SEP] operator[SEP] ... |
public ItemRequest<Team> addUser(String team) {
String path = String.format("/teams/%s/addUser", team);
return new ItemRequest<Team>(this, Team.class, path, "POST");
} | class class_name[name] begin[{]
method[addUser, return_type[type[ItemRequest]], modifier[public], parameter[team]] begin[{]
local_variable[type[String], path]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassReference(postfix_ope... | Keyword[public] identifier[ItemRequest] operator[<] identifier[Team] operator[>] identifier[addUser] operator[SEP] identifier[String] identifier[team] operator[SEP] {
identifier[String] identifier[path] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[te... |
public void setAlphaIsShape(boolean v) {
put(PdfName.AIS, v ? PdfBoolean.PDFTRUE : PdfBoolean.PDFFALSE);
} | class class_name[name] begin[{]
method[setAlphaIsShape, return_type[void], modifier[public], parameter[v]] begin[{]
call[.put, parameter[member[PdfName.AIS], TernaryExpression(condition=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Memb... | Keyword[public] Keyword[void] identifier[setAlphaIsShape] operator[SEP] Keyword[boolean] identifier[v] operator[SEP] {
identifier[put] operator[SEP] identifier[PdfName] operator[SEP] identifier[AIS] , identifier[v] operator[?] identifier[PdfBoolean] operator[SEP] identifier[PDFTRUE] operator[:] identifier[PdfB... |
private void handleResponse(@NonNull Uri uri) {
if (AuthUtils.isAuthorizationCodePresent(uri)) {
onCodeReceived(uri);
} else {
handleAccessTokenResponse(uri);
}
} | class class_name[name] begin[{]
method[handleResponse, return_type[void], modifier[private], parameter[uri]] begin[{]
if[call[AuthUtils.isAuthorizationCodePresent, parameter[member[.uri]]]] begin[{]
call[.onCodeReceived, parameter[member[.uri]]]
else begin[{]
... | Keyword[private] Keyword[void] identifier[handleResponse] operator[SEP] annotation[@] identifier[NonNull] identifier[Uri] identifier[uri] operator[SEP] {
Keyword[if] operator[SEP] identifier[AuthUtils] operator[SEP] identifier[isAuthorizationCodePresent] operator[SEP] identifier[uri] operator[SEP] operator[SEP] ... |
public static SketchMetadata create(SketchHex hex, Date timestamp) {
int hexSize = hex.bytes().length;
String hexName = hex.sketchName();
CRC32 crc = new CRC32();
crc.update(hex.bytes());
int hexCrc = (int) crc.getValue();
return SketchMetadata.create(hexSize, hexCrc, t... | class class_name[name] begin[{]
method[create, return_type[type[SketchMetadata]], modifier[public static], parameter[hex, timestamp]] begin[{]
local_variable[type[int], hexSize]
local_variable[type[String], hexName]
local_variable[type[CRC32], crc]
call[crc.update, param... | Keyword[public] Keyword[static] identifier[SketchMetadata] identifier[create] operator[SEP] identifier[SketchHex] identifier[hex] , identifier[Date] identifier[timestamp] operator[SEP] {
Keyword[int] identifier[hexSize] operator[=] identifier[hex] operator[SEP] identifier[bytes] operator[SEP] operator[SEP] oper... |
public static IsLessThan isLessThan(ComparableExpression<Number> left, ComparableExpression<Number> right) {
return new IsLessThan(left, right);
} | class class_name[name] begin[{]
method[isLessThan, return_type[type[IsLessThan]], modifier[public static], parameter[left, right]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=right, pos... | Keyword[public] Keyword[static] identifier[IsLessThan] identifier[isLessThan] operator[SEP] identifier[ComparableExpression] operator[<] identifier[Number] operator[>] identifier[left] , identifier[ComparableExpression] operator[<] identifier[Number] operator[>] identifier[right] operator[SEP] {
Keyword[return]... |
public static DataSource initializeTxCustom(DataSource dataSource, TransactionManager txManager, UserTransaction userTx) {
TransactionElf.setTransactionManager(txManager);
TransactionElf.setUserTransaction(userTx);
return initializeTxNone(dataSource);
} | class class_name[name] begin[{]
method[initializeTxCustom, return_type[type[DataSource]], modifier[public static], parameter[dataSource, txManager, userTx]] begin[{]
call[TransactionElf.setTransactionManager, parameter[member[.txManager]]]
call[TransactionElf.setUserTransaction,... | Keyword[public] Keyword[static] identifier[DataSource] identifier[initializeTxCustom] operator[SEP] identifier[DataSource] identifier[dataSource] , identifier[TransactionManager] identifier[txManager] , identifier[UserTransaction] identifier[userTx] operator[SEP] {
identifier[TransactionElf] operator[SEP] iden... |
@Override
public void sortIt(Comparator comp) {
if (getDimension() > 1) throw new PageRuntimeException("only 1 dimensional arrays can be sorted");
Collections.sort(list, comp);
} | class class_name[name] begin[{]
method[sortIt, return_type[void], modifier[public], parameter[comp]] begin[{]
if[binary_operation[call[.getDimension, parameter[]], >, literal[1]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], quali... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[sortIt] operator[SEP] identifier[Comparator] identifier[comp] operator[SEP] {
Keyword[if] operator[SEP] identifier[getDimension] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] Keyword[throw] Keyword[new] identifier[PageRu... |
public static HashFunction concatenating(Iterable<HashFunction> hashFunctions) {
checkNotNull(hashFunctions);
// We can't use Iterables.toArray() here because there's no hash->collect dependency
List<HashFunction> list = new ArrayList<HashFunction>();
for (HashFunction hashFunction : hashFunctions) {
... | class class_name[name] begin[{]
method[concatenating, return_type[type[HashFunction]], modifier[public static], parameter[hashFunctions]] begin[{]
call[.checkNotNull, parameter[member[.hashFunctions]]]
local_variable[type[List], list]
ForStatement(body=BlockStatement(label=None,... | Keyword[public] Keyword[static] identifier[HashFunction] identifier[concatenating] operator[SEP] identifier[Iterable] operator[<] identifier[HashFunction] operator[>] identifier[hashFunctions] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[hashFunctions] operator[SEP] operator[SEP] identifier[... |
public static void updateActorPosition(final Actor actor, final Vector2 newScreenSizeInStageCoords) {
if (actor != null) {
updateActorPosition(actor, actor.getStage(), newScreenSizeInStageCoords);
}
} | class class_name[name] begin[{]
method[updateActorPosition, return_type[void], modifier[public static], parameter[actor, newScreenSizeInStageCoords]] begin[{]
if[binary_operation[member[.actor], !=, literal[null]]] begin[{]
call[.updateActorPosition, parameter[member[.ac... | Keyword[public] Keyword[static] Keyword[void] identifier[updateActorPosition] operator[SEP] Keyword[final] identifier[Actor] identifier[actor] , Keyword[final] identifier[Vector2] identifier[newScreenSizeInStageCoords] operator[SEP] {
Keyword[if] operator[SEP] identifier[actor] operator[!=] Other[null] operator... |
public static boolean isAssignableFrom(Type from, Class<?> to) {
return TypeVisitor.of(from, b -> b
.onClass(to::isAssignableFrom)
.onParameterizedType(pt -> TypeVisitor.of(pt.getRawType(), bb -> bb
.onClass(to::isAssignableFrom)
.result()))
.onTypeVariable(tv -... | class class_name[name] begin[{]
method[isAssignableFrom, return_type[type[boolean]], modifier[public static], parameter[from, to]] begin[{]
return[call[TypeVisitor.of, parameter[member[.from], LambdaExpression(body=MethodInvocation(arguments=[MethodReference(expression=MemberReference(member=to, postfi... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isAssignableFrom] operator[SEP] identifier[Type] identifier[from] , identifier[Class] operator[<] operator[?] operator[>] identifier[to] operator[SEP] {
Keyword[return] identifier[TypeVisitor] operator[SEP] identifier[of] operator[SEP] identifier[from]... |
public static Jscode2sessionResult jscode2session(String appid,String secret,String js_code){
HttpUriRequest httpUriRequest = RequestBuilder.get()
.setUri(BASE_URI + "/sns/jscode2session")
.addParameter("appid",appid)
.addParameter("secret",secret)
.addParameter("js_code",js_code)
.addParameter("grant_... | class class_name[name] begin[{]
method[jscode2session, return_type[type[Jscode2sessionResult]], modifier[public static], parameter[appid, secret, js_code]] begin[{]
local_variable[type[HttpUriRequest], httpUriRequest]
return[call[LocalHttpClient.executeJsonResult, parameter[member[.httpUriReque... | Keyword[public] Keyword[static] identifier[Jscode2sessionResult] identifier[jscode2session] operator[SEP] identifier[String] identifier[appid] , identifier[String] identifier[secret] , identifier[String] identifier[js_code] operator[SEP] {
identifier[HttpUriRequest] identifier[httpUriRequest] operator[=] ident... |
public XSS html(final HtmlEscapeType type, final HtmlEscapeLevel level) {
this.htmllevel = requireNonNull(level, "Level required.");
this.htmltype = requireNonNull(type, "Type required.");
return this;
} | class class_name[name] begin[{]
method[html, return_type[type[XSS]], modifier[public], parameter[type, level]] begin[{]
assign[THIS[member[None.htmllevel]], call[.requireNonNull, parameter[member[.level], literal["Level required."]]]]
assign[THIS[member[None.htmltype]], call[.re... | Keyword[public] identifier[XSS] identifier[html] operator[SEP] Keyword[final] identifier[HtmlEscapeType] identifier[type] , Keyword[final] identifier[HtmlEscapeLevel] identifier[level] operator[SEP] {
Keyword[this] operator[SEP] identifier[htmllevel] operator[=] identifier[requireNonNull] operator[SEP] identifi... |
@ObjectiveCName("sendMessageWithMentionsDetect:withText:withMarkdownText:")
public void sendMessageWithMentionsDetect(@NotNull Peer peer, @NotNull String text, @NotNull String markdownText) {
sendMessage(peer, text, markdownText, null, true);
} | class class_name[name] begin[{]
method[sendMessageWithMentionsDetect, return_type[void], modifier[public], parameter[peer, text, markdownText]] begin[{]
call[.sendMessage, parameter[member[.peer], member[.text], member[.markdownText], literal[null], literal[true]]]
end[}]
END[}] | annotation[@] identifier[ObjectiveCName] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[sendMessageWithMentionsDetect] operator[SEP] annotation[@] identifier[NotNull] identifier[Peer] identifier[peer] , annotation[@] identifier[NotNull] identifier[String] identifier[text] , annot... |
public static CommerceAddressRestriction[] findByC_C_PrevAndNext(
long commerceAddressRestrictionId, long classNameId, long classPK,
OrderByComparator<CommerceAddressRestriction> orderByComparator)
throws com.liferay.commerce.exception.NoSuchAddressRestrictionException {
return getPersistence()
.findByC_... | class class_name[name] begin[{]
method[findByC_C_PrevAndNext, return_type[type[CommerceAddressRestriction]], modifier[public static], parameter[commerceAddressRestrictionId, classNameId, classPK, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CommerceAddressRestriction] operator[SEP] operator[SEP] identifier[findByC_C_PrevAndNext] operator[SEP] Keyword[long] identifier[commerceAddressRestrictionId] , Keyword[long] identifier[classNameId] , Keyword[long] identifier[classPK] , identifier[OrderByComparator] operato... |
public Future<Notice> send(Notice notice) {
notice = this.filterNotice(notice);
CompletableFuture<Notice> future = this.asyncSender.send(notice);
final Notice finalNotice = notice;
future.whenComplete(
(value, exception) -> {
this.applyHooks(finalNotice);
});
return futur... | class class_name[name] begin[{]
method[send, return_type[type[Future]], modifier[public], parameter[notice]] begin[{]
assign[member[.notice], THIS[call[None.filterNotice, parameter[member[.notice]]]]]
local_variable[type[CompletableFuture], future]
local_variable[type[Notice], f... | Keyword[public] identifier[Future] operator[<] identifier[Notice] operator[>] identifier[send] operator[SEP] identifier[Notice] identifier[notice] operator[SEP] {
identifier[notice] operator[=] Keyword[this] operator[SEP] identifier[filterNotice] operator[SEP] identifier[notice] operator[SEP] operator[SEP] ident... |
private void readFileHeader()
{
if (tc.isEntryEnabled())
Tr.entry(tc, "readFileHeader", this);
// Reset the current header information. Once reset has executed, the header
// is marked as invalid and will only become valid again once a correctly
// formatted header has ... | class class_name[name] begin[{]
method[readFileHeader, return_type[void], modifier[private], parameter[]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[Tr.entry, parameter[member[.tc], literal["readFileHeader"], THIS[]]]
else begin[{]
None
end[}]
... | Keyword[private] Keyword[void] identifier[readFileHeader] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Key... |
@Override
public TaskInstance findTaskByWorkItemId(Long workItemId) {
if( config.isRest() ) {
Map<String, Object> valuesMap = new HashMap<String, Object>();
valuesMap.put(WORK_ITEM_ID, workItemId);
return makeHttpGetRequestAndCreateCustomResponse(
bui... | class class_name[name] begin[{]
method[findTaskByWorkItemId, return_type[type[TaskInstance]], modifier[public], parameter[workItemId]] begin[{]
if[call[config.isRest, parameter[]]] begin[{]
local_variable[type[Map], valuesMap]
call[valuesMap.put, parameter[me... | annotation[@] identifier[Override] Keyword[public] identifier[TaskInstance] identifier[findTaskByWorkItemId] operator[SEP] identifier[Long] identifier[workItemId] operator[SEP] {
Keyword[if] operator[SEP] identifier[config] operator[SEP] identifier[isRest] operator[SEP] operator[SEP] operator[SEP] {
i... |
public static String dsnLookup() {
String dsn = Lookup.lookup("dsn");
if (Util.isNullOrEmpty(dsn)) {
// check if the user accidentally set "dns" instead of "dsn"
dsn = Lookup.lookup("dns");
}
if (Util.isNullOrEmpty(dsn)) {
logger.warn("*** Couldn't f... | class class_name[name] begin[{]
method[dsnLookup, return_type[type[String]], modifier[public static], parameter[]] begin[{]
local_variable[type[String], dsn]
if[call[Util.isNullOrEmpty, parameter[member[.dsn]]]] begin[{]
assign[member[.dsn], call[Lookup.lookup, p... | Keyword[public] Keyword[static] identifier[String] identifier[dsnLookup] operator[SEP] operator[SEP] {
identifier[String] identifier[dsn] operator[=] identifier[Lookup] operator[SEP] identifier[lookup] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Util] operator[S... |
public ResourceImpl getReference(String name) {
ReferenceModel reference = resourceModel.getReference(name);
if (reference == null) {
throw new IllegalArgumentException("No reference named " + name);
}
if (reference.isMultiValued()) {
throw new IllegalArgumentExc... | class class_name[name] begin[{]
method[getReference, return_type[type[ResourceImpl]], modifier[public], parameter[name]] begin[{]
local_variable[type[ReferenceModel], reference]
if[binary_operation[member[.reference], ==, literal[null]]] begin[{]
ThrowStatement(expression=Cl... | Keyword[public] identifier[ResourceImpl] identifier[getReference] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[ReferenceModel] identifier[reference] operator[=] identifier[resourceModel] operator[SEP] identifier[getReference] operator[SEP] identifier[name] operator[SEP] operator[S... |
public static int indexOfIgnoreCase(String text, String str, int startIndex) {
Matcher m = Pattern.compile(Pattern.quote(str), Pattern.CASE_INSENSITIVE).matcher(text);
return m.find(startIndex) ? m.start() : -1;
} | class class_name[name] begin[{]
method[indexOfIgnoreCase, return_type[type[int]], modifier[public static], parameter[text, str, startIndex]] begin[{]
local_variable[type[Matcher], m]
return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=startIndex, postfix_operat... | Keyword[public] Keyword[static] Keyword[int] identifier[indexOfIgnoreCase] operator[SEP] identifier[String] identifier[text] , identifier[String] identifier[str] , Keyword[int] identifier[startIndex] operator[SEP] {
identifier[Matcher] identifier[m] operator[=] identifier[Pattern] operator[SEP] identifier[comp... |
public void setValue(Vector3f scale) {
mX = scale.x;
mY = scale.y;
mZ = scale.z;
} | class class_name[name] begin[{]
method[setValue, return_type[void], modifier[public], parameter[scale]] begin[{]
assign[member[.mX], member[scale.x]]
assign[member[.mY], member[scale.y]]
assign[member[.mZ], member[scale.z]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setValue] operator[SEP] identifier[Vector3f] identifier[scale] operator[SEP] {
identifier[mX] operator[=] identifier[scale] operator[SEP] identifier[x] operator[SEP] identifier[mY] operator[=] identifier[scale] operator[SEP] identifier[y] operator[SEP] identifier[mZ] oper... |
public static synchronized <T> void fromExcel(final InputStream inputStream,
final PoijiExcelType excelType,
final Class<T> type,
final PoijiOptions options,
... | class class_name[name] begin[{]
method[fromExcel, return_type[void], modifier[synchronized public static], parameter[inputStream, excelType, type, options, consumer]] begin[{]
call[Objects.requireNonNull, parameter[member[.excelType]]]
local_variable[type[Unmarshaller], unmarshaller]
... | Keyword[public] Keyword[static] Keyword[synchronized] operator[<] identifier[T] operator[>] Keyword[void] identifier[fromExcel] operator[SEP] Keyword[final] identifier[InputStream] identifier[inputStream] , Keyword[final] identifier[PoijiExcelType] identifier[excelType] , Keyword[final] identifier[Class] operator[<] ... |
public boolean areDimensionsRightAligned(int[] otherDims) {
for (int i = 1; i < otherDims.length + 1; i++) {
if (otherDims[otherDims.length - i] != dimensions[dimensions.length - i]) {
return false;
}
}
return true;
} | class class_name[name] begin[{]
method[areDimensionsRightAligned, return_type[type[boolean]], modifier[public], parameter[otherDims]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=otherDims, postfix_operators=[], ... | Keyword[public] Keyword[boolean] identifier[areDimensionsRightAligned] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[otherDims] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[otherDims] operator[SEP... |
public synchronized void clear()
{
lruHead.nextLinked = lruHead.prevLinked = lruHead;
Entry tab[] = table;
for (int i = 0; i < tab.length; ++i)
tab[i] = null;
size = 0;
} | class class_name[name] begin[{]
method[clear, return_type[void], modifier[synchronized public], parameter[]] begin[{]
assign[member[lruHead.nextLinked], assign[member[lruHead.prevLinked], member[.lruHead]]]
local_variable[type[Entry], tab]
ForStatement(body=StatementExpression(e... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[clear] operator[SEP] operator[SEP] {
identifier[lruHead] operator[SEP] identifier[nextLinked] operator[=] identifier[lruHead] operator[SEP] identifier[prevLinked] operator[=] identifier[lruHead] operator[SEP] identifier[Entry] identifier[tab] operato... |
private String rawAttributeText(XMLStreamReader reader, String attributeName, String defaultValue) {
return reader.getAttributeValue("", attributeName) == null
? defaultValue :
reader.getAttributeValue("", attributeName).trim();
} | class class_name[name] begin[{]
method[rawAttributeText, return_type[type[String]], modifier[private], parameter[reader, attributeName, defaultValue]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qual... | Keyword[private] identifier[String] identifier[rawAttributeText] operator[SEP] identifier[XMLStreamReader] identifier[reader] , identifier[String] identifier[attributeName] , identifier[String] identifier[defaultValue] operator[SEP] {
Keyword[return] identifier[reader] operator[SEP] identifier[getAttributeValu... |
public void delete(final String aBucket, final String aKey, final Handler<HttpClientResponse> aHandler) {
createDeleteRequest(aBucket, aKey, aHandler).end();
} | class class_name[name] begin[{]
method[delete, return_type[void], modifier[public], parameter[aBucket, aKey, aHandler]] begin[{]
call[.createDeleteRequest, parameter[member[.aBucket], member[.aKey], member[.aHandler]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[delete] operator[SEP] Keyword[final] identifier[String] identifier[aBucket] , Keyword[final] identifier[String] identifier[aKey] , Keyword[final] identifier[Handler] operator[<] identifier[HttpClientResponse] operator[>] identifier[aHandler] operator[SEP] {
identifier[c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.