code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void forEach(final Function<T, Void> function)
{
for ( final ListenerEntry<T> entry : listeners.values() )
{
entry.executor.execute
(
new Runnable()
{
@Override
public void run()
... | class class_name[name] begin[{]
method[forEach, return_type[void], modifier[public], parameter[function]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotati... | Keyword[public] Keyword[void] identifier[forEach] operator[SEP] Keyword[final] identifier[Function] operator[<] identifier[T] , identifier[Void] operator[>] identifier[function] operator[SEP] {
Keyword[for] operator[SEP] Keyword[final] identifier[ListenerEntry] operator[<] identifier[T] operator[>] identifier[e... |
public EClass getIfcDistributionElementType() {
if (ifcDistributionElementTypeEClass == null) {
ifcDistributionElementTypeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(162);
}
return ifcDistributionElementTypeEClass;
} | class class_name[name] begin[{]
method[getIfcDistributionElementType, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcDistributionElementTypeEClass], ==, literal[null]]] begin[{]
assign[member[.ifcDistributionElementTypeE... | Keyword[public] identifier[EClass] identifier[getIfcDistributionElementType] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcDistributionElementTypeEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcDistributionElementTypeEClass] operator[=] operator[SEP] identifier[E... |
@NotNull
public final String marshal(@NotNull final SerializerRegistry registry,
@NotNull final CommonEvent commonEvent) {
Contract.requireArgNotNull("registry", registry);
Contract.requireArgNotNull("commonEvent", commonEvent);
final Serializer serializer = registry.ge... | class class_name[name] begin[{]
method[marshal, return_type[type[String]], modifier[final public], parameter[registry, commonEvent]] begin[{]
call[Contract.requireArgNotNull, parameter[literal["registry"], member[.registry]]]
call[Contract.requireArgNotNull, parameter[literal["c... | annotation[@] identifier[NotNull] Keyword[public] Keyword[final] identifier[String] identifier[marshal] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[SerializerRegistry] identifier[registry] , annotation[@] identifier[NotNull] Keyword[final] identifier[CommonEvent] identifier[commonEvent] o... |
public Observable<Page<QuotaInner>> listAsync(final String location) {
return listWithServiceResponseAsync(location)
.map(new Func1<ServiceResponse<Page<QuotaInner>>, Page<QuotaInner>>() {
@Override
public Page<QuotaInner> call(ServiceResponse<Page<QuotaInner>> respon... | class class_name[name] begin[{]
method[listAsync, return_type[type[Observable]], modifier[public], parameter[location]] begin[{]
return[call[.listWithServiceResponseAsync, parameter[member[.location]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[QuotaInner] operator[>] operator[>] identifier[listAsync] operator[SEP] Keyword[final] identifier[String] identifier[location] operator[SEP] {
Keyword[return] identifier[listWithServiceResponseAsync] operator[SEP] identifi... |
public void img(Object base, String localName) throws SAXException {
output.write(
"<IMG src='"+res(base,localName)+"'>");
} | class class_name[name] begin[{]
method[img, return_type[void], modifier[public], parameter[base, localName]] begin[{]
call[output.write, parameter[binary_operation[binary_operation[literal["<IMG src='"], +, call[.res, parameter[member[.base], member[.localName]]]], +, literal["'>"]]]]
end[}... | Keyword[public] Keyword[void] identifier[img] operator[SEP] identifier[Object] identifier[base] , identifier[String] identifier[localName] operator[SEP] Keyword[throws] identifier[SAXException] {
identifier[output] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[res] operato... |
public DistributedVirtualSwitchProductSpec[] queryAvailableDvsSpec(Boolean recommended) throws RuntimeFault, RemoteException {
return getVimService().queryAvailableDvsSpec(getMOR(), recommended);
} | class class_name[name] begin[{]
method[queryAvailableDvsSpec, return_type[type[DistributedVirtualSwitchProductSpec]], modifier[public], parameter[recommended]] begin[{]
return[call[.getVimService, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[DistributedVirtualSwitchProductSpec] operator[SEP] operator[SEP] identifier[queryAvailableDvsSpec] operator[SEP] identifier[Boolean] identifier[recommended] operator[SEP] Keyword[throws] identifier[RuntimeFault] , identifier[RemoteException] {
Keyword[return] identifier[getVimService]... |
public static void multAddOuter( double alpha , DMatrix6x6 A , double beta , DMatrix6 u , DMatrix6 v , DMatrix6x6 C ) {
C.a11 = alpha*A.a11 + beta*u.a1*v.a1;
C.a12 = alpha*A.a12 + beta*u.a1*v.a2;
C.a13 = alpha*A.a13 + beta*u.a1*v.a3;
C.a14 = alpha*A.a14 + beta*u.a1*v.a4;
C.a15 = ... | class class_name[name] begin[{]
method[multAddOuter, return_type[void], modifier[public static], parameter[alpha, A, beta, u, v, C]] begin[{]
assign[member[C.a11], binary_operation[binary_operation[member[.alpha], *, member[A.a11]], +, binary_operation[binary_operation[member[.beta], *, member[... | Keyword[public] Keyword[static] Keyword[void] identifier[multAddOuter] operator[SEP] Keyword[double] identifier[alpha] , identifier[DMatrix6x6] identifier[A] , Keyword[double] identifier[beta] , identifier[DMatrix6] identifier[u] , identifier[DMatrix6] identifier[v] , identifier[DMatrix6x6] identifier[C] operator[... |
public static CharArraySequence from(final char[] value, final int offset, final int len) {
final char[] buffer = new char[value.length];
System.arraycopy(value, offset, buffer, 0, len);
return new CharArraySequence(buffer);
} | class class_name[name] begin[{]
method[from, return_type[type[CharArraySequence]], modifier[public static], parameter[value, offset, len]] begin[{]
local_variable[type[char], buffer]
call[System.arraycopy, parameter[member[.value], member[.offset], member[.buffer], literal[0], member[.l... | Keyword[public] Keyword[static] identifier[CharArraySequence] identifier[from] operator[SEP] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[value] , Keyword[final] Keyword[int] identifier[offset] , Keyword[final] Keyword[int] identifier[len] operator[SEP] {
Keyword[final] Keyword[char] ope... |
private static final Function<ParameterPair, Double> buildDefaultDistanceFunction() {
return new Function<ParameterPair, Double>() {
@Override
public Double apply(ParameterPair pair) {
if (pair.formal().isNullLiteral() || pair.actual().isNullLiteral()) {
return 0.0;
}
... | class class_name[name] begin[{]
method[buildDefaultDistanceFunction, return_type[type[Function]], modifier[final private static], parameter[]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOper... | Keyword[private] Keyword[static] Keyword[final] identifier[Function] operator[<] identifier[ParameterPair] , identifier[Double] operator[>] identifier[buildDefaultDistanceFunction] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[Function] operator[<] identifier[ParameterPair] , identifier... |
public static void escapeUriPathSegment(final char[] text, final int offset, final int len, final Writer writer,
final String encoding)
throws IOException {
if (writer == null) {
throw new IllegalArgumentExce... | class class_name[name] begin[{]
method[escapeUriPathSegment, return_type[void], modifier[public static], parameter[text, offset, len, writer, encoding]] begin[{]
if[binary_operation[member[.writer], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Liter... | Keyword[public] Keyword[static] Keyword[void] identifier[escapeUriPathSegment] operator[SEP] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[text] , Keyword[final] Keyword[int] identifier[offset] , Keyword[final] Keyword[int] identifier[len] , Keyword[final] identifier[Writer] identifier[writer] ... |
public Datatype.Builder removeStandardMethodUnderrides(StandardMethod key) {
Objects.requireNonNull(key);
standardMethodUnderrides.remove(key);
return (Datatype.Builder) this;
} | class class_name[name] begin[{]
method[removeStandardMethodUnderrides, return_type[type[Datatype]], modifier[public], parameter[key]] begin[{]
call[Objects.requireNonNull, parameter[member[.key]]]
call[standardMethodUnderrides.remove, parameter[member[.key]]]
return[Cast... | Keyword[public] identifier[Datatype] operator[SEP] identifier[Builder] identifier[removeStandardMethodUnderrides] operator[SEP] identifier[StandardMethod] identifier[key] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[key] operator[SEP] operator[SEP] identif... |
public static GraphicalModel readFromStream(InputStream stream) throws IOException {
return readFromProto(GraphicalModelProto.GraphicalModel.parseDelimitedFrom(stream));
} | class class_name[name] begin[{]
method[readFromStream, return_type[type[GraphicalModel]], modifier[public static], parameter[stream]] begin[{]
return[call[.readFromProto, parameter[call[GraphicalModelProto.GraphicalModel.parseDelimitedFrom, parameter[member[.stream]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[GraphicalModel] identifier[readFromStream] operator[SEP] identifier[InputStream] identifier[stream] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[readFromProto] operator[SEP] identifier[GraphicalModelProto] operator[SEP] identifier[G... |
public void checkForValue(final double VALUE) {
boolean wasSmaller = Double.compare(checkedValue, VALUE) < 0;
boolean wasBigger = Double.compare(checkedValue, VALUE) > 0;
boolean isBigger = Double.compare(VALUE, checkedValue) > 0;
boolean isSmaller = Double.compare(VALUE, checkedValu... | class class_name[name] begin[{]
method[checkForValue, return_type[void], modifier[public], parameter[VALUE]] begin[{]
local_variable[type[boolean], wasSmaller]
local_variable[type[boolean], wasBigger]
local_variable[type[boolean], isBigger]
local_variable[type[boolean], isSmalle... | Keyword[public] Keyword[void] identifier[checkForValue] operator[SEP] Keyword[final] Keyword[double] identifier[VALUE] operator[SEP] {
Keyword[boolean] identifier[wasSmaller] operator[=] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[checkedValue] , identifier[VALUE] operator[SEP]... |
public void texture(Shape shape, Image image, float scaleX, float scaleY) {
texture(shape, image, scaleX, scaleY, false);
} | class class_name[name] begin[{]
method[texture, return_type[void], modifier[public], parameter[shape, image, scaleX, scaleY]] begin[{]
call[.texture, parameter[member[.shape], member[.image], member[.scaleX], member[.scaleY], literal[false]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[texture] operator[SEP] identifier[Shape] identifier[shape] , identifier[Image] identifier[image] , Keyword[float] identifier[scaleX] , Keyword[float] identifier[scaleY] operator[SEP] {
identifier[texture] operator[SEP] identifier[shape] , identifier[image] , identifi... |
public void remove(Cookie cookie) {
cookie.getHttpCookie().setExpiryDate(new Date(0));
cookieRepresentationCache.remove(cookie.getHttpCookie());
getStore().clearExpired(new Date(1));
} | class class_name[name] begin[{]
method[remove, return_type[void], modifier[public], parameter[cookie]] begin[{]
call[cookie.getHttpCookie, parameter[]]
call[cookieRepresentationCache.remove, parameter[call[cookie.getHttpCookie, parameter[]]]]
call[.getStore, para... | Keyword[public] Keyword[void] identifier[remove] operator[SEP] identifier[Cookie] identifier[cookie] operator[SEP] {
identifier[cookie] operator[SEP] identifier[getHttpCookie] operator[SEP] operator[SEP] operator[SEP] identifier[setExpiryDate] operator[SEP] Keyword[new] identifier[Date] operator[SEP] Other[0] op... |
private void makeAnswerArraysAndTagIndex(Collection<List<IN>> docs) {
if (answerArrays == null) {
answerArrays = new HashSet<List<String>>();
}
if (classIndex == null) {
classIndex = new HashIndex<String>();
}
for (List<IN> doc : docs) {
if (flags.useReverse) {
C... | class class_name[name] begin[{]
method[makeAnswerArraysAndTagIndex, return_type[void], modifier[private], parameter[docs]] begin[{]
if[binary_operation[member[.answerArrays], ==, literal[null]]] begin[{]
assign[member[.answerArrays], ClassCreator(arguments=[], body=None,... | Keyword[private] Keyword[void] identifier[makeAnswerArraysAndTagIndex] operator[SEP] identifier[Collection] operator[<] identifier[List] operator[<] identifier[IN] operator[>] operator[>] identifier[docs] operator[SEP] {
Keyword[if] operator[SEP] identifier[answerArrays] operator[==] Other[null] operator[SEP] {... |
public static <K, V> CounterMap<K, V> parallelCounterMap() {
CounterMap<K, V> totalWords = new CounterMap<>();
return totalWords;
} | class class_name[name] begin[{]
method[parallelCounterMap, return_type[type[CounterMap]], modifier[public static], parameter[]] begin[{]
local_variable[type[CounterMap], totalWords]
return[member[.totalWords]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[CounterMap] operator[<] identifier[K] , identifier[V] operator[>] identifier[parallelCounterMap] operator[SEP] operator[SEP] {
identifier[CounterMap] operator[<] identifier[K] , identifier[V] operator[>] identifie... |
protected void runCommand(String commandName, CommandSession session, String[] params) {
try {
Method method = service.getClass().getMethod(commandName, PrintWriter.class, String[].class);
PrintWriter printWriter = new PrintWriter(session.getConsole());
method.invoke(service,... | class class_name[name] begin[{]
method[runCommand, return_type[void], modifier[protected], parameter[commandName, session, params]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getC... | Keyword[protected] Keyword[void] identifier[runCommand] operator[SEP] identifier[String] identifier[commandName] , identifier[CommandSession] identifier[session] , identifier[String] operator[SEP] operator[SEP] identifier[params] operator[SEP] {
Keyword[try] {
identifier[Method] identifier[method] o... |
public void setThings(java.util.Collection<String> things) {
if (things == null) {
this.things = null;
return;
}
this.things = new java.util.ArrayList<String>(things);
} | class class_name[name] begin[{]
method[setThings, return_type[void], modifier[public], parameter[things]] begin[{]
if[binary_operation[member[.things], ==, literal[null]]] begin[{]
assign[THIS[member[None.things]], literal[null]]
return[None]
else beg... | Keyword[public] Keyword[void] identifier[setThings] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[things] operator[SEP] {
Keyword[if] operator[SEP] identifier[things] operator[==] Other[null] operator[SEP] ... |
public PGPConstant createPGPConstantFromString(EDataType eDataType, String initialValue) {
PGPConstant result = PGPConstant.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
} | class class_name[name] begin[{]
method[createPGPConstantFromString, return_type[type[PGPConstant]], modifier[public], parameter[eDataType, initialValue]] begin[{]
local_variable[type[PGPConstant], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
ThrowStatement(e... | Keyword[public] identifier[PGPConstant] identifier[createPGPConstantFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] {
identifier[PGPConstant] identifier[result] operator[=] identifier[PGPConstant] operator[SEP] identifier[get] ope... |
Call<Map<String, Long>> newBucketedTraceIdCall(
QueryRequest request, TimestampRange timestampRange, int traceIndexFetchSize) {
// trace_by_service_span adds special empty-string span name in order to search by all
String spanName = null != request.spanName() ? request.spanName() : "";
Long minDuration ... | class class_name[name] begin[{]
method[newBucketedTraceIdCall, return_type[type[Call]], modifier[default], parameter[request, timestampRange, traceIndexFetchSize]] begin[{]
local_variable[type[String], spanName]
local_variable[type[Long], minDuration]
local_variable[type[int], startBuck... | identifier[Call] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Long] operator[>] operator[>] identifier[newBucketedTraceIdCall] operator[SEP] identifier[QueryRequest] identifier[request] , identifier[TimestampRange] identifier[timestampRange] , Keyword[int] identifier[traceIndexFetchSize] o... |
public synchronized SSLConfig getSSLConfig(String alias) throws IllegalArgumentException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "getSSLConfig: " + alias);
SSLConfig rc = null;
if (alias == null || alias.equals("")) {
rc = getDefau... | class class_name[name] begin[{]
method[getSSLConfig, return_type[type[SSLConfig]], modifier[synchronized public], parameter[alias]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Tr.entry, ... | Keyword[public] Keyword[synchronized] identifier[SSLConfig] identifier[getSSLConfig] operator[SEP] identifier[String] identifier[alias] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[... |
@Override
public String[] getHeader(boolean firstLineCheck) throws IOException {
final String[] header = super.getHeader(firstLineCheck);
if(beanMappingCache.getOriginal().isValidateHeader()) {
try {
validateHeader(header, beanMappingCache.getHeader());
... | class class_name[name] begin[{]
method[getHeader, return_type[type[String]], modifier[public], parameter[firstLineCheck]] begin[{]
local_variable[type[String], header]
if[call[beanMappingCache.getOriginal, parameter[]]] begin[{]
TryStatement(block=[StatementExpression(expres... | annotation[@] identifier[Override] Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[getHeader] operator[SEP] Keyword[boolean] identifier[firstLineCheck] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[header... |
public double getValueAtAsDouble(final int row, final int col) {
final Object valueAt = getValueAt(row, col);
double number = 0;
if (valueAt != null && !valueAt.toString().equals("")) {
number = Double.parseDouble(valueAt.toString().trim());
}
return number;
} | class class_name[name] begin[{]
method[getValueAtAsDouble, return_type[type[double]], modifier[public], parameter[row, col]] begin[{]
local_variable[type[Object], valueAt]
local_variable[type[double], number]
if[binary_operation[binary_operation[member[.valueAt], !=, literal[nul... | Keyword[public] Keyword[double] identifier[getValueAtAsDouble] operator[SEP] Keyword[final] Keyword[int] identifier[row] , Keyword[final] Keyword[int] identifier[col] operator[SEP] {
Keyword[final] identifier[Object] identifier[valueAt] operator[=] identifier[getValueAt] operator[SEP] identifier[row] , identif... |
public BigInteger unpackBigInteger()
throws IOException
{
byte b = readByte();
if (Code.isFixInt(b)) {
return BigInteger.valueOf((long) b);
}
switch (b) {
case Code.UINT8: // unsigned int 8
byte u8 = readByte();
retu... | class class_name[name] begin[{]
method[unpackBigInteger, return_type[type[BigInteger]], modifier[public], parameter[]] begin[{]
local_variable[type[byte], b]
if[call[Code.isFixInt, parameter[member[.b]]]] begin[{]
return[call[BigInteger.valueOf, parameter[Cast(expression=Mem... | Keyword[public] identifier[BigInteger] identifier[unpackBigInteger] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] identifier[b] operator[=] identifier[readByte] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Code] operator[SEP] identifier[isFi... |
protected void connectAndLogin() throws IOException {
if (!ftpClient.isConnected()) {
ftpClient.connect(getEndpointConfiguration().getHost(), getEndpointConfiguration().getPort());
if (log.isDebugEnabled()) {
log.debug("Connected to FTP server: " + ftpClient.getReplyStri... | class class_name[name] begin[{]
method[connectAndLogin, return_type[void], modifier[protected], parameter[]] begin[{]
if[call[ftpClient.isConnected, parameter[]]] begin[{]
call[ftpClient.connect, parameter[call[.getEndpointConfiguration, parameter[]], call[.getEndpointCo... | Keyword[protected] Keyword[void] identifier[connectAndLogin] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[ftpClient] operator[SEP] identifier[isConnected] operator[SEP] operator[SEP] operator[SEP] {
identifier[ftpClient] operato... |
@NullSafe
@SuppressWarnings("unchecked")
public ProxyFactory<T> adviseWith(MethodInterceptor<T>... methodInterceptors) {
Collections.addAll(this.methodInterceptors, nullSafeArray(methodInterceptors));
return this;
} | class class_name[name] begin[{]
method[adviseWith, return_type[type[ProxyFactory]], modifier[public], parameter[methodInterceptors]] begin[{]
call[Collections.addAll, parameter[THIS[member[None.methodInterceptors]], call[.nullSafeArray, parameter[member[.methodInterceptors]]]]]
return[T... | annotation[@] identifier[NullSafe] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[ProxyFactory] operator[<] identifier[T] operator[>] identifier[adviseWith] operator[SEP] identifier[MethodInterceptor] operator[<] identifier[T] operator[>] operator[...] ... |
@Urlencoded
private void openURL2(String urlString, Command cmd) {
HTTPMethod m;
try (HTTPSession httpclient = HTTPFactory.newSession(urlString)) {
/* you might think this works, but it doesnt:
URI raw = new URI(urlString.trim());
appendLine("raw scheme= " + raw.getScheme() + "\n a... | class class_name[name] begin[{]
method[openURL2, return_type[void], modifier[private], parameter[urlString, cmd]] begin[{]
local_variable[type[HTTPMethod], m]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cmd, postfix_operators=[], prefix_operators=[]... | annotation[@] identifier[Urlencoded] Keyword[private] Keyword[void] identifier[openURL2] operator[SEP] identifier[String] identifier[urlString] , identifier[Command] identifier[cmd] operator[SEP] {
identifier[HTTPMethod] identifier[m] operator[SEP] Keyword[try] operator[SEP] identifier[HTTPSession] identifier[h... |
public static void addRequestDebug(SessionContext ctx, String line) {
List<String> rd = getRequestDebug(ctx);
rd.add(line);
} | class class_name[name] begin[{]
method[addRequestDebug, return_type[void], modifier[public static], parameter[ctx, line]] begin[{]
local_variable[type[List], rd]
call[rd.add, parameter[member[.line]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[addRequestDebug] operator[SEP] identifier[SessionContext] identifier[ctx] , identifier[String] identifier[line] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[rd] operator[=] identifier[getRequestDebug] operator[SEP... |
public static StreamEx<String> split(CharSequence str, String regex) {
if (str.length() == 0)
return of("");
if (regex.isEmpty()) {
return IntStreamEx.ofChars(str).mapToObj(ch -> new String(new char[] { (char) ch }));
}
char ch = regex.charAt(0);
if (regex... | class class_name[name] begin[{]
method[split, return_type[type[StreamEx]], modifier[public static], parameter[str, regex]] begin[{]
if[binary_operation[call[str.length, parameter[]], ==, literal[0]]] begin[{]
return[call[.of, parameter[literal[""]]]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] identifier[StreamEx] operator[<] identifier[String] operator[>] identifier[split] operator[SEP] identifier[CharSequence] identifier[str] , identifier[String] identifier[regex] operator[SEP] {
Keyword[if] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP]... |
private List iterateAndReturnNative(final ResultSet rSet) {
final Iterator<Row> rowIter = rSet.iterator();
final List results = new ArrayList();
final List item = new ArrayList<>();
final boolean isSingle = (rSet.getColumnDefinitions().size() == 1);
while (rowIter.hasNext()) {
... | class class_name[name] begin[{]
method[iterateAndReturnNative, return_type[type[List]], modifier[private], parameter[rSet]] begin[{]
local_variable[type[Iterator], rowIter]
local_variable[type[List], results]
local_variable[type[List], item]
local_variable[type[boolean], isSingl... | Keyword[private] identifier[List] identifier[iterateAndReturnNative] operator[SEP] Keyword[final] identifier[ResultSet] identifier[rSet] operator[SEP] {
Keyword[final] identifier[Iterator] operator[<] identifier[Row] operator[>] identifier[rowIter] operator[=] identifier[rSet] operator[SEP] identifier[iterator] ... |
public static FormatOptions of(int flags, int width, int precision) {
if (!checkFlagConsistency(flags, width != UNSET)) {
throw new IllegalArgumentException("invalid flags: 0x" + Integer.toHexString(flags));
}
if ((width < 1 || width > MAX_ALLOWED_WIDTH) && width != UNSET) {
throw new IllegalArg... | class class_name[name] begin[{]
method[of, return_type[type[FormatOptions]], modifier[public static], parameter[flags, width, precision]] begin[{]
if[call[.checkFlagConsistency, parameter[member[.flags], binary_operation[member[.width], !=, member[.UNSET]]]]] begin[{]
ThrowStatement... | Keyword[public] Keyword[static] identifier[FormatOptions] identifier[of] operator[SEP] Keyword[int] identifier[flags] , Keyword[int] identifier[width] , Keyword[int] identifier[precision] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[checkFlagConsistency] operator[SEP] identifier[flags] , i... |
public synchronized void updateDocumentContent(Long docid, String content) throws SQLException {
if (cache_document==CACHE_OFF) {
edadb.updateDocumentContent(docid, content);
} else if (cache_document==CACHE_ONLY) {
Document docvo = documentCache.get(docid);
if (docvo... | class class_name[name] begin[{]
method[updateDocumentContent, return_type[void], modifier[synchronized public], parameter[docid, content]] begin[{]
if[binary_operation[member[.cache_document], ==, member[.CACHE_OFF]]] begin[{]
call[edadb.updateDocumentContent, parameter[... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[updateDocumentContent] operator[SEP] identifier[Long] identifier[docid] , identifier[String] identifier[content] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[cache_document] operator[==] identifier[CA... |
public ListGroupsResult withGroupIdentifiers(GroupIdentifier... groupIdentifiers) {
if (this.groupIdentifiers == null) {
setGroupIdentifiers(new java.util.ArrayList<GroupIdentifier>(groupIdentifiers.length));
}
for (GroupIdentifier ele : groupIdentifiers) {
this.groupIden... | class class_name[name] begin[{]
method[withGroupIdentifiers, return_type[type[ListGroupsResult]], modifier[public], parameter[groupIdentifiers]] begin[{]
if[binary_operation[THIS[member[None.groupIdentifiers]], ==, literal[null]]] begin[{]
call[.setGroupIdentifiers, para... | Keyword[public] identifier[ListGroupsResult] identifier[withGroupIdentifiers] operator[SEP] identifier[GroupIdentifier] operator[...] identifier[groupIdentifiers] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[groupIdentifiers] operator[==] Other[null] operator[SEP] {
... |
public RedisClusterNode getPartitionByNodeId(String nodeId) {
for (RedisClusterNode partition : nodeReadView) {
if (partition.getNodeId().equals(nodeId)) {
return partition;
}
}
return null;
} | class class_name[name] begin[{]
method[getPartitionByNodeId, return_type[type[RedisClusterNode]], modifier[public], parameter[nodeId]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getNodeId, postfix_operators=[], prefix_op... | Keyword[public] identifier[RedisClusterNode] identifier[getPartitionByNodeId] operator[SEP] identifier[String] identifier[nodeId] operator[SEP] {
Keyword[for] operator[SEP] identifier[RedisClusterNode] identifier[partition] operator[:] identifier[nodeReadView] operator[SEP] {
Keyword[if] operator[SEP... |
private static Optional<AnnotationSpec> getLazyInitAnnotation(Elements elements) {
if (elements.getTypeElement(LAZY_INIT.toString()) == null) {
return Optional.empty();
}
return Optional.of(AnnotationSpec.builder(LAZY_INIT).build());
} | class class_name[name] begin[{]
method[getLazyInitAnnotation, return_type[type[Optional]], modifier[private static], parameter[elements]] begin[{]
if[binary_operation[call[elements.getTypeElement, parameter[call[LAZY_INIT.toString, parameter[]]]], ==, literal[null]]] begin[{]
return... | Keyword[private] Keyword[static] identifier[Optional] operator[<] identifier[AnnotationSpec] operator[>] identifier[getLazyInitAnnotation] operator[SEP] identifier[Elements] identifier[elements] operator[SEP] {
Keyword[if] operator[SEP] identifier[elements] operator[SEP] identifier[getTypeElement] operator[SEP] ... |
private MessageBuffer getNextBuffer()
throws IOException
{
MessageBuffer next = in.next();
if (next == null) {
throw new MessageInsufficientBufferException();
}
assert (buffer != null);
totalReadBytes += buffer.size();
return next;
} | class class_name[name] begin[{]
method[getNextBuffer, return_type[type[MessageBuffer]], modifier[private], parameter[]] begin[{]
local_variable[type[MessageBuffer], next]
if[binary_operation[member[.next], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(a... | Keyword[private] identifier[MessageBuffer] identifier[getNextBuffer] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[MessageBuffer] identifier[next] operator[=] identifier[in] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] ident... |
private static boolean isBinary(InputStream in) {
try {
int size = in.available();
if (size > 1024) size = 1024;
byte[] data = new byte[size];
in.read(data);
in.close();
int ascii = 0;
int other = 0;
for (int i = 0... | class class_name[name] begin[{]
method[isBinary, return_type[type[boolean]], modifier[private static], parameter[in]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=available, postfix... | Keyword[private] Keyword[static] Keyword[boolean] identifier[isBinary] operator[SEP] identifier[InputStream] identifier[in] operator[SEP] {
Keyword[try] {
Keyword[int] identifier[size] operator[=] identifier[in] operator[SEP] identifier[available] operator[SEP] operator[SEP] operator[SEP] Keyword[if] ... |
protected Properties difference(final Map map) {
final Properties difference = new Properties();
for (final Object o : map.entrySet()) {
final Map.Entry entry = (Map.Entry) o;
final String key = (String) entry.getKey();
final String val = (String) entry.getValue();
... | class class_name[name] begin[{]
method[difference, return_type[type[Properties]], modifier[protected], parameter[map]] begin[{]
local_variable[type[Properties], difference]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDec... | Keyword[protected] identifier[Properties] identifier[difference] operator[SEP] Keyword[final] identifier[Map] identifier[map] operator[SEP] {
Keyword[final] identifier[Properties] identifier[difference] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operato... |
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<Empty, OperationMetadata> importDataAsync(
String name, InputConfig inputConfig) {
ImportDataRequest request =
ImportDataRequest.newBuilder().setName(name).setInpu... | class class_name[name] begin[{]
method[importDataAsync, return_type[type[OperationFuture]], modifier[final public], parameter[name, inputConfig]] begin[{]
local_variable[type[ImportDataRequest], request]
return[call[.importDataAsync, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[Empty] , identifier[OperationMetadata] operator[>] identifier[importDataAsync] operator[SEP] identifier[String] identifier[name] , identifier[InputConfig] ide... |
private int writeBytesMultiple(ChannelOutboundBuffer in, IovArray array) throws IOException {
final long expectedWrittenBytes = array.size();
assert expectedWrittenBytes != 0;
final int cnt = array.count();
assert cnt != 0;
final long localWrittenBytes = socket.writevAddresses(a... | class class_name[name] begin[{]
method[writeBytesMultiple, return_type[type[int]], modifier[private], parameter[in, array]] begin[{]
local_variable[type[long], expectedWrittenBytes]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=expectedWrittenBytes, postfix_operators... | Keyword[private] Keyword[int] identifier[writeBytesMultiple] operator[SEP] identifier[ChannelOutboundBuffer] identifier[in] , identifier[IovArray] identifier[array] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] Keyword[long] identifier[expectedWrittenBytes] operator[=] identifier[array]... |
@Override
public boolean canAuthenticate(String resource) {
if (resource == null) {
return false;
}
ClientCredential credential = getCredentialForResource(resource);
return credential != null;
} | class class_name[name] begin[{]
method[canAuthenticate, return_type[type[boolean]], modifier[public], parameter[resource]] begin[{]
if[binary_operation[member[.resource], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_vari... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[canAuthenticate] operator[SEP] identifier[String] identifier[resource] operator[SEP] {
Keyword[if] operator[SEP] identifier[resource] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
... |
public void registerSingleton(String name, Class<?> clazz) throws BeansException {
GenericBeanDefinition bd = new GenericBeanDefinition();
bd.setBeanClass(clazz);
getDefaultListableBeanFactory().registerBeanDefinition(name, bd);
} | class class_name[name] begin[{]
method[registerSingleton, return_type[void], modifier[public], parameter[name, clazz]] begin[{]
local_variable[type[GenericBeanDefinition], bd]
call[bd.setBeanClass, parameter[member[.clazz]]]
call[.getDefaultListableBeanFactory, parameter... | Keyword[public] Keyword[void] identifier[registerSingleton] operator[SEP] identifier[String] identifier[name] , identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] Keyword[throws] identifier[BeansException] {
identifier[GenericBeanDefinition] identifier[bd] operator[=] Keyword[... |
private static Date calculateExpiresAt( JSONObject jsonObj )
{
long expiresAt_s = jsonObj.optLong( OAuth2Credentials.EXPIRES_AT, -1 );
// If nothing specified in json, check if expires_in is present:
// this happens when token is received from oauth server
if ( expiresAt_s < 0 && jso... | class class_name[name] begin[{]
method[calculateExpiresAt, return_type[type[Date]], modifier[private static], parameter[jsonObj]] begin[{]
local_variable[type[long], expiresAt_s]
if[binary_operation[binary_operation[member[.expiresAt_s], <, literal[0]], &&, call[jsonObj.has, parameter[m... | Keyword[private] Keyword[static] identifier[Date] identifier[calculateExpiresAt] operator[SEP] identifier[JSONObject] identifier[jsonObj] operator[SEP] {
Keyword[long] identifier[expiresAt_s] operator[=] identifier[jsonObj] operator[SEP] identifier[optLong] operator[SEP] identifier[OAuth2Credentials] operator[SE... |
@Override
public int insertAt(final int position, @Nullable final CharSequence input, boolean cursorAfterTrailingHardcoded) {
if (slots.isEmpty() || !slots.checkIsIndex(position) || input == null || input.length() == 0) {
return position;
}
showHardcodedTail = true;
int... | class class_name[name] begin[{]
method[insertAt, return_type[type[int]], modifier[public], parameter[position, input, cursorAfterTrailingHardcoded]] begin[{]
if[binary_operation[binary_operation[binary_operation[call[slots.isEmpty, parameter[]], ||, call[slots.checkIsIndex, parameter[member[.po... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[insertAt] operator[SEP] Keyword[final] Keyword[int] identifier[position] , annotation[@] identifier[Nullable] Keyword[final] identifier[CharSequence] identifier[input] , Keyword[boolean] identifier[cursorAfterTrailingHardcoded] operator[SEP] ... |
public OvhOrder order_orderId_debt_pay_POST(Long orderId) throws IOException {
String qPath = "/me/order/{orderId}/debt/pay";
StringBuilder sb = path(qPath, orderId);
String resp = exec(qPath, "POST", sb.toString(), null);
return convertTo(resp, OvhOrder.class);
} | class class_name[name] begin[{]
method[order_orderId_debt_pay_POST, return_type[type[OvhOrder]], modifier[public], parameter[orderId]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], resp]
return[call[.convertTo, ... | Keyword[public] identifier[OvhOrder] identifier[order_orderId_debt_pay_POST] operator[SEP] identifier[Long] identifier[orderId] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[... |
private void checkElementReferences(
final CmsContainerPageElementPanel element,
final AsyncCallback<CmsRemovedElementStatus> callback) {
ReferenceCheckVisitor visitor = new ReferenceCheckVisitor(element);
processPageContent(visitor);
if (visitor.hasReferences()) {
/... | class class_name[name] begin[{]
method[checkElementReferences, return_type[void], modifier[private], parameter[element, callback]] begin[{]
local_variable[type[ReferenceCheckVisitor], visitor]
call[.processPageContent, parameter[member[.visitor]]]
if[call[visitor.hasRefe... | Keyword[private] Keyword[void] identifier[checkElementReferences] operator[SEP] Keyword[final] identifier[CmsContainerPageElementPanel] identifier[element] , Keyword[final] identifier[AsyncCallback] operator[<] identifier[CmsRemovedElementStatus] operator[>] identifier[callback] operator[SEP] {
identifier[Refer... |
public void marshall(AttachStaticIpRequest attachStaticIpRequest, ProtocolMarshaller protocolMarshaller) {
if (attachStaticIpRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(attachStaticIpRe... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[attachStaticIpRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.attachStaticIpRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Lit... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[AttachStaticIpRequest] identifier[attachStaticIpRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[attachStaticIpRequest] operator[==] Other[null] operator[SEP] ... |
public static byte[] getMD5(byte[] src) {
assert src != null;
try {
return MessageDigest.getInstance("MD5").digest(src);
} catch (NoSuchAlgorithmException ex) {
throw new IllegalArgumentException("Missing 'MD5' algorithm", ex);
}
} | class class_name[name] begin[{]
method[getMD5, return_type[type[byte]], modifier[public static], parameter[src]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operato... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[getMD5] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[src] operator[SEP] {
Keyword[assert] identifier[src] operator[!=] Other[null] operator[SEP] Keyword[try] {
Keyword[return] identifier[MessageD... |
static <T> List<T> freeze(List<T> list) {
return list == null ? null : Collections.unmodifiableList(list);
} | class class_name[name] begin[{]
method[freeze, return_type[type[List]], modifier[static], parameter[list]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_ope... | Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[freeze] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[list] operator[SEP] {
Keyword[return] identifier[list] operator[==] Other[null] operator[?] Other[null] o... |
@Override
public void createUser(User user, String password) throws ServiceException {
if(! isStarted){
ServiceDirectoryError error = new ServiceDirectoryError(ErrorCode.SERVICE_DIRECTORY_MANAGER_FACTORY_CLOSED);
throw new ServiceException(error);
}
if(user == null){
... | class class_name[name] begin[{]
method[createUser, return_type[void], modifier[public], parameter[user, password]] begin[{]
if[member[.isStarted]] begin[{]
local_variable[type[ServiceDirectoryError], error]
ThrowStatement(expression=ClassCreator(arguments=[MemberReferenc... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[createUser] operator[SEP] identifier[User] identifier[user] , identifier[String] identifier[password] operator[SEP] Keyword[throws] identifier[ServiceException] {
Keyword[if] operator[SEP] operator[!] identifier[isStarted] operator[SEP]... |
private synchronized void enumerateStringProperties(Hashtable<String, String> h) {
if (defaults != null) {
defaults.enumerateStringProperties(h);
}
for (Enumeration e = keys() ; e.hasMoreElements() ;) {
Object k = e.nextElement();
Object v = get(k);
... | class class_name[name] begin[{]
method[enumerateStringProperties, return_type[void], modifier[synchronized private], parameter[h]] begin[{]
if[binary_operation[member[.defaults], !=, literal[null]]] begin[{]
call[defaults.enumerateStringProperties, parameter[member[.h]]]... | Keyword[private] Keyword[synchronized] Keyword[void] identifier[enumerateStringProperties] operator[SEP] identifier[Hashtable] operator[<] identifier[String] , identifier[String] operator[>] identifier[h] operator[SEP] {
Keyword[if] operator[SEP] identifier[defaults] operator[!=] Other[null] operator[SEP] {
... |
private void removePath( Collection<InternalWorkingMemory> wms, RuleRemovalContext context, Map<Integer, BaseNode> stillInUse, Collection<ObjectSource> alphas, PathEndNode endNode ) {
LeftTupleNode[] nodes = endNode.getPathNodes();
for (int i = endNode.getPositionInPath(); i >= 0; i--) {
Bas... | class class_name[name] begin[{]
method[removePath, return_type[void], modifier[private], parameter[wms, context, stillInUse, alphas, endNode]] begin[{]
local_variable[type[LeftTupleNode], nodes]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], de... | Keyword[private] Keyword[void] identifier[removePath] operator[SEP] identifier[Collection] operator[<] identifier[InternalWorkingMemory] operator[>] identifier[wms] , identifier[RuleRemovalContext] identifier[context] , identifier[Map] operator[<] identifier[Integer] , identifier[BaseNode] operator[>] identifier[sti... |
public int getFrequency(E from, E to)
{
return matrix[from.ordinal()][to.ordinal()];
} | class class_name[name] begin[{]
method[getFrequency, return_type[type[int]], modifier[public], parameter[from, to]] begin[{]
return[member[.matrix]]
end[}]
END[}] | Keyword[public] Keyword[int] identifier[getFrequency] operator[SEP] identifier[E] identifier[from] , identifier[E] identifier[to] operator[SEP] {
Keyword[return] identifier[matrix] operator[SEP] identifier[from] operator[SEP] identifier[ordinal] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier... |
static void constructTotalThroughputGraph(Map.Entry<String, LrProjectScenarioResults> scenarioResults,
JSONObject scenarioGraphData) {
Map<Integer, WholeRunResult> totalThroughputResults = scenarioResults.getValue().getTotalThroughtputResults();
JSONObject t... | class class_name[name] begin[{]
method[constructTotalThroughputGraph, return_type[void], modifier[static], parameter[scenarioResults, scenarioGraphData]] begin[{]
local_variable[type[Map], totalThroughputResults]
local_variable[type[JSONObject], totalThroughputResultsGraphSet]
i... | Keyword[static] Keyword[void] identifier[constructTotalThroughputGraph] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[LrProjectScenarioResults] operator[>] identifier[scenarioResults] , identifier[JSONObject] identifier[scenarioGraphData] operator[SEP] {
... |
public WebAuthenticator getWebAuthenticator(WebRequest webRequest) {
String authMech = webAppSecurityConfig.getOverrideHttpAuthMethod();
if (authMech != null && authMech.equals("CLIENT_CERT")) {
return createCertificateLoginAuthenticator();
}
SecurityMetadata securityMetadata... | class class_name[name] begin[{]
method[getWebAuthenticator, return_type[type[WebAuthenticator]], modifier[public], parameter[webRequest]] begin[{]
local_variable[type[String], authMech]
if[binary_operation[binary_operation[member[.authMech], !=, literal[null]], &&, call[authMech.equals,... | Keyword[public] identifier[WebAuthenticator] identifier[getWebAuthenticator] operator[SEP] identifier[WebRequest] identifier[webRequest] operator[SEP] {
identifier[String] identifier[authMech] operator[=] identifier[webAppSecurityConfig] operator[SEP] identifier[getOverrideHttpAuthMethod] operator[SEP] operator[... |
public static Version fromClasspathProperties(@Nonnull Class<?> clazz, String path, String propertyName, String gitPath, String gitPropertyName, Version defaultVersion) {
try {
final URL resource = getResource(clazz, path);
final Properties versionProperties = new Properties();
... | class class_name[name] begin[{]
method[fromClasspathProperties, return_type[type[Version]], modifier[public static], parameter[clazz, path, propertyName, gitPath, gitPropertyName, defaultVersion]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dime... | Keyword[public] Keyword[static] identifier[Version] identifier[fromClasspathProperties] operator[SEP] annotation[@] identifier[Nonnull] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[path] , identifier[String] identifier[propertyName] , identifier[String] iden... |
public final void mT__127() throws RecognitionException {
try {
int _type = T__127;
int _channel = DEFAULT_TOKEN_CHANNEL;
// BELScript.g:114:8: ( 'hasMembers' )
// BELScript.g:114:10: 'hasMembers'
{
match("hasMembers");
}
... | class class_name[name] begin[{]
method[mT__127, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=T__127, postfix_operators=[], prefix_operators=... | Keyword[public] Keyword[final] Keyword[void] identifier[mT__127] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
Keyword[int] identifier[_type] operator[=] identifier[T__127] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TO... |
public boolean containsChild(final AbstractHtml childTag) {
final Lock lock = sharedObject.getLock(ACCESS_OBJECT).readLock();
try {
lock.lock();
return children.contains(childTag);
} finally {
lock.unlock();
}
} | class class_name[name] begin[{]
method[containsChild, return_type[type[boolean]], modifier[public], parameter[childTag]] begin[{]
local_variable[type[Lock], lock]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operator... | Keyword[public] Keyword[boolean] identifier[containsChild] operator[SEP] Keyword[final] identifier[AbstractHtml] identifier[childTag] operator[SEP] {
Keyword[final] identifier[Lock] identifier[lock] operator[=] identifier[sharedObject] operator[SEP] identifier[getLock] operator[SEP] identifier[ACCESS_OBJECT] ope... |
public static double quantile(double val, double loc, double scale, double shape1, double shape2) {
if(!(val >= 0.) || !(val <= 1.)) {
return Double.NaN;
}
if(val == 0.) {
if(shape2 <= 0.) {
return shape1 < 0. ? loc + scale / shape1 : Double.NEGATIVE_INFINITY;
}
else {
... | class class_name[name] begin[{]
method[quantile, return_type[type[double]], modifier[public static], parameter[val, loc, scale, shape1, shape2]] begin[{]
if[binary_operation[binary_operation[member[.val], >=, literal[0.]], ||, binary_operation[member[.val], <=, literal[1.]]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[double] identifier[quantile] operator[SEP] Keyword[double] identifier[val] , Keyword[double] identifier[loc] , Keyword[double] identifier[scale] , Keyword[double] identifier[shape1] , Keyword[double] identifier[shape2] operator[SEP] {
Keyword[if] operator[SEP] operator... |
static Iterator<MutableLongTuple> wrappingIteratorInternal(
LongTuple bounds, Iterator<? extends MutableLongTuple> delegate)
{
return new Iterator<MutableLongTuple>()
{
@Override
public boolean hasNext()
{
return delegate.hasNext();... | class class_name[name] begin[{]
method[wrappingIteratorInternal, return_type[type[Iterator]], modifier[static], parameter[bounds, delegate]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodI... | Keyword[static] identifier[Iterator] operator[<] identifier[MutableLongTuple] operator[>] identifier[wrappingIteratorInternal] operator[SEP] identifier[LongTuple] identifier[bounds] , identifier[Iterator] operator[<] operator[?] Keyword[extends] identifier[MutableLongTuple] operator[>] identifier[delegate] operator[SE... |
private void onParticipantAdded(ParticipantAddedEvent event) {
handler.post(() -> listener.onParticipantAdded(event));
log("Event published " + event.toString());
} | class class_name[name] begin[{]
method[onParticipantAdded, return_type[void], modifier[private], parameter[event]] begin[{]
call[handler.post, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selecto... | Keyword[private] Keyword[void] identifier[onParticipantAdded] operator[SEP] identifier[ParticipantAddedEvent] identifier[event] operator[SEP] {
identifier[handler] operator[SEP] identifier[post] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[listener] operator[SEP] identifier[onParticipantAdde... |
@SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity",
"checkstyle:nestedifdepth", "checkstyle:parameternumber"})
public IStatus populateInheritanceContext(
TypeFinder typeFinder,
Map<ActionPrototype, IMethod> finalOperations,
Map<ActionPrototype, IMethod> overridableOperations... | class class_name[name] begin[{]
method[populateInheritanceContext, return_type[type[IStatus]], modifier[public], parameter[typeFinder, finalOperations, overridableOperations, inheritedFields, operationsToImplement, superConstructors, superClass, superInterfaces]] begin[{]
local_variable[type[Set], trea... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String] , literal[String] , literal[String]
} operator[SEP] Keyword[public] identifier[IStatus] identifier[populateInheritanceContext] operator[SEP] identifier[TypeFinder] identifier[typeFinder] , identifier[Map] operator... |
private static void setValue(
Object value,
Field field,
Object destination,
GenericXml genericXml,
Map<String, Object> destinationMap,
String name) {
if (field != null) {
FieldInfo.setFieldValue(field, destination, value);
} else if (genericXml != null) {
generic... | class class_name[name] begin[{]
method[setValue, return_type[void], modifier[private static], parameter[value, field, destination, genericXml, destinationMap, name]] begin[{]
if[binary_operation[member[.field], !=, literal[null]]] begin[{]
call[FieldInfo.setFieldValue, p... | Keyword[private] Keyword[static] Keyword[void] identifier[setValue] operator[SEP] identifier[Object] identifier[value] , identifier[Field] identifier[field] , identifier[Object] identifier[destination] , identifier[GenericXml] identifier[genericXml] , identifier[Map] operator[<] identifier[String] , identifier[Obj... |
public Action fromJSON(JSONObject in) throws JSONConverterException {
String id = requiredString(in, ACTION_ID_LABEL);
Action a;
switch (id) {
case "bootVM":
a = bootVMFromJSON(in);
break;
case "shutdownVM":
a = shutdownVMF... | class class_name[name] begin[{]
method[fromJSON, return_type[type[Action]], modifier[public], parameter[in]] begin[{]
local_variable[type[String], id]
local_variable[type[Action], a]
SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qual... | Keyword[public] identifier[Action] identifier[fromJSON] operator[SEP] identifier[JSONObject] identifier[in] operator[SEP] Keyword[throws] identifier[JSONConverterException] {
identifier[String] identifier[id] operator[=] identifier[requiredString] operator[SEP] identifier[in] , identifier[ACTION_ID_LABEL] opera... |
private static IDisconfUpdate getIDisconfUpdateInstance(Class<?> disconfUpdateServiceClass, Registry registry) {
Object iDisconfUpdate = registry.getFirstByType(disconfUpdateServiceClass, true);
if (iDisconfUpdate == null) {
return null;
}
return (IDisconfUpdate) iDisconfUpd... | class class_name[name] begin[{]
method[getIDisconfUpdateInstance, return_type[type[IDisconfUpdate]], modifier[private static], parameter[disconfUpdateServiceClass, registry]] begin[{]
local_variable[type[Object], iDisconfUpdate]
if[binary_operation[member[.iDisconfUpdate], ==, literal[n... | Keyword[private] Keyword[static] identifier[IDisconfUpdate] identifier[getIDisconfUpdateInstance] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[disconfUpdateServiceClass] , identifier[Registry] identifier[registry] operator[SEP] {
identifier[Object] identifier[iDisconfUpdate] op... |
@Override
public void onClose(Status status, Metadata trailers) {
if (status.getCause() instanceof StreamWaitTimeoutException) {
StreamWaitTimeoutException timeoutException = (StreamWaitTimeoutException) status.getCause();
switch(timeoutException.getState()) {
case WAITING:
operationSpan... | class class_name[name] begin[{]
method[onClose, return_type[void], modifier[public], parameter[status, trailers]] begin[{]
if[binary_operation[call[status.getCause, parameter[]], instanceof, type[StreamWaitTimeoutException]]] begin[{]
local_variable[type[StreamWaitTimeoutException],... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onClose] operator[SEP] identifier[Status] identifier[status] , identifier[Metadata] identifier[trailers] operator[SEP] {
Keyword[if] operator[SEP] identifier[status] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] Keyword... |
protected boolean handleJsonBody(ActionRuntime runtime, VirtualForm virtualForm) {
final ActionFormMeta formMeta = virtualForm.getFormMeta();
if (formMeta.isJsonBodyMapping()) {
if (formMeta.isRootSymbolForm()) {
mappingJsonBody(runtime, virtualForm, prepareJsonFromRequestBod... | class class_name[name] begin[{]
method[handleJsonBody, return_type[type[boolean]], modifier[protected], parameter[runtime, virtualForm]] begin[{]
local_variable[type[ActionFormMeta], formMeta]
if[call[formMeta.isJsonBodyMapping, parameter[]]] begin[{]
if[call[for... | Keyword[protected] Keyword[boolean] identifier[handleJsonBody] operator[SEP] identifier[ActionRuntime] identifier[runtime] , identifier[VirtualForm] identifier[virtualForm] operator[SEP] {
Keyword[final] identifier[ActionFormMeta] identifier[formMeta] operator[=] identifier[virtualForm] operator[SEP] identifier... |
public void write(@NonNull Resource resource) throws IOException {
try (JsonWriter writer = Json.createWriter(resource)) {
writer.beginDocument();
writer.property("id", getId());
writer.property("content", toString());
if (attributes.size() > 0) {
writer.beginObjec... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[resource]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=beginDocument, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_argume... | Keyword[public] Keyword[void] identifier[write] operator[SEP] annotation[@] identifier[NonNull] identifier[Resource] identifier[resource] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] operator[SEP] identifier[JsonWriter] identifier[writer] operator[=] identifier[Json] operator[SEP] identif... |
static String hex0(final byte x) {
final char tab[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f' };
int uint;
if (x < 0) {
uint = x & 0x7F;
uint |= 1 << 7;
} else {
uint = x;
}
retur... | class class_name[name] begin[{]
method[hex0, return_type[type[String]], modifier[static], parameter[x]] begin[{]
local_variable[type[char], tab]
local_variable[type[int], uint]
if[binary_operation[member[.x], <, literal[0]]] begin[{]
assign[member[.uint],... | Keyword[static] identifier[String] identifier[hex0] operator[SEP] Keyword[final] Keyword[byte] identifier[x] operator[SEP] {
Keyword[final] Keyword[char] identifier[tab] operator[SEP] operator[SEP] operator[=] {
literal[String] , literal[String] , literal[String] , literal[String] , literal[String... |
public T build() {
T obj = createInstance();
try {
for (Step step : steps) {
if (step.isBuilderMethodCall()) {
callMethod(this, step);
} else {
callMethod(obj, step);
}
}
} c... | class class_name[name] begin[{]
method[build, return_type[type[T]], modifier[public], parameter[]] begin[{]
local_variable[type[T], obj]
TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isBuilderMethodCall, ... | Keyword[public] identifier[T] identifier[build] operator[SEP] operator[SEP] {
identifier[T] identifier[obj] operator[=] identifier[createInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[for] operator[SEP] identifier[Step] identifier[step] operator[:] identifier[steps] operat... |
public MonetaryFormat roundingMode(RoundingMode roundingMode) {
if (roundingMode == this.roundingMode)
return this;
else
return new MonetaryFormat(negativeSign, positiveSign, zeroDigit, decimalMark, minDecimals, decimalGroups,
shift, roundingMode, codes, codeS... | class class_name[name] begin[{]
method[roundingMode, return_type[type[MonetaryFormat]], modifier[public], parameter[roundingMode]] begin[{]
if[binary_operation[member[.roundingMode], ==, THIS[member[None.roundingMode]]]] begin[{]
return[THIS[]]
else begin[{]
return[ClassCreator(argument... | Keyword[public] identifier[MonetaryFormat] identifier[roundingMode] operator[SEP] identifier[RoundingMode] identifier[roundingMode] operator[SEP] {
Keyword[if] operator[SEP] identifier[roundingMode] operator[==] Keyword[this] operator[SEP] identifier[roundingMode] operator[SEP] Keyword[return] Keyword[this] oper... |
static public SimpleGraph getMoleculeGraph(IAtomContainer molecule) {
SimpleGraph graph = new SimpleGraph();
for (int i = 0; i < molecule.getAtomCount(); i++) {
IAtom atom = molecule.getAtom(i);
graph.addVertex(atom);
}
for (int i = 0; i < molecule.getBondCount()... | class class_name[name] begin[{]
method[getMoleculeGraph, return_type[type[SimpleGraph]], modifier[public static], parameter[molecule]] begin[{]
local_variable[type[SimpleGraph], graph]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=... | Keyword[static] Keyword[public] identifier[SimpleGraph] identifier[getMoleculeGraph] operator[SEP] identifier[IAtomContainer] identifier[molecule] operator[SEP] {
identifier[SimpleGraph] identifier[graph] operator[=] Keyword[new] identifier[SimpleGraph] operator[SEP] operator[SEP] operator[SEP] Keyword[for] oper... |
public static long[] random(int card, int capacity, Random random) {
if(card < 0 || card > capacity) {
throw new IllegalArgumentException("Cannot set " + card + " out of " + capacity + " bits.");
}
// FIXME: Avoid recomputing the cardinality.
if(card < capacity >>> 1) {
long[] bitset = BitsU... | class class_name[name] begin[{]
method[random, return_type[type[long]], modifier[public static], parameter[card, capacity, random]] begin[{]
if[binary_operation[binary_operation[member[.card], <, literal[0]], ||, binary_operation[member[.card], >, member[.capacity]]]] begin[{]
Throw... | Keyword[public] Keyword[static] Keyword[long] operator[SEP] operator[SEP] identifier[random] operator[SEP] Keyword[int] identifier[card] , Keyword[int] identifier[capacity] , identifier[Random] identifier[random] operator[SEP] {
Keyword[if] operator[SEP] identifier[card] operator[<] Other[0] operator[||] ident... |
public void setReturnObject(PrintWriter out, Object objReturn)
{
String strReturn = null;
if (objReturn instanceof Map)
{
Map<String, Object> map = (Map)objReturn;
JSONObject jsonObj = AjaxProxyTask.mapToJsonObject(map);
strReturn = AjaxProxyTask.jsonObj... | class class_name[name] begin[{]
method[setReturnObject, return_type[void], modifier[public], parameter[out, objReturn]] begin[{]
local_variable[type[String], strReturn]
if[binary_operation[member[.objReturn], instanceof, type[Map]]] begin[{]
local_variable[type[Map], map]
... | Keyword[public] Keyword[void] identifier[setReturnObject] operator[SEP] identifier[PrintWriter] identifier[out] , identifier[Object] identifier[objReturn] operator[SEP] {
identifier[String] identifier[strReturn] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[objReturn] Keyword[instan... |
public final void renderMessageString() {
Object[] coreFields = event.getFieldsToLog();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < coreFields.length + xFields.length; ++i) {
if (i > 0) {
sb.append(fieldSeperator);
}
Object fiel... | class class_name[name] begin[{]
method[renderMessageString, return_type[void], modifier[final public], parameter[]] begin[{]
local_variable[type[Object], coreFields]
local_variable[type[StringBuilder], sb]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Bi... | Keyword[public] Keyword[final] Keyword[void] identifier[renderMessageString] operator[SEP] operator[SEP] {
identifier[Object] operator[SEP] operator[SEP] identifier[coreFields] operator[=] identifier[event] operator[SEP] identifier[getFieldsToLog] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilde... |
public double interpolate(double... x) {
if (x.length != this.x[0].length) {
throw new IllegalArgumentException(String.format("Invalid input vector size: %d, expected: %d", x.length, this.x[0].length));
}
double sum = 0.0, sumw = 0.0;
for (int i = 0; i < this.x.length; i++) ... | class class_name[name] begin[{]
method[interpolate, return_type[type[double]], modifier[public], parameter[x]] begin[{]
if[binary_operation[member[x.length], !=, THIS[member[None.x]ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))memb... | Keyword[public] Keyword[double] identifier[interpolate] operator[SEP] Keyword[double] operator[...] identifier[x] operator[SEP] {
Keyword[if] operator[SEP] identifier[x] operator[SEP] identifier[length] operator[!=] Keyword[this] operator[SEP] identifier[x] operator[SEP] Other[0] operator[SEP] operator[SEP] iden... |
private int calcLastPage(int total, int pageSize) {
if (total == 0) {
return firstPage;
} else {
final int zeroBasedPageNo = total % pageSize > 0
? total / pageSize
: total / pageSize - 1;
return firstPage + zeroBasedPageNo;
... | class class_name[name] begin[{]
method[calcLastPage, return_type[type[int]], modifier[private], parameter[total, pageSize]] begin[{]
if[binary_operation[member[.total], ==, literal[0]]] begin[{]
return[member[.firstPage]]
else begin[{]
local_variable[type[int], z... | Keyword[private] Keyword[int] identifier[calcLastPage] operator[SEP] Keyword[int] identifier[total] , Keyword[int] identifier[pageSize] operator[SEP] {
Keyword[if] operator[SEP] identifier[total] operator[==] Other[0] operator[SEP] {
Keyword[return] identifier[firstPage] operator[SEP]
}
... |
private void cleanMixedAttributes() {
currentFieldAttributes.remove(HttpHeaderValues.CHARSET);
currentFieldAttributes.remove(HttpHeaderNames.CONTENT_LENGTH);
currentFieldAttributes.remove(HttpHeaderNames.CONTENT_TRANSFER_ENCODING);
currentFieldAttributes.remove(HttpHeaderNames.CONTENT_TY... | class class_name[name] begin[{]
method[cleanMixedAttributes, return_type[void], modifier[private], parameter[]] begin[{]
call[currentFieldAttributes.remove, parameter[member[HttpHeaderValues.CHARSET]]]
call[currentFieldAttributes.remove, parameter[member[HttpHeaderNames.CONTENT_... | Keyword[private] Keyword[void] identifier[cleanMixedAttributes] operator[SEP] operator[SEP] {
identifier[currentFieldAttributes] operator[SEP] identifier[remove] operator[SEP] identifier[HttpHeaderValues] operator[SEP] identifier[CHARSET] operator[SEP] operator[SEP] identifier[currentFieldAttributes] operator[SE... |
@Override
public boolean accept(Path file) {
String name = file.getFileName().toString();
// check exact match
int index = Collections.binarySearch(matches, name);
if (index >= 0) {
return false;
}
// check prefix
index = Collections.binarySearch(p... | class class_name[name] begin[{]
method[accept, return_type[type[boolean]], modifier[public], parameter[file]] begin[{]
local_variable[type[String], name]
local_variable[type[int], index]
if[binary_operation[member[.index], >=, literal[0]]] begin[{]
return[literal[fal... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] identifier[Path] identifier[file] operator[SEP] {
identifier[String] identifier[name] operator[=] identifier[file] operator[SEP] identifier[getFileName] operator[SEP] operator[SEP] operator[SEP] identifier[toStri... |
public PlotCanvas setMargin(double margin) {
if (margin < 0.0 || margin >= 0.3) {
throw new IllegalArgumentException("Invalid margin: " + margin);
}
this.margin = margin;
repaint();
return this;
} | class class_name[name] begin[{]
method[setMargin, return_type[type[PlotCanvas]], modifier[public], parameter[margin]] begin[{]
if[binary_operation[binary_operation[member[.margin], <, literal[0.0]], ||, binary_operation[member[.margin], >=, literal[0.3]]]] begin[{]
ThrowStatement(ex... | Keyword[public] identifier[PlotCanvas] identifier[setMargin] operator[SEP] Keyword[double] identifier[margin] operator[SEP] {
Keyword[if] operator[SEP] identifier[margin] operator[<] literal[Float] operator[||] identifier[margin] operator[>=] literal[Float] operator[SEP] {
Keyword[throw] Keyword[new] ... |
private void pushJDBCSupport(CodeBuilder b) {
b.loadThis();
b.loadField(StorableGenerator.SUPPORT_FIELD_NAME, TypeDesc.forClass(TriggerSupport.class));
b.checkCast(TypeDesc.forClass(JDBCSupport.class));
} | class class_name[name] begin[{]
method[pushJDBCSupport, return_type[void], modifier[private], parameter[b]] begin[{]
call[b.loadThis, parameter[]]
call[b.loadField, parameter[member[StorableGenerator.SUPPORT_FIELD_NAME], call[TypeDesc.forClass, parameter[ClassReference(postfix_o... | Keyword[private] Keyword[void] identifier[pushJDBCSupport] operator[SEP] identifier[CodeBuilder] identifier[b] operator[SEP] {
identifier[b] operator[SEP] identifier[loadThis] operator[SEP] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[loadField] operator[SEP] identifier[StorableGenerator] o... |
public static void lazyAppend(Element parent, Element child) {
if (!parent.contains(child)) {
parent.appendChild(child);
}
} | class class_name[name] begin[{]
method[lazyAppend, return_type[void], modifier[public static], parameter[parent, child]] begin[{]
if[call[parent.contains, parameter[member[.child]]]] begin[{]
call[parent.appendChild, parameter[member[.child]]]
else begin[{]
None
... | Keyword[public] Keyword[static] Keyword[void] identifier[lazyAppend] operator[SEP] identifier[Element] identifier[parent] , identifier[Element] identifier[child] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[parent] operator[SEP] identifier[contains] operator[SEP] identifier[child] operator[S... |
public JSONWriter objectEnd() throws IOException {
writer.write(JSON.RBRACE);
state = stack.pop();
return this;
} | class class_name[name] begin[{]
method[objectEnd, return_type[type[JSONWriter]], modifier[public], parameter[]] begin[{]
call[writer.write, parameter[member[JSON.RBRACE]]]
assign[member[.state], call[stack.pop, parameter[]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[JSONWriter] identifier[objectEnd] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[writer] operator[SEP] identifier[write] operator[SEP] identifier[JSON] operator[SEP] identifier[RBRACE] operator[SEP] operator[SEP] identifier[state] operator[=] identifie... |
@Override
public void paint(final RenderContext renderContext) {
// Check interceptor is enabled
if (!DebugValidateXML.isEnabled()) {
super.paint(renderContext);
return;
}
if (!(renderContext instanceof WebXmlRenderContext)) {
LOG.warn("Unable to validate against a " + renderContext);
super.paint(... | class class_name[name] begin[{]
method[paint, return_type[void], modifier[public], parameter[renderContext]] begin[{]
if[call[DebugValidateXML.isEnabled, parameter[]]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=renderContext, postfix_operators=[], p... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[paint] operator[SEP] Keyword[final] identifier[RenderContext] identifier[renderContext] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[DebugValidateXML] operator[SEP] identifier[isEnabled] operator[SEP] operator[SEP] op... |
public Packer setInsetTop(final int val) {
Insets i = gc.insets;
if (i == null) {
i = new Insets(0, 0, 0, 0);
}
gc.insets = new Insets(val, i.left, i.bottom, i.right);
setConstraints(comp, gc);
return this;
} | class class_name[name] begin[{]
method[setInsetTop, return_type[type[Packer]], modifier[public], parameter[val]] begin[{]
local_variable[type[Insets], i]
if[binary_operation[member[.i], ==, literal[null]]] begin[{]
assign[member[.i], ClassCreator(arguments=[Liter... | Keyword[public] identifier[Packer] identifier[setInsetTop] operator[SEP] Keyword[final] Keyword[int] identifier[val] operator[SEP] {
identifier[Insets] identifier[i] operator[=] identifier[gc] operator[SEP] identifier[insets] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[==] Other[null] operator... |
public int iterateObjects(HashtableAction action, int index, int length)
throws IOException,
EOFException,
FileManagerException,
ClassNotFoundException,
HashtableOnDiskException {
return walkHash(action, RETRIEVE... | class class_name[name] begin[{]
method[iterateObjects, return_type[type[int]], modifier[public], parameter[action, index, length]] begin[{]
return[call[.walkHash, parameter[member[.action], member[.RETRIEVE_ALL], member[.index], member[.length]]]]
end[}]
END[}] | Keyword[public] Keyword[int] identifier[iterateObjects] operator[SEP] identifier[HashtableAction] identifier[action] , Keyword[int] identifier[index] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] , identifier[EOFException] , identifier[FileManagerException] , identifier[Cl... |
protected Map<String,Object> buildParameters(XmlObject msgdoc, Map<String,String> metaInfo, Process processVO) {
Map<String,Object> params = null;
Variable requestVO = processVO.getVariable("request");
if (requestVO != null && requestVO.getVariableCategory() == 1) {
params = new Hash... | class class_name[name] begin[{]
method[buildParameters, return_type[type[Map]], modifier[protected], parameter[msgdoc, metaInfo, processVO]] begin[{]
local_variable[type[Map], params]
local_variable[type[Variable], requestVO]
if[binary_operation[binary_operation[member[.requestV... | Keyword[protected] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[buildParameters] operator[SEP] identifier[XmlObject] identifier[msgdoc] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[metaInfo] , identifier[Process] identifie... |
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case SimpleAntlrPackage.UNTIL_ELEMENT__LEFT:
return basicSetLeft(null, msgs);
case SimpleAntlrPackage.UNTIL_ELEMENT__RIGHT:
return basicSetRig... | class class_name[name] begin[{]
method[eInverseRemove, return_type[type[NotificationChain]], modifier[public], parameter[otherEnd, featureID, msgs]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=UNTIL_ELEMENT__LEFT, postfix_operators=[], prefix_operators=[], qualifier... | annotation[@] identifier[Override] Keyword[public] identifier[NotificationChain] identifier[eInverseRemove] operator[SEP] identifier[InternalEObject] identifier[otherEnd] , Keyword[int] identifier[featureID] , identifier[NotificationChain] identifier[msgs] operator[SEP] {
Keyword[switch] operator[SEP] identifi... |
public static String upstreamToString(Channel upstream) {
if (upstream == null) {
linkedRemaining.set(null);
return "";
}
if (linkedRemaining.get() == null) {
linkedRemaining.set(1);
}
if (linkedRemaining.get() <= 0) {
linkedRemaini... | class class_name[name] begin[{]
method[upstreamToString, return_type[type[String]], modifier[public static], parameter[upstream]] begin[{]
if[binary_operation[member[.upstream], ==, literal[null]]] begin[{]
call[linkedRemaining.set, parameter[literal[null]]]
... | Keyword[public] Keyword[static] identifier[String] identifier[upstreamToString] operator[SEP] identifier[Channel] identifier[upstream] operator[SEP] {
Keyword[if] operator[SEP] identifier[upstream] operator[==] Other[null] operator[SEP] {
identifier[linkedRemaining] operator[SEP] identifier[set] opera... |
public <T> T head(final Class<T> type, final Consumer<HttpConfig> configuration) {
return type.cast(interceptors.get(HttpVerb.HEAD).apply(configureRequest(type, HttpVerb.HEAD, configuration), this::doHead));
} | class class_name[name] begin[{]
method[head, return_type[type[T]], modifier[public], parameter[type, configuration]] begin[{]
return[call[type.cast, parameter[call[interceptors.get, parameter[member[HttpVerb.HEAD]]]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[head] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , Keyword[final] identifier[Consumer] operator[<] identifier[HttpConfig] operator[>] identifier[configuration] operator[SEP] {
... |
public void marshall(UpdateDomainContactPrivacyRequest updateDomainContactPrivacyRequest, ProtocolMarshaller protocolMarshaller) {
if (updateDomainContactPrivacyRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocol... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[updateDomainContactPrivacyRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.updateDomainContactPrivacyRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=Cla... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UpdateDomainContactPrivacyRequest] identifier[updateDomainContactPrivacyRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[updateDomainContactPrivacyRequest] ope... |
public void stop() {
this.eventManager.fireEvent(EventType.SERVER_STOPPING, new Event().attribute("blade", this));
this.server.stopAndWait();
this.eventManager.fireEvent(EventType.SERVER_STOPPED, new Event().attribute("blade", this));
} | class class_name[name] begin[{]
method[stop, return_type[void], modifier[public], parameter[]] begin[{]
THIS[member[None.eventManager]call[None.fireEvent, parameter[member[EventType.SERVER_STOPPING], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], pr... | Keyword[public] Keyword[void] identifier[stop] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[eventManager] operator[SEP] identifier[fireEvent] operator[SEP] identifier[EventType] operator[SEP] identifier[SERVER_STOPPING] , Keyword[new] identifier[Event] operator[SEP] operator[SEP] operato... |
static public void writeStringAsCharArray(Writer writer, String str) throws IOException {
writeStringAsCharArray(writer, str, 0, str.length());
} | class class_name[name] begin[{]
method[writeStringAsCharArray, return_type[void], modifier[public static], parameter[writer, str]] begin[{]
call[.writeStringAsCharArray, parameter[member[.writer], member[.str], literal[0], call[str.length, parameter[]]]]
end[}]
END[}] | Keyword[static] Keyword[public] Keyword[void] identifier[writeStringAsCharArray] operator[SEP] identifier[Writer] identifier[writer] , identifier[String] identifier[str] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[writeStringAsCharArray] operator[SEP] identifier[writer] , identifier[str]... |
private static Region skew(Region t) {
if (t.left.level == t.level) {
t = rotateWithLeftChild(t);
}
return t;
} | class class_name[name] begin[{]
method[skew, return_type[type[Region]], modifier[private static], parameter[t]] begin[{]
if[binary_operation[member[t.left.level], ==, member[t.level]]] begin[{]
assign[member[.t], call[.rotateWithLeftChild, parameter[member[.t]]]]
... | Keyword[private] Keyword[static] identifier[Region] identifier[skew] operator[SEP] identifier[Region] identifier[t] operator[SEP] {
Keyword[if] operator[SEP] identifier[t] operator[SEP] identifier[left] operator[SEP] identifier[level] operator[==] identifier[t] operator[SEP] identifier[level] operator[SEP] {
... |
public void setTVSIZE(Integer newTVSIZE) {
Integer oldTVSIZE = tvsize;
tvsize = newTVSIZE;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.TILE_TOCRG__TVSIZE, oldTVSIZE, tvsize));
} | class class_name[name] begin[{]
method[setTVSIZE, return_type[void], modifier[public], parameter[newTVSIZE]] begin[{]
local_variable[type[Integer], oldTVSIZE]
assign[member[.tvsize], member[.newTVSIZE]]
if[call[.eNotificationRequired, parameter[]]] begin[{]
c... | Keyword[public] Keyword[void] identifier[setTVSIZE] operator[SEP] identifier[Integer] identifier[newTVSIZE] operator[SEP] {
identifier[Integer] identifier[oldTVSIZE] operator[=] identifier[tvsize] operator[SEP] identifier[tvsize] operator[=] identifier[newTVSIZE] operator[SEP] Keyword[if] operator[SEP] identifie... |
public Observable<StorageAccountInner> createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) {
return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponse<StorageAccountInner>, StorageAccountInner>() {
... | class class_name[name] begin[{]
method[createAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, accountName, parameters]] begin[{]
return[call[.createWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.accountName], member[.parameters]]]]
end[}]... | Keyword[public] identifier[Observable] operator[<] identifier[StorageAccountInner] operator[>] identifier[createAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[accountName] , identifier[StorageAccountCreateParameters] identifier[parameters] operator[SEP] {
... |
public Duration getDuration(FastTrackField type)
{
Double value = (Double) getObject(type);
return value == null ? null : Duration.getInstance(value.doubleValue(), m_table.getDurationTimeUnit());
} | class class_name[name] begin[{]
method[getDuration, return_type[type[Duration]], modifier[public], parameter[type]] begin[{]
local_variable[type[Double], value]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], q... | Keyword[public] identifier[Duration] identifier[getDuration] operator[SEP] identifier[FastTrackField] identifier[type] operator[SEP] {
identifier[Double] identifier[value] operator[=] operator[SEP] identifier[Double] operator[SEP] identifier[getObject] operator[SEP] identifier[type] operator[SEP] operator[SEP] K... |
@Override
public DescribeTimeToLiveResult describeTimeToLive(DescribeTimeToLiveRequest request) {
request = beforeClientExecution(request);
return executeDescribeTimeToLive(request);
} | class class_name[name] begin[{]
method[describeTimeToLive, return_type[type[DescribeTimeToLiveResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDescribeTimeToLive, parameter[me... | annotation[@] identifier[Override] Keyword[public] identifier[DescribeTimeToLiveResult] identifier[describeTimeToLive] operator[SEP] identifier[DescribeTimeToLiveRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operat... |
public static MessageCreator creator(final com.twilio.type.PhoneNumber to,
final String messagingServiceSid,
final List<URI> mediaUrl) {
return new MessageCreator(to, messagingServiceSid, mediaUrl);
} | class class_name[name] begin[{]
method[creator, return_type[type[MessageCreator]], modifier[public static], parameter[to, messagingServiceSid, mediaUrl]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=to, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberRefere... | Keyword[public] Keyword[static] identifier[MessageCreator] identifier[creator] operator[SEP] Keyword[final] identifier[com] operator[SEP] identifier[twilio] operator[SEP] identifier[type] operator[SEP] identifier[PhoneNumber] identifier[to] , Keyword[final] identifier[String] identifier[messagingServiceSid] , Keyword... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.