code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void installSmartCardTrustAnchor(String cert) throws HostConfigFault, RuntimeFault, RemoteException {
getVimService().installSmartCardTrustAnchor(getMOR(), cert);
} | class class_name[name] begin[{]
method[installSmartCardTrustAnchor, return_type[void], modifier[public], parameter[cert]] begin[{]
call[.getVimService, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[installSmartCardTrustAnchor] operator[SEP] identifier[String] identifier[cert] operator[SEP] Keyword[throws] identifier[HostConfigFault] , identifier[RuntimeFault] , identifier[RemoteException] {
identifier[getVimService] operator[SEP] operator[SEP] operator[SEP] identi... |
public Document loadDocument(String uri) throws Exception
{
FileObject file = getFileObject( uri );
if (!file.exists()) throw new DocumentNotFoundException( file.getURL() );
return createDocument(file);
} | class class_name[name] begin[{]
method[loadDocument, return_type[type[Document]], modifier[public], parameter[uri]] begin[{]
local_variable[type[FileObject], file]
if[call[file.exists, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[]... | Keyword[public] identifier[Document] identifier[loadDocument] operator[SEP] identifier[String] identifier[uri] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[FileObject] identifier[file] operator[=] identifier[getFileObject] operator[SEP] identifier[uri] operator[SEP] operator[SEP] Keyword[if] ... |
public void check( JnlpDependencyConfig config )
{
if ( config == null )
{
throw new NullPointerException( "config can't be null" );
}
if ( config.getArtifact() == null )
{
throw new NullPointerException( "config.artifact can't be null" );
}
... | class class_name[name] begin[{]
method[check, return_type[void], modifier[public], parameter[config]] begin[{]
if[binary_operation[member[.config], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], quali... | Keyword[public] Keyword[void] identifier[check] operator[SEP] identifier[JnlpDependencyConfig] identifier[config] operator[SEP] {
Keyword[if] operator[SEP] identifier[config] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[Str... |
private boolean ensureDataInBuffer() throws IOException {
if (mBufferOffset < mBufferedSize) {
return true;
}
final int readData = mInputStream.read(mByteArray);
if (readData <= 0) {
return false;
}
mBufferedSize = readData;
mBufferOffset = 0;
return true;
} | class class_name[name] begin[{]
method[ensureDataInBuffer, return_type[type[boolean]], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.mBufferOffset], <, member[.mBufferedSize]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
lo... | Keyword[private] Keyword[boolean] identifier[ensureDataInBuffer] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[mBufferOffset] operator[<] identifier[mBufferedSize] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
... |
public Result compile(String[] args) {
Context context = new Context();
JavacFileManager.preRegister(context); // can't create it until Log has been set up
Result result = compile(args, context);
if (fileManager instanceof JavacFileManager) {
try {
// A fresh ... | class class_name[name] begin[{]
method[compile, return_type[type[Result]], modifier[public], parameter[args]] begin[{]
local_variable[type[Context], context]
call[JavacFileManager.preRegister, parameter[member[.context]]]
local_variable[type[Result], result]
if[b... | Keyword[public] identifier[Result] identifier[compile] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
identifier[Context] identifier[context] operator[=] Keyword[new] identifier[Context] operator[SEP] operator[SEP] operator[SEP] identifier[JavacFileManager] operator... |
public void toAssocRateVector(Term t, CrossTable table, AssociationRate assocRateFunction, boolean normalize) {
double assocRate;
for(Entry coterm:t.getContext().getEntries()) {
ContextData contextData = computeContextData(table, t, coterm.getCoTerm());
assocRate = assocRateFunction.getValue(contextData);
... | class class_name[name] begin[{]
method[toAssocRateVector, return_type[void], modifier[public], parameter[t, table, assocRateFunction, normalize]] begin[{]
local_variable[type[double], assocRate]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], de... | Keyword[public] Keyword[void] identifier[toAssocRateVector] operator[SEP] identifier[Term] identifier[t] , identifier[CrossTable] identifier[table] , identifier[AssociationRate] identifier[assocRateFunction] , Keyword[boolean] identifier[normalize] operator[SEP] {
Keyword[double] identifier[assocRate] operato... |
public static FileOrder fromName(final String name) {
if (name == null) {
return null;
}
for (final FileOrder fo : INSTANCES) {
if (fo.name.equals(name)) {
return fo;
}
}
throw new IllegalArgumentException("Unknown name... | class class_name[name] begin[{]
method[fromName, return_type[type[FileOrder]], modifier[public static], parameter[name]] begin[{]
if[binary_operation[member[.name], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
ForStatement(body... | Keyword[public] Keyword[static] identifier[FileOrder] identifier[fromName] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyw... |
public Date changeDate(Date date, int delta) {
return adjustDate(date, Calendar.DATE, delta);
} | class class_name[name] begin[{]
method[changeDate, return_type[type[Date]], modifier[public], parameter[date, delta]] begin[{]
return[call[.adjustDate, parameter[member[.date], member[Calendar.DATE], member[.delta]]]]
end[}]
END[}] | Keyword[public] identifier[Date] identifier[changeDate] operator[SEP] identifier[Date] identifier[date] , Keyword[int] identifier[delta] operator[SEP] {
Keyword[return] identifier[adjustDate] operator[SEP] identifier[date] , identifier[Calendar] operator[SEP] identifier[DATE] , identifier[delta] operator[SEP]... |
@SuppressWarnings("unchecked")
protected Map<String, Map<String, List<String>>> getAddedRemovedPartition(Map<PartitionEntry, Integer> previous,
Map<PartitionEntry, Integer> current,
... | class class_name[name] begin[{]
method[getAddedRemovedPartition, return_type[type[Map]], modifier[protected], parameter[previous, current, node]] begin[{]
local_variable[type[Map], output]
call[output.put, parameter[literal["added"], ClassCreator(arguments=[], body=None, constructor_typ... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] operator[>] identifier[getAddedRemovedPart... |
public int compareTo(ClassFileVersion other) {
return Integer.signum(getMajorVersion() == other.getMajorVersion()
? getMinorVersion() - other.getMinorVersion()
: getMajorVersion() - other.getMajorVersion());
} | class class_name[name] begin[{]
method[compareTo, return_type[type[int]], modifier[public], parameter[other]] begin[{]
return[call[Integer.signum, parameter[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getMajorVersion, postfix_operators=[], prefix_operators... | Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[ClassFileVersion] identifier[other] operator[SEP] {
Keyword[return] identifier[Integer] operator[SEP] identifier[signum] operator[SEP] identifier[getMajorVersion] operator[SEP] operator[SEP] operator[==] identifier[other] operator[SEP] i... |
private void loadTemplates() throws CDKException {
try (InputStream gin = getClass().getResourceAsStream(TEMPLATE_PATH);
InputStream in = new GZIPInputStream(gin);
IteratingSDFReader sdfr = new IteratingSDFReader(in, builder)) {
while (sdfr.hasNext()) {
fina... | class class_name[name] begin[{]
method[loadTemplates, return_type[void], modifier[private], parameter[]] begin[{]
TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvo... | Keyword[private] Keyword[void] identifier[loadTemplates] operator[SEP] operator[SEP] Keyword[throws] identifier[CDKException] {
Keyword[try] operator[SEP] identifier[InputStream] identifier[gin] operator[=] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceAsStream] operator[SE... |
public void setInstanceInformationFilterList(java.util.Collection<InstanceInformationFilter> instanceInformationFilterList) {
if (instanceInformationFilterList == null) {
this.instanceInformationFilterList = null;
return;
}
this.instanceInformationFilterList = new com.am... | class class_name[name] begin[{]
method[setInstanceInformationFilterList, return_type[void], modifier[public], parameter[instanceInformationFilterList]] begin[{]
if[binary_operation[member[.instanceInformationFilterList], ==, literal[null]]] begin[{]
assign[THIS[member[No... | Keyword[public] Keyword[void] identifier[setInstanceInformationFilterList] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[InstanceInformationFilter] operator[>] identifier[instanceInformationFilterList] operator[SEP] {
Keyword[if] operato... |
private Object doNewInner(Object obj, boolean toLHS,
CallStack callstack, Interpreter interpreter) throws EvalError {
BSHAllocationExpression alloc = (BSHAllocationExpression) jjtGetChild(0);
if (Reflect.isGeneratedClass(obj.getClass())) {
callstack.pop();
callstack.p... | class class_name[name] begin[{]
method[doNewInner, return_type[type[Object]], modifier[private], parameter[obj, toLHS, callstack, interpreter]] begin[{]
local_variable[type[BSHAllocationExpression], alloc]
if[call[Reflect.isGeneratedClass, parameter[call[obj.getClass, parameter[]]]]] be... | Keyword[private] identifier[Object] identifier[doNewInner] operator[SEP] identifier[Object] identifier[obj] , Keyword[boolean] identifier[toLHS] , identifier[CallStack] identifier[callstack] , identifier[Interpreter] identifier[interpreter] operator[SEP] Keyword[throws] identifier[EvalError] {
identifier[BSHA... |
void completed(long bytesAffected) {
boolean needToFire = true;
synchronized (this.completedSemaphore) {
// If it's already completed, do nothing
if (this.completed || !this.channel.isOpen()) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
... | class class_name[name] begin[{]
method[completed, return_type[void], modifier[default], parameter[bytesAffected]] begin[{]
local_variable[type[boolean], needToFire]
SYNCHRONIZED[THIS[member[None.completedSemaphore]]] BEGIN[{]
if[binary_operation[THIS[member[None.... | Keyword[void] identifier[completed] operator[SEP] Keyword[long] identifier[bytesAffected] operator[SEP] {
Keyword[boolean] identifier[needToFire] operator[=] literal[boolean] operator[SEP] Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] identifier[completedSemaphore] operator[SEP] {
Ke... |
@Pure
public static String makeInternalId(UUID uid) {
final StringBuilder buf = new StringBuilder("nowhere(?"); //$NON-NLS-1$
buf.append(uid.toString());
buf.append("?)"); //$NON-NLS-1$
return Encryption.md5(buf.toString());
} | class class_name[name] begin[{]
method[makeInternalId, return_type[type[String]], modifier[public static], parameter[uid]] begin[{]
local_variable[type[StringBuilder], buf]
call[buf.append, parameter[call[uid.toString, parameter[]]]]
call[buf.append, parameter[literal["?... | annotation[@] identifier[Pure] Keyword[public] Keyword[static] identifier[String] identifier[makeInternalId] operator[SEP] identifier[UUID] identifier[uid] operator[SEP] {
Keyword[final] identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] literal[String] ope... |
public DObjectManager getClientDObjectMgr (final int clientOid)
{
return new DObjectManager() {
public boolean isManager (DObject object) {
return LocalDObjectMgr.this.isManager(object);
}
public <T extends DObject> void subscribeToObject (int oid, Subscri... | class class_name[name] begin[{]
method[getClientDObjectMgr, return_type[type[DObjectManager]], modifier[public], parameter[clientOid]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qual... | Keyword[public] identifier[DObjectManager] identifier[getClientDObjectMgr] operator[SEP] Keyword[final] Keyword[int] identifier[clientOid] operator[SEP] {
Keyword[return] Keyword[new] identifier[DObjectManager] operator[SEP] operator[SEP] {
Keyword[public] Keyword[boolean] identifier[isManager] operat... |
private JsonPathMessageValidationContext getJsonPathValidationContext() {
if (jsonPathValidationContext == null) {
jsonPathValidationContext = new JsonPathMessageValidationContext();
getAction().getValidationContexts().add(jsonPathValidationContext);
}
return jsonPathVa... | class class_name[name] begin[{]
method[getJsonPathValidationContext, return_type[type[JsonPathMessageValidationContext]], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.jsonPathValidationContext], ==, literal[null]]] begin[{]
assign[member[.jsonPath... | Keyword[private] identifier[JsonPathMessageValidationContext] identifier[getJsonPathValidationContext] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[jsonPathValidationContext] operator[==] Other[null] operator[SEP] {
identifier[jsonPathValidationContext] operator[=] Keyword[new] i... |
public void shallowCopy(ITuple tupleDest) {
for(Field field: this.getSchema().getFields()) {
tupleDest.set(field.getName(), this.get(field.getName()));
}
} | class class_name[name] begin[{]
method[shallowCopy, return_type[void], modifier[public], parameter[tupleDest]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[]... | Keyword[public] Keyword[void] identifier[shallowCopy] operator[SEP] identifier[ITuple] identifier[tupleDest] operator[SEP] {
Keyword[for] operator[SEP] identifier[Field] identifier[field] operator[:] Keyword[this] operator[SEP] identifier[getSchema] operator[SEP] operator[SEP] operator[SEP] identifier[getFields... |
public <R> MapPartitionOperator<T, R> mapPartition(MapPartitionFunction<T, R> mapPartition) {
if (mapPartition == null) {
throw new NullPointerException("MapPartition function must not be null.");
}
String callLocation = Utils.getCallLocationName();
TypeInformation<R> resultType = TypeExtractor.getMapPartit... | class class_name[name] begin[{]
method[mapPartition, return_type[type[MapPartitionOperator]], modifier[public], parameter[mapPartition]] begin[{]
if[binary_operation[member[.mapPartition], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix... | Keyword[public] operator[<] identifier[R] operator[>] identifier[MapPartitionOperator] operator[<] identifier[T] , identifier[R] operator[>] identifier[mapPartition] operator[SEP] identifier[MapPartitionFunction] operator[<] identifier[T] , identifier[R] operator[>] identifier[mapPartition] operator[SEP] {
Key... |
public String addOffering(Offering offering) {
this.offeringsCollection.insertOne(offering.toDBObject());
this.offeringNames.add(offering.getName());
return offering.getName();
} | class class_name[name] begin[{]
method[addOffering, return_type[type[String]], modifier[public], parameter[offering]] begin[{]
THIS[member[None.offeringsCollection]call[None.insertOne, parameter[call[offering.toDBObject, parameter[]]]]]
THIS[member[None.offeringNames]call[None.a... | Keyword[public] identifier[String] identifier[addOffering] operator[SEP] identifier[Offering] identifier[offering] operator[SEP] {
Keyword[this] operator[SEP] identifier[offeringsCollection] operator[SEP] identifier[insertOne] operator[SEP] identifier[offering] operator[SEP] identifier[toDBObject] operator[SEP] ... |
public OobResponse getOobResponse(HttpServletRequest req)
throws GitkitServerException {
String gitkitToken = lookupCookie(req, cookieName);
return getOobResponse(req, gitkitToken);
} | class class_name[name] begin[{]
method[getOobResponse, return_type[type[OobResponse]], modifier[public], parameter[req]] begin[{]
local_variable[type[String], gitkitToken]
return[call[.getOobResponse, parameter[member[.req], member[.gitkitToken]]]]
end[}]
END[}] | Keyword[public] identifier[OobResponse] identifier[getOobResponse] operator[SEP] identifier[HttpServletRequest] identifier[req] operator[SEP] Keyword[throws] identifier[GitkitServerException] {
identifier[String] identifier[gitkitToken] operator[=] identifier[lookupCookie] operator[SEP] identifier[req] , identi... |
public void put(String hostname, int netId, InetAddress[] addresses) {
cache.put(new AddressCacheKey(hostname, netId), new AddressCacheEntry(addresses));
} | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[hostname, netId, addresses]] begin[{]
call[cache.put, parameter[ClassCreator(arguments=[MemberReference(member=hostname, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReferen... | Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[String] identifier[hostname] , Keyword[int] identifier[netId] , identifier[InetAddress] operator[SEP] operator[SEP] identifier[addresses] operator[SEP] {
identifier[cache] operator[SEP] identifier[put] operator[SEP] Keyword[new] identifier[... |
@Override
protected void doApply(final ApiRequest request, final IPolicyContext context, final CachingConfig config,
final IPolicyChain<ApiRequest> chain) {
if (config.getTtl() > 0) {
// Check to see if there is a cache entry for this request. If so, we need to
// short-... | class class_name[name] begin[{]
method[doApply, return_type[void], modifier[protected], parameter[request, context, config, chain]] begin[{]
if[binary_operation[call[config.getTtl, parameter[]], >, literal[0]]] begin[{]
local_variable[type[String], cacheId]
c... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[doApply] operator[SEP] Keyword[final] identifier[ApiRequest] identifier[request] , Keyword[final] identifier[IPolicyContext] identifier[context] , Keyword[final] identifier[CachingConfig] identifier[config] , Keyword[final] identifier[IPo... |
public Actions dragAndDropBy(WebElement source, int xOffset, int yOffset) {
if (isBuildingActions()) {
action.addAction(new ClickAndHoldAction(jsonMouse, (Locatable) source));
action.addAction(new MoveToOffsetAction(jsonMouse, null, xOffset, yOffset));
action.addAction(new ButtonReleaseAction(json... | class class_name[name] begin[{]
method[dragAndDropBy, return_type[type[Actions]], modifier[public], parameter[source, xOffset, yOffset]] begin[{]
if[call[.isBuildingActions, parameter[]]] begin[{]
call[action.addAction, parameter[ClassCreator(arguments=[MemberReference(m... | Keyword[public] identifier[Actions] identifier[dragAndDropBy] operator[SEP] identifier[WebElement] identifier[source] , Keyword[int] identifier[xOffset] , Keyword[int] identifier[yOffset] operator[SEP] {
Keyword[if] operator[SEP] identifier[isBuildingActions] operator[SEP] operator[SEP] operator[SEP] {
... |
public static void copyExternalAssets(AbstractWisdomMojo mojo, MavenResourcesFiltering filtering) throws IOException {
File in = new File(mojo.basedir, Constants.ASSETS_SRC_DIR);
if (!in.exists()) {
return;
}
File out = new File(mojo.getWisdomRootDirectory(), Constants.ASSETS... | class class_name[name] begin[{]
method[copyExternalAssets, return_type[void], modifier[public static], parameter[mojo, filtering]] begin[{]
local_variable[type[File], in]
if[call[in.exists, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] Keyword[void] identifier[copyExternalAssets] operator[SEP] identifier[AbstractWisdomMojo] identifier[mojo] , identifier[MavenResourcesFiltering] identifier[filtering] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[File] identifier[in] operator[=] Keyword[new] ... |
public static X509Certificate getMiddleCert() {
if (null == middleCert) {
String path = SDKConfig.getConfig().getMiddleCertPath();
if (!isEmpty(path)) {
initMiddleCert();
} else {
LogUtil.writeErrorLog(SDKConfig.SDK_MIDDLECERT_PATH + " not set in " + SDKConfig.FILE_NAME);
return null;
}
}
... | class class_name[name] begin[{]
method[getMiddleCert, return_type[type[X509Certificate]], modifier[public static], parameter[]] begin[{]
if[binary_operation[literal[null], ==, member[.middleCert]]] begin[{]
local_variable[type[String], path]
if[call[.isEmpty,... | Keyword[public] Keyword[static] identifier[X509Certificate] identifier[getMiddleCert] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[middleCert] operator[SEP] {
identifier[String] identifier[path] operator[=] identifier[SDKConfig] operator[SEP] identifier[g... |
boolean matches(int type, int child1, int child2) {
return matches(type, child1) && get(2, true).isA(child2);
} | class class_name[name] begin[{]
method[matches, return_type[type[boolean]], modifier[default], parameter[type, child1, child2]] begin[{]
return[binary_operation[call[.matches, parameter[member[.type], member[.child1]]], &&, call[.get, parameter[literal[2], literal[true]]]]]
end[}]
END[}] | Keyword[boolean] identifier[matches] operator[SEP] Keyword[int] identifier[type] , Keyword[int] identifier[child1] , Keyword[int] identifier[child2] operator[SEP] {
Keyword[return] identifier[matches] operator[SEP] identifier[type] , identifier[child1] operator[SEP] operator[&&] identifier[get] operator[SEP] ... |
public RestRequestInformation asRestRequestInformation() {
try {
return new RestRequestInformationImpl(
api, new URL(endpoint.getFullUrl(urlParameters)), queryParameters, headers, body);
} catch (MalformedURLException e) {
throw new AssertionError(e);
... | class class_name[name] begin[{]
method[asRestRequestInformation, return_type[type[RestRequestInformation]], modifier[public], parameter[]] begin[{]
TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=api, postfix_operators=[], prefix_operators=[], qualifier=, s... | Keyword[public] identifier[RestRequestInformation] identifier[asRestRequestInformation] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[return] Keyword[new] identifier[RestRequestInformationImpl] operator[SEP] identifier[api] , Keyword[new] identifier[URL] operator[SEP] identifier[endpoint] oper... |
@Override
@Deprecated
public void forEachRemaining(java.util.function.Consumer<? super Triple<A, B, C>> action) {
super.forEachRemaining(action);
} | class class_name[name] begin[{]
method[forEachRemaining, return_type[void], modifier[public], parameter[action]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=action, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forEachRemaining, postfix_opera... | annotation[@] identifier[Override] annotation[@] identifier[Deprecated] Keyword[public] Keyword[void] identifier[forEachRemaining] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[function] operator[SEP] identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[Triple]... |
public String put(final String key, String value) {
if (key == null || initProps == null)
return null;
return initProps.put(key, value);
} | class class_name[name] begin[{]
method[put, return_type[type[String]], modifier[public], parameter[key, value]] begin[{]
if[binary_operation[binary_operation[member[.key], ==, literal[null]], ||, binary_operation[member[.initProps], ==, literal[null]]]] begin[{]
return[literal[null]]
el... | Keyword[public] identifier[String] identifier[put] operator[SEP] Keyword[final] identifier[String] identifier[key] , identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[||] identifier[initProps] operator[==] Other[null] operator[SEP] K... |
public static ListeningExecutorService getExecutorService() {
if (Twilio.executorService == null) {
Twilio.executorService = MoreExecutors.listeningDecorator(Executors.newCachedThreadPool());
}
return Twilio.executorService;
} | class class_name[name] begin[{]
method[getExecutorService, return_type[type[ListeningExecutorService]], modifier[public static], parameter[]] begin[{]
if[binary_operation[member[Twilio.executorService], ==, literal[null]]] begin[{]
assign[member[Twilio.executorService], ... | Keyword[public] Keyword[static] identifier[ListeningExecutorService] identifier[getExecutorService] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[Twilio] operator[SEP] identifier[executorService] operator[==] Other[null] operator[SEP] {
identifier[Twilio] operator[SEP] identifier[... |
private void scanAnnotation(List<AuthzHandler> authzArray,
List<Annotation> annotations) {
if (null == annotations || 0 == annotations.size()) {
return;
}
for (Annotation a : annotations) {
if (a instanceof RequiresRoles) {
... | class class_name[name] begin[{]
method[scanAnnotation, return_type[void], modifier[private], parameter[authzArray, annotations]] begin[{]
if[binary_operation[binary_operation[literal[null], ==, member[.annotations]], ||, binary_operation[literal[0], ==, call[annotations.size, parameter[]]]]] be... | Keyword[private] Keyword[void] identifier[scanAnnotation] operator[SEP] identifier[List] operator[<] identifier[AuthzHandler] operator[>] identifier[authzArray] , identifier[List] operator[<] identifier[Annotation] operator[>] identifier[annotations] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operato... |
public synchronized void await()
{
if (!started.get())
{
throw new LionEngineException(ERROR_NOT_STARTED);
}
try
{
thread.join();
}
catch (final InterruptedException exception)
{
Thread.currentThread().in... | class class_name[name] begin[{]
method[await, return_type[void], modifier[synchronized public], parameter[]] begin[{]
if[call[started.get, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR_NOT_STARTED, postfix_operators=[], prefix_... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[await] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[started] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[LionEngineException] operator[S... |
public int getIndexOfMinValue(int channel){
double[] values = getData()[channel];
int index = 0;
double val = values[index];
for(int i = 1; i < numValues(); i++){
if(values[i] < val){
index = i;
val = values[index];
}
}
return index;
} | class class_name[name] begin[{]
method[getIndexOfMinValue, return_type[type[int]], modifier[public], parameter[channel]] begin[{]
local_variable[type[double], values]
local_variable[type[int], index]
local_variable[type[double], val]
ForStatement(body=BlockStatement(label=None, ... | Keyword[public] Keyword[int] identifier[getIndexOfMinValue] operator[SEP] Keyword[int] identifier[channel] operator[SEP] {
Keyword[double] operator[SEP] operator[SEP] identifier[values] operator[=] identifier[getData] operator[SEP] operator[SEP] operator[SEP] identifier[channel] operator[SEP] operator[SEP] Keywo... |
public static void generate(Elements elementUtils, Filer filer, SQLiteDatabaseSchema schema) throws Exception {
BindDaoBuilder visitor = new BindDaoBuilder(elementUtils, filer);
for (SQLiteDaoDefinition item : schema.getCollection()) {
item.accept(visitor);
}
} | class class_name[name] begin[{]
method[generate, return_type[void], modifier[public static], parameter[elementUtils, filer, schema]] begin[{]
local_variable[type[BindDaoBuilder], visitor]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(ar... | Keyword[public] Keyword[static] Keyword[void] identifier[generate] operator[SEP] identifier[Elements] identifier[elementUtils] , identifier[Filer] identifier[filer] , identifier[SQLiteDatabaseSchema] identifier[schema] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[BindDaoBuilder] identifier[... |
public static void prm2bits_ld8k_b(
int anau[], /* input : encoded parameters (PRM_SIZE parameters) */
byte dst[] /* output: serial bits (SERIAL_SIZE ) bits[0] = bfi
bits[1] = 80 */
)
{
dst[0] = (byte)(anau[0] & 255);
dst[1] = (... | class class_name[name] begin[{]
method[prm2bits_ld8k_b, return_type[void], modifier[public static], parameter[anau, dst]] begin[{]
assign[member[.dst], Cast(expression=BinaryOperation(operandl=MemberReference(member=anau, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySe... | Keyword[public] Keyword[static] Keyword[void] identifier[prm2bits_ld8k_b] operator[SEP] Keyword[int] identifier[anau] operator[SEP] operator[SEP] , Keyword[byte] identifier[dst] operator[SEP] operator[SEP] operator[SEP] {
identifier[dst] operator[SEP] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[byt... |
@Override
public boolean remove(Widget w) {
// Validate.
if (w.getParent() != this) {
return false;
}
// Orphan.
try {
orphan(w);
} finally {
// Physical detach.
Element elem = w.getElement();
// NOTE (issue ... | class class_name[name] begin[{]
method[remove, return_type[type[boolean]], modifier[public], parameter[w]] begin[{]
if[binary_operation[call[w.getParent, parameter[]], !=, THIS[]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
TryStatement(block=[... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[remove] operator[SEP] identifier[Widget] identifier[w] operator[SEP] {
Keyword[if] operator[SEP] identifier[w] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[!=] Keyword[this] operator[SEP] {
Keywo... |
@Override
protected String escapeCharacter(char ch, char previousChar) {
switch (ch) {
case '"':
return "\\\"";
case '\\':
return "\\\\";
case '\t':
return "\\t";
case '\n':
return "\\n";
... | class class_name[name] begin[{]
method[escapeCharacter, return_type[type[String]], modifier[protected], parameter[ch, previousChar]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='"')], statements=[Return... | annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[escapeCharacter] operator[SEP] Keyword[char] identifier[ch] , Keyword[char] identifier[previousChar] operator[SEP] {
Keyword[switch] operator[SEP] identifier[ch] operator[SEP] {
Keyword[case] literal[String] operator[... |
public PropertyInterface getProperty() {
if (property == null) {
property = Properties.getPropertyByPath(classHolder.getClazz(), path);
}
return property;
} | class class_name[name] begin[{]
method[getProperty, return_type[type[PropertyInterface]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.property], ==, literal[null]]] begin[{]
assign[member[.property], call[Properties.getPropertyByPath, parameter[ca... | Keyword[public] identifier[PropertyInterface] identifier[getProperty] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[property] operator[==] Other[null] operator[SEP] {
identifier[property] operator[=] identifier[Properties] operator[SEP] identifier[getPropertyByPath] operator[SEP] ... |
public int getMaxBW(Node n1, Node n2) {
int max = Integer.MAX_VALUE;
for (Link inf : getPath(n1, n2)) {
if (inf.getCapacity() < max) {
max = inf.getCapacity();
}
Switch sw = inf.getSwitch();
if (sw.getCapacity() >= 0 && sw.getCapacity() < m... | class class_name[name] begin[{]
method[getMaxBW, return_type[type[int]], modifier[public], parameter[n1, n2]] begin[{]
local_variable[type[int], max]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=get... | Keyword[public] Keyword[int] identifier[getMaxBW] operator[SEP] identifier[Node] identifier[n1] , identifier[Node] identifier[n2] operator[SEP] {
Keyword[int] identifier[max] operator[=] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] Keyword[for] operator[SEP] identifier[Link] identifier[... |
public static <T> ClassAccessor<T> of(Class<T> type, PrefabValues prefabValues) {
return new ClassAccessor<>(type, prefabValues);
} | class class_name[name] begin[{]
method[of, return_type[type[ClassAccessor]], modifier[public static], parameter[type, prefabValues]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=prefabVa... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[ClassAccessor] operator[<] identifier[T] operator[>] identifier[of] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , identifier[PrefabValues] identifier[prefabValues] operator[SEP] {
Keyword[... |
public void marshall(StopFleetRequest stopFleetRequest, ProtocolMarshaller protocolMarshaller) {
if (stopFleetRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(stopFleetRequest.getName(), NAM... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[stopFleetRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.stopFleetRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postf... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[StopFleetRequest] identifier[stopFleetRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[stopFleetRequest] operator[==] Other[null] operator[SEP] {
Ke... |
@Override
public String getDfsPath () {
if ( this.dfsReferral == null ) {
return null;
}
return "smb:/" + this.dfsReferral.getServer() + "/" + this.dfsReferral.getShare() + this.getUNCPath().replace('\\', '/');
} | class class_name[name] begin[{]
method[getDfsPath, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.dfsReferral]], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
return[binar... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getDfsPath] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[dfsReferral] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Ke... |
public List<Kotsu> getKotsuKantsu() {
List<Kotsu> kotsuList = new ArrayList<>(this.kotsuList);
for (Kantsu kantsu : kantsuList) {
kotsuList.add(new Kotsu(kantsu.isOpen(), kantsu.getTile()));
}
return kotsuList;
} | class class_name[name] begin[{]
method[getKotsuKantsu, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], kotsuList]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(argument... | Keyword[public] identifier[List] operator[<] identifier[Kotsu] operator[>] identifier[getKotsuKantsu] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Kotsu] operator[>] identifier[kotsuList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] Keyword[this] o... |
public void setSocketBindingPort(String socketBindingGroupName, String socketBindingName, int port)
throws Exception {
setSocketBindingPortExpression(socketBindingGroupName, socketBindingName, null, port);
} | class class_name[name] begin[{]
method[setSocketBindingPort, return_type[void], modifier[public], parameter[socketBindingGroupName, socketBindingName, port]] begin[{]
call[.setSocketBindingPortExpression, parameter[member[.socketBindingGroupName], member[.socketBindingName], literal[null], memb... | Keyword[public] Keyword[void] identifier[setSocketBindingPort] operator[SEP] identifier[String] identifier[socketBindingGroupName] , identifier[String] identifier[socketBindingName] , Keyword[int] identifier[port] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[setSocketBindingPortExpression] ... |
public static JSONObject parseFromResourceBundle(ResourceBundle bundle) {
JSONObject jsonObject = new JSONObject();
Enumeration<String> keys = bundle.getKeys();
while (keys.hasMoreElements()) {
String key = keys.nextElement();
if (key != null) {
InternalJSONUtil.propertyPut(jsonObject, key, bundle... | class class_name[name] begin[{]
method[parseFromResourceBundle, return_type[type[JSONObject]], modifier[public static], parameter[bundle]] begin[{]
local_variable[type[JSONObject], jsonObject]
local_variable[type[Enumeration], keys]
while[call[keys.hasMoreElements, parameter[]]]... | Keyword[public] Keyword[static] identifier[JSONObject] identifier[parseFromResourceBundle] operator[SEP] identifier[ResourceBundle] identifier[bundle] operator[SEP] {
identifier[JSONObject] identifier[jsonObject] operator[=] Keyword[new] identifier[JSONObject] operator[SEP] operator[SEP] operator[SEP] identifier... |
public static nshttpprofile get(nitro_service service, String name) throws Exception{
nshttpprofile obj = new nshttpprofile();
obj.set_name(name);
nshttpprofile response = (nshttpprofile) obj.get_resource(service);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[nshttpprofile]], modifier[public static], parameter[service, name]] begin[{]
local_variable[type[nshttpprofile], obj]
call[obj.set_name, parameter[member[.name]]]
local_variable[type[nshttpprofile], response]
r... | Keyword[public] Keyword[static] identifier[nshttpprofile] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[nshttpprofile] identifier[obj] operator[=] Keyword[new] identifier[nshttppr... |
public static CharsetDecoder decoder(Charset charset, CodingErrorAction codingErrorAction) {
return decoder(charset, codingErrorAction, codingErrorAction);
} | class class_name[name] begin[{]
method[decoder, return_type[type[CharsetDecoder]], modifier[public static], parameter[charset, codingErrorAction]] begin[{]
return[call[.decoder, parameter[member[.charset], member[.codingErrorAction], member[.codingErrorAction]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CharsetDecoder] identifier[decoder] operator[SEP] identifier[Charset] identifier[charset] , identifier[CodingErrorAction] identifier[codingErrorAction] operator[SEP] {
Keyword[return] identifier[decoder] operator[SEP] identifier[charset] , identifier[codingErrorAction... |
public Observable<RouteTableInner> createOrUpdateAsync(String resourceGroupName, String routeTableName, RouteTableInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, parameters).map(new Func1<ServiceResponse<RouteTableInner>, RouteTableInner>() {
@Ove... | class class_name[name] begin[{]
method[createOrUpdateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, routeTableName, parameters]] begin[{]
return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.routeTableName], member[.par... | Keyword[public] identifier[Observable] operator[<] identifier[RouteTableInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[routeTableName] , identifier[RouteTableInner] identifier[parameters] operator[SEP] {
Keyword[... |
public static String getColumnFamily(Tree astNode, Iterable<CfDef> cfDefs)
{
return getColumnFamily(CliUtils.unescapeSQLString(astNode.getChild(0).getText()), cfDefs);
} | class class_name[name] begin[{]
method[getColumnFamily, return_type[type[String]], modifier[public static], parameter[astNode, cfDefs]] begin[{]
return[call[.getColumnFamily, parameter[call[CliUtils.unescapeSQLString, parameter[call[astNode.getChild, parameter[literal[0]]]]], member[.cfDefs]]]]
end... | Keyword[public] Keyword[static] identifier[String] identifier[getColumnFamily] operator[SEP] identifier[Tree] identifier[astNode] , identifier[Iterable] operator[<] identifier[CfDef] operator[>] identifier[cfDefs] operator[SEP] {
Keyword[return] identifier[getColumnFamily] operator[SEP] identifier[CliUtils] ope... |
protected Script getCompiledScript() {
if (getScript == null) {
GroovyShell shell = new GroovyShell();
getScript = shell.parse(getExpression());
}
return getScript;
} | class class_name[name] begin[{]
method[getCompiledScript, return_type[type[Script]], modifier[protected], parameter[]] begin[{]
if[binary_operation[member[.getScript], ==, literal[null]]] begin[{]
local_variable[type[GroovyShell], shell]
assign[member[.getScr... | Keyword[protected] identifier[Script] identifier[getCompiledScript] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[getScript] operator[==] Other[null] operator[SEP] {
identifier[GroovyShell] identifier[shell] operator[=] Keyword[new] identifier[GroovyShell] operator[SEP] operator[S... |
@CallerSensitive
public static Connection getConnection(String url,
String user, String password) throws SQLException {
java.util.Properties info = new java.util.Properties();
if (user != null) {
info.put("user", user);
}
if (password != null) {
info.... | class class_name[name] begin[{]
method[getConnection, return_type[type[Connection]], modifier[public static], parameter[url, user, password]] begin[{]
local_variable[type[java], info]
if[binary_operation[member[.user], !=, literal[null]]] begin[{]
call[info.put, ... | annotation[@] identifier[CallerSensitive] Keyword[public] Keyword[static] identifier[Connection] identifier[getConnection] operator[SEP] identifier[String] identifier[url] , identifier[String] identifier[user] , identifier[String] identifier[password] operator[SEP] Keyword[throws] identifier[SQLException] {
id... |
@Override
public ExtendedIterator<T> descendingIterator() {
// prepare the sorted set
final Collection<T> sorted;
//TODO
// if (elements instanceof SortedSet<?> || elements instanceof List<?>) {
// //NOTE: SortedSet.comparator() is null
// sorted = elements;
// } else {
sorted = new ArrayList<T>(... | class class_name[name] begin[{]
method[descendingIterator, return_type[type[ExtendedIterator]], modifier[public], parameter[]] begin[{]
local_variable[type[Collection], sorted]
assign[member[.sorted], ClassCreator(arguments=[MemberReference(member=elements, postfix_operators=[], prefix_... | annotation[@] identifier[Override] Keyword[public] identifier[ExtendedIterator] operator[<] identifier[T] operator[>] identifier[descendingIterator] operator[SEP] operator[SEP] {
Keyword[final] identifier[Collection] operator[<] identifier[T] operator[>] identifier[sorted] operator[SEP] identifier[sorted] operat... |
private Node rewriteCallExpression(Node call, DecompositionState state) {
checkArgument(call.isCall(), call);
Node first = call.getFirstChild();
checkArgument(NodeUtil.isGet(first), first);
// Find the type of (fn expression).call
JSType fnType = first.getJSType();
JSType fnCallType = null;
... | class class_name[name] begin[{]
method[rewriteCallExpression, return_type[type[Node]], modifier[private], parameter[call, state]] begin[{]
call[.checkArgument, parameter[call[call.isCall, parameter[]], member[.call]]]
local_variable[type[Node], first]
call[.checkArgument... | Keyword[private] identifier[Node] identifier[rewriteCallExpression] operator[SEP] identifier[Node] identifier[call] , identifier[DecompositionState] identifier[state] operator[SEP] {
identifier[checkArgument] operator[SEP] identifier[call] operator[SEP] identifier[isCall] operator[SEP] operator[SEP] , identifi... |
Object getDBInstance() throws Exception {
try {
// Get classloader from ektorp lib -- should we ensure it is the right version here?
ClassLoader loader = libraryRef.getServiceWithException().getClassLoader();
Class<?> couchDbClientOptionsBuilderCls = loader.loadCla... | class class_name[name] begin[{]
method[getDBInstance, return_type[type[Object]], modifier[default], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getServiceWithException... | identifier[Object] identifier[getDBInstance] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[try] {
identifier[ClassLoader] identifier[loader] operator[=] identifier[libraryRef] operator[SEP] identifier[getServiceWithException] operator[SEP] operator[SEP] operator[SEP] iden... |
public CSLDate parse(String str) {
Map<String, Object> res;
try {
Map<String, Object> m = runner.callMethod(
parser, "parseDateToArray", Map.class, str);
res = m;
} catch (ScriptRunnerException e) {
throw new IllegalArgumentException("Could not update items", e);
}
CSLDate r = CSLDate.fromJso... | class class_name[name] begin[{]
method[parse, return_type[type[CSLDate]], modifier[public], parameter[str]] begin[{]
local_variable[type[Map], res]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=... | Keyword[public] identifier[CSLDate] identifier[parse] operator[SEP] identifier[String] identifier[str] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[res] operator[SEP] Keyword[try] {
identifier[Map] operator[<] identifier[String] , identif... |
public boolean isLocalSipURI(SipURI uri) {
checkState();
// XXX: InetAddress api is
// crude.....!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ListeningPoint lp = this.provider.getListeningPoint(uri
.getTransportParam());
if (lp != null && lp.getIPAddress().equals(uri.getHost())
&& lp.ge... | class class_name[name] begin[{]
method[isLocalSipURI, return_type[type[boolean]], modifier[public], parameter[uri]] begin[{]
call[.checkState, parameter[]]
local_variable[type[ListeningPoint], lp]
if[binary_operation[binary_operation[binary_operation[member[.lp], !=, lit... | Keyword[public] Keyword[boolean] identifier[isLocalSipURI] operator[SEP] identifier[SipURI] identifier[uri] operator[SEP] {
identifier[checkState] operator[SEP] operator[SEP] operator[SEP] identifier[ListeningPoint] identifier[lp] operator[=] Keyword[this] operator[SEP] identifier[provider] operator[SEP] identif... |
public void marshall(MonitoringConfiguration monitoringConfiguration, ProtocolMarshaller protocolMarshaller) {
if (monitoringConfiguration == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(monitoring... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[monitoringConfiguration, protocolMarshaller]] begin[{]
if[binary_operation[member[.monitoringConfiguration], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[MonitoringConfiguration] identifier[monitoringConfiguration] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[monitoringConfiguration] operator[==] Other[null] operator... |
public static <T> Callable<T> recover(Callable<T> callable, Function<Exception, T> exceptionHandler){
return () -> {
try{
return callable.call();
}catch (Exception exception){
return exceptionHandler.apply(exception);
}
};
} | class class_name[name] begin[{]
method[recover, return_type[type[Callable]], modifier[public static], parameter[callable, exceptionHandler]] begin[{]
return[LambdaExpression(body=[TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=call, postfix_operators=[], prefix_ope... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Callable] operator[<] identifier[T] operator[>] identifier[recover] operator[SEP] identifier[Callable] operator[<] identifier[T] operator[>] identifier[callable] , identifier[Function] operator[<] identifier[Exception] , identifier[T] op... |
public static IntegerBinding floorDiv(final ObservableIntegerValue x, final ObservableIntegerValue y) {
return createIntegerBinding(() -> Math.floorDiv(x.get(), y.get()), x, y);
} | class class_name[name] begin[{]
method[floorDiv, return_type[type[IntegerBinding]], modifier[public static], parameter[x, y]] begin[{]
return[call[.createIntegerBinding, parameter[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_o... | Keyword[public] Keyword[static] identifier[IntegerBinding] identifier[floorDiv] operator[SEP] Keyword[final] identifier[ObservableIntegerValue] identifier[x] , Keyword[final] identifier[ObservableIntegerValue] identifier[y] operator[SEP] {
Keyword[return] identifier[createIntegerBinding] operator[SEP] operator[... |
public static DataSourceField createDataSourceField(AbstractReadOnlyAttributeInfo info) {
DataSourceField field = null;
List<Validator> validators = new ArrayList<Validator>();
if (info.getFormInputType() != null) {
String formInputType = info.getFormInputType();
DataSourceFieldFactory factory = DATA_SOURC... | class class_name[name] begin[{]
method[createDataSourceField, return_type[type[DataSourceField]], modifier[public static], parameter[info]] begin[{]
local_variable[type[DataSourceField], field]
local_variable[type[List], validators]
if[binary_operation[call[info.getFormInputType... | Keyword[public] Keyword[static] identifier[DataSourceField] identifier[createDataSourceField] operator[SEP] identifier[AbstractReadOnlyAttributeInfo] identifier[info] operator[SEP] {
identifier[DataSourceField] identifier[field] operator[=] Other[null] operator[SEP] identifier[List] operator[<] identifier[Valida... |
public DataMaskingPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).toBlocking().single().body();
} | class class_name[name] begin[{]
method[createOrUpdate, return_type[type[DataMaskingPolicyInner]], modifier[public], parameter[resourceGroupName, serverName, databaseName, parameters]] begin[{]
return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.serverName]... | Keyword[public] identifier[DataMaskingPolicyInner] identifier[createOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , identifier[String] identifier[databaseName] , identifier[DataMaskingPolicyInner] identifier[parameters] operator[SEP] {
Key... |
private static ServiceAccount getInstanceByEnvVars() {
Map<String, String> env = System.getenv();
String url = env.get(GP_URL);
String instanceId = env.get(GP_INSTANCE_ID);
String userId = env.get(GP_USER_ID);
String password = env.get(GP_PASSWORD);
String apiKey = env.ge... | class class_name[name] begin[{]
method[getInstanceByEnvVars, return_type[type[ServiceAccount]], modifier[private static], parameter[]] begin[{]
local_variable[type[Map], env]
local_variable[type[String], url]
local_variable[type[String], instanceId]
local_variable[type[String], ... | Keyword[private] Keyword[static] identifier[ServiceAccount] identifier[getInstanceByEnvVars] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[env] operator[=] identifier[System] operator[SEP] identifier[getenv] operator[SEP] operator[SEP] o... |
@SuppressWarnings("WeakerAccess")
public Entity getPluginSettings() {
String entityTypeId = DefaultSettingsEntityType.getSettingsEntityName(getId());
return RunAsSystemAspect.runAsSystem(() -> getPluginSettings(entityTypeId));
} | class class_name[name] begin[{]
method[getPluginSettings, return_type[type[Entity]], modifier[public], parameter[]] begin[{]
local_variable[type[String], entityTypeId]
return[call[RunAsSystemAspect.runAsSystem, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=e... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Entity] identifier[getPluginSettings] operator[SEP] operator[SEP] {
identifier[String] identifier[entityTypeId] operator[=] identifier[DefaultSettingsEntityType] operator[SEP] identifier[getSettingsE... |
@Override
public <T> TaskStatus<T> submit(Runnable runnable, T result) {
TaskInfo taskInfo = new TaskInfo(false);
taskInfo.initForOneShotTask(0l); // run immediately
return newTask(runnable, taskInfo, null, result);
} | class class_name[name] begin[{]
method[submit, return_type[type[TaskStatus]], modifier[public], parameter[runnable, result]] begin[{]
local_variable[type[TaskInfo], taskInfo]
call[taskInfo.initForOneShotTask, parameter[literal[0l]]]
return[call[.newTask, parameter[member[.runnab... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[TaskStatus] operator[<] identifier[T] operator[>] identifier[submit] operator[SEP] identifier[Runnable] identifier[runnable] , identifier[T] identifier[result] operator[SEP] {
identifier[TaskInfo] identifier[task... |
public EntityMention getEntity_mentions(int i) {
if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_mentions == null)
jcasType.jcas.throwFeatMissing("entity_mentions", "de.julielab.jules.types.ace.Entity");
jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Entity_Type)... | class class_name[name] begin[{]
method[getEntity_mentions, return_type[type[EntityMention]], modifier[public], parameter[i]] begin[{]
if[binary_operation[member[Entity_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[... | Keyword[public] identifier[EntityMention] identifier[getEntity_mentions] operator[SEP] Keyword[int] identifier[i] operator[SEP] {
Keyword[if] operator[SEP] identifier[Entity_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[Entity_Type] operator[SEP] identifier[jcasTyp... |
private void quietRollback(Connection conn) {
if (null != conn) {
try {
conn.rollback();
} catch (Exception e) {
StaticLog.error(e);
}
}
} | class class_name[name] begin[{]
method[quietRollback, return_type[void], modifier[private], parameter[conn]] begin[{]
if[binary_operation[literal[null], !=, member[.conn]]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=rollback, po... | Keyword[private] Keyword[void] identifier[quietRollback] operator[SEP] identifier[Connection] identifier[conn] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[!=] identifier[conn] operator[SEP] {
Keyword[try] {
identifier[conn] operator[SEP] identifier[rollback] operator[... |
public static void decompress(File source, File target) throws IOException {
ZipInputStream zipIn = new ZipInputStream(new BufferedInputStream(new FileInputStream(source), BUFFER));
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(target));
zipIn.getNextEntry();
b... | class class_name[name] begin[{]
method[decompress, return_type[void], modifier[public static], parameter[source, target]] begin[{]
local_variable[type[ZipInputStream], zipIn]
local_variable[type[BufferedOutputStream], bos]
call[zipIn.getNextEntry, parameter[]]
local_vari... | Keyword[public] Keyword[static] Keyword[void] identifier[decompress] operator[SEP] identifier[File] identifier[source] , identifier[File] identifier[target] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[ZipInputStream] identifier[zipIn] operator[=] Keyword[new] identifier[ZipInputStream] op... |
@Deprecated
@Override
public void link(Activity context, SocializeAuthListener listener) {
linkForWrite(context, listener);
} | class class_name[name] begin[{]
method[link, return_type[void], modifier[public], parameter[context, listener]] begin[{]
call[.linkForWrite, parameter[member[.context], member[.listener]]]
end[}]
END[}] | annotation[@] identifier[Deprecated] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[link] operator[SEP] identifier[Activity] identifier[context] , identifier[SocializeAuthListener] identifier[listener] operator[SEP] {
identifier[linkForWrite] operator[SEP] identifier[context] , ide... |
public void killAllProcesses( long blockTimeMS ) {
// remove already dead processes from the GUI
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
DefaultListModel model = (DefaultListModel)processList.getModel();
for (int i = model.size()-1; i >= 0; i--) {
ActiveProcess p... | class class_name[name] begin[{]
method[killAllProcesses, return_type[void], modifier[public], parameter[blockTimeMS]] begin[{]
call[SwingUtilities.invokeLater, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariable... | Keyword[public] Keyword[void] identifier[killAllProcesses] operator[SEP] Keyword[long] identifier[blockTimeMS] operator[SEP] {
identifier[SwingUtilities] operator[SEP] identifier[invokeLater] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] {
annotation[@] identifier[Overrid... |
public XMLNode parseXML(String root) throws DocFileIOException, SimpleDocletException {
if (!xmlElementsMap.containsKey(root)) {
try {
currentRoot = root;
isParsing = false;
SAXParserFactory factory = SAXParserFactory.newInstance();
SAX... | class class_name[name] begin[{]
method[parseXML, return_type[type[XMLNode]], modifier[public], parameter[root]] begin[{]
if[call[xmlElementsMap.containsKey, parameter[member[.root]]]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(... | Keyword[public] identifier[XMLNode] identifier[parseXML] operator[SEP] identifier[String] identifier[root] operator[SEP] Keyword[throws] identifier[DocFileIOException] , identifier[SimpleDocletException] {
Keyword[if] operator[SEP] operator[!] identifier[xmlElementsMap] operator[SEP] identifier[containsKey] ope... |
@SuppressWarnings("unchecked")
public S instantiate(RawSupport<S> support, byte[] key, byte[] value) throws FetchException {
try {
return (S) mInstanceFactory.instantiate(support, key, value);
} catch (CorruptEncodingException e) {
// Try to instantiate just the key and ... | class class_name[name] begin[{]
method[instantiate, return_type[type[S]], modifier[public], parameter[support, key, value]] begin[{]
TryStatement(block=[ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[MemberReference(member=support, postfix_operators=[], prefix_operators=[], qual... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[S] identifier[instantiate] operator[SEP] identifier[RawSupport] operator[<] identifier[S] operator[>] identifier[support] , Keyword[byte] operator[SEP] operator[SEP] identifier[key] , Keyword[byte] operat... |
public void addSocketHandler(String loggerName, Level handlerLevel, String handlerName, String formaterClassName, String filterClassName, String host,
int port) throws ManagementConsoleException {
try {
this.mbeanServer.invoke(logMgmtMBeanName, "addSocketHandler", new Object[] { loggerName, handler... | class class_name[name] begin[{]
method[addSocketHandler, return_type[void], modifier[public], parameter[loggerName, handlerLevel, handlerName, formaterClassName, filterClassName, host, port]] begin[{]
TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qua... | Keyword[public] Keyword[void] identifier[addSocketHandler] operator[SEP] identifier[String] identifier[loggerName] , identifier[Level] identifier[handlerLevel] , identifier[String] identifier[handlerName] , identifier[String] identifier[formaterClassName] , identifier[String] identifier[filterClassName] , identifi... |
public void initSessionFactories() {
if (sessionFactories == null) {
sessionFactories = new HashMap<Class<?>, SessionFactory>();
if (usingRelationalDatabase) {
initDbSqlSessionFactory();
}
addSessionFactory(new GenericManagerFactory(EntityCache.class, EntityCacheImpl.class));
}... | class class_name[name] begin[{]
method[initSessionFactories, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.sessionFactories], ==, literal[null]]] begin[{]
assign[member[.sessionFactories], ClassCreator(arguments=[], body=None, con... | Keyword[public] Keyword[void] identifier[initSessionFactories] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[sessionFactories] operator[==] Other[null] operator[SEP] {
identifier[sessionFactories] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[Class] operator[... |
private static ConnectionFactoryAttribute[] define(ConnectionFactoryAttribute[] specific, ConnectionFactoryAttribute... common) {
int size = common.length + specific.length;
ConnectionFactoryAttribute[] result = new ConnectionFactoryAttribute[size];
for (int i = 0; i < specific.length; i++) {
... | class class_name[name] begin[{]
method[define, return_type[type[ConnectionFactoryAttribute]], modifier[private static], parameter[specific, common]] begin[{]
local_variable[type[int], size]
local_variable[type[ConnectionFactoryAttribute], result]
ForStatement(body=BlockStatement(label=N... | Keyword[private] Keyword[static] identifier[ConnectionFactoryAttribute] operator[SEP] operator[SEP] identifier[define] operator[SEP] identifier[ConnectionFactoryAttribute] operator[SEP] operator[SEP] identifier[specific] , identifier[ConnectionFactoryAttribute] operator[...] identifier[common] operator[SEP] {
K... |
public void publish(byte[] message, EventBus bus) {
bus.publish(getBinaryWriteHandlerId(), Buffer.buffer(message));
} | class class_name[name] begin[{]
method[publish, return_type[void], modifier[public], parameter[message, bus]] begin[{]
call[bus.publish, parameter[call[.getBinaryWriteHandlerId, parameter[]], call[Buffer.buffer, parameter[member[.message]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[publish] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[message] , identifier[EventBus] identifier[bus] operator[SEP] {
identifier[bus] operator[SEP] identifier[publish] operator[SEP] identifier[getBinaryWriteHandlerId] operator[SEP] operator[SEP] , ... |
public static Sketch wrap(final Memory srcMem, final long seed) {
final int preLongs = srcMem.getByte(PREAMBLE_LONGS_BYTE) & 0X3F;
final int serVer = srcMem.getByte(SER_VER_BYTE) & 0XFF;
final int familyID = srcMem.getByte(FAMILY_BYTE) & 0XFF;
final Family family = Family.idToFamily(familyID);
swit... | class class_name[name] begin[{]
method[wrap, return_type[type[Sketch]], modifier[public static], parameter[srcMem, seed]] begin[{]
local_variable[type[int], preLongs]
local_variable[type[int], serVer]
local_variable[type[int], familyID]
local_variable[type[Family], family]
... | Keyword[public] Keyword[static] identifier[Sketch] identifier[wrap] operator[SEP] Keyword[final] identifier[Memory] identifier[srcMem] , Keyword[final] Keyword[long] identifier[seed] operator[SEP] {
Keyword[final] Keyword[int] identifier[preLongs] operator[=] identifier[srcMem] operator[SEP] identifier[getByte]... |
@Override
public AssetPage addAsset(AssetPage asset, boolean renderImmediately) {
final String assetKey = asset.getReference().toString();
if(assets.containsKey(assetKey)) {
return assets.get(assetKey);
}
else {
assets.put(assetKey, asset);
if(rend... | class class_name[name] begin[{]
method[addAsset, return_type[type[AssetPage]], modifier[public], parameter[asset, renderImmediately]] begin[{]
local_variable[type[String], assetKey]
if[call[assets.containsKey, parameter[member[.assetKey]]]] begin[{]
return[call[assets.get, p... | annotation[@] identifier[Override] Keyword[public] identifier[AssetPage] identifier[addAsset] operator[SEP] identifier[AssetPage] identifier[asset] , Keyword[boolean] identifier[renderImmediately] operator[SEP] {
Keyword[final] identifier[String] identifier[assetKey] operator[=] identifier[asset] operator[SEP] ... |
public void addOwner(String owner) {
if (this.owners == null) {
this.owners = new Hashtable<String, String>();
}
this.owners.put(owner, owner);
} | class class_name[name] begin[{]
method[addOwner, return_type[void], modifier[public], parameter[owner]] begin[{]
if[binary_operation[THIS[member[None.owners]], ==, literal[null]]] begin[{]
assign[THIS[member[None.owners]], ClassCreator(arguments=[], body=None, constructo... | Keyword[public] Keyword[void] identifier[addOwner] operator[SEP] identifier[String] identifier[owner] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[owners] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[owners] operator[=] Keyword[new... |
public static void uploadFileItems(final List<FileItem> fileItems, final Map<String, String[]> parameters,
final Map<String, FileItem[]> files) {
for (FileItem item : fileItems) {
String name = item.getFieldName();
boolean formField = item.isFormField();
if (LOG.isDebugEnabled()) {
LOG.debug(
... | class class_name[name] begin[{]
method[uploadFileItems, return_type[void], modifier[public static], parameter[fileItems, parameters, files]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initiali... | Keyword[public] Keyword[static] Keyword[void] identifier[uploadFileItems] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[FileItem] operator[>] identifier[fileItems] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[SEP] operator[SEP] operator[>] identi... |
private void invokeChunk() {
logger.entering(sourceClass, "invokeChunk");
List<Object> chunkToWrite = new ArrayList<Object>();
try {
transactionManager.begin();
this.openReaderAndWriter();
transactionManager.commit();
while (true) {
// Done with the previous chunk status so advance... | class class_name[name] begin[{]
method[invokeChunk, return_type[void], modifier[private], parameter[]] begin[{]
call[logger.entering, parameter[member[.sourceClass], literal["invokeChunk"]]]
local_variable[type[List], chunkToWrite]
TryStatement(block=[StatementExpression(express... | Keyword[private] Keyword[void] identifier[invokeChunk] operator[SEP] operator[SEP] {
identifier[logger] operator[SEP] identifier[entering] operator[SEP] identifier[sourceClass] , literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] identifier[chunkToWrite] oper... |
private static String getShortString(ByteBuffer buffer)
{
int len = buffer.get() & 0xff;
StringBuilder builder = new StringBuilder();
for (int i = 0; i < len; i++)
{
builder.append((char)(buffer.get() & 0xff));
}
String s = builder.toString();
ret... | class class_name[name] begin[{]
method[getShortString, return_type[type[String]], modifier[private static], parameter[buffer]] begin[{]
local_variable[type[int], len]
local_variable[type[StringBuilder], builder]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpressio... | Keyword[private] Keyword[static] identifier[String] identifier[getShortString] operator[SEP] identifier[ByteBuffer] identifier[buffer] operator[SEP] {
Keyword[int] identifier[len] operator[=] identifier[buffer] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[&] literal[Integer] operator[SEP] i... |
public static <K1, V1, K2, V2> MutableMap<K2, V2> collectIf(
Map<K1, V1> map,
final Function2<? super K1, ? super V1, Pair<K2, V2>> function,
final Predicate2<? super K1, ? super V1> predicate,
Map<K2, V2> target)
{
final MutableMap<K2, V2> result = MapAdapter... | class class_name[name] begin[{]
method[collectIf, return_type[type[MutableMap]], modifier[public static], parameter[map, function, predicate, target]] begin[{]
local_variable[type[MutableMap], result]
call[MapIterate.forEachKeyValue, parameter[member[.map], ClassCreator(arguments=[], bo... | Keyword[public] Keyword[static] operator[<] identifier[K1] , identifier[V1] , identifier[K2] , identifier[V2] operator[>] identifier[MutableMap] operator[<] identifier[K2] , identifier[V2] operator[>] identifier[collectIf] operator[SEP] identifier[Map] operator[<] identifier[K1] , identifier[V1] operator[>] identi... |
public static PushNotificationPayload combined(String message, int badge, String sound) {
if (message == null && badge < 0 && sound == null) throw new IllegalArgumentException("Must provide at least one non-null argument");
PushNotificationPayload payload = complex();
try {
if (message != null) payload.add... | class class_name[name] begin[{]
method[combined, return_type[type[PushNotificationPayload]], modifier[public static], parameter[message, badge, sound]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.message], ==, literal[null]], &&, binary_operation[member[.badge], <, li... | Keyword[public] Keyword[static] identifier[PushNotificationPayload] identifier[combined] operator[SEP] identifier[String] identifier[message] , Keyword[int] identifier[badge] , identifier[String] identifier[sound] operator[SEP] {
Keyword[if] operator[SEP] identifier[message] operator[==] Other[null] operator[&... |
@Override
public StringBuilder formatMeasures(
StringBuilder appendTo, FieldPosition fieldPosition, Measure... measures) {
return mf.formatMeasures(appendTo, fieldPosition, measures);
} | class class_name[name] begin[{]
method[formatMeasures, return_type[type[StringBuilder]], modifier[public], parameter[appendTo, fieldPosition, measures]] begin[{]
return[call[mf.formatMeasures, parameter[member[.appendTo], member[.fieldPosition], member[.measures]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[StringBuilder] identifier[formatMeasures] operator[SEP] identifier[StringBuilder] identifier[appendTo] , identifier[FieldPosition] identifier[fieldPosition] , identifier[Measure] operator[...] identifier[measures] operator[SEP] {
Keyword[return] ide... |
public void waitThreadStopped() { // FIXME: method named in confusing way
long sleepTime = threads.isEmpty() ? DEFAULT_TEMPORISATION : MIN_CHECK_TIME;
lock.lock();
try {
condition.await(sleepTime, TimeUnit.MILLISECONDS); // NOSONAR
} catch (InterruptedException e) {
... | class class_name[name] begin[{]
method[waitThreadStopped, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[long], sleepTime]
call[lock.lock, parameter[]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(... | Keyword[public] Keyword[void] identifier[waitThreadStopped] operator[SEP] operator[SEP] {
Keyword[long] identifier[sleepTime] operator[=] identifier[threads] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] identifier[DEFAULT_TEMPORISATION] operator[:] identifier[MIN_CHECK_TIME] operato... |
@Override
public QWhereSection prepare(final AbstractObjectQuery<?> _query)
throws EFapsException
{
this.part.prepare(_query, null);
return this;
} | class class_name[name] begin[{]
method[prepare, return_type[type[QWhereSection]], modifier[public], parameter[_query]] begin[{]
THIS[member[None.part]call[None.prepare, parameter[member[._query], literal[null]]]]
return[THIS[]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[QWhereSection] identifier[prepare] operator[SEP] Keyword[final] identifier[AbstractObjectQuery] operator[<] operator[?] operator[>] identifier[_query] operator[SEP] Keyword[throws] identifier[EFapsException] {
Keyword[this] operator[SEP] identifier[pa... |
public Tree getColumnsHeaderTree() {
if (columnsHeaderTree == null) {
Node root = new Node();
insertChildren(root, getFields(PivotField.Area.COLUMN));
columnsHeaderTree = new Tree(root);
}
return columnsHeaderTree;
} | class class_name[name] begin[{]
method[getColumnsHeaderTree, return_type[type[Tree]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.columnsHeaderTree], ==, literal[null]]] begin[{]
local_variable[type[Node], root]
call[.insertChildren, p... | Keyword[public] identifier[Tree] identifier[getColumnsHeaderTree] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[columnsHeaderTree] operator[==] Other[null] operator[SEP] {
identifier[Node] identifier[root] operator[=] Keyword[new] identifier[Node] operator[SEP] operator[SEP] opera... |
public void finest(String msg) {
if (Level.FINEST.intValue() < levelValue) {
return;
}
log(Level.FINEST, msg);
} | class class_name[name] begin[{]
method[finest, return_type[void], modifier[public], parameter[msg]] begin[{]
if[binary_operation[call[Level.FINEST.intValue, parameter[]], <, member[.levelValue]]] begin[{]
return[None]
else begin[{]
None
end[}]
call[.l... | Keyword[public] Keyword[void] identifier[finest] operator[SEP] identifier[String] identifier[msg] operator[SEP] {
Keyword[if] operator[SEP] identifier[Level] operator[SEP] identifier[FINEST] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[<] identifier[levelValue] operator[SEP] {
... |
@SafeVarargs
public static <R, P extends Policy<R>> FailsafeExecutor<R> with(P... policies) {
return new FailsafeExecutor<>(Arrays.asList(Assert.notNull(policies, "policies")));
} | class class_name[name] begin[{]
method[with, return_type[type[FailsafeExecutor]], modifier[public static], parameter[policies]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=policies, postfix_operators=[], prefix_operators=[], qua... | annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] operator[<] identifier[R] , identifier[P] Keyword[extends] identifier[Policy] operator[<] identifier[R] operator[>] operator[>] identifier[FailsafeExecutor] operator[<] identifier[R] operator[>] identifier[with] operator[SEP] identifier[P] operator[... |
public static Header valueExists(final String value)
{
return new Header("{" + Header.class.getName() + "_name}", value) {
@Override
public String toString()
{
return "Header.valueExists(\"" + value + "\")";
}
};
} | class class_name[name] begin[{]
method[valueExists, return_type[type[Header]], modifier[public static], parameter[value]] begin[{]
return[ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="{")... | Keyword[public] Keyword[static] identifier[Header] identifier[valueExists] operator[SEP] Keyword[final] identifier[String] identifier[value] operator[SEP] {
Keyword[return] Keyword[new] identifier[Header] operator[SEP] literal[String] operator[+] identifier[Header] operator[SEP] Keyword[class] operator[SEP] iden... |
public void reset() {
bestSolutionStepIndex = -1;
// TODO Usage of solverScope.getBestScore() would be better performance wise but is null with a uninitialized score
startingScore = solverScope.calculateScore();
if (getLastCompletedStepScope().getStepIndex() < 0) {
getLastCom... | class class_name[name] begin[{]
method[reset, return_type[void], modifier[public], parameter[]] begin[{]
assign[member[.bestSolutionStepIndex], literal[1]]
assign[member[.startingScore], call[solverScope.calculateScore, parameter[]]]
if[binary_operation[call[.get... | Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] {
identifier[bestSolutionStepIndex] operator[=] operator[-] Other[1] operator[SEP] identifier[startingScore] operator[=] identifier[solverScope] operator[SEP] identifier[calculateScore] operator[SEP] operator[SEP] operator[SEP] Keyword[i... |
@Override
public int compare(ILigand ligand1, ILigand ligand2) {
int numberComp = numberRule.compare(ligand1, ligand2);
if (numberComp != 0) return numberComp;
// OK, now I need to recurse...
ILigand[] ligand1Ligands = CIPTool.getLigandLigands(ligand1);
ILigand[] ligand2Liga... | class class_name[name] begin[{]
method[compare, return_type[type[int]], modifier[public], parameter[ligand1, ligand2]] begin[{]
local_variable[type[int], numberComp]
if[binary_operation[member[.numberComp], !=, literal[0]]] begin[{]
return[member[.numberComp]]
else begin[{]
None... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compare] operator[SEP] identifier[ILigand] identifier[ligand1] , identifier[ILigand] identifier[ligand2] operator[SEP] {
Keyword[int] identifier[numberComp] operator[=] identifier[numberRule] operator[SEP] identifier[compare] operator[SE... |
@Override
public synchronized int read(byte[] buf, int off, int len)
throws IOException {
//for the first read, skip the extra bytes at the front.
if (lastChunkLen < 0 && startOffset > firstChunkOffset) {
// Skip these bytes. But don't call this.skip()!
int toSkip =... | class class_name[name] begin[{]
method[read, return_type[type[int]], modifier[synchronized public], parameter[buf, off, len]] begin[{]
if[binary_operation[binary_operation[member[.lastChunkLen], <, literal[0]], &&, binary_operation[member[.startOffset], >, member[.firstChunkOffset]]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[int] identifier[read] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buf] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operat... |
public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getLimits() {
return limits_ == null
? com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance()
: limits_;
} | class class_name[name] begin[{]
method[getLimits, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=limits_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_op... | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[privacy] operator[SEP] identifier[dlp] operator[SEP] identifier[v2] operator[SEP] identifier[InspectConfig] operator[SEP] identifier[FindingLimits] identifier[getLimits] operator[SEP] operator[SEP] {
Keyword[return] identif... |
protected String parseOptionalWord(final boolean iUpperCase, final String... iWords) {
parserNextWord(iUpperCase);
if (iWords.length > 0) {
if (parserLastWord.length() == 0)
return null;
boolean found = false;
for (String w : iWords) {
if (parserLastWord.toString().e... | class class_name[name] begin[{]
method[parseOptionalWord, return_type[type[String]], modifier[protected], parameter[iUpperCase, iWords]] begin[{]
call[.parserNextWord, parameter[member[.iUpperCase]]]
if[binary_operation[member[iWords.length], >, literal[0]]] begin[{]
... | Keyword[protected] identifier[String] identifier[parseOptionalWord] operator[SEP] Keyword[final] Keyword[boolean] identifier[iUpperCase] , Keyword[final] identifier[String] operator[...] identifier[iWords] operator[SEP] {
identifier[parserNextWord] operator[SEP] identifier[iUpperCase] operator[SEP] operator[SEP... |
GatewayServer random(List<GatewayServer> list) {
return list.get(new Random().nextInt(list.size()));
} | class class_name[name] begin[{]
method[random, return_type[type[GatewayServer]], modifier[default], parameter[list]] begin[{]
return[call[list.get, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[Meth... | identifier[GatewayServer] identifier[random] operator[SEP] identifier[List] operator[<] identifier[GatewayServer] operator[>] identifier[list] operator[SEP] {
Keyword[return] identifier[list] operator[SEP] identifier[get] operator[SEP] Keyword[new] identifier[Random] operator[SEP] operator[SEP] operator[SEP] ide... |
public long accept() {
Lock readerLock = context.ctxLock.readLock();
readerLock.lock();
try {
return SSLContext.sessionAccept(context.ctx);
} finally {
readerLock.unlock();
}
} | class class_name[name] begin[{]
method[accept, return_type[type[long]], modifier[public], parameter[]] begin[{]
local_variable[type[Lock], readerLock]
call[readerLock.lock, parameter[]]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(me... | Keyword[public] Keyword[long] identifier[accept] operator[SEP] operator[SEP] {
identifier[Lock] identifier[readerLock] operator[=] identifier[context] operator[SEP] identifier[ctxLock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[readerLock] operator[SEP] identifier[loc... |
public static void main(String[] args) throws Exception {
if (args.length < 1)
throw new IllegalArgumentException("must supply a set of host:port tuples");
// Build a list of all member addresses to which to connect.
List<Address> members = new ArrayList<>();
for (String arg : args) {
Strin... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
if[binary_operation[member[args.length], <, literal[1]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=Non... | 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[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[<] Other[1] operator[SEP] Keyword... |
private void visitForOf(Node node, Node parent) {
Node variable = node.removeFirstChild();
Node iterable = node.removeFirstChild();
Node body = node.removeFirstChild();
JSType typeParam = unknownType;
if (addTypes) {
// TODO(sdh): This is going to be null if the iterable is nullable or unknow... | class class_name[name] begin[{]
method[visitForOf, return_type[void], modifier[private], parameter[node, parent]] begin[{]
local_variable[type[Node], variable]
local_variable[type[Node], iterable]
local_variable[type[Node], body]
local_variable[type[JSType], typeParam]
... | Keyword[private] Keyword[void] identifier[visitForOf] operator[SEP] identifier[Node] identifier[node] , identifier[Node] identifier[parent] operator[SEP] {
identifier[Node] identifier[variable] operator[=] identifier[node] operator[SEP] identifier[removeFirstChild] operator[SEP] operator[SEP] operator[SEP] iden... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.