code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static int execute(String... args) {
Start jdoc = new Start();
return jdoc.begin(args).exitCode;
} | class class_name[name] begin[{]
method[execute, return_type[type[int]], modifier[public static], parameter[args]] begin[{]
local_variable[type[Start], jdoc]
return[call[jdoc.begin, parameter[member[.args]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[int] identifier[execute] operator[SEP] identifier[String] operator[...] identifier[args] operator[SEP] {
identifier[Start] identifier[jdoc] operator[=] Keyword[new] identifier[Start] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[jdoc] operator[SEP] i... |
public static Bitmap clipSquare(@NonNull final Bitmap bitmap, final int size,
final int borderWidth, @ColorInt final int borderColor) {
Condition.INSTANCE.ensureAtLeast(borderWidth, 0, "The border width must be at least 0");
Bitmap clippedBitmap = clipSquare(bitmap, s... | class class_name[name] begin[{]
method[clipSquare, return_type[type[Bitmap]], modifier[public static], parameter[bitmap, size, borderWidth, borderColor]] begin[{]
call[Condition.INSTANCE.ensureAtLeast, parameter[member[.borderWidth], literal[0], literal["The border width must be at least 0"]]]
... | Keyword[public] Keyword[static] identifier[Bitmap] identifier[clipSquare] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Bitmap] identifier[bitmap] , Keyword[final] Keyword[int] identifier[size] , Keyword[final] Keyword[int] identifier[borderWidth] , annotation[@] identifier[ColorInt] Keyw... |
public Map<String, Object> parseToMap(String source) throws ParseException {
ParsePosition pos = new ParsePosition(0);
Map<String, Object> result = new HashMap<String, Object>();
parse(0, source, pos, null, result);
if (pos.getIndex() == 0) // unchanged, returned object is null
... | class class_name[name] begin[{]
method[parseToMap, return_type[type[Map]], modifier[public], parameter[source]] begin[{]
local_variable[type[ParsePosition], pos]
local_variable[type[Map], result]
call[.parse, parameter[literal[0], member[.source], member[.pos], literal[null], me... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parseToMap] operator[SEP] identifier[String] identifier[source] operator[SEP] Keyword[throws] identifier[ParseException] {
identifier[ParsePosition] identifier[pos] operator[=] Keyword[new] identifier[Pars... |
public ResultMatcher isArray() {
return new AbstractResultMatcher(path, configuration) {
public void doMatch(Object actual) {
isPresent(actual);
Node node = getNode(actual);
if (node.getNodeType() != ARRAY) {
failOnType(node, "an ar... | class class_name[name] begin[{]
method[isArray, return_type[type[ResultMatcher]], modifier[public], parameter[]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configuration, postfix_opera... | Keyword[public] identifier[ResultMatcher] identifier[isArray] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[AbstractResultMatcher] operator[SEP] identifier[path] , identifier[configuration] operator[SEP] {
Keyword[public] Keyword[void] identifier[doMatch] operator[SEP] identif... |
public int getMaxActiveMessages()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "getMaxActiveMessages");
SibTr.exit(tc, "getMaxActiveMessages", Integer.valueOf(_maxActiveMessages));
}
return _maxActiveMessages;
} | class class_name[name] begin[{]
method[getMaxActiveMessages, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, p... | Keyword[public] Keyword[int] identifier[getMaxActiveMessages] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SE... |
protected void validate(String operationType) throws Exception
{
super.validate(operationType);
MPSString serial_no_validator = new MPSString();
serial_no_validator.validate(operationType, serial_no, "\"serial_no\"");
MPSString id_validator = new MPSString();
id_validator.validate(operationType, ... | class class_name[name] begin[{]
method[validate, return_type[void], modifier[protected], parameter[operationType]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=operationType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=validate, postfix_oper... | Keyword[protected] Keyword[void] identifier[validate] operator[SEP] identifier[String] identifier[operationType] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[super] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] operator[SEP] operator[SEP] identifier[MPSString] identi... |
private void notifyListeners(List<PipelineTimelineEntry> newEntries) {
Map<CaseInsensitiveString, PipelineTimelineEntry> pipelineToOldestEntry = new HashMap<>();
for (PipelineTimelineEntry challenger : newEntries) {
CaseInsensitiveString pipelineName = new CaseInsensitiveString(challenger.ge... | class class_name[name] begin[{]
method[notifyListeners, return_type[void], modifier[private], parameter[newEntries]] begin[{]
local_variable[type[Map], pipelineToOldestEntry]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableD... | Keyword[private] Keyword[void] identifier[notifyListeners] operator[SEP] identifier[List] operator[<] identifier[PipelineTimelineEntry] operator[>] identifier[newEntries] operator[SEP] {
identifier[Map] operator[<] identifier[CaseInsensitiveString] , identifier[PipelineTimelineEntry] operator[>] identifier[pipe... |
public String getRegistryUrl() {
String host = getRegistryHost();
int port = getRegistryPort();
host = host.substring(host.length() - 1).equals("/") ?
host.substring(0, host.length() - 1)
: host;
host = host.replaceFirst("http://", "");
host = hos... | class class_name[name] begin[{]
method[getRegistryUrl, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], host]
local_variable[type[int], port]
assign[member[.host], TernaryExpression(condition=MethodInvocation(arguments=[BinaryOperat... | Keyword[public] identifier[String] identifier[getRegistryUrl] operator[SEP] operator[SEP] {
identifier[String] identifier[host] operator[=] identifier[getRegistryHost] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[port] operator[=] identifier[getRegistryPort] operator[SEP] operator[SEP] opera... |
@MainThread
public void removeObserver(@NonNull final Observer<T> observer) {
assertMainThread("removeObserver");
ObserverWrapper removed = mObservers.remove(observer);
if (removed == null) {
return;
}
removed.detachObserver();
removed.activeStateChanged(f... | class class_name[name] begin[{]
method[removeObserver, return_type[void], modifier[public], parameter[observer]] begin[{]
call[.assertMainThread, parameter[literal["removeObserver"]]]
local_variable[type[ObserverWrapper], removed]
if[binary_operation[member[.removed], ==... | annotation[@] identifier[MainThread] Keyword[public] Keyword[void] identifier[removeObserver] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Observer] operator[<] identifier[T] operator[>] identifier[observer] operator[SEP] {
identifier[assertMainThread] operator[SEP] literal[String] o... |
public void trace(@Nullable final String event, @Nullable final String message) {
log(LogLevel.TRACE, event, message, EMPTY_STRING_ARRAY, EMPTY_OBJECT_ARRAY, DEFAULT_THROWABLE);
} | class class_name[name] begin[{]
method[trace, return_type[void], modifier[public], parameter[event, message]] begin[{]
call[.log, parameter[member[LogLevel.TRACE], member[.event], member[.message], member[.EMPTY_STRING_ARRAY], member[.EMPTY_OBJECT_ARRAY], member[.DEFAULT_THROWABLE]]]
end[}]... | Keyword[public] Keyword[void] identifier[trace] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[event] , annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[message] operator[SEP] {
identifier[log] operator[SEP] identifier[LogLevel] opera... |
public Client loginWithVerifier(String verifier) {
Token token = service.getAccessToken(requestToken, new Verifier(verifier));
return loginWithAccessToken(token.getToken(), token.getSecret());
} | class class_name[name] begin[{]
method[loginWithVerifier, return_type[type[Client]], modifier[public], parameter[verifier]] begin[{]
local_variable[type[Token], token]
return[call[.loginWithAccessToken, parameter[call[token.getToken, parameter[]], call[token.getSecret, parameter[]]]]]
end[}... | Keyword[public] identifier[Client] identifier[loginWithVerifier] operator[SEP] identifier[String] identifier[verifier] operator[SEP] {
identifier[Token] identifier[token] operator[=] identifier[service] operator[SEP] identifier[getAccessToken] operator[SEP] identifier[requestToken] , Keyword[new] identifier[Ver... |
public boolean isRootedWithoutBusyBoxCheck() {
return detectRootManagementApps() || detectPotentiallyDangerousApps() || checkForBinary(BINARY_SU)
|| checkForDangerousProps() || checkForRWPaths()
|| detectTestKeys() || checkSuExists() || checkForRootNative() || checkForMagiskBina... | class class_name[name] begin[{]
method[isRootedWithoutBusyBoxCheck, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[call[.detectRootManageme... | Keyword[public] Keyword[boolean] identifier[isRootedWithoutBusyBoxCheck] operator[SEP] operator[SEP] {
Keyword[return] identifier[detectRootManagementApps] operator[SEP] operator[SEP] operator[||] identifier[detectPotentiallyDangerousApps] operator[SEP] operator[SEP] operator[||] identifier[checkForBinary] opera... |
public synchronized IDbgpService getDbgpService(int freePort)
{
// if (dbgpService == null) {
dbgpService = new DbgpService(freePort);
getPluginPreferences().addPropertyChangeListener(new DbgpServicePreferenceUpdater());
// }
return dbgpService;
} | class class_name[name] begin[{]
method[getDbgpService, return_type[type[IDbgpService]], modifier[synchronized public], parameter[freePort]] begin[{]
assign[member[.dbgpService], ClassCreator(arguments=[MemberReference(member=freePort, postfix_operators=[], prefix_operators=[], qualifier=, selec... | Keyword[public] Keyword[synchronized] identifier[IDbgpService] identifier[getDbgpService] operator[SEP] Keyword[int] identifier[freePort] operator[SEP] {
identifier[dbgpService] operator[=] Keyword[new] identifier[DbgpService] operator[SEP] identifier[freePort] operator[SEP] operator[SEP] identifier[getPluginPre... |
public static void runExample(
AdManagerServices adManagerServices, AdManagerSession session, long productPackageId)
throws RemoteException {
// Get the ProductPackageService.
ProductPackageServiceInterface productPackageService =
adManagerServices.get(session, ProductPackageServiceInterface... | class class_name[name] begin[{]
method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session, productPackageId]] begin[{]
local_variable[type[ProductPackageServiceInterface], productPackageService]
local_variable[type[StatementBuilder], statementBuilder]
... | Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] , Keyword[long] identifier[productPackageId] operator[SEP] Keyword[throws] identifier[RemoteException] {
identifier[P... |
private String memberName(Member member) {
if (member instanceof Constructor)
return member.getDeclaringClass().getSimpleName();
else
return member.getName();
} | class class_name[name] begin[{]
method[memberName, return_type[type[String]], modifier[private], parameter[member]] begin[{]
if[binary_operation[member[.member], instanceof, type[Constructor]]] begin[{]
return[call[member.getDeclaringClass, parameter[]]]
else begin[{]
return[call[member... | Keyword[private] identifier[String] identifier[memberName] operator[SEP] identifier[Member] identifier[member] operator[SEP] {
Keyword[if] operator[SEP] identifier[member] Keyword[instanceof] identifier[Constructor] operator[SEP] Keyword[return] identifier[member] operator[SEP] identifier[getDeclaringClass] oper... |
private static ServiceAccount parseToServiceAccount(JsonArray jsonArray, String serviceInstanceName) {
ServiceAccount account = null;
for (int i = 0; i < jsonArray.size(); i++) {
JsonObject gpObj = jsonArray.get(i).getAsJsonObject();
if (serviceInstanceName != null) {
... | class class_name[name] begin[{]
method[parseToServiceAccount, return_type[type[ServiceAccount]], modifier[private static], parameter[jsonArray, serviceInstanceName]] begin[{]
local_variable[type[ServiceAccount], account]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDecl... | Keyword[private] Keyword[static] identifier[ServiceAccount] identifier[parseToServiceAccount] operator[SEP] identifier[JsonArray] identifier[jsonArray] , identifier[String] identifier[serviceInstanceName] operator[SEP] {
identifier[ServiceAccount] identifier[account] operator[=] Other[null] operator[SEP] Keywor... |
private boolean isReadOnlyKey(Collection.Key key) {
return (key.equals(KeyConstants._java) || key.equals(KeyConstants._separator) || key.equals(KeyConstants._os) || key.equals(KeyConstants._coldfusion)
|| key.equals(KeyConstants._lucee));
} | class class_name[name] begin[{]
method[isReadOnlyKey, return_type[type[boolean]], modifier[private], parameter[key]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[call[key.equals, parameter[member[KeyConstants._java]]], ||, call[key.equals, parameter[member[KeyCons... | Keyword[private] Keyword[boolean] identifier[isReadOnlyKey] operator[SEP] identifier[Collection] operator[SEP] identifier[Key] identifier[key] operator[SEP] {
Keyword[return] operator[SEP] identifier[key] operator[SEP] identifier[equals] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_java] oper... |
public OperationTrace startAdvancedTracer(String name)
{
return new OperationTrace(name, tracer.get(), state.getSessionId());
} | class class_name[name] begin[{]
method[startAdvancedTracer, return_type[type[OperationTrace]], modifier[public], parameter[name]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], mem... | Keyword[public] identifier[OperationTrace] identifier[startAdvancedTracer] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[return] Keyword[new] identifier[OperationTrace] operator[SEP] identifier[name] , identifier[tracer] operator[SEP] identifier[get] operator[SEP] operator[SEP] , id... |
public final AbstractItem findFirstMatching(final Filter filter) throws MessageStoreException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "findFirstMatching", filter);
AbstractItem found = null;
Link link = getHead();
while (link != nul... | class class_name[name] begin[{]
method[findFirstMatching, return_type[type[AbstractItem]], modifier[final public], parameter[filter]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.en... | Keyword[public] Keyword[final] identifier[AbstractItem] identifier[findFirstMatching] operator[SEP] Keyword[final] identifier[Filter] identifier[filter] operator[SEP] Keyword[throws] identifier[MessageStoreException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnab... |
public static double[] cumsum (double[] vector) {
// Initialize the return value:
final double[] retval = new double[vector.length];
// Iterate and cumulate:
retval[0] = vector[0];
for (int i = 1; i < retval.length; i++) {
retval[i] = vector[i] + retval[i - 1];
... | class class_name[name] begin[{]
method[cumsum, return_type[type[double]], modifier[public static], parameter[vector]] begin[{]
local_variable[type[double], retval]
assign[member[.retval], member[.vector]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpressi... | Keyword[public] Keyword[static] Keyword[double] operator[SEP] operator[SEP] identifier[cumsum] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[vector] operator[SEP] {
Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[retval] operator[=] Keyword[new] Keyword[double] operat... |
public ServiceFuture<Void> rebootAsync(String resourceGroupName, String name, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(rebootWithServiceResponseAsync(resourceGroupName, name), serviceCallback);
} | class class_name[name] begin[{]
method[rebootAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, name, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.rebootWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.nam... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[Void] operator[>] identifier[rebootAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[name] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[Void] operator[>] identifier[serviceCallba... |
public ResultsWrapper<Issue> getIssues(Params parameters) throws RedmineException {
return transport.getObjectsListNoPaging(Issue.class, parameters.getList());
} | class class_name[name] begin[{]
method[getIssues, return_type[type[ResultsWrapper]], modifier[public], parameter[parameters]] begin[{]
return[call[transport.getObjectsListNoPaging, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments... | Keyword[public] identifier[ResultsWrapper] operator[<] identifier[Issue] operator[>] identifier[getIssues] operator[SEP] identifier[Params] identifier[parameters] operator[SEP] Keyword[throws] identifier[RedmineException] {
Keyword[return] identifier[transport] operator[SEP] identifier[getObjectsListNoPaging] op... |
private static Typeface getFontFromTag(AssetManager assets, View view, boolean strict) {
final Object tagObject = view.getTag();
final String tag = tagObject instanceof String ? (String) tagObject : null;
final Typeface typeface = getFontFromString(assets, tag, strict);
if (!(tagObject ... | class class_name[name] begin[{]
method[getFontFromTag, return_type[type[Typeface]], modifier[private static], parameter[assets, view, strict]] begin[{]
local_variable[type[Object], tagObject]
local_variable[type[String], tag]
local_variable[type[Typeface], typeface]
if[b... | Keyword[private] Keyword[static] identifier[Typeface] identifier[getFontFromTag] operator[SEP] identifier[AssetManager] identifier[assets] , identifier[View] identifier[view] , Keyword[boolean] identifier[strict] operator[SEP] {
Keyword[final] identifier[Object] identifier[tagObject] operator[=] identifier[vie... |
public TenantEntity findTenantById(String tenantId) {
checkAuthorization(Permissions.READ, Resources.TENANT, tenantId);
return getDbEntityManager().selectById(TenantEntity.class, tenantId);
} | class class_name[name] begin[{]
method[findTenantById, return_type[type[TenantEntity]], modifier[public], parameter[tenantId]] begin[{]
call[.checkAuthorization, parameter[member[Permissions.READ], member[Resources.TENANT], member[.tenantId]]]
return[call[.getDbEntityManager, parameter[... | Keyword[public] identifier[TenantEntity] identifier[findTenantById] operator[SEP] identifier[String] identifier[tenantId] operator[SEP] {
identifier[checkAuthorization] operator[SEP] identifier[Permissions] operator[SEP] identifier[READ] , identifier[Resources] operator[SEP] identifier[TENANT] , identifier[ten... |
protected AjaxButton newOkButton(final String id)
{
final AjaxButton ok = new AjaxButton(id)
{
/**
* The serialVersionUID.
*/
private static final long serialVersionUID = 1L;
/**
* {@inheritDoc}
*/
@Override
protected void onError(final AjaxRequestTarget target, final F... | class class_name[name] begin[{]
method[newOkButton, return_type[type[AjaxButton]], modifier[protected], parameter[id]] begin[{]
local_variable[type[AjaxButton], ok]
return[member[.ok]]
end[}]
END[}] | Keyword[protected] identifier[AjaxButton] identifier[newOkButton] operator[SEP] Keyword[final] identifier[String] identifier[id] operator[SEP] {
Keyword[final] identifier[AjaxButton] identifier[ok] operator[=] Keyword[new] identifier[AjaxButton] operator[SEP] identifier[id] operator[SEP] {
Keyword[pri... |
public final ParserModel train(final TrainingParameters params,
final InputStream taggerModel, final TrainingParameters chunkerParams) {
if (getParserFactory() == null) {
throw new IllegalStateException(
"The ParserFactory must be instantiated!!");
}
SequenceLabelerModel posModel = nul... | class class_name[name] begin[{]
method[train, return_type[type[ParserModel]], modifier[final public], parameter[params, taggerModel, chunkerParams]] begin[{]
if[binary_operation[call[.getParserFactory, parameter[]], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator... | Keyword[public] Keyword[final] identifier[ParserModel] identifier[train] operator[SEP] Keyword[final] identifier[TrainingParameters] identifier[params] , Keyword[final] identifier[InputStream] identifier[taggerModel] , Keyword[final] identifier[TrainingParameters] identifier[chunkerParams] operator[SEP] {
Keyw... |
@Override
public Mono<MongoSession> createSession() {
return Mono.justOrEmpty(this.maxInactiveIntervalInSeconds) //
.map(MongoSession::new) //
.doOnNext(mongoSession -> publishEvent(new SessionCreatedEvent(this, mongoSession))) //
.switchIfEmpty(Mono.just(new MongoSession()));
} | class class_name[name] begin[{]
method[createSession, return_type[type[Mono]], modifier[public], parameter[]] begin[{]
return[call[Mono.justOrEmpty, parameter[THIS[member[None.maxInactiveIntervalInSeconds]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Mono] operator[<] identifier[MongoSession] operator[>] identifier[createSession] operator[SEP] operator[SEP] {
Keyword[return] identifier[Mono] operator[SEP] identifier[justOrEmpty] operator[SEP] Keyword[this] operator[SEP] identifier[maxInactiveInter... |
public final synchronized L[] getListeners() {
if (this.map == null) {
return newArray(0);
}
List<L> list = new ArrayList<>();
L[] listeners = this.map.get(null);
if (listeners != null) {
for (L listener : listeners) {
list.add(listener);
... | class class_name[name] begin[{]
method[getListeners, return_type[type[L]], modifier[synchronized final public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.map]], ==, literal[null]]] begin[{]
return[call[.newArray, parameter[literal[0]]]]
else begin[{]
None
... | Keyword[public] Keyword[final] Keyword[synchronized] identifier[L] operator[SEP] operator[SEP] identifier[getListeners] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[map] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[newArray] oper... |
public static double round(double x, int scale, int roundingMethod) {
try {
return (new BigDecimal
(Double.toString(x))
.setScale(scale, roundingMethod))
.doubleValue();
} catch (NumberFormatException ex) {
if (Double.isInf... | class class_name[name] begin[{]
method[round, return_type[type[double]], modifier[public static], parameter[x, scale, roundingMethod]] begin[{]
TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_opera... | Keyword[public] Keyword[static] Keyword[double] identifier[round] operator[SEP] Keyword[double] identifier[x] , Keyword[int] identifier[scale] , Keyword[int] identifier[roundingMethod] operator[SEP] {
Keyword[try] {
Keyword[return] operator[SEP] Keyword[new] identifier[BigDecimal] operator[SEP] iden... |
protected void center(boolean horizontal, boolean vertical) {
if (mBitmapDisplayed.getBitmap() == null) {
return;
}
Matrix m = getImageViewMatrix();
RectF rect = new RectF(0, 0, mBitmapDisplayed.getBitmap().getWidth(),
mBitmapDisplayed.getBitmap().getHeight(... | class class_name[name] begin[{]
method[center, return_type[void], modifier[protected], parameter[horizontal, vertical]] begin[{]
if[binary_operation[call[mBitmapDisplayed.getBitmap, parameter[]], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
... | Keyword[protected] Keyword[void] identifier[center] operator[SEP] Keyword[boolean] identifier[horizontal] , Keyword[boolean] identifier[vertical] operator[SEP] {
Keyword[if] operator[SEP] identifier[mBitmapDisplayed] operator[SEP] identifier[getBitmap] operator[SEP] operator[SEP] operator[==] Other[null] operat... |
@Override
protected String doRender(final RenderConfiguration config, final CommonNodeAttributes entity) {
return config.getIndent()
+ entity.getId()
+ " " + attributeRenderer.render(config, entity.getAttributes());
} | class class_name[name] begin[{]
method[doRender, return_type[type[String]], modifier[protected], parameter[config, entity]] begin[{]
return[binary_operation[binary_operation[binary_operation[call[config.getIndent, parameter[]], +, call[entity.getId, parameter[]]], +, literal[" "]], +, call[attributeRen... | annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[doRender] operator[SEP] Keyword[final] identifier[RenderConfiguration] identifier[config] , Keyword[final] identifier[CommonNodeAttributes] identifier[entity] operator[SEP] {
Keyword[return] identifier[config] operator[SEP] iden... |
public static PactDslJsonBody arrayEachLike(Integer numberExamples) {
PactDslJsonArray parent = new PactDslJsonArray("", "", null, true);
parent.setNumberExamples(numberExamples);
parent.matchers.addRule("", parent.matchMin(0));
return new PactDslJsonBody(".", "", parent);
} | class class_name[name] begin[{]
method[arrayEachLike, return_type[type[PactDslJsonBody]], modifier[public static], parameter[numberExamples]] begin[{]
local_variable[type[PactDslJsonArray], parent]
call[parent.setNumberExamples, parameter[member[.numberExamples]]]
call[p... | Keyword[public] Keyword[static] identifier[PactDslJsonBody] identifier[arrayEachLike] operator[SEP] identifier[Integer] identifier[numberExamples] operator[SEP] {
identifier[PactDslJsonArray] identifier[parent] operator[=] Keyword[new] identifier[PactDslJsonArray] operator[SEP] literal[String] , literal[String]... |
@GwtIncompatible("incompatible method")
private static boolean annotationArrayMemberEquals(final Annotation[] a1, final Annotation[] a2) {
if (a1.length != a2.length) {
return false;
}
for (int i = 0; i < a1.length; i++) {
if (!equals(a1[i], a2[i])) {
... | class class_name[name] begin[{]
method[annotationArrayMemberEquals, return_type[type[boolean]], modifier[private static], parameter[a1, a2]] begin[{]
if[binary_operation[member[a1.length], !=, member[a2.length]]] begin[{]
return[literal[false]]
else begin[{]
None
end... | annotation[@] identifier[GwtIncompatible] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] Keyword[boolean] identifier[annotationArrayMemberEquals] operator[SEP] Keyword[final] identifier[Annotation] operator[SEP] operator[SEP] identifier[a1] , Keyword[final] identifier[Annotation] operator... |
public TaskLevelPolicyChecker getTaskLevelPolicyChecker(TaskState taskState, int index) throws Exception {
return TaskLevelPolicyCheckerBuilderFactory.newPolicyCheckerBuilder(taskState, index).build();
} | class class_name[name] begin[{]
method[getTaskLevelPolicyChecker, return_type[type[TaskLevelPolicyChecker]], modifier[public], parameter[taskState, index]] begin[{]
return[call[TaskLevelPolicyCheckerBuilderFactory.newPolicyCheckerBuilder, parameter[member[.taskState], member[.index]]]]
end[}]
END[}... | Keyword[public] identifier[TaskLevelPolicyChecker] identifier[getTaskLevelPolicyChecker] operator[SEP] identifier[TaskState] identifier[taskState] , Keyword[int] identifier[index] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[return] identifier[TaskLevelPolicyCheckerBuilderFactory] operator[SEP]... |
synchronized public void setSeed(final int[] array)
{
if (array.length == 0)
throw new IllegalArgumentException("Array length must be greater than zero");
int i, j, k;
setSeed(19650218);
i=1; j=0;
k = (N>array.length ? N : array.length);
for (; k!=0; k... | class class_name[name] begin[{]
method[setSeed, return_type[void], modifier[synchronized public], parameter[array]] begin[{]
if[binary_operation[member[array.length], ==, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], q... | Keyword[synchronized] Keyword[public] Keyword[void] identifier[setSeed] operator[SEP] Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[array] operator[SEP] {
Keyword[if] operator[SEP] identifier[array] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] Keyword[throw] Keyword[n... |
public static File noDirectory(File file) {
Validate.exists(file);
if(file.isDirectory())
throw new ParameterException("\""+file+"\" is a directory!");
return file;
} | class class_name[name] begin[{]
method[noDirectory, return_type[type[File]], modifier[public static], parameter[file]] begin[{]
call[Validate.exists, parameter[member[.file]]]
if[call[file.isDirectory, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Bina... | Keyword[public] Keyword[static] identifier[File] identifier[noDirectory] operator[SEP] identifier[File] identifier[file] operator[SEP] {
identifier[Validate] operator[SEP] identifier[exists] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[file] operator[SEP] identi... |
@Override
public int intersectionSize(IntSet o)
{
// special cases
if (isEmpty() || o == null || o.isEmpty()) {
return 0;
}
if (this == o) {
return size();
}
final ConciseSet other = convert(o);
// check whether the first operator starts with a sequence that
... | class class_name[name] begin[{]
method[intersectionSize, return_type[type[int]], modifier[public], parameter[o]] begin[{]
if[binary_operation[binary_operation[call[.isEmpty, parameter[]], ||, binary_operation[member[.o], ==, literal[null]]], ||, call[o.isEmpty, parameter[]]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[intersectionSize] operator[SEP] identifier[IntSet] identifier[o] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] identifier[o] operator[==] Other[null] operator[||] identifier[o] oper... |
public Mapping getInstance(String name) throws MappingNotFoundException {
LOG.info("mappingFactory.getInstance: " + name);
Mapping mapping = null;
try {
for (int i = 0; i < mappingList.size(); i++) {
MappingParameters mappingParameters = mappingList.get(i);
... | class class_name[name] begin[{]
method[getInstance, return_type[type[Mapping]], modifier[public], parameter[name]] begin[{]
call[LOG.info, parameter[binary_operation[literal["mappingFactory.getInstance: "], +, member[.name]]]]
local_variable[type[Mapping], mapping]
TryStatement(... | Keyword[public] identifier[Mapping] identifier[getInstance] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[MappingNotFoundException] {
identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[name] operator[SEP] operator[SEP] ... |
public static long deregisterNatives(long dllHandle, Class<?> clazz, String nativeDescriptorName, Object[] extraInfo) {
if (!initialized) {
if (loadFailure != null) {
Error e = new UnsatisfiedLinkError();
e.initCause(loadFailure);
throw e;
... | class class_name[name] begin[{]
method[deregisterNatives, return_type[type[long]], modifier[public static], parameter[dllHandle, clazz, nativeDescriptorName, extraInfo]] begin[{]
if[member[.initialized]] begin[{]
if[binary_operation[member[.loadFailure], !=, literal[null... | Keyword[public] Keyword[static] Keyword[long] identifier[deregisterNatives] operator[SEP] Keyword[long] identifier[dllHandle] , identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[nativeDescriptorName] , identifier[Object] operator[SEP] operator[SEP] identifier[ext... |
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case XbasePackage.XSWITCH_EXPRESSION__SWITCH:
setSwitch((XExpression)newValue);
return;
case XbasePackage.XSWITCH_EXPRESSION__CASES:
getCases().clear();
getCases().addAll((Collec... | class class_name[name] begin[{]
method[eSet, return_type[void], modifier[public], parameter[featureID, newValue]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=XSWITCH_EXPRESSION__SWITCH, postfix_operators=[], prefix_operators=[], qualifier=XbasePackage, selectors=[])... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eSet] operator[SEP] Keyword[int] identifier[featureID] , identifier[Object] identifier[newValue] operator[SEP] {
Keyword[switch] operator[SEP] identi... |
public static<T extends TBase<?,?>> TypeRef<T> getThriftTypeRef(String thriftClassName) {
return ThriftUtils.getTypeRef(getClass(thriftClassName));
} | class class_name[name] begin[{]
method[getThriftTypeRef, return_type[type[TypeRef]], modifier[public static], parameter[thriftClassName]] begin[{]
return[call[ThriftUtils.getTypeRef, parameter[call[.getClass, parameter[member[.thriftClassName]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[TBase] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[TypeRef] operator[<] identifier[T] operator[>] identifier[getThriftTypeRef] operator[SEP] identifier[String] identifier[thriftClassName] operator[SEP] {... |
protected FieldMetadata processArrayTypeFrom( FieldDeclaration fieldDeclaration ) {
ArrayType arrayType = (ArrayType)fieldDeclaration.getType();
FieldMetadata arrayTypeFieldMetadata = null;
// the element type is never an array type
Type type = arrayType.getElementType();
if (typ... | class class_name[name] begin[{]
method[processArrayTypeFrom, return_type[type[FieldMetadata]], modifier[protected], parameter[fieldDeclaration]] begin[{]
local_variable[type[ArrayType], arrayType]
local_variable[type[FieldMetadata], arrayTypeFieldMetadata]
local_variable[type[Type], typ... | Keyword[protected] identifier[FieldMetadata] identifier[processArrayTypeFrom] operator[SEP] identifier[FieldDeclaration] identifier[fieldDeclaration] operator[SEP] {
identifier[ArrayType] identifier[arrayType] operator[=] operator[SEP] identifier[ArrayType] operator[SEP] identifier[fieldDeclaration] operator[SEP... |
public void setFilters(java.util.Collection<ServiceFilter> filters) {
if (filters == null) {
this.filters = null;
return;
}
this.filters = new java.util.ArrayList<ServiceFilter>(filters);
} | class class_name[name] begin[{]
method[setFilters, return_type[void], modifier[public], parameter[filters]] begin[{]
if[binary_operation[member[.filters], ==, literal[null]]] begin[{]
assign[THIS[member[None.filters]], literal[null]]
return[None]
else... | Keyword[public] Keyword[void] identifier[setFilters] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[ServiceFilter] operator[>] identifier[filters] operator[SEP] {
Keyword[if] operator[SEP] identifier[filters] operator[==] Other[null] oper... |
@Override
public final <T> List<T> retrieveListByQuery(
final Map<String, Object> pAddParam,
final Class<T> pEntityClass,
final String pQuery) throws Exception {
if (pQuery == null) {
throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
"param_null_not_accepted");
}
... | class class_name[name] begin[{]
method[retrieveListByQuery, return_type[type[List]], modifier[final public], parameter[pAddParam, pEntityClass, pQuery]] begin[{]
if[binary_operation[member[.pQuery], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Membe... | annotation[@] identifier[Override] Keyword[public] Keyword[final] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[retrieveListByQuery] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddPara... |
@RequestMapping(value = "/setLayersForMap.action", method = RequestMethod.POST)
public @ResponseBody
java.util.Map<String, Object> setLayersForMap(
@RequestParam("mapModuleId") Integer mapModuleId,
@RequestParam("layerIds") List<Integer> layerIds) {
try {
if (mapModuleId == n... | class class_name[name] begin[{]
method[setLayersForMap, return_type[type[java]], modifier[public], parameter[mapModuleId, layerIds]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mapModuleId, postfix_... | annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[POST] operator[SEP] Keyword[public] annotation[@] identifier[ResponseBody] identifier[java] operator[SEP] identifier[util] operator[SE... |
@Override
public void unlockSet(int requestNumber, SIMessageHandle[] msgHandles, boolean reply) // f199593, F219476.2
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "unlockSet",
new Object[] { requestNumber,... | class class_name[name] begin[{]
method[unlockSet, return_type[void], modifier[public], parameter[requestNumber, msgHandles, reply]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entr... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[unlockSet] operator[SEP] Keyword[int] identifier[requestNumber] , identifier[SIMessageHandle] operator[SEP] operator[SEP] identifier[msgHandles] , Keyword[boolean] identifier[reply] operator[SEP] {
Keyword[if] operator[SEP] identifier[... |
private static void append(Appendable app, CharSequence s) {
try {
app.append(s);
} catch (IOException e) {
throw new ICUUncheckedIOException(e);
}
} | class class_name[name] begin[{]
method[append, return_type[void], modifier[private static], parameter[app, s]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=... | Keyword[private] Keyword[static] Keyword[void] identifier[append] operator[SEP] identifier[Appendable] identifier[app] , identifier[CharSequence] identifier[s] operator[SEP] {
Keyword[try] {
identifier[app] operator[SEP] identifier[append] operator[SEP] identifier[s] operator[SEP] operator[SEP]
... |
public static AtomicHistogram decodeFromByteBuffer(final ByteBuffer buffer,
final long minBarForHighestTrackableValue) {
return (AtomicHistogram) decodeFromByteBuffer(buffer, AtomicHistogram.class,
minBarForHighestTrackableValue);
} | class class_name[name] begin[{]
method[decodeFromByteBuffer, return_type[type[AtomicHistogram]], modifier[public static], parameter[buffer, minBarForHighestTrackableValue]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=... | Keyword[public] Keyword[static] identifier[AtomicHistogram] identifier[decodeFromByteBuffer] operator[SEP] Keyword[final] identifier[ByteBuffer] identifier[buffer] , Keyword[final] Keyword[long] identifier[minBarForHighestTrackableValue] operator[SEP] {
Keyword[return] operator[SEP] identifier[AtomicHistogram] ... |
private boolean isWildcardWithoutBounds() {
if (this.type instanceof WildcardType) {
WildcardType wt = (WildcardType) this.type;
if (wt.getLowerBounds().length == 0) {
Type[] upperBounds = wt.getUpperBounds();
if (upperBounds.length == 0 || (upperBounds.le... | class class_name[name] begin[{]
method[isWildcardWithoutBounds, return_type[type[boolean]], modifier[private], parameter[]] begin[{]
if[binary_operation[THIS[member[None.type]], instanceof, type[WildcardType]]] begin[{]
local_variable[type[WildcardType], wt]
... | Keyword[private] Keyword[boolean] identifier[isWildcardWithoutBounds] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[type] Keyword[instanceof] identifier[WildcardType] operator[SEP] {
identifier[WildcardType] identifier[wt] operator[=] operator[SEP] iden... |
public BigMoney minus(BigMoneyProvider moneyToSubtract) {
BigMoney toSubtract = checkCurrencyEqual(moneyToSubtract);
return minus(toSubtract.getAmount());
} | class class_name[name] begin[{]
method[minus, return_type[type[BigMoney]], modifier[public], parameter[moneyToSubtract]] begin[{]
local_variable[type[BigMoney], toSubtract]
return[call[.minus, parameter[call[toSubtract.getAmount, parameter[]]]]]
end[}]
END[}] | Keyword[public] identifier[BigMoney] identifier[minus] operator[SEP] identifier[BigMoneyProvider] identifier[moneyToSubtract] operator[SEP] {
identifier[BigMoney] identifier[toSubtract] operator[=] identifier[checkCurrencyEqual] operator[SEP] identifier[moneyToSubtract] operator[SEP] operator[SEP] Keyword[return... |
private JPanel getPanelMisc() {
if (panelMisc == null) {
panelMisc = new JPanel();
panelMisc.setLayout(new GridBagLayout());
panelMisc.add(getInMemoryStatsEnabledField(), LayoutHelper.getGBC(0, 0, 1, 0.5));
panelMisc.add(getStatsdStatsEnabledField(), LayoutHelper.getGBC(0, 1, 1, 0.5));
... | class class_name[name] begin[{]
method[getPanelMisc, return_type[type[JPanel]], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.panelMisc], ==, literal[null]]] begin[{]
assign[member[.panelMisc], ClassCreator(arguments=[], body=None, constructor_type... | Keyword[private] identifier[JPanel] identifier[getPanelMisc] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[panelMisc] operator[==] Other[null] operator[SEP] {
identifier[panelMisc] operator[=] Keyword[new] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[pan... |
@NonNull
public static ArrayExpressionIn any(@NonNull VariableExpression variable) {
if (variable == null) {
throw new IllegalArgumentException("variable cannot be null.");
}
return new ArrayExpressionIn(QuantifiesType.ANY, variable);
} | class class_name[name] begin[{]
method[any, return_type[type[ArrayExpressionIn]], modifier[public static], parameter[variable]] begin[{]
if[binary_operation[member[.variable], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[]... | annotation[@] identifier[NonNull] Keyword[public] Keyword[static] identifier[ArrayExpressionIn] identifier[any] operator[SEP] annotation[@] identifier[NonNull] identifier[VariableExpression] identifier[variable] operator[SEP] {
Keyword[if] operator[SEP] identifier[variable] operator[==] Other[null] operator[SEP]... |
public void sessionEnd(SessionStatus finishState) {
if (sessionStatusToMetrics.containsKey(finishState)) {
sessionStatusToMetrics.get(finishState).inc();
} else {
throw new IllegalArgumentException("Invalid end state " + finishState);
}
} | class class_name[name] begin[{]
method[sessionEnd, return_type[void], modifier[public], parameter[finishState]] begin[{]
if[call[sessionStatusToMetrics.containsKey, parameter[member[.finishState]]]] begin[{]
call[sessionStatusToMetrics.get, parameter[member[.finishState]... | Keyword[public] Keyword[void] identifier[sessionEnd] operator[SEP] identifier[SessionStatus] identifier[finishState] operator[SEP] {
Keyword[if] operator[SEP] identifier[sessionStatusToMetrics] operator[SEP] identifier[containsKey] operator[SEP] identifier[finishState] operator[SEP] operator[SEP] {
id... |
private void parseValue(byte[] data, CookieData token) {
int start = -1;
int stop = -1;
int pos = this.bytePosition;
int num_quotes = 0;
// cycle through each byte until we hit a delimiter or end of data
for (; pos < data.length; pos++) {
byte b = data[pos];... | class class_name[name] begin[{]
method[parseValue, return_type[void], modifier[private], parameter[data, token]] begin[{]
local_variable[type[int], start]
local_variable[type[int], stop]
local_variable[type[int], pos]
local_variable[type[int], num_quotes]
ForStatement(bo... | Keyword[private] Keyword[void] identifier[parseValue] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] , identifier[CookieData] identifier[token] operator[SEP] {
Keyword[int] identifier[start] operator[=] operator[-] Other[1] operator[SEP] Keyword[int] identifier[stop] operator[=] operat... |
public R toFloat64Array(@Nullable Iterable<Double> values) {
return handle(Value.float64Array(values));
} | class class_name[name] begin[{]
method[toFloat64Array, return_type[type[R]], modifier[public], parameter[values]] begin[{]
return[call[.handle, parameter[call[Value.float64Array, parameter[member[.values]]]]]]
end[}]
END[}] | Keyword[public] identifier[R] identifier[toFloat64Array] operator[SEP] annotation[@] identifier[Nullable] identifier[Iterable] operator[<] identifier[Double] operator[>] identifier[values] operator[SEP] {
Keyword[return] identifier[handle] operator[SEP] identifier[Value] operator[SEP] identifier[float64Array] op... |
private void addPostParams(final Request request) {
if (initiationActions != null) {
request.addPostParam("InitiationActions", Converter.mapToJson(initiationActions));
}
} | class class_name[name] begin[{]
method[addPostParams, return_type[void], modifier[private], parameter[request]] begin[{]
if[binary_operation[member[.initiationActions], !=, literal[null]]] begin[{]
call[request.addPostParam, parameter[literal["InitiationActions"], call[C... | Keyword[private] Keyword[void] identifier[addPostParams] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] {
Keyword[if] operator[SEP] identifier[initiationActions] operator[!=] Other[null] operator[SEP] {
identifier[request] operator[SEP] identifier[addPostParam] oper... |
public Observable<Page<RecordSetInner>> listAsync(final String resourceGroupName, final String privateZoneName) {
return listWithServiceResponseAsync(resourceGroupName, privateZoneName)
.map(new Func1<ServiceResponse<Page<RecordSetInner>>, Page<RecordSetInner>>() {
@Override
... | class class_name[name] begin[{]
method[listAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, privateZoneName]] begin[{]
return[call[.listWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.privateZoneName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[RecordSetInner] operator[>] operator[>] identifier[listAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[privateZoneName] operator[SEP] {
K... |
public void setAlbum(String newAlbum)
{
if (newAlbum.length() > ALBUM_SIZE)
{
album = newAlbum.substring(0, ALBUM_SIZE);
}
else
{
album = newAlbum;
}
} | class class_name[name] begin[{]
method[setAlbum, return_type[void], modifier[public], parameter[newAlbum]] begin[{]
if[binary_operation[call[newAlbum.length, parameter[]], >, member[.ALBUM_SIZE]]] begin[{]
assign[member[.album], call[newAlbum.substring, parameter[literal... | Keyword[public] Keyword[void] identifier[setAlbum] operator[SEP] identifier[String] identifier[newAlbum] operator[SEP] {
Keyword[if] operator[SEP] identifier[newAlbum] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[ALBUM_SIZE] operator[SEP] {
identifier[album] oper... |
public static MutableLong fromExternal(final LongSupplier s, final LongConsumer c) {
return new MutableLong() {
@Override
public long getAsLong() {
return s.getAsLong();
}
@Override
public Long get() {
return getAsLong(... | class class_name[name] begin[{]
method[fromExternal, return_type[type[MutableLong]], modifier[public static], parameter[s, c]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(argu... | Keyword[public] Keyword[static] identifier[MutableLong] identifier[fromExternal] operator[SEP] Keyword[final] identifier[LongSupplier] identifier[s] , Keyword[final] identifier[LongConsumer] identifier[c] operator[SEP] {
Keyword[return] Keyword[new] identifier[MutableLong] operator[SEP] operator[SEP] {
... |
public static boolean isAllFieldsPublic(Class c) {
try {
final Field[] list = c.getFields();
for (int i = 0; i < list.length; i++)
if (!Modifier.isPublic(list[i].getModifiers()))
return false;
} catch (Exception e) {
return false;
... | class class_name[name] begin[{]
method[isAllFieldsPublic, return_type[type[boolean]], modifier[public static], parameter[c]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getFields, ... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isAllFieldsPublic] operator[SEP] identifier[Class] identifier[c] operator[SEP] {
Keyword[try] {
Keyword[final] identifier[Field] operator[SEP] operator[SEP] identifier[list] operator[=] identifier[c] operator[SEP] identifier[getFields] operat... |
@Override
public void getFlatComparator(List<TypeComparator> flatComparators) {
for (NullAwareComparator<Object> c : comparators) {
Collections.addAll(flatComparators, c.getFlatComparators());
}
} | class class_name[name] begin[{]
method[getFlatComparator, return_type[void], modifier[public], parameter[flatComparators]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=flatComparators, postfix_operato... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[getFlatComparator] operator[SEP] identifier[List] operator[<] identifier[TypeComparator] operator[>] identifier[flatComparators] operator[SEP] {
Keyword[for] operator[SEP] identifier[NullAwareComparator] operator[<] identifier[Object] op... |
@Measure
public PathsPromoteResult promotePaths( final PathsPromoteRequest request, final String baseUrl )
throws PromotionException, IndyWorkflowException
{
MDC.put( PROMOTION_TYPE, PATH_PROMOTION );
MDC.put( PROMOTION_SOURCE, request.getSource().toString() );
MDC.put( PROMO... | class class_name[name] begin[{]
method[promotePaths, return_type[type[PathsPromoteResult]], modifier[public], parameter[request, baseUrl]] begin[{]
call[MDC.put, parameter[member[.PROMOTION_TYPE], member[.PATH_PROMOTION]]]
call[MDC.put, parameter[member[.PROMOTION_SOURCE], call[... | annotation[@] identifier[Measure] Keyword[public] identifier[PathsPromoteResult] identifier[promotePaths] operator[SEP] Keyword[final] identifier[PathsPromoteRequest] identifier[request] , Keyword[final] identifier[String] identifier[baseUrl] operator[SEP] Keyword[throws] identifier[PromotionException] , identifier[I... |
@BackendProperty
public void setQueryTimeout(Integer seconds) {
if (seconds != null && seconds.intValue() < 0) {
throw new IllegalArgumentException("invalid seconds: " + seconds);
}
this.queryTimeout = seconds;
} | class class_name[name] begin[{]
method[setQueryTimeout, return_type[void], modifier[public], parameter[seconds]] begin[{]
if[binary_operation[binary_operation[member[.seconds], !=, literal[null]], &&, binary_operation[call[seconds.intValue, parameter[]], <, literal[0]]]] begin[{]
Th... | annotation[@] identifier[BackendProperty] Keyword[public] Keyword[void] identifier[setQueryTimeout] operator[SEP] identifier[Integer] identifier[seconds] operator[SEP] {
Keyword[if] operator[SEP] identifier[seconds] operator[!=] Other[null] operator[&&] identifier[seconds] operator[SEP] identifier[intValue] oper... |
public static boolean detectCicular(List<Location> subLocations) {
boolean isCircular = false;
if(! consistentAccessions(subLocations))
return isCircular;
int lastMax = 0;
for (Location sub : subLocations) {
if (sub.getEnd().getPosition() > lastMax) {
lastMax = sub.getEnd().getPosition();
}
els... | class class_name[name] begin[{]
method[detectCicular, return_type[type[boolean]], modifier[public static], parameter[subLocations]] begin[{]
local_variable[type[boolean], isCircular]
if[call[.consistentAccessions, parameter[member[.subLocations]]]] begin[{]
return[member[.isCircular]]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[detectCicular] operator[SEP] identifier[List] operator[<] identifier[Location] operator[>] identifier[subLocations] operator[SEP] {
Keyword[boolean] identifier[isCircular] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] ... |
public Observable<RegistryListCredentialsResultInner> regenerateCredentialAsync(String resourceGroupName, String registryName, PasswordName name) {
return regenerateCredentialWithServiceResponseAsync(resourceGroupName, registryName, name).map(new Func1<ServiceResponse<RegistryListCredentialsResultInner>, Regist... | class class_name[name] begin[{]
method[regenerateCredentialAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, registryName, name]] begin[{]
return[call[.regenerateCredentialWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.registryName], member[.n... | Keyword[public] identifier[Observable] operator[<] identifier[RegistryListCredentialsResultInner] operator[>] identifier[regenerateCredentialAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[registryName] , identifier[PasswordName] identifier[name] operator[SEP] {
... |
public void addOperations(final Map<MemcachedNode, Operation> ops) {
for (Map.Entry<MemcachedNode, Operation> me : ops.entrySet()) {
addOperation(me.getKey(), me.getValue());
}
} | class class_name[name] begin[{]
method[addOperations, return_type[void], modifier[public], parameter[ops]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], pre... | Keyword[public] Keyword[void] identifier[addOperations] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[MemcachedNode] , identifier[Operation] operator[>] identifier[ops] operator[SEP] {
Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Memcach... |
public static void preRegisterFileManager(Context context) {
context.put(
JavaFileManager.class,
new Context.Factory<JavaFileManager>() {
@Override
public JavaFileManager make(Context c) {
return new MaskedFileManager(c);
}
});
} | class class_name[name] begin[{]
method[preRegisterFileManager, return_type[void], modifier[public static], parameter[context]] begin[{]
call[context.put, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=N... | Keyword[public] Keyword[static] Keyword[void] identifier[preRegisterFileManager] operator[SEP] identifier[Context] identifier[context] operator[SEP] {
identifier[context] operator[SEP] identifier[put] operator[SEP] identifier[JavaFileManager] operator[SEP] Keyword[class] , Keyword[new] identifier[Context] opera... |
public static base_response delete(nitro_service client, Long td) throws Exception {
nstrafficdomain deleteresource = new nstrafficdomain();
deleteresource.td = td;
return deleteresource.delete_resource(client);
} | class class_name[name] begin[{]
method[delete, return_type[type[base_response]], modifier[public static], parameter[client, td]] begin[{]
local_variable[type[nstrafficdomain], deleteresource]
assign[member[deleteresource.td], member[.td]]
return[call[deleteresource.delete_resour... | Keyword[public] Keyword[static] identifier[base_response] identifier[delete] operator[SEP] identifier[nitro_service] identifier[client] , identifier[Long] identifier[td] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[nstrafficdomain] identifier[deleteresource] operator[=] Keyword[new] identifi... |
protected void connect(InetAddress address, int port) throws IOException {
this.port = port;
this.address = address;
try {
connectToAddress(address, port, timeout);
return;
} catch (IOException e) {
// everything failed
close();
... | class class_name[name] begin[{]
method[connect, return_type[void], modifier[protected], parameter[address, port]] begin[{]
assign[THIS[member[None.port]], member[.port]]
assign[THIS[member[None.address]], member[.address]]
TryStatement(block=[StatementExpression(expressi... | Keyword[protected] Keyword[void] identifier[connect] operator[SEP] identifier[InetAddress] identifier[address] , Keyword[int] identifier[port] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[this] operator[SEP] identifier[port] operator[=] identifier[port] operator[SEP] Keyword[this] operator[SE... |
public static Map<String, Object> ok(Map<String, Object> msg) {
HashMap<String, Object> r = new HashMap<>();
r.put((String) msg.get("cmd"), "OK");
r.put("session", msg.get("session"));
return r;
} | class class_name[name] begin[{]
method[ok, return_type[type[Map]], modifier[public static], parameter[msg]] begin[{]
local_variable[type[HashMap], r]
call[r.put, parameter[Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, sele... | Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[ok] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[msg] operator[SEP] {
identifier[HashMap] operator[<] identifier[String] , iden... |
public static VoltType getNumericLiteralType(VoltType vt, String value) {
try {
Long.parseLong(value);
} catch (NumberFormatException e) {
// Our DECIMAL may not be bigger/smaller enough to store the constant value
return VoltType.DECIMAL;
}
return vt;... | class class_name[name] begin[{]
method[getNumericLiteralType, return_type[type[VoltType]], modifier[public static], parameter[vt, value]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qual... | Keyword[public] Keyword[static] identifier[VoltType] identifier[getNumericLiteralType] operator[SEP] identifier[VoltType] identifier[vt] , identifier[String] identifier[value] operator[SEP] {
Keyword[try] {
identifier[Long] operator[SEP] identifier[parseLong] operator[SEP] identifier[value] operator[... |
public java.util.List<String> getHsmsPendingRegistration() {
if (hsmsPendingRegistration == null) {
hsmsPendingRegistration = new com.amazonaws.internal.SdkInternalList<String>();
}
return hsmsPendingRegistration;
} | class class_name[name] begin[{]
method[getHsmsPendingRegistration, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.hsmsPendingRegistration], ==, literal[null]]] begin[{]
assign[member[.hsmsPendingRegistration], ClassCreator(ar... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getHsmsPendingRegistration] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[hsmsPendingRegistration] operator[==] Other[null] operator[SEP] {
... |
public SpannableStringBuilder build() {
if (mBeforeStringBuilder.length() > 0) {
mStringBuilder.insert(0, mBeforeStringBuilder);
// reset SpecialUnit start pos
if (!mFinalSpecialUnit.isEmpty()) {
for (BaseSpecialUnit specialUnit : mFinalSpecialUnit) {
... | class class_name[name] begin[{]
method[build, return_type[type[SpannableStringBuilder]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[mBeforeStringBuilder.length, parameter[]], >, literal[0]]] begin[{]
call[mStringBuilder.insert, parameter[literal[0],... | Keyword[public] identifier[SpannableStringBuilder] identifier[build] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[mBeforeStringBuilder] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] {
identifier[mStringBuilder] operator[SEP] ident... |
public static HttpResponse toHttpResponse(final int streamId,
final Http2Headers http2Headers,
final boolean validateHttpHeaders) throws Http2Exception {
final HttpResponseStatus status = parseStatus(http2Headers.status(... | class class_name[name] begin[{]
method[toHttpResponse, return_type[type[HttpResponse]], modifier[public static], parameter[streamId, http2Headers, validateHttpHeaders]] begin[{]
local_variable[type[HttpResponseStatus], status]
local_variable[type[HttpResponse], msg]
TryStatement(block=[... | Keyword[public] Keyword[static] identifier[HttpResponse] identifier[toHttpResponse] operator[SEP] Keyword[final] Keyword[int] identifier[streamId] , Keyword[final] identifier[Http2Headers] identifier[http2Headers] , Keyword[final] Keyword[boolean] identifier[validateHttpHeaders] operator[SEP] Keyword[throws] identifi... |
public static void assertXpathValuesEqual(String controlXpath,
String testXpath,
String inXMLString)
throws SAXException, IOException,
XpathException {
assertXpathValuesEqual(controlXpath, testXpat... | class class_name[name] begin[{]
method[assertXpathValuesEqual, return_type[void], modifier[public static], parameter[controlXpath, testXpath, inXMLString]] begin[{]
call[.assertXpathValuesEqual, parameter[member[.controlXpath], member[.testXpath], call[XMLUnit.buildControlDocument, parameter[me... | Keyword[public] Keyword[static] Keyword[void] identifier[assertXpathValuesEqual] operator[SEP] identifier[String] identifier[controlXpath] , identifier[String] identifier[testXpath] , identifier[String] identifier[inXMLString] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] , identi... |
public static synchronized <T> List<T> fromExcel(final File file, final Class<T> type) {
final ArrayList<T> list = new ArrayList<>();
fromExcel(file, type, list::add);
return list;
} | class class_name[name] begin[{]
method[fromExcel, return_type[type[List]], modifier[synchronized public static], parameter[file, type]] begin[{]
local_variable[type[ArrayList], list]
call[.fromExcel, parameter[member[.file], member[.type], MethodReference(expression=MemberReference(memb... | Keyword[public] Keyword[static] Keyword[synchronized] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[fromExcel] operator[SEP] Keyword[final] identifier[File] identifier[file] , Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[typ... |
private void removeListenerFromChain(ChainEventListener listener, ChainData chainData) {
ChainGroupData[] otherGroups = null;
boolean foundOtherGroupWithListener = false;
// Extract the groups that this chain is involved in.
try {
otherGroups = this.framework.getAllChainGroup... | class class_name[name] begin[{]
method[removeListenerFromChain, return_type[void], modifier[private], parameter[listener, chainData]] begin[{]
local_variable[type[ChainGroupData], otherGroups]
local_variable[type[boolean], foundOtherGroupWithListener]
TryStatement(block=[StatementExpres... | Keyword[private] Keyword[void] identifier[removeListenerFromChain] operator[SEP] identifier[ChainEventListener] identifier[listener] , identifier[ChainData] identifier[chainData] operator[SEP] {
identifier[ChainGroupData] operator[SEP] operator[SEP] identifier[otherGroups] operator[=] Other[null] operator[SEP] ... |
public static float vDist2D(float[] v1, float[] v2) {
float dx = v2[0] - v1[0];
float dz = v2[2] - v1[2];
return (float) Math.sqrt(dx * dx + dz * dz);
} | class class_name[name] begin[{]
method[vDist2D, return_type[type[float]], modifier[public static], parameter[v1, v2]] begin[{]
local_variable[type[float], dx]
local_variable[type[float], dz]
return[Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(oper... | Keyword[public] Keyword[static] Keyword[float] identifier[vDist2D] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[v1] , Keyword[float] operator[SEP] operator[SEP] identifier[v2] operator[SEP] {
Keyword[float] identifier[dx] operator[=] identifier[v2] operator[SEP] Other[0] operator[SEP] ope... |
private static void copyEntries(File zip, final ZipOutputStream out) {
// this one doesn't call copyEntries with ignoredEntries, because that has poorer performance
final Set<String> names = new HashSet<String>();
iterate(zip, new ZipEntryCallback() {
public void process(InputStream in, ZipEntry zipEn... | class class_name[name] begin[{]
method[copyEntries, return_type[void], modifier[private static], parameter[zip, out]] begin[{]
local_variable[type[Set], names]
call[.iterate, parameter[member[.zip], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[LocalVariableDe... | Keyword[private] Keyword[static] Keyword[void] identifier[copyEntries] operator[SEP] identifier[File] identifier[zip] , Keyword[final] identifier[ZipOutputStream] identifier[out] operator[SEP] {
Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[names] operator[=] Keyword[new] ... |
public static void sampleWithoutReplacement(int[] array, int numArgClasses, Random rand) {
int[] temp = new int[numArgClasses];
for (int i = 0; i < temp.length; i++) {
temp[i] = i;
}
shuffle(temp, rand);
System.arraycopy(temp, 0, array, 0, array.length);
} | class class_name[name] begin[{]
method[sampleWithoutReplacement, return_type[void], modifier[public static], parameter[array, numArgClasses, rand]] begin[{]
local_variable[type[int], temp]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(express... | Keyword[public] Keyword[static] Keyword[void] identifier[sampleWithoutReplacement] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[array] , Keyword[int] identifier[numArgClasses] , identifier[Random] identifier[rand] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[temp] op... |
public PDPDistanceMatrix getDistanceMatrix(Atom[] protein) throws StructureException{
int[][] dist = new int[protein.length+3][protein.length+3];
int i,j;
double d,dt1,dt2,dt3,dt4;
int nclose=0;
int[] iclose = new int[protein.length*protein.length];
int[] jclose= new int[protein.length*protein.length];
... | class class_name[name] begin[{]
method[getDistanceMatrix, return_type[type[PDPDistanceMatrix]], modifier[public], parameter[protein]] begin[{]
local_variable[type[int], dist]
local_variable[type[int], i]
local_variable[type[double], d]
local_variable[type[int], nclose]
l... | Keyword[public] identifier[PDPDistanceMatrix] identifier[getDistanceMatrix] operator[SEP] identifier[Atom] operator[SEP] operator[SEP] identifier[protein] operator[SEP] Keyword[throws] identifier[StructureException] {
Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dist] operator[... |
public LocalFsBlobStoreFile read(String key) throws IOException {
return new LocalFsBlobStoreFile(getKeyDir(key), BlobStoreFile.BLOBSTORE_DATA_FILE);
} | class class_name[name] begin[{]
method[read, return_type[type[LocalFsBlobStoreFile]], modifier[public], parameter[key]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getKeyDir... | Keyword[public] identifier[LocalFsBlobStoreFile] identifier[read] operator[SEP] identifier[String] identifier[key] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] Keyword[new] identifier[LocalFsBlobStoreFile] operator[SEP] identifier[getKeyDir] operator[SEP] identifier[key] operator[SEP] ... |
private void finalizeRecord() {
myPage.setVal(currentPos, new IntegerConstant(getLastRecordPosition()));
setPreviousNextRecordPosition(currentPos + pointerSize);
setLastRecordPosition(currentPos);
currentPos += pointerSize;
setNextRecordPosition(currentPos);
// leave for next pointer
currentPos +... | class class_name[name] begin[{]
method[finalizeRecord, return_type[void], modifier[private], parameter[]] begin[{]
call[myPage.setVal, parameter[member[.currentPos], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getLastRecordPosition, postfix_operators=[], prefix_operators=[], q... | Keyword[private] Keyword[void] identifier[finalizeRecord] operator[SEP] operator[SEP] {
identifier[myPage] operator[SEP] identifier[setVal] operator[SEP] identifier[currentPos] , Keyword[new] identifier[IntegerConstant] operator[SEP] identifier[getLastRecordPosition] operator[SEP] operator[SEP] operator[SEP] op... |
@Override
public void visit(JavadocComment jdoc, ControllerModel controller) {
controller.setDescription(extractDescription(jdoc));
Set<String> version = extractDocAnnotation("@version",jdoc);
if(!version.isEmpty()){
controller.setVersion(version.iterator().next());
}
... | class class_name[name] begin[{]
method[visit, return_type[void], modifier[public], parameter[jdoc, controller]] begin[{]
call[controller.setDescription, parameter[call[.extractDescription, parameter[member[.jdoc]]]]]
local_variable[type[Set], version]
if[call[version.isE... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] identifier[JavadocComment] identifier[jdoc] , identifier[ControllerModel] identifier[controller] operator[SEP] {
identifier[controller] operator[SEP] identifier[setDescription] operator[SEP] identifier[extractDescri... |
public com.squareup.okhttp.Call getStatusesAsync(String tid, Integer count, Integer offset, String status, String dids, final ApiCallback<TaskStatusesEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener prog... | class class_name[name] begin[{]
method[getStatusesAsync, return_type[type[com]], modifier[public], parameter[tid, count, offset, status, dids, callback]] begin[{]
local_variable[type[ProgressResponseBody], progressListener]
local_variable[type[ProgressRequestBody], progressRequestListener]
... | Keyword[public] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[getStatusesAsync] operator[SEP] identifier[String] identifier[tid] , identifier[Integer] identifier[count] , identifier[Integer] identifier[offset] , identifier[String] identi... |
public static String computeAttachmentHash(byte[] attachment) {
byte[] rawDigest = MESSAGE_DIGESTER.digest(attachment);
return Base64.encode(rawDigest);
} | class class_name[name] begin[{]
method[computeAttachmentHash, return_type[type[String]], modifier[public static], parameter[attachment]] begin[{]
local_variable[type[byte], rawDigest]
return[call[Base64.encode, parameter[member[.rawDigest]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[computeAttachmentHash] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[attachment] operator[SEP] {
Keyword[byte] operator[SEP] operator[SEP] identifier[rawDigest] operator[=] identifier[MESSAGE_DIGESTER] operator[SEP] identifier[dig... |
public void writeEDLMentions(Iterable<EDLMention> edlMentions, CharSink sink) throws IOException {
final List<String> lines = Lists.newArrayList();
for (final EDLMention edlMention : edlMentions) {
lines.add(toLine(edlMention));
}
sink.writeLines(lines, "\n");
} | class class_name[name] begin[{]
method[writeEDLMentions, return_type[void], modifier[public], parameter[edlMentions, sink]] begin[{]
local_variable[type[List], lines]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvoca... | Keyword[public] Keyword[void] identifier[writeEDLMentions] operator[SEP] identifier[Iterable] operator[<] identifier[EDLMention] operator[>] identifier[edlMentions] , identifier[CharSink] identifier[sink] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[List] operator[<] identif... |
private List<MavenPluginDescriptor> createMavenPluginDescriptors(List<Plugin> plugins, ScannerContext context) {
Store store = context.getStore();
List<MavenPluginDescriptor> pluginDescriptors = new ArrayList<>();
for (Plugin plugin : plugins) {
MavenPluginDescriptor mavenPluginDescr... | class class_name[name] begin[{]
method[createMavenPluginDescriptors, return_type[type[List]], modifier[private], parameter[plugins, context]] begin[{]
local_variable[type[Store], store]
local_variable[type[List], pluginDescriptors]
ForStatement(body=BlockStatement(label=None, statements... | Keyword[private] identifier[List] operator[<] identifier[MavenPluginDescriptor] operator[>] identifier[createMavenPluginDescriptors] operator[SEP] identifier[List] operator[<] identifier[Plugin] operator[>] identifier[plugins] , identifier[ScannerContext] identifier[context] operator[SEP] {
identifier[Store] id... |
@Override
public CreateUserDefinedFunctionResult createUserDefinedFunction(CreateUserDefinedFunctionRequest request) {
request = beforeClientExecution(request);
return executeCreateUserDefinedFunction(request);
} | class class_name[name] begin[{]
method[createUserDefinedFunction, return_type[type[CreateUserDefinedFunctionResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeCreateUserDefinedF... | annotation[@] identifier[Override] Keyword[public] identifier[CreateUserDefinedFunctionResult] identifier[createUserDefinedFunction] operator[SEP] identifier[CreateUserDefinedFunctionRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] ident... |
public CharSequence format() {
if (pieces.isEmpty()) {
return input;
}
String target;
for (Piece piece : pieces) {
target = BRACE_START + piece.getKey() + BRACE_END;
input = input.replace(target, String.valueOf(piece.getValue()));
}
return input;
} | class class_name[name] begin[{]
method[format, return_type[type[CharSequence]], modifier[public], parameter[]] begin[{]
if[call[pieces.isEmpty, parameter[]]] begin[{]
return[member[.input]]
else begin[{]
None
end[}]
local_variable[type[String], target]
... | Keyword[public] identifier[CharSequence] identifier[format] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[pieces] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[input] operator[SEP]
}
identifier[String] identi... |
@Override
@UiThread
public void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView) {
super.onAttachedToRecyclerView(recyclerView);
mAttachedRecyclerViewPool.add(recyclerView);
} | class class_name[name] begin[{]
method[onAttachedToRecyclerView, return_type[void], modifier[public], parameter[recyclerView]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=recyclerView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onAttachedT... | annotation[@] identifier[Override] annotation[@] identifier[UiThread] Keyword[public] Keyword[void] identifier[onAttachedToRecyclerView] operator[SEP] annotation[@] identifier[NonNull] identifier[RecyclerView] identifier[recyclerView] operator[SEP] {
Keyword[super] operator[SEP] identifier[onAttachedToRecyclerVi... |
private Put getJobStatusPut() {
Put pStatus = new Put(jobKeyBytes);
byte[] valueBytes = Bytes.toBytes(this.jobStatus);
byte[] qualifier = Bytes.toBytes(JobHistoryKeys.JOB_STATUS.toString().toLowerCase());
pStatus.addColumn(Constants.INFO_FAM_BYTES, qualifier, valueBytes);
return pStatus;
} | class class_name[name] begin[{]
method[getJobStatusPut, return_type[type[Put]], modifier[private], parameter[]] begin[{]
local_variable[type[Put], pStatus]
local_variable[type[byte], valueBytes]
local_variable[type[byte], qualifier]
call[pStatus.addColumn, parameter[memb... | Keyword[private] identifier[Put] identifier[getJobStatusPut] operator[SEP] operator[SEP] {
identifier[Put] identifier[pStatus] operator[=] Keyword[new] identifier[Put] operator[SEP] identifier[jobKeyBytes] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[valueBytes] operator[=] id... |
public static boolean contentEqualsIgnoreCase(CharSequence a, CharSequence b) {
if (a == null || b == null) {
return a == b;
}
if (a.getClass() == AsciiString.class) {
return ((AsciiString) a).contentEqualsIgnoreCase(b);
}
if (b.getClass() == AsciiString.... | class class_name[name] begin[{]
method[contentEqualsIgnoreCase, return_type[type[boolean]], modifier[public static], parameter[a, b]] begin[{]
if[binary_operation[binary_operation[member[.a], ==, literal[null]], ||, binary_operation[member[.b], ==, literal[null]]]] begin[{]
return[b... | Keyword[public] Keyword[static] Keyword[boolean] identifier[contentEqualsIgnoreCase] operator[SEP] identifier[CharSequence] identifier[a] , identifier[CharSequence] identifier[b] operator[SEP] {
Keyword[if] operator[SEP] identifier[a] operator[==] Other[null] operator[||] identifier[b] operator[==] Other[null] ... |
@JsonAnySetter
protected void handleUnknown(String key, Object value) {
StringBuilder unknown = new StringBuilder(this.getClass().getSimpleName());
unknown.append(": Unknown property='").append(key);
unknown.append("' value='").append(value).append("'");
LOG.trace(unknown.toString()... | class class_name[name] begin[{]
method[handleUnknown, return_type[void], modifier[protected], parameter[key, value]] begin[{]
local_variable[type[StringBuilder], unknown]
call[unknown.append, parameter[literal[": Unknown property='"]]]
call[unknown.append, parameter[lite... | annotation[@] identifier[JsonAnySetter] Keyword[protected] Keyword[void] identifier[handleUnknown] operator[SEP] identifier[String] identifier[key] , identifier[Object] identifier[value] operator[SEP] {
identifier[StringBuilder] identifier[unknown] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP... |
public static Value convertFromJava(Object o) {
if (o instanceof Long) {
return new NumberValue(new BigDecimal((Long) o));
} else if (o instanceof Integer) {
return new NumberValue(new BigDecimal((Integer) o));
} else if (o instanceof Double) {
return new Numb... | class class_name[name] begin[{]
method[convertFromJava, return_type[type[Value]], modifier[public static], parameter[o]] begin[{]
if[binary_operation[member[.o], instanceof, type[Long]]] begin[{]
return[ClassCreator(arguments=[ClassCreator(arguments=[Cast(expression=MemberReference(... | Keyword[public] Keyword[static] identifier[Value] identifier[convertFromJava] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[Long] operator[SEP] {
Keyword[return] Keyword[new] identifier[NumberValue] operator[SEP] K... |
private JPanel getMainPanel() {
if (mainPanel == null) {
mainPanel = new JPanel();
mainPanel.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.insets = new Insets(5, 5, 5, 5);
c.fill = GridBagConstraints.HORIZONTAL;
c.gridx = 0;
c.gridy = ... | class class_name[name] begin[{]
method[getMainPanel, return_type[type[JPanel]], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.mainPanel], ==, literal[null]]] begin[{]
assign[member[.mainPanel], ClassCreator(arguments=[], body=None, constructor_type... | Keyword[private] identifier[JPanel] identifier[getMainPanel] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[mainPanel] operator[==] Other[null] operator[SEP] {
identifier[mainPanel] operator[=] Keyword[new] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[mai... |
public void add(final Class<?> clazz) {
if (this.clazzes.contains(clazz)) {
throw new IllegalArgumentException(
"Only one class-instance per benchmark allowed");
} else {
this.clazzes.add(clazz);
}
} | class class_name[name] begin[{]
method[add, return_type[void], modifier[public], parameter[clazz]] begin[{]
if[THIS[member[None.clazzes]call[None.contains, parameter[member[.clazz]]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_op... | Keyword[public] Keyword[void] identifier[add] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[clazzes] operator[SEP] identifier[contains] operator[SEP] identifier[clazz] operator[... |
public String getReplaced(String substitute, int start, int end) {
int restLength = this.limit - end;
StringBuilder builder = builder(null);
builder.append(this.buffer, this.initialOffset, start);
builder.append(substitute);
builder.append(this.buffer, this.initialOffset + end, restLength);
... | class class_name[name] begin[{]
method[getReplaced, return_type[type[String]], modifier[public], parameter[substitute, start, end]] begin[{]
local_variable[type[int], restLength]
local_variable[type[StringBuilder], builder]
call[builder.append, parameter[THIS[member[None.buffer]... | Keyword[public] identifier[String] identifier[getReplaced] operator[SEP] identifier[String] identifier[substitute] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
Keyword[int] identifier[restLength] operator[=] Keyword[this] operator[SEP] identifier[limit] operator[-] identifier... |
@SuppressWarnings("unchecked")
public <S extends AbstractColumn<T>> S describedAs(String description) {
setDescription(description);
return (S) this;
} | class class_name[name] begin[{]
method[describedAs, return_type[type[S]], modifier[public], parameter[description]] begin[{]
call[.setDescription, parameter[member[.description]]]
return[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), type=... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[S] Keyword[extends] identifier[AbstractColumn] operator[<] identifier[T] operator[>] operator[>] identifier[S] identifier[describedAs] operator[SEP] identifier[String] identifier[description] op... |
final protected Collection common_values() {
//TODO: make efficient
ArrayList<Object> al = new ArrayList<Object>();
Enumeration vEnum = cache.getAllIds();
while (vEnum.hasMoreElements())
al.add(get(vEnum.nextElement()));
return al;
} | class class_name[name] begin[{]
method[common_values, return_type[type[Collection]], modifier[final protected], parameter[]] begin[{]
local_variable[type[ArrayList], al]
local_variable[type[Enumeration], vEnum]
while[call[vEnum.hasMoreElements, parameter[]]] begin[{]
... | Keyword[final] Keyword[protected] identifier[Collection] identifier[common_values] operator[SEP] operator[SEP] {
identifier[ArrayList] operator[<] identifier[Object] operator[>] identifier[al] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Object] operator[>] operator[SEP] operator[SEP] op... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.