code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void setMainDocument(CmsDocumentDependency mainDocument) {
if (m_mainDocument == null) {
// we currently have no main document at all
m_mainDocument = mainDocument;
} else {
// check if we find a better match for the main document locale
if (mainDo... | class class_name[name] begin[{]
method[setMainDocument, return_type[void], modifier[public], parameter[mainDocument]] begin[{]
if[binary_operation[member[.m_mainDocument], ==, literal[null]]] begin[{]
assign[member[.m_mainDocument], member[.mainDocument]]
else be... | Keyword[public] Keyword[void] identifier[setMainDocument] operator[SEP] identifier[CmsDocumentDependency] identifier[mainDocument] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_mainDocument] operator[==] Other[null] operator[SEP] {
identifier[m_mainDocument] operator[=] identifier[mainDocumen... |
public void addEvidence(EvidenceType type, String source, String name, String value, Confidence confidence) {
final Evidence e = new Evidence(source, name, value, confidence);
addEvidence(type, e);
} | class class_name[name] begin[{]
method[addEvidence, return_type[void], modifier[public], parameter[type, source, name, value, confidence]] begin[{]
local_variable[type[Evidence], e]
call[.addEvidence, parameter[member[.type], member[.e]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[addEvidence] operator[SEP] identifier[EvidenceType] identifier[type] , identifier[String] identifier[source] , identifier[String] identifier[name] , identifier[String] identifier[value] , identifier[Confidence] identifier[confidence] operator[SEP] {
Keyword[final] ide... |
@Nonnull
@SuppressFBWarnings ("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE")
@MustBeLocked (ELockType.WRITE)
private ESuccess _writeToFile ()
{
// Build the filename to write to
final String sFilename = m_aFilenameProvider.get ();
if (sFilename == null)
{
// We're not operating on a file! Req... | class class_name[name] begin[{]
method[_writeToFile, return_type[type[ESuccess]], modifier[private], parameter[]] begin[{]
local_variable[type[String], sFilename]
if[binary_operation[member[.sFilename], ==, literal[null]]] begin[{]
if[call[LOGGER.isWarnEnabled, p... | annotation[@] identifier[Nonnull] annotation[@] identifier[SuppressFBWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[MustBeLocked] operator[SEP] identifier[ELockType] operator[SEP] identifier[WRITE] operator[SEP] Keyword[private] identifier[ESuccess] identifier[_writeToFile] operator[SEP]... |
@GET
@Produces(MediaType.APPLICATION_JSON)
@RolesAllowed("administrators")
@Path("/default-ws-config/{repositoryName}")
public Response getDefaultWorkspaceConfig(@PathParam("repositoryName") String repositoryName)
{
String errorMessage = new String();
Status status;
try
{
... | class class_name[name] begin[{]
method[getDefaultWorkspaceConfig, return_type[type[Response]], modifier[public], parameter[repositoryName]] begin[{]
local_variable[type[String], errorMessage]
local_variable[type[Status], status]
TryStatement(block=[LocalVariableDeclaration(annotations=[... | annotation[@] identifier[GET] annotation[@] identifier[Produces] operator[SEP] identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON] operator[SEP] annotation[@] identifier[RolesAllowed] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] Keyw... |
protected void cancelTimeout(final TimerImpl timer) {
synchronized (this.scheduledTimerFutures) {
java.util.TimerTask timerTask = this.scheduledTimerFutures.remove(timer.getId());
if (timerTask != null) {
timerTask.cancel();
}
}
} | class class_name[name] begin[{]
method[cancelTimeout, return_type[void], modifier[protected], parameter[timer]] begin[{]
SYNCHRONIZED[THIS[member[None.scheduledTimerFutures]]] BEGIN[{]
local_variable[type[java], timerTask]
if[binary_operation[member[.timerTas... | Keyword[protected] Keyword[void] identifier[cancelTimeout] operator[SEP] Keyword[final] identifier[TimerImpl] identifier[timer] operator[SEP] {
Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] identifier[scheduledTimerFutures] operator[SEP] {
identifier[java] operator[SEP] identifier[ut... |
private void materializeKNNAndRKNNs(ArrayDBIDs ids, FiniteProgress progress) {
// add an empty list to each rknn
for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
if(materialized_RkNN.get(iter) == null) {
materialized_RkNN.put(iter, new TreeSet<DoubleDBIDPair>());
}
}
... | class class_name[name] begin[{]
method[materializeKNNAndRKNNs, return_type[void], modifier[private], parameter[ids, progress]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=iter, postfi... | Keyword[private] Keyword[void] identifier[materializeKNNAndRKNNs] operator[SEP] identifier[ArrayDBIDs] identifier[ids] , identifier[FiniteProgress] identifier[progress] operator[SEP] {
Keyword[for] operator[SEP] identifier[DBIDIter] identifier[iter] operator[=] identifier[ids] operator[SEP] identifier[iter] ope... |
public PutMethodResponseRequest withResponseModels(java.util.Map<String, String> responseModels) {
setResponseModels(responseModels);
return this;
} | class class_name[name] begin[{]
method[withResponseModels, return_type[type[PutMethodResponseRequest]], modifier[public], parameter[responseModels]] begin[{]
call[.setResponseModels, parameter[member[.responseModels]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[PutMethodResponseRequest] identifier[withResponseModels] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[responseModels] operator[SEP] {
identifier[setResponseModels]... |
private static boolean floatingPointArgument(ExpressionTree tree) {
if (tree.getKind() == Kind.UNARY_PLUS || tree.getKind() == Kind.UNARY_MINUS) {
tree = ((UnaryTree) tree).getExpression();
}
return tree.getKind() == Kind.DOUBLE_LITERAL || tree.getKind() == Kind.FLOAT_LITERAL;
} | class class_name[name] begin[{]
method[floatingPointArgument, return_type[type[boolean]], modifier[private static], parameter[tree]] begin[{]
if[binary_operation[binary_operation[call[tree.getKind, parameter[]], ==, member[Kind.UNARY_PLUS]], ||, binary_operation[call[tree.getKind, parameter[]],... | Keyword[private] Keyword[static] Keyword[boolean] identifier[floatingPointArgument] operator[SEP] identifier[ExpressionTree] identifier[tree] operator[SEP] {
Keyword[if] operator[SEP] identifier[tree] operator[SEP] identifier[getKind] operator[SEP] operator[SEP] operator[==] identifier[Kind] operator[SEP] identi... |
public static Authentication getInProgressAuthentication() {
val context = RequestContextHolder.getRequestContext();
val authentication = context != null ? WebUtils.getAuthentication(context) : null;
if (authentication == null) {
return AuthenticationCredentialsThreadLocalBinder.getI... | class class_name[name] begin[{]
method[getInProgressAuthentication, return_type[type[Authentication]], modifier[public static], parameter[]] begin[{]
local_variable[type[val], context]
local_variable[type[val], authentication]
if[binary_operation[member[.authentication], ==, lit... | Keyword[public] Keyword[static] identifier[Authentication] identifier[getInProgressAuthentication] operator[SEP] operator[SEP] {
identifier[val] identifier[context] operator[=] identifier[RequestContextHolder] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[val] i... |
@SuppressWarnings("unchecked")
@Override
public <T> void changeEncryption(ICipher newCipher) {
if (!encrypted) {
throw new InvalidJsonDbApiUsageException("DB is not encrypted, nothing to change for EncryptionKey");
}
for (Entry<String, Map<Object, ?>> entry : collectionsRef.get().entrySet()) {
... | class class_name[name] begin[{]
method[changeEncryption, return_type[void], modifier[public], parameter[newCipher]] begin[{]
if[member[.encrypted]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[changeEncryption] operator[SEP] identifier[ICipher] identifier[newCipher] operator[SEP] {
Keyword[if] operator[S... |
public Observable<PolicyAssignmentInner> deleteAsync(String scope, String policyAssignmentName) {
return deleteWithServiceResponseAsync(scope, policyAssignmentName).map(new Func1<ServiceResponse<PolicyAssignmentInner>, PolicyAssignmentInner>() {
@Override
public PolicyAssignmentInner cal... | class class_name[name] begin[{]
method[deleteAsync, return_type[type[Observable]], modifier[public], parameter[scope, policyAssignmentName]] begin[{]
return[call[.deleteWithServiceResponseAsync, parameter[member[.scope], member[.policyAssignmentName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[PolicyAssignmentInner] operator[>] identifier[deleteAsync] operator[SEP] identifier[String] identifier[scope] , identifier[String] identifier[policyAssignmentName] operator[SEP] {
Keyword[return] identifier[deleteWithServiceResponseAsync] operator[SE... |
public void show(double viewportOffset) {
if(viewportOffset < 0) {
navigator.scrollCurrentPositionBy(viewportOffset);
} else if(viewportOffset > sizeTracker.getViewportLength()) {
navigator.scrollCurrentPositionBy(viewportOffset - sizeTracker.getViewportLength());
} else ... | class class_name[name] begin[{]
method[show, return_type[void], modifier[public], parameter[viewportOffset]] begin[{]
if[binary_operation[member[.viewportOffset], <, literal[0]]] begin[{]
call[navigator.scrollCurrentPositionBy, parameter[member[.viewportOffset]]]
... | Keyword[public] Keyword[void] identifier[show] operator[SEP] Keyword[double] identifier[viewportOffset] operator[SEP] {
Keyword[if] operator[SEP] identifier[viewportOffset] operator[<] Other[0] operator[SEP] {
identifier[navigator] operator[SEP] identifier[scrollCurrentPositionBy] operator[SEP] identi... |
@Override
public void internalWrite(Server server, Query query, ImmutableList<Result> results) throws Exception {
String gatewayMessage = getGatewayMessage(results);
// message won't be returned if there are no numeric values in the query results
if (gatewayMessage != null) {
logger.info(gatewayMessage);
... | class class_name[name] begin[{]
method[internalWrite, return_type[void], modifier[public], parameter[server, query, results]] begin[{]
local_variable[type[String], gatewayMessage]
if[binary_operation[member[.gatewayMessage], !=, literal[null]]] begin[{]
call[logg... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[internalWrite] operator[SEP] identifier[Server] identifier[server] , identifier[Query] identifier[query] , identifier[ImmutableList] operator[<] identifier[Result] operator[>] identifier[results] operator[SEP] Keyword[throws] identifier[Excep... |
private Result getCandidateInfo(String candidateId){
StatsStorage ss = knownSessionIDs.get(currentSessionID);
if(ss == null){
log.debug("getModelLastUpdateTimes(): Session ID is unknown: {}", currentSessionID);
return ok();
}
GlobalConfigPersistable gcp = (Globa... | class class_name[name] begin[{]
method[getCandidateInfo, return_type[type[Result]], modifier[private], parameter[candidateId]] begin[{]
local_variable[type[StatsStorage], ss]
if[binary_operation[member[.ss], ==, literal[null]]] begin[{]
call[log.debug, parameter[... | Keyword[private] identifier[Result] identifier[getCandidateInfo] operator[SEP] identifier[String] identifier[candidateId] operator[SEP] {
identifier[StatsStorage] identifier[ss] operator[=] identifier[knownSessionIDs] operator[SEP] identifier[get] operator[SEP] identifier[currentSessionID] operator[SEP] operator... |
public Workspace getWorkspace(long id, Boolean loadAll, EnumSet<SourceInclusion> includes) throws SmartsheetException {
String path = "workspaces/" + id;
// Add the parameters to a map and build the query string at the end
HashMap<String, Object> parameters = new HashMap<String, Object>();
... | class class_name[name] begin[{]
method[getWorkspace, return_type[type[Workspace]], modifier[public], parameter[id, loadAll, includes]] begin[{]
local_variable[type[String], path]
local_variable[type[HashMap], parameters]
call[parameters.put, parameter[literal["include"], call[Qu... | Keyword[public] identifier[Workspace] identifier[getWorkspace] operator[SEP] Keyword[long] identifier[id] , identifier[Boolean] identifier[loadAll] , identifier[EnumSet] operator[<] identifier[SourceInclusion] operator[>] identifier[includes] operator[SEP] Keyword[throws] identifier[SmartsheetException] {
iden... |
protected AppendResponse checkPreviousEntry(AppendRequest request) {
if (request.logIndex() != 0 && context.getLog().isEmpty()) {
LOGGER.debug("{} - Rejected {}: Previous index ({}) is greater than the local log's last index ({})", context.getCluster().member().address(), request, request.logIndex(), context.... | class class_name[name] begin[{]
method[checkPreviousEntry, return_type[type[AppendResponse]], modifier[protected], parameter[request]] begin[{]
if[binary_operation[binary_operation[call[request.logIndex, parameter[]], !=, literal[0]], &&, call[context.getLog, parameter[]]]] begin[{]
... | Keyword[protected] identifier[AppendResponse] identifier[checkPreviousEntry] operator[SEP] identifier[AppendRequest] identifier[request] operator[SEP] {
Keyword[if] operator[SEP] identifier[request] operator[SEP] identifier[logIndex] operator[SEP] operator[SEP] operator[!=] Other[0] operator[&&] identifier[conte... |
public SIMPLocalSubscriptionControllable getLocalSubscriptionControlByName(String subscriptionName) throws SIMPException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getLocalSubscriptionControlByName", subscriptionName);
assertMessageHandlerNotCorrupt();
... | class class_name[name] begin[{]
method[getLocalSubscriptionControlByName, return_type[type[SIMPLocalSubscriptionControllable]], modifier[public], parameter[subscriptionName]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, paramete... | Keyword[public] identifier[SIMPLocalSubscriptionControllable] identifier[getLocalSubscriptionControlByName] operator[SEP] identifier[String] identifier[subscriptionName] operator[SEP] Keyword[throws] identifier[SIMPException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTr... |
private <T> void runTransaction(
final Transaction.Function<T> transactionCallback,
final SettableApiFuture<T> resultFuture,
final TransactionOptions options) {
// span is intentionally not ended here. It will be ended by runTransactionAttempt on success
// or error.
Span span = tracer.spa... | class class_name[name] begin[{]
method[runTransaction, return_type[void], modifier[private], parameter[transactionCallback, resultFuture, options]] begin[{]
local_variable[type[Span], span]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tra... | Keyword[private] operator[<] identifier[T] operator[>] Keyword[void] identifier[runTransaction] operator[SEP] Keyword[final] identifier[Transaction] operator[SEP] identifier[Function] operator[<] identifier[T] operator[>] identifier[transactionCallback] , Keyword[final] identifier[SettableApiFuture] operator[<] identi... |
public JobAlbumArt withArtwork(Artwork... artwork) {
if (this.artwork == null) {
setArtwork(new com.amazonaws.internal.SdkInternalList<Artwork>(artwork.length));
}
for (Artwork ele : artwork) {
this.artwork.add(ele);
}
return this;
} | class class_name[name] begin[{]
method[withArtwork, return_type[type[JobAlbumArt]], modifier[public], parameter[artwork]] begin[{]
if[binary_operation[THIS[member[None.artwork]], ==, literal[null]]] begin[{]
call[.setArtwork, parameter[ClassCreator(arguments=[MemberRefer... | Keyword[public] identifier[JobAlbumArt] identifier[withArtwork] operator[SEP] identifier[Artwork] operator[...] identifier[artwork] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[artwork] operator[==] Other[null] operator[SEP] {
identifier[setArtwork] operator[SEP] Ke... |
public static Stream<MutableIntTuple> wrappingStream(
IntTuple bounds, Stream<? extends MutableIntTuple> delegate)
{
IntTuple localBounds = IntTuples.copy(bounds);
return delegate.map(t -> IntTupleUtils.wrap(t, localBounds));
} | class class_name[name] begin[{]
method[wrappingStream, return_type[type[Stream]], modifier[public static], parameter[bounds, delegate]] begin[{]
local_variable[type[IntTuple], localBounds]
return[call[delegate.map, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(memb... | Keyword[public] Keyword[static] identifier[Stream] operator[<] identifier[MutableIntTuple] operator[>] identifier[wrappingStream] operator[SEP] identifier[IntTuple] identifier[bounds] , identifier[Stream] operator[<] operator[?] Keyword[extends] identifier[MutableIntTuple] operator[>] identifier[delegate] operator[SEP... |
@Override
public int getAvailablePermits() {
int minPermits = Integer.MAX_VALUE;
for (PoolLimitDeterminationStrategy strategy : strategies) {
int availablePermits = strategy.getAvailablePermits();
minPermits = Math.min(minPermits, availablePermits);
}
return m... | class class_name[name] begin[{]
method[getAvailablePermits, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], minPermits]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dim... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[getAvailablePermits] operator[SEP] operator[SEP] {
Keyword[int] identifier[minPermits] operator[=] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] Keyword[for] operator[SEP] identifier[PoolLimitDeterminationStrategy]... |
void unregisterPrefetchCall(@NotNull ApolloPrefetch apolloPrefetch) {
checkNotNull(apolloPrefetch, "apolloPrefetch == null");
OperationName operationName = apolloPrefetch.operation().name();
unregisterCall(activePrefetchCalls, operationName, apolloPrefetch);
} | class class_name[name] begin[{]
method[unregisterPrefetchCall, return_type[void], modifier[default], parameter[apolloPrefetch]] begin[{]
call[.checkNotNull, parameter[member[.apolloPrefetch], literal["apolloPrefetch == null"]]]
local_variable[type[OperationName], operationName]
... | Keyword[void] identifier[unregisterPrefetchCall] operator[SEP] annotation[@] identifier[NotNull] identifier[ApolloPrefetch] identifier[apolloPrefetch] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[apolloPrefetch] , literal[String] operator[SEP] operator[SEP] identifier[OperationName] identif... |
protected static String parseContentId(final Part part) throws MessagingException {
if (part instanceof MimePart) {
final MimePart mp = (MimePart) part;
return mp.getContentID();
} else {
return null;
}
} | class class_name[name] begin[{]
method[parseContentId, return_type[type[String]], modifier[static protected], parameter[part]] begin[{]
if[binary_operation[member[.part], instanceof, type[MimePart]]] begin[{]
local_variable[type[MimePart], mp]
return[call[mp.getContentID... | Keyword[protected] Keyword[static] identifier[String] identifier[parseContentId] operator[SEP] Keyword[final] identifier[Part] identifier[part] operator[SEP] Keyword[throws] identifier[MessagingException] {
Keyword[if] operator[SEP] identifier[part] Keyword[instanceof] identifier[MimePart] operator[SEP] {
... |
public void init(SocketChannel s)
{
_s = s;
try {
s.setOption(StandardSocketOptions.TCP_NODELAY, true);
} catch (Exception e) {
e.printStackTrace();;
}
//_is = null;
//_os = null;
_needsFlush = false;
_readBuffer.clear().flip();
_writeBuffer.clear();
} | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[s]] begin[{]
assign[member[._s], member[.s]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TCP_NODELAY, postfix_operators=[], prefix_operat... | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[SocketChannel] identifier[s] operator[SEP] {
identifier[_s] operator[=] identifier[s] operator[SEP] Keyword[try] {
identifier[s] operator[SEP] identifier[setOption] operator[SEP] identifier[StandardSocketOptions] operator[SEP] ide... |
protected void dropSpatialIndexIfExists(final String catalogName, final String schemaName,
final String tableName, final Database database, final List<Sql> list) {
final DropSpatialIndexGeneratorGeoDB generator = new DropSpatialIndexGeneratorGeoDB();
final DropSpatialIndexStatement statement = new ... | class class_name[name] begin[{]
method[dropSpatialIndexIfExists, return_type[void], modifier[protected], parameter[catalogName, schemaName, tableName, database, list]] begin[{]
local_variable[type[DropSpatialIndexGeneratorGeoDB], generator]
local_variable[type[DropSpatialIndexStatement], statem... | Keyword[protected] Keyword[void] identifier[dropSpatialIndexIfExists] operator[SEP] Keyword[final] identifier[String] identifier[catalogName] , Keyword[final] identifier[String] identifier[schemaName] , Keyword[final] identifier[String] identifier[tableName] , Keyword[final] identifier[Database] identifier[database]... |
public Javalin options(@NotNull String path, @NotNull Handler handler, @NotNull Set<Role> permittedRoles) {
return addHandler(HandlerType.OPTIONS, path, handler, permittedRoles);
} | class class_name[name] begin[{]
method[options, return_type[type[Javalin]], modifier[public], parameter[path, handler, permittedRoles]] begin[{]
return[call[.addHandler, parameter[member[HandlerType.OPTIONS], member[.path], member[.handler], member[.permittedRoles]]]]
end[}]
END[}] | Keyword[public] identifier[Javalin] identifier[options] operator[SEP] annotation[@] identifier[NotNull] identifier[String] identifier[path] , annotation[@] identifier[NotNull] identifier[Handler] identifier[handler] , annotation[@] identifier[NotNull] identifier[Set] operator[<] identifier[Role] operator[>] identifie... |
@BetaApi
public final Operation recreateInstancesInstanceGroupManager(
ProjectZoneInstanceGroupManagerName instanceGroupManager,
InstanceGroupManagersRecreateInstancesRequest
instanceGroupManagersRecreateInstancesRequestResource) {
RecreateInstancesInstanceGroupManagerHttpRequest request =
... | class class_name[name] begin[{]
method[recreateInstancesInstanceGroupManager, return_type[type[Operation]], modifier[final public], parameter[instanceGroupManager, instanceGroupManagersRecreateInstancesRequestResource]] begin[{]
local_variable[type[RecreateInstancesInstanceGroupManagerHttpRequest], req... | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[recreateInstancesInstanceGroupManager] operator[SEP] identifier[ProjectZoneInstanceGroupManagerName] identifier[instanceGroupManager] , identifier[InstanceGroupManagersRecreateInstancesRequest] identifier[instanceGroupMan... |
protected void process(Collection<R> requests) {
for(;;) {
while(!requests.isEmpty()) {
removeAndProcess(requests); // remove matching requests and process them
}
lock.lock();
try {
if(requests.isEmpty()) {
setPr... | class class_name[name] begin[{]
method[process, return_type[void], modifier[protected], parameter[requests]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberRefe... | Keyword[protected] Keyword[void] identifier[process] operator[SEP] identifier[Collection] operator[<] identifier[R] operator[>] identifier[requests] operator[SEP] {
Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
Keyword[while] operator[SEP] operator[!] identifier[requests] oper... |
@Nullable
public BraintreeError errorFor(String field) {
BraintreeError returnError;
if (mFieldErrors != null) {
for (BraintreeError error : mFieldErrors) {
if (error.getField().equals(field)) {
return error;
} else if (error.getFieldEr... | class class_name[name] begin[{]
method[errorFor, return_type[type[BraintreeError]], modifier[public], parameter[field]] begin[{]
local_variable[type[BraintreeError], returnError]
if[binary_operation[member[.mFieldErrors], !=, literal[null]]] begin[{]
ForStatement(body=BlockS... | annotation[@] identifier[Nullable] Keyword[public] identifier[BraintreeError] identifier[errorFor] operator[SEP] identifier[String] identifier[field] operator[SEP] {
identifier[BraintreeError] identifier[returnError] operator[SEP] Keyword[if] operator[SEP] identifier[mFieldErrors] operator[!=] Other[null] operat... |
private static JSONArray _fromArray( Enum e, JsonConfig jsonConfig ) {
if( !addInstance( e ) ){
try{
return jsonConfig.getCycleDetectionStrategy()
.handleRepeatedReferenceAsArray( e );
}catch( JSONException jsone ){
removeInstance( e );
fireE... | class class_name[name] begin[{]
method[_fromArray, return_type[type[JSONArray]], modifier[private static], parameter[e, jsonConfig]] begin[{]
if[call[.addInstance, parameter[member[.e]]]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=g... | Keyword[private] Keyword[static] identifier[JSONArray] identifier[_fromArray] operator[SEP] identifier[Enum] identifier[e] , identifier[JsonConfig] identifier[jsonConfig] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[addInstance] operator[SEP] identifier[e] operator[SEP] operator[SEP] {
... |
@Override
public SortedMap<String, String> getColumnsToParameters(
final Record record, int op,
Map<String, String> parameters,
Map<String, String> columnsToFields)
{
SortedMap<String, String> columnsToParameters = new TreeMap<>();
for (Map.Entry<String, String> entry : columnsToFields.ent... | class class_name[name] begin[{]
method[getColumnsToParameters, return_type[type[SortedMap]], modifier[public], parameter[record, op, parameters, columnsToFields]] begin[{]
local_variable[type[SortedMap], columnsToParameters]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariable... | annotation[@] identifier[Override] Keyword[public] identifier[SortedMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[getColumnsToParameters] operator[SEP] Keyword[final] identifier[Record] identifier[record] , Keyword[int] identifier[op] , identifier[Map] operator[<] identifier[String]... |
public void add(Repository repository, Object plugin) {
if (plugin instanceof Macro) {
repository.put(((Macro) plugin).getName(), plugin);
} else {
log.debug("MacroLoader: " + plugin.getClass() + " not of Type " + getLoadClass());
}
} | class class_name[name] begin[{]
method[add, return_type[void], modifier[public], parameter[repository, plugin]] begin[{]
if[binary_operation[member[.plugin], instanceof, type[Macro]]] begin[{]
call[repository.put, parameter[Cast(expression=MemberReference(member=plugin, ... | Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[Repository] identifier[repository] , identifier[Object] identifier[plugin] operator[SEP] {
Keyword[if] operator[SEP] identifier[plugin] Keyword[instanceof] identifier[Macro] operator[SEP] {
identifier[repository] operator[SEP] ide... |
@Override
public void addListener(PromiseListener<Tuple6<T1, T2, T3, T4, T5, T6>> listener) {
_task.addListener(listener);
} | class class_name[name] begin[{]
method[addListener, return_type[void], modifier[public], parameter[listener]] begin[{]
call[_task.addListener, parameter[member[.listener]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[addListener] operator[SEP] identifier[PromiseListener] operator[<] identifier[Tuple6] operator[<] identifier[T1] , identifier[T2] , identifier[T3] , identifier[T4] , identifier[T5] , identifier[T6] operator[>] operator[>] identifier[listen... |
public List<GedRenderer<?>> getAttributes() {
final Note source = getGedObject();
final List<GedRenderer<?>> list = new ArrayList<GedRenderer<?>>();
for (final GedObject attribute : source.getAttributes()) {
final GedRenderer<?> attributeRenderer =
createGedRender... | class class_name[name] begin[{]
method[getAttributes, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[Note], source]
local_variable[type[List], list]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], de... | Keyword[public] identifier[List] operator[<] identifier[GedRenderer] operator[<] operator[?] operator[>] operator[>] identifier[getAttributes] operator[SEP] operator[SEP] {
Keyword[final] identifier[Note] identifier[source] operator[=] identifier[getGedObject] operator[SEP] operator[SEP] operator[SEP] Keyword[fi... |
public static vpnvserver_vpnurl_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_vpnurl_binding obj = new vpnvserver_vpnurl_binding();
obj.set_name(name);
vpnvserver_vpnurl_binding response[] = (vpnvserver_vpnurl_binding[]) obj.get_resources(service);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[vpnvserver_vpnurl_binding]], modifier[public static], parameter[service, name]] begin[{]
local_variable[type[vpnvserver_vpnurl_binding], obj]
call[obj.set_name, parameter[member[.name]]]
local_variable[type[vpnvserver_... | Keyword[public] Keyword[static] identifier[vpnvserver_vpnurl_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[vpnvserver_vpnurl_binding] identifi... |
public static byte[] encode(byte[] user, byte[] password, byte[] salt) {
MessageDigest md;
byte[] tempDigest;
byte[] passDigest;
byte[] hexDigest = new byte[35];
try {
md = MessageDigest.getInstance("MD5");
md.update(password);
md.update(user);
tempDigest = md.digest();
... | class class_name[name] begin[{]
method[encode, return_type[type[byte]], modifier[public static], parameter[user, password, salt]] begin[{]
local_variable[type[MessageDigest], md]
local_variable[type[byte], tempDigest]
local_variable[type[byte], passDigest]
local_variable[type[by... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[encode] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[user] , Keyword[byte] operator[SEP] operator[SEP] identifier[password] , Keyword[byte] operator[SEP] operator[SEP] identifier[salt] operator[SEP] {
ide... |
protected static List<Field> getSerializeFields(Class targetClass) {
List<Field> all = new ArrayList<Field>();
for (Class<?> c = targetClass; c != Object.class && c != null; c = c.getSuperclass()) {
Field[] fields = c.getDeclaredFields();
for (Field f : fields) {
... | class class_name[name] begin[{]
method[getSerializeFields, return_type[type[List]], modifier[static protected], parameter[targetClass]] begin[{]
local_variable[type[List], all]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Variabl... | Keyword[protected] Keyword[static] identifier[List] operator[<] identifier[Field] operator[>] identifier[getSerializeFields] operator[SEP] identifier[Class] identifier[targetClass] operator[SEP] {
identifier[List] operator[<] identifier[Field] operator[>] identifier[all] operator[=] Keyword[new] identifier[Array... |
private Map<Feature, Feature> diffFeatures(List<Feature> pcm1Features, List<Feature> pcm2Features, PCMElementComparator comparator, DiffResult result) {
List<Feature> commonFeatures = new ArrayList<Feature>();
List<Feature> featuresOnlyInPCM1 = new ArrayList<Feature>();
List<Feature> featuresOnl... | class class_name[name] begin[{]
method[diffFeatures, return_type[type[Map]], modifier[private], parameter[pcm1Features, pcm2Features, comparator, result]] begin[{]
local_variable[type[List], commonFeatures]
local_variable[type[List], featuresOnlyInPCM1]
local_variable[type[List], featur... | Keyword[private] identifier[Map] operator[<] identifier[Feature] , identifier[Feature] operator[>] identifier[diffFeatures] operator[SEP] identifier[List] operator[<] identifier[Feature] operator[>] identifier[pcm1Features] , identifier[List] operator[<] identifier[Feature] operator[>] identifier[pcm2Features] , ide... |
@Override
public String decorateLinkerOption(final StringBuffer buf, final String arg) {
String decoratedArg = arg;
if (arg.length() > 1 && arg.charAt(0) == '-') {
switch (arg.charAt(1)) {
//
// passed automatically by GCC
//
case 'g':
case 'f':
case 'F':
... | class class_name[name] begin[{]
method[decorateLinkerOption, return_type[type[String]], modifier[public], parameter[buf, arg]] begin[{]
local_variable[type[String], decoratedArg]
if[binary_operation[binary_operation[call[arg.length, parameter[]], >, literal[1]], &&, binary_operation[cal... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[decorateLinkerOption] operator[SEP] Keyword[final] identifier[StringBuffer] identifier[buf] , Keyword[final] identifier[String] identifier[arg] operator[SEP] {
identifier[String] identifier[decoratedArg] operator[=] identifier[arg]... |
private static Object invokeDefault(final Object proxy, final Method method, final Object[] args) {
final Class<?> declaringClass = method.getDeclaringClass();
try {
return lookupIn(declaringClass).unreflectSpecial(method, declaringClass)
.bindTo(proxy)
... | class class_name[name] begin[{]
method[invokeDefault, return_type[type[Object]], modifier[private static], parameter[proxy, method, args]] begin[{]
local_variable[type[Class], declaringClass]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=decla... | Keyword[private] Keyword[static] identifier[Object] identifier[invokeDefault] operator[SEP] Keyword[final] identifier[Object] identifier[proxy] , Keyword[final] identifier[Method] identifier[method] , Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
Keyword[final] ... |
@Nonnull
public Descriptor getDescriptorOrDie(Class<? extends Describable> type) {
Descriptor d = getDescriptor(type);
if (d==null)
throw new AssertionError(type+" is missing its descriptor");
return d;
} | class class_name[name] begin[{]
method[getDescriptorOrDie, return_type[type[Descriptor]], modifier[public], parameter[type]] begin[{]
local_variable[type[Descriptor], d]
if[binary_operation[member[.d], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Binary... | annotation[@] identifier[Nonnull] Keyword[public] identifier[Descriptor] identifier[getDescriptorOrDie] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Describable] operator[>] identifier[type] operator[SEP] {
identifier[Descriptor] identifier[d] operator[=] identifier[getDesc... |
public void provideWarpContext(@Observes EventContext<ExecuteWarp> eventContext) {
warpExecutionContext.get().activate();
try {
WarpContext context = eventContext.getEvent().getWarpContext();
warpContext.set(context);
WarpContextStore.set(context);
synchr... | class class_name[name] begin[{]
method[provideWarpContext, return_type[void], modifier[public], parameter[eventContext]] begin[{]
call[warpExecutionContext.get, parameter[]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initi... | Keyword[public] Keyword[void] identifier[provideWarpContext] operator[SEP] annotation[@] identifier[Observes] identifier[EventContext] operator[<] identifier[ExecuteWarp] operator[>] identifier[eventContext] operator[SEP] {
identifier[warpExecutionContext] operator[SEP] identifier[get] operator[SEP] operator[SEP... |
@Override
public void setup(StreamTask<?, ?> containingTask, StreamConfig config, Output<StreamRecord<OUT>> output) {
super.setup(containingTask, config, output);
FunctionUtils.setFunctionRuntimeContext(userFunction, getRuntimeContext());
} | class class_name[name] begin[{]
method[setup, return_type[void], modifier[public], parameter[containingTask, config, output]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=containingTask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(me... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setup] operator[SEP] identifier[StreamTask] operator[<] operator[?] , operator[?] operator[>] identifier[containingTask] , identifier[StreamConfig] identifier[config] , identifier[Output] operator[<] identifier[StreamRecord] operator[<] iden... |
@Override
public void clearCache(CommerceCountry commerceCountry) {
entityCache.removeResult(CommerceCountryModelImpl.ENTITY_CACHE_ENABLED,
CommerceCountryImpl.class, commerceCountry.getPrimaryKey());
finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
finderCache.clearCache(FINDER_CLASS_NAME_LIS... | class class_name[name] begin[{]
method[clearCache, return_type[void], modifier[public], parameter[commerceCountry]] begin[{]
call[entityCache.removeResult, parameter[member[CommerceCountryModelImpl.ENTITY_CACHE_ENABLED], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, sele... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[clearCache] operator[SEP] identifier[CommerceCountry] identifier[commerceCountry] operator[SEP] {
identifier[entityCache] operator[SEP] identifier[removeResult] operator[SEP] identifier[CommerceCountryModelImpl] operator[SEP] identifier[... |
@Override
public ValidationReport loadProjectFlow(final Project project, final File projectDir) {
convertYamlFiles(projectDir);
FlowLoaderUtils.checkJobProperties(project.getId(), this.props, this.jobPropsMap, this.errors);
return FlowLoaderUtils.generateFlowLoaderReport(this.errors);
} | class class_name[name] begin[{]
method[loadProjectFlow, return_type[type[ValidationReport]], modifier[public], parameter[project, projectDir]] begin[{]
call[.convertYamlFiles, parameter[member[.projectDir]]]
call[FlowLoaderUtils.checkJobProperties, parameter[call[project.getId, ... | annotation[@] identifier[Override] Keyword[public] identifier[ValidationReport] identifier[loadProjectFlow] operator[SEP] Keyword[final] identifier[Project] identifier[project] , Keyword[final] identifier[File] identifier[projectDir] operator[SEP] {
identifier[convertYamlFiles] operator[SEP] identifier[projectD... |
public void getBytes(long memoryOffset, byte[] buffer, int bufferOffset, int count)
{
if (buffer == null)
throw new NullPointerException();
else if (bufferOffset < 0 || count < 0 || count > buffer.length - bufferOffset)
throw new IndexOutOfBoundsException();
else if (... | class class_name[name] begin[{]
method[getBytes, return_type[void], modifier[public], parameter[memoryOffset, buffer, bufferOffset, count]] begin[{]
if[binary_operation[member[.buffer], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type... | Keyword[public] Keyword[void] identifier[getBytes] operator[SEP] Keyword[long] identifier[memoryOffset] , Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] , Keyword[int] identifier[bufferOffset] , Keyword[int] identifier[count] operator[SEP] {
Keyword[if] operator[SEP] identifier[buffer] operator[... |
public String format(GeometryIndex index) {
if (index.hasChild()) {
return "geometry" + index.getValue() + "." + format(index.getChild());
}
switch (index.getType()) {
case TYPE_VERTEX:
return "vertex" + index.getValue();
case TYPE_EDGE:
return "edge" + index.getValue();
default:
return "g... | class class_name[name] begin[{]
method[format, return_type[type[String]], modifier[public], parameter[index]] begin[{]
if[call[index.hasChild, parameter[]]] begin[{]
return[binary_operation[binary_operation[binary_operation[literal["geometry"], +, call[index.getValue, parameter[]]],... | Keyword[public] identifier[String] identifier[format] operator[SEP] identifier[GeometryIndex] identifier[index] operator[SEP] {
Keyword[if] operator[SEP] identifier[index] operator[SEP] identifier[hasChild] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] literal[String] operator[+] identif... |
public Conditions newConditions(final ZonedDateTime issuedAt, final String audienceUri, final long issueLength) {
val conditions = newSamlObject(Conditions.class);
conditions.setNotBefore(DateTimeUtils.dateTimeOf(issuedAt));
conditions.setNotOnOrAfter(DateTimeUtils.dateTimeOf(issuedAt.plus(issue... | class class_name[name] begin[{]
method[newConditions, return_type[type[Conditions]], modifier[public], parameter[issuedAt, audienceUri, issueLength]] begin[{]
local_variable[type[val], conditions]
call[conditions.setNotBefore, parameter[call[DateTimeUtils.dateTimeOf, parameter[member[.i... | Keyword[public] identifier[Conditions] identifier[newConditions] operator[SEP] Keyword[final] identifier[ZonedDateTime] identifier[issuedAt] , Keyword[final] identifier[String] identifier[audienceUri] , Keyword[final] Keyword[long] identifier[issueLength] operator[SEP] {
identifier[val] identifier[conditions] ... |
static Optional<String> validateRelationHasRolePlayers(Relation relation) {
if (!relation.rolePlayers().findAny().isPresent()) {
return Optional.of(ErrorMessage.VALIDATION_RELATION_WITH_NO_ROLE_PLAYERS.getMessage(relation.id(), relation.type().label()));
}
return Optional.empty();
... | class class_name[name] begin[{]
method[validateRelationHasRolePlayers, return_type[type[Optional]], modifier[static], parameter[relation]] begin[{]
if[call[relation.rolePlayers, parameter[]]] begin[{]
return[call[Optional.of, parameter[call[ErrorMessage.VALIDATION_RELATION_WITH_NO_R... | Keyword[static] identifier[Optional] operator[<] identifier[String] operator[>] identifier[validateRelationHasRolePlayers] operator[SEP] identifier[Relation] identifier[relation] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[relation] operator[SEP] identifier[rolePlayers] operator[SEP] operato... |
private void configureLog4j(Properties props) throws ConfigurationException, FileNotFoundException {
if (blitz4jConfig.shouldUseLockFree() && (props.getProperty(LOG4J_LOGGER_FACTORY) == null)) {
props.setProperty(LOG4J_LOGGER_FACTORY, LOG4J_FACTORY_IMPL);
}
convertConfiguredAppenders... | class class_name[name] begin[{]
method[configureLog4j, return_type[void], modifier[private], parameter[props]] begin[{]
if[binary_operation[call[blitz4jConfig.shouldUseLockFree, parameter[]], &&, binary_operation[call[props.getProperty, parameter[member[.LOG4J_LOGGER_FACTORY]]], ==, literal[nul... | Keyword[private] Keyword[void] identifier[configureLog4j] operator[SEP] identifier[Properties] identifier[props] operator[SEP] Keyword[throws] identifier[ConfigurationException] , identifier[FileNotFoundException] {
Keyword[if] operator[SEP] identifier[blitz4jConfig] operator[SEP] identifier[shouldUseLockFree] ... |
public static void createAndRegister() throws IOException {
StackdriverTraceExporter.createAndRegister(
StackdriverTraceConfiguration.builder()
.setCredentials(GoogleCredentials.getApplicationDefault())
// TODO(sebright): Handle null default project ID.
.setProjectId(cas... | class class_name[name] begin[{]
method[createAndRegister, return_type[void], modifier[public static], parameter[]] begin[{]
call[StackdriverTraceExporter.createAndRegister, parameter[call[StackdriverTraceConfiguration.builder, parameter[]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[createAndRegister] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[StackdriverTraceExporter] operator[SEP] identifier[createAndRegister] operator[SEP] identifier[StackdriverTraceConfiguration] operator[SEP] identifier[build... |
@Override
public Blob getBlob(int index) {
check(index);
final Object obj = fleeceValueToObject(index);
return obj instanceof Blob ? (Blob) obj : null;
} | class class_name[name] begin[{]
method[getBlob, return_type[type[Blob]], modifier[public], parameter[index]] begin[{]
call[.check, parameter[member[.index]]]
local_variable[type[Object], obj]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=obj,... | annotation[@] identifier[Override] Keyword[public] identifier[Blob] identifier[getBlob] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
identifier[check] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[final] identifier[Object] identifier[obj] operator[=] identifier[fleeceValueTo... |
public static List<CommerceNotificationAttachment> findByCommerceNotificationQueueEntryId(
long commerceNotificationQueueEntryId, int start, int end,
OrderByComparator<CommerceNotificationAttachment> orderByComparator) {
return getPersistence()
.findByCommerceNotificationQueueEntryId(commerceNotificationQu... | class class_name[name] begin[{]
method[findByCommerceNotificationQueueEntryId, return_type[type[List]], modifier[public static], parameter[commerceNotificationQueueEntryId, start, end, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CommerceNotificationAttachment] operator[>] identifier[findByCommerceNotificationQueueEntryId] operator[SEP] Keyword[long] identifier[commerceNotificationQueueEntryId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] , identifier[... |
public void addConfiguredLinker(final LinkerDef linker) {
if (linker == null) {
throw new NullPointerException("linker");
}
linker.setProject(getProject());
this._linkers.addElement(linker);
} | class class_name[name] begin[{]
method[addConfiguredLinker, return_type[void], modifier[public], parameter[linker]] begin[{]
if[binary_operation[member[.linker], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_opera... | Keyword[public] Keyword[void] identifier[addConfiguredLinker] operator[SEP] Keyword[final] identifier[LinkerDef] identifier[linker] operator[SEP] {
Keyword[if] operator[SEP] identifier[linker] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[NullPointerException] operato... |
public static Converter<?, ?> constructConverter(Class<? extends Converter<?, ?>> clazz) {
Constructor<? extends Converter<?, ?>> constructor;
try {
constructor = clazz.getConstructor();
} catch (Exception e) {
throw new IllegalArgumentException("Could not find public no-arg constructor for CSV converter cl... | class class_name[name] begin[{]
method[constructConverter, return_type[type[Converter]], modifier[public static], parameter[clazz]] begin[{]
local_variable[type[Constructor], constructor]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=constructo... | Keyword[public] Keyword[static] identifier[Converter] operator[<] operator[?] , operator[?] operator[>] identifier[constructConverter] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Converter] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[clazz] operator... |
Token clearXAuth(Response response) {
if (response.getCode() == 200 || response.getCode() == 201) {
return parseXAuthResponse(response);
} else {
throw new JumblrException(response);
}
} | class class_name[name] begin[{]
method[clearXAuth, return_type[type[Token]], modifier[default], parameter[response]] begin[{]
if[binary_operation[binary_operation[call[response.getCode, parameter[]], ==, literal[200]], ||, binary_operation[call[response.getCode, parameter[]], ==, literal[201]]]... | identifier[Token] identifier[clearXAuth] operator[SEP] identifier[Response] identifier[response] operator[SEP] {
Keyword[if] operator[SEP] identifier[response] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[==] Other[200] operator[||] identifier[response] operator[SEP] identifier[getCode]... |
@RequestMapping(value = "/{name}", method = RequestMethod.GET)
public AggregateCounterResource display(@PathVariable("name") String name) {
AggregateCounter counter = repository.findOne(name);
if (counter == null) {
throw new NoSuchMetricException(name);
}
return deepAssembler.toResource(counter);
} | class class_name[name] begin[{]
method[display, return_type[type[AggregateCounterResource]], modifier[public], parameter[name]] begin[{]
local_variable[type[AggregateCounter], counter]
if[binary_operation[member[.counter], ==, literal[null]]] begin[{]
ThrowStatement(expressi... | annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[GET] operator[SEP] Keyword[public] identifier[AggregateCounterResource] identifier[display] operator[SEP] annotation[@] identifier[Pat... |
public String getSessionKey() throws LimesurveyRCException {
// Use the saved key if isn't expired
if (!key.isEmpty() && ZonedDateTime.now().isBefore(keyExpiration)) {
return key;
}
// Get session key and save it with an expiration set to 1 minute before the expiration date
... | class class_name[name] begin[{]
method[getSessionKey, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[key.isEmpty, parameter[]], &&, call[ZonedDateTime.now, parameter[]]]] begin[{]
return[member[.key]]
else begin[{]
None
en... | Keyword[public] identifier[String] identifier[getSessionKey] operator[SEP] operator[SEP] Keyword[throws] identifier[LimesurveyRCException] {
Keyword[if] operator[SEP] operator[!] identifier[key] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[ZonedDateTime] operator[SEP] ide... |
private void setPreparedStatementParameter(PreparedStatement ps, int i, Object value, int sqlType, Calendar cal)
throws SQLException {
if (sqlType == Types.NULL) {
sqlType = _tmf.getSqlType(value);
}
if (value == null) {
ps.setNull(i, Types.NULL == sqlType ?... | class class_name[name] begin[{]
method[setPreparedStatementParameter, return_type[void], modifier[private], parameter[ps, i, value, sqlType, cal]] begin[{]
if[binary_operation[member[.sqlType], ==, member[Types.NULL]]] begin[{]
assign[member[.sqlType], call[_tmf.getSqlTy... | Keyword[private] Keyword[void] identifier[setPreparedStatementParameter] operator[SEP] identifier[PreparedStatement] identifier[ps] , Keyword[int] identifier[i] , identifier[Object] identifier[value] , Keyword[int] identifier[sqlType] , identifier[Calendar] identifier[cal] operator[SEP] Keyword[throws] identifier[S... |
public <V> List<V> executeAndFetch(Class<V> returnType) {
try (ResultSet rs = executeQuery()) {
List<V> list = new ArrayList<>();
while (rs.next()) {
list.add(convert(rs.getObject(1), returnType));
}
return list;
} catch (SQLException ex) {... | class class_name[name] begin[{]
method[executeAndFetch, return_type[type[List]], modifier[public], parameter[returnType]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_ty... | Keyword[public] operator[<] identifier[V] operator[>] identifier[List] operator[<] identifier[V] operator[>] identifier[executeAndFetch] operator[SEP] identifier[Class] operator[<] identifier[V] operator[>] identifier[returnType] operator[SEP] {
Keyword[try] operator[SEP] identifier[ResultSet] identifier[rs] ope... |
TypeConverter getConverter(String attributeName) {
Object attributeValue = getAttributeValue(attributeName);
if (attributeValue == null) {
return NULL_CONVERTER;
} else if (attributeValue instanceof MultiResult) {
MultiResult multiResult = (MultiResult) attributeValue;
... | class class_name[name] begin[{]
method[getConverter, return_type[type[TypeConverter]], modifier[default], parameter[attributeName]] begin[{]
local_variable[type[Object], attributeValue]
if[binary_operation[member[.attributeValue], ==, literal[null]]] begin[{]
return[member[.... | identifier[TypeConverter] identifier[getConverter] operator[SEP] identifier[String] identifier[attributeName] operator[SEP] {
identifier[Object] identifier[attributeValue] operator[=] identifier[getAttributeValue] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] ident... |
protected void squareToImageSample(float x, float y, RectangleRotate_F32 region) {
// -1 because it starts counting at 0. otherwise width+1 samples are made
x *= region.width-1;
y *= region.height-1;
imageX = x*c - y*s + region.cx;
imageY = x*s + y*c + region.cy;
} | class class_name[name] begin[{]
method[squareToImageSample, return_type[void], modifier[protected], parameter[x, y, region]] begin[{]
assign[member[.x], binary_operation[member[region.width], -, literal[1]]]
assign[member[.y], binary_operation[member[region.height], -, literal[1... | Keyword[protected] Keyword[void] identifier[squareToImageSample] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] , identifier[RectangleRotate_F32] identifier[region] operator[SEP] {
identifier[x] operator[*=] identifier[region] operator[SEP] identifier[width] operator[-] Other[1] oper... |
private static void compressLongestRunOfZeroes(int[] hextets) {
int bestRunStart = -1;
int bestRunLength = -1;
int runStart = -1;
for (int i = 0; i < hextets.length + 1; i++) {
if (i < hextets.length && hextets[i] == 0) {
if (runStart < 0) {
runStart = i;
}
} else i... | class class_name[name] begin[{]
method[compressLongestRunOfZeroes, return_type[void], modifier[private static], parameter[hextets]] begin[{]
local_variable[type[int], bestRunStart]
local_variable[type[int], bestRunLength]
local_variable[type[int], runStart]
ForStatement(body=Blo... | Keyword[private] Keyword[static] Keyword[void] identifier[compressLongestRunOfZeroes] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[hextets] operator[SEP] {
Keyword[int] identifier[bestRunStart] operator[=] operator[-] Other[1] operator[SEP] Keyword[int] identifier[bestRunLength] operator[=] ... |
public final _Private_IonTextWriterBuilder
withCallbackBuilder(_Private_CallbackBuilder builder)
{
_Private_IonTextWriterBuilder b = mutable();
b.setCallbackBuilder(builder);
return b;
} | class class_name[name] begin[{]
method[withCallbackBuilder, return_type[type[_Private_IonTextWriterBuilder]], modifier[final public], parameter[builder]] begin[{]
local_variable[type[_Private_IonTextWriterBuilder], b]
call[b.setCallbackBuilder, parameter[member[.builder]]]
retur... | Keyword[public] Keyword[final] identifier[_Private_IonTextWriterBuilder] identifier[withCallbackBuilder] operator[SEP] identifier[_Private_CallbackBuilder] identifier[builder] operator[SEP] {
identifier[_Private_IonTextWriterBuilder] identifier[b] operator[=] identifier[mutable] operator[SEP] operator[SEP] opera... |
public void setTickLabelSectionsVisible(final boolean VISIBLE) {
if (null == tickLabelSectionsVisible) {
_tickLabelSectionsVisible = VISIBLE;
fireUpdateEvent(REDRAW_EVENT);
} else {
tickLabelSectionsVisible.set(VISIBLE);
}
} | class class_name[name] begin[{]
method[setTickLabelSectionsVisible, return_type[void], modifier[public], parameter[VISIBLE]] begin[{]
if[binary_operation[literal[null], ==, member[.tickLabelSectionsVisible]]] begin[{]
assign[member[._tickLabelSectionsVisible], member[.VI... | Keyword[public] Keyword[void] identifier[setTickLabelSectionsVisible] operator[SEP] Keyword[final] Keyword[boolean] identifier[VISIBLE] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[tickLabelSectionsVisible] operator[SEP] {
identifier[_tickLabelSectionsVisible] operator... |
public void setFontAndSize(BaseFont bf, float size) {
checkWriter();
if (size < 0.0001f && size > -0.0001f)
throw new IllegalArgumentException("Font size too small: " + size);
state.size = size;
state.fontDetails = writer.addSimple(bf);
PageResources prs = getPageReso... | class class_name[name] begin[{]
method[setFontAndSize, return_type[void], modifier[public], parameter[bf, size]] begin[{]
call[.checkWriter, parameter[]]
if[binary_operation[binary_operation[member[.size], <, literal[0.0001f]], &&, binary_operation[member[.size], >, literal[0.00... | Keyword[public] Keyword[void] identifier[setFontAndSize] operator[SEP] identifier[BaseFont] identifier[bf] , Keyword[float] identifier[size] operator[SEP] {
identifier[checkWriter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[<] literal[Float] operator[&&] identi... |
private void addTopLeftLabel() {
topLeftLabel = new JLabel();
topLeftLabel.setOpaque(true);
topLeftLabel.setVisible(false);
centerPanel.add(topLeftLabel, CC.xywh(
constantTopLeftLabelCell.x, constantTopLeftLabelCell.y, 1, 3));
} | class class_name[name] begin[{]
method[addTopLeftLabel, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.topLeftLabel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=... | Keyword[private] Keyword[void] identifier[addTopLeftLabel] operator[SEP] operator[SEP] {
identifier[topLeftLabel] operator[=] Keyword[new] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[topLeftLabel] operator[SEP] identifier[setOpaque] operator[SEP] literal[boolean] operator[SEP] operato... |
public String partner_partnerId_DELETE(String partnerId) throws IOException {
String qPath = "/store/partner/{partnerId}";
StringBuilder sb = path(qPath, partnerId);
String resp = exec(qPath, "DELETE", sb.toString(), null);
return convertTo(resp, String.class);
} | class class_name[name] begin[{]
method[partner_partnerId_DELETE, return_type[type[String]], modifier[public], parameter[partnerId]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], resp]
return[call[.convertTo, par... | Keyword[public] identifier[String] identifier[partner_partnerId_DELETE] operator[SEP] identifier[String] identifier[partnerId] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=... |
public void setIopsToStorageRatio(java.util.Collection<DoubleRange> iopsToStorageRatio) {
if (iopsToStorageRatio == null) {
this.iopsToStorageRatio = null;
return;
}
this.iopsToStorageRatio = new com.amazonaws.internal.SdkInternalList<DoubleRange>(iopsToStorageRatio);
... | class class_name[name] begin[{]
method[setIopsToStorageRatio, return_type[void], modifier[public], parameter[iopsToStorageRatio]] begin[{]
if[binary_operation[member[.iopsToStorageRatio], ==, literal[null]]] begin[{]
assign[THIS[member[None.iopsToStorageRatio]], literal[... | Keyword[public] Keyword[void] identifier[setIopsToStorageRatio] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[DoubleRange] operator[>] identifier[iopsToStorageRatio] operator[SEP] {
Keyword[if] operator[SEP] identifier[iopsToStorageRatio... |
@SuppressWarnings("Duplicates")
protected void upgradeEnergiepassElements(Document doc) throws JaxenException {
Map<String, String> fields = new HashMap<>();
fields.put("hwbwert", "user_defined_simplefield[@feldname='epass_hwbwert']");
fields.put("hwbklasse", "user_defined_simplefield[@feldn... | class class_name[name] begin[{]
method[upgradeEnergiepassElements, return_type[void], modifier[protected], parameter[doc]] begin[{]
local_variable[type[Map], fields]
call[fields.put, parameter[literal["hwbwert"], literal["user_defined_simplefield[@feldname='epass_hwbwert']"]]]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[void] identifier[upgradeEnergiepassElements] operator[SEP] identifier[Document] identifier[doc] operator[SEP] Keyword[throws] identifier[JaxenException] {
identifier[Map] operator[<] identifier[Strin... |
public static String toXML(final Node aNode) throws TransformerException {
try {
final TransformerFactory transFactory = TransformerFactory.newInstance();
final Transformer transformer = transFactory.newTransformer();
final StringWriter buffer = new StringWriter();
... | class class_name[name] begin[{]
method[toXML, return_type[type[String]], modifier[public static], parameter[aNode]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix... | Keyword[public] Keyword[static] identifier[String] identifier[toXML] operator[SEP] Keyword[final] identifier[Node] identifier[aNode] operator[SEP] Keyword[throws] identifier[TransformerException] {
Keyword[try] {
Keyword[final] identifier[TransformerFactory] identifier[transFactory] operator[=] identi... |
public static @CheckForNull FilePathFilter current() {
Channel ch = Channel.current();
if (ch==null) return null;
return ch.getProperty(FilePathFilterAggregator.KEY);
} | class class_name[name] begin[{]
method[current, return_type[type[FilePathFilter]], modifier[public static], parameter[]] begin[{]
local_variable[type[Channel], ch]
if[binary_operation[member[.ch], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[... | Keyword[public] Keyword[static] annotation[@] identifier[CheckForNull] identifier[FilePathFilter] identifier[current] operator[SEP] operator[SEP] {
identifier[Channel] identifier[ch] operator[=] identifier[Channel] operator[SEP] identifier[current] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[S... |
private void loadLocalizationFromXmlBundle(Locale locale) {
CmsXmlContentValueSequence messages = m_xmlBundle.getValueSequence("Message", locale);
SortedProperties props = new SortedProperties();
if (null != messages) {
for (I_CmsXmlContentValue msg : messages.getValues()) {
... | class class_name[name] begin[{]
method[loadLocalizationFromXmlBundle, return_type[void], modifier[private], parameter[locale]] begin[{]
local_variable[type[CmsXmlContentValueSequence], messages]
local_variable[type[SortedProperties], props]
if[binary_operation[literal[null], !=,... | Keyword[private] Keyword[void] identifier[loadLocalizationFromXmlBundle] operator[SEP] identifier[Locale] identifier[locale] operator[SEP] {
identifier[CmsXmlContentValueSequence] identifier[messages] operator[=] identifier[m_xmlBundle] operator[SEP] identifier[getValueSequence] operator[SEP] literal[String] , ... |
public com.google.protobuf.ByteString
getSessionHandleBytes() {
java.lang.Object ref = sessionHandle_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sessionHandle_ = b;
... | class class_name[name] begin[{]
method[getSessionHandleBytes, return_type[type[com]], modifier[public], parameter[]] begin[{]
local_variable[type[java], ref]
if[binary_operation[member[.ref], instanceof, type[java]]] begin[{]
local_variable[type[com], b]
... | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[getSessionHandleBytes] operator[SEP] operator[SEP] {
identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] ide... |
public static String createDocumentFrom(ChunksManifestBean manifest) {
ChunksManifestDocument doc = ChunksManifestDocument.Factory
.newInstance();
if (null != manifest) {
ChunksManifestType manifestType = ManifestElementWriter.createChunksManifestElementFrom(
mani... | class class_name[name] begin[{]
method[createDocumentFrom, return_type[type[String]], modifier[public static], parameter[manifest]] begin[{]
local_variable[type[ChunksManifestDocument], doc]
if[binary_operation[literal[null], !=, member[.manifest]]] begin[{]
local_variable[t... | Keyword[public] Keyword[static] identifier[String] identifier[createDocumentFrom] operator[SEP] identifier[ChunksManifestBean] identifier[manifest] operator[SEP] {
identifier[ChunksManifestDocument] identifier[doc] operator[=] identifier[ChunksManifestDocument] operator[SEP] identifier[Factory] operator[SEP] ide... |
public long convertLocalToUTC(long instantLocal, boolean strict, long originalInstantUTC) {
int offsetOriginal = getOffset(originalInstantUTC);
long instantUTC = instantLocal - offsetOriginal;
int offsetLocalFromOriginal = getOffset(instantUTC);
if (offsetLocalFromOriginal == offsetOrigi... | class class_name[name] begin[{]
method[convertLocalToUTC, return_type[type[long]], modifier[public], parameter[instantLocal, strict, originalInstantUTC]] begin[{]
local_variable[type[int], offsetOriginal]
local_variable[type[long], instantUTC]
local_variable[type[int], offsetLocalFromOr... | Keyword[public] Keyword[long] identifier[convertLocalToUTC] operator[SEP] Keyword[long] identifier[instantLocal] , Keyword[boolean] identifier[strict] , Keyword[long] identifier[originalInstantUTC] operator[SEP] {
Keyword[int] identifier[offsetOriginal] operator[=] identifier[getOffset] operator[SEP] identifie... |
private Bitmap setPixels(GifFrame currentFrame, GifFrame previousFrame) {
// Final location of blended pixels.
final int[] dest = mainScratch;
// clear all pixels when meet first frame
if (previousFrame == null) {
Arrays.fill(dest, 0);
}
// fill in starting image contents based on last i... | class class_name[name] begin[{]
method[setPixels, return_type[type[Bitmap]], modifier[private], parameter[currentFrame, previousFrame]] begin[{]
local_variable[type[int], dest]
if[binary_operation[member[.previousFrame], ==, literal[null]]] begin[{]
call[Arrays.f... | Keyword[private] identifier[Bitmap] identifier[setPixels] operator[SEP] identifier[GifFrame] identifier[currentFrame] , identifier[GifFrame] identifier[previousFrame] operator[SEP] {
Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[dest] operator[=] identifier[mainScratch] operator[SEP] Keywor... |
public void onDriveButtonClicked(View arg0) {
Log.d(TAG, "Drive button clicked.");
if (!mSubscribedToInfiniteGas && mTank <= 0)
alert(R.string.out_of_gas_msg);
else {
if (!mSubscribedToInfiniteGas) --mTank;
saveData();
alert(R.string.spent_gas_msg)... | class class_name[name] begin[{]
method[onDriveButtonClicked, return_type[void], modifier[public], parameter[arg0]] begin[{]
call[Log.d, parameter[member[.TAG], literal["Drive button clicked."]]]
if[binary_operation[member[.mSubscribedToInfiniteGas], &&, binary_operation[member[.... | Keyword[public] Keyword[void] identifier[onDriveButtonClicked] operator[SEP] identifier[View] identifier[arg0] operator[SEP] {
identifier[Log] operator[SEP] identifier[d] operator[SEP] identifier[TAG] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[mSubscribedToInf... |
@PUT
@Path("/{iOSID}")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
public Response updateiOSVariant(
@MultipartForm iOSApplicationUploadForm updatedForm,
@PathParam("pushAppID") String pushApplicationId,
@PathParam("iOSID") String iO... | class class_name[name] begin[{]
method[updateiOSVariant, return_type[type[Response]], modifier[public], parameter[updatedForm, pushApplicationId, iOSID]] begin[{]
local_variable[type[iOSVariant], iOSVariant]
if[binary_operation[member[.iOSVariant], !=, literal[null]]] begin[{]
... | annotation[@] identifier[PUT] annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Consumes] operator[SEP] identifier[MediaType] operator[SEP] identifier[MULTIPART_FORM_DATA] operator[SEP] annotation[@] identifier[Produces] operator[SEP] identifier[MediaType] operator[SEP]... |
public HttpClientResponseBuilder doReturn(String response, Charset charset) {
return responseBuilder.doReturn(response, charset);
} | class class_name[name] begin[{]
method[doReturn, return_type[type[HttpClientResponseBuilder]], modifier[public], parameter[response, charset]] begin[{]
return[call[responseBuilder.doReturn, parameter[member[.response], member[.charset]]]]
end[}]
END[}] | Keyword[public] identifier[HttpClientResponseBuilder] identifier[doReturn] operator[SEP] identifier[String] identifier[response] , identifier[Charset] identifier[charset] operator[SEP] {
Keyword[return] identifier[responseBuilder] operator[SEP] identifier[doReturn] operator[SEP] identifier[response] , identifi... |
public boolean removeSubject(String language) {
language = determineLanguage(language);
for (Subject subject : subjects) {
if (language.equals(subject.language)) {
return subjects.remove(subject);
}
}
return false;
} | class class_name[name] begin[{]
method[removeSubject, return_type[type[boolean]], modifier[public], parameter[language]] begin[{]
assign[member[.language], call[.determineLanguage, parameter[member[.language]]]]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condit... | Keyword[public] Keyword[boolean] identifier[removeSubject] operator[SEP] identifier[String] identifier[language] operator[SEP] {
identifier[language] operator[=] identifier[determineLanguage] operator[SEP] identifier[language] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Subject] identifier[... |
public boolean containsColumn(final String tableName, final String column) {
return containsTable(tableName) && tables.get(tableName).getColumns().keySet().contains(column.toLowerCase());
} | class class_name[name] begin[{]
method[containsColumn, return_type[type[boolean]], modifier[public], parameter[tableName, column]] begin[{]
return[binary_operation[call[.containsTable, parameter[member[.tableName]]], &&, call[tables.get, parameter[member[.tableName]]]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[containsColumn] operator[SEP] Keyword[final] identifier[String] identifier[tableName] , Keyword[final] identifier[String] identifier[column] operator[SEP] {
Keyword[return] identifier[containsTable] operator[SEP] identifier[tableName] operator[SEP] operator[&&] identi... |
private RandomVariable getA(double time, double maturity) {
int timeIndex = getProcess().getTimeIndex(time);
double timeStep = getProcess().getTimeDiscretization().getTimeStep(timeIndex);
RandomVariable zeroRate = getZeroRateFromForwardCurve(time); //getDiscountFactorFromForwardCurve(time).div(getDiscountFactorF... | class class_name[name] begin[{]
method[getA, return_type[type[RandomVariable]], modifier[private], parameter[time, maturity]] begin[{]
local_variable[type[int], timeIndex]
local_variable[type[double], timeStep]
local_variable[type[RandomVariable], zeroRate]
local_variable[type[R... | Keyword[private] identifier[RandomVariable] identifier[getA] operator[SEP] Keyword[double] identifier[time] , Keyword[double] identifier[maturity] operator[SEP] {
Keyword[int] identifier[timeIndex] operator[=] identifier[getProcess] operator[SEP] operator[SEP] operator[SEP] identifier[getTimeIndex] operator[SEP... |
protected void initMembers(HttpServletRequest req, Throwable t) {
// get the status error attribute values from the request
m_servletName = (String)req.getAttribute(ERROR_SERVLET_NAME);
m_errorMessage = (String)req.getAttribute(ERROR_MESSAGE);
m_requestUri = (String)req.getAttribute(ERR... | class class_name[name] begin[{]
method[initMembers, return_type[void], modifier[protected], parameter[req, t]] begin[{]
assign[member[.m_servletName], Cast(expression=MethodInvocation(arguments=[MemberReference(member=ERROR_SERVLET_NAME, postfix_operators=[], prefix_operators=[], qualifier=, se... | Keyword[protected] Keyword[void] identifier[initMembers] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[Throwable] identifier[t] operator[SEP] {
identifier[m_servletName] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[req] operator[SEP] identifier[getAttribute] ... |
public boolean isOverrideOfQOSByProducerAllowed()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "isOverrideOfQOSByProducerAllowed");
boolean isOverrideOfQOSByProducerAllowed = definition.isOverrideOfQOSByProducerAllowed();
if (TraceComponent.isAnyTracin... | class class_name[name] begin[{]
method[isOverrideOfQOSByProducerAllowed, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entr... | Keyword[public] Keyword[boolean] identifier[isOverrideOfQOSByProducerAllowed] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[... |
public void putAll(Map<? extends T, ?> m) {
for (Map.Entry<? extends T, ?> e : m.entrySet()) {
put(e.getKey(), e.getValue());
}
} | class class_name[name] begin[{]
method[putAll, return_type[void], modifier[public], parameter[m]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_opera... | Keyword[public] Keyword[void] identifier[putAll] operator[SEP] identifier[Map] operator[<] operator[?] Keyword[extends] identifier[T] , operator[?] operator[>] identifier[m] operator[SEP] {
Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] operator[?] Keyword[extends] identi... |
public void setSSLSocketFactory() {
if (isClassAvailable(SOCKET_FACTORY_CLASS)) {
AccessController.doPrivileged(
new PrivilegedAction<Object>() {
@Override
public Obj... | class class_name[name] begin[{]
method[setSSLSocketFactory, return_type[void], modifier[public], parameter[]] begin[{]
if[call[.isClassAvailable, parameter[member[.SOCKET_FACTORY_CLASS]]]] begin[{]
call[AccessController.doPrivileged, parameter[ClassCreator(arguments=[], ... | Keyword[public] Keyword[void] identifier[setSSLSocketFactory] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isClassAvailable] operator[SEP] identifier[SOCKET_FACTORY_CLASS] operator[SEP] operator[SEP] {
identifier[AccessController] operator[SEP] identifier[doPrivileged] operator[S... |
private boolean isMoreToReadBeforeReadingRecord(
final SequenceOffsetType recordSequenceNumber,
final SequenceOffsetType endSequenceNumber
)
{
final int compareToEnd = createSequenceNumber(recordSequenceNumber)
.compareTo(createSequenceNumber(endSequenceNumber));
return isEndOffsetExclu... | class class_name[name] begin[{]
method[isMoreToReadBeforeReadingRecord, return_type[type[boolean]], modifier[private], parameter[recordSequenceNumber, endSequenceNumber]] begin[{]
local_variable[type[int], compareToEnd]
return[TernaryExpression(condition=MethodInvocation(arguments=[], member=is... | Keyword[private] Keyword[boolean] identifier[isMoreToReadBeforeReadingRecord] operator[SEP] Keyword[final] identifier[SequenceOffsetType] identifier[recordSequenceNumber] , Keyword[final] identifier[SequenceOffsetType] identifier[endSequenceNumber] operator[SEP] {
Keyword[final] Keyword[int] identifier[compareT... |
public static Media mediaUploadnews(String access_token, List<Article> articles) {
return MediaAPI.mediaUploadnews(access_token, articles);
} | class class_name[name] begin[{]
method[mediaUploadnews, return_type[type[Media]], modifier[public static], parameter[access_token, articles]] begin[{]
return[call[MediaAPI.mediaUploadnews, parameter[member[.access_token], member[.articles]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Media] identifier[mediaUploadnews] operator[SEP] identifier[String] identifier[access_token] , identifier[List] operator[<] identifier[Article] operator[>] identifier[articles] operator[SEP] {
Keyword[return] identifier[MediaAPI] operator[SEP] identifier[mediaUploadnew... |
@Override
public List<CommerceAddressRestriction> findAll() {
return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
} | class class_name[name] begin[{]
method[findAll, return_type[type[List]], modifier[public], parameter[]] begin[{]
return[call[.findAll, parameter[member[QueryUtil.ALL_POS], member[QueryUtil.ALL_POS], literal[null]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommerceAddressRestriction] operator[>] identifier[findAll] operator[SEP] operator[SEP] {
Keyword[return] identifier[findAll] operator[SEP] identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] o... |
public <V extends Object> WhereItems notIn(final String expression,
final V... array) {
items.add(new WhereIn(builder(), expression, true, array));
return this;
} | class class_name[name] begin[{]
method[notIn, return_type[type[WhereItems]], modifier[public], parameter[expression, array]] begin[{]
call[items.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors... | Keyword[public] operator[<] identifier[V] Keyword[extends] identifier[Object] operator[>] identifier[WhereItems] identifier[notIn] operator[SEP] Keyword[final] identifier[String] identifier[expression] , Keyword[final] identifier[V] operator[...] identifier[array] operator[SEP] {
identifier[items] operator[SEP]... |
public static InternalKnowledgeBase newKnowledgeBase(String kbaseId,
KieBaseConfiguration conf) {
return new KnowledgeBaseImpl( kbaseId, (RuleBaseConfiguration) conf);
} | class class_name[name] begin[{]
method[newKnowledgeBase, return_type[type[InternalKnowledgeBase]], modifier[public static], parameter[kbaseId, conf]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=kbaseId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expres... | Keyword[public] Keyword[static] identifier[InternalKnowledgeBase] identifier[newKnowledgeBase] operator[SEP] identifier[String] identifier[kbaseId] , identifier[KieBaseConfiguration] identifier[conf] operator[SEP] {
Keyword[return] Keyword[new] identifier[KnowledgeBaseImpl] operator[SEP] identifier[kbaseId] , ... |
public CollectionRequest<Tag> findByWorkspace(String workspace) {
String path = String.format("/workspaces/%s/tags", workspace);
return new CollectionRequest<Tag>(this, Tag.class, path, "GET");
} | class class_name[name] begin[{]
method[findByWorkspace, return_type[type[CollectionRequest]], modifier[public], parameter[workspace]] begin[{]
local_variable[type[String], path]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassRe... | Keyword[public] identifier[CollectionRequest] operator[<] identifier[Tag] operator[>] identifier[findByWorkspace] operator[SEP] identifier[String] identifier[workspace] operator[SEP] {
identifier[String] identifier[path] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String... |
private static int[] getMode3PrimaryCodewords(String postcode, int country, int service) {
int[] postcodeNums = new int[postcode.length()];
postcode = postcode.toUpperCase();
for (int i = 0; i < postcodeNums.length; i++) {
postcodeNums[i] = postcode.charAt(i);
if... | class class_name[name] begin[{]
method[getMode3PrimaryCodewords, return_type[type[int]], modifier[private static], parameter[postcode, country, service]] begin[{]
local_variable[type[int], postcodeNums]
assign[member[.postcode], call[postcode.toUpperCase, parameter[]]]
ForStatem... | Keyword[private] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[getMode3PrimaryCodewords] operator[SEP] identifier[String] identifier[postcode] , Keyword[int] identifier[country] , Keyword[int] identifier[service] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[postcode... |
public void marshall(FieldStats fieldStats, ProtocolMarshaller protocolMarshaller) {
if (fieldStats == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(fieldStats.getMin(), MIN_BINDING);
pr... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[fieldStats, protocolMarshaller]] begin[{]
if[binary_operation[member[.fieldStats], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[FieldStats] identifier[fieldStats] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[fieldStats] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keywo... |
private static List<UserCustomColumn> createColumns() {
List<UserCustomColumn> columns = new ArrayList<>();
columns.addAll(createRequiredColumns());
int index = columns.size();
columns.add(UserCustomColumn
.createColumn(index++, COLUMN_GEOMETRY_TYPE_NAME,
GeoPackageDataType.TEXT, false, null));
r... | class class_name[name] begin[{]
method[createColumns, return_type[type[List]], modifier[private static], parameter[]] begin[{]
local_variable[type[List], columns]
call[columns.addAll, parameter[call[.createRequiredColumns, parameter[]]]]
local_variable[type[int], index]
... | Keyword[private] Keyword[static] identifier[List] operator[<] identifier[UserCustomColumn] operator[>] identifier[createColumns] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[UserCustomColumn] operator[>] identifier[columns] operator[=] Keyword[new] identifier[ArrayList] operator[<] opera... |
@Override
public int compareTo(Seconds otherAmount) {
int thisValue = this.seconds;
int otherValue = otherAmount.seconds;
return Integer.compare(thisValue, otherValue);
} | class class_name[name] begin[{]
method[compareTo, return_type[type[int]], modifier[public], parameter[otherAmount]] begin[{]
local_variable[type[int], thisValue]
local_variable[type[int], otherValue]
return[call[Integer.compare, parameter[member[.thisValue], member[.otherValue]]]]
e... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Seconds] identifier[otherAmount] operator[SEP] {
Keyword[int] identifier[thisValue] operator[=] Keyword[this] operator[SEP] identifier[seconds] operator[SEP] Keyword[int] identifier[otherValue] operator... |
public OperationStatus deleteCustomEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId) {
return deleteCustomEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId).toBlocking().single().body();
} | class class_name[name] begin[{]
method[deleteCustomEntityRole, return_type[type[OperationStatus]], modifier[public], parameter[appId, versionId, entityId, roleId]] begin[{]
return[call[.deleteCustomEntityRoleWithServiceResponseAsync, parameter[member[.appId], member[.versionId], member[.entityId], memb... | Keyword[public] identifier[OperationStatus] identifier[deleteCustomEntityRole] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[entityId] , identifier[UUID] identifier[roleId] operator[SEP] {
Keyword[return] identifier[deleteCustomEntity... |
public com.google.api.ads.adwords.axis.v201809.cm.PromotionExtensionOccasion getOccasion() {
return occasion;
} | class class_name[name] begin[{]
method[getOccasion, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[member[.occasion]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[PromotionExtensionOccasion] identifier[get... |
public void setDictionary(byte[] b, int off, int len) {
if (b == null) {
throw new NullPointerException();
}
if (off < 0 || len < 0 || off > b.length - len) {
throw new ArrayIndexOutOfBoundsException();
}
synchronized (zsRef) {
ensureOpen();
... | class class_name[name] begin[{]
method[setDictionary, return_type[void], modifier[public], parameter[b, off, len]] begin[{]
if[binary_operation[member[.b], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, p... | Keyword[public] Keyword[void] identifier[setDictionary] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] {
Keyword[if] operator[SEP] identifier[b] operator[==] Other[null] operator[SEP] {
Keyword[throw] ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.