code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
@SuppressWarnings("unchecked")
public T setSheet(String sheetName) {
this.sheet = this.workbook.getSheet(sheetName);
if (null == this.sheet) {
this.sheet = this.workbook.createSheet(sheetName);
}
return (T) this;
} | class class_name[name] begin[{]
method[setSheet, return_type[type[T]], modifier[public], parameter[sheetName]] begin[{]
assign[THIS[member[None.sheet]], THIS[member[None.workbook]call[None.getSheet, parameter[member[.sheetName]]]]]
if[binary_operation[literal[null], ==, THIS[mem... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[T] identifier[setSheet] operator[SEP] identifier[String] identifier[sheetName] operator[SEP] {
Keyword[this] operator[SEP] identifier[sheet] operator[=] Keyword[this] operator[SEP] identifier[workboo... |
@Override
protected void doHandle(CommandContext ctx) throws CommandLineException {
if (ForControlFlow.get(ctx) != null) {
throw new CommandFormatException("for is not allowed while in for block");
}
final BatchManager batchManager = ctx.getBatchManager();
if (batchManage... | class class_name[name] begin[{]
method[doHandle, return_type[void], modifier[protected], parameter[ctx]] begin[{]
if[binary_operation[call[ForControlFlow.get, parameter[member[.ctx]]], !=, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_ope... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[doHandle] operator[SEP] identifier[CommandContext] identifier[ctx] operator[SEP] Keyword[throws] identifier[CommandLineException] {
Keyword[if] operator[SEP] identifier[ForControlFlow] operator[SEP] identifier[get] operator[SEP] ident... |
public void writeContent(final OutputStream result) throws IOException
{
result.write(OPEN_GROUP);
result.write(GENERATOR);
result.write(DELIMITER);
result.write(DocWriter.getISOBytes(Document.getVersion()));
result.write(CLOSE_GROUP);
this.document.outputDebugLinebreak(result);
} | class class_name[name] begin[{]
method[writeContent, return_type[void], modifier[public], parameter[result]] begin[{]
call[result.write, parameter[member[.OPEN_GROUP]]]
call[result.write, parameter[member[.GENERATOR]]]
call[result.write, parameter[member[.DELIMIT... | Keyword[public] Keyword[void] identifier[writeContent] operator[SEP] Keyword[final] identifier[OutputStream] identifier[result] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[OPEN_GROUP] operator[SEP] operator[SEP] identifier[re... |
@SuppressWarnings("unchecked")
public static <T> Class<T> getClass(T obj) {
return ((null == obj) ? null : (Class<T>) obj.getClass());
} | class class_name[name] begin[{]
method[getClass, return_type[type[Class]], modifier[public static], parameter[obj]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Class] operator[<] identifier[T] operator[>] identifier[getClass] operator[SEP] identifier[T] identifier[obj] operator[SEP] {
Keyword[return] ope... |
@Override
public ValueRange range(ChronoField field) {
switch (field) {
case DAY_OF_MONTH:
case DAY_OF_WEEK:
case MICRO_OF_DAY:
case MICRO_OF_SECOND:
case HOUR_OF_DAY:
case HOUR_OF_AMPM:
case MINUTE_OF_DAY:
case ... | class class_name[name] begin[{]
method[range, return_type[type[ValueRange]], modifier[public], parameter[field]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['DAY_OF_MONTH', 'DAY_OF_WEEK', 'MICRO_OF_DAY', 'MICRO_OF_SECOND', 'HOUR_OF_DAY', 'HOUR_OF_AMPM', 'MINUTE_OF_DAY', 'MINUTE_OF_HOUR', ... | annotation[@] identifier[Override] Keyword[public] identifier[ValueRange] identifier[range] operator[SEP] identifier[ChronoField] identifier[field] operator[SEP] {
Keyword[switch] operator[SEP] identifier[field] operator[SEP] {
Keyword[case] identifier[DAY_OF_MONTH] operator[:] Keyword[case] identifi... |
public final void waitForPort(final String host, final int port, final int timeout, final TimeUnit unit)
throws IllegalArgumentException {
Preconditions.checkArgument(host != null, "host must be non-null");
Preconditions.checkArgument(port > 0, "port must be positive integer");
Preco... | class class_name[name] begin[{]
method[waitForPort, return_type[void], modifier[final public], parameter[host, port, timeout, unit]] begin[{]
call[Preconditions.checkArgument, parameter[binary_operation[member[.host], !=, literal[null]], literal["host must be non-null"]]]
call[P... | Keyword[public] Keyword[final] Keyword[void] identifier[waitForPort] operator[SEP] Keyword[final] identifier[String] identifier[host] , Keyword[final] Keyword[int] identifier[port] , Keyword[final] Keyword[int] identifier[timeout] , Keyword[final] identifier[TimeUnit] identifier[unit] operator[SEP] Keyword[throws] i... |
private Arguments createProgramArguments(TwillContext context, Map<String, String> configs) {
Map<String, String> args = ImmutableMap.<String, String>builder()
.put(ProgramOptionConstants.INSTANCE_ID, Integer.toString(context.getInstanceId()))
.put(ProgramOptionConstants.INSTANCES, Integer.toString(cont... | class class_name[name] begin[{]
method[createProgramArguments, return_type[type[Arguments]], modifier[private], parameter[context, configs]] begin[{]
local_variable[type[Map], args]
return[ClassCreator(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=... | Keyword[private] identifier[Arguments] identifier[createProgramArguments] operator[SEP] identifier[TwillContext] identifier[context] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[configs] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier... |
public static void waitFinished(Collection<? extends Task<?,?>> tasks) throws Exception {
for (Task<?,?> t : tasks) {
t.getOutput().blockThrow(0);
}
} | class class_name[name] begin[{]
method[waitFinished, return_type[void], modifier[public static], parameter[tasks]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getOutput, postfix_operators=[], prefix_operators=[],... | Keyword[public] Keyword[static] Keyword[void] identifier[waitFinished] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[Task] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[tasks] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[for]... |
protected Document newChildReference( String childId,
String childName ) {
return DocumentFactory.newDocument(DocumentTranslator.KEY, childId, DocumentTranslator.NAME, childName);
} | class class_name[name] begin[{]
method[newChildReference, return_type[type[Document]], modifier[protected], parameter[childId, childName]] begin[{]
return[call[DocumentFactory.newDocument, parameter[member[DocumentTranslator.KEY], member[.childId], member[DocumentTranslator.NAME], member[.childName]]]]... | Keyword[protected] identifier[Document] identifier[newChildReference] operator[SEP] identifier[String] identifier[childId] , identifier[String] identifier[childName] operator[SEP] {
Keyword[return] identifier[DocumentFactory] operator[SEP] identifier[newDocument] operator[SEP] identifier[DocumentTranslator] ope... |
public void create(String resourceGroupName, String clusterName, String extensionName, ExtensionInner parameters) {
createWithServiceResponseAsync(resourceGroupName, clusterName, extensionName, parameters).toBlocking().last().body();
} | class class_name[name] begin[{]
method[create, return_type[void], modifier[public], parameter[resourceGroupName, clusterName, extensionName, parameters]] begin[{]
call[.createWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.clusterName], member[.extensionName], member[.pa... | Keyword[public] Keyword[void] identifier[create] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[clusterName] , identifier[String] identifier[extensionName] , identifier[ExtensionInner] identifier[parameters] operator[SEP] {
identifier[createWithServiceResponseAs... |
@Override
public GetInsightsResult getInsights(GetInsightsRequest request) {
request = beforeClientExecution(request);
return executeGetInsights(request);
} | class class_name[name] begin[{]
method[getInsights, return_type[type[GetInsightsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeGetInsights, parameter[member[.request]]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[GetInsightsResult] identifier[getInsights] operator[SEP] identifier[GetInsightsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP]... |
protected Map<String,ContentPart<?>> getContentPartsAsMap(HTTPRequest httpRequest)
{
Map<String,ContentPart<?>> contentPartsMap=null;
ContentType contentType=httpRequest.getContentType();
switch(contentType)
{
case MULTI_PART:
//init map
co... | class class_name[name] begin[{]
method[getContentPartsAsMap, return_type[type[Map]], modifier[protected], parameter[httpRequest]] begin[{]
local_variable[type[Map], contentPartsMap]
local_variable[type[ContentType], contentType]
SwitchStatement(cases=[SwitchStatementCase(case=['MULTI_PA... | Keyword[protected] identifier[Map] operator[<] identifier[String] , identifier[ContentPart] operator[<] operator[?] operator[>] operator[>] identifier[getContentPartsAsMap] operator[SEP] identifier[HTTPRequest] identifier[httpRequest] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[... |
@Override
public void appendString(final String appendage) {
owner.setString(owner.getString().concat(appendage));
} | class class_name[name] begin[{]
method[appendString, return_type[void], modifier[public], parameter[appendage]] begin[{]
call[owner.setString, parameter[call[owner.getString, parameter[]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[appendString] operator[SEP] Keyword[final] identifier[String] identifier[appendage] operator[SEP] {
identifier[owner] operator[SEP] identifier[setString] operator[SEP] identifier[owner] operator[SEP] identifier[getString] operator[SEP] o... |
final AbstractJcrProperty getProperty( Name propertyName ) throws RepositoryException {
AbstractJcrProperty prop = jcrProperties.get(propertyName);
if (prop == null) {
// See if there's a property on the node ...
CachedNode node = node();
SessionCache cache = sessionC... | class class_name[name] begin[{]
method[getProperty, return_type[type[AbstractJcrProperty]], modifier[final], parameter[propertyName]] begin[{]
local_variable[type[AbstractJcrProperty], prop]
if[binary_operation[member[.prop], ==, literal[null]]] begin[{]
local_variable[type[... | Keyword[final] identifier[AbstractJcrProperty] identifier[getProperty] operator[SEP] identifier[Name] identifier[propertyName] operator[SEP] Keyword[throws] identifier[RepositoryException] {
identifier[AbstractJcrProperty] identifier[prop] operator[=] identifier[jcrProperties] operator[SEP] identifier[get] opera... |
public void zoomNext() {
if (hasNext()) {
MapViewChangedEvent data = next.remove();
previous.addFirst(data);
active = false;
mapView.applyBounds(data.getBounds(), MapView.ZoomOption.LEVEL_CLOSEST);
updateActionsAbility();
}
} | class class_name[name] begin[{]
method[zoomNext, return_type[void], modifier[public], parameter[]] begin[{]
if[call[.hasNext, parameter[]]] begin[{]
local_variable[type[MapViewChangedEvent], data]
call[previous.addFirst, parameter[member[.data]]]
... | Keyword[public] Keyword[void] identifier[zoomNext] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] {
identifier[MapViewChangedEvent] identifier[data] operator[=] identifier[next] operator[SEP] identifier[remove] operator[SEP] operat... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
final Collec... | class class_name[name] begin[{]
method[deploy, return_type[void], modifier[public], parameter[phaseContext]] begin[{]
local_variable[type[DeploymentUnit], deploymentUnit]
local_variable[type[EEModuleDescription], eeModuleDescription]
local_variable[type[Collection], componentConfigurati... | Keyword[public] Keyword[void] identifier[deploy] operator[SEP] identifier[DeploymentPhaseContext] identifier[phaseContext] operator[SEP] Keyword[throws] identifier[DeploymentUnitProcessingException] {
Keyword[final] identifier[DeploymentUnit] identifier[deploymentUnit] operator[=] identifier[phaseContext] operat... |
public static long readLongLittleEndian(byte[] buffer, int offset) {
long value;
value = (buffer[offset] & 0xFF);
value |= (buffer[offset + 1] & 0xFF) << 8;
value |= (buffer[offset + 2] & 0xFF) << 16;
value |= ((long)(buffer[offset + 3] & 0xFF)) << 24;
value |= ((long)(buffer[offset + 4] & 0xFF)) << 3... | class class_name[name] begin[{]
method[readLongLittleEndian, return_type[type[long]], modifier[public static], parameter[buffer, offset]] begin[{]
local_variable[type[long], value]
assign[member[.value], binary_operation[member[.buffer], &, literal[0xFF]]]
assign[member[... | Keyword[public] Keyword[static] Keyword[long] identifier[readLongLittleEndian] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] , Keyword[int] identifier[offset] operator[SEP] {
Keyword[long] identifier[value] operator[SEP] identifier[value] operator[=] operator[SEP] identifier[buffer]... |
private void setupBarStyle(final JFreeChart chart,
final ChartData chartData) {
setupStyle(chart, chartData);
CategoryPlot plot = (CategoryPlot) chart.getPlot();
BarRenderer renderer = (BarRenderer) plot.getRenderer();
renderer.setBarPainter(new StandardBarPainter());
renderer.setItemMargin(TieConsta... | class class_name[name] begin[{]
method[setupBarStyle, return_type[void], modifier[private], parameter[chart, chartData]] begin[{]
call[.setupStyle, parameter[member[.chart], member[.chartData]]]
local_variable[type[CategoryPlot], plot]
local_variable[type[BarRenderer], renderer]... | Keyword[private] Keyword[void] identifier[setupBarStyle] operator[SEP] Keyword[final] identifier[JFreeChart] identifier[chart] , Keyword[final] identifier[ChartData] identifier[chartData] operator[SEP] {
identifier[setupStyle] operator[SEP] identifier[chart] , identifier[chartData] operator[SEP] operator[SEP] ... |
public void setDuration(int index, Duration value)
{
set(selectField(ResourceFieldLists.CUSTOM_DURATION, index), value);
} | class class_name[name] begin[{]
method[setDuration, return_type[void], modifier[public], parameter[index, value]] begin[{]
call[.set, parameter[call[.selectField, parameter[member[ResourceFieldLists.CUSTOM_DURATION], member[.index]]], member[.value]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setDuration] operator[SEP] Keyword[int] identifier[index] , identifier[Duration] identifier[value] operator[SEP] {
identifier[set] operator[SEP] identifier[selectField] operator[SEP] identifier[ResourceFieldLists] operator[SEP] identifier[CUSTOM_DURATION] , identifier[i... |
public Observable<ServiceResponse<List<AzureSkuInner>>> listSkusWithServiceResponseAsync() {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == nul... | class class_name[name] begin[{]
method[listSkusWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{]
ThrowStatement(expression... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[AzureSkuInner] operator[>] operator[>] operator[>] identifier[listSkusWithServiceResponseAsync] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] id... |
@CheckReturnValue
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public final <R> Flowable<R> concatMapEagerDelayError(Function<? super T, ? extends Publisher<? extends R>> mapper,
int maxConcurrency, int prefetch, boolean tillTheEnd) {
ObjectHelper.... | class class_name[name] begin[{]
method[concatMapEagerDelayError, return_type[type[Flowable]], modifier[final public], parameter[mapper, maxConcurrency, prefetch, tillTheEnd]] begin[{]
call[ObjectHelper.requireNonNull, parameter[member[.mapper], literal["mapper is null"]]]
call[O... | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[FULL] operator[SEP] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[publ... |
public static AuthRequest createAuthRequest (
Credentials creds, String version, String[] bootGroups, boolean requireSecureAuth,
PublicKeyCredentials pkcreds, SecureResponse resp)
{
byte[] secret = resp == null ? null : resp.getCodeBytes(pkcreds);
if (pkcreds == null || secre... | class class_name[name] begin[{]
method[createAuthRequest, return_type[type[AuthRequest]], modifier[public static], parameter[creds, version, bootGroups, requireSecureAuth, pkcreds, resp]] begin[{]
local_variable[type[byte], secret]
if[binary_operation[binary_operation[member[.pkcreds], ... | Keyword[public] Keyword[static] identifier[AuthRequest] identifier[createAuthRequest] operator[SEP] identifier[Credentials] identifier[creds] , identifier[String] identifier[version] , identifier[String] operator[SEP] operator[SEP] identifier[bootGroups] , Keyword[boolean] identifier[requireSecureAuth] , identifier... |
public static String interpolate(File dockerFile, FixedStringSearchInterpolator interpolator) throws IOException {
StringBuilder ret = new StringBuilder();
try (BufferedReader reader = new BufferedReader(new FileReader(dockerFile))) {
String line;
while ((line = reader.readLine()... | class class_name[name] begin[{]
method[interpolate, return_type[type[String]], modifier[public static], parameter[dockerFile, interpolator]] begin[{]
local_variable[type[StringBuilder], ret]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=... | Keyword[public] Keyword[static] identifier[String] identifier[interpolate] operator[SEP] identifier[File] identifier[dockerFile] , identifier[FixedStringSearchInterpolator] identifier[interpolator] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[StringBuilder] identifier[ret] operator[=] Keyw... |
@InterfaceAudience.Private
private static String nameOfDatabaseAtPath(String path) {
String name = FileDirUtils.getDatabaseNameFromPath(path);
return isWindows() ? name.replace('/', '.') : name.replace('/', ':');
} | class class_name[name] begin[{]
method[nameOfDatabaseAtPath, return_type[type[String]], modifier[private static], parameter[path]] begin[{]
local_variable[type[String], name]
return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isWindows, postfix_operators=[], prefix_operato... | annotation[@] identifier[InterfaceAudience] operator[SEP] identifier[Private] Keyword[private] Keyword[static] identifier[String] identifier[nameOfDatabaseAtPath] operator[SEP] identifier[String] identifier[path] operator[SEP] {
identifier[String] identifier[name] operator[=] identifier[FileDirUtils] operator[SE... |
public static base_responses add(nitro_service client, location resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
location addresources[] = new location[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new location();
... | class class_name[name] begin[{]
method[add, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{]
local_variable[type[base_responses], result]
if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operation[m... | Keyword[public] Keyword[static] identifier[base_responses] identifier[add] operator[SEP] identifier[nitro_service] identifier[client] , identifier[location] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[base_responses] identifier[result] opera... |
public SortedSet<String> getReferencedClassnames()
{
SortedSet<String> set = new TreeSet<String>();
List<ConstantInfo> list = constantPoolMap.get(ConstantInfo.Clazz.class);
if (list != null)
{
for (ConstantInfo ci : list)
{
ConstantInfo.Clazz c... | class class_name[name] begin[{]
method[getReferencedClassnames, return_type[type[SortedSet]], modifier[public], parameter[]] begin[{]
local_variable[type[SortedSet], set]
local_variable[type[List], list]
if[binary_operation[member[.list], !=, literal[null]]] begin[{]
... | Keyword[public] identifier[SortedSet] operator[<] identifier[String] operator[>] identifier[getReferencedClassnames] operator[SEP] operator[SEP] {
identifier[SortedSet] operator[<] identifier[String] operator[>] identifier[set] operator[=] Keyword[new] identifier[TreeSet] operator[<] identifier[String] operator[... |
public static void handleCacheableResponse(HttpServletRequest request,
HttpServletResponse response, byte[] data, String contentType)
throws IOException {
String ifNoneMatch = request.getHeader("If-None-Match");
String etag = "\"0" + DigestUtils.md5DigestAsHex(data) + "\"";
addCacheHeaders(response, etag, ... | class class_name[name] begin[{]
method[handleCacheableResponse, return_type[void], modifier[public static], parameter[request, response, data, contentType]] begin[{]
local_variable[type[String], ifNoneMatch]
local_variable[type[String], etag]
call[.addCacheHeaders, parameter[mem... | Keyword[public] Keyword[static] Keyword[void] identifier[handleCacheableResponse] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] , identifier[String] identifier[contentType] operator[... |
@Override
public List<Statement> expand(Statement s) {
Term sub = s.getSubject();
Term obj = s.getObject().getTerm();
final RelationshipType rel = s.getRelationshipType();
final Statement stmt = new Statement(obj);
stmt.setObject(new Object(sub));
stmt.setRelationshi... | class class_name[name] begin[{]
method[expand, return_type[type[List]], modifier[public], parameter[s]] begin[{]
local_variable[type[Term], sub]
local_variable[type[Term], obj]
local_variable[type[RelationshipType], rel]
local_variable[type[Statement], stmt]
call... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[Statement] operator[>] identifier[expand] operator[SEP] identifier[Statement] identifier[s] operator[SEP] {
identifier[Term] identifier[sub] operator[=] identifier[s] operator[SEP] identifier[getSubject] operator[SEP] oper... |
@Override
public void doSerialize( JsonWriter writer, Boolean value, JsonSerializationContext ctx, JsonSerializerParameters params ) {
writer.value( value );
} | class class_name[name] begin[{]
method[doSerialize, return_type[void], modifier[public], parameter[writer, value, ctx, params]] begin[{]
call[writer.value, parameter[member[.value]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[doSerialize] operator[SEP] identifier[JsonWriter] identifier[writer] , identifier[Boolean] identifier[value] , identifier[JsonSerializationContext] identifier[ctx] , identifier[JsonSerializerParameters] identifier[params] operator[SEP] {
... |
public void setCrawlerNameList(java.util.Collection<String> crawlerNameList) {
if (crawlerNameList == null) {
this.crawlerNameList = null;
return;
}
this.crawlerNameList = new java.util.ArrayList<String>(crawlerNameList);
} | class class_name[name] begin[{]
method[setCrawlerNameList, return_type[void], modifier[public], parameter[crawlerNameList]] begin[{]
if[binary_operation[member[.crawlerNameList], ==, literal[null]]] begin[{]
assign[THIS[member[None.crawlerNameList]], literal[null]]
... | Keyword[public] Keyword[void] identifier[setCrawlerNameList] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[crawlerNameList] operator[SEP] {
Keyword[if] operator[SEP] identifier[crawlerNameList] operator[==]... |
public static boolean check(Tile tile1, Tile tile2, Tile tile3) {
//Typeが違う場合false
if (tile1.getType() != tile2.getType() || tile2.getType() != tile3.getType()) {
return false;
}
//字牌だった場合false
if (tile1.getNumber() == 0 || tile2.getNumber() == 0 || tile3.getNumber(... | class class_name[name] begin[{]
method[check, return_type[type[boolean]], modifier[public static], parameter[tile1, tile2, tile3]] begin[{]
if[binary_operation[binary_operation[call[tile1.getType, parameter[]], !=, call[tile2.getType, parameter[]]], ||, binary_operation[call[tile2.getType, para... | Keyword[public] Keyword[static] Keyword[boolean] identifier[check] operator[SEP] identifier[Tile] identifier[tile1] , identifier[Tile] identifier[tile2] , identifier[Tile] identifier[tile3] operator[SEP] {
Keyword[if] operator[SEP] identifier[tile1] operator[SEP] identifier[getType] operator[SEP] operator[SEP]... |
@Override
public FastMoney divide(Number divisor) {
if (isInfinityAndNotNaN(divisor)) {
return new FastMoney(0L, getCurrency());
}
checkNumber(divisor);
if (isOne(divisor)) {
return this;
}
return new FastMoney(Math.round(this.number / divisor.... | class class_name[name] begin[{]
method[divide, return_type[type[FastMoney]], modifier[public], parameter[divisor]] begin[{]
if[call[.isInfinityAndNotNaN, parameter[member[.divisor]]]] begin[{]
return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifie... | annotation[@] identifier[Override] Keyword[public] identifier[FastMoney] identifier[divide] operator[SEP] identifier[Number] identifier[divisor] operator[SEP] {
Keyword[if] operator[SEP] identifier[isInfinityAndNotNaN] operator[SEP] identifier[divisor] operator[SEP] operator[SEP] {
Keyword[return] Key... |
private void incrementLastAppliedIndex(long expectedNewIndex) {
checkArgument(expectedNewIndex > 0, "expectedNewIndex must be positive: given:%s", expectedNewIndex);
checkArgument(expectedNewIndex == lastAppliedIndex + 1, "lastAppliedIndex not increasing monotonically: lastAppliedIndex:%s expectedNewInd... | class class_name[name] begin[{]
method[incrementLastAppliedIndex, return_type[void], modifier[private], parameter[expectedNewIndex]] begin[{]
call[.checkArgument, parameter[binary_operation[member[.expectedNewIndex], >, literal[0]], literal["expectedNewIndex must be positive: given:%s"], member... | Keyword[private] Keyword[void] identifier[incrementLastAppliedIndex] operator[SEP] Keyword[long] identifier[expectedNewIndex] operator[SEP] {
identifier[checkArgument] operator[SEP] identifier[expectedNewIndex] operator[>] Other[0] , literal[String] , identifier[expectedNewIndex] operator[SEP] operator[SEP] id... |
public void marshall(GetServiceRoleForAccountRequest getServiceRoleForAccountRequest, ProtocolMarshaller protocolMarshaller) {
if (getServiceRoleForAccountRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
} catch (Exception... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getServiceRoleForAccountRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getServiceRoleForAccountRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCr... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetServiceRoleForAccountRequest] identifier[getServiceRoleForAccountRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getServiceRoleForAccountRequest] operator[... |
@BetaApi
public final Operation insertLicense(String project, License licenseResource) {
InsertLicenseHttpRequest request =
InsertLicenseHttpRequest.newBuilder()
.setProject(project)
.setLicenseResource(licenseResource)
.build();
return insertLicense(request);
} | class class_name[name] begin[{]
method[insertLicense, return_type[type[Operation]], modifier[final public], parameter[project, licenseResource]] begin[{]
local_variable[type[InsertLicenseHttpRequest], request]
return[call[.insertLicense, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[insertLicense] operator[SEP] identifier[String] identifier[project] , identifier[License] identifier[licenseResource] operator[SEP] {
identifier[InsertLicenseHttpRequest] identifier[request] operator[=] identifier[... |
@SafeVarargs
public static <T> MutableList<T> mutableVec(T... items) {
MutableList<T> ret = PersistentVector.emptyMutable();
if (items == null) { return ret; }
for (T t : items) {
ret.append(t);
}
return ret;
} | class class_name[name] begin[{]
method[mutableVec, return_type[type[MutableList]], modifier[public static], parameter[items]] begin[{]
local_variable[type[MutableList], ret]
if[binary_operation[member[.items], ==, literal[null]]] begin[{]
return[member[.ret]]
else be... | annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[MutableList] operator[<] identifier[T] operator[>] identifier[mutableVec] operator[SEP] identifier[T] operator[...] identifier[items] operator[SEP] {
identifier[MutableList] operator[<] identifi... |
public static int scanForGap(
final UnsafeBuffer termBuffer,
final int termId,
final int termOffset,
final int limitOffset,
final GapHandler handler)
{
int offset = termOffset;
do
{
final int frameLength = frameLengthVolatile(termBuffer, of... | class class_name[name] begin[{]
method[scanForGap, return_type[type[int]], modifier[public static], parameter[termBuffer, termId, termOffset, limitOffset, handler]] begin[{]
local_variable[type[int], offset]
do[binary_operation[member[.offset], <, member[.limitOffset]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[int] identifier[scanForGap] operator[SEP] Keyword[final] identifier[UnsafeBuffer] identifier[termBuffer] , Keyword[final] Keyword[int] identifier[termId] , Keyword[final] Keyword[int] identifier[termOffset] , Keyword[final] Keyword[int] identifier[limitOffset] , Keyword[final... |
public void add(JsonElement element) {
if (element == null) {
element = JsonNull.INSTANCE;
}
elements.add(element);
} | class class_name[name] begin[{]
method[add, return_type[void], modifier[public], parameter[element]] begin[{]
if[binary_operation[member[.element], ==, literal[null]]] begin[{]
assign[member[.element], member[JsonNull.INSTANCE]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[JsonElement] identifier[element] operator[SEP] {
Keyword[if] operator[SEP] identifier[element] operator[==] Other[null] operator[SEP] {
identifier[element] operator[=] identifier[JsonNull] operator[SEP] identifier[INSTANCE] operato... |
private <T extends Block> List<T> getBlocks(List<Block> blocks, Axes axes, List<T> blocksOut)
{
List<T> newBlocks = blocksOut;
for (Block block : blocks) {
newBlocks = getBlocks(block, axes, newBlocks);
}
return newBlocks;
} | class class_name[name] begin[{]
method[getBlocks, return_type[type[List]], modifier[private], parameter[blocks, axes, blocksOut]] begin[{]
local_variable[type[List], newBlocks]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberR... | Keyword[private] operator[<] identifier[T] Keyword[extends] identifier[Block] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[getBlocks] operator[SEP] identifier[List] operator[<] identifier[Block] operator[>] identifier[blocks] , identifier[Axes] identifier[axes] , identifier[List] oper... |
public static <T extends Comparable<? super T>> T min(final T[] a) {
N.checkArgNotNullOrEmpty(a, "The spcified array 'a' can not be null or empty");
return min(a, 0, a.length);
} | class class_name[name] begin[{]
method[min, return_type[type[T]], modifier[public static], parameter[a]] begin[{]
call[N.checkArgNotNullOrEmpty, parameter[member[.a], literal["The spcified array 'a' can not be null or empty"]]]
return[call[.min, parameter[member[.a], literal[0], member[... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] identifier[T] identifier[min] operator[SEP] Keyword[final] identifier[T] operator[SEP] operator[SEP] identifier[a] operator[SEP] {
identif... |
public void setEnabled(boolean isEnabled) {
mCardNumberEditText.setEnabled(isEnabled);
mExpiryDateEditText.setEnabled(isEnabled);
mCvcNumberEditText.setEnabled(isEnabled);
} | class class_name[name] begin[{]
method[setEnabled, return_type[void], modifier[public], parameter[isEnabled]] begin[{]
call[mCardNumberEditText.setEnabled, parameter[member[.isEnabled]]]
call[mExpiryDateEditText.setEnabled, parameter[member[.isEnabled]]]
call[mCv... | Keyword[public] Keyword[void] identifier[setEnabled] operator[SEP] Keyword[boolean] identifier[isEnabled] operator[SEP] {
identifier[mCardNumberEditText] operator[SEP] identifier[setEnabled] operator[SEP] identifier[isEnabled] operator[SEP] operator[SEP] identifier[mExpiryDateEditText] operator[SEP] identifier[s... |
public void publish(NDArrayMessage message) throws Exception {
if (!init)
init();
// Create a context, needed for client connection to media driver
// A separate media driver process needs to be running prior to starting this application
// Create an Aeron instance with clie... | class class_name[name] begin[{]
method[publish, return_type[void], modifier[public], parameter[message]] begin[{]
if[member[.init]] begin[{]
call[.init, parameter[]]
else begin[{]
None
end[}]
local_variable[type[boolean], connected]
if[binary_... | Keyword[public] Keyword[void] identifier[publish] operator[SEP] identifier[NDArrayMessage] identifier[message] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] operator[!] identifier[init] operator[SEP] identifier[init] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] ide... |
public static <T> T showDialog(WindowBasedTextGUI textGUI, String title, String description, TerminalSize listBoxSize, T... items) {
ListSelectDialog<T> listSelectDialog = new ListSelectDialogBuilder<T>()
.setTitle(title)
.setDescription(description)
.setListBoxSi... | class class_name[name] begin[{]
method[showDialog, return_type[type[T]], modifier[public static], parameter[textGUI, title, description, listBoxSize, items]] begin[{]
local_variable[type[ListSelectDialog], listSelectDialog]
return[call[listSelectDialog.showDialog, parameter[member[.textGUI]]]]
... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[showDialog] operator[SEP] identifier[WindowBasedTextGUI] identifier[textGUI] , identifier[String] identifier[title] , identifier[String] identifier[description] , identifier[TerminalSize] identifier[listBoxSize] , identif... |
@Override
public boolean hasPermission(String owner, String activity, String target)
throws AuthorizationException {
return getAuthorizationService().doesPrincipalHavePermission(this, owner, activity, target);
} | class class_name[name] begin[{]
method[hasPermission, return_type[type[boolean]], modifier[public], parameter[owner, activity, target]] begin[{]
return[call[.getAuthorizationService, parameter[]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasPermission] operator[SEP] identifier[String] identifier[owner] , identifier[String] identifier[activity] , identifier[String] identifier[target] operator[SEP] Keyword[throws] identifier[AuthorizationException] {
Keyword[return] i... |
void removeSpan(Object what) {
int count = mSpanCount;
Object[] spans = mSpans;
int[] data = mSpanData;
for (int i = count - 1; i >= 0; i--) {
if (spans[i] == what) {
int ostart = data[i * COLUMNS + START];
int oend = data[i * COLUMNS + END];
... | class class_name[name] begin[{]
method[removeSpan, return_type[void], modifier[default], parameter[what]] begin[{]
local_variable[type[int], count]
local_variable[type[Object], spans]
local_variable[type[int], data]
ForStatement(body=BlockStatement(label=None, statements=[IfStat... | Keyword[void] identifier[removeSpan] operator[SEP] identifier[Object] identifier[what] operator[SEP] {
Keyword[int] identifier[count] operator[=] identifier[mSpanCount] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[spans] operator[=] identifier[mSpans] operator[SEP] Keyword[int] operato... |
public Calendar getStart() {
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(start);
return cal;
} | class class_name[name] begin[{]
method[getStart, return_type[type[Calendar]], modifier[public], parameter[]] begin[{]
local_variable[type[Calendar], cal]
call[cal.setTimeInMillis, parameter[member[.start]]]
return[member[.cal]]
end[}]
END[}] | Keyword[public] identifier[Calendar] identifier[getStart] operator[SEP] operator[SEP] {
identifier[Calendar] identifier[cal] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[cal] operator[SEP] identifier[setTimeInMillis] operator[SEP] ide... |
private List<byte[]> getBytesFromFile(Long[] offset, Integer[] length) throws IOException {
List<byte[]> vars = new ArrayList<byte[]>();
if (cachedPage == null) {
for (int i = 0; i < offset.length; i++) {
byte[] temp = new byte[length[i]];
long actuallySkipped... | class class_name[name] begin[{]
method[getBytesFromFile, return_type[type[List]], modifier[private], parameter[offset, length]] begin[{]
local_variable[type[List], vars]
if[binary_operation[member[.cachedPage], ==, literal[null]]] begin[{]
ForStatement(body=BlockStatement(la... | Keyword[private] identifier[List] operator[<] Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[getBytesFromFile] operator[SEP] identifier[Long] operator[SEP] operator[SEP] identifier[offset] , identifier[Integer] operator[SEP] operator[SEP] identifier[length] operator[SEP] Keyword[throws] identifier[IO... |
protected final Stringifier<Long> registerLongStringifier(String name, Stringifier<Long> longStringifier) {
compositeStringifier.add(Long.class, name, longStringifier);
compositeStringifier.add(Long.TYPE, name, longStringifier);
return longStringifier;
} | class class_name[name] begin[{]
method[registerLongStringifier, return_type[type[Stringifier]], modifier[final protected], parameter[name, longStringifier]] begin[{]
call[compositeStringifier.add, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type... | Keyword[protected] Keyword[final] identifier[Stringifier] operator[<] identifier[Long] operator[>] identifier[registerLongStringifier] operator[SEP] identifier[String] identifier[name] , identifier[Stringifier] operator[<] identifier[Long] operator[>] identifier[longStringifier] operator[SEP] {
identifier[compo... |
private void unpackRules(byte[] rules)
{
startDay = rules[0];
startDayOfWeek = rules[1];
endDay = rules[2];
endDayOfWeek = rules[3];
// As of serial version 2, include time modes
if (rules.length >= 6) {
startTimeMode = rules[4];
... | class class_name[name] begin[{]
method[unpackRules, return_type[void], modifier[private], parameter[rules]] begin[{]
assign[member[.startDay], member[.rules]]
assign[member[.startDayOfWeek], member[.rules]]
assign[member[.endDay], member[.rules]]
... | Keyword[private] Keyword[void] identifier[unpackRules] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[rules] operator[SEP] {
identifier[startDay] operator[=] identifier[rules] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[startDayOfWeek] operator[=] identifier[rules] operator[... |
public boolean matchInCorrespondingLogFile( File texFile, String pattern )
throws MojoExecutionException
{
File logFile = getCorrespondingLogFile( texFile );
if ( logFile.exists() )
{
try
{
return fileContainsPattern( logFile, pattern );
... | class class_name[name] begin[{]
method[matchInCorrespondingLogFile, return_type[type[boolean]], modifier[public], parameter[texFile, pattern]] begin[{]
local_variable[type[File], logFile]
if[call[logFile.exists, parameter[]]] begin[{]
TryStatement(block=[ReturnStatement(expr... | Keyword[public] Keyword[boolean] identifier[matchInCorrespondingLogFile] operator[SEP] identifier[File] identifier[texFile] , identifier[String] identifier[pattern] operator[SEP] Keyword[throws] identifier[MojoExecutionException] {
identifier[File] identifier[logFile] operator[=] identifier[getCorrespondingLogF... |
@Bean(preDestroy = "close")
@Singleton
@Requires(classes = Tracing.class)
Tracing braveTracing(@Nullable Reporter<Span> reporter) {
Tracing.Builder builder = braveTracerConfiguration.getTracingBuilder();
if (reporter != null) {
builder.spanReporter(reporter);
} else {
... | class class_name[name] begin[{]
method[braveTracing, return_type[type[Tracing]], modifier[default], parameter[reporter]] begin[{]
local_variable[type[Tracing], builder]
if[binary_operation[member[.reporter], !=, literal[null]]] begin[{]
call[builder.spanReporter,... | annotation[@] identifier[Bean] operator[SEP] identifier[preDestroy] operator[=] literal[String] operator[SEP] annotation[@] identifier[Singleton] annotation[@] identifier[Requires] operator[SEP] identifier[classes] operator[=] identifier[Tracing] operator[SEP] Keyword[class] operator[SEP] identifier[Tracing] identifier... |
public int read4LE() throws OtpErlangDecodeException {
final byte[] b = new byte[4];
try {
super.read(b);
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
return (b[3] << 24 & 0xff000000) + (b[2] << 16 ... | class class_name[name] begin[{]
method[read4LE, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[byte], b]
TryStatement(block=[StatementExpression(expression=SuperMethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], ... | Keyword[public] Keyword[int] identifier[read4LE] operator[SEP] operator[SEP] Keyword[throws] identifier[OtpErlangDecodeException] {
Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[b] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[4] operator[SEP] operator[SEP] Keyword[try] {
... |
public static String readFileBufferedAsString(final String filename) throws IOException {
FileReader in = null;
try {
StringBuilder result = new StringBuilder();
char[] buffer = new char[2048];
in = new FileReader(filename);
int len = 0;
do {
len = in.read(buffer);
if (len > 0)
result.ap... | class class_name[name] begin[{]
method[readFileBufferedAsString, return_type[type[String]], modifier[public static], parameter[filename]] begin[{]
local_variable[type[FileReader], in]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], ini... | Keyword[public] Keyword[static] identifier[String] identifier[readFileBufferedAsString] operator[SEP] Keyword[final] identifier[String] identifier[filename] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[FileReader] identifier[in] operator[=] Other[null] operator[SEP] Keyword[try] {
... |
static Observable<Integer> singleIntegerAfterDependencies(Query query) {
return concatButIgnoreFirstSequence(query.depends(), Observable.just(1));
} | class class_name[name] begin[{]
method[singleIntegerAfterDependencies, return_type[type[Observable]], modifier[static], parameter[query]] begin[{]
return[call[.concatButIgnoreFirstSequence, parameter[call[query.depends, parameter[]], call[Observable.just, parameter[literal[1]]]]]]
end[}]
END[}] | Keyword[static] identifier[Observable] operator[<] identifier[Integer] operator[>] identifier[singleIntegerAfterDependencies] operator[SEP] identifier[Query] identifier[query] operator[SEP] {
Keyword[return] identifier[concatButIgnoreFirstSequence] operator[SEP] identifier[query] operator[SEP] identifier[depends... |
private void set_data_size()
{
switch(data_format.value())
{
case AttrDataFormat._SCALAR :
data_size = 1;
break;
case AttrDataFormat._SPECTRUM :
data_size = dim_x;
break;
case AttrDataFormat._IMAGE :
data_size = dim_x * dim_y;
break;
}
} | class class_name[name] begin[{]
method[set_data_size, return_type[void], modifier[private], parameter[]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=_SCALAR, postfix_operators=[], prefix_operators=[], qualifier=AttrDataFormat, selectors=[])], statements=[StatementEx... | Keyword[private] Keyword[void] identifier[set_data_size] operator[SEP] operator[SEP] {
Keyword[switch] operator[SEP] identifier[data_format] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] {
Keyword[case] identifier[AttrDataFormat] operator[SEP] identifier[_SCALAR] operator[:... |
public List<String> getChildren(String path, Stat stat, Watcher watcher)
throws KeeperException.NoNodeException {
return dataTree.getChildren(path, stat, watcher);
} | class class_name[name] begin[{]
method[getChildren, return_type[type[List]], modifier[public], parameter[path, stat, watcher]] begin[{]
return[call[dataTree.getChildren, parameter[member[.path], member[.stat], member[.watcher]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getChildren] operator[SEP] identifier[String] identifier[path] , identifier[Stat] identifier[stat] , identifier[Watcher] identifier[watcher] operator[SEP] Keyword[throws] identifier[KeeperException] operator[SEP] identifier[NoNodeE... |
public Observable<ServiceResponse<VpnClientIPsecParametersInner>> beginSetVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) {
if (resourceGroupName == null) {
throw new IllegalArgumentExcep... | class class_name[name] begin[{]
method[beginSetVpnclientIpsecParametersWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams]] begin[{]
if[binary_operation[member[.resourceGroupName], ==, literal[n... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[VpnClientIPsecParametersInner] operator[>] operator[>] identifier[beginSetVpnclientIpsecParametersWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifie... |
@CheckReturnValue
@NonNull
public static <T> UnicastSubject<T> create(boolean delayError) {
return new UnicastSubject<T>(bufferSize(), delayError);
} | class class_name[name] begin[{]
method[create, return_type[type[UnicastSubject]], modifier[public static], parameter[delayError]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=bufferSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments... | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[NonNull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[UnicastSubject] operator[<] identifier[T] operator[>] identifier[create] operator[SEP] Keyword[boolean] identifier[delayError] operator[SEP] {
Keyword[retu... |
static String toJavaName(String opensslName) {
if (opensslName == null) {
return null;
}
Matcher matcher = PATTERN.matcher(opensslName);
if (matcher.matches()) {
String group1 = matcher.group(1);
if (group1 != null) {
return group1.toUp... | class class_name[name] begin[{]
method[toJavaName, return_type[type[String]], modifier[static], parameter[opensslName]] begin[{]
if[binary_operation[member[.opensslName], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_varia... | Keyword[static] identifier[String] identifier[toJavaName] operator[SEP] identifier[String] identifier[opensslName] operator[SEP] {
Keyword[if] operator[SEP] identifier[opensslName] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
identifier[Matcher] id... |
MetricFamilySamples fromCounter(String dropwizardName, Counter counter) {
MetricFamilySamples.Sample sample = sampleBuilder.createSample(dropwizardName, "", new ArrayList<String>(), new ArrayList<String>(),
new Long(counter.getCount()).doubleValue());
return new MetricFamilySamples(sampl... | class class_name[name] begin[{]
method[fromCounter, return_type[type[MetricFamilySamples]], modifier[default], parameter[dropwizardName, counter]] begin[{]
local_variable[type[MetricFamilySamples], sample]
return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_... | identifier[MetricFamilySamples] identifier[fromCounter] operator[SEP] identifier[String] identifier[dropwizardName] , identifier[Counter] identifier[counter] operator[SEP] {
identifier[MetricFamilySamples] operator[SEP] identifier[Sample] identifier[sample] operator[=] identifier[sampleBuilder] operator[SEP] id... |
private Animator prepareStyle3Animation() {
AnimatorSet animation = new AnimatorSet();
ObjectAnimator progressAnimation = ObjectAnimator.ofFloat(drawable, CircularProgressDrawable.PROGRESS_PROPERTY, 0.75f, 0f);
progressAnimation.setDuration(1200);
progressAnimation.setInterpolator(new A... | class class_name[name] begin[{]
method[prepareStyle3Animation, return_type[type[Animator]], modifier[private], parameter[]] begin[{]
local_variable[type[AnimatorSet], animation]
local_variable[type[ObjectAnimator], progressAnimation]
call[progressAnimation.setDuration, parameter... | Keyword[private] identifier[Animator] identifier[prepareStyle3Animation] operator[SEP] operator[SEP] {
identifier[AnimatorSet] identifier[animation] operator[=] Keyword[new] identifier[AnimatorSet] operator[SEP] operator[SEP] operator[SEP] identifier[ObjectAnimator] identifier[progressAnimation] operator[=] iden... |
public static <E> void swap(List<E> list, int index1, int index2) {
TrivialSwap.swap(list, index1, list, index2);
} | class class_name[name] begin[{]
method[swap, return_type[void], modifier[public static], parameter[list, index1, index2]] begin[{]
call[TrivialSwap.swap, parameter[member[.list], member[.index1], member[.list], member[.index2]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] Keyword[void] identifier[swap] operator[SEP] identifier[List] operator[<] identifier[E] operator[>] identifier[list] , Keyword[int] identifier[index1] , Keyword[int] identifier[index2] operator[SEP] {
identifier[TrivialSwap] operator[SEP] id... |
public static String convertCharset(final String source, final String srcCharsetName, final String newCharsetName) {
if (srcCharsetName.equals(newCharsetName)) {
return source;
}
return StringUtil.newString(StringUtil.getBytes(source, srcCharsetName), newCharsetName);
} | class class_name[name] begin[{]
method[convertCharset, return_type[type[String]], modifier[public static], parameter[source, srcCharsetName, newCharsetName]] begin[{]
if[call[srcCharsetName.equals, parameter[member[.newCharsetName]]]] begin[{]
return[member[.source]]
else be... | Keyword[public] Keyword[static] identifier[String] identifier[convertCharset] operator[SEP] Keyword[final] identifier[String] identifier[source] , Keyword[final] identifier[String] identifier[srcCharsetName] , Keyword[final] identifier[String] identifier[newCharsetName] operator[SEP] {
Keyword[if] operator[SEP... |
void cancelExistingAnimation(@NonNull final View view) {
int hashCode = view.hashCode();
Animator animator = mAnimators.get(hashCode);
if (animator != null) {
animator.end();
mAnimators.remove(hashCode);
}
} | class class_name[name] begin[{]
method[cancelExistingAnimation, return_type[void], modifier[default], parameter[view]] begin[{]
local_variable[type[int], hashCode]
local_variable[type[Animator], animator]
if[binary_operation[member[.animator], !=, literal[null]]] begin[{]
... | Keyword[void] identifier[cancelExistingAnimation] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[View] identifier[view] operator[SEP] {
Keyword[int] identifier[hashCode] operator[=] identifier[view] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] identifier... |
@BetaApi
public final Operation insertSslPolicy(ProjectName project, SslPolicy sslPolicyResource) {
InsertSslPolicyHttpRequest request =
InsertSslPolicyHttpRequest.newBuilder()
.setProject(project == null ? null : project.toString())
.setSslPolicyResource(sslPolicyResource)
... | class class_name[name] begin[{]
method[insertSslPolicy, return_type[type[Operation]], modifier[final public], parameter[project, sslPolicyResource]] begin[{]
local_variable[type[InsertSslPolicyHttpRequest], request]
return[call[.insertSslPolicy, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[insertSslPolicy] operator[SEP] identifier[ProjectName] identifier[project] , identifier[SslPolicy] identifier[sslPolicyResource] operator[SEP] {
identifier[InsertSslPolicyHttpRequest] identifier[request] operator[=... |
public Set<DiscoveryEntryWithMetaInfo> filter(Version callerVersion,
Set<DiscoveryEntryWithMetaInfo> discoveryEntries,
Map<String, Set<Version>> discoveredVersions) {
if (callerVersion == null || discoveryEntries... | class class_name[name] begin[{]
method[filter, return_type[type[Set]], modifier[public], parameter[callerVersion, discoveryEntries, discoveredVersions]] begin[{]
if[binary_operation[binary_operation[member[.callerVersion], ==, literal[null]], ||, binary_operation[member[.discoveryEntries], ==, ... | Keyword[public] identifier[Set] operator[<] identifier[DiscoveryEntryWithMetaInfo] operator[>] identifier[filter] operator[SEP] identifier[Version] identifier[callerVersion] , identifier[Set] operator[<] identifier[DiscoveryEntryWithMetaInfo] operator[>] identifier[discoveryEntries] , identifier[Map] operator[<] iden... |
private boolean closeAllWindows(SwingFrame navigationFrameView) {
// Die umgekehrte Reihenfolge fühlt sich beim Schliessen natürlicher an
for (int i = navigationFrames.size()-1; i>= 0; i--) {
SwingFrame frameView = navigationFrames.get(i);
if (!frameView.tryToCloseWindow()) return false;
removeNavigationFr... | class class_name[name] begin[{]
method[closeAllWindows, return_type[type[boolean]], modifier[private], parameter[navigationFrameView]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Me... | Keyword[private] Keyword[boolean] identifier[closeAllWindows] operator[SEP] identifier[SwingFrame] identifier[navigationFrameView] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[navigationFrames] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] ... |
public void setFrequencyCapBehavior(com.google.api.ads.admanager.axis.v201902.FrequencyCapBehavior frequencyCapBehavior) {
this.frequencyCapBehavior = frequencyCapBehavior;
} | class class_name[name] begin[{]
method[setFrequencyCapBehavior, return_type[void], modifier[public], parameter[frequencyCapBehavior]] begin[{]
assign[THIS[member[None.frequencyCapBehavior]], member[.frequencyCapBehavior]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setFrequencyCapBehavior] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201902] operator[SEP] identifier[Frequ... |
public boolean put(SIMPMessage msg, boolean isOnItemStream)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "put", new Object[] { msg, Boolean.valueOf(isOnItemStream)});
boolean returnValue = false;
// chose small value for ArrayList initial size since typically n... | class class_name[name] begin[{]
method[put, return_type[type[boolean]], modifier[public], parameter[msg, isOnItemStream]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, paramet... | Keyword[public] Keyword[boolean] identifier[put] operator[SEP] identifier[SIMPMessage] identifier[msg] , Keyword[boolean] identifier[isOnItemStream] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identif... |
public void put(String fqn, HashMap data) {
if(!remote_calls) {
_put(fqn, data);
return;
}
//Changes done by <aos>
//if true, propagate action to the group
if(send_message) {
if(channel == null) {
if(log.isErrorEnabled()) log.error("channe... | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[fqn, data]] begin[{]
if[member[.remote_calls]] begin[{]
call[._put, parameter[member[.fqn], member[.data]]]
return[None]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[String] identifier[fqn] , identifier[HashMap] identifier[data] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[remote_calls] operator[SEP] {
identifier[_put] operator[SEP] identifier[fqn] , identifier[data] opera... |
public org.biouno.figshare.v1.model.File uploadFile(long articleId, File file) {
HttpClient httpClient = null;
try {
final String method = String.format("my_data/articles/%d/files", articleId);
// create an HTTP request to a protected resource
final String url = getUR... | class class_name[name] begin[{]
method[uploadFile, return_type[type[org]], modifier[public], parameter[articleId, file]] begin[{]
local_variable[type[HttpClient], httpClient]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=... | Keyword[public] identifier[org] operator[SEP] identifier[biouno] operator[SEP] identifier[figshare] operator[SEP] identifier[v1] operator[SEP] identifier[model] operator[SEP] identifier[File] identifier[uploadFile] operator[SEP] Keyword[long] identifier[articleId] , identifier[File] identifier[file] operator[SEP] {
... |
@Override
public int complete(CommandContext ctx, String buffer, int cursor, List<String> candidates) {
if(!ctx.isDomainMode()) {
return -1;
}
if(buffer.isEmpty()) {
candidates.add("{rollout");
return 0;
}
try {
parsedOp.parseO... | class class_name[name] begin[{]
method[complete, return_type[type[int]], modifier[public], parameter[ctx, buffer, cursor, candidates]] begin[{]
if[call[ctx.isDomainMode, parameter[]]] begin[{]
return[literal[1]]
else begin[{]
None
end[}]
if[call[buffe... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[complete] operator[SEP] identifier[CommandContext] identifier[ctx] , identifier[String] identifier[buffer] , Keyword[int] identifier[cursor] , identifier[List] operator[<] identifier[String] operator[>] identifier[candidates] operator[SEP] {... |
public static void parkNanos(long nanos) {
try {
Strand.parkNanos(nanos);
} catch (SuspendExecution e) {
throw RuntimeSuspendExecution.of(e);
}
} | class class_name[name] begin[{]
method[parkNanos, return_type[void], modifier[public static], parameter[nanos]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nanos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], me... | Keyword[public] Keyword[static] Keyword[void] identifier[parkNanos] operator[SEP] Keyword[long] identifier[nanos] operator[SEP] {
Keyword[try] {
identifier[Strand] operator[SEP] identifier[parkNanos] operator[SEP] identifier[nanos] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SE... |
@Deprecated
protected void handleComputeFields(int julianDay) {
int year, month, dayOfMonth, dayOfYear;
long daysSinceEpoch = julianDay - PERSIAN_EPOCH;
year = 1 + (int) floorDivide(33 * daysSinceEpoch + 3, 12053);
long farvardin1 = 365L * (year - 1L) + floorDivide(8L * year + 21, ... | class class_name[name] begin[{]
method[handleComputeFields, return_type[void], modifier[protected], parameter[julianDay]] begin[{]
local_variable[type[int], year]
local_variable[type[long], daysSinceEpoch]
assign[member[.year], binary_operation[literal[1], +, Cast(expression=Met... | annotation[@] identifier[Deprecated] Keyword[protected] Keyword[void] identifier[handleComputeFields] operator[SEP] Keyword[int] identifier[julianDay] operator[SEP] {
Keyword[int] identifier[year] , identifier[month] , identifier[dayOfMonth] , identifier[dayOfYear] operator[SEP] Keyword[long] identifier[daysS... |
private static <T, G extends T> void generateOnMeasureMethod(DexMaker dexMaker,
TypeId<G> generatedType,
TypeId<T> baseType) {
final FieldId<G, Interceptor> interceptorField =
... | class class_name[name] begin[{]
method[generateOnMeasureMethod, return_type[void], modifier[private static], parameter[dexMaker, generatedType, baseType]] begin[{]
local_variable[type[FieldId], interceptorField]
local_variable[type[String], methodName]
local_variable[type[MethodId], sup... | Keyword[private] Keyword[static] operator[<] identifier[T] , identifier[G] Keyword[extends] identifier[T] operator[>] Keyword[void] identifier[generateOnMeasureMethod] operator[SEP] identifier[DexMaker] identifier[dexMaker] , identifier[TypeId] operator[<] identifier[G] operator[>] identifier[generatedType] , identi... |
public static boolean isLinkCellule (byte[] b) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "isLinkCellule", new Object[]{ b });
boolean rc = false;
if (b.length > 0) {
rc = (b[0] == LINKCELLULE);
}
if (TraceComponent.isAnyTracingEnabled() && tc.isEntry... | class class_name[name] begin[{]
method[isLinkCellule, return_type[type[boolean]], modifier[public static], parameter[b]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, paramete... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isLinkCellule] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[t... |
protected int findInsertionPoint(final E o, int low, int high) {
while (low <= high) {
int mid = (low + high) >>> 1;
int delta = compare(get(mid), o);
if (delta > 0) {
high = mid - 1;
} else {
low = mid + 1;
}
}
return low;
} | class class_name[name] begin[{]
method[findInsertionPoint, return_type[type[int]], modifier[protected], parameter[o, low, high]] begin[{]
while[binary_operation[member[.low], <=, member[.high]]] begin[{]
local_variable[type[int], mid]
local_variable[type[int], delta]
... | Keyword[protected] Keyword[int] identifier[findInsertionPoint] operator[SEP] Keyword[final] identifier[E] identifier[o] , Keyword[int] identifier[low] , Keyword[int] identifier[high] operator[SEP] {
Keyword[while] operator[SEP] identifier[low] operator[<=] identifier[high] operator[SEP] {
Keyword[in... |
@Override
public CommerceNotificationAttachment fetchByUuid_First(String uuid,
OrderByComparator<CommerceNotificationAttachment> orderByComparator) {
List<CommerceNotificationAttachment> list = findByUuid(uuid, 0, 1,
orderByComparator);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
} | class class_name[name] begin[{]
method[fetchByUuid_First, return_type[type[CommerceNotificationAttachment]], modifier[public], parameter[uuid, orderByComparator]] begin[{]
local_variable[type[List], list]
if[call[list.isEmpty, parameter[]]] begin[{]
return[call[list.get, par... | annotation[@] identifier[Override] Keyword[public] identifier[CommerceNotificationAttachment] identifier[fetchByUuid_First] operator[SEP] identifier[String] identifier[uuid] , identifier[OrderByComparator] operator[<] identifier[CommerceNotificationAttachment] operator[>] identifier[orderByComparator] operator[SEP] {... |
@Transactional
public void persist(GroupValue groupValue) {
Package rootPackage = packageFactory.create(groupValue.getRootPackage());
Map<String, Role> roles =
groupValue
.getRoles()
.stream()
.map(roleFactory::create)
.collect(toMap(Role::getName, iden... | class class_name[name] begin[{]
method[persist, return_type[void], modifier[public], parameter[groupValue]] begin[{]
local_variable[type[Package], rootPackage]
local_variable[type[Map], roles]
call[roles.values, parameter[]]
local_variable[type[Group], group]
... | annotation[@] identifier[Transactional] Keyword[public] Keyword[void] identifier[persist] operator[SEP] identifier[GroupValue] identifier[groupValue] operator[SEP] {
identifier[Package] identifier[rootPackage] operator[=] identifier[packageFactory] operator[SEP] identifier[create] operator[SEP] identifier[groupV... |
public <T> ForkJoinTask<T> submit(ForkJoinTask<T> task) {
if (task == null)
throw new NullPointerException();
externalPush(task);
return task;
} | class class_name[name] begin[{]
method[submit, return_type[type[ForkJoinTask]], modifier[public], parameter[task]] begin[{]
if[binary_operation[member[.task], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_op... | Keyword[public] operator[<] identifier[T] operator[>] identifier[ForkJoinTask] operator[<] identifier[T] operator[>] identifier[submit] operator[SEP] identifier[ForkJoinTask] operator[<] identifier[T] operator[>] identifier[task] operator[SEP] {
Keyword[if] operator[SEP] identifier[task] operator[==] Other[null]... |
public GobblinTrackingEvent build() {
if (rootCause != null) {
metadata.put(ROOT_CAUSE, ExceptionUtils.getStackTrace(rootCause));
}
return new GobblinTrackingEvent(0L, namespace, name, metadata);
} | class class_name[name] begin[{]
method[build, return_type[type[GobblinTrackingEvent]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.rootCause], !=, literal[null]]] begin[{]
call[metadata.put, parameter[member[.ROOT_CAUSE], call[ExceptionUtils.getSt... | Keyword[public] identifier[GobblinTrackingEvent] identifier[build] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[rootCause] operator[!=] Other[null] operator[SEP] {
identifier[metadata] operator[SEP] identifier[put] operator[SEP] identifier[ROOT_CAUSE] , identifier[ExceptionUtils... |
public void reset() {
this.cacheHandler = null;
this.pjp = null;
this.cacheKey = null;
this.cache = null;
this.autoLoadTO = null;
this.arguments = null;
this.cacheWrapper = null;
} | class class_name[name] begin[{]
method[reset, return_type[void], modifier[public], parameter[]] begin[{]
assign[THIS[member[None.cacheHandler]], literal[null]]
assign[THIS[member[None.pjp]], literal[null]]
assign[THIS[member[None.cacheKey]], literal[null]]
... | Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[cacheHandler] operator[=] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[pjp] operator[=] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[cacheKey] operator[=] O... |
public boolean deleteResource(final String id) {
performZanataRESTCallWaiting();
ClientResponse<String> response = null;
try {
final ISourceDocResource client = proxyFactory.getSourceDocResource(details.getProject(), details.getVersion());
response = client.deleteResource... | class class_name[name] begin[{]
method[deleteResource, return_type[type[boolean]], modifier[public], parameter[id]] begin[{]
call[.performZanataRESTCallWaiting, parameter[]]
local_variable[type[ClientResponse], response]
TryStatement(block=[LocalVariableDeclaration(annotations=[... | Keyword[public] Keyword[boolean] identifier[deleteResource] operator[SEP] Keyword[final] identifier[String] identifier[id] operator[SEP] {
identifier[performZanataRESTCallWaiting] operator[SEP] operator[SEP] operator[SEP] identifier[ClientResponse] operator[<] identifier[String] operator[>] identifier[response] ... |
private static byte[] withCorrectBlockSize(final byte[] key) {
if (key.length != CcAes.BLOCK) {
throw new IllegalArgumentException(
String.format(
"the length of the AES key must be exactly %d bytes",
CcAes.BLOCK
)
)... | class class_name[name] begin[{]
method[withCorrectBlockSize, return_type[type[byte]], modifier[private static], parameter[key]] begin[{]
if[binary_operation[member[key.length], !=, member[CcAes.BLOCK]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(argu... | Keyword[private] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[withCorrectBlockSize] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[SEP] identifier[length] operator[!=] identifier[CcA... |
public void addPutTimeNanos(long duration) {
for (;;) {
long nanos = putTimeTakenNanos;
if (nanos <= Long.MAX_VALUE - duration) {
if (PUT_TIME_TAKEN_NANOS.compareAndSet(this, nanos, nanos + duration)) {
return;
}
} else {
... | class class_name[name] begin[{]
method[addPutTimeNanos, return_type[void], modifier[public], parameter[duration]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=... | Keyword[public] Keyword[void] identifier[addPutTimeNanos] operator[SEP] Keyword[long] identifier[duration] operator[SEP] {
Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
Keyword[long] identifier[nanos] operator[=] identifier[putTimeTakenNanos] operator[SEP] Keyword[if] operator... |
@Override
public String loadKam(KamInfo ki, KamFilter kf)
throws KamCacheServiceException {
if (ki == null) {
throw new InvalidArgument("KamInfo required");
}
String ret;
Callable<String> callable;
if (kf != null) {
// Check the fltrdMap ... | class class_name[name] begin[{]
method[loadKam, return_type[type[String]], modifier[public], parameter[ki, kf]] begin[{]
if[binary_operation[member[.ki], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[],... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[loadKam] operator[SEP] identifier[KamInfo] identifier[ki] , identifier[KamFilter] identifier[kf] operator[SEP] Keyword[throws] identifier[KamCacheServiceException] {
Keyword[if] operator[SEP] identifier[ki] operator[==] Other[null]... |
private Definition getDefinition(final HttpServletRequest req) {
final String definitionToken = req.getHeader(Headers.DEFINITION.getName());
return StringUtils.isNotBlank(definitionToken)
? definitionService.parseDefinition(definitionToken)
: MissingModelElement.DEFINITIO... | class class_name[name] begin[{]
method[getDefinition, return_type[type[Definition]], modifier[private], parameter[req]] begin[{]
local_variable[type[String], definitionToken]
return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=definitionToken, postfix_operators... | Keyword[private] identifier[Definition] identifier[getDefinition] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[req] operator[SEP] {
Keyword[final] identifier[String] identifier[definitionToken] operator[=] identifier[req] operator[SEP] identifier[getHeader] operator[SEP] identifier[Head... |
public alluxio.grpc.RegisterJobWorkerPOptionsOrBuilder getOptionsOrBuilder() {
return options_ == null ? alluxio.grpc.RegisterJobWorkerPOptions.getDefaultInstance() : options_;
} | class class_name[name] begin[{]
method[getOptionsOrBuilder, return_type[type[alluxio]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=options_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Lit... | Keyword[public] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[RegisterJobWorkerPOptionsOrBuilder] identifier[getOptionsOrBuilder] operator[SEP] operator[SEP] {
Keyword[return] identifier[options_] operator[==] Other[null] operator[?] identifier[alluxio] operator[SEP] identifier[grpc... |
public String getReason() {
if (lastExceededValue) {
return String.format("Metric '%s' has aggregated-value=%d %s %d as threshold", metric.name(), lastAggregatedValue, operator.symbol, thresholdValue);
} else {
return String.format("Metric %s: aggregated-value=%d", metric.name(),... | class class_name[name] begin[{]
method[getReason, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[member[.lastExceededValue]] begin[{]
return[call[String.format, parameter[literal["Metric '%s' has aggregated-value=%d %s %d as threshold"], call[metric.name, para... | Keyword[public] identifier[String] identifier[getReason] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[lastExceededValue] operator[SEP] {
Keyword[return] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[metric] operator[SEP] identifie... |
public synchronized void removeTimestamp(long ts) throws NoSuchElementException {
Preconditions.checkState(!closed, "tracker closed ");
Preconditions.checkState(allocationsInProgress > 0,
"allocationsInProgress should be > 0 " + allocationsInProgress);
Objects.requireNonNull(node);
if (timestamp... | class class_name[name] begin[{]
method[removeTimestamp, return_type[void], modifier[synchronized public], parameter[ts]] begin[{]
call[Preconditions.checkState, parameter[member[.closed], literal["tracker closed "]]]
call[Preconditions.checkState, parameter[binary_operation[memb... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[removeTimestamp] operator[SEP] Keyword[long] identifier[ts] operator[SEP] Keyword[throws] identifier[NoSuchElementException] {
identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] operator[!] identifier[closed] , literal[Stri... |
private boolean containsOld(double wantLat, double wantLon, int[] rectIndex) {
rectIndex[0] = Math.max( Math.min(rectIndex[0], nrows-1), 0);
rectIndex[1] = Math.max( Math.min(rectIndex[1], ncols-1), 0);
int row = rectIndex[0];
int col = rectIndex[1];
if (debug) System.out.printf(" (%d,%d) contains... | class class_name[name] begin[{]
method[containsOld, return_type[type[boolean]], modifier[private], parameter[wantLat, wantLon, rectIndex]] begin[{]
assign[member[.rectIndex], call[Math.max, parameter[call[Math.min, parameter[member[.rectIndex], binary_operation[member[.nrows], -, literal[1]]]],... | Keyword[private] Keyword[boolean] identifier[containsOld] operator[SEP] Keyword[double] identifier[wantLat] , Keyword[double] identifier[wantLon] , Keyword[int] operator[SEP] operator[SEP] identifier[rectIndex] operator[SEP] {
identifier[rectIndex] operator[SEP] Other[0] operator[SEP] operator[=] identifier[Ma... |
public void validate(StyledLayerDescriptorInfo sld) throws SldException {
try {
parseSldI(sld);
} catch (JiBXException e) {
throw new SldException("Validation error", e);
}
} | class class_name[name] begin[{]
method[validate, return_type[void], modifier[public], parameter[sld]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sld, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseSl... | Keyword[public] Keyword[void] identifier[validate] operator[SEP] identifier[StyledLayerDescriptorInfo] identifier[sld] operator[SEP] Keyword[throws] identifier[SldException] {
Keyword[try] {
identifier[parseSldI] operator[SEP] identifier[sld] operator[SEP] operator[SEP]
}
Keyword[catch] ... |
public static <T> T validateNotEmpty(T value, String errorMsg) throws ValidateException {
if (isEmpty(value)) {
throw new ValidateException(errorMsg);
}
return value;
} | class class_name[name] begin[{]
method[validateNotEmpty, return_type[type[T]], modifier[public static], parameter[value, errorMsg]] begin[{]
if[call[.isEmpty, parameter[member[.value]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=errorMsg, post... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[validateNotEmpty] operator[SEP] identifier[T] identifier[value] , identifier[String] identifier[errorMsg] operator[SEP] Keyword[throws] identifier[ValidateException] {
Keyword[if] operator[SEP] identifier[isEmpty] ope... |
public static <T extends Comparable<? super T>> List<T> sort(final List<T> list) {
Validate.notNull(list, "Cannot execute list sort: list is null");
final Object[] a = list.toArray();
Arrays.sort(a);
return fillNewList(a, list.getClass());
} | class class_name[name] begin[{]
method[sort, return_type[type[List]], modifier[public static], parameter[list]] begin[{]
call[Validate.notNull, parameter[member[.list], literal["Cannot execute list sort: list is null"]]]
local_variable[type[Object], a]
call[Arrays.sort, ... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[sort] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[T] o... |
@Synchronized("lock")
public void disconnect(final ReactiveSeq<T> stream) {
Option<Queue<T>> o = streamToQueue.get(stream);
distributor.removeQueue(streamToQueue.getOrElse(stream, new Queue<>()));
this.streamToQueue = streamToQueue.remove(stream);
this.index--;
} | class class_name[name] begin[{]
method[disconnect, return_type[void], modifier[public], parameter[stream]] begin[{]
local_variable[type[Option], o]
call[distributor.removeQueue, parameter[call[streamToQueue.getOrElse, parameter[member[.stream], ClassCreator(arguments=[], body=None, cons... | annotation[@] identifier[Synchronized] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[disconnect] operator[SEP] Keyword[final] identifier[ReactiveSeq] operator[<] identifier[T] operator[>] identifier[stream] operator[SEP] {
identifier[Option] operator[<] identifier[Queue] op... |
private static long getBlockSize(LocatedBlocks lbs) throws IOException {
List<LocatedBlock> locatedBlocks = lbs.getLocatedBlocks();
long bs = -1;
for (LocatedBlock lb: locatedBlocks) {
if (lb.getBlockSize() > bs) {
bs = lb.getBlockSize();
}
}
return bs;
} | class class_name[name] begin[{]
method[getBlockSize, return_type[type[long]], modifier[private static], parameter[lbs]] begin[{]
local_variable[type[List], locatedBlocks]
local_variable[type[long], bs]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Binary... | Keyword[private] Keyword[static] Keyword[long] identifier[getBlockSize] operator[SEP] identifier[LocatedBlocks] identifier[lbs] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[List] operator[<] identifier[LocatedBlock] operator[>] identifier[locatedBlocks] operator[=] identifier[lbs] operator[... |
public static Subscription retrieve(String subscriptionExposedId) throws StripeException {
return retrieve(subscriptionExposedId, (Map<String, Object>) null, (RequestOptions) null);
} | class class_name[name] begin[{]
method[retrieve, return_type[type[Subscription]], modifier[public static], parameter[subscriptionExposedId]] begin[{]
return[call[.retrieve, parameter[member[.subscriptionExposedId], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selec... | Keyword[public] Keyword[static] identifier[Subscription] identifier[retrieve] operator[SEP] identifier[String] identifier[subscriptionExposedId] operator[SEP] Keyword[throws] identifier[StripeException] {
Keyword[return] identifier[retrieve] operator[SEP] identifier[subscriptionExposedId] , operator[SEP] identi... |
private static Class<?> getGenericReturnType(Method method, Class<?> source, int typeIndex, int nestingLevel) {
return extractType(method.getGenericReturnType(), source, typeIndex, null, null, nestingLevel, 1);
} | class class_name[name] begin[{]
method[getGenericReturnType, return_type[type[Class]], modifier[private static], parameter[method, source, typeIndex, nestingLevel]] begin[{]
return[call[.extractType, parameter[call[method.getGenericReturnType, parameter[]], member[.source], member[.typeIndex], literal[... | Keyword[private] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[getGenericReturnType] operator[SEP] identifier[Method] identifier[method] , identifier[Class] operator[<] operator[?] operator[>] identifier[source] , Keyword[int] identifier[typeIndex] , Keyword[int] identifier[nesting... |
@Nonnull
public PSAssertReport readAssertReportFromXML (@Nonnull final IMicroElement eAssertReport)
{
final PSAssertReport ret = new PSAssertReport (eAssertReport.getLocalName ()
.equals (CSchematronXML.ELEMENT_ASSERT));
final PSRichGroup aRic... | class class_name[name] begin[{]
method[readAssertReportFromXML, return_type[type[PSAssertReport]], modifier[public], parameter[eAssertReport]] begin[{]
local_variable[type[PSAssertReport], ret]
local_variable[type[PSRichGroup], aRichGroup]
local_variable[type[PSLinkableGroup], aLinkable... | annotation[@] identifier[Nonnull] Keyword[public] identifier[PSAssertReport] identifier[readAssertReportFromXML] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IMicroElement] identifier[eAssertReport] operator[SEP] {
Keyword[final] identifier[PSAssertReport] identifier[ret] operator[=]... |
public static <T, U> Collector<T, ?, Seq<T>> minAllBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) {
return maxAllBy(function, comparator.reversed());
} | class class_name[name] begin[{]
method[minAllBy, return_type[type[Collector]], modifier[public static], parameter[function, comparator]] begin[{]
return[call[.maxAllBy, parameter[member[.function], call[comparator.reversed, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[U] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[Seq] operator[<] identifier[T] operator[>] operator[>] identifier[minAllBy] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.