code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static CmsSitemapData prefetch(HttpServletRequest request, String sitemapUri) throws CmsRpcException {
CmsVfsSitemapService service = new CmsVfsSitemapService();
service.setCms(CmsFlexController.getCmsObject(request));
service.setRequest(request);
CmsSitemapData result = null;
... | class class_name[name] begin[{]
method[prefetch, return_type[type[CmsSitemapData]], modifier[public static], parameter[request, sitemapUri]] begin[{]
local_variable[type[CmsVfsSitemapService], service]
call[service.setCms, parameter[call[CmsFlexController.getCmsObject, parameter[member[... | Keyword[public] Keyword[static] identifier[CmsSitemapData] identifier[prefetch] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[String] identifier[sitemapUri] operator[SEP] Keyword[throws] identifier[CmsRpcException] {
identifier[CmsVfsSitemapService] identifier[service] operator[=... |
public BitsoTrade[] getUserTrades(String[] tradesIds, String... queryParameters)
throws BitsoAPIException, BitsoPayloadException, BitsoServerException {
String request = "/api/v3/user_trades";
if ((tradesIds != null && (queryParameters != null && queryParameters.length > 0))) {
... | class class_name[name] begin[{]
method[getUserTrades, return_type[type[BitsoTrade]], modifier[public], parameter[tradesIds, queryParameters]] begin[{]
local_variable[type[String], request]
if[binary_operation[binary_operation[member[.tradesIds], !=, literal[null]], &&, binary_operation[... | Keyword[public] identifier[BitsoTrade] operator[SEP] operator[SEP] identifier[getUserTrades] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[tradesIds] , identifier[String] operator[...] identifier[queryParameters] operator[SEP] Keyword[throws] identifier[BitsoAPIException] , identifier[BitsoP... |
public Result<FindRandomPointResult> findRandomPointAroundCircle(long startRef, float[] centerPos, float maxRadius,
QueryFilter filter, FRand frand) {
// Validate input
if (!m_nav.isValidPolyRef(startRef) || Objects.isNull(centerPos) || !vIsFinite(centerPos) || maxRadius < 0
... | class class_name[name] begin[{]
method[findRandomPointAroundCircle, return_type[type[Result]], modifier[public], parameter[startRef, centerPos, maxRadius, filter, frand]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[call[m_nav... | Keyword[public] identifier[Result] operator[<] identifier[FindRandomPointResult] operator[>] identifier[findRandomPointAroundCircle] operator[SEP] Keyword[long] identifier[startRef] , Keyword[float] operator[SEP] operator[SEP] identifier[centerPos] , Keyword[float] identifier[maxRadius] , identifier[QueryFilter] ide... |
public int finalizeUpgrade() throws IOException {
int exitCode = -1;
DistributedFileSystem dfs = getDFS();
if (dfs == null) {
System.out.println("FileSystem is " + getFS().getUri());
return exitCode;
}
dfs.finalizeUpgrade();
exitCode = 0;
return exitCode;
} | class class_name[name] begin[{]
method[finalizeUpgrade, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], exitCode]
local_variable[type[DistributedFileSystem], dfs]
if[binary_operation[member[.dfs], ==, literal[null]]] begin[{]
... | Keyword[public] Keyword[int] identifier[finalizeUpgrade] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[exitCode] operator[=] operator[-] Other[1] operator[SEP] identifier[DistributedFileSystem] identifier[dfs] operator[=] identifier[getDFS] operator[SEP] operator[S... |
@Override
public boolean contentExists(String spaceId, String contentId)
throws ContentStoreException {
try {
doGetContentProperties(spaceId, contentId);
return true;
} catch (NotFoundException e) {
return false;
}
} | class class_name[name] begin[{]
method[contentExists, return_type[type[boolean]], modifier[public], parameter[spaceId, contentId]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=spaceId, postfix_operators=[], prefix_operators=[], qualifier... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[contentExists] operator[SEP] identifier[String] identifier[spaceId] , identifier[String] identifier[contentId] operator[SEP] Keyword[throws] identifier[ContentStoreException] {
Keyword[try] {
identifier[doGetContentPropert... |
public static int d(String message, Throwable throwable) {
return logger(QuickUtils.DEBUG, message, throwable);
} | class class_name[name] begin[{]
method[d, return_type[type[int]], modifier[public static], parameter[message, throwable]] begin[{]
return[call[.logger, parameter[member[QuickUtils.DEBUG], member[.message], member[.throwable]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[int] identifier[d] operator[SEP] identifier[String] identifier[message] , identifier[Throwable] identifier[throwable] operator[SEP] {
Keyword[return] identifier[logger] operator[SEP] identifier[QuickUtils] operator[SEP] identifier[DEBUG] , identifier[message] , identifi... |
public LocalDistribution getDistribution(WrapperConfiguration configuration) {
String baseName = getDistName(configuration.getDistribution());
String distName = removeExtension(baseName);
String rootDirName = rootDirName(distName, configuration);
String d... | class class_name[name] begin[{]
method[getDistribution, return_type[type[LocalDistribution]], modifier[public], parameter[configuration]] begin[{]
local_variable[type[String], baseName]
local_variable[type[String], distName]
local_variable[type[String], rootDirName]
local_variab... | Keyword[public] identifier[LocalDistribution] identifier[getDistribution] operator[SEP] identifier[WrapperConfiguration] identifier[configuration] operator[SEP] {
identifier[String] identifier[baseName] operator[=] identifier[getDistName] operator[SEP] identifier[configuration] operator[SEP] identifier[getDistri... |
public boolean addMeasureToVerb(Map<String, Object> properties)
{
String[] pathKeys = {"verb"};
return addChild("measure", properties, pathKeys);
} | class class_name[name] begin[{]
method[addMeasureToVerb, return_type[type[boolean]], modifier[public], parameter[properties]] begin[{]
local_variable[type[String], pathKeys]
return[call[.addChild, parameter[literal["measure"], member[.properties], member[.pathKeys]]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[addMeasureToVerb] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[properties] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[pathKeys] operator[=] {
literal[String]
}... |
public Matrix4x3f shadow(Vector4fc light, Matrix4x3fc planeTransform, Matrix4x3f dest) {
// compute plane equation by transforming (y = 0)
float a = planeTransform.m10();
float b = planeTransform.m11();
float c = planeTransform.m12();
float d = -a * planeTransform.m30() - b * pla... | class class_name[name] begin[{]
method[shadow, return_type[type[Matrix4x3f]], modifier[public], parameter[light, planeTransform, dest]] begin[{]
local_variable[type[float], a]
local_variable[type[float], b]
local_variable[type[float], c]
local_variable[type[float], d]
re... | Keyword[public] identifier[Matrix4x3f] identifier[shadow] operator[SEP] identifier[Vector4fc] identifier[light] , identifier[Matrix4x3fc] identifier[planeTransform] , identifier[Matrix4x3f] identifier[dest] operator[SEP] {
Keyword[float] identifier[a] operator[=] identifier[planeTransform] operator[SEP] identi... |
private void closeAndKeepWaitingThreads(boolean completeClose)
{
if (!closed.get())
{
// cleanup resources obtained by filters
if (completeClose && recoveryFilters != null)
{
for (AbstractRecoveryFilter filter : recoveryFilters)
{
filter.c... | class class_name[name] begin[{]
method[closeAndKeepWaitingThreads, return_type[void], modifier[private], parameter[completeClose]] begin[{]
if[call[closed.get, parameter[]]] begin[{]
if[binary_operation[member[.completeClose], &&, binary_operation[member[.recoveryFilters... | Keyword[private] Keyword[void] identifier[closeAndKeepWaitingThreads] operator[SEP] Keyword[boolean] identifier[completeClose] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[closed] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] id... |
public PartialResponseAttributesType<PartialResponseChangesType<T>> getOrCreateAttributes()
{
List<Node> nodeList = childNode.get("attributes");
if (nodeList != null && nodeList.size() > 0)
{
return new PartialResponseAttributesTypeImpl<PartialResponseChangesType<T>>(this, "attributes", c... | class class_name[name] begin[{]
method[getOrCreateAttributes, return_type[type[PartialResponseAttributesType]], modifier[public], parameter[]] begin[{]
local_variable[type[List], nodeList]
if[binary_operation[binary_operation[member[.nodeList], !=, literal[null]], &&, binary_operation[c... | Keyword[public] identifier[PartialResponseAttributesType] operator[<] identifier[PartialResponseChangesType] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreateAttributes] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Node] operator[>] identifier[nodeList] operator[=]... |
public static void runExample(
AdManagerServices adManagerServices, AdManagerSession session, long customTargetingValueId)
throws RemoteException {
// Get the CustomTargetingService.
CustomTargetingServiceInterface customTargetingService =
adManagerServices.get(session, CustomTargetingServic... | class class_name[name] begin[{]
method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session, customTargetingValueId]] begin[{]
local_variable[type[CustomTargetingServiceInterface], customTargetingService]
local_variable[type[StatementBuilder], statementBu... | Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] , Keyword[long] identifier[customTargetingValueId] operator[SEP] Keyword[throws] identifier[RemoteException] {
identi... |
public ZonedDateTime getStartZonedDateTime() {
if (zonedStartDateTime == null) {
zonedStartDateTime = ZonedDateTime.of(startDate, startTime, zoneId);
}
return zonedStartDateTime;
} | class class_name[name] begin[{]
method[getStartZonedDateTime, return_type[type[ZonedDateTime]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.zonedStartDateTime], ==, literal[null]]] begin[{]
assign[member[.zonedStartDateTime], call[ZonedDateTime.of... | Keyword[public] identifier[ZonedDateTime] identifier[getStartZonedDateTime] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[zonedStartDateTime] operator[==] Other[null] operator[SEP] {
identifier[zonedStartDateTime] operator[=] identifier[ZonedDateTime] operator[SEP] identifier[of] ... |
@Nonnull
public static IReadableResource getResolvedResource (@Nullable final String sSystemId,
@Nullable final String sBaseURI)
{
return getResolvedResource (sSystemId, sBaseURI, (ClassLoader) null);
} | class class_name[name] begin[{]
method[getResolvedResource, return_type[type[IReadableResource]], modifier[public static], parameter[sSystemId, sBaseURI]] begin[{]
return[call[.getResolvedResource, parameter[member[.sSystemId], member[.sBaseURI], Cast(expression=Literal(postfix_operators=[], prefix_ope... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[IReadableResource] identifier[getResolvedResource] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sSystemId] , annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sBas... |
public EthBlock getFirstBlock(boolean includeTransactions)
{
try
{
return web3j.ethGetBlockByNumber(DefaultBlockParameterName.EARLIEST, includeTransactions).send();
}
catch (IOException ex)
{
LOGGER.error("Not able to find the EARLIEST block. ", ex);
... | class class_name[name] begin[{]
method[getFirstBlock, return_type[type[EthBlock]], modifier[public], parameter[includeTransactions]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=EARLIEST, postfix_operators=[], prefix_operators=[], qualifier=... | Keyword[public] identifier[EthBlock] identifier[getFirstBlock] operator[SEP] Keyword[boolean] identifier[includeTransactions] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[web3j] operator[SEP] identifier[ethGetBlockByNumber] operator[SEP] identifier[DefaultBlockParameterName] operator[SEP]... |
@Override
public boolean getPermission(final Duration timeoutDuration) {
long timeoutInNanos = timeoutDuration.toNanos();
State modifiedState = updateStateWithBackOff(timeoutInNanos);
boolean result = waitForPermissionIfNecessary(timeoutInNanos, modifiedState.nanosToWait);
publishRat... | class class_name[name] begin[{]
method[getPermission, return_type[type[boolean]], modifier[public], parameter[timeoutDuration]] begin[{]
local_variable[type[long], timeoutInNanos]
local_variable[type[State], modifiedState]
local_variable[type[boolean], result]
call[.publ... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[getPermission] operator[SEP] Keyword[final] identifier[Duration] identifier[timeoutDuration] operator[SEP] {
Keyword[long] identifier[timeoutInNanos] operator[=] identifier[timeoutDuration] operator[SEP] identifier[toNanos] operator[S... |
public java.util.List<RdsDbInstance> getRdsDbInstances() {
if (rdsDbInstances == null) {
rdsDbInstances = new com.amazonaws.internal.SdkInternalList<RdsDbInstance>();
}
return rdsDbInstances;
} | class class_name[name] begin[{]
method[getRdsDbInstances, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.rdsDbInstances], ==, literal[null]]] begin[{]
assign[member[.rdsDbInstances], ClassCreator(arguments=[], body=None, cons... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[RdsDbInstance] operator[>] identifier[getRdsDbInstances] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[rdsDbInstances] operator[==] Other[null] operator[SEP] {
ide... |
public net.minidev.ovh.api.xdsl.OvhLine serviceName_lines_number_GET(String serviceName, String number) throws IOException {
String qPath = "/xdsl/{serviceName}/lines/{number}";
StringBuilder sb = path(qPath, serviceName, number);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, net... | class class_name[name] begin[{]
method[serviceName_lines_number_GET, return_type[type[net]], modifier[public], parameter[serviceName, number]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], resp]
return[call[.con... | Keyword[public] identifier[net] operator[SEP] identifier[minidev] operator[SEP] identifier[ovh] operator[SEP] identifier[api] operator[SEP] identifier[xdsl] operator[SEP] identifier[OvhLine] identifier[serviceName_lines_number_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifie... |
protected void handleNonNetworkShare(Activity activity, final SocializeSession session, final ShareType shareType, final Share share, String shareText, Location location, final ShareAddListener shareAddListener) {
SocialNetworkListener snListener = new SocialNetworkListener() {
@Override
public void onNetwork... | class class_name[name] begin[{]
method[handleNonNetworkShare, return_type[void], modifier[protected], parameter[activity, session, shareType, share, shareText, location, shareAddListener]] begin[{]
local_variable[type[SocialNetworkListener], snListener]
call[shareSystem.share, parameter... | Keyword[protected] Keyword[void] identifier[handleNonNetworkShare] operator[SEP] identifier[Activity] identifier[activity] , Keyword[final] identifier[SocializeSession] identifier[session] , Keyword[final] identifier[ShareType] identifier[shareType] , Keyword[final] identifier[Share] identifier[share] , identifier[... |
private boolean checkRootfile( ZipInputStream zipStream,
ZipEntry entry ) throws Exception {
List<EpubMetadataProperty> properties = new ArrayList<>();
Map<String, EpubMetadataProperty> propertiesWithId = new HashMap<>();
ByteArrayOutputStream content = getZip... | class class_name[name] begin[{]
method[checkRootfile, return_type[type[boolean]], modifier[private], parameter[zipStream, entry]] begin[{]
local_variable[type[List], properties]
local_variable[type[Map], propertiesWithId]
local_variable[type[ByteArrayOutputStream], content]
loca... | Keyword[private] Keyword[boolean] identifier[checkRootfile] operator[SEP] identifier[ZipInputStream] identifier[zipStream] , identifier[ZipEntry] identifier[entry] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[List] operator[<] identifier[EpubMetadataProperty] operator[>] identifier[propertie... |
public CompletableFuture<Boolean> deleteTableSegment(final String tableName,
final boolean mustBeEmpty,
String delegationToken,
final long clientRequ... | class class_name[name] begin[{]
method[deleteTableSegment, return_type[type[CompletableFuture]], modifier[public], parameter[tableName, mustBeEmpty, delegationToken, clientRequestId]] begin[{]
local_variable[type[CompletableFuture], result]
local_variable[type[Controller], uri]
local_va... | Keyword[public] identifier[CompletableFuture] operator[<] identifier[Boolean] operator[>] identifier[deleteTableSegment] operator[SEP] Keyword[final] identifier[String] identifier[tableName] , Keyword[final] Keyword[boolean] identifier[mustBeEmpty] , identifier[String] identifier[delegationToken] , Keyword[final] Ke... |
protected void downgradeEnergiepassElements(Document doc) throws JaxenException {
List nodes = XmlUtils.newXPath(
"/io:openimmo/io:anbieter/io:immobilie/io:zustand_angaben/io:energiepass",
doc).selectNodes(doc);
for (Object item : nodes) {
Element parentNode =... | class class_name[name] begin[{]
method[downgradeEnergiepassElements, return_type[void], modifier[protected], parameter[doc]] begin[{]
local_variable[type[List], nodes]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarat... | Keyword[protected] Keyword[void] identifier[downgradeEnergiepassElements] operator[SEP] identifier[Document] identifier[doc] operator[SEP] Keyword[throws] identifier[JaxenException] {
identifier[List] identifier[nodes] operator[=] identifier[XmlUtils] operator[SEP] identifier[newXPath] operator[SEP] literal[Stri... |
private static SingleID specsToSpecialInverse(Specs specs) {
if (!specs.source.equalsIgnoreCase(ANY)) {
return null;
}
String inverseTarget = SPECIAL_INVERSES.get(new CaseInsensitiveString(specs.target));
if (inverseTarget != null) {
// If the original ID containe... | class class_name[name] begin[{]
method[specsToSpecialInverse, return_type[type[SingleID]], modifier[private static], parameter[specs]] begin[{]
if[call[specs.source.equalsIgnoreCase, parameter[member[.ANY]]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
... | Keyword[private] Keyword[static] identifier[SingleID] identifier[specsToSpecialInverse] operator[SEP] identifier[Specs] identifier[specs] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[specs] operator[SEP] identifier[source] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[AN... |
private void addAuthentication(HttpHost host, Credentials credentials,
AuthScheme authScheme, HttpClientContext context) {
AuthCache authCache = context.getAuthCache();
if (authCache == null) {
authCache = new BasicAuthCache();
context.setAuthCache(authCache);
... | class class_name[name] begin[{]
method[addAuthentication, return_type[void], modifier[private], parameter[host, credentials, authScheme, context]] begin[{]
local_variable[type[AuthCache], authCache]
if[binary_operation[member[.authCache], ==, literal[null]]] begin[{]
... | Keyword[private] Keyword[void] identifier[addAuthentication] operator[SEP] identifier[HttpHost] identifier[host] , identifier[Credentials] identifier[credentials] , identifier[AuthScheme] identifier[authScheme] , identifier[HttpClientContext] identifier[context] operator[SEP] {
identifier[AuthCache] identifie... |
@Override
public void removedBundle(Bundle bundle, BundleEvent bundleEvent, List<BundleWebJarLib> webJarLibs) {
removeWebJarLibs(webJarLibs);
} | class class_name[name] begin[{]
method[removedBundle, return_type[void], modifier[public], parameter[bundle, bundleEvent, webJarLibs]] begin[{]
call[.removeWebJarLibs, parameter[member[.webJarLibs]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removedBundle] operator[SEP] identifier[Bundle] identifier[bundle] , identifier[BundleEvent] identifier[bundleEvent] , identifier[List] operator[<] identifier[BundleWebJarLib] operator[>] identifier[webJarLibs] operator[SEP] {
identifi... |
public void changeSocket(Socket socket) throws IOException {
this.connection = socket;
// Submitted by Jason Venner <jason@idiom.com>. Disable Nagle
// as we are selective about flushing output only when we
// really need to.
connection.setTcpNoDelay(true);
// Buffer sizes submitted by Sverre ... | class class_name[name] begin[{]
method[changeSocket, return_type[void], modifier[public], parameter[socket]] begin[{]
assign[THIS[member[None.connection]], member[.socket]]
call[connection.setTcpNoDelay, parameter[literal[true]]]
assign[member[.pgInput], ClassCre... | Keyword[public] Keyword[void] identifier[changeSocket] operator[SEP] identifier[Socket] identifier[socket] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[this] operator[SEP] identifier[connection] operator[=] identifier[socket] operator[SEP] identifier[connection] operator[SEP] identifier[setTcp... |
public List<Runner> getRunners(Runner.RunnerStatus scope) throws GitLabApiException {
return (getRunners(scope, getDefaultPerPage()).all());
} | class class_name[name] begin[{]
method[getRunners, return_type[type[List]], modifier[public], parameter[scope]] begin[{]
return[call[.getRunners, parameter[member[.scope], call[.getDefaultPerPage, parameter[]]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[Runner] operator[>] identifier[getRunners] operator[SEP] identifier[Runner] operator[SEP] identifier[RunnerStatus] identifier[scope] operator[SEP] Keyword[throws] identifier[GitLabApiException] {
Keyword[return] operator[SEP] identifier[getRunners] operator... |
public static NumberMath getMath(Number left, Number right) {
if (isFloatingPoint(left) || isFloatingPoint(right)) {
return FloatingPointMath.INSTANCE;
}
if (isBigDecimal(left) || isBigDecimal(right)) {
return BigDecimalMath.INSTANCE;
}
if (isBigInteger(le... | class class_name[name] begin[{]
method[getMath, return_type[type[NumberMath]], modifier[public static], parameter[left, right]] begin[{]
if[binary_operation[call[.isFloatingPoint, parameter[member[.left]]], ||, call[.isFloatingPoint, parameter[member[.right]]]]] begin[{]
return[memb... | Keyword[public] Keyword[static] identifier[NumberMath] identifier[getMath] operator[SEP] identifier[Number] identifier[left] , identifier[Number] identifier[right] operator[SEP] {
Keyword[if] operator[SEP] identifier[isFloatingPoint] operator[SEP] identifier[left] operator[SEP] operator[||] identifier[isFloatin... |
public Observable<ServiceResponse<DataMigrationServiceInner>> updateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is require... | class class_name[name] begin[{]
method[updateWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[groupName, serviceName, parameters]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[DataMigrationServiceInner] operator[>] operator[>] identifier[updateWithServiceResponseAsync] operator[SEP] identifier[String] identifier[groupName] , identifier[String] identifier[serviceName] , identifier[DataMigra... |
@Override
public void logSuppressedCause(CardView view, SMailPostingDiscloser discloser, Exception suppressedCause) {
if (normalLogger.isWarnEnabled()) {
normalLogger.warn(buildSuppressedCauseDisp(view, discloser, suppressedCause), suppressedCause);
}
} | class class_name[name] begin[{]
method[logSuppressedCause, return_type[void], modifier[public], parameter[view, discloser, suppressedCause]] begin[{]
if[call[normalLogger.isWarnEnabled, parameter[]]] begin[{]
call[normalLogger.warn, parameter[call[.buildSuppressedCauseDi... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[logSuppressedCause] operator[SEP] identifier[CardView] identifier[view] , identifier[SMailPostingDiscloser] identifier[discloser] , identifier[Exception] identifier[suppressedCause] operator[SEP] {
Keyword[if] operator[SEP] identifier[... |
public static InvocationException newInstance(InvocationContext context, HttpResponse response, Throwable rootCause) {
if(rootCause instanceof InvocationException) {
return (InvocationException)rootCause;
}
return new InvocationException(context, response, rootCause);
} | class class_name[name] begin[{]
method[newInstance, return_type[type[InvocationException]], modifier[public static], parameter[context, response, rootCause]] begin[{]
if[binary_operation[member[.rootCause], instanceof, type[InvocationException]]] begin[{]
return[Cast(expression=Memb... | Keyword[public] Keyword[static] identifier[InvocationException] identifier[newInstance] operator[SEP] identifier[InvocationContext] identifier[context] , identifier[HttpResponse] identifier[response] , identifier[Throwable] identifier[rootCause] operator[SEP] {
Keyword[if] operator[SEP] identifier[rootCause] K... |
public static Observable<JusEvent> allEventsObservable(
RequestQueue queue, RequestQueue.RequestFilter filter) {
return Observable.merge(
resultObservable(queue, filter),
errorObservable(queue, filter),
markerObservable(queue, filter));
} | class class_name[name] begin[{]
method[allEventsObservable, return_type[type[Observable]], modifier[public static], parameter[queue, filter]] begin[{]
return[call[Observable.merge, parameter[call[.resultObservable, parameter[member[.queue], member[.filter]]], call[.errorObservable, parameter[member[.qu... | Keyword[public] Keyword[static] identifier[Observable] operator[<] identifier[JusEvent] operator[>] identifier[allEventsObservable] operator[SEP] identifier[RequestQueue] identifier[queue] , identifier[RequestQueue] operator[SEP] identifier[RequestFilter] identifier[filter] operator[SEP] {
Keyword[return] ident... |
public String format(MonetaryAmount amount) {
StringBuilder builder = new StringBuilder();
try {
print(builder, amount);
} catch (IOException e) {
throw new IllegalStateException("Error foratting of " + amount, e);
}
return builder.toString();
} | class class_name[name] begin[{]
method[format, return_type[type[String]], modifier[public], parameter[amount]] begin[{]
local_variable[type[StringBuilder], builder]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=builder, postfix_operators=[... | Keyword[public] identifier[String] identifier[format] operator[SEP] identifier[MonetaryAmount] identifier[amount] operator[SEP] {
identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[print] ... |
@Override
public void saveDataFrame(DataFrame dataFrame, Class<?> entityClazz, Map<String, Object> properties)
{
dataFrame.save(getOutputFilePath(properties), "json");
} | class class_name[name] begin[{]
method[saveDataFrame, return_type[void], modifier[public], parameter[dataFrame, entityClazz, properties]] begin[{]
call[dataFrame.save, parameter[call[.getOutputFilePath, parameter[member[.properties]]], literal["json"]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[saveDataFrame] operator[SEP] identifier[DataFrame] identifier[dataFrame] , identifier[Class] operator[<] operator[?] operator[>] identifier[entityClazz] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identi... |
public static <E> Automaton<E> build(List<Expression<E>> exprs) {
Expression.MatchingGroup<E> group = new Expression.MatchingGroup<E>(exprs);
return group.build();
} | class class_name[name] begin[{]
method[build, return_type[type[Automaton]], modifier[public static], parameter[exprs]] begin[{]
local_variable[type[Expression], group]
return[call[group.build, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Automaton] operator[<] identifier[E] operator[>] identifier[build] operator[SEP] identifier[List] operator[<] identifier[Expression] operator[<] identifier[E] operator[>] operator[>] identifier[exprs] operator[SEP] {
identifier[Expr... |
public List<Integer> searchBigBytes(byte[] srcBytes, byte[] searchBytes) {
int numOfThreadsOptimized = (srcBytes.length / analyzeByteArrayUnitSize);
if (numOfThreadsOptimized == 0) {
numOfThreadsOptimized = 1;
}
return searchBigBytes(srcBytes, searchBytes, numOfThreadsOptimized);
} | class class_name[name] begin[{]
method[searchBigBytes, return_type[type[List]], modifier[public], parameter[srcBytes, searchBytes]] begin[{]
local_variable[type[int], numOfThreadsOptimized]
if[binary_operation[member[.numOfThreadsOptimized], ==, literal[0]]] begin[{]
... | Keyword[public] identifier[List] operator[<] identifier[Integer] operator[>] identifier[searchBigBytes] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[srcBytes] , Keyword[byte] operator[SEP] operator[SEP] identifier[searchBytes] operator[SEP] {
Keyword[int] identifier[numOfThreadsOptimized] ... |
public static String getAttributeName(final String fullname) throws DevFailed {
final String s = TangoUtil.getfullAttributeNameForAttribute(fullname);
return s.substring(s.lastIndexOf('/') + 1);
} | class class_name[name] begin[{]
method[getAttributeName, return_type[type[String]], modifier[public static], parameter[fullname]] begin[{]
local_variable[type[String], s]
return[call[s.substring, parameter[binary_operation[call[s.lastIndexOf, parameter[literal['/']]], +, literal[1]]]]]
end[... | Keyword[public] Keyword[static] identifier[String] identifier[getAttributeName] operator[SEP] Keyword[final] identifier[String] identifier[fullname] operator[SEP] Keyword[throws] identifier[DevFailed] {
Keyword[final] identifier[String] identifier[s] operator[=] identifier[TangoUtil] operator[SEP] identifier[get... |
public static final void error(TraceComponent tc, Suppressor s, String msgKey) {
error(tc, s, msgKey, null);
} | class class_name[name] begin[{]
method[error, return_type[void], modifier[final public static], parameter[tc, s, msgKey]] begin[{]
call[.error, parameter[member[.tc], member[.s], member[.msgKey], literal[null]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[final] Keyword[void] identifier[error] operator[SEP] identifier[TraceComponent] identifier[tc] , identifier[Suppressor] identifier[s] , identifier[String] identifier[msgKey] operator[SEP] {
identifier[error] operator[SEP] identifier[tc] , identifier[s] , identifier[msg... |
public boolean remove() {
if (exists() && !isRemoved()) {
isRemoved = true;
node.getParent().removeChild(nodeFqn.getLastElement());
if (doTraceLogs) {
logger.trace("removed cache node "+nodeFqn);
}
return true;
}
else {
return false;
}
} | class class_name[name] begin[{]
method[remove, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[.exists, parameter[]], &&, call[.isRemoved, parameter[]]]] begin[{]
assign[member[.isRemoved], literal[true]]
... | Keyword[public] Keyword[boolean] identifier[remove] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[isRemoved] operator[SEP] operator[SEP] operator[SEP] {
identifier[isRemoved] operator[=] literal[boolean] opera... |
@Override
public void eUnset(int featureID) {
switch (featureID) {
case AfplibPackage.GCMRK__RG:
getRg().clear();
return;
}
super.eUnset(featureID);
} | class class_name[name] begin[{]
method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=GCMRK__RG, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[Statement... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[GCMRK__RG] operator[... |
public static void writeMapEntry(OutputAccessor out, String key, Object value) {
out.write((byte) '\"');
if (key == null)
out.write(NULL);
else {
writeUtf8(out, key);
}
out.write(Q_AND_C);
toJSONString(out, value);
} | class class_name[name] begin[{]
method[writeMapEntry, return_type[void], modifier[public static], parameter[out, key, value]] begin[{]
call[out.write, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\"'), type=BasicType(dimension... | Keyword[public] Keyword[static] Keyword[void] identifier[writeMapEntry] operator[SEP] identifier[OutputAccessor] identifier[out] , identifier[String] identifier[key] , identifier[Object] identifier[value] operator[SEP] {
identifier[out] operator[SEP] identifier[write] operator[SEP] operator[SEP] Keyword[byte] ... |
public List<MonolingualTextValue> getAddedAliases(String language) {
AliasesWithUpdate update = newAliases.get(language);
if (update == null) {
return Collections.<MonolingualTextValue>emptyList();
}
return update.added;
} | class class_name[name] begin[{]
method[getAddedAliases, return_type[type[List]], modifier[public], parameter[language]] begin[{]
local_variable[type[AliasesWithUpdate], update]
if[binary_operation[member[.update], ==, literal[null]]] begin[{]
return[call[.Collections, parame... | Keyword[public] identifier[List] operator[<] identifier[MonolingualTextValue] operator[>] identifier[getAddedAliases] operator[SEP] identifier[String] identifier[language] operator[SEP] {
identifier[AliasesWithUpdate] identifier[update] operator[=] identifier[newAliases] operator[SEP] identifier[get] operator[SE... |
@Override
public CPFriendlyURLEntry findByG_C_C_Last(long groupId, long classNameId,
long classPK, OrderByComparator<CPFriendlyURLEntry> orderByComparator)
throws NoSuchCPFriendlyURLEntryException {
CPFriendlyURLEntry cpFriendlyURLEntry = fetchByG_C_C_Last(groupId,
classNameId, classPK, orderByComparator);
... | class class_name[name] begin[{]
method[findByG_C_C_Last, return_type[type[CPFriendlyURLEntry]], modifier[public], parameter[groupId, classNameId, classPK, orderByComparator]] begin[{]
local_variable[type[CPFriendlyURLEntry], cpFriendlyURLEntry]
if[binary_operation[member[.cpFriendlyURLE... | annotation[@] identifier[Override] Keyword[public] identifier[CPFriendlyURLEntry] identifier[findByG_C_C_Last] operator[SEP] Keyword[long] identifier[groupId] , Keyword[long] identifier[classNameId] , Keyword[long] identifier[classPK] , identifier[OrderByComparator] operator[<] identifier[CPFriendlyURLEntry] operato... |
public void marshall(RebootInstanceRequest rebootInstanceRequest, ProtocolMarshaller protocolMarshaller) {
if (rebootInstanceRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(rebootInstanceRe... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[rebootInstanceRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.rebootInstanceRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Lit... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[RebootInstanceRequest] identifier[rebootInstanceRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[rebootInstanceRequest] operator[==] Other[null] operator[SEP] ... |
public final ListDataSourcesPagedResponse listDataSources(ParentName parent) {
ListDataSourcesRequest request =
ListDataSourcesRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listDataSources(request);
} | class class_name[name] begin[{]
method[listDataSources, return_type[type[ListDataSourcesPagedResponse]], modifier[final public], parameter[parent]] begin[{]
local_variable[type[ListDataSourcesRequest], request]
return[call[.listDataSources, parameter[member[.request]]]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[ListDataSourcesPagedResponse] identifier[listDataSources] operator[SEP] identifier[ParentName] identifier[parent] operator[SEP] {
identifier[ListDataSourcesRequest] identifier[request] operator[=] identifier[ListDataSourcesRequest] operator[SEP] identifier[newBuilder] op... |
public ThymeleafEngineConfigBuilder<P> setMessageResolvers(final Set<? extends IMessageResolver> messageResolvers) {
this.messageResolvers().clear();
this.messageResolvers().addAll(messageResolvers);
return this;
} | class class_name[name] begin[{]
method[setMessageResolvers, return_type[type[ThymeleafEngineConfigBuilder]], modifier[public], parameter[messageResolvers]] begin[{]
THIS[call[None.messageResolvers, parameter[]]call[None.clear, parameter[]]]
THIS[call[None.messageResolvers, param... | Keyword[public] identifier[ThymeleafEngineConfigBuilder] operator[<] identifier[P] operator[>] identifier[setMessageResolvers] operator[SEP] Keyword[final] identifier[Set] operator[<] operator[?] Keyword[extends] identifier[IMessageResolver] operator[>] identifier[messageResolvers] operator[SEP] {
Keyword[this] ... |
public synchronized void clearProperty(Object source, String name, Object value, boolean beforeUpdate) {
if (beforeUpdate == false && isLog4JProperty(name)) {
overrideProps.remove(name);
reConfigureAsynchronously();
}
} | class class_name[name] begin[{]
method[clearProperty, return_type[void], modifier[synchronized public], parameter[source, name, value, beforeUpdate]] begin[{]
if[binary_operation[binary_operation[member[.beforeUpdate], ==, literal[false]], &&, call[.isLog4JProperty, parameter[member[.name]]]]] ... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[clearProperty] operator[SEP] identifier[Object] identifier[source] , identifier[String] identifier[name] , identifier[Object] identifier[value] , Keyword[boolean] identifier[beforeUpdate] operator[SEP] {
Keyword[if] operator[SEP] identifier[before... |
private void setSelectPositionX(int posX, int width) {
m_markerStyle.setLeft(posX, Unit.PX);
m_markerStyle.setWidth(width, Unit.PX);
m_overlayLeftStyle.setWidth(posX, Unit.PX);
m_overlayTopStyle.setLeft(posX, Unit.PX);
m_overlayTopStyle.setWidth(width, Unit.PX);
m_overl... | class class_name[name] begin[{]
method[setSelectPositionX, return_type[void], modifier[private], parameter[posX, width]] begin[{]
call[m_markerStyle.setLeft, parameter[member[.posX], member[Unit.PX]]]
call[m_markerStyle.setWidth, parameter[member[.width], member[Unit.PX]]]
... | Keyword[private] Keyword[void] identifier[setSelectPositionX] operator[SEP] Keyword[int] identifier[posX] , Keyword[int] identifier[width] operator[SEP] {
identifier[m_markerStyle] operator[SEP] identifier[setLeft] operator[SEP] identifier[posX] , identifier[Unit] operator[SEP] identifier[PX] operator[SEP] ope... |
public void setContent(Region content) {
if (content != null) {
this.content = content;
this.content.setPickOnBounds(false);
contentHolder.getChildren().setAll(content);
}
} | class class_name[name] begin[{]
method[setContent, return_type[void], modifier[public], parameter[content]] begin[{]
if[binary_operation[member[.content], !=, literal[null]]] begin[{]
assign[THIS[member[None.content]], member[.content]]
THIS[membe... | Keyword[public] Keyword[void] identifier[setContent] operator[SEP] identifier[Region] identifier[content] operator[SEP] {
Keyword[if] operator[SEP] identifier[content] operator[!=] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[content] operator[=] identifier[content] operator[SEP]... |
private static void createTokenHiddenField(Controller controller, String tokenName, String tokenId) {
StringBuilder sb = new StringBuilder();
sb.append("<input type='hidden' name='").append(tokenName).append("' id='").append(tokenName).append("' value='").append(tokenId).append("' />");
controller.setAttr("tok... | class class_name[name] begin[{]
method[createTokenHiddenField, return_type[void], modifier[private static], parameter[controller, tokenName, tokenId]] begin[{]
local_variable[type[StringBuilder], sb]
call[sb.append, parameter[literal["<input type='hidden' name='"]]]
call... | Keyword[private] Keyword[static] Keyword[void] identifier[createTokenHiddenField] operator[SEP] identifier[Controller] identifier[controller] , identifier[String] identifier[tokenName] , identifier[String] identifier[tokenId] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] ide... |
public List<JAXBElement<Object>> get_GenericApplicationPropertyOfInteriorWallSurface() {
if (_GenericApplicationPropertyOfInteriorWallSurface == null) {
_GenericApplicationPropertyOfInteriorWallSurface = new ArrayList<JAXBElement<Object>>();
}
return this._GenericApplicationPropertyO... | class class_name[name] begin[{]
method[get_GenericApplicationPropertyOfInteriorWallSurface, return_type[type[List]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[._GenericApplicationPropertyOfInteriorWallSurface], ==, literal[null]]] begin[{]
assign... | Keyword[public] identifier[List] operator[<] identifier[JAXBElement] operator[<] identifier[Object] operator[>] operator[>] identifier[get_GenericApplicationPropertyOfInteriorWallSurface] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[_GenericApplicationPropertyOfInteriorWallSurface] operator... |
@Override
public List<FileMeta> getFileMetaData(Class<? extends FileEntity> type, Integer entityId) {
return this.handleGetEntityMetaFiles(type, entityId);
} | class class_name[name] begin[{]
method[getFileMetaData, return_type[type[List]], modifier[public], parameter[type, entityId]] begin[{]
return[THIS[call[None.handleGetEntityMetaFiles, parameter[member[.type], member[.entityId]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[FileMeta] operator[>] identifier[getFileMetaData] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[FileEntity] operator[>] identifier[type] , identifier[Integer] identifier[entityId] operator[S... |
public static StringDictionary combine(StringDictionary... args)
{
StringDictionary[] dictionaries = args.clone();
StringDictionary mainDictionary = dictionaries[0];
for (int i = 1; i < dictionaries.length; ++i)
{
mainDictionary.combine(dictionaries[i]);
}
... | class class_name[name] begin[{]
method[combine, return_type[type[StringDictionary]], modifier[public static], parameter[args]] begin[{]
local_variable[type[StringDictionary], dictionaries]
local_variable[type[StringDictionary], mainDictionary]
ForStatement(body=BlockStatement(label=None... | Keyword[public] Keyword[static] identifier[StringDictionary] identifier[combine] operator[SEP] identifier[StringDictionary] operator[...] identifier[args] operator[SEP] {
identifier[StringDictionary] operator[SEP] operator[SEP] identifier[dictionaries] operator[=] identifier[args] operator[SEP] identifier[clone]... |
public void put(K[] key, V value) {
Node child = root.get(key[0]);
if (child == null) {
child = new Node(key[0]);
root.put(key[0], child);
}
child.addChild(key, value, 1);
} | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[key, value]] begin[{]
local_variable[type[Node], child]
if[binary_operation[member[.child], ==, literal[null]]] begin[{]
assign[member[.child], ClassCreator(arguments=[Memb... | Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[K] operator[SEP] operator[SEP] identifier[key] , identifier[V] identifier[value] operator[SEP] {
identifier[Node] identifier[child] operator[=] identifier[root] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] Other[... |
final void firePropertyChange(String property, Object oldValue,
Object newValue)
{
Object listeners = propertyListeners;
if (listeners != null) {
firePropertyChangeImpl(listeners, property, oldValue, newValue);
}
} | class class_name[name] begin[{]
method[firePropertyChange, return_type[void], modifier[final], parameter[property, oldValue, newValue]] begin[{]
local_variable[type[Object], listeners]
if[binary_operation[member[.listeners], !=, literal[null]]] begin[{]
call[.fir... | Keyword[final] Keyword[void] identifier[firePropertyChange] operator[SEP] identifier[String] identifier[property] , identifier[Object] identifier[oldValue] , identifier[Object] identifier[newValue] operator[SEP] {
identifier[Object] identifier[listeners] operator[=] identifier[propertyListeners] operator[SEP] ... |
public static <T> T reduce(Iterable<? extends T> iterable, Function2<? super T, ? super T, ? extends T> function) {
return IteratorExtensions.reduce(iterable.iterator(), function);
} | class class_name[name] begin[{]
method[reduce, return_type[type[T]], modifier[public static], parameter[iterable, function]] begin[{]
return[call[IteratorExtensions.reduce, parameter[call[iterable.iterator, parameter[]], member[.function]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[reduce] operator[SEP] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[iterable] , identifier[Function2] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] K... |
public static String decodeQuery(String url) {
try {
return URLDecoder.decode(url, "UTF-8");
}
catch (UnsupportedEncodingException ignore) {}
return url;
} | class class_name[name] begin[{]
method[decodeQuery, return_type[type[String]], modifier[public static], parameter[url]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), L... | Keyword[public] Keyword[static] identifier[String] identifier[decodeQuery] operator[SEP] identifier[String] identifier[url] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[URLDecoder] operator[SEP] identifier[decode] operator[SEP] identifier[url] , literal[String] operator[SEP] operator[SEP... |
public static <X> String createParameterId(AnnotatedParameter<X> annotatedParameter) {
return createParameterId(annotatedParameter.getBaseType(), annotatedParameter.getAnnotations());
} | class class_name[name] begin[{]
method[createParameterId, return_type[type[String]], modifier[public static], parameter[annotatedParameter]] begin[{]
return[call[.createParameterId, parameter[call[annotatedParameter.getBaseType, parameter[]], call[annotatedParameter.getAnnotations, parameter[]]]]]
... | Keyword[public] Keyword[static] operator[<] identifier[X] operator[>] identifier[String] identifier[createParameterId] operator[SEP] identifier[AnnotatedParameter] operator[<] identifier[X] operator[>] identifier[annotatedParameter] operator[SEP] {
Keyword[return] identifier[createParameterId] operator[SEP] iden... |
public void writeToStream(final OutputStream out) {
InputStream input = null;
try {
input = getDataSource().getInputStream();
StreamUtil.copy(input, out);
}
catch (final IOException ioex) {
throw new MailException(ioex);
}
finally {
StreamUtil.close(input);
}
} | class class_name[name] begin[{]
method[writeToStream, return_type[void], modifier[public], parameter[out]] begin[{]
local_variable[type[InputStream], input]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=input, postfix_operators=[], prefix_opera... | Keyword[public] Keyword[void] identifier[writeToStream] operator[SEP] Keyword[final] identifier[OutputStream] identifier[out] operator[SEP] {
identifier[InputStream] identifier[input] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[input] operator[=] identifier[getDataSource] operator[... |
protected String getPath(CmsClientSitemapEntry entry, String newUrlName) {
if (newUrlName.equals("")) {
return entry.getSitePath();
}
return CmsResource.getParentFolder(entry.getSitePath()) + newUrlName + "/";
} | class class_name[name] begin[{]
method[getPath, return_type[type[String]], modifier[protected], parameter[entry, newUrlName]] begin[{]
if[call[newUrlName.equals, parameter[literal[""]]]] begin[{]
return[call[entry.getSitePath, parameter[]]]
else begin[{]
None
end[}]
... | Keyword[protected] identifier[String] identifier[getPath] operator[SEP] identifier[CmsClientSitemapEntry] identifier[entry] , identifier[String] identifier[newUrlName] operator[SEP] {
Keyword[if] operator[SEP] identifier[newUrlName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] op... |
static int positionValue(Encoding enc, int i) {
if (i < ByteValTable.length) {
if (i == 0 && enc.minLength() > 1) {
return 20;
} else {
return ByteValTable[i];
}
} else {
return 4; /* Take it easy. */
}
} | class class_name[name] begin[{]
method[positionValue, return_type[type[int]], modifier[static], parameter[enc, i]] begin[{]
if[binary_operation[member[.i], <, member[ByteValTable.length]]] begin[{]
if[binary_operation[binary_operation[member[.i], ==, literal[0]], &&, bin... | Keyword[static] Keyword[int] identifier[positionValue] operator[SEP] identifier[Encoding] identifier[enc] , Keyword[int] identifier[i] operator[SEP] {
Keyword[if] operator[SEP] identifier[i] operator[<] identifier[ByteValTable] operator[SEP] identifier[length] operator[SEP] {
Keyword[if] operator[SEP... |
void _emitRexRM(int w, int opReg, Operand rm) {
if (is64()) {
boolean r = (opReg & 0x8) != 0;
boolean x = false;
boolean b = false;
if (rm.isReg()) {
b = (((BaseReg) rm).code() & 0x8) != 0;
} else if (rm.isMem()) {
x ... | class class_name[name] begin[{]
method[_emitRexRM, return_type[void], modifier[default], parameter[w, opReg, rm]] begin[{]
if[call[.is64, parameter[]]] begin[{]
local_variable[type[boolean], r]
local_variable[type[boolean], x]
local_variable[type[boolean], b]... | Keyword[void] identifier[_emitRexRM] operator[SEP] Keyword[int] identifier[w] , Keyword[int] identifier[opReg] , identifier[Operand] identifier[rm] operator[SEP] {
Keyword[if] operator[SEP] identifier[is64] operator[SEP] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[r] operator[=] operat... |
private final String load(String key, String defaultValue, String comment) {
if(options.containsKey(key)) {
return options.get(key);
} else if (config.getProperty(key) != null) {
return config.getString(key);
} else {
if (defaultValue != null) {
try... | class class_name[name] begin[{]
method[load, return_type[type[String]], modifier[final private], parameter[key, defaultValue, comment]] begin[{]
if[call[options.containsKey, parameter[member[.key]]]] begin[{]
return[call[options.get, parameter[member[.key]]]]
else begin[{]
... | Keyword[private] Keyword[final] identifier[String] identifier[load] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[defaultValue] , identifier[String] identifier[comment] operator[SEP] {
Keyword[if] operator[SEP] identifier[options] operator[SEP] identifier[containsKey] operato... |
public void evaluate(DoubleSolution solution) {
double[] f = new double[getNumberOfObjectives()];
double g = this.evalG(solution);
f[0] = (1 + g) * solution.getVariableValue(0);
f[1] = (1 + g) * (1- Math.sqrt(solution.getVariableValue(0)) *
Math.pow(Math.cos(solution.getVariableValue(0) * Math.P... | class class_name[name] begin[{]
method[evaluate, return_type[void], modifier[public], parameter[solution]] begin[{]
local_variable[type[double], f]
local_variable[type[double], g]
assign[member[.f], binary_operation[binary_operation[literal[1], +, member[.g]], *, call[solution.g... | Keyword[public] Keyword[void] identifier[evaluate] operator[SEP] identifier[DoubleSolution] identifier[solution] operator[SEP] {
Keyword[double] operator[SEP] operator[SEP] identifier[f] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[getNumberOfObjectives] operator[SEP] operator[SEP] operator[... |
public void parseUnixListReply(String reply)
throws FTPException {
if (reply == null) return;
StringTokenizer tokens = new StringTokenizer(reply);
String token, previousToken;
int numTokens = tokens.countTokens();
if (numTokens < 8) {
throw new FTPException... | class class_name[name] begin[{]
method[parseUnixListReply, return_type[void], modifier[public], parameter[reply]] begin[{]
if[binary_operation[member[.reply], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[StringTokenizer], tokens... | Keyword[public] Keyword[void] identifier[parseUnixListReply] operator[SEP] identifier[String] identifier[reply] operator[SEP] Keyword[throws] identifier[FTPException] {
Keyword[if] operator[SEP] identifier[reply] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] identifier[StringTokenizer] ide... |
public synchronized static Bitmap createScaledBitmapFromLocalImageSource(String fileUrl, int maxWidth, int maxHeight, Bitmap.Config config, int orientation)
throws FileNotFoundException {
Bitmap tempBitmap = null;
if (URLUtil.isContentUrl(fileUrl)) {
try {
Uri uri = Uri.parse(fileUrl);
tempBitmap = c... | class class_name[name] begin[{]
method[createScaledBitmapFromLocalImageSource, return_type[type[Bitmap]], modifier[synchronized public static], parameter[fileUrl, maxWidth, maxHeight, config, orientation]] begin[{]
local_variable[type[Bitmap], tempBitmap]
if[call[URLUtil.isContentUrl, p... | Keyword[public] Keyword[synchronized] Keyword[static] identifier[Bitmap] identifier[createScaledBitmapFromLocalImageSource] operator[SEP] identifier[String] identifier[fileUrl] , Keyword[int] identifier[maxWidth] , Keyword[int] identifier[maxHeight] , identifier[Bitmap] operator[SEP] identifier[Config] identifier[co... |
public static void generate(ConfigurationImpl configuration,
ClassTree classtree) {
ClassUseMapper mapper = new ClassUseMapper(configuration, classtree);
for (ClassDoc aClass : configuration.root.classes()) {
// If -nodeprecated option is set and the containi... | class class_name[name] begin[{]
method[generate, return_type[void], modifier[public static], parameter[configuration, classtree]] begin[{]
local_variable[type[ClassUseMapper], mapper]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberR... | Keyword[public] Keyword[static] Keyword[void] identifier[generate] operator[SEP] identifier[ConfigurationImpl] identifier[configuration] , identifier[ClassTree] identifier[classtree] operator[SEP] {
identifier[ClassUseMapper] identifier[mapper] operator[=] Keyword[new] identifier[ClassUseMapper] operator[SEP] i... |
public CompletableFuture<Revision> destroyToken(Author author, String appId) {
requireNonNull(author, "author");
requireNonNull(appId, "appId");
// Remove the token from every project.
final Collection<Project> projects = new SafeProjectManager(projectManager()).list().values();
... | class class_name[name] begin[{]
method[destroyToken, return_type[type[CompletableFuture]], modifier[public], parameter[author, appId]] begin[{]
call[.requireNonNull, parameter[member[.author], literal["author"]]]
call[.requireNonNull, parameter[member[.appId], literal["appId"]]]... | Keyword[public] identifier[CompletableFuture] operator[<] identifier[Revision] operator[>] identifier[destroyToken] operator[SEP] identifier[Author] identifier[author] , identifier[String] identifier[appId] operator[SEP] {
identifier[requireNonNull] operator[SEP] identifier[author] , literal[String] operator[S... |
protected float transformLength(float w)
{
Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
Matrix m = new Matrix();
m.setValue(2, 0, w);
return m.multiply(ctm).getTranslateX();
} | class class_name[name] begin[{]
method[transformLength, return_type[type[float]], modifier[protected], parameter[w]] begin[{]
local_variable[type[Matrix], ctm]
local_variable[type[Matrix], m]
call[m.setValue, parameter[literal[2], literal[0], member[.w]]]
return[call[m.m... | Keyword[protected] Keyword[float] identifier[transformLength] operator[SEP] Keyword[float] identifier[w] operator[SEP] {
identifier[Matrix] identifier[ctm] operator[=] identifier[getGraphicsState] operator[SEP] operator[SEP] operator[SEP] identifier[getCurrentTransformationMatrix] operator[SEP] operator[SEP] ope... |
public Object get(int index) {
try {
return getValue(index);
} catch (JMFUninitializedAccessException ex) {
// No FFDC code needed
// This is an expected exception which just means the field is unset, so we return null.
} catch (JMFException ex) {
FFDCFilter.processException(ex, "com... | class class_name[name] begin[{]
method[get, return_type[type[Object]], modifier[public], parameter[index]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getV... | Keyword[public] identifier[Object] identifier[get] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[getValue] operator[SEP] identifier[index] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[JMFUninitializedAccess... |
public void updateCycleMetrics(HollowProducerListener.ProducerStatus producerStatus) {
Status.StatusType st = producerStatus.getStatus() == HollowProducerListener.Status.SUCCESS
? Status.StatusType.SUCCESS
: Status.StatusType.FAIL;
updateCycleMetrics(new Status(st, produ... | class class_name[name] begin[{]
method[updateCycleMetrics, return_type[void], modifier[public], parameter[producerStatus]] begin[{]
local_variable[type[Status], st]
call[.updateCycleMetrics, parameter[ClassCreator(arguments=[MemberReference(member=st, postfix_operators=[], prefix_operat... | Keyword[public] Keyword[void] identifier[updateCycleMetrics] operator[SEP] identifier[HollowProducerListener] operator[SEP] identifier[ProducerStatus] identifier[producerStatus] operator[SEP] {
identifier[Status] operator[SEP] identifier[StatusType] identifier[st] operator[=] identifier[producerStatus] operator[... |
private Thread createPump(InputStream is, OutputStream os,
boolean closeWhenExhausted) {
BlockingStreamPumper pumper = new BlockingStreamPumper(is, os, closeWhenExhausted);
// pumper.setAutoflush(true); // always auto-flush
final Thread result = new ThreadWithPump... | class class_name[name] begin[{]
method[createPump, return_type[type[Thread]], modifier[private], parameter[is, os, closeWhenExhausted]] begin[{]
local_variable[type[BlockingStreamPumper], pumper]
local_variable[type[Thread], result]
call[result.setDaemon, parameter[literal[true]... | Keyword[private] identifier[Thread] identifier[createPump] operator[SEP] identifier[InputStream] identifier[is] , identifier[OutputStream] identifier[os] , Keyword[boolean] identifier[closeWhenExhausted] operator[SEP] {
identifier[BlockingStreamPumper] identifier[pumper] operator[=] Keyword[new] identifier[Blo... |
private CoverageClassVisitor createCoverageClassVisitor(String className, ClassWriter cv, boolean isRedefined) {
// We cannot change classfiles if class is being redefined.
return new CoverageClassVisitor(className, cv);
} | class class_name[name] begin[{]
method[createCoverageClassVisitor, return_type[type[CoverageClassVisitor]], modifier[private], parameter[className, cv, isRedefined]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selector... | Keyword[private] identifier[CoverageClassVisitor] identifier[createCoverageClassVisitor] operator[SEP] identifier[String] identifier[className] , identifier[ClassWriter] identifier[cv] , Keyword[boolean] identifier[isRedefined] operator[SEP] {
Keyword[return] Keyword[new] identifier[CoverageClassVisitor] opera... |
public final static Object deidentifyObject(Object object, DeIdentify deidentify) {
if (object == null || deidentify == null) {
return object;
}
return DeIdentifyUtil.deidentify(String.valueOf(object),
deidentify.left(), deidentify.right(),
deidentify.... | class class_name[name] begin[{]
method[deidentifyObject, return_type[type[Object]], modifier[final public static], parameter[object, deidentify]] begin[{]
if[binary_operation[binary_operation[member[.object], ==, literal[null]], ||, binary_operation[member[.deidentify], ==, literal[null]]]] beg... | Keyword[public] Keyword[final] Keyword[static] identifier[Object] identifier[deidentifyObject] operator[SEP] identifier[Object] identifier[object] , identifier[DeIdentify] identifier[deidentify] operator[SEP] {
Keyword[if] operator[SEP] identifier[object] operator[==] Other[null] operator[||] identifier[deident... |
private Method getPropertyFunction(Class targetClass, String prefix, Class valueType) {
// TODO: faster implementation...
Method returnVal = null;
String methodName = getMethodName(prefix, mPropertyName);
Class args[] = null;
if (valueType == null) {
try {
... | class class_name[name] begin[{]
method[getPropertyFunction, return_type[type[Method]], modifier[private], parameter[targetClass, prefix, valueType]] begin[{]
local_variable[type[Method], returnVal]
local_variable[type[String], methodName]
local_variable[type[Class], args]
... | Keyword[private] identifier[Method] identifier[getPropertyFunction] operator[SEP] identifier[Class] identifier[targetClass] , identifier[String] identifier[prefix] , identifier[Class] identifier[valueType] operator[SEP] {
identifier[Method] identifier[returnVal] operator[=] Other[null] operator[SEP] identifier... |
public void addStickyFooterItemAtPosition(@NonNull IDrawerItem drawerItem, int position) {
if (mDrawerBuilder.mStickyDrawerItems == null) {
mDrawerBuilder.mStickyDrawerItems = new ArrayList<>();
}
mDrawerBuilder.mStickyDrawerItems.add(position, drawerItem);
DrawerUtils.rebui... | class class_name[name] begin[{]
method[addStickyFooterItemAtPosition, return_type[void], modifier[public], parameter[drawerItem, position]] begin[{]
if[binary_operation[member[mDrawerBuilder.mStickyDrawerItems], ==, literal[null]]] begin[{]
assign[member[mDrawerBuilder.m... | Keyword[public] Keyword[void] identifier[addStickyFooterItemAtPosition] operator[SEP] annotation[@] identifier[NonNull] identifier[IDrawerItem] identifier[drawerItem] , Keyword[int] identifier[position] operator[SEP] {
Keyword[if] operator[SEP] identifier[mDrawerBuilder] operator[SEP] identifier[mStickyDrawerIt... |
public static Function<? super ReactiveSeq<Double>, ? extends ReactiveSeq<Double>> filterLongs(DoublePredicate b){
return a->a.doubles(i->i,s->s.filter(b));
} | class class_name[name] begin[{]
method[filterLongs, return_type[type[Function]], modifier[public static], parameter[b]] begin[{]
return[LambdaExpression(body=MethodInvocation(arguments=[LambdaExpression(body=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]),... | Keyword[public] Keyword[static] identifier[Function] operator[<] operator[?] Keyword[super] identifier[ReactiveSeq] operator[<] identifier[Double] operator[>] , operator[?] Keyword[extends] identifier[ReactiveSeq] operator[<] identifier[Double] operator[>] operator[>] identifier[filterLongs] operator[SEP] identifier[D... |
public boolean setAttributes(IAttributeStore attributes) {
int successes = 0;
for (Map.Entry<String, Object> entry : attributes.getAttributes().entrySet()) {
if (scope.setAttribute(entry.getKey(), entry.getValue())) {
successes++;
}
}
// expect eve... | class class_name[name] begin[{]
method[setAttributes, return_type[type[boolean]], modifier[public], parameter[attributes]] begin[{]
local_variable[type[int], successes]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(ar... | Keyword[public] Keyword[boolean] identifier[setAttributes] operator[SEP] identifier[IAttributeStore] identifier[attributes] operator[SEP] {
Keyword[int] identifier[successes] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Strin... |
@Override
protected void processTrigger(final Trigger trigger) {
// Get data providers matching the trigger
final List<DataProvider<RI>> mappedDataProviders = triggersToDataProviders.get(trigger);
if ((mappedDataProviders == null) || mappedDataProviders.isEmpty()) {
LOGGER.warn("... | class class_name[name] begin[{]
method[processTrigger, return_type[void], modifier[protected], parameter[trigger]] begin[{]
local_variable[type[List], mappedDataProviders]
if[binary_operation[binary_operation[member[.mappedDataProviders], ==, literal[null]], ||, call[mappedDataProviders... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[processTrigger] operator[SEP] Keyword[final] identifier[Trigger] identifier[trigger] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[DataProvider] operator[<] identifier[RI] operator[>] operator[>] identifier[ma... |
@Override
public InjectiveVar2VarSubstitution generateNotConflictingRenaming(VariableGenerator variableGenerator,
ImmutableSet<Variable> variables) {
ImmutableMap<Variable, Variable> newMap = variables.stream()
.map(v -> ... | class class_name[name] begin[{]
method[generateNotConflictingRenaming, return_type[type[InjectiveVar2VarSubstitution]], modifier[public], parameter[variableGenerator, variables]] begin[{]
local_variable[type[ImmutableMap], newMap]
return[call[.getInjectiveVar2VarSubstitution, parameter[member[.... | annotation[@] identifier[Override] Keyword[public] identifier[InjectiveVar2VarSubstitution] identifier[generateNotConflictingRenaming] operator[SEP] identifier[VariableGenerator] identifier[variableGenerator] , identifier[ImmutableSet] operator[<] identifier[Variable] operator[>] identifier[variables] operator[SEP] {... |
@SuppressWarnings("unchecked")
@Override
protected Val<Expression> expr(String field, String op, Val<Expression>[] args, QueryExprMeta parent) {
Iterable<ExprTransformer> transformers = getTransformer(ExprTransformer.class);
for (ExprTransformer<Expression, EbeanExprInvoker> transformer : transf... | class class_name[name] begin[{]
method[expr, return_type[type[Val]], modifier[protected], parameter[field, op, args, parent]] begin[{]
local_variable[type[Iterable], transformers]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Vari... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[protected] identifier[Val] operator[<] identifier[Expression] operator[>] identifier[expr] operator[SEP] identifier[String] identifier[field] , identifier[String] identifier[op] , identifi... |
public V put(K key, V val) {
//synchronized( this ) {
//WeakReference<V> ref = new WeakReference<V>(val);
SoftReference<V> ref = new SoftReference<V>(val);
cache.put(key, ref);
return get(key);
//}
} | class class_name[name] begin[{]
method[put, return_type[type[V]], modifier[public], parameter[key, val]] begin[{]
local_variable[type[SoftReference], ref]
call[cache.put, parameter[member[.key], member[.ref]]]
return[call[.get, parameter[member[.key]]]]
end[}]
END[}] | Keyword[public] identifier[V] identifier[put] operator[SEP] identifier[K] identifier[key] , identifier[V] identifier[val] operator[SEP] {
identifier[SoftReference] operator[<] identifier[V] operator[>] identifier[ref] operator[=] Keyword[new] identifier[SoftReference] operator[<] identifier[V] operator[>] opera... |
protected CmsWidgetDialogParameter getDialogParameter(String property, I_CmsWidget widget) {
return new CmsWidgetDialogParameter(m_htmlimport, property, PAGES[0], widget);
} | class class_name[name] begin[{]
method[getDialogParameter, return_type[type[CmsWidgetDialogParameter]], modifier[protected], parameter[property, widget]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=m_htmlimport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Me... | Keyword[protected] identifier[CmsWidgetDialogParameter] identifier[getDialogParameter] operator[SEP] identifier[String] identifier[property] , identifier[I_CmsWidget] identifier[widget] operator[SEP] {
Keyword[return] Keyword[new] identifier[CmsWidgetDialogParameter] operator[SEP] identifier[m_htmlimport] , id... |
@Override
public int getServerPort() {
int port = this.request.getVirtualPort();
if (-1 == port && null != this.request.getHeader("Host")) {
// if Host is present, default to scheme
if ("HTTP".equalsIgnoreCase(this.request.getScheme())) {
port = 80;
... | class class_name[name] begin[{]
method[getServerPort, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], port]
if[binary_operation[binary_operation[literal[1], ==, member[.port]], &&, binary_operation[literal[null], !=, THIS[member[None.request]cal... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[getServerPort] operator[SEP] operator[SEP] {
Keyword[int] identifier[port] operator[=] Keyword[this] operator[SEP] identifier[request] operator[SEP] identifier[getVirtualPort] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator... |
private Set<ConfigurationItem> toConfigurationItems(List<ConfigurationKey> configurationItemMap) {
ImmutableSet.Builder<ConfigurationItem> configurationItemsBuilder = ImmutableSet.builder();
for (ConfigurationKey key : configurationItemMap) {
configurationItemsBuilder.add(new ConfigurationI... | class class_name[name] begin[{]
method[toConfigurationItems, return_type[type[Set]], modifier[private], parameter[configurationItemMap]] begin[{]
local_variable[type[ImmutableSet], configurationItemsBuilder]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression... | Keyword[private] identifier[Set] operator[<] identifier[ConfigurationItem] operator[>] identifier[toConfigurationItems] operator[SEP] identifier[List] operator[<] identifier[ConfigurationKey] operator[>] identifier[configurationItemMap] operator[SEP] {
identifier[ImmutableSet] operator[SEP] identifier[Builder] o... |
public static Object name(Context cx, Scriptable scope, String name)
{
Scriptable parent = scope.getParentScope();
if (parent == null) {
Object result = topScopeName(cx, scope, name);
if (result == Scriptable.NOT_FOUND) {
throw notFoundError(scope, name);
... | class class_name[name] begin[{]
method[name, return_type[type[Object]], modifier[public static], parameter[cx, scope, name]] begin[{]
local_variable[type[Scriptable], parent]
if[binary_operation[member[.parent], ==, literal[null]]] begin[{]
local_variable[type[Object], resul... | Keyword[public] Keyword[static] identifier[Object] identifier[name] operator[SEP] identifier[Context] identifier[cx] , identifier[Scriptable] identifier[scope] , identifier[String] identifier[name] operator[SEP] {
identifier[Scriptable] identifier[parent] operator[=] identifier[scope] operator[SEP] identifier[... |
private void init()
{
TreeNode delegateRoot = null;
if (delegate != null)
{
delegateRoot = (TreeNode) delegate.getRoot();
}
thisToDelegate.clear();
delegateToThis.clear();
if (delegateRoot == null)
{
root = null;
... | class class_name[name] begin[{]
method[init, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[TreeNode], delegateRoot]
if[binary_operation[member[.delegate], !=, literal[null]]] begin[{]
assign[member[.delegateRoot], Cast(expression... | Keyword[private] Keyword[void] identifier[init] operator[SEP] operator[SEP] {
identifier[TreeNode] identifier[delegateRoot] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[delegate] operator[!=] Other[null] operator[SEP] {
identifier[delegateRoot] operator[=] operator[SEP] i... |
public <A extends Annotation> Binding<T> in(final Class<A> scope) {
return underlying.in(scope).asJava();
} | class class_name[name] begin[{]
method[in, return_type[type[Binding]], modifier[public], parameter[scope]] begin[{]
return[call[underlying.in, parameter[member[.scope]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[A] Keyword[extends] identifier[Annotation] operator[>] identifier[Binding] operator[<] identifier[T] operator[>] identifier[in] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[A] operator[>] identifier[scope] operator[SEP] {
Keyword[return] identifier[... |
public void marshall(Job job, ProtocolMarshaller protocolMarshaller) {
if (job == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(job.getJobArn(), JOBARN_BINDING);
protocolMarshaller.marsh... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[job, protocolMarshaller]] begin[{]
if[binary_operation[member[.job], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_op... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Job] identifier[job] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[job] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Sd... |
public Certificate get(String thumbprintAlgorithm, String thumbprint) {
return getWithServiceResponseAsync(thumbprintAlgorithm, thumbprint).toBlocking().single().body();
} | class class_name[name] begin[{]
method[get, return_type[type[Certificate]], modifier[public], parameter[thumbprintAlgorithm, thumbprint]] begin[{]
return[call[.getWithServiceResponseAsync, parameter[member[.thumbprintAlgorithm], member[.thumbprint]]]]
end[}]
END[}] | Keyword[public] identifier[Certificate] identifier[get] operator[SEP] identifier[String] identifier[thumbprintAlgorithm] , identifier[String] identifier[thumbprint] operator[SEP] {
Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[thumbprintAlgorithm] , identifier[thumbprint] ope... |
@Override
@Nullable
public String getCustomData(@NonNull String key) {
return customData.get(key);
} | class class_name[name] begin[{]
method[getCustomData, return_type[type[String]], modifier[public], parameter[key]] begin[{]
return[call[customData.get, parameter[member[.key]]]]
end[}]
END[}] | annotation[@] identifier[Override] annotation[@] identifier[Nullable] Keyword[public] identifier[String] identifier[getCustomData] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[key] operator[SEP] {
Keyword[return] identifier[customData] operator[SEP] identifier[get] operator[SEP] ... |
public static boolean isValidDate(final String date, final String format, final boolean lenient)
{
boolean isValid = true;
if (date == null || format == null || format.length() <= 0)
{
return false;
}
try
{
final DateFormat df = new SimpleDateFormat(format);
df.setLenient(lenient);
df.parse(dat... | class class_name[name] begin[{]
method[isValidDate, return_type[type[boolean]], modifier[public static], parameter[date, format, lenient]] begin[{]
local_variable[type[boolean], isValid]
if[binary_operation[binary_operation[binary_operation[member[.date], ==, literal[null]], ||, binary_... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isValidDate] operator[SEP] Keyword[final] identifier[String] identifier[date] , Keyword[final] identifier[String] identifier[format] , Keyword[final] Keyword[boolean] identifier[lenient] operator[SEP] {
Keyword[boolean] identifier[isValid] operator[=]... |
public Future<Response> generateRequest(String requestType, boolean secure, String user, String password, String endPoint, String data, String type) throws Exception {
String protocol = this.getRestProtocol();
Future<Response> response = null;
BoundRequestBuilder request;
Realm realm = ... | class class_name[name] begin[{]
method[generateRequest, return_type[type[Future]], modifier[public], parameter[requestType, secure, user, password, endPoint, data, type]] begin[{]
local_variable[type[String], protocol]
local_variable[type[Future], response]
local_variable[type[BoundRequ... | Keyword[public] identifier[Future] operator[<] identifier[Response] operator[>] identifier[generateRequest] operator[SEP] identifier[String] identifier[requestType] , Keyword[boolean] identifier[secure] , identifier[String] identifier[user] , identifier[String] identifier[password] , identifier[String] identifier[e... |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public int getTotalPaddingStart (){
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)
return getPaddingStart() + mInputView.getTotalPaddingStart();
return getTotalPaddingLeft();
} | class class_name[name] begin[{]
method[getTotalPaddingStart, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[Build.VERSION.SDK_INT], >=, member[Build.VERSION_CODES.JELLY_BEAN_MR1]]] begin[{]
return[binary_operation[call[.getPaddingStart, parameter[]], ... | annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[JELLY_BEAN_MR1] operator[SEP] Keyword[public] Keyword[int] identifier[getTotalPaddingStart] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[Build] operator[SEP] ... |
public String getClusterOrHostName() {
if (StringUtils.isNotBlank(esConfig.getHostName()))
return esConfig.getHostName();
else
return esConfig.getCluster();
} | class class_name[name] begin[{]
method[getClusterOrHostName, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[call[StringUtils.isNotBlank, parameter[call[esConfig.getHostName, parameter[]]]]] begin[{]
return[call[esConfig.getHostName, parameter[]]]
else begin[{]
ret... | Keyword[public] identifier[String] identifier[getClusterOrHostName] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[esConfig] operator[SEP] identifier[getHostName] operator[SEP] operator[SEP] operator[SEP] operator[SEP]... |
public static short getGB2312Id(char ch) {
try {
byte[] buffer = Character.toString(ch).getBytes("GB2312");
if (buffer.length != 2) {
// 正常情况下buffer应该是两个字节,否则说明ch不属于GB2312编码,故返回'?',此时说明不认识该字符
return -1;
}
int b0 = (int) (buffer[0] &... | class class_name[name] begin[{]
method[getGB2312Id, return_type[type[short]], modifier[public static], parameter[ch]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ch, p... | Keyword[public] Keyword[static] Keyword[short] identifier[getGB2312Id] operator[SEP] Keyword[char] identifier[ch] operator[SEP] {
Keyword[try] {
Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] operator[=] identifier[Character] operator[SEP] identifier[toString] operator[SEP] identifier[ch... |
public ApiResponse<ApiSuccessResponse> loginWithHttpInfo(ModifyLoginData body) throws ApiException {
com.squareup.okhttp.Call call = loginValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType();
return apiClient.execute(call, localVarReturn... | class class_name[name] begin[{]
method[loginWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[body]] begin[{]
local_variable[type[com], call]
local_variable[type[Type], localVarReturnType]
return[call[apiClient.execute, parameter[member[.call], member[.localVarRe... | Keyword[public] identifier[ApiResponse] operator[<] identifier[ApiSuccessResponse] operator[>] identifier[loginWithHttpInfo] operator[SEP] identifier[ModifyLoginData] identifier[body] operator[SEP] Keyword[throws] identifier[ApiException] {
identifier[com] operator[SEP] identifier[squareup] operator[SEP] identif... |
private EJBInterceptorBinding
validateAndMergeStyle2Bindings(EJBInterceptorBinding binding1, EJBInterceptorBinding binding2)
throws EJBConfigurationException
{
// Add binding 2 interceptor-class list, unless it is empty.
ArrayList<String> inter... | class class_name[name] begin[{]
method[validateAndMergeStyle2Bindings, return_type[type[EJBInterceptorBinding]], modifier[private], parameter[binding1, binding2]] begin[{]
local_variable[type[ArrayList], interceptorNames]
if[call[binding2.ivInterceptorClassNames.isEmpty, parameter[]]] b... | Keyword[private] identifier[EJBInterceptorBinding] identifier[validateAndMergeStyle2Bindings] operator[SEP] identifier[EJBInterceptorBinding] identifier[binding1] , identifier[EJBInterceptorBinding] identifier[binding2] operator[SEP] Keyword[throws] identifier[EJBConfigurationException] {
identifier[ArrayList] ... |
public static dnssoarec get(nitro_service service, String domain) throws Exception{
dnssoarec obj = new dnssoarec();
obj.set_domain(domain);
dnssoarec response = (dnssoarec) obj.get_resource(service);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[dnssoarec]], modifier[public static], parameter[service, domain]] begin[{]
local_variable[type[dnssoarec], obj]
call[obj.set_domain, parameter[member[.domain]]]
local_variable[type[dnssoarec], response]
return[... | Keyword[public] Keyword[static] identifier[dnssoarec] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[domain] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[dnssoarec] identifier[obj] operator[=] Keyword[new] identifier[dnssoarec] ope... |
public static String firstRegistryOf(String ... checkFirst) {
for (String registry : checkFirst) {
if (registry != null) {
return registry;
}
}
// Check environment as last resort
return System.getenv("DOCKER_REGISTRY");
} | class class_name[name] begin[{]
method[firstRegistryOf, return_type[type[String]], modifier[public static], parameter[checkFirst]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=registry, postfix_operators=[], pref... | Keyword[public] Keyword[static] identifier[String] identifier[firstRegistryOf] operator[SEP] identifier[String] operator[...] identifier[checkFirst] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[registry] operator[:] identifier[checkFirst] operator[SEP] {
Keyword[if] operat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.