code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public StreamRecord<T> getStreamRecord() {
StreamRecord<T> streamRecord = new StreamRecord<>(value);
if (hasTimestamp) {
streamRecord.setTimestamp(timestamp);
}
return streamRecord;
} | class class_name[name] begin[{]
method[getStreamRecord, return_type[type[StreamRecord]], modifier[public], parameter[]] begin[{]
local_variable[type[StreamRecord], streamRecord]
if[member[.hasTimestamp]] begin[{]
call[streamRecord.setTimestamp, parameter[member[.... | Keyword[public] identifier[StreamRecord] operator[<] identifier[T] operator[>] identifier[getStreamRecord] operator[SEP] operator[SEP] {
identifier[StreamRecord] operator[<] identifier[T] operator[>] identifier[streamRecord] operator[=] Keyword[new] identifier[StreamRecord] operator[<] operator[>] operator[SEP] ... |
public double getDouble(int index) {
int val = storage[index];
return (double) (isUnsigned() ? DataType.unsignedIntToLong(val) : val);
} | class class_name[name] begin[{]
method[getDouble, return_type[type[double]], modifier[public], parameter[index]] begin[{]
local_variable[type[int], val]
return[Cast(expression=TernaryExpression(condition=MethodInvocation(arguments=[], member=isUnsigned, postfix_operators=[], prefix_operators=[]... | Keyword[public] Keyword[double] identifier[getDouble] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[int] identifier[val] operator[=] identifier[storage] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[double] operator[SEP] operator[SEP] ide... |
@Override
public GetApiKeyResult getApiKey(GetApiKeyRequest request) {
request = beforeClientExecution(request);
return executeGetApiKey(request);
} | class class_name[name] begin[{]
method[getApiKey, return_type[type[GetApiKeyResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeGetApiKey, parameter[member[.request]]]]
end[}... | annotation[@] identifier[Override] Keyword[public] identifier[GetApiKeyResult] identifier[getApiKey] operator[SEP] identifier[GetApiKeyRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keywo... |
@Beta
public static OptionalInt findLast(IntStream stream) {
// findLast(Stream) does some allocation, so we might as well box some more
java.util.Optional<Integer> boxedLast = findLast(stream.boxed());
return boxedLast.isPresent() ? OptionalInt.of(boxedLast.get()) : OptionalInt.empty();
} | class class_name[name] begin[{]
method[findLast, return_type[type[OptionalInt]], modifier[public static], parameter[stream]] begin[{]
local_variable[type[java], boxedLast]
return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isPresent, postfix_operators=[], prefix_operators=... | annotation[@] identifier[Beta] Keyword[public] Keyword[static] identifier[OptionalInt] identifier[findLast] operator[SEP] identifier[IntStream] identifier[stream] operator[SEP] {
identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Optional] operator[<] identifier[Integer] operator[>] identif... |
final void setJarFileUrls(List<String> jarFilePaths, JPAPXml pxml) {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "setJarFileUrls: root=" + ivPUnitRootURL.toExternalForm());
// 6.2.1.6 mapping-file, jar-file, clas... | class class_name[name] begin[{]
method[setJarFileUrls, return_type[void], modifier[final], parameter[jarFilePaths, pxml]] begin[{]
local_variable[type[boolean], isTraceOn]
if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Tr.ent... | Keyword[final] Keyword[void] identifier[setJarFileUrls] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[jarFilePaths] , identifier[JPAPXml] identifier[pxml] operator[SEP] {
Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[TraceComponent] operator[... |
@XmlElementDecl(namespace = "http://www.tibco.com/xmlns/ApplicationManagement", name = "remoteRepoInstance")
public JAXBElement<RemoteRepoInstanceType> createRemoteRepoInstance(RemoteRepoInstanceType value) {
return new JAXBElement<RemoteRepoInstanceType>(_RemoteRepoInstance_QNAME, RemoteRepoInstanceType.cl... | class class_name[name] begin[{]
method[createRemoteRepoInstance, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_RemoteRepoInstance_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassRefer... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[RemoteRepoInstanceType] operator[>] identifier[createRemoteRepoInstance] operator[SEP] ide... |
protected Callback<?> setupConditionDbNum(final ConditionFormatter formatter, final Token.Condition token) {
final Matcher matcher = PATTERN_CONDITION_DBNUM.matcher(token.getValue());
if(!matcher.matches()) {
throw new IllegalArgumentException("not match condition:" + token.getValue());... | class class_name[name] begin[{]
method[setupConditionDbNum, return_type[type[Callback]], modifier[protected], parameter[formatter, token]] begin[{]
local_variable[type[Matcher], matcher]
if[call[matcher.matches, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(a... | Keyword[protected] identifier[Callback] operator[<] operator[?] operator[>] identifier[setupConditionDbNum] operator[SEP] Keyword[final] identifier[ConditionFormatter] identifier[formatter] , Keyword[final] identifier[Token] operator[SEP] identifier[Condition] identifier[token] operator[SEP] {
Keyword[final] id... |
public static <T, U, R> ToDoubleBiFunction<T, U> compose(
final BiFunction<? super T, ? super U, ? extends R> biFunction,
final ToDoubleFunction<? super R> function)
{
return (x,y) -> function.applyAsDouble(biFunction.apply(x, y));
} | class class_name[name] begin[{]
method[compose, return_type[type[ToDoubleBiFunction]], modifier[public static], parameter[biFunction, function]] begin[{]
return[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[U] , identifier[R] operator[>] identifier[ToDoubleBiFunction] operator[<] identifier[T] , identifier[U] operator[>] identifier[compose] operator[SEP] Keyword[final] identifier[BiFunction] operator[<] operator[?] Keyword[super] identifier[T] , op... |
public Trie lookup(CharSequence s) {
Trie t = this;
for (int i = 0, n = s.length(); i < n; ++i) {
t = t.lookup(s.charAt(i));
if (null == t) { break; }
}
return t;
} | class class_name[name] begin[{]
method[lookup, return_type[type[Trie]], modifier[public], parameter[s]] begin[{]
local_variable[type[Trie], t]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=t, postfix_operato... | Keyword[public] identifier[Trie] identifier[lookup] operator[SEP] identifier[CharSequence] identifier[s] operator[SEP] {
identifier[Trie] identifier[t] operator[=] Keyword[this] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[n] operator[=] identifier[s] ope... |
public static String fetchNextSkiptoken(JSONObject jsonObject) throws Exception {
String skipToken = "";
// Parse the skip token out of the string.
skipToken = jsonObject.optJSONObject("responseMsg").optString("odata.nextLink");
if (!skipToken.equalsIgnoreCase("")) {
/... | class class_name[name] begin[{]
method[fetchNextSkiptoken, return_type[type[String]], modifier[public static], parameter[jsonObject]] begin[{]
local_variable[type[String], skipToken]
assign[member[.skipToken], call[jsonObject.optJSONObject, parameter[literal["responseMsg"]]]]
... | Keyword[public] Keyword[static] identifier[String] identifier[fetchNextSkiptoken] operator[SEP] identifier[JSONObject] identifier[jsonObject] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[skipToken] operator[=] literal[String] operator[SEP] identifier[skipToken] operator[=] ... |
public void marshall(Datum datum, ProtocolMarshaller protocolMarshaller) {
if (datum == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(datum.getVarCharValue(), VARCHARVALUE_BINDING);
} catch ... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[datum, protocolMarshaller]] begin[{]
if[binary_operation[member[.datum], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefi... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Datum] identifier[datum] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[datum] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identif... |
protected TaskAssignor<UUID, TaskId> createTaskAssignor(Map<TaskId, Set<TopicPartition>> partitionsForTask, Map<UUID, ClientState> states, Map<UUID, OverridableStreamsPartitionAssignor.ClientMetadata> clientsMetadata) {
return new StickyTaskAssignor<>(states, partitionsForTask.keySet());
} | class class_name[name] begin[{]
method[createTaskAssignor, return_type[type[TaskAssignor]], modifier[protected], parameter[partitionsForTask, states, clientsMetadata]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=states, postfix_operators=[], prefix_operators=[], qualifier=, selectors... | Keyword[protected] identifier[TaskAssignor] operator[<] identifier[UUID] , identifier[TaskId] operator[>] identifier[createTaskAssignor] operator[SEP] identifier[Map] operator[<] identifier[TaskId] , identifier[Set] operator[<] identifier[TopicPartition] operator[>] operator[>] identifier[partitionsForTask] , identi... |
private void resizeValueText() {
double maxWidth = size * 0.86466165;
double fontSize = size * 0.2556391;
valueText.setFont(Fonts.latoLight(fontSize));
if (valueText.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(valueText, maxWidth, fontSize); }
valueText.reloc... | class class_name[name] begin[{]
method[resizeValueText, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[double], maxWidth]
local_variable[type[double], fontSize]
call[valueText.setFont, parameter[call[Fonts.latoLight, parameter[member[.fontSize]]]... | Keyword[private] Keyword[void] identifier[resizeValueText] operator[SEP] operator[SEP] {
Keyword[double] identifier[maxWidth] operator[=] identifier[size] operator[*] literal[Float] operator[SEP] Keyword[double] identifier[fontSize] operator[=] identifier[size] operator[*] literal[Float] operator[SEP] identifier... |
public void setUserDomainTargeting(com.google.api.ads.admanager.axis.v201805.UserDomainTargeting userDomainTargeting) {
this.userDomainTargeting = userDomainTargeting;
} | class class_name[name] begin[{]
method[setUserDomainTargeting, return_type[void], modifier[public], parameter[userDomainTargeting]] begin[{]
assign[THIS[member[None.userDomainTargeting]], member[.userDomainTargeting]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setUserDomainTargeting] 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[v201805] operator[SEP] identifier[UserDo... |
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
@JsonProperty("updated_at")
public Date getUpdatedAt() {
return updatedAt;
} | class class_name[name] begin[{]
method[getUpdatedAt, return_type[type[Date]], modifier[public], parameter[]] begin[{]
return[member[.updatedAt]]
end[}]
END[}] | annotation[@] identifier[JsonFormat] operator[SEP] identifier[shape] operator[=] identifier[JsonFormat] operator[SEP] identifier[Shape] operator[SEP] identifier[STRING] , identifier[pattern] operator[=] literal[String] operator[SEP] annotation[@] identifier[JsonProperty] operator[SEP] literal[String] operator[SEP] Key... |
public void handleRequest(final HttpRequest request) {
if (debug) {
System.out.println("HttpServer::handleRequest " + request);
logger.debug("HttpServer::handleRequest" + request);
}
if (shouldContinueHttpRequest.test(request)) {
httpRequestConsumer.accept(req... | class class_name[name] begin[{]
method[handleRequest, return_type[void], modifier[public], parameter[request]] begin[{]
if[member[.debug]] begin[{]
call[System.out.println, parameter[binary_operation[literal["HttpServer::handleRequest "], +, member[.request]]]]
... | Keyword[public] Keyword[void] identifier[handleRequest] operator[SEP] Keyword[final] identifier[HttpRequest] identifier[request] operator[SEP] {
Keyword[if] operator[SEP] identifier[debug] operator[SEP] {
identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] ... |
@Override
protected void _transform(Dataframe newData) {
TrainingParameters trainingParameters = knowledgeBase.getTrainingParameters();
boolean scaleResponse = trainingParameters.getScaleResponse() && newData.getYDataType() == TypeInference.DataType.NUMERICAL;
double threshold = trainingPara... | class class_name[name] begin[{]
method[_transform, return_type[void], modifier[protected], parameter[newData]] begin[{]
local_variable[type[TrainingParameters], trainingParameters]
local_variable[type[boolean], scaleResponse]
local_variable[type[double], threshold]
local_variabl... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[_transform] operator[SEP] identifier[Dataframe] identifier[newData] operator[SEP] {
identifier[TrainingParameters] identifier[trainingParameters] operator[=] identifier[knowledgeBase] operator[SEP] identifier[getTrainingParameters] op... |
@Override
public Map<String, Object> first(final CaseFormat caseFormat) {
return findFirst(caseFormat).orElseThrow(() -> new DataNotFoundException("query result is empty."));
} | class class_name[name] begin[{]
method[first, return_type[type[Map]], modifier[public], parameter[caseFormat]] begin[{]
return[call[.findFirst, parameter[member[.caseFormat]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[first] operator[SEP] Keyword[final] identifier[CaseFormat] identifier[caseFormat] operator[SEP] {
Keyword[return] identifier[findFirst] operator[SEP] identifier[caseForma... |
private static List<UberData> extractProperties(Object obj) {
if (PRIMITIVE_TYPES.contains(obj.getClass())) {
return Collections.singletonList(new UberData().withValue(obj));
}
return PropertyUtils.findProperties(obj).entrySet().stream()
.map(entry -> new UberData().withName(entry.getKey()).withValue(ent... | class class_name[name] begin[{]
method[extractProperties, return_type[type[List]], modifier[private static], parameter[obj]] begin[{]
if[call[PRIMITIVE_TYPES.contains, parameter[call[obj.getClass, parameter[]]]]] begin[{]
return[call[Collections.singletonList, parameter[ClassCreator... | Keyword[private] Keyword[static] identifier[List] operator[<] identifier[UberData] operator[>] identifier[extractProperties] operator[SEP] identifier[Object] identifier[obj] operator[SEP] {
Keyword[if] operator[SEP] identifier[PRIMITIVE_TYPES] operator[SEP] identifier[contains] operator[SEP] identifier[obj] oper... |
public RegistryPoliciesInner updatePolicies(String resourceGroupName, String registryName, RegistryPoliciesInner registryPoliciesUpdateParameters) {
return updatePoliciesWithServiceResponseAsync(resourceGroupName, registryName, registryPoliciesUpdateParameters).toBlocking().last().body();
} | class class_name[name] begin[{]
method[updatePolicies, return_type[type[RegistryPoliciesInner]], modifier[public], parameter[resourceGroupName, registryName, registryPoliciesUpdateParameters]] begin[{]
return[call[.updatePoliciesWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.re... | Keyword[public] identifier[RegistryPoliciesInner] identifier[updatePolicies] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[registryName] , identifier[RegistryPoliciesInner] identifier[registryPoliciesUpdateParameters] operator[SEP] {
Keyword[return] identifier[u... |
public static String stripTopLevelTag(String strText, String strTag)
{
int iStart = MenuParser.getFirstNonWhitespace(strText);
int iEnd = MenuParser.getLastNonWhitespace(strText);
if ((iStart != -1) && (iEnd != -1))
{
String strStartTag = Utility.startTag(strTag);
... | class class_name[name] begin[{]
method[stripTopLevelTag, return_type[type[String]], modifier[public static], parameter[strText, strTag]] begin[{]
local_variable[type[int], iStart]
local_variable[type[int], iEnd]
if[binary_operation[binary_operation[member[.iStart], !=, literal[1... | Keyword[public] Keyword[static] identifier[String] identifier[stripTopLevelTag] operator[SEP] identifier[String] identifier[strText] , identifier[String] identifier[strTag] operator[SEP] {
Keyword[int] identifier[iStart] operator[=] identifier[MenuParser] operator[SEP] identifier[getFirstNonWhitespace] operator... |
static Set<String> getJavaDefaultTypes() {
if (javaDefaultTypes == null) {
javaDefaultTypes = Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(
"AbstractMethodError",
"Appendable",
"ArithmeticException",
"Ar... | class class_name[name] begin[{]
method[getJavaDefaultTypes, return_type[type[Set]], modifier[static], parameter[]] begin[{]
if[binary_operation[member[.javaDefaultTypes], ==, literal[null]]] begin[{]
assign[member[.javaDefaultTypes], call[Collections.unmodifiableSet, par... | Keyword[static] identifier[Set] operator[<] identifier[String] operator[>] identifier[getJavaDefaultTypes] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[javaDefaultTypes] operator[==] Other[null] operator[SEP] {
identifier[javaDefaultTypes] operator[=] identifier[Collections] oper... |
private DBIDs getNearestNeighbors(Relation<V> relation, SimilarityQuery<V> simQ, DBIDRef queryObject) {
Heap<DoubleDBIDPair> nearestNeighbors = new TiedTopBoundedHeap<>(knn);
for(DBIDIter iter = relation.iterDBIDs(); iter.valid(); iter.advance()) {
if(DBIDUtil.equal(iter, queryObject)) {
continue;... | class class_name[name] begin[{]
method[getNearestNeighbors, return_type[type[DBIDs]], modifier[private], parameter[relation, simQ, queryObject]] begin[{]
local_variable[type[Heap], nearestNeighbors]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(... | Keyword[private] identifier[DBIDs] identifier[getNearestNeighbors] operator[SEP] identifier[Relation] operator[<] identifier[V] operator[>] identifier[relation] , identifier[SimilarityQuery] operator[<] identifier[V] operator[>] identifier[simQ] , identifier[DBIDRef] identifier[queryObject] operator[SEP] {
ide... |
public static ResourceBundle getBundle(String name, Locale locale,
ClassLoader cl)
throws NullPointerException,
MissingResourceException {
if (cl == null) {
return Re... | class class_name[name] begin[{]
method[getBundle, return_type[type[ResourceBundle]], modifier[public static], parameter[name, locale, cl]] begin[{]
if[binary_operation[member[.cl], ==, literal[null]]] begin[{]
return[call[ResourceBundle.getBundle, parameter[member[.name], member[.lo... | Keyword[public] Keyword[static] identifier[ResourceBundle] identifier[getBundle] operator[SEP] identifier[String] identifier[name] , identifier[Locale] identifier[locale] , identifier[ClassLoader] identifier[cl] operator[SEP] Keyword[throws] identifier[NullPointerException] , identifier[MissingResourceException] {
... |
public UserInfoResponse getUserInfo(String accessToken) throws OpenIdException {
logger.debug("Enter OAuth2PlatformClient::getUserInfo");
try {
HttpRequestClient client = new HttpRequestClient(oauth2Config.getProxyConfig());
Request request = new Request.RequestBuilder(... | class class_name[name] begin[{]
method[getUserInfo, return_type[type[UserInfoResponse]], modifier[public], parameter[accessToken]] begin[{]
call[logger.debug, parameter[literal["Enter OAuth2PlatformClient::getUserInfo"]]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], decl... | Keyword[public] identifier[UserInfoResponse] identifier[getUserInfo] operator[SEP] identifier[String] identifier[accessToken] operator[SEP] Keyword[throws] identifier[OpenIdException] {
identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] {
... |
public ChannelFuture closeOutbound(final ChannelPromise promise) {
final ChannelHandlerContext ctx = this.ctx;
if (ctx.executor().inEventLoop()) {
closeOutbound0(promise);
} else {
ctx.executor().execute(new Runnable() {
@Override
public vo... | class class_name[name] begin[{]
method[closeOutbound, return_type[type[ChannelFuture]], modifier[public], parameter[promise]] begin[{]
local_variable[type[ChannelHandlerContext], ctx]
if[call[ctx.executor, parameter[]]] begin[{]
call[.closeOutbound0, parameter[me... | Keyword[public] identifier[ChannelFuture] identifier[closeOutbound] operator[SEP] Keyword[final] identifier[ChannelPromise] identifier[promise] operator[SEP] {
Keyword[final] identifier[ChannelHandlerContext] identifier[ctx] operator[=] Keyword[this] operator[SEP] identifier[ctx] operator[SEP] Keyword[if] operat... |
public Answer computeNearestNeighbors(int k, String queryId) throws Exception {
int internalIdQuery = getInternalId(queryId);
long start = System.nanoTime();
BoundedPriorityQueue<Result> nnQueue = computeNearestNeighborsInternal(k, internalIdQuery);
long indexSearchTime = System.nanoTime() - start;
r... | class class_name[name] begin[{]
method[computeNearestNeighbors, return_type[type[Answer]], modifier[public], parameter[k, queryId]] begin[{]
local_variable[type[int], internalIdQuery]
local_variable[type[long], start]
local_variable[type[BoundedPriorityQueue], nnQueue]
local_var... | Keyword[public] identifier[Answer] identifier[computeNearestNeighbors] operator[SEP] Keyword[int] identifier[k] , identifier[String] identifier[queryId] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[int] identifier[internalIdQuery] operator[=] identifier[getInternalId] operator[SEP] identifier[q... |
protected static void checkNormalWithCommaColon(String configKey, String configValue)
throws SofaRpcRuntimeException {
checkPattern(configKey, configValue, NORMAL_COMMA_COLON, "only allow a-zA-Z0-9 '-' '_' '.' ':' ','");
} | class class_name[name] begin[{]
method[checkNormalWithCommaColon, return_type[void], modifier[static protected], parameter[configKey, configValue]] begin[{]
call[.checkPattern, parameter[member[.configKey], member[.configValue], member[.NORMAL_COMMA_COLON], literal["only allow a-zA-Z0-9 '-' '_'... | Keyword[protected] Keyword[static] Keyword[void] identifier[checkNormalWithCommaColon] operator[SEP] identifier[String] identifier[configKey] , identifier[String] identifier[configValue] operator[SEP] Keyword[throws] identifier[SofaRpcRuntimeException] {
identifier[checkPattern] operator[SEP] identifier[configK... |
synchronized Lease addLease(String holder, String src, long timestamp) {
Lease lease = getLease(holder);
if (lease == null) {
lease = new Lease(holder);
leases.put(holder, lease);
sortedLeases.add(lease);
} else {
renewLease(lease);
}
sortedLeasesByPath.put(src, new LeaseOpen... | class class_name[name] begin[{]
method[addLease, return_type[type[Lease]], modifier[synchronized], parameter[holder, src, timestamp]] begin[{]
local_variable[type[Lease], lease]
if[binary_operation[member[.lease], ==, literal[null]]] begin[{]
assign[member[.lease... | Keyword[synchronized] identifier[Lease] identifier[addLease] operator[SEP] identifier[String] identifier[holder] , identifier[String] identifier[src] , Keyword[long] identifier[timestamp] operator[SEP] {
identifier[Lease] identifier[lease] operator[=] identifier[getLease] operator[SEP] identifier[holder] opera... |
public S3ClientRequest createGetRequest(final String aBucket, final String aKey,
final Handler<HttpClientResponse> aHandler) {
final HttpClientRequest httpRequest = myHTTPClient.get(PATH_SEP + aBucket + PATH_SEP + aKey, aHandler);
return new S3ClientRequest("GET", aBucket, aKey, httpRequest,... | class class_name[name] begin[{]
method[createGetRequest, return_type[type[S3ClientRequest]], modifier[public], parameter[aBucket, aKey, aHandler]] begin[{]
local_variable[type[HttpClientRequest], httpRequest]
return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qual... | Keyword[public] identifier[S3ClientRequest] identifier[createGetRequest] operator[SEP] Keyword[final] identifier[String] identifier[aBucket] , Keyword[final] identifier[String] identifier[aKey] , Keyword[final] identifier[Handler] operator[<] identifier[HttpClientResponse] operator[>] identifier[aHandler] operator[SE... |
public static boolean isDocumentedAnnotation(AnnotationTypeDoc annotationDoc) {
AnnotationDesc[] annotationDescList = annotationDoc.annotations();
for (int i = 0; i < annotationDescList.length; i++) {
if (annotationDescList[i].annotationType().qualifiedName().equals(
java.... | class class_name[name] begin[{]
method[isDocumentedAnnotation, return_type[type[boolean]], modifier[public static], parameter[annotationDoc]] begin[{]
local_variable[type[AnnotationDesc], annotationDescList]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberRe... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isDocumentedAnnotation] operator[SEP] identifier[AnnotationTypeDoc] identifier[annotationDoc] operator[SEP] {
identifier[AnnotationDesc] operator[SEP] operator[SEP] identifier[annotationDescList] operator[=] identifier[annotationDoc] operator[SEP] ident... |
public static long binomiall(int n, int k) {
checkNonNegative("n", n);
checkNonNegative("k", k);
N.checkArgument(k <= n, "k (%s) > n (%s)", k, n);
if (k > (n >> 1)) {
k = n - k;
}
switch (k) {
case 0:
return 1;
... | class class_name[name] begin[{]
method[binomiall, return_type[type[long]], modifier[public static], parameter[n, k]] begin[{]
call[.checkNonNegative, parameter[literal["n"], member[.n]]]
call[.checkNonNegative, parameter[literal["k"], member[.k]]]
call[N.checkArg... | Keyword[public] Keyword[static] Keyword[long] identifier[binomiall] operator[SEP] Keyword[int] identifier[n] , Keyword[int] identifier[k] operator[SEP] {
identifier[checkNonNegative] operator[SEP] literal[String] , identifier[n] operator[SEP] operator[SEP] identifier[checkNonNegative] operator[SEP] literal[Str... |
public void setEnctype(java.lang.String enctype) {
getStateHelper().put(PropertyKeys.enctype, enctype);
} | class class_name[name] begin[{]
method[setEnctype, return_type[void], modifier[public], parameter[enctype]] begin[{]
call[.getStateHelper, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setEnctype] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[enctype] operator[SEP] {
identifier[getStateHelper] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[PropertyKeys] opera... |
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case XtextPackage.GROUP__GUARD_CONDITION:
setGuardCondition((Condition)newValue);
return;
}
super.eSet(featureID, newValue);
} | class class_name[name] begin[{]
method[eSet, return_type[void], modifier[public], parameter[featureID, newValue]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=GROUP__GUARD_CONDITION, postfix_operators=[], prefix_operators=[], qualifier=XtextPackage, selectors=[])], s... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eSet] operator[SEP] Keyword[int] identifier[featureID] , identifier[Object] identifier[newValue] operator[SEP] {
Keyword[switch] operator[SEP] identi... |
public void signIn(String key, Collection<WebSocketConnection> connections) {
if (connections.isEmpty()) {
return;
}
Map<WebSocketConnection, WebSocketConnection> newMap = new HashMap<>();
for (WebSocketConnection conn : connections) {
newMap.put(conn, conn);
... | class class_name[name] begin[{]
method[signIn, return_type[void], modifier[public], parameter[key, connections]] begin[{]
if[call[connections.isEmpty, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[Map], newMap]
ForS... | Keyword[public] Keyword[void] identifier[signIn] operator[SEP] identifier[String] identifier[key] , identifier[Collection] operator[<] identifier[WebSocketConnection] operator[>] identifier[connections] operator[SEP] {
Keyword[if] operator[SEP] identifier[connections] operator[SEP] identifier[isEmpty] operator[... |
public ValueAssert valueByXPath(String xPath) {
isNotNull();
try {
return ValueAssert.create(actual, prefix2Uri, dbf, xpf, xPath);
} catch (Exception e) {
throwAssertionError(shouldNotHaveThrown(e));
}
return null; //fix compile issue
} | class class_name[name] begin[{]
method[valueByXPath, return_type[type[ValueAssert]], modifier[public], parameter[xPath]] begin[{]
call[.isNotNull, parameter[]]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=actual, postfix_operators=[],... | Keyword[public] identifier[ValueAssert] identifier[valueByXPath] operator[SEP] identifier[String] identifier[xPath] operator[SEP] {
identifier[isNotNull] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[return] identifier[ValueAssert] operator[SEP] identifier[create] operator[SEP] iden... |
@Override
public StopFleetResult stopFleet(StopFleetRequest request) {
request = beforeClientExecution(request);
return executeStopFleet(request);
} | class class_name[name] begin[{]
method[stopFleet, return_type[type[StopFleetResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeStopFleet, parameter[member[.request]]]]
end[}... | annotation[@] identifier[Override] Keyword[public] identifier[StopFleetResult] identifier[stopFleet] operator[SEP] identifier[StopFleetRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keywo... |
public static SandboxSignkey sandboxnewPayGetsignkey(String mch_id,String key){
MchBaseResult mchBaseResult = new MchBaseResult();
mchBaseResult.setMch_id(mch_id);
mchBaseResult.setNonce_str(UUID.randomUUID().toString().replace("-", ""));
Map<String,String> map = MapUtil.objectToMap(mchBaseResult);
String sig... | class class_name[name] begin[{]
method[sandboxnewPayGetsignkey, return_type[type[SandboxSignkey]], modifier[public static], parameter[mch_id, key]] begin[{]
local_variable[type[MchBaseResult], mchBaseResult]
call[mchBaseResult.setMch_id, parameter[member[.mch_id]]]
call[... | Keyword[public] Keyword[static] identifier[SandboxSignkey] identifier[sandboxnewPayGetsignkey] operator[SEP] identifier[String] identifier[mch_id] , identifier[String] identifier[key] operator[SEP] {
identifier[MchBaseResult] identifier[mchBaseResult] operator[=] Keyword[new] identifier[MchBaseResult] operator[... |
public Set<Map<String, List<String>>> searchForMultipleAttributeValues(
final String base, final String filter, final Object[] params,
final String[] attributeNames) {
// Escape the params acording to RFC2254
Object[] encodedParams = new String[params.length];
for (int i = 0; i < params.length; i++) {
e... | class class_name[name] begin[{]
method[searchForMultipleAttributeValues, return_type[type[Set]], modifier[public], parameter[base, filter, params, attributeNames]] begin[{]
local_variable[type[Object], encodedParams]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(e... | Keyword[public] identifier[Set] operator[<] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] operator[>] identifier[searchForMultipleAttributeValues] operator[SEP] Keyword[final] identifier[String] identifier[base] , Keyword[final] identifier[Str... |
public static Set<Field> getFields(Class<?> clazz, Filter<Field> filter) {
Set<Field> fields = new HashSet<Field>();
Class<?> cursor = clazz;
while(cursor != null && cursor != Object.class) {
// get all fields and apply filters
fields.addAll(Filter.apply(filter, cursor.getDeclaredFields()));
// up one... | class class_name[name] begin[{]
method[getFields, return_type[type[Set]], modifier[public static], parameter[clazz, filter]] begin[{]
local_variable[type[Set], fields]
local_variable[type[Class], cursor]
while[binary_operation[binary_operation[member[.cursor], !=, literal[null]]... | Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Field] operator[>] identifier[getFields] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[Filter] operator[<] identifier[Field] operator[>] identifier[filter] operator[SEP] {
identifier[Set] ... |
public String getDestinationName(Destination destination) {
try {
if (destination instanceof Queue) {
return ((Queue) destination).getQueueName();
} else if (destination instanceof Topic) {
return ((Topic) destination).getTopicName();
} else {
... | class class_name[name] begin[{]
method[getDestinationName, return_type[type[String]], modifier[public], parameter[destination]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=destination, postfix_operators=[], prefix_operators=[], qualifier=, selector... | Keyword[public] identifier[String] identifier[getDestinationName] operator[SEP] identifier[Destination] identifier[destination] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[destination] Keyword[instanceof] identifier[Queue] operator[SEP] {
Keyword[return] operator... |
public String getTableName(final int column) throws SQLException {
if (returnTableAlias) {
return getColumnInformation(column).getTable();
} else {
return getColumnInformation(column).getOriginalTable();
}
} | class class_name[name] begin[{]
method[getTableName, return_type[type[String]], modifier[public], parameter[column]] begin[{]
if[member[.returnTableAlias]] begin[{]
return[call[.getColumnInformation, parameter[member[.column]]]]
else begin[{]
return[call[.getColu... | Keyword[public] identifier[String] identifier[getTableName] operator[SEP] Keyword[final] Keyword[int] identifier[column] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[returnTableAlias] operator[SEP] {
Keyword[return] identifier[getColumnInformation] oper... |
static public String filter(String x, String okChars) {
boolean ok = true;
for (int pos = 0; pos < x.length(); pos++) {
char c = x.charAt(pos);
if (!(Character.isLetterOrDigit(c) || (0 <= okChars.indexOf(c)))) {
ok = false;
break;
}
}
if (ok) {
return x;... | class class_name[name] begin[{]
method[filter, return_type[type[String]], modifier[public static], parameter[x, okChars]] begin[{]
local_variable[type[boolean], ok]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(... | Keyword[static] Keyword[public] identifier[String] identifier[filter] operator[SEP] identifier[String] identifier[x] , identifier[String] identifier[okChars] operator[SEP] {
Keyword[boolean] identifier[ok] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[pos] operato... |
@SuppressWarnings("unchecked")
public T queue(Function... funcs) {
for (Element e : elements()) {
for (Function f : funcs) {
queue(e, DEFAULT_NAME, f);
}
}
return (T) this;
} | class class_name[name] begin[{]
method[queue, return_type[type[T]], modifier[public], parameter[funcs]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(m... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[T] identifier[queue] operator[SEP] identifier[Function] operator[...] identifier[funcs] operator[SEP] {
Keyword[for] operator[SEP] identifier[Element] identifier[e] operator[:] identifier[elements] ... |
private static int getInterval(long diffInMilliSecs, long hourInterval, int maxIntervals) {
long dayInterval = TimeUnit.HOURS.toDays(hourInterval);
int totalHours = DoubleMath.roundToInt((double) diffInMilliSecs / (60 * 60 * 1000), RoundingMode.CEILING);
int totalIntervals = DoubleMath.roundToInt((double) t... | class class_name[name] begin[{]
method[getInterval, return_type[type[int]], modifier[private static], parameter[diffInMilliSecs, hourInterval, maxIntervals]] begin[{]
local_variable[type[long], dayInterval]
local_variable[type[int], totalHours]
local_variable[type[int], totalIntervals]
... | Keyword[private] Keyword[static] Keyword[int] identifier[getInterval] operator[SEP] Keyword[long] identifier[diffInMilliSecs] , Keyword[long] identifier[hourInterval] , Keyword[int] identifier[maxIntervals] operator[SEP] {
Keyword[long] identifier[dayInterval] operator[=] identifier[TimeUnit] operator[SEP] ide... |
public EClass getFNMRG() {
if (fnmrgEClass == null) {
fnmrgEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(408);
}
return fnmrgEClass;
} | class class_name[name] begin[{]
method[getFNMRG, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.fnmrgEClass], ==, literal[null]]] begin[{]
assign[member[.fnmrgEClass], Cast(expression=MethodInvocation(arguments=[MemberRefer... | Keyword[public] identifier[EClass] identifier[getFNMRG] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[fnmrgEClass] operator[==] Other[null] operator[SEP] {
identifier[fnmrgEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identif... |
@Override
public void sendMail(final String theTo,
final String theFrom,
final String theSubject,
final String theBody) {
if (log.isDebugEnabled()) {
log.debug("Sending mail, TO: <" + theTo + ">, FROM: <" + theFrom +
... | class class_name[name] begin[{]
method[sendMail, return_type[void], modifier[public], parameter[theTo, theFrom, theSubject, theBody]] begin[{]
if[call[log.isDebugEnabled, parameter[]]] begin[{]
call[log.debug, parameter[binary_operation[binary_operation[binary_operation[... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[sendMail] operator[SEP] Keyword[final] identifier[String] identifier[theTo] , Keyword[final] identifier[String] identifier[theFrom] , Keyword[final] identifier[String] identifier[theSubject] , Keyword[final] identifier[String] identifier[the... |
public void initialise(XMLReader reader, AbstractGpxParserDefault parent) {
setReader(reader);
setParent(parent);
setContentBuffer(parent.getContentBuffer());
setWptPreparedStmt(parent.getWptPreparedStmt());
setElementNames(parent.getElementNames());
setCurrentPoint(paren... | class class_name[name] begin[{]
method[initialise, return_type[void], modifier[public], parameter[reader, parent]] begin[{]
call[.setReader, parameter[member[.reader]]]
call[.setParent, parameter[member[.parent]]]
call[.setContentBuffer, parameter[call[parent.get... | Keyword[public] Keyword[void] identifier[initialise] operator[SEP] identifier[XMLReader] identifier[reader] , identifier[AbstractGpxParserDefault] identifier[parent] operator[SEP] {
identifier[setReader] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[setParent] operator[SEP] identifier[... |
public static int hash(int hash, String s) {
if (s == null) {
return hash;
}
// similar to Arrays.hashCode
return s.indexOf('%') < 0 ? 31 * hash + s.hashCode() : normalizedHash(hash, s);
} | class class_name[name] begin[{]
method[hash, return_type[type[int]], modifier[public static], parameter[hash, s]] begin[{]
if[binary_operation[member[.s], ==, literal[null]]] begin[{]
return[member[.hash]]
else begin[{]
None
end[}]
return[TernaryExpression(co... | Keyword[public] Keyword[static] Keyword[int] identifier[hash] operator[SEP] Keyword[int] identifier[hash] , identifier[String] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[hash] operator[SEP]
}
... |
public static String getVersion() {
if (version != null)
return version;
try (InputStream stream = CDK.class.getResourceAsStream(RESOURCE_LOCATION)) {
if (stream == null) {
// load from JAR (as packaged with maven)
version = CDK.class.getPackage().... | class class_name[name] begin[{]
method[getVersion, return_type[type[String]], modifier[public static], parameter[]] begin[{]
if[binary_operation[member[.version], !=, literal[null]]] begin[{]
return[member[.version]]
else begin[{]
None
end[}]
TryStatement(block=[IfStatem... | Keyword[public] Keyword[static] identifier[String] identifier[getVersion] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[version] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[version] operator[SEP] Keyword[try] operator[SEP] identifier[InputStream] identifier[stream] oper... |
@Override
public List<DColumn> getColumns(String storeName, String rowKey, String startColumn, String endColumn, int count) {
DBConn dbConn = getDBConnection();
try {
List<ColumnOrSuperColumn> columns = dbConn.getSlice(
CassandraDefs.columnParent(storeName),
... | class class_name[name] begin[{]
method[getColumns, return_type[type[List]], modifier[public], parameter[storeName, rowKey, startColumn, endColumn, count]] begin[{]
local_variable[type[DBConn], dbConn]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(d... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[DColumn] operator[>] identifier[getColumns] operator[SEP] identifier[String] identifier[storeName] , identifier[String] identifier[rowKey] , identifier[String] identifier[startColumn] , identifier[String] identifier[endColumn]... |
protected Channel provideChannel() throws IOException {
if (channel == null || !channel.isOpen()) {
Connection connection = connectionFactory.newConnection();
channel = connection.createChannel();
}
return channel;
} | class class_name[name] begin[{]
method[provideChannel, return_type[type[Channel]], modifier[protected], parameter[]] begin[{]
if[binary_operation[binary_operation[member[.channel], ==, literal[null]], ||, call[channel.isOpen, parameter[]]]] begin[{]
local_variable[type[Connection], ... | Keyword[protected] identifier[Channel] identifier[provideChannel] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[channel] operator[==] Other[null] operator[||] operator[!] identifier[channel] operator[SEP] identifier[isOpen] operator[SEP] operator[SEP] ... |
public boolean isTrustedForSensitiveHeaders(String hostAddr) {
if (!useSensitivePrivateHeaders) {
// trustedSensitiveHeaderOrigin list is either unset (defaults to "none") or explicitly set to "none"
return false;
}
if (restrictSensitiveHeaderOrigin == null) {
... | class class_name[name] begin[{]
method[isTrustedForSensitiveHeaders, return_type[type[boolean]], modifier[public], parameter[hostAddr]] begin[{]
if[member[.useSensitivePrivateHeaders]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
if[binar... | Keyword[public] Keyword[boolean] identifier[isTrustedForSensitiveHeaders] operator[SEP] identifier[String] identifier[hostAddr] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[useSensitivePrivateHeaders] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Ke... |
public void setData(final String path, byte data[], int version,
StatCallback cb, Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath);
final String serverPath = prependChroot(clientPath);
RequestHeader h = new Requ... | class class_name[name] begin[{]
method[setData, return_type[void], modifier[public], parameter[path, data, version, cb, ctx]] begin[{]
call[.verbotenThreadCheck, parameter[]]
local_variable[type[String], clientPath]
call[PathUtils.validatePath, parameter[member[.clientPa... | Keyword[public] Keyword[void] identifier[setData] operator[SEP] Keyword[final] identifier[String] identifier[path] , Keyword[byte] identifier[data] operator[SEP] operator[SEP] , Keyword[int] identifier[version] , identifier[StatCallback] identifier[cb] , identifier[Object] identifier[ctx] operator[SEP] {
ide... |
public <T extends DataSource> FutureData<ManagedSource> create(String name, T source) {
return updateOrCreate(name, source, null);
} | class class_name[name] begin[{]
method[create, return_type[type[FutureData]], modifier[public], parameter[name, source]] begin[{]
return[call[.updateOrCreate, parameter[member[.name], member[.source], literal[null]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[DataSource] operator[>] identifier[FutureData] operator[<] identifier[ManagedSource] operator[>] identifier[create] operator[SEP] identifier[String] identifier[name] , identifier[T] identifier[source] operator[SEP] {
Keyword[return] identifie... |
@Override
public void eUnset(int featureID) {
switch (featureID) {
case AfplibPackage.BPG__PAGE_NAME:
setPageName(PAGE_NAME_EDEFAULT);
return;
case AfplibPackage.BPG__TRIPLETS:
getTriplets().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=BPG__PAGE_NAME, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[Stat... | 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[BPG__PAGE_NAME] oper... |
public Object take() throws InterruptedException {
Object old = null;
// D312598 - begin
while (true) {
synchronized (this) {
if (numberOfUsedSlots.get() > 0) {
old = extract();
numberOfUsedSlots.getAndDecrement();
... | class class_name[name] begin[{]
method[take, return_type[type[Object]], modifier[public], parameter[]] begin[{]
local_variable[type[Object], old]
while[literal[true]] begin[{]
SYNCHRONIZED[THIS[]] BEGIN[{]
if[binary_operation[call[... | Keyword[public] identifier[Object] identifier[take] operator[SEP] operator[SEP] Keyword[throws] identifier[InterruptedException] {
identifier[Object] identifier[old] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
Keyword[synchronized] operator[SEP] ... |
private boolean getBooleanProperty(String key, String defaultValue, StringBuilder errors) {
boolean booleanValue = false;
String stringValue = null;
boolean valueCorrect = false;
// Pull the key from the property map
Object objectValue = this.properties.get(key);
if (obj... | class class_name[name] begin[{]
method[getBooleanProperty, return_type[type[boolean]], modifier[private], parameter[key, defaultValue, errors]] begin[{]
local_variable[type[boolean], booleanValue]
local_variable[type[String], stringValue]
local_variable[type[boolean], valueCorrect]
... | Keyword[private] Keyword[boolean] identifier[getBooleanProperty] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[defaultValue] , identifier[StringBuilder] identifier[errors] operator[SEP] {
Keyword[boolean] identifier[booleanValue] operator[=] literal[boolean] operator[SEP] ide... |
private void validateColumnCompatibility(String theName, String otherName,
Table theTable, Table otherTable,
FailureMessage failureMessage) {
CatalogMap<Column> theColumns = theTable.getColumns();
int theColCount = theColumns.size();
CatalogMap<Column> otherColumn... | class class_name[name] begin[{]
method[validateColumnCompatibility, return_type[void], modifier[private], parameter[theName, otherName, theTable, otherTable, failureMessage]] begin[{]
local_variable[type[CatalogMap], theColumns]
local_variable[type[int], theColCount]
local_variable[type... | Keyword[private] Keyword[void] identifier[validateColumnCompatibility] operator[SEP] identifier[String] identifier[theName] , identifier[String] identifier[otherName] , identifier[Table] identifier[theTable] , identifier[Table] identifier[otherTable] , identifier[FailureMessage] identifier[failureMessage] operator[... |
private void setBufferSize(int size) {
this.amountToBuffer = size;
this.bbSize = (49152 < size) ? 32768 : 8192;
int numBuffers = (size / this.bbSize);
if (0 == size || 0 != (size % this.bbSize)) {
numBuffers++;
}
this._output = new WsByteBuffer[numBuffers];
... | class class_name[name] begin[{]
method[setBufferSize, return_type[void], modifier[private], parameter[size]] begin[{]
assign[THIS[member[None.amountToBuffer]], member[.size]]
assign[THIS[member[None.bbSize]], TernaryExpression(condition=BinaryOperation(operandl=Literal(postfix_o... | Keyword[private] Keyword[void] identifier[setBufferSize] operator[SEP] Keyword[int] identifier[size] operator[SEP] {
Keyword[this] operator[SEP] identifier[amountToBuffer] operator[=] identifier[size] operator[SEP] Keyword[this] operator[SEP] identifier[bbSize] operator[=] operator[SEP] Other[49152] operator[<] ... |
public static <T> TypeChecker<Collection<? extends T>> tCollection(Class<? extends T> elementType) {
return tCollection(tSimple(elementType));
} | class class_name[name] begin[{]
method[tCollection, return_type[type[TypeChecker]], modifier[public static], parameter[elementType]] begin[{]
return[call[.tCollection, parameter[call[.tSimple, parameter[member[.elementType]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[TypeChecker] operator[<] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] operator[>] identifier[tCollection] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[T] o... |
public void rescheduleJob(final JobInstance toBeRescheduled) {
final JobIdentifier jobIdentifier = toBeRescheduled.getIdentifier();
synchronized (mutexForStageInstance(jobIdentifier)) {
synchronized (mutexForJob(jobIdentifier)) {
transactionTemplate.execute(new TransactionCal... | class class_name[name] begin[{]
method[rescheduleJob, return_type[void], modifier[public], parameter[toBeRescheduled]] begin[{]
local_variable[type[JobIdentifier], jobIdentifier]
SYNCHRONIZED[call[.mutexForStageInstance, parameter[member[.jobIdentifier]]]] BEGIN[{]
... | Keyword[public] Keyword[void] identifier[rescheduleJob] operator[SEP] Keyword[final] identifier[JobInstance] identifier[toBeRescheduled] operator[SEP] {
Keyword[final] identifier[JobIdentifier] identifier[jobIdentifier] operator[=] identifier[toBeRescheduled] operator[SEP] identifier[getIdentifier] operator[SEP]... |
static public BigDecimal decodeDecimal(final ByteBuffer bb) {
final int scale = bb.get();
final int precisionBytes = bb.get();
final byte[] bytes = new byte[precisionBytes];
bb.get(bytes);
return new BigDecimal(new BigInteger(bytes), scale);
} | class class_name[name] begin[{]
method[decodeDecimal, return_type[type[BigDecimal]], modifier[public static], parameter[bb]] begin[{]
local_variable[type[int], scale]
local_variable[type[int], precisionBytes]
local_variable[type[byte], bytes]
call[bb.get, parameter[membe... | Keyword[static] Keyword[public] identifier[BigDecimal] identifier[decodeDecimal] operator[SEP] Keyword[final] identifier[ByteBuffer] identifier[bb] operator[SEP] {
Keyword[final] Keyword[int] identifier[scale] operator[=] identifier[bb] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyw... |
public float getTexCoordU(int vertex, int coords) {
if (!hasTexCoords(coords)) {
throw new IllegalStateException(
"mesh has no texture coordinate set " + coords);
}
checkVertexIndexBounds(vertex);
/* bound checks for coords are done by java for us... | class class_name[name] begin[{]
method[getTexCoordU, return_type[type[float]], modifier[public], parameter[vertex, coords]] begin[{]
if[call[.hasTexCoords, parameter[member[.coords]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfi... | Keyword[public] Keyword[float] identifier[getTexCoordU] operator[SEP] Keyword[int] identifier[vertex] , Keyword[int] identifier[coords] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[hasTexCoords] operator[SEP] identifier[coords] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[... |
@Override
public List<NugetPackageReference> parse(InputStream stream) throws MSBuildProjectParseException {
try {
final DocumentBuilder db = XmlUtils.buildSecureDocumentBuilder();
final Document d = db.parse(stream);
final XPath xpath = XPathFactory.newInstance().newXPa... | class class_name[name] begin[{]
method[parse, return_type[type[List]], modifier[public], parameter[stream]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=buildSecureDocumentBuilder, ... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[NugetPackageReference] operator[>] identifier[parse] operator[SEP] identifier[InputStream] identifier[stream] operator[SEP] Keyword[throws] identifier[MSBuildProjectParseException] {
Keyword[try] {
Keyword[final... |
private void readLSD() {
// Logical screen size.
header.width = readShort();
header.height = readShort();
// Packed fields
int packed = read();
// 1 : global color table flag.
header.gctFlag = (packed & 0x80) != 0;
// 2-4 : color resolution.
// 5 :... | class class_name[name] begin[{]
method[readLSD, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[header.width], call[.readShort, parameter[]]]
assign[member[header.height], call[.readShort, parameter[]]]
local_variable[type[int], packed]
... | Keyword[private] Keyword[void] identifier[readLSD] operator[SEP] operator[SEP] {
identifier[header] operator[SEP] identifier[width] operator[=] identifier[readShort] operator[SEP] operator[SEP] operator[SEP] identifier[header] operator[SEP] identifier[height] operator[=] identifier[readShort] operator[SEP] opera... |
protected void writeQueryPrologue(final BsonOutput bsonOutput) {
bsonOutput.writeInt32(getCursorFlag());
bsonOutput.writeCString(getCollectionName());
bsonOutput.writeInt32(skip);
bsonOutput.writeInt32(numberToReturn);
} | class class_name[name] begin[{]
method[writeQueryPrologue, return_type[void], modifier[protected], parameter[bsonOutput]] begin[{]
call[bsonOutput.writeInt32, parameter[call[.getCursorFlag, parameter[]]]]
call[bsonOutput.writeCString, parameter[call[.getCollectionName, parameter... | Keyword[protected] Keyword[void] identifier[writeQueryPrologue] operator[SEP] Keyword[final] identifier[BsonOutput] identifier[bsonOutput] operator[SEP] {
identifier[bsonOutput] operator[SEP] identifier[writeInt32] operator[SEP] identifier[getCursorFlag] operator[SEP] operator[SEP] operator[SEP] operator[SEP] id... |
public static void main(String[] args) throws Exception {
final ParameterTool params = ParameterTool.fromArgs(args);
// set up the execution environment
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
// make parameters available in the web interface
env.getConfig().setGlob... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
local_variable[type[ParameterTool], params]
local_variable[type[ExecutionEnvironment], env]
call[env.getConfig, parameter[]]
local_variable[type[DataSet], t... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[final] identifier[ParameterTool] identifier[params] operator[=] identifier[ParameterTool] operator[SEP] identi... |
public static TaskMetrics get(final TaskState taskState) {
return (TaskMetrics) GOBBLIN_METRICS_REGISTRY.getOrDefault(name(taskState), new Callable<GobblinMetrics>() {
@Override
public GobblinMetrics call() throws Exception {
return new TaskMetrics(taskState);
}
});
} | class class_name[name] begin[{]
method[get, return_type[type[TaskMetrics]], modifier[public static], parameter[taskState]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=taskState, postfix_operators=[], prefix_operators=[], qualifier=, sel... | Keyword[public] Keyword[static] identifier[TaskMetrics] identifier[get] operator[SEP] Keyword[final] identifier[TaskState] identifier[taskState] operator[SEP] {
Keyword[return] operator[SEP] identifier[TaskMetrics] operator[SEP] identifier[GOBBLIN_METRICS_REGISTRY] operator[SEP] identifier[getOrDefault] operator... |
public void addDependency(org.sonatype.aether.graph.Dependency aetherDep) {
Artifact artifact = aetherDep.getArtifact();
Dependency dependency = new Dependency();
dependency.setGroupId( artifact.getGroupId() );
dependency.setArtifactId( artifact.getArtifactId() );
dependency.set... | class class_name[name] begin[{]
method[addDependency, return_type[void], modifier[public], parameter[aetherDep]] begin[{]
local_variable[type[Artifact], artifact]
local_variable[type[Dependency], dependency]
call[dependency.setGroupId, parameter[call[artifact.getGroupId, paramet... | Keyword[public] Keyword[void] identifier[addDependency] operator[SEP] identifier[org] operator[SEP] identifier[sonatype] operator[SEP] identifier[aether] operator[SEP] identifier[graph] operator[SEP] identifier[Dependency] identifier[aetherDep] operator[SEP] {
identifier[Artifact] identifier[artifact] operator[=... |
public final void putChar(Object parent, long offset, char value) {
THE_UNSAFE.putChar(parent, offset, value);
} | class class_name[name] begin[{]
method[putChar, return_type[void], modifier[final public], parameter[parent, offset, value]] begin[{]
call[THE_UNSAFE.putChar, parameter[member[.parent], member[.offset], member[.value]]]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[void] identifier[putChar] operator[SEP] identifier[Object] identifier[parent] , Keyword[long] identifier[offset] , Keyword[char] identifier[value] operator[SEP] {
identifier[THE_UNSAFE] operator[SEP] identifier[putChar] operator[SEP] identifier[parent] , identifier[offse... |
@SuppressWarnings("unchecked")
public static <D, J> D toData(Class<? extends PreferenceTypeAdapter<J, D>> clazz, J javaValue) {
PreferenceTypeAdapter<J, D> adapter = cache.get(clazz);
if (adapter == null) {
try {
lock.lock();
adapter = clazz.newInstance();
cache.put(clazz, adapter);
} catch (Thr... | class class_name[name] begin[{]
method[toData, return_type[type[D]], modifier[public static], parameter[clazz, javaValue]] begin[{]
local_variable[type[PreferenceTypeAdapter], adapter]
if[binary_operation[member[.adapter], ==, literal[null]]] begin[{]
TryStatement(block=[Sta... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[D] , identifier[J] operator[>] identifier[D] identifier[toData] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[PreferenceTypeAdapter] operat... |
public void setDeviceId(String deviceId) throws CouldNotPersistException {
this.deviceId = deviceId;
if (deviceId != null && path != null) {
persistDeviceId();
}
} | class class_name[name] begin[{]
method[setDeviceId, return_type[void], modifier[public], parameter[deviceId]] begin[{]
assign[THIS[member[None.deviceId]], member[.deviceId]]
if[binary_operation[binary_operation[member[.deviceId], !=, literal[null]], &&, binary_operation[member[.... | Keyword[public] Keyword[void] identifier[setDeviceId] operator[SEP] identifier[String] identifier[deviceId] operator[SEP] Keyword[throws] identifier[CouldNotPersistException] {
Keyword[this] operator[SEP] identifier[deviceId] operator[=] identifier[deviceId] operator[SEP] Keyword[if] operator[SEP] identifier[dev... |
private String generateRevisionSQLStatement(boolean tableExists,
Map<String, Set<Integer>> dataSourceToUse)
{
StringBuffer output = new StringBuffer();
// Statement creates table for Template Id -> Revision Id
output.append("CREATE TABLE IF NOT EXISTS "
+ GeneratorConstants.TABLE_TPLID_REVISIONID
+ "... | class class_name[name] begin[{]
method[generateRevisionSQLStatement, return_type[type[String]], modifier[private], parameter[tableExists, dataSourceToUse]] begin[{]
local_variable[type[StringBuffer], output]
call[output.append, parameter[binary_operation[binary_operation[binary_operatio... | Keyword[private] identifier[String] identifier[generateRevisionSQLStatement] operator[SEP] Keyword[boolean] identifier[tableExists] , identifier[Map] operator[<] identifier[String] , identifier[Set] operator[<] identifier[Integer] operator[>] operator[>] identifier[dataSourceToUse] operator[SEP] {
identifier[S... |
public OvhSoftware serviceName_distribution_software_softwareId_GET(String serviceName, Long softwareId) throws IOException {
String qPath = "/vps/{serviceName}/distribution/software/{softwareId}";
StringBuilder sb = path(qPath, serviceName, softwareId);
String resp = exec(qPath, "GET", sb.toString(), null);
re... | class class_name[name] begin[{]
method[serviceName_distribution_software_softwareId_GET, return_type[type[OvhSoftware]], modifier[public], parameter[serviceName, softwareId]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String]... | Keyword[public] identifier[OvhSoftware] identifier[serviceName_distribution_software_softwareId_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[Long] identifier[softwareId] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal... |
public static ObjectInputStream newObjectInputStream(InputStream inputStream, final ClassLoader classLoader) throws IOException {
return new ObjectInputStream(inputStream) {
protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
return Cl... | class class_name[name] begin[{]
method[newObjectInputStream, return_type[type[ObjectInputStream]], modifier[public static], parameter[inputStream, classLoader]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=inputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[... | Keyword[public] Keyword[static] identifier[ObjectInputStream] identifier[newObjectInputStream] operator[SEP] identifier[InputStream] identifier[inputStream] , Keyword[final] identifier[ClassLoader] identifier[classLoader] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] Keyword[new] ident... |
public void setPortMappings(java.util.Collection<PortMapping> portMappings) {
if (portMappings == null) {
this.portMappings = null;
return;
}
this.portMappings = new com.amazonaws.internal.SdkInternalList<PortMapping>(portMappings);
} | class class_name[name] begin[{]
method[setPortMappings, return_type[void], modifier[public], parameter[portMappings]] begin[{]
if[binary_operation[member[.portMappings], ==, literal[null]]] begin[{]
assign[THIS[member[None.portMappings]], literal[null]]
retur... | Keyword[public] Keyword[void] identifier[setPortMappings] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[PortMapping] operator[>] identifier[portMappings] operator[SEP] {
Keyword[if] operator[SEP] identifier[portMappings] operator[==] Oth... |
public T decode(ProtoHead head, InputStream in, Charset charset) throws IOException {
this.head = head;
return decodeContent(in, charset);
} | class class_name[name] begin[{]
method[decode, return_type[type[T]], modifier[public], parameter[head, in, charset]] begin[{]
assign[THIS[member[None.head]], member[.head]]
return[call[.decodeContent, parameter[member[.in], member[.charset]]]]
end[}]
END[}] | Keyword[public] identifier[T] identifier[decode] operator[SEP] identifier[ProtoHead] identifier[head] , identifier[InputStream] identifier[in] , identifier[Charset] identifier[charset] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[this] operator[SEP] identifier[head] operator[=] identifier[he... |
public ContextData contextData(Object[] swaggerMethodArguments) {
Object firstArg = swaggerMethodArguments != null && swaggerMethodArguments.length > 0 ? swaggerMethodArguments[0] : null;
if (firstArg instanceof ContextData) {
return (ContextData) firstArg;
} else {
retur... | class class_name[name] begin[{]
method[contextData, return_type[type[ContextData]], modifier[public], parameter[swaggerMethodArguments]] begin[{]
local_variable[type[Object], firstArg]
if[binary_operation[member[.firstArg], instanceof, type[ContextData]]] begin[{]
return[Cas... | Keyword[public] identifier[ContextData] identifier[contextData] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[swaggerMethodArguments] operator[SEP] {
identifier[Object] identifier[firstArg] operator[=] identifier[swaggerMethodArguments] operator[!=] Other[null] operator[&&] identifier[s... |
@Override
public XmlResponse header(String name, String... values) {
assertArgumentNotNull("name", name);
assertArgumentNotNull("values", values);
assertDefinedState("header");
final Map<String, String[]> headerMap = prepareHeaderMap();
if (headerMap.containsKey(name)) {
... | class class_name[name] begin[{]
method[header, return_type[type[XmlResponse]], modifier[public], parameter[name, values]] begin[{]
call[.assertArgumentNotNull, parameter[literal["name"], member[.name]]]
call[.assertArgumentNotNull, parameter[literal["values"], member[.values]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[XmlResponse] identifier[header] operator[SEP] identifier[String] identifier[name] , identifier[String] operator[...] identifier[values] operator[SEP] {
identifier[assertArgumentNotNull] operator[SEP] literal[String] , identifier[name] operator[SEP] ... |
@Override
synchronized void finalizeJob(JobInProgress job) {
// Let the SimulatorEngine know that the job is done
JobStatus cloneStatus = (JobStatus)job.getStatus().clone();
engine.markCompletedJob(cloneStatus,
SimulatorJobTracker.getClock().getTime());
JobID jobId = job... | class class_name[name] begin[{]
method[finalizeJob, return_type[void], modifier[synchronized], parameter[job]] begin[{]
local_variable[type[JobStatus], cloneStatus]
call[engine.markCompletedJob, parameter[member[.cloneStatus], call[SimulatorJobTracker.getClock, parameter[]]]]
lo... | annotation[@] identifier[Override] Keyword[synchronized] Keyword[void] identifier[finalizeJob] operator[SEP] identifier[JobInProgress] identifier[job] operator[SEP] {
identifier[JobStatus] identifier[cloneStatus] operator[=] operator[SEP] identifier[JobStatus] operator[SEP] identifier[job] operator[SEP] identifi... |
private MethodCall<Object> transformBeforeMethodCall(MethodCall<Object> methodCall) {
if (argTransformer == null || argTransformer == ServiceConstants.NO_OP_ARG_TRANSFORM) {
return methodCall;
}
Object arg = this.argTransformer.transform(methodCall);
return MethodCallBuilder.... | class class_name[name] begin[{]
method[transformBeforeMethodCall, return_type[type[MethodCall]], modifier[private], parameter[methodCall]] begin[{]
if[binary_operation[binary_operation[member[.argTransformer], ==, literal[null]], ||, binary_operation[member[.argTransformer], ==, member[ServiceC... | Keyword[private] identifier[MethodCall] operator[<] identifier[Object] operator[>] identifier[transformBeforeMethodCall] operator[SEP] identifier[MethodCall] operator[<] identifier[Object] operator[>] identifier[methodCall] operator[SEP] {
Keyword[if] operator[SEP] identifier[argTransformer] operator[==] Other[n... |
public void setTextureSize(int width, int height) {
setPreferredSize(new Dimension(width, height));
setSize(new Dimension(width, height));
this.width = width;
this.height = height;
} | class class_name[name] begin[{]
method[setTextureSize, return_type[void], modifier[public], parameter[width, height]] begin[{]
call[.setPreferredSize, parameter[ClassCreator(arguments=[MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberRefe... | Keyword[public] Keyword[void] identifier[setTextureSize] operator[SEP] Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] {
identifier[setPreferredSize] operator[SEP] Keyword[new] identifier[Dimension] operator[SEP] identifier[width] , identifier[height] operator[SEP] operator[SEP] ... |
private int doAfterRun(Map<String, Command> references) throws Exception
{
if (status == Command.COMMAND_EXECUTED)
{
// System.out.println("doAfterRun(): command " + getResultType() + "
// processed...");
Vector<Command> toBeRemoved = new Vector<Command>();
try
{
Statement[] statements = null;
... | class class_name[name] begin[{]
method[doAfterRun, return_type[type[int]], modifier[private], parameter[references]] begin[{]
if[binary_operation[member[.status], ==, member[Command.COMMAND_EXECUTED]]] begin[{]
local_variable[type[Vector], toBeRemoved]
TryStatement(block... | Keyword[private] Keyword[int] identifier[doAfterRun] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Command] operator[>] identifier[references] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[status] operator[==] identifier[Command] operator[... |
@SuppressWarnings("unchecked")
public Set<Reference> getReferences(Specification specification, String identifier) throws GreenPepperServerException
{
Vector params = CollectionUtil.toVector(specification.marshallize());
log.debug("Retrieving Specification " + specification.getName() + " Refere... | class class_name[name] begin[{]
method[getReferences, return_type[type[Set]], modifier[public], parameter[specification, identifier]] begin[{]
local_variable[type[Vector], params]
call[log.debug, parameter[binary_operation[binary_operation[literal["Retrieving Specification "], +, call[s... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Set] operator[<] identifier[Reference] operator[>] identifier[getReferences] operator[SEP] identifier[Specification] identifier[specification] , identifier[String] identifier[identifier] operator[SEP] Keyw... |
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
boolean isProviderMethod = matchesJoynrProviderMethod(method);
Method delegateToMethod = getMethodFromInterfaces(bean.getBeanClass(), method, isProviderMethod);
Object delegate = createDelegateForMe... | class class_name[name] begin[{]
method[invoke, return_type[type[Object]], modifier[public], parameter[proxy, method, args]] begin[{]
local_variable[type[boolean], isProviderMethod]
local_variable[type[Method], delegateToMethod]
local_variable[type[Object], delegate]
local_variab... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[invoke] operator[SEP] identifier[Object] identifier[proxy] , identifier[Method] identifier[method] , identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Throwable] {
Keyword[boo... |
public byte[] write( Geometry geom ) {
try {
byteArrayOS.reset();
writeSpatialiteGeometry(geom, byteArrayOutStream);
} catch (IOException ex) {
throw new RuntimeException("Unexpected IO exception: " + ex.getMessage());
}
return byteArrayOS.toByteArray(... | class class_name[name] begin[{]
method[write, return_type[type[byte]], modifier[public], parameter[geom]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=reset, postfix_operators=[], prefix_operators=[], qualifier=byteArrayOS, selectors=[], type_argumen... | Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[write] operator[SEP] identifier[Geometry] identifier[geom] operator[SEP] {
Keyword[try] {
identifier[byteArrayOS] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[writeSpatialiteGeometry] operator[... |
public static void addExtraHeaderToBundleManifest(File baseDir, String header, String value) throws IOException {
Properties props = new Properties();
File extra = new File(baseDir, EXTRA_HEADERS_FILE);
extra.getParentFile().mkdirs();
// If the file exist it loads it, if not nothing happ... | class class_name[name] begin[{]
method[addExtraHeaderToBundleManifest, return_type[void], modifier[public static], parameter[baseDir, header, value]] begin[{]
local_variable[type[Properties], props]
local_variable[type[File], extra]
call[extra.getParentFile, parameter[]]
... | Keyword[public] Keyword[static] Keyword[void] identifier[addExtraHeaderToBundleManifest] operator[SEP] identifier[File] identifier[baseDir] , identifier[String] identifier[header] , identifier[String] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Properties] identifier[pr... |
@JsonIgnore
protected static IPersonAttributeDao getAttributeRepository() {
val repositories = ApplicationContextProvider.getAttributeRepository();
return repositories.orElse(null);
} | class class_name[name] begin[{]
method[getAttributeRepository, return_type[type[IPersonAttributeDao]], modifier[static protected], parameter[]] begin[{]
local_variable[type[val], repositories]
return[call[repositories.orElse, parameter[literal[null]]]]
end[}]
END[}] | annotation[@] identifier[JsonIgnore] Keyword[protected] Keyword[static] identifier[IPersonAttributeDao] identifier[getAttributeRepository] operator[SEP] operator[SEP] {
identifier[val] identifier[repositories] operator[=] identifier[ApplicationContextProvider] operator[SEP] identifier[getAttributeRepository] ope... |
public Boolean getBooleanProperty(String key, Boolean defaultValue) {
String val = getProperty(key, defaultValue.toString());
Boolean booleanVal = Boolean.parseBoolean(val);
return booleanVal;
} | class class_name[name] begin[{]
method[getBooleanProperty, return_type[type[Boolean]], modifier[public], parameter[key, defaultValue]] begin[{]
local_variable[type[String], val]
local_variable[type[Boolean], booleanVal]
return[member[.booleanVal]]
end[}]
END[}] | Keyword[public] identifier[Boolean] identifier[getBooleanProperty] operator[SEP] identifier[String] identifier[key] , identifier[Boolean] identifier[defaultValue] operator[SEP] {
identifier[String] identifier[val] operator[=] identifier[getProperty] operator[SEP] identifier[key] , identifier[defaultValue] oper... |
public static boolean pauseCurrentThread(long iTime) {
try {
if (iTime <= 0)
iTime = Long.MAX_VALUE;
Thread.sleep(iTime);
return true;
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
return false;
}
} | class class_name[name] begin[{]
method[pauseCurrentThread, return_type[type[boolean]], modifier[public static], parameter[iTime]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=iTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]... | Keyword[public] Keyword[static] Keyword[boolean] identifier[pauseCurrentThread] operator[SEP] Keyword[long] identifier[iTime] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[iTime] operator[<=] Other[0] operator[SEP] identifier[iTime] operator[=] identifier[Long] operator[SEP] iden... |
ReservoirItemsSketch<T> downsampledCopy(final int maxK) {
final ReservoirItemsSketch<T> ris = new ReservoirItemsSketch<>(maxK, rf_);
for (final T item : getSamples()) {
// Pretending old implicit weights are all 1. Not true in general, but they're all
// equal so update should work properly as long ... | class class_name[name] begin[{]
method[downsampledCopy, return_type[type[ReservoirItemsSketch]], modifier[default], parameter[maxK]] begin[{]
local_variable[type[ReservoirItemsSketch], ris]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(... | identifier[ReservoirItemsSketch] operator[<] identifier[T] operator[>] identifier[downsampledCopy] operator[SEP] Keyword[final] Keyword[int] identifier[maxK] operator[SEP] {
Keyword[final] identifier[ReservoirItemsSketch] operator[<] identifier[T] operator[>] identifier[ris] operator[=] Keyword[new] identifier[R... |
@Override
public Future<T> filter(Predicate<T> predicate) {
Validator.requireNonNull(predicate, "Null is not a valid predicate");
// Create new future expected to hold the value of the mapped type
FutureImpl<T> future = new FutureImpl<>();
// install success handler that will filter ... | class class_name[name] begin[{]
method[filter, return_type[type[Future]], modifier[public], parameter[predicate]] begin[{]
call[Validator.requireNonNull, parameter[member[.predicate], literal["Null is not a valid predicate"]]]
local_variable[type[FutureImpl], future]
cal... | annotation[@] identifier[Override] Keyword[public] identifier[Future] operator[<] identifier[T] operator[>] identifier[filter] operator[SEP] identifier[Predicate] operator[<] identifier[T] operator[>] identifier[predicate] operator[SEP] {
identifier[Validator] operator[SEP] identifier[requireNonNull] operator[SE... |
final PublishResponse publish(String topic, List<PubsubMessage> messages) {
PublishRequest request =
PublishRequest.newBuilder().setTopic(topic).addAllMessages(messages).build();
return publish(request);
} | class class_name[name] begin[{]
method[publish, return_type[type[PublishResponse]], modifier[final], parameter[topic, messages]] begin[{]
local_variable[type[PublishRequest], request]
return[call[.publish, parameter[member[.request]]]]
end[}]
END[}] | Keyword[final] identifier[PublishResponse] identifier[publish] operator[SEP] identifier[String] identifier[topic] , identifier[List] operator[<] identifier[PubsubMessage] operator[>] identifier[messages] operator[SEP] {
identifier[PublishRequest] identifier[request] operator[=] identifier[PublishRequest] operat... |
void updatePutRegistration(boolean advertise)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "updatePutRegistration", new Boolean(advertise));
destinationHandler.updatePostRegistration(advertise);
if (TraceComponent.isAnyTracingEnabled() && t... | class class_name[name] begin[{]
method[updatePutRegistration, return_type[void], modifier[default], parameter[advertise]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, paramet... | Keyword[void] identifier[updatePutRegistration] operator[SEP] Keyword[boolean] identifier[advertise] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] ... |
protected void addTagsAsChildren( Git git,
CallSpecification spec,
DocumentWriter writer ) throws GitAPIException {
// Generate the child references to the branches, which will be sorted by name (by the command).
ListTagCommand ... | class class_name[name] begin[{]
method[addTagsAsChildren, return_type[void], modifier[protected], parameter[git, spec, writer]] begin[{]
local_variable[type[ListTagCommand], command]
local_variable[type[List], tags]
call[Collections.sort, parameter[member[.tags], member[.REVERSE... | Keyword[protected] Keyword[void] identifier[addTagsAsChildren] operator[SEP] identifier[Git] identifier[git] , identifier[CallSpecification] identifier[spec] , identifier[DocumentWriter] identifier[writer] operator[SEP] Keyword[throws] identifier[GitAPIException] {
identifier[ListTagCommand] identifier[command... |
private void addUniqueConstraintForTableBasedSequence(Statements statements, IdSourceKeyMetadata generatorKeyMetadata) {
Statement statement = createUniqueConstraintStatement( generatorKeyMetadata.getKeyColumnName(), generatorKeyMetadata.getName() );
statements.addStatement( statement );
} | class class_name[name] begin[{]
method[addUniqueConstraintForTableBasedSequence, return_type[void], modifier[private], parameter[statements, generatorKeyMetadata]] begin[{]
local_variable[type[Statement], statement]
call[statements.addStatement, parameter[member[.statement]]]
end[}]... | Keyword[private] Keyword[void] identifier[addUniqueConstraintForTableBasedSequence] operator[SEP] identifier[Statements] identifier[statements] , identifier[IdSourceKeyMetadata] identifier[generatorKeyMetadata] operator[SEP] {
identifier[Statement] identifier[statement] operator[=] identifier[createUniqueConstr... |
public Observable<ServiceResponse<ContainerGroupInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscription... | class class_name[name] begin[{]
method[createOrUpdateWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, containerGroupName, containerGroup]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, lit... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[ContainerGroupInner] operator[>] operator[>] identifier[createOrUpdateWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[containerGroupName] , ide... |
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
} | class class_name[name] begin[{]
method[getSerializer, return_type[type[org]], modifier[public static], parameter[mechType, _javaType, _xmlType]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_javaType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReferenc... | Keyword[public] Keyword[static] identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[axis] operator[SEP] identifier[encoding] operator[SEP] identifier[Serializer] identifier[getSerializer] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[mech... |
Stream<String> writeFunctionCounter(FunctionCounter counter) {
double count = counter.count();
if (Double.isFinite(count)) {
return Stream.of(event(counter.getId(), new Attribute("throughput", count)));
}
return Stream.empty();
} | class class_name[name] begin[{]
method[writeFunctionCounter, return_type[type[Stream]], modifier[default], parameter[counter]] begin[{]
local_variable[type[double], count]
if[call[Double.isFinite, parameter[member[.count]]]] begin[{]
return[call[Stream.of, parameter[call[.ev... | identifier[Stream] operator[<] identifier[String] operator[>] identifier[writeFunctionCounter] operator[SEP] identifier[FunctionCounter] identifier[counter] operator[SEP] {
Keyword[double] identifier[count] operator[=] identifier[counter] operator[SEP] identifier[count] operator[SEP] operator[SEP] operator[SEP] ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.