code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public FDistort affine(double a11, double a12, double a21, double a22,
double dx, double dy) {
PixelTransformAffine_F32 transform;
if( outputToInput != null && outputToInput instanceof PixelTransformAffine_F32 ) {
transform = (PixelTransformAffine_F32)outputToInput;
} else {
transform = new Pixel... | class class_name[name] begin[{]
method[affine, return_type[type[FDistort]], modifier[public], parameter[a11, a12, a21, a22, dx, dy]] begin[{]
local_variable[type[PixelTransformAffine_F32], transform]
if[binary_operation[binary_operation[member[.outputToInput], !=, literal[null]], &&, bi... | Keyword[public] identifier[FDistort] identifier[affine] operator[SEP] Keyword[double] identifier[a11] , Keyword[double] identifier[a12] , Keyword[double] identifier[a21] , Keyword[double] identifier[a22] , Keyword[double] identifier[dx] , Keyword[double] identifier[dy] operator[SEP] {
identifier[PixelTransf... |
@Deprecated
public static ManagedObjectReference createMOR(String type, String value) {
return MorUtil.createMOR(type, value);
} | class class_name[name] begin[{]
method[createMOR, return_type[type[ManagedObjectReference]], modifier[public static], parameter[type, value]] begin[{]
return[call[MorUtil.createMOR, parameter[member[.type], member[.value]]]]
end[}]
END[}] | annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[ManagedObjectReference] identifier[createMOR] operator[SEP] identifier[String] identifier[type] , identifier[String] identifier[value] operator[SEP] {
Keyword[return] identifier[MorUtil] operator[SEP] identifier[createMOR] operator[... |
private static int checkResult(int result)
{
if (exceptionsEnabled && result != cudaError.cudaSuccess)
{
throw new CudaException(cudaError.stringFor(result));
}
return result;
} | class class_name[name] begin[{]
method[checkResult, return_type[type[int]], modifier[private static], parameter[result]] begin[{]
if[binary_operation[member[.exceptionsEnabled], &&, binary_operation[member[.result], !=, member[cudaError.cudaSuccess]]]] begin[{]
ThrowStatement(expres... | Keyword[private] Keyword[static] Keyword[int] identifier[checkResult] operator[SEP] Keyword[int] identifier[result] operator[SEP] {
Keyword[if] operator[SEP] identifier[exceptionsEnabled] operator[&&] identifier[result] operator[!=] identifier[cudaError] operator[SEP] identifier[cudaSuccess] operator[SEP] {
... |
public final void mT__113() throws RecognitionException {
try {
int _type = T__113;
int _channel = DEFAULT_TOKEN_CHANNEL;
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:94:8: ( 'throws' )
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:94:10: 'throws'
{
... | class class_name[name] begin[{]
method[mT__113, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=T__113, postfix_operators=[], prefix_operators=... | Keyword[public] Keyword[final] Keyword[void] identifier[mT__113] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
Keyword[int] identifier[_type] operator[=] identifier[T__113] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TO... |
@Override
public boolean validate(final Problems problems, final String compName, final String text) {
try {
final double d = Double.parseDouble(text);
if (d < 0D) {
final String problem = ValidationBundle.getMessage(NonNegativeNumberValidator.class, "ERR_NEGATIVE_NUMBER", compName); // NOI18N
problems... | class class_name[name] begin[{]
method[validate, return_type[type[boolean]], modifier[public], parameter[problems, compName, text]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReferenc... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[validate] operator[SEP] Keyword[final] identifier[Problems] identifier[problems] , Keyword[final] identifier[String] identifier[compName] , Keyword[final] identifier[String] identifier[text] operator[SEP] {
Keyword[try] {
... |
public ProjectTaskInner update(String groupName, String serviceName, String projectName, String taskName, ProjectTaskInner parameters) {
return updateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).toBlocking().single().body();
} | class class_name[name] begin[{]
method[update, return_type[type[ProjectTaskInner]], modifier[public], parameter[groupName, serviceName, projectName, taskName, parameters]] begin[{]
return[call[.updateWithServiceResponseAsync, parameter[member[.groupName], member[.serviceName], member[.projectName], mem... | Keyword[public] identifier[ProjectTaskInner] identifier[update] operator[SEP] identifier[String] identifier[groupName] , identifier[String] identifier[serviceName] , identifier[String] identifier[projectName] , identifier[String] identifier[taskName] , identifier[ProjectTaskInner] identifier[parameters] operator[SE... |
public Map<String, ClientStats> getStatsByProc() {
Map<Long, Map<String, ClientStats>> complete = getCompleteStats();
Map<String, ClientStats> retval = new TreeMap<String, ClientStats>();
for (Entry<Long, Map<String, ClientStats>> e : complete.entrySet()) {
for (Entry<String, ClientS... | class class_name[name] begin[{]
method[getStatsByProc, return_type[type[Map]], modifier[public], parameter[]] begin[{]
local_variable[type[Map], complete]
local_variable[type[Map], retval]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=No... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[ClientStats] operator[>] identifier[getStatsByProc] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[Long] , identifier[Map] operator[<] identifier[String] , identifier[ClientStats] operator[>] operator[>] identifi... |
public static boolean isAllNumber(String str) {
boolean hasNumber = false;
for (int i = 0; i < str.length(); i++) {
if (!(Character.isDigit(str.charAt(i)) ||
str.charAt(i) == '.' || str.charAt(i) == ',' || str.charAt(i) == '%'
|| str.charAt(i) == '$' || str.charAt(i) == '_')) {
return fal... | class class_name[name] begin[{]
method[isAllNumber, return_type[type[boolean]], modifier[public static], parameter[str]] begin[{]
local_variable[type[boolean], hasNumber]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(oper... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isAllNumber] operator[SEP] identifier[String] identifier[str] operator[SEP] {
Keyword[boolean] identifier[hasNumber] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] iden... |
public void registerBlueprint(Class clazz) throws RegisterBlueprintException {
Object blueprint = null;
try {
blueprint = clazz.newInstance();
} catch (InstantiationException e) {
throw new RegisterBlueprintException(e);
} catch (IllegalAccessException e) {
... | class class_name[name] begin[{]
method[registerBlueprint, return_type[void], modifier[public], parameter[clazz]] begin[{]
local_variable[type[Object], blueprint]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=blueprint, postfix_operators=[], pre... | Keyword[public] Keyword[void] identifier[registerBlueprint] operator[SEP] identifier[Class] identifier[clazz] operator[SEP] Keyword[throws] identifier[RegisterBlueprintException] {
identifier[Object] identifier[blueprint] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[blueprint] opera... |
@Override
public Object[] read(HttpServletRequest httpRequest, Type[] formalParameters) throws IOException, IllegalArgumentException {
if (formalParameters.length != 1) {
throw new IllegalArgumentException("Bad parameters count. Should be exactly one but is |%d|.", formalParameters.length);
}
if (formalP... | class class_name[name] begin[{]
method[read, return_type[type[Object]], modifier[public], parameter[httpRequest, formalParameters]] begin[{]
if[binary_operation[member[formalParameters.length], !=, literal[1]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postf... | annotation[@] identifier[Override] Keyword[public] identifier[Object] operator[SEP] operator[SEP] identifier[read] operator[SEP] identifier[HttpServletRequest] identifier[httpRequest] , identifier[Type] operator[SEP] operator[SEP] identifier[formalParameters] operator[SEP] Keyword[throws] identifier[IOException] , id... |
public String calculateSha1ByNameVersionAndType(String name, String version, DependencyType dependencyType) throws IOException {
String sha1ToCalc = name + UNDERSCORE + version + UNDERSCORE + dependencyType.toString();
return calculateByteArraySHA1(sha1ToCalc.getBytes(StandardCharsets.UTF_8));
} | class class_name[name] begin[{]
method[calculateSha1ByNameVersionAndType, return_type[type[String]], modifier[public], parameter[name, version, dependencyType]] begin[{]
local_variable[type[String], sha1ToCalc]
return[call[.calculateByteArraySHA1, parameter[call[sha1ToCalc.getBytes, parameter[m... | Keyword[public] identifier[String] identifier[calculateSha1ByNameVersionAndType] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[version] , identifier[DependencyType] identifier[dependencyType] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifi... |
public static YearRangeRandomizer aNewYearRangeRandomizer(final Year min, final Year max, final long seed) {
return new YearRangeRandomizer(min, max, seed);
} | class class_name[name] begin[{]
method[aNewYearRangeRandomizer, return_type[type[YearRangeRandomizer]], modifier[public static], parameter[min, max, seed]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberRef... | Keyword[public] Keyword[static] identifier[YearRangeRandomizer] identifier[aNewYearRangeRandomizer] operator[SEP] Keyword[final] identifier[Year] identifier[min] , Keyword[final] identifier[Year] identifier[max] , Keyword[final] Keyword[long] identifier[seed] operator[SEP] {
Keyword[return] Keyword[new] identi... |
public PositionOptions getPosition()
{
IComplexOption position = options.getComplexOption("position");
if (position instanceof PositionOptions)
{
return (PositionOptions) position;
}
return new PositionOptions()
.setMy(new PositionAlignmentOptions(PositionRelation.CENTER))
.setAt(new Positio... | class class_name[name] begin[{]
method[getPosition, return_type[type[PositionOptions]], modifier[public], parameter[]] begin[{]
local_variable[type[IComplexOption], position]
if[binary_operation[member[.position], instanceof, type[PositionOptions]]] begin[{]
return[Cast(expr... | Keyword[public] identifier[PositionOptions] identifier[getPosition] operator[SEP] operator[SEP] {
identifier[IComplexOption] identifier[position] operator[=] identifier[options] operator[SEP] identifier[getComplexOption] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifi... |
public I removeItem(String itemId) {
I item = m_items.get(itemId);
remove((Widget)item);
return item;
} | class class_name[name] begin[{]
method[removeItem, return_type[type[I]], modifier[public], parameter[itemId]] begin[{]
local_variable[type[I], item]
call[.remove, parameter[Cast(expression=MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]),... | Keyword[public] identifier[I] identifier[removeItem] operator[SEP] identifier[String] identifier[itemId] operator[SEP] {
identifier[I] identifier[item] operator[=] identifier[m_items] operator[SEP] identifier[get] operator[SEP] identifier[itemId] operator[SEP] operator[SEP] identifier[remove] operator[SEP] opera... |
public static String doPut(String host, String path,
Map<String, String> headers,
Map<String, String> queries,
String body) throws Exception {
return EntityUtils.toString(doPutResponse(host, path, headers, queries, body... | class class_name[name] begin[{]
method[doPut, return_type[type[String]], modifier[public static], parameter[host, path, headers, queries, body]] begin[{]
return[call[EntityUtils.toString, parameter[call[.doPutResponse, parameter[member[.host], member[.path], member[.headers], member[.queries], member[.... | Keyword[public] Keyword[static] identifier[String] identifier[doPut] operator[SEP] identifier[String] identifier[host] , identifier[String] identifier[path] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[headers] , identifier[Map] operator[<] identifier[String] , ident... |
public int umask(int umask) {
int old = this.umask;
this.umask = umask;
if (Log.isDebugEnabled()) {
Log.debug(this, "umask " + umask);
}
return old;
} | class class_name[name] begin[{]
method[umask, return_type[type[int]], modifier[public], parameter[umask]] begin[{]
local_variable[type[int], old]
assign[THIS[member[None.umask]], member[.umask]]
if[call[Log.isDebugEnabled, parameter[]]] begin[{]
c... | Keyword[public] Keyword[int] identifier[umask] operator[SEP] Keyword[int] identifier[umask] operator[SEP] {
Keyword[int] identifier[old] operator[=] Keyword[this] operator[SEP] identifier[umask] operator[SEP] Keyword[this] operator[SEP] identifier[umask] operator[=] identifier[umask] operator[SEP] Keyword[if] op... |
public static boolean isWindows9X() {
String os = System.getProperty("os.name").toLowerCase();
return os.equals("windows 95") || os.equals("windows 98");
} | class class_name[name] begin[{]
method[isWindows9X, return_type[type[boolean]], modifier[public static], parameter[]] begin[{]
local_variable[type[String], os]
return[binary_operation[call[os.equals, parameter[literal["windows 95"]]], ||, call[os.equals, parameter[literal["windows 98"]]]]]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isWindows9X] operator[SEP] operator[SEP] {
identifier[String] identifier[os] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SE... |
public Set<String> resolveMessageDestination(final String messageDestName, final VirtualFile deploymentRoot) {
if (messageDestName.contains("#")) {
final String[] parts = messageDestName.split("#");
String path = parts[0];
if (!path.startsWith("../")) {
path ... | class class_name[name] begin[{]
method[resolveMessageDestination, return_type[type[Set]], modifier[public], parameter[messageDestName, deploymentRoot]] begin[{]
if[call[messageDestName.contains, parameter[literal["#"]]]] begin[{]
local_variable[type[String], parts]
local... | Keyword[public] identifier[Set] operator[<] identifier[String] operator[>] identifier[resolveMessageDestination] operator[SEP] Keyword[final] identifier[String] identifier[messageDestName] , Keyword[final] identifier[VirtualFile] identifier[deploymentRoot] operator[SEP] {
Keyword[if] operator[SEP] identifier[me... |
boolean awaitUpdate(final long fromAddress, long timeout) {
final int delta = 20;
try {
while (timeout > 0) {
if (log.getHighAddress() > fromAddress) {
return true;
}
Thread.sleep(delta);
timeout -= delta;
... | class class_name[name] begin[{]
method[awaitUpdate, return_type[type[boolean]], modifier[default], parameter[fromAddress, timeout]] begin[{]
local_variable[type[int], delta]
TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(oper... | Keyword[boolean] identifier[awaitUpdate] operator[SEP] Keyword[final] Keyword[long] identifier[fromAddress] , Keyword[long] identifier[timeout] operator[SEP] {
Keyword[final] Keyword[int] identifier[delta] operator[=] Other[20] operator[SEP] Keyword[try] {
Keyword[while] operator[SEP] identifier[time... |
protected FullResponseHolder submitSmileRequest(
String taskId,
HttpMethod method,
String encodedPathSuffix,
@Nullable String encodedQueryString,
byte[] content,
boolean retry
) throws IOException, ChannelException, NoTaskLocationException
{
return submitRequest(
task... | class class_name[name] begin[{]
method[submitSmileRequest, return_type[type[FullResponseHolder]], modifier[protected], parameter[taskId, method, encodedPathSuffix, encodedQueryString, content, retry]] begin[{]
return[call[.submitRequest, parameter[member[.taskId], member[SmileMediaTypes.APPLICATION_JAC... | Keyword[protected] identifier[FullResponseHolder] identifier[submitSmileRequest] operator[SEP] identifier[String] identifier[taskId] , identifier[HttpMethod] identifier[method] , identifier[String] identifier[encodedPathSuffix] , annotation[@] identifier[Nullable] identifier[String] identifier[encodedQueryString] , ... |
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("/metrics")
@Description("Submits externally collected metric data.")
public Map<String, Object> submitMetrics(@Context HttpServletRequest req, final List<MetricDto> metricDtos) {
PrincipalUser remoteUser... | class class_name[name] begin[{]
method[submitMetrics, return_type[type[Map]], modifier[public], parameter[req, metricDtos]] begin[{]
local_variable[type[PrincipalUser], remoteUser]
call[SystemAssert.requireArgument, parameter[binary_operation[member[.metricDtos], !=, literal[null]], lit... | annotation[@] identifier[POST] annotation[@] identifier[Consumes] operator[SEP] identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON] operator[SEP] annotation[@] identifier[Produces] operator[SEP] identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON] operator[SEP] annotation[@] identifier[Path] op... |
protected CacheEntry getCache()
{
if (_cacheEntry == null) {
synchronized (_cache) {
_cacheEntry = _cache.get(getPath());
if (_cacheEntry == null) {
_cacheEntry = new CacheEntry();
_cache.put(getPath(), _cacheEntry);
}
}
}
long now;
now... | class class_name[name] begin[{]
method[getCache, return_type[type[CacheEntry]], modifier[protected], parameter[]] begin[{]
if[binary_operation[member[._cacheEntry], ==, literal[null]]] begin[{]
SYNCHRONIZED[member[._cache]] BEGIN[{]
assign... | Keyword[protected] identifier[CacheEntry] identifier[getCache] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[_cacheEntry] operator[==] Other[null] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[_cache] operator[SEP] {
identifier[_cacheEntry] operator... |
Element getElement(NodeList nodeList) {
Params.notNull(nodeList, "Nodes list");
if (nodeList.getLength() == 0) {
return null;
}
return getElement(nodeList.item(0));
} | class class_name[name] begin[{]
method[getElement, return_type[type[Element]], modifier[default], parameter[nodeList]] begin[{]
call[Params.notNull, parameter[member[.nodeList], literal["Nodes list"]]]
if[binary_operation[call[nodeList.getLength, parameter[]], ==, literal[0]]] b... | identifier[Element] identifier[getElement] operator[SEP] identifier[NodeList] identifier[nodeList] operator[SEP] {
identifier[Params] operator[SEP] identifier[notNull] operator[SEP] identifier[nodeList] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nodeList] operator[SEP] id... |
private void unlockAll(long[] _stamps) {
OptimisticLock[] _locks = locks;
int sn = _locks.length;
for (int i = 0; i < sn; i++) {
_locks[i].unlockWrite(_stamps[i]);
}
} | class class_name[name] begin[{]
method[unlockAll, return_type[void], modifier[private], parameter[_stamps]] begin[{]
local_variable[type[OptimisticLock], _locks]
local_variable[type[int], sn]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberR... | Keyword[private] Keyword[void] identifier[unlockAll] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[_stamps] operator[SEP] {
identifier[OptimisticLock] operator[SEP] operator[SEP] identifier[_locks] operator[=] identifier[locks] operator[SEP] Keyword[int] identifier[sn] operator[=] identifier... |
public static String getDBName(String userName) {
StringBuilder buffer = new StringBuilder();
buffer.append(EMBEDED_DB_NAME);
buffer.append("@");
buffer.append(userName);
return buffer.toString();
} | class class_name[name] begin[{]
method[getDBName, return_type[type[String]], modifier[public static], parameter[userName]] begin[{]
local_variable[type[StringBuilder], buffer]
call[buffer.append, parameter[member[.EMBEDED_DB_NAME]]]
call[buffer.append, parameter[literal[... | Keyword[public] Keyword[static] identifier[String] identifier[getDBName] operator[SEP] identifier[String] identifier[userName] operator[SEP] {
identifier[StringBuilder] identifier[buffer] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP]... |
public void setBytes(int index, ByteBuffer source)
{
checkPositionIndexes(index, index + source.remaining(), this.length);
index += offset;
source.get(data, index, source.remaining());
} | class class_name[name] begin[{]
method[setBytes, return_type[void], modifier[public], parameter[index, source]] begin[{]
call[.checkPositionIndexes, parameter[member[.index], binary_operation[member[.index], +, call[source.remaining, parameter[]]], THIS[member[None.length]]]]
as... | Keyword[public] Keyword[void] identifier[setBytes] operator[SEP] Keyword[int] identifier[index] , identifier[ByteBuffer] identifier[source] operator[SEP] {
identifier[checkPositionIndexes] operator[SEP] identifier[index] , identifier[index] operator[+] identifier[source] operator[SEP] identifier[remaining] ope... |
public ServiceFuture<Void> beginRefreshAsync(String deviceName, String name, String resourceGroupName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginRefreshWithServiceResponseAsync(deviceName, name, resourceGroupName), serviceCallback);
} | class class_name[name] begin[{]
method[beginRefreshAsync, return_type[type[ServiceFuture]], modifier[public], parameter[deviceName, name, resourceGroupName, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.beginRefreshWithServiceResponseAsync, parameter[member[.deviceN... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[Void] operator[>] identifier[beginRefreshAsync] operator[SEP] identifier[String] identifier[deviceName] , identifier[String] identifier[name] , identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[ServiceCallback] operator[<] id... |
public static <T> T getRandomElement(Set<? extends T> set, Random rg){
Iterator<? extends T> it = set.iterator();
int r = rg.nextInt(set.size());
T selected = it.next();
for(int i=0; i<r; i++){
selected = it.next();
}
return selected;
} | class class_name[name] begin[{]
method[getRandomElement, return_type[type[T]], modifier[public static], parameter[set, rg]] begin[{]
local_variable[type[Iterator], it]
local_variable[type[int], r]
local_variable[type[T], selected]
ForStatement(body=BlockStatement(label=None, sta... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[getRandomElement] operator[SEP] identifier[Set] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[set] , identifier[Random] identifier[rg] operator[SEP] {
identifier[Iterator] operator[<] o... |
public static void bindStateStyle (Value<Boolean> value, final String onStyle,
final String offStyle, final Widget... targets)
{
value.addListenerAndTrigger(new Value.Listener<Boolean>() {
public void valueChanged (Boolean value) {
String ad... | class class_name[name] begin[{]
method[bindStateStyle, return_type[void], modifier[public static], parameter[value, onStyle, offStyle, targets]] begin[{]
call[value.addListenerAndTrigger, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[LocalVariableDeclaration... | Keyword[public] Keyword[static] Keyword[void] identifier[bindStateStyle] operator[SEP] identifier[Value] operator[<] identifier[Boolean] operator[>] identifier[value] , Keyword[final] identifier[String] identifier[onStyle] , Keyword[final] identifier[String] identifier[offStyle] , Keyword[final] identifier[Widget] o... |
protected void removeNeighborFromRoutingTable(final TrustGraphNodeId neighbor) {
/* find the neighbor that the node being removed is mapped to
* ie the route neighbor -> mergeVal
*/
final TrustGraphNodeId mergeVal = routingTable.get(neighbor);
// if it is mapped to itself, ju... | class class_name[name] begin[{]
method[removeNeighborFromRoutingTable, return_type[void], modifier[protected], parameter[neighbor]] begin[{]
local_variable[type[TrustGraphNodeId], mergeVal]
if[call[mergeVal.equals, parameter[member[.neighbor]]]] begin[{]
call[rou... | Keyword[protected] Keyword[void] identifier[removeNeighborFromRoutingTable] operator[SEP] Keyword[final] identifier[TrustGraphNodeId] identifier[neighbor] operator[SEP] {
Keyword[final] identifier[TrustGraphNodeId] identifier[mergeVal] operator[=] identifier[routingTable] operator[SEP] identifier[get] operator[S... |
@Override
protected String[] flatten(Options options, String[] arguments, boolean stopAtNonOption) throws ParseException
{
init();
this.options = options;
// an iterator for the command line tokens
Iterator<String> iter = Arrays.asList(arguments).iterator();
// process ... | class class_name[name] begin[{]
method[flatten, return_type[type[String]], modifier[protected], parameter[options, arguments, stopAtNonOption]] begin[{]
call[.init, parameter[]]
assign[THIS[member[None.options]], member[.options]]
local_variable[type[Iterator], iter]
... | annotation[@] identifier[Override] Keyword[protected] identifier[String] operator[SEP] operator[SEP] identifier[flatten] operator[SEP] identifier[Options] identifier[options] , identifier[String] operator[SEP] operator[SEP] identifier[arguments] , Keyword[boolean] identifier[stopAtNonOption] operator[SEP] Keyword[thr... |
public static Point2dfx convert(Tuple2D<?> tuple) {
if (tuple instanceof Point2dfx) {
return (Point2dfx) tuple;
}
return new Point2dfx(tuple.getX(), tuple.getY());
} | class class_name[name] begin[{]
method[convert, return_type[type[Point2dfx]], modifier[public static], parameter[tuple]] begin[{]
if[binary_operation[member[.tuple], instanceof, type[Point2dfx]]] begin[{]
return[Cast(expression=MemberReference(member=tuple, postfix_operators=[], pre... | Keyword[public] Keyword[static] identifier[Point2dfx] identifier[convert] operator[SEP] identifier[Tuple2D] operator[<] operator[?] operator[>] identifier[tuple] operator[SEP] {
Keyword[if] operator[SEP] identifier[tuple] Keyword[instanceof] identifier[Point2dfx] operator[SEP] {
Keyword[return] operat... |
private String findGemVersion(String gemName, String pathToGems) {
String version = null;
File maxVersionFile = findMaxVersionFile(gemName, pathToGems);
if (maxVersionFile != null) {
String fileName = maxVersionFile.getName();
version = getVersionFromFileName(fileName, ge... | class class_name[name] begin[{]
method[findGemVersion, return_type[type[String]], modifier[private], parameter[gemName, pathToGems]] begin[{]
local_variable[type[String], version]
local_variable[type[File], maxVersionFile]
if[binary_operation[member[.maxVersionFile], !=, literal... | Keyword[private] identifier[String] identifier[findGemVersion] operator[SEP] identifier[String] identifier[gemName] , identifier[String] identifier[pathToGems] operator[SEP] {
identifier[String] identifier[version] operator[=] Other[null] operator[SEP] identifier[File] identifier[maxVersionFile] operator[=] ide... |
public static int collapseStackToArray(MethodVisitor mv, String desc) {
// Descriptor is of the format (Ljava/lang/String;IZZ)V
String descSequence = Utils.getParamSequence(desc);
if (descSequence == null) {
return 0; // nothing to do, there are no parameters
}
int count = descSequence.length();
// Creat... | class class_name[name] begin[{]
method[collapseStackToArray, return_type[type[int]], modifier[public static], parameter[mv, desc]] begin[{]
local_variable[type[String], descSequence]
if[binary_operation[member[.descSequence], ==, literal[null]]] begin[{]
return[literal[0]]
... | Keyword[public] Keyword[static] Keyword[int] identifier[collapseStackToArray] operator[SEP] identifier[MethodVisitor] identifier[mv] , identifier[String] identifier[desc] operator[SEP] {
identifier[String] identifier[descSequence] operator[=] identifier[Utils] operator[SEP] identifier[getParamSequence] operator... |
public void enableForegroundServiceScanning(Notification notification, int notificationId)
throws IllegalStateException {
if (isAnyConsumerBound()) {
throw new IllegalStateException("May not be called after consumers are already bound.");
}
if (notification == null) {
... | class class_name[name] begin[{]
method[enableForegroundServiceScanning, return_type[void], modifier[public], parameter[notification, notificationId]] begin[{]
if[call[.isAnyConsumerBound, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operat... | Keyword[public] Keyword[void] identifier[enableForegroundServiceScanning] operator[SEP] identifier[Notification] identifier[notification] , Keyword[int] identifier[notificationId] operator[SEP] Keyword[throws] identifier[IllegalStateException] {
Keyword[if] operator[SEP] identifier[isAnyConsumerBound] operator[... |
public void visitFiles(final FileVisitor visitor) {
final Project p = getProject();
if (p == null) {
throw new java.lang.IllegalStateException("project must be set before this call");
}
if (isReference()) {
((ProcessorDef) getCheckedRef(ProcessorDef.class, "ProcessorDef")).visitFiles(visitor... | class class_name[name] begin[{]
method[visitFiles, return_type[void], modifier[public], parameter[visitor]] begin[{]
local_variable[type[Project], p]
if[binary_operation[member[.p], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfi... | Keyword[public] Keyword[void] identifier[visitFiles] operator[SEP] Keyword[final] identifier[FileVisitor] identifier[visitor] operator[SEP] {
Keyword[final] identifier[Project] identifier[p] operator[=] identifier[getProject] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[p] opera... |
public int getUnsetBits(int batchSize)
throws IOException
{
int count = 0;
for (int i = 0; i < batchSize; i++) {
count += nextBit() ? 0 : 1;
}
return count;
} | class class_name[name] begin[{]
method[getUnsetBits, return_type[type[int]], modifier[public], parameter[batchSize]] begin[{]
local_variable[type[int], count]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=co... | Keyword[public] Keyword[int] identifier[getUnsetBits] operator[SEP] Keyword[int] identifier[batchSize] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP]... |
public static int[] executeBatchSQLKey(String poolName, String sqlKey, Object[][] params)
throws SQLStatementNotFoundException, YankSQLException {
String sql = YANK_POOL_MANAGER.getMergedSqlProperties().getProperty(sqlKey);
if (sql == null || sql.equalsIgnoreCase("")) {
throw new SQLStatementNotFou... | class class_name[name] begin[{]
method[executeBatchSQLKey, return_type[type[int]], modifier[public static], parameter[poolName, sqlKey, params]] begin[{]
local_variable[type[String], sql]
if[binary_operation[binary_operation[member[.sql], ==, literal[null]], ||, call[sql.equalsIgnoreCas... | Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[executeBatchSQLKey] operator[SEP] identifier[String] identifier[poolName] , identifier[String] identifier[sqlKey] , identifier[Object] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[params] operator[SEP] Keyword[th... |
public List<EnhanceEntity> readFromIndexTable(EntityMetadata m, Client client,
Map<Boolean, List<IndexClause>> indexClauseMap)
{
List<SearchResult> searchResults = new ArrayList<SearchResult>();
List<Object> primaryKeys = new ArrayList<Object>();
String columnFamilyName = m.getT... | class class_name[name] begin[{]
method[readFromIndexTable, return_type[type[List]], modifier[public], parameter[m, client, indexClauseMap]] begin[{]
local_variable[type[List], searchResults]
local_variable[type[List], primaryKeys]
local_variable[type[String], columnFamilyName]
... | Keyword[public] identifier[List] operator[<] identifier[EnhanceEntity] operator[>] identifier[readFromIndexTable] operator[SEP] identifier[EntityMetadata] identifier[m] , identifier[Client] identifier[client] , identifier[Map] operator[<] identifier[Boolean] , identifier[List] operator[<] identifier[IndexClause] ope... |
protected void resume(LocalTranCurrentImpl current)
{
if (tc.isEntryEnabled()) Tr.entry(tc, "resume", current);
_current = current;
_state = Running;
if (tc.isEntryEnabled()) Tr.exit(tc, "resume");
} | class class_name[name] begin[{]
method[resume, return_type[void], modifier[protected], parameter[current]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[Tr.entry, parameter[member[.tc], literal["resume"], member[.current]]]
else begin[{]
None
end[}]... | Keyword[protected] Keyword[void] identifier[resume] operator[SEP] identifier[LocalTranCurrentImpl] identifier[current] operator[SEP] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operato... |
public Statement withUpdatedParameters( Value updates )
{
if ( updates == null || updates.isEmpty() )
{
return this;
}
else
{
Map<String,Value> newParameters = newHashMapWithSize( Math.max( parameters.size(), updates.size() ) );
newParamete... | class class_name[name] begin[{]
method[withUpdatedParameters, return_type[type[Statement]], modifier[public], parameter[updates]] begin[{]
if[binary_operation[binary_operation[member[.updates], ==, literal[null]], ||, call[updates.isEmpty, parameter[]]]] begin[{]
return[THIS[]]
... | Keyword[public] identifier[Statement] identifier[withUpdatedParameters] operator[SEP] identifier[Value] identifier[updates] operator[SEP] {
Keyword[if] operator[SEP] identifier[updates] operator[==] Other[null] operator[||] identifier[updates] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operato... |
protected final void itemHasBeenRestored(AbstractItem item)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "itemHasBeenRestored", item);
super.itemHasBeenRestored(item);
_setWatermarks((ItemStream)item);
if (TraceComponent.isAnyTracingEnabl... | class class_name[name] begin[{]
method[itemHasBeenRestored, return_type[void], modifier[final protected], parameter[item]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parame... | Keyword[protected] Keyword[final] Keyword[void] identifier[itemHasBeenRestored] operator[SEP] identifier[AbstractItem] identifier[item] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operat... |
@CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@SchedulerSupport(SchedulerSupport.NONE)
public final <K, V> Single<Map<K, Collection<V>>> toMultimap(
final Function<? super T, ? extends K> keySelector,
final Function<? super T, ? extends V> valueSe... | class class_name[name] begin[{]
method[toMultimap, return_type[type[Single]], modifier[final public], parameter[keySelector, valueSelector, mapSupplier, collectionFactory]] begin[{]
call[ObjectHelper.requireNonNull, parameter[member[.keySelector], literal["keySelector is null"]]]
... | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[NonNull] annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[UNBOUNDED_IN] operator[SEP] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] i... |
private JmsTopicImpl processShortTopicForm(String topic) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "processShortTopicForm", topic);
String topicName, topicSpace;
// Split the string into the topic and the optional topic space
// by sear... | class class_name[name] begin[{]
method[processShortTopicForm, return_type[type[JmsTopicImpl]], modifier[private], parameter[topic]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entr... | Keyword[private] identifier[JmsTopicImpl] identifier[processShortTopicForm] operator[SEP] identifier[String] identifier[topic] operator[SEP] Keyword[throws] identifier[JMSException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] op... |
public Future<OAuth1AccessToken> getAccessTokenAsync(OAuth1RequestToken requestToken, String oauthVerifier,
OAuthAsyncRequestCallback<OAuth1AccessToken> callback) {
log("async obtaining access token from %s", api.getAccessTokenEndpoint());
final OAuthRequest request = prepareAccessTokenReque... | class class_name[name] begin[{]
method[getAccessTokenAsync, return_type[type[Future]], modifier[public], parameter[requestToken, oauthVerifier, callback]] begin[{]
call[.log, parameter[literal["async obtaining access token from %s"], call[api.getAccessTokenEndpoint, parameter[]]]]
local... | Keyword[public] identifier[Future] operator[<] identifier[OAuth1AccessToken] operator[>] identifier[getAccessTokenAsync] operator[SEP] identifier[OAuth1RequestToken] identifier[requestToken] , identifier[String] identifier[oauthVerifier] , identifier[OAuthAsyncRequestCallback] operator[<] identifier[OAuth1AccessToken... |
public static Backbone compute(final Formula formula, final Collection<Variable> variables) {
return compute(formula, variables, BackboneType.POSITIVE_AND_NEGATIVE);
} | class class_name[name] begin[{]
method[compute, return_type[type[Backbone]], modifier[public static], parameter[formula, variables]] begin[{]
return[call[.compute, parameter[member[.formula], member[.variables], member[BackboneType.POSITIVE_AND_NEGATIVE]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Backbone] identifier[compute] operator[SEP] Keyword[final] identifier[Formula] identifier[formula] , Keyword[final] identifier[Collection] operator[<] identifier[Variable] operator[>] identifier[variables] operator[SEP] {
Keyword[return] identifier[compute] operator[SE... |
public void text(int row, int col, String text) {
text(row, col, text, defaultWait);
} | class class_name[name] begin[{]
method[text, return_type[void], modifier[public], parameter[row, col, text]] begin[{]
call[.text, parameter[member[.row], member[.col], member[.text], member[.defaultWait]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[text] operator[SEP] Keyword[int] identifier[row] , Keyword[int] identifier[col] , identifier[String] identifier[text] operator[SEP] {
identifier[text] operator[SEP] identifier[row] , identifier[col] , identifier[text] , identifier[defaultWait] operator[SEP] operator[... |
public static Preset reloadConfiguration(String marketplace, Properties props) throws MnoConfigurationException {
Preset preset = new Preset(marketplace, props);
configurations.put(marketplace, preset);
return preset;
} | class class_name[name] begin[{]
method[reloadConfiguration, return_type[type[Preset]], modifier[public static], parameter[marketplace, props]] begin[{]
local_variable[type[Preset], preset]
call[configurations.put, parameter[member[.marketplace], member[.preset]]]
return[member[.... | Keyword[public] Keyword[static] identifier[Preset] identifier[reloadConfiguration] operator[SEP] identifier[String] identifier[marketplace] , identifier[Properties] identifier[props] operator[SEP] Keyword[throws] identifier[MnoConfigurationException] {
identifier[Preset] identifier[preset] operator[=] Keyword[n... |
public static void scaleFit(Bitmap src, Bitmap dest, int clearColor) {
float ratio = Math.min(dest.getWidth() / (float) src.getWidth(), dest.getHeight() / (float) src.getHeight());
int newW = (int) (src.getWidth() * ratio);
int newH = (int) (src.getHeight() * ratio);
int paddingTop = (de... | class class_name[name] begin[{]
method[scaleFit, return_type[void], modifier[public static], parameter[src, dest, clearColor]] begin[{]
local_variable[type[float], ratio]
local_variable[type[int], newW]
local_variable[type[int], newH]
local_variable[type[int], paddingTop]
... | Keyword[public] Keyword[static] Keyword[void] identifier[scaleFit] operator[SEP] identifier[Bitmap] identifier[src] , identifier[Bitmap] identifier[dest] , Keyword[int] identifier[clearColor] operator[SEP] {
Keyword[float] identifier[ratio] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SE... |
public static List<StackTraceElement> captureStackBelow(Class<?>... clazzes) {
List<Class<?>> toIgnore = new ArrayList<>(clazzes.length + 1);
toIgnore.addAll(Arrays.asList(clazzes));
toIgnore.add(StackDumper.class);
Predicate<StackTraceElement> isSkipped = element -> toIgnore.stream().anyMatch(clazz -> {
St... | class class_name[name] begin[{]
method[captureStackBelow, return_type[type[List]], modifier[public static], parameter[clazzes]] begin[{]
local_variable[type[List], toIgnore]
call[toIgnore.addAll, parameter[call[Arrays.asList, parameter[member[.clazzes]]]]]
call[toIgnore.... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[StackTraceElement] operator[>] identifier[captureStackBelow] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[...] identifier[clazzes] operator[SEP] {
identifier[List] operator[<] identifier[Class] operator[<] ope... |
protected boolean isUserInfoValid(String userInfoStr, String subClaim) {
String userInfoSubClaim = getUserInfoSubClaim(userInfoStr);
if (userInfoSubClaim == null || subClaim == null || userInfoSubClaim.compareTo(subClaim) != 0) {
Tr.error(tc, "USERINFO_INVALID", new Object[] { userInfoStr, s... | class class_name[name] begin[{]
method[isUserInfoValid, return_type[type[boolean]], modifier[protected], parameter[userInfoStr, subClaim]] begin[{]
local_variable[type[String], userInfoSubClaim]
if[binary_operation[binary_operation[binary_operation[member[.userInfoSubClaim], ==, literal... | Keyword[protected] Keyword[boolean] identifier[isUserInfoValid] operator[SEP] identifier[String] identifier[userInfoStr] , identifier[String] identifier[subClaim] operator[SEP] {
identifier[String] identifier[userInfoSubClaim] operator[=] identifier[getUserInfoSubClaim] operator[SEP] identifier[userInfoStr] ope... |
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case ID:
return isSetId();
case CATEGORY:
return isSetCategory();
case LABEL:
return isSetLabel();
case THRESHOLD:
return isSetThreshold();
c... | class class_name[name] begin[{]
method[isSet, return_type[type[boolean]], modifier[public], parameter[field]] begin[{]
if[binary_operation[member[.field], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, po... | Keyword[public] Keyword[boolean] identifier[isSet] operator[SEP] identifier[_Fields] identifier[field] operator[SEP] {
Keyword[if] operator[SEP] identifier[field] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] opera... |
public void browse(String id, String token, Function<String, Boolean> function) {
// 判断toke值
if (StringUtils.isBlank(token)) {
throw new ParameterException(" token is null. ");
}
if (log.isDebugEnabled()) {
log.debug("get token = " + token);
}
St... | class class_name[name] begin[{]
method[browse, return_type[void], modifier[public], parameter[id, token, function]] begin[{]
if[call[StringUtils.isBlank, parameter[member[.token]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_opera... | Keyword[public] Keyword[void] identifier[browse] operator[SEP] identifier[String] identifier[id] , identifier[String] identifier[token] , identifier[Function] operator[<] identifier[String] , identifier[Boolean] operator[>] identifier[function] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtils]... |
@Override
public void setUserPermission(String userName, List<Permission> permissions)
throws ServiceException {
if(! isStarted){
ServiceDirectoryError error = new ServiceDirectoryError(ErrorCode.SERVICE_DIRECTORY_MANAGER_FACTORY_CLOSED);
throw new ServiceException(error)... | class class_name[name] begin[{]
method[setUserPermission, return_type[void], modifier[public], parameter[userName, permissions]] begin[{]
if[member[.isStarted]] begin[{]
local_variable[type[ServiceDirectoryError], error]
ThrowStatement(expression=ClassCreator(arguments=[... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setUserPermission] operator[SEP] identifier[String] identifier[userName] , identifier[List] operator[<] identifier[Permission] operator[>] identifier[permissions] operator[SEP] Keyword[throws] identifier[ServiceException] {
Keyword[if] ... |
public static <T> T findOneByField(Iterable<T> collection, final String fieldName, final Object fieldValue) {
return findOne(collection, new Filter<T>() {
@Override
public boolean accept(T t) {
if (t instanceof Map) {
final Map<?, ?> map = (Map<?, ?>) t;
final Object value = map.get(fieldNam... | class class_name[name] begin[{]
method[findOneByField, return_type[type[T]], modifier[public static], parameter[collection, fieldName, fieldValue]] begin[{]
return[call[.findOne, parameter[member[.collection], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[findOneByField] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[collection] , Keyword[final] identifier[String] identifier[fieldName] , Keyword[final] identifier[Object] identifier[fieldV... |
private void patchMethodAsDeprecatedRedirector(MethodDeclaration methodToPatch, String toMethodName,
Type returnType, Parameter... parameters) {
methodToPatch.setType(returnType);
for (Parameter parameter : parameters) {
methodToPatch.addParameter(parameter);
}
me... | class class_name[name] begin[{]
method[patchMethodAsDeprecatedRedirector, return_type[void], modifier[private], parameter[methodToPatch, toMethodName, returnType, parameters]] begin[{]
call[methodToPatch.setType, parameter[member[.returnType]]]
ForStatement(body=BlockStatement(label=Non... | Keyword[private] Keyword[void] identifier[patchMethodAsDeprecatedRedirector] operator[SEP] identifier[MethodDeclaration] identifier[methodToPatch] , identifier[String] identifier[toMethodName] , identifier[Type] identifier[returnType] , identifier[Parameter] operator[...] identifier[parameters] operator[SEP] {
... |
public static void unload() {
if(elements != null) {
for (Element style : elements) {
style.removeFromParent();
}
elements.clear();
}
} | class class_name[name] begin[{]
method[unload, return_type[void], modifier[public static], parameter[]] begin[{]
if[binary_operation[member[.elements], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocati... | Keyword[public] Keyword[static] Keyword[void] identifier[unload] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[elements] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[Element] identifier[style] operator[:] identifier[elements] operator[SEP] {
... |
public static boolean isReverseSorted(long[] longArray) {
for(int i = 0; i < longArray.length - 1 ; i++) {
if(longArray[i] < longArray [i + 1]) {
return false;
}
}
return true;
} | class class_name[name] begin[{]
method[isReverseSorted, return_type[type[boolean]], modifier[public static], parameter[longArray]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=longArray, postfix_operators=[], pre... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isReverseSorted] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[longArray] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[longArray] opera... |
protected static void shutdown() {
// stop discovery service
WebcamDiscoveryService discovery = getDiscoveryServiceRef();
if (discovery != null) {
discovery.stop();
}
// stop processor
WebcamProcessor.getInstance().shutdown();
} | class class_name[name] begin[{]
method[shutdown, return_type[void], modifier[static protected], parameter[]] begin[{]
local_variable[type[WebcamDiscoveryService], discovery]
if[binary_operation[member[.discovery], !=, literal[null]]] begin[{]
call[discovery.stop,... | Keyword[protected] Keyword[static] Keyword[void] identifier[shutdown] operator[SEP] operator[SEP] {
identifier[WebcamDiscoveryService] identifier[discovery] operator[=] identifier[getDiscoveryServiceRef] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[discovery] operator[!=] Other[... |
private void buildSimpleField(
String entryId,
String defaultFileId,
Map<String, CmsClientProperty> ownProps,
Map<String, CmsClientProperty> defaultFileProps,
String propName) {
CmsXmlContentProperty propDef = m_propertyConfig.get(propName);
CmsClientProperty fil... | class class_name[name] begin[{]
method[buildSimpleField, return_type[void], modifier[private], parameter[entryId, defaultFileId, ownProps, defaultFileProps, propName]] begin[{]
local_variable[type[CmsXmlContentProperty], propDef]
local_variable[type[CmsClientProperty], fileProp]
local_v... | Keyword[private] Keyword[void] identifier[buildSimpleField] operator[SEP] identifier[String] identifier[entryId] , identifier[String] identifier[defaultFileId] , identifier[Map] operator[<] identifier[String] , identifier[CmsClientProperty] operator[>] identifier[ownProps] , identifier[Map] operator[<] identifier[S... |
public static boolean containsWebSocketScheme(URI uri) {
Objects.requireNonNull(uri, "no URI object given");
final String scheme = uri.getScheme();
if (scheme != null && (scheme.equals(WS_SCHEME) || scheme.equals(WSS_SCHEME))) {
return true;
}
return false;
} | class class_name[name] begin[{]
method[containsWebSocketScheme, return_type[type[boolean]], modifier[public static], parameter[uri]] begin[{]
call[Objects.requireNonNull, parameter[member[.uri], literal["no URI object given"]]]
local_variable[type[String], scheme]
if[bin... | Keyword[public] Keyword[static] Keyword[boolean] identifier[containsWebSocketScheme] operator[SEP] identifier[URI] identifier[uri] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[uri] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[St... |
@Override
@Check
public void checkDeadCode(XBlockExpression block) {
final EList<XExpression> expressions = block.getExpressions();
final int size = expressions.size();
for (int i = 0; i < size - 1; ++i) {
final XExpression expression = expressions.get(i);
if (this.earlyExitComputer.isEarlyExit(expression... | class class_name[name] begin[{]
method[checkDeadCode, return_type[void], modifier[public], parameter[block]] begin[{]
local_variable[type[EList], expressions]
local_variable[type[int], size]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[]... | annotation[@] identifier[Override] annotation[@] identifier[Check] Keyword[public] Keyword[void] identifier[checkDeadCode] operator[SEP] identifier[XBlockExpression] identifier[block] operator[SEP] {
Keyword[final] identifier[EList] operator[<] identifier[XExpression] operator[>] identifier[expressions] operator... |
public void bindFilterPredicate(ObjectProperty<TreeItemPredicate<Category>> predicateProperty) {
predicateProperty.bind(Bindings.createObjectBinding(() -> {
if (searchText.get() == null || searchText.get().isEmpty()) {
return null;
}
return TreeItemPredicate.create(filterPredicate);
},... | class class_name[name] begin[{]
method[bindFilterPredicate, return_type[void], modifier[public], parameter[predicateProperty]] begin[{]
call[predicateProperty.bind, parameter[call[Bindings.createObjectBinding, parameter[LambdaExpression(body=[IfStatement(condition=BinaryOperation(operandl=Binar... | Keyword[public] Keyword[void] identifier[bindFilterPredicate] operator[SEP] identifier[ObjectProperty] operator[<] identifier[TreeItemPredicate] operator[<] identifier[Category] operator[>] operator[>] identifier[predicateProperty] operator[SEP] {
identifier[predicateProperty] operator[SEP] identifier[bind] oper... |
public IconProviderBuilder forShape(String shapeName, Icon icon)
{
setType(Type.MODEL);
shapeIcons.put(shapeName, checkNotNull(icon));
return this;
} | class class_name[name] begin[{]
method[forShape, return_type[type[IconProviderBuilder]], modifier[public], parameter[shapeName, icon]] begin[{]
call[.setType, parameter[member[Type.MODEL]]]
call[shapeIcons.put, parameter[member[.shapeName], call[.checkNotNull, parameter[member[.... | Keyword[public] identifier[IconProviderBuilder] identifier[forShape] operator[SEP] identifier[String] identifier[shapeName] , identifier[Icon] identifier[icon] operator[SEP] {
identifier[setType] operator[SEP] identifier[Type] operator[SEP] identifier[MODEL] operator[SEP] operator[SEP] identifier[shapeIcons] op... |
public final int writeTo(final OutputStream os,int offset, int maxWriteSize) throws IOException {
int bytesToWrite = Math.min(blobReference.getBytes().length - offset, maxWriteSize);
os.write(blobReference.getBytes(), offset, blobReference.getBytes().length);
return bytesToWrite;
} | class class_name[name] begin[{]
method[writeTo, return_type[type[int]], modifier[final public], parameter[os, offset, maxWriteSize]] begin[{]
local_variable[type[int], bytesToWrite]
call[os.write, parameter[call[blobReference.getBytes, parameter[]], member[.offset], call[blobReference.g... | Keyword[public] Keyword[final] Keyword[int] identifier[writeTo] operator[SEP] Keyword[final] identifier[OutputStream] identifier[os] , Keyword[int] identifier[offset] , Keyword[int] identifier[maxWriteSize] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[bytesToWrite] operator[=... |
protected Map<String, OperationTransformer> buildOperationTransformers(AttributeTransformationDescriptionBuilderImpl.AttributeTransformationDescriptionBuilderRegistry registry) {
final Map<String, OperationTransformer> operations = new HashMap<String, OperationTransformer>();
for(final Map.Entry<String,... | class class_name[name] begin[{]
method[buildOperationTransformers, return_type[type[Map]], modifier[protected], parameter[registry]] begin[{]
local_variable[type[Map], operations]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Vari... | Keyword[protected] identifier[Map] operator[<] identifier[String] , identifier[OperationTransformer] operator[>] identifier[buildOperationTransformers] operator[SEP] identifier[AttributeTransformationDescriptionBuilderImpl] operator[SEP] identifier[AttributeTransformationDescriptionBuilderRegistry] identifier[registry... |
public DriverPropertyInfo[] getPropertyInfo(String url,
Properties info)
throws SQLException {
if (url != null) {
UrlParser urlParser = UrlParser.parse(url, info);
if (urlParser == null || urlParser.getOptions() == null) {
return new DriverPropertyInfo[0];
}
List<DriverP... | class class_name[name] begin[{]
method[getPropertyInfo, return_type[type[DriverPropertyInfo]], modifier[public], parameter[url, info]] begin[{]
if[binary_operation[member[.url], !=, literal[null]]] begin[{]
local_variable[type[UrlParser], urlParser]
if[binary... | Keyword[public] identifier[DriverPropertyInfo] operator[SEP] operator[SEP] identifier[getPropertyInfo] operator[SEP] identifier[String] identifier[url] , identifier[Properties] identifier[info] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[url] operator[!=] Other[... |
public void makePackage( PdfName initialView ) {
PdfCollection collection = new PdfCollection(0);
collection.put(PdfName.VIEW, initialView);
stamper.makePackage( collection );
} | class class_name[name] begin[{]
method[makePackage, return_type[void], modifier[public], parameter[initialView]] begin[{]
local_variable[type[PdfCollection], collection]
call[collection.put, parameter[member[PdfName.VIEW], member[.initialView]]]
call[stamper.makePackage,... | Keyword[public] Keyword[void] identifier[makePackage] operator[SEP] identifier[PdfName] identifier[initialView] operator[SEP] {
identifier[PdfCollection] identifier[collection] operator[=] Keyword[new] identifier[PdfCollection] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[collection] operator[SE... |
private CmsComboWidget createTemplateSelect() {
List<CmsSelectWidgetOption> options = new ArrayList<CmsSelectWidgetOption>();
try {
I_CmsResourceType templateType = OpenCms.getResourceManager().getResourceType(
CmsResourceTypeJsp.getContainerPageTemplateTypeName());
... | class class_name[name] begin[{]
method[createTemplateSelect, return_type[type[CmsComboWidget]], modifier[private], parameter[]] begin[{]
local_variable[type[List], options]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Me... | Keyword[private] identifier[CmsComboWidget] identifier[createTemplateSelect] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[CmsSelectWidgetOption] operator[>] identifier[options] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CmsSelectWidgetOption] operator[>] operat... |
@BetaApi
public final Operation deleteInstance(String instance) {
DeleteInstanceHttpRequest request =
DeleteInstanceHttpRequest.newBuilder().setInstance(instance).build();
return deleteInstance(request);
} | class class_name[name] begin[{]
method[deleteInstance, return_type[type[Operation]], modifier[final public], parameter[instance]] begin[{]
local_variable[type[DeleteInstanceHttpRequest], request]
return[call[.deleteInstance, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[deleteInstance] operator[SEP] identifier[String] identifier[instance] operator[SEP] {
identifier[DeleteInstanceHttpRequest] identifier[request] operator[=] identifier[DeleteInstanceHttpRequest] operator[SEP] identif... |
public Matrix4f setPerspectiveRect(float width, float height, float zNear, float zFar) {
return setPerspectiveRect(width, height, zNear, zFar, false);
} | class class_name[name] begin[{]
method[setPerspectiveRect, return_type[type[Matrix4f]], modifier[public], parameter[width, height, zNear, zFar]] begin[{]
return[call[.setPerspectiveRect, parameter[member[.width], member[.height], member[.zNear], member[.zFar], literal[false]]]]
end[}]
END[}] | Keyword[public] identifier[Matrix4f] identifier[setPerspectiveRect] operator[SEP] Keyword[float] identifier[width] , Keyword[float] identifier[height] , Keyword[float] identifier[zNear] , Keyword[float] identifier[zFar] operator[SEP] {
Keyword[return] identifier[setPerspectiveRect] operator[SEP] identifier[wi... |
_Private_IonManagedBinaryWriterBuilder withImports(final ImportedSymbolResolverMode mode, final List<SymbolTable> tables) {
imports = new ImportedSymbolContext(mode, tables);
return this;
} | class class_name[name] begin[{]
method[withImports, return_type[type[_Private_IonManagedBinaryWriterBuilder]], modifier[default], parameter[mode, tables]] begin[{]
assign[member[.imports], ClassCreator(arguments=[MemberReference(member=mode, postfix_operators=[], prefix_operators=[], qualifier=... | identifier[_Private_IonManagedBinaryWriterBuilder] identifier[withImports] operator[SEP] Keyword[final] identifier[ImportedSymbolResolverMode] identifier[mode] , Keyword[final] identifier[List] operator[<] identifier[SymbolTable] operator[>] identifier[tables] operator[SEP] {
identifier[imports] operator[=] Key... |
public LocalTime plusNanos(long nanosToAdd) {
if (nanosToAdd == 0) {
return this;
}
long nofd = toNanoOfDay();
long newNofd = ((nanosToAdd % NANOS_PER_DAY) + nofd + NANOS_PER_DAY) % NANOS_PER_DAY;
if (nofd == newNofd) {
return this;
}
int n... | class class_name[name] begin[{]
method[plusNanos, return_type[type[LocalTime]], modifier[public], parameter[nanosToAdd]] begin[{]
if[binary_operation[member[.nanosToAdd], ==, literal[0]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
local_variable[type[l... | Keyword[public] identifier[LocalTime] identifier[plusNanos] operator[SEP] Keyword[long] identifier[nanosToAdd] operator[SEP] {
Keyword[if] operator[SEP] identifier[nanosToAdd] operator[==] Other[0] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP]
}
Keyword[long] identifier[nof... |
@Override
public void enterSourceElement(QueryParser.SourceElementContext ctx) {
queryExprMeta = QueryExprMeta.create();
infoMap.put(ctx, queryExprMeta);
// root source element
if (ctx.getParent() instanceof QueryParser.SourceElementsContext) {
queryExprMetaList.add(query... | class class_name[name] begin[{]
method[enterSourceElement, return_type[void], modifier[public], parameter[ctx]] begin[{]
assign[member[.queryExprMeta], call[QueryExprMeta.create, parameter[]]]
call[infoMap.put, parameter[member[.ctx], member[.queryExprMeta]]]
if[... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[enterSourceElement] operator[SEP] identifier[QueryParser] operator[SEP] identifier[SourceElementContext] identifier[ctx] operator[SEP] {
identifier[queryExprMeta] operator[=] identifier[QueryExprMeta] operator[SEP] identifier[create] ope... |
public alluxio.grpc.RunPOptionsOrBuilder getOptionsOrBuilder() {
return options_ == null ? alluxio.grpc.RunPOptions.getDefaultInstance() : options_;
} | class class_name[name] begin[{]
method[getOptionsOrBuilder, return_type[type[alluxio]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=options_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Lit... | Keyword[public] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[RunPOptionsOrBuilder] identifier[getOptionsOrBuilder] operator[SEP] operator[SEP] {
Keyword[return] identifier[options_] operator[==] Other[null] operator[?] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP... |
public boolean preValidateBugLinks(final ContentSpec contentSpec) {
// If Bug Links are turned off then there isn't any need to validate them.
if (!contentSpec.isInjectBugLinks()) {
return true;
}
final BugLinkOptions bugOptions;
final BugLinkType type;
if (c... | class class_name[name] begin[{]
method[preValidateBugLinks, return_type[type[boolean]], modifier[public], parameter[contentSpec]] begin[{]
if[call[contentSpec.isInjectBugLinks, parameter[]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
local_varia... | Keyword[public] Keyword[boolean] identifier[preValidateBugLinks] operator[SEP] Keyword[final] identifier[ContentSpec] identifier[contentSpec] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[contentSpec] operator[SEP] identifier[isInjectBugLinks] operator[SEP] operator[SEP] operator[SEP] {
... |
public NotifyingFuture<V> poll(long timeout, TimeUnit unit) throws InterruptedException {
return completionQueue.poll(timeout, unit);
} | class class_name[name] begin[{]
method[poll, return_type[type[NotifyingFuture]], modifier[public], parameter[timeout, unit]] begin[{]
return[call[completionQueue.poll, parameter[member[.timeout], member[.unit]]]]
end[}]
END[}] | Keyword[public] identifier[NotifyingFuture] operator[<] identifier[V] operator[>] identifier[poll] operator[SEP] Keyword[long] identifier[timeout] , identifier[TimeUnit] identifier[unit] operator[SEP] Keyword[throws] identifier[InterruptedException] {
Keyword[return] identifier[completionQueue] operator[SEP] id... |
private boolean hasMessages(String shardName) throws MessageQueueException {
UUID currentTime = TimeUUIDUtils.getUniqueTimeUUIDinMicros();
try {
ColumnList<MessageQueueEntry> result = keyspace.prepareQuery(queueColumnFamily)
.setConsistencyLevel(consistencyLevel)
... | class class_name[name] begin[{]
method[hasMessages, return_type[type[boolean]], modifier[private], parameter[shardName]] begin[{]
local_variable[type[UUID], currentTime]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Metho... | Keyword[private] Keyword[boolean] identifier[hasMessages] operator[SEP] identifier[String] identifier[shardName] operator[SEP] Keyword[throws] identifier[MessageQueueException] {
identifier[UUID] identifier[currentTime] operator[=] identifier[TimeUUIDUtils] operator[SEP] identifier[getUniqueTimeUUIDinMicros] ope... |
public static String toDashedForm(String name, int start) {
StringBuilder result = new StringBuilder();
String replaced = name.replace('_', '-');
for (int i = start; i < replaced.length(); i++) {
char ch = replaced.charAt(i);
if (Character.isUpperCase(ch) && result.length() > 0
&& result.charAt(result.... | class class_name[name] begin[{]
method[toDashedForm, return_type[type[String]], modifier[public static], parameter[name, start]] begin[{]
local_variable[type[StringBuilder], result]
local_variable[type[String], replaced]
ForStatement(body=BlockStatement(label=None, statements=[LocalVari... | Keyword[public] Keyword[static] identifier[String] identifier[toDashedForm] operator[SEP] identifier[String] identifier[name] , Keyword[int] identifier[start] operator[SEP] {
identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP]... |
public static MatrixNd createLookAt(int size, Vector3d eye, Vector3d at, Vector3d up) {
if (size < 4) {
throw new IllegalArgumentException("Minimum matrix size is 4");
}
final Vector3d f = at.sub(eye).normalize();
up = up.normalize();
final Vector3d s = f.cross(up).no... | class class_name[name] begin[{]
method[createLookAt, return_type[type[MatrixNd]], modifier[public static], parameter[size, eye, at, up]] begin[{]
if[binary_operation[member[.size], <, literal[4]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[... | Keyword[public] Keyword[static] identifier[MatrixNd] identifier[createLookAt] operator[SEP] Keyword[int] identifier[size] , identifier[Vector3d] identifier[eye] , identifier[Vector3d] identifier[at] , identifier[Vector3d] identifier[up] operator[SEP] {
Keyword[if] operator[SEP] identifier[size] operator[<] Ot... |
static ArrayInt factory(Index index, boolean isUnsigned) {
return ArrayInt.factory(index, isUnsigned, null);
} | class class_name[name] begin[{]
method[factory, return_type[type[ArrayInt]], modifier[static], parameter[index, isUnsigned]] begin[{]
return[call[ArrayInt.factory, parameter[member[.index], member[.isUnsigned], literal[null]]]]
end[}]
END[}] | Keyword[static] identifier[ArrayInt] identifier[factory] operator[SEP] identifier[Index] identifier[index] , Keyword[boolean] identifier[isUnsigned] operator[SEP] {
Keyword[return] identifier[ArrayInt] operator[SEP] identifier[factory] operator[SEP] identifier[index] , identifier[isUnsigned] , Other[null] ope... |
public TOTPBuilder digits(int digits) {
Preconditions.checkArgument(Range.closed(MIN_ALLOWED_DIGITS, MAX_ALLOWED_DIGITS).contains(digits));
this.digits = digits;
return this;
} | class class_name[name] begin[{]
method[digits, return_type[type[TOTPBuilder]], modifier[public], parameter[digits]] begin[{]
call[Preconditions.checkArgument, parameter[call[Range.closed, parameter[member[.MIN_ALLOWED_DIGITS], member[.MAX_ALLOWED_DIGITS]]]]]
assign[THIS[member[N... | Keyword[public] identifier[TOTPBuilder] identifier[digits] operator[SEP] Keyword[int] identifier[digits] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[Range] operator[SEP] identifier[closed] operator[SEP] identifier[MIN_ALLOWED_DIGITS] , identifier[MA... |
public Node getLastChild()
{
ElemTemplateElement lastChild = null;
for (ElemTemplateElement node = m_firstChild; node != null;
node = node.m_nextSibling)
{
lastChild = node;
}
return lastChild;
} | class class_name[name] begin[{]
method[getLastChild, return_type[type[Node]], modifier[public], parameter[]] begin[{]
local_variable[type[ElemTemplateElement], lastChild]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReferen... | Keyword[public] identifier[Node] identifier[getLastChild] operator[SEP] operator[SEP] {
identifier[ElemTemplateElement] identifier[lastChild] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[ElemTemplateElement] identifier[node] operator[=] identifier[m_firstChild] operator[SEP] identi... |
public void marshall(BatchDeleteImportDataRequest batchDeleteImportDataRequest, ProtocolMarshaller protocolMarshaller) {
if (batchDeleteImportDataRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.mars... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[batchDeleteImportDataRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.batchDeleteImportDataRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[BatchDeleteImportDataRequest] identifier[batchDeleteImportDataRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[batchDeleteImportDataRequest] operator[==] Other... |
public void setErrorMessage(String errorMessage) {
m_errorMessage = errorMessage;
m_errorLabel.setValue(errorMessage != null ? errorMessage : "");
} | class class_name[name] begin[{]
method[setErrorMessage, return_type[void], modifier[public], parameter[errorMessage]] begin[{]
assign[member[.m_errorMessage], member[.errorMessage]]
call[m_errorLabel.setValue, parameter[TernaryExpression(condition=BinaryOperation(operandl=Member... | Keyword[public] Keyword[void] identifier[setErrorMessage] operator[SEP] identifier[String] identifier[errorMessage] operator[SEP] {
identifier[m_errorMessage] operator[=] identifier[errorMessage] operator[SEP] identifier[m_errorLabel] operator[SEP] identifier[setValue] operator[SEP] identifier[errorMessage] oper... |
private Optional<ResolvedType> find(Map<Node, ResolvedType> map, LambdaExpr lambdaExpr) {
for (Node key : map.keySet()) {
if (key instanceof LambdaExpr) {
LambdaExpr keyLambdaExpr = (LambdaExpr) key;
if (keyLambdaExpr.toString().equals(lambdaExpr.toString()) && getPar... | class class_name[name] begin[{]
method[find, return_type[type[Optional]], modifier[private], parameter[map, lambdaExpr]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=key, postfix_operators=[], prefix_operators=[]... | Keyword[private] identifier[Optional] operator[<] identifier[ResolvedType] operator[>] identifier[find] operator[SEP] identifier[Map] operator[<] identifier[Node] , identifier[ResolvedType] operator[>] identifier[map] , identifier[LambdaExpr] identifier[lambdaExpr] operator[SEP] {
Keyword[for] operator[SEP] id... |
public static List<VarSymbol> findAllFields(Type classType, VisitorState state) {
// TODO(andrewrice): Switch collector to ImmutableList.toImmutableList() when released
return state.getTypes().closure(classType).stream()
.flatMap(
type -> {
TypeSymbol tsym = type.tsym;
... | class class_name[name] begin[{]
method[findAllFields, return_type[type[List]], modifier[public static], parameter[classType, state]] begin[{]
return[call[state.getTypes, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[VarSymbol] operator[>] identifier[findAllFields] operator[SEP] identifier[Type] identifier[classType] , identifier[VisitorState] identifier[state] operator[SEP] {
Keyword[return] identifier[state] operator[SEP] identifier[getTypes] operator... |
@SuppressWarnings("unchecked")
public <T> T postProcess(T object) {
if (object == null) {
return null;
}
T result = null;
try {
result = (T) this.autowireBeanFactory.initializeBean(object,
object.toString());
}
catch (RuntimeException e) {
Class<?> type = object.getClass();
throw new Runti... | class class_name[name] begin[{]
method[postProcess, return_type[type[T]], modifier[public], parameter[object]] begin[{]
if[binary_operation[member[.object], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[T], r... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[postProcess] operator[SEP] identifier[T] identifier[object] operator[SEP] {
Keyword[if] operator[SEP] identifier[object] operator[==] Other[null] o... |
private void serializeRealObject() throws ObjectFailedToSerializeException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "serializeRealObject");
if (hasRealObject) {
// If the realObject isn't null, we need to serialize it & set it int... | class class_name[name] begin[{]
method[serializeRealObject, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[THIS[], ... | Keyword[private] Keyword[void] identifier[serializeRealObject] operator[SEP] operator[SEP] Keyword[throws] identifier[ObjectFailedToSerializeException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] oper... |
protected void incrementNamedCountingMonitor(String name, ConcurrentMap<String, NamedCountingMonitor> map) {
NamedCountingMonitor monitor = map.get(name);
if (monitor == null) {
monitor = new NamedCountingMonitor(name);
NamedCountingMonitor conflict = map.putIfAbsent(name, monito... | class class_name[name] begin[{]
method[incrementNamedCountingMonitor, return_type[void], modifier[protected], parameter[name, map]] begin[{]
local_variable[type[NamedCountingMonitor], monitor]
if[binary_operation[member[.monitor], ==, literal[null]]] begin[{]
ass... | Keyword[protected] Keyword[void] identifier[incrementNamedCountingMonitor] operator[SEP] identifier[String] identifier[name] , identifier[ConcurrentMap] operator[<] identifier[String] , identifier[NamedCountingMonitor] operator[>] identifier[map] operator[SEP] {
identifier[NamedCountingMonitor] identifier[moni... |
private static void startIfNotStarted(String serviceName) {
synchronized (queueNames) {
if (!queueNames.contains(serviceName)) {
//以下是新建一个rabbitmq客户端
try {
IMqConsumerClient.singleton.consumeStaticQueue(TransferQueueUtil.getTransferQueue(serviceNam... | class class_name[name] begin[{]
method[startIfNotStarted, return_type[void], modifier[private static], parameter[serviceName]] begin[{]
SYNCHRONIZED[member[.queueNames]] BEGIN[{]
if[call[queueNames.contains, parameter[member[.serviceName]]]] begin[{]
TryS... | Keyword[private] Keyword[static] Keyword[void] identifier[startIfNotStarted] operator[SEP] identifier[String] identifier[serviceName] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[queueNames] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[queueNames] operator[SEP] id... |
@Override
public void visit(NodeVisitor v) {
if (v.visit(this)) {
variables.visit(v);
if (body != null) {
body.visit(v);
}
}
} | class class_name[name] begin[{]
method[visit, return_type[void], modifier[public], parameter[v]] begin[{]
if[call[v.visit, parameter[THIS[]]]] begin[{]
call[variables.visit, parameter[member[.v]]]
if[binary_operation[member[.body], !=, literal[nul... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] identifier[NodeVisitor] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] identifier[v] operator[SEP] identifier[visit] operator[SEP] Keyword[this] operator[SEP] operator[SEP] {
identifier[variables]... |
static public <E> E create(File file, Class<E> type) throws XmlBeanException, IOException, SAXException, InstantiationException, IllegalAccessException {
Object obj = type.newInstance();
configure(file, obj);
return (E)obj;
} | class class_name[name] begin[{]
method[create, return_type[type[E]], modifier[public static], parameter[file, type]] begin[{]
local_variable[type[Object], obj]
call[.configure, parameter[member[.file], member[.obj]]]
return[Cast(expression=MemberReference(member=obj, postfix_ope... | Keyword[static] Keyword[public] operator[<] identifier[E] operator[>] identifier[E] identifier[create] operator[SEP] identifier[File] identifier[file] , identifier[Class] operator[<] identifier[E] operator[>] identifier[type] operator[SEP] Keyword[throws] identifier[XmlBeanException] , identifier[IOException] , iden... |
private static Set<Language> getApplicableLanguages(PMDConfiguration configuration, RuleSets ruleSets) {
Set<Language> languages = new HashSet<>();
LanguageVersionDiscoverer discoverer = configuration.getLanguageVersionDiscoverer();
for (Rule rule : ruleSets.getAllRules()) {
Languag... | class class_name[name] begin[{]
method[getApplicableLanguages, return_type[type[Set]], modifier[private static], parameter[configuration, ruleSets]] begin[{]
local_variable[type[Set], languages]
local_variable[type[LanguageVersionDiscoverer], discoverer]
ForStatement(body=BlockStatement... | Keyword[private] Keyword[static] identifier[Set] operator[<] identifier[Language] operator[>] identifier[getApplicableLanguages] operator[SEP] identifier[PMDConfiguration] identifier[configuration] , identifier[RuleSets] identifier[ruleSets] operator[SEP] {
identifier[Set] operator[<] identifier[Language] opera... |
public static Response bearerError(Status status, String challenge)
{
return builder(status).header("WWW-Authenticate", challenge).build();
} | class class_name[name] begin[{]
method[bearerError, return_type[type[Response]], modifier[public static], parameter[status, challenge]] begin[{]
return[call[.builder, parameter[member[.status]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Response] identifier[bearerError] operator[SEP] identifier[Status] identifier[status] , identifier[String] identifier[challenge] operator[SEP] {
Keyword[return] identifier[builder] operator[SEP] identifier[status] operator[SEP] operator[SEP] identifier[header] operator... |
protected Element elementImpl(String name, String namespaceURI) {
assertElementContainsNoOrWhitespaceOnlyTextNodes(this.xmlNode);
if (namespaceURI == null) {
return getDocument().createElement(name);
} else {
return getDocument().createElementNS(namespaceURI, name);
... | class class_name[name] begin[{]
method[elementImpl, return_type[type[Element]], modifier[protected], parameter[name, namespaceURI]] begin[{]
call[.assertElementContainsNoOrWhitespaceOnlyTextNodes, parameter[THIS[member[None.xmlNode]]]]
if[binary_operation[member[.namespaceURI], ... | Keyword[protected] identifier[Element] identifier[elementImpl] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[namespaceURI] operator[SEP] {
identifier[assertElementContainsNoOrWhitespaceOnlyTextNodes] operator[SEP] Keyword[this] operator[SEP] identifier[xmlNode] operator[SEP] ... |
public void deleteBulkDocsAsync(String index, String type,
ActionListener<BulkResponse> bulkResponseActionListener) {
executeBulkRequestAsync(
buildDeleteBulkRequestBuilder(
buildAllDeleteRequestBuilderList(index, type)),
bulkResponseActionList... | class class_name[name] begin[{]
method[deleteBulkDocsAsync, return_type[void], modifier[public], parameter[index, type, bulkResponseActionListener]] begin[{]
call[.executeBulkRequestAsync, parameter[call[.buildDeleteBulkRequestBuilder, parameter[call[.buildAllDeleteRequestBuilderList, parameter... | Keyword[public] Keyword[void] identifier[deleteBulkDocsAsync] operator[SEP] identifier[String] identifier[index] , identifier[String] identifier[type] , identifier[ActionListener] operator[<] identifier[BulkResponse] operator[>] identifier[bulkResponseActionListener] operator[SEP] {
identifier[executeBulkReque... |
public java.util.Map<java.lang.String, org.tensorflow.framework.SignatureDef> getSignatureDefMap() {
return internalGetSignatureDef().getMap();
} | class class_name[name] begin[{]
method[getSignatureDefMap, return_type[type[java]], modifier[public], parameter[]] begin[{]
return[call[.internalGetSignatureDef, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] , identifier[org] operator[SEP] identifier[tensorflow] operator[SEP] identifier[framework] operator[SEP] identifier[SignatureDef] op... |
@Override
public PipelineEventReader<XMLEventReader, XMLEvent> getEventReader(
HttpServletRequest request, HttpServletResponse response) {
// Get the reader from the parent and add the attribute incorporating wrapper
final PipelineEventReader<XMLEventReader, XMLEvent> cachingEventReader ... | class class_name[name] begin[{]
method[getEventReader, return_type[type[PipelineEventReader]], modifier[public], parameter[request, response]] begin[{]
local_variable[type[PipelineEventReader], cachingEventReader]
local_variable[type[XMLEventReader], eventReader]
local_variable[type[Map... | annotation[@] identifier[Override] Keyword[public] identifier[PipelineEventReader] operator[<] identifier[XMLEventReader] , identifier[XMLEvent] operator[>] identifier[getEventReader] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] operator[SEP] ... |
public int read(byte[] b, int off, int len) throws IOException
{
if (_expectContinues!=null)
expectContinues();
return super.read(b, off, len);
} | class class_name[name] begin[{]
method[read, return_type[type[int]], modifier[public], parameter[b, off, len]] begin[{]
if[binary_operation[member[._expectContinues], !=, literal[null]]] begin[{]
call[.expectContinues, parameter[]]
else begin[{]
None
end[}]
r... | Keyword[public] Keyword[int] identifier[read] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[_expectContinues] operator[!=] Other[nul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.