code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
private PagedLater<T> createRequest(String pagedUrl)
{
// Parse the url to create a new GraphRequest<Paged<T>>.
URLParser parser = new URLParser(pagedUrl);
// Need to remove the access token, that gets added back later and isn't
// relevant for grouping.
parser.getParams().remove("access_token");
ret... | class class_name[name] begin[{]
method[createRequest, return_type[type[PagedLater]], modifier[private], parameter[pagedUrl]] begin[{]
local_variable[type[URLParser], parser]
call[parser.getParams, parameter[]]
return[THIS[member[None.batcher]call[None.paged, parameter[call[parse... | Keyword[private] identifier[PagedLater] operator[<] identifier[T] operator[>] identifier[createRequest] operator[SEP] identifier[String] identifier[pagedUrl] operator[SEP] {
identifier[URLParser] identifier[parser] operator[=] Keyword[new] identifier[URLParser] operator[SEP] identifier[pagedUrl] operator[SEP] op... |
public PushRules createPushRules(Object projectIdOrPath, PushRules pushRule) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("deny_delete_tag", pushRule.getDenyDeleteTag())
.withParam("member_check", pushRule.getMemberCheck())
.withParam("p... | class class_name[name] begin[{]
method[createPushRules, return_type[type[PushRules]], modifier[public], parameter[projectIdOrPath, pushRule]] begin[{]
local_variable[type[GitLabApiForm], formData]
local_variable[type[Response], response]
return[call[response.readEntity, parameter[ClassR... | Keyword[public] identifier[PushRules] identifier[createPushRules] operator[SEP] identifier[Object] identifier[projectIdOrPath] , identifier[PushRules] identifier[pushRule] operator[SEP] Keyword[throws] identifier[GitLabApiException] {
identifier[GitLabApiForm] identifier[formData] operator[=] Keyword[new] ident... |
public RetrySimulation executeSimulation(int numSimulations) {
RetrySimulation simulation = new RetrySimulation();
for (int i = 0; i < numSimulations; i++) {
simulation.addSequence(executeSingleSimulation());
}
return simulation;
} | class class_name[name] begin[{]
method[executeSimulation, return_type[type[RetrySimulation]], modifier[public], parameter[numSimulations]] begin[{]
local_variable[type[RetrySimulation], simulation]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInv... | Keyword[public] identifier[RetrySimulation] identifier[executeSimulation] operator[SEP] Keyword[int] identifier[numSimulations] operator[SEP] {
identifier[RetrySimulation] identifier[simulation] operator[=] Keyword[new] identifier[RetrySimulation] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[S... |
private Observable<Boolean> init(@NonNull final Application application, @NonNull final CallbackAdapter adapter) {
final Looper mainLooper = Looper.getMainLooper();
return Observable.create(sub -> {
try {
//logging
final LogConfig logConfig = config.getLog... | class class_name[name] begin[{]
method[init, return_type[type[Observable]], modifier[private], parameter[application, adapter]] begin[{]
local_variable[type[Looper], mainLooper]
return[call[Observable.create, parameter[LambdaExpression(body=[TryStatement(block=[LocalVariableDeclaration(annotati... | Keyword[private] identifier[Observable] operator[<] identifier[Boolean] operator[>] identifier[init] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Application] identifier[application] , annotation[@] identifier[NonNull] Keyword[final] identifier[CallbackAdapter] identifier[adapter] operator... |
public static String getEntryNameForList(String property, Integer index) {
return String.format("%s.%d", property, index);
} | class class_name[name] begin[{]
method[getEntryNameForList, return_type[type[String]], modifier[public static], parameter[property, index]] begin[{]
return[call[String.format, parameter[literal["%s.%d"], member[.property], member[.index]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[getEntryNameForList] operator[SEP] identifier[String] identifier[property] , identifier[Integer] identifier[index] operator[SEP] {
Keyword[return] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[propert... |
public boolean contains(final OffsetType x) {
return x.asInt() >= startInclusive().asInt() && x.asInt() <= endInclusive().asInt();
} | class class_name[name] begin[{]
method[contains, return_type[type[boolean]], modifier[public], parameter[x]] begin[{]
return[binary_operation[binary_operation[call[x.asInt, parameter[]], >=, call[.startInclusive, parameter[]]], &&, binary_operation[call[x.asInt, parameter[]], <=, call[.endInclusive, pa... | Keyword[public] Keyword[boolean] identifier[contains] operator[SEP] Keyword[final] identifier[OffsetType] identifier[x] operator[SEP] {
Keyword[return] identifier[x] operator[SEP] identifier[asInt] operator[SEP] operator[SEP] operator[>=] identifier[startInclusive] operator[SEP] operator[SEP] operator[SEP] ident... |
protected void activeStatusChanged(final boolean newActiveState)
{
// originally came from EXOJCR-1345.
// Deadlock occurs inside JGroups, if calling some operations inside the same thread,
// invoking ViewChanged. That's why, need to perform operation in separated async tread.
new Thread(ne... | class class_name[name] begin[{]
method[activeStatusChanged, return_type[void], modifier[protected], parameter[newActiveState]] begin[{]
ClassCreator(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=Assignment(expressionl=MemberRe... | Keyword[protected] Keyword[void] identifier[activeStatusChanged] operator[SEP] Keyword[final] Keyword[boolean] identifier[newActiveState] operator[SEP] {
Keyword[new] identifier[Thread] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifi... |
private void doResource(HttpServletRequest req, HttpServletResponse resp) throws IOException
{
boolean success = true;
String resource = (String) req.getParameter("id");
if (!isEmpty(resource))
{
if (resource.endsWith(".js"))
{
resp.setContentType("text/javascript");
} else i... | class class_name[name] begin[{]
method[doResource, return_type[void], modifier[private], parameter[req, resp]] begin[{]
local_variable[type[boolean], success]
local_variable[type[String], resource]
if[call[.isEmpty, parameter[member[.resource]]]] begin[{]
... | Keyword[private] Keyword[void] identifier[doResource] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[HttpServletResponse] identifier[resp] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[boolean] identifier[success] operator[=] literal[boolean] operator[SEP] identifier... |
@SuppressWarnings("unchecked")
public static synchronized <T> T invokeMethod(Object tested, Class<?> declaringClass, String methodToExecute,
Object... arguments) throws Exception {
return (T) doInvokeMethod(tested, declaringClass, methodToExecute, arguments)... | class class_name[name] begin[{]
method[invokeMethod, return_type[type[T]], modifier[synchronized public static], parameter[tested, declaringClass, methodToExecute, arguments]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=tested, postfix_operators=[], prefix_operato... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[synchronized] operator[<] identifier[T] operator[>] identifier[T] identifier[invokeMethod] operator[SEP] identifier[Object] identifier[tested] , identifier[Class] operator[<] operator[?] opera... |
@Override
public void setShadowPadding(int left, int top, int right, int bottom) {
mShadowBounds.set(left, top, right, bottom);
super.setPadding(left + mContentPadding.left, top + mContentPadding.top,
right + mContentPadding.right, bottom + mContentPadding.bottom);
} | class class_name[name] begin[{]
method[setShadowPadding, return_type[void], modifier[public], parameter[left, top, right, bottom]] begin[{]
call[mShadowBounds.set, parameter[member[.left], member[.top], member[.right], member[.bottom]]]
SuperMethodInvocation(arguments=[BinaryOpe... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setShadowPadding] operator[SEP] Keyword[int] identifier[left] , Keyword[int] identifier[top] , Keyword[int] identifier[right] , Keyword[int] identifier[bottom] operator[SEP] {
identifier[mShadowBounds] operator[SEP] identifier[set] op... |
@Override
public FilterReply decide(final ILoggingEvent event) {
final Marker marker = event.getMarker();
if (marker == this.marker) {
return FilterReply.NEUTRAL;
} else {
return FilterReply.DENY;
}
} | class class_name[name] begin[{]
method[decide, return_type[type[FilterReply]], modifier[public], parameter[event]] begin[{]
local_variable[type[Marker], marker]
if[binary_operation[member[.marker], ==, THIS[member[None.marker]]]] begin[{]
return[member[FilterReply.NEUTRAL]]
... | annotation[@] identifier[Override] Keyword[public] identifier[FilterReply] identifier[decide] operator[SEP] Keyword[final] identifier[ILoggingEvent] identifier[event] operator[SEP] {
Keyword[final] identifier[Marker] identifier[marker] operator[=] identifier[event] operator[SEP] identifier[getMarker] operator[SE... |
protected void BuildFDSubrsOffsets(int Font,int FD)
{
// Initiate to -1 to indicate lsubr operator present
fonts[Font].PrivateSubrsOffset[FD] = -1;
// Goto beginning of objects
seek(fonts[Font].fdprivateOffsets[FD]);
// While in the same object:
while (getPosition() < fonts[Font].fdprivat... | class class_name[name] begin[{]
method[BuildFDSubrsOffsets, return_type[void], modifier[protected], parameter[Font, FD]] begin[{]
assign[member[.fonts], literal[1]]
call[.seek, parameter[member[.fonts]]]
while[binary_operation[call[.getPosition, parameter[]], <, ... | Keyword[protected] Keyword[void] identifier[BuildFDSubrsOffsets] operator[SEP] Keyword[int] identifier[Font] , Keyword[int] identifier[FD] operator[SEP] {
identifier[fonts] operator[SEP] identifier[Font] operator[SEP] operator[SEP] identifier[PrivateSubrsOffset] operator[SEP] identifier[FD] operator[SEP] operat... |
public static BufferedWriter newWriter(Path self) throws IOException {
return Files.newBufferedWriter(self, Charset.defaultCharset());
} | class class_name[name] begin[{]
method[newWriter, return_type[type[BufferedWriter]], modifier[public static], parameter[self]] begin[{]
return[call[Files.newBufferedWriter, parameter[member[.self], call[Charset.defaultCharset, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[BufferedWriter] identifier[newWriter] operator[SEP] identifier[Path] identifier[self] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[Files] operator[SEP] identifier[newBufferedWriter] operator[SEP] identifier[self] , identifier[Chars... |
public static void setJdbcType(String typeName, int typeIndex, JdbcType type)
{
setJdbcTypeByName(typeName, type);
setJdbcTypeByTypesIndex(typeIndex, type);
} | class class_name[name] begin[{]
method[setJdbcType, return_type[void], modifier[public static], parameter[typeName, typeIndex, type]] begin[{]
call[.setJdbcTypeByName, parameter[member[.typeName], member[.type]]]
call[.setJdbcTypeByTypesIndex, parameter[member[.typeIndex], membe... | Keyword[public] Keyword[static] Keyword[void] identifier[setJdbcType] operator[SEP] identifier[String] identifier[typeName] , Keyword[int] identifier[typeIndex] , identifier[JdbcType] identifier[type] operator[SEP] {
identifier[setJdbcTypeByName] operator[SEP] identifier[typeName] , identifier[type] operator[... |
public static <I, X extends Throwable> ThrowingConsumer<Stream<I>, X> forEach(final ThrowingConsumer<I, X> consumer) {
return input -> {
if (input == null) {
return;
}
try {
input.forEach(consumer);
} finally {
inpu... | class class_name[name] begin[{]
method[forEach, return_type[type[ThrowingConsumer]], modifier[public static], parameter[consumer]] begin[{]
return[LambdaExpression(body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, s... | Keyword[public] Keyword[static] operator[<] identifier[I] , identifier[X] Keyword[extends] identifier[Throwable] operator[>] identifier[ThrowingConsumer] operator[<] identifier[Stream] operator[<] identifier[I] operator[>] , identifier[X] operator[>] identifier[forEach] operator[SEP] Keyword[final] identifier[Throwin... |
@Override
public Request<DeleteClientVpnEndpointRequest> getDryRunRequest() {
Request<DeleteClientVpnEndpointRequest> request = new DeleteClientVpnEndpointRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
} | class class_name[name] begin[{]
method[getDryRunRequest, return_type[type[Request]], modifier[public], parameter[]] begin[{]
local_variable[type[Request], request]
call[request.addParameter, parameter[literal["DryRun"], call[Boolean.toString, parameter[literal[true]]]]]
return[m... | annotation[@] identifier[Override] Keyword[public] identifier[Request] operator[<] identifier[DeleteClientVpnEndpointRequest] operator[>] identifier[getDryRunRequest] operator[SEP] operator[SEP] {
identifier[Request] operator[<] identifier[DeleteClientVpnEndpointRequest] operator[>] identifier[request] operator[... |
public static BCECPrivateKey convertPKCS8ToECPrivateKey(byte[] pkcs8Key)
throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException {
PKCS8EncodedKeySpec peks = new PKCS8EncodedKeySpec(pkcs8Key);
KeyFactory kf = KeyFactory.getInstance(ALGO_NAME_EC, BouncyCastleProvider.PRO... | class class_name[name] begin[{]
method[convertPKCS8ToECPrivateKey, return_type[type[BCECPrivateKey]], modifier[public static], parameter[pkcs8Key]] begin[{]
local_variable[type[PKCS8EncodedKeySpec], peks]
local_variable[type[KeyFactory], kf]
return[Cast(expression=MethodInvocation(argum... | Keyword[public] Keyword[static] identifier[BCECPrivateKey] identifier[convertPKCS8ToECPrivateKey] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[pkcs8Key] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] , identifier[NoSuchProviderException] , identifier[InvalidKeySpecException] ... |
public List<Addon> listAppAddons(String appName) {
return connection.execute(new AppAddonsList(appName), apiKey);
} | class class_name[name] begin[{]
method[listAppAddons, return_type[type[List]], modifier[public], parameter[appName]] begin[{]
return[call[connection.execute, parameter[ClassCreator(arguments=[MemberReference(member=appName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=Non... | Keyword[public] identifier[List] operator[<] identifier[Addon] operator[>] identifier[listAppAddons] operator[SEP] identifier[String] identifier[appName] operator[SEP] {
Keyword[return] identifier[connection] operator[SEP] identifier[execute] operator[SEP] Keyword[new] identifier[AppAddonsList] operator[SEP] ide... |
@Nonnull
public ExpressionTreeElement getRoot() {
if (last.isEmptySlot()) {
return this.last;
} else {
ExpressionTreeElement element = last;
while (!Thread.currentThread().isInterrupted()) {
final ExpressionTreeElement next = element.getParent();
if (next == null) {
... | class class_name[name] begin[{]
method[getRoot, return_type[type[ExpressionTreeElement]], modifier[public], parameter[]] begin[{]
if[call[last.isEmptySlot, parameter[]]] begin[{]
return[THIS[member[None.last]]]
else begin[{]
local_variable[type[ExpressionTreeElem... | annotation[@] identifier[Nonnull] Keyword[public] identifier[ExpressionTreeElement] identifier[getRoot] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[last] operator[SEP] identifier[isEmptySlot] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP]... |
@Override
public final boolean place(Trans trans, CertInfo certInfo, Artifact arti) throws CadiException {
validate(arti);
try {
// Obtain/setup directory as required
dir = new File(arti.getDir());
if(processed.get("dir")==null) {
if(!dir.exists()) {
Chmod.to755.chmod(dir);
if(!dir.mkdirs... | class class_name[name] begin[{]
method[place, return_type[type[boolean]], modifier[final public], parameter[trans, certInfo, arti]] begin[{]
call[.validate, parameter[member[.arti]]]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dir, po... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[boolean] identifier[place] operator[SEP] identifier[Trans] identifier[trans] , identifier[CertInfo] identifier[certInfo] , identifier[Artifact] identifier[arti] operator[SEP] Keyword[throws] identifier[CadiException] {
identifier[validat... |
protected boolean parse(HttpCode<TRANS, ?> code, String cntnt) {
byte bytes[] = cntnt.getBytes();
int cis,cie=-1,cend;
int sis,sie,send;
String name;
ArrayList<String> props = new ArrayList<String>();
do {
// Clear these in case more than one Semi
props.clear(); // on loop, do not want mixed proper... | class class_name[name] begin[{]
method[parse, return_type[type[boolean]], modifier[protected], parameter[code, cntnt]] begin[{]
local_variable[type[byte], bytes]
local_variable[type[int], cis]
local_variable[type[int], sis]
local_variable[type[String], name]
local_variab... | Keyword[protected] Keyword[boolean] identifier[parse] operator[SEP] identifier[HttpCode] operator[<] identifier[TRANS] , operator[?] operator[>] identifier[code] , identifier[String] identifier[cntnt] operator[SEP] {
Keyword[byte] identifier[bytes] operator[SEP] operator[SEP] operator[=] identifier[cntnt] oper... |
public static <T> Iterable<T> compose(final Iterable<Iterable<T>> iterables) {
return toIterable(new Iterator<T>() {
Iterator<Iterable<T>> it=iterables.iterator();
Iterator<T> current = null;
T next = null;
@Override
public boolean hasNext() {
... | class class_name[name] begin[{]
method[compose, return_type[type[Iterable]], modifier[public static], parameter[iterables]] begin[{]
return[call[.toIterable, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvo... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[compose] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[Iterable] operator[<] identifier[T] operator[>] operator[>] identifier[iterables] operator[SEP] {... |
public static <S> PAreaI<S> toPAreaI(final AreaI a)
{
Objects.requireNonNull(a, "area");
return PAreaI.of(a.minimumX(), a.maximumX(), a.minimumY(), a.maximumY());
} | class class_name[name] begin[{]
method[toPAreaI, return_type[type[PAreaI]], modifier[public static], parameter[a]] begin[{]
call[Objects.requireNonNull, parameter[member[.a], literal["area"]]]
return[call[PAreaI.of, parameter[call[a.minimumX, parameter[]], call[a.maximumX, parameter[]],... | Keyword[public] Keyword[static] operator[<] identifier[S] operator[>] identifier[PAreaI] operator[<] identifier[S] operator[>] identifier[toPAreaI] operator[SEP] Keyword[final] identifier[AreaI] identifier[a] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[a]... |
private void delete(ESSyncConfig config, Dml dml) {
List<Map<String, Object>> dataList = dml.getData();
if (dataList == null || dataList.isEmpty()) {
return;
}
SchemaItem schemaItem = config.getEsMapping().getSchemaItem();
for (Map<String, Object> data : dataList) {
... | class class_name[name] begin[{]
method[delete, return_type[void], modifier[private], parameter[config, dml]] begin[{]
local_variable[type[List], dataList]
if[binary_operation[binary_operation[member[.dataList], ==, literal[null]], ||, call[dataList.isEmpty, parameter[]]]] begin[{]
... | Keyword[private] Keyword[void] identifier[delete] operator[SEP] identifier[ESSyncConfig] identifier[config] , identifier[Dml] identifier[dml] operator[SEP] {
identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[dataList] operator[=]... |
private void field(AbstractClassTypeDeclarationBuilder declare) {
FieldDescrBuilder field = null;
String fname = null;
try {
fname = label(DroolsEditorType.IDENTIFIER);
if (state.failed)
return;
} catch (RecognitionException re) {
repor... | class class_name[name] begin[{]
method[field, return_type[void], modifier[private], parameter[declare]] begin[{]
local_variable[type[FieldDescrBuilder], field]
local_variable[type[String], fname]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(m... | Keyword[private] Keyword[void] identifier[field] operator[SEP] identifier[AbstractClassTypeDeclarationBuilder] identifier[declare] operator[SEP] {
identifier[FieldDescrBuilder] identifier[field] operator[=] Other[null] operator[SEP] identifier[String] identifier[fname] operator[=] Other[null] operator[SEP] Keywo... |
@Override
public AcceptQualificationRequestResult acceptQualificationRequest(AcceptQualificationRequestRequest request) {
request = beforeClientExecution(request);
return executeAcceptQualificationRequest(request);
} | class class_name[name] begin[{]
method[acceptQualificationRequest, return_type[type[AcceptQualificationRequestResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeAcceptQualificat... | annotation[@] identifier[Override] Keyword[public] identifier[AcceptQualificationRequestResult] identifier[acceptQualificationRequest] operator[SEP] identifier[AcceptQualificationRequestRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] id... |
public void setGeoMatchConstraints(java.util.Collection<GeoMatchConstraint> geoMatchConstraints) {
if (geoMatchConstraints == null) {
this.geoMatchConstraints = null;
return;
}
this.geoMatchConstraints = new java.util.ArrayList<GeoMatchConstraint>(geoMatchConstraints);
... | class class_name[name] begin[{]
method[setGeoMatchConstraints, return_type[void], modifier[public], parameter[geoMatchConstraints]] begin[{]
if[binary_operation[member[.geoMatchConstraints], ==, literal[null]]] begin[{]
assign[THIS[member[None.geoMatchConstraints]], lite... | Keyword[public] Keyword[void] identifier[setGeoMatchConstraints] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[GeoMatchConstraint] operator[>] identifier[geoMatchConstraints] operator[SEP] {
Keyword[if] operator[SEP] identifier[geoMatchC... |
boolean meetsRequirements(boolean checkRequirementsEnforced) {
if (checkRequirementsEnforced && !getParams().getRequest().requirementsEnforced()) {
return true;
}
if (!isRequirementChargingMet()) {
CAT.w("Job requires charging, reschedule");
return false;
... | class class_name[name] begin[{]
method[meetsRequirements, return_type[type[boolean]], modifier[default], parameter[checkRequirementsEnforced]] begin[{]
if[binary_operation[member[.checkRequirementsEnforced], &&, call[.getParams, parameter[]]]] begin[{]
return[literal[true]]
... | Keyword[boolean] identifier[meetsRequirements] operator[SEP] Keyword[boolean] identifier[checkRequirementsEnforced] operator[SEP] {
Keyword[if] operator[SEP] identifier[checkRequirementsEnforced] operator[&&] operator[!] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] identifier[getRequest] opera... |
public void throwIfUnsupportedFilter(Scan scan, Filter filter) {
List<FilterSupportStatus> filterSupportStatuses = new ArrayList<>();
FilterAdapterContext context = new FilterAdapterContext(scan, null);
collectUnsupportedStatuses(context, filter, filterSupportStatuses);
if (!filterSupportStatuses.isEmpt... | class class_name[name] begin[{]
method[throwIfUnsupportedFilter, return_type[void], modifier[public], parameter[scan, filter]] begin[{]
local_variable[type[List], filterSupportStatuses]
local_variable[type[FilterAdapterContext], context]
call[.collectUnsupportedStatuses, paramet... | Keyword[public] Keyword[void] identifier[throwIfUnsupportedFilter] operator[SEP] identifier[Scan] identifier[scan] , identifier[Filter] identifier[filter] operator[SEP] {
identifier[List] operator[<] identifier[FilterSupportStatus] operator[>] identifier[filterSupportStatuses] operator[=] Keyword[new] identifie... |
public static DatabaseLiaison getLiaison (String url)
{
if (url == null) throw new NullPointerException("URL must not be null");
// see if we already have a liaison mapped for this connection
DatabaseLiaison liaison = _mappings.get(url);
if (liaison == null) {
// scan the... | class class_name[name] begin[{]
method[getLiaison, return_type[type[DatabaseLiaison]], modifier[public static], parameter[url]] begin[{]
if[binary_operation[member[.url], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operator... | Keyword[public] Keyword[static] identifier[DatabaseLiaison] identifier[getLiaison] operator[SEP] identifier[String] identifier[url] operator[SEP] {
Keyword[if] operator[SEP] identifier[url] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[S... |
public static boolean matchPath(final String path, final String pattern) {
String[] pathElements = StringUtil.splitc(path, PATH_SEPARATORS);
String[] patternElements = StringUtil.splitc(pattern, PATH_SEPARATORS);
return matchTokens(pathElements, patternElements);
} | class class_name[name] begin[{]
method[matchPath, return_type[type[boolean]], modifier[public static], parameter[path, pattern]] begin[{]
local_variable[type[String], pathElements]
local_variable[type[String], patternElements]
return[call[.matchTokens, parameter[member[.pathElements], m... | Keyword[public] Keyword[static] Keyword[boolean] identifier[matchPath] operator[SEP] Keyword[final] identifier[String] identifier[path] , Keyword[final] identifier[String] identifier[pattern] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[pathElements] operator[=] identifier[StringUti... |
public void destroy() {
Command command = this.currentCommand.get();
if (command != null) {
command.setExceptionMessage("Connection has been closed");
command.countDown();
}
while ((command = this.commandAlreadySent.poll()) != null) {
command.setExceptionMessage("Connection has been closed");
comman... | class class_name[name] begin[{]
method[destroy, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[Command], command]
if[binary_operation[member[.command], !=, literal[null]]] begin[{]
call[command.setExceptionMessage, parameter[litera... | Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] {
identifier[Command] identifier[command] operator[=] Keyword[this] operator[SEP] identifier[currentCommand] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[command] operator... |
public void dispose() {
if (_cacheFile != null && _dirty) {
PrintStream out = null;
try {
File parent = _cacheFile.getParentFile();
if (parent.isDirectory() || parent.mkdirs()) {
out = new PrintStream(_cacheFile);
fo... | class class_name[name] begin[{]
method[dispose, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[binary_operation[member[._cacheFile], !=, literal[null]], &&, member[._dirty]]] begin[{]
local_variable[type[PrintStream], out]
TryStatement(blo... | Keyword[public] Keyword[void] identifier[dispose] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[_cacheFile] operator[!=] Other[null] operator[&&] identifier[_dirty] operator[SEP] {
identifier[PrintStream] identifier[out] operator[=] Other[null] operator[SEP] Keyword[try] {
... |
public void setByte(int index, int value)
{
checkIndexLength(index, SizeOf.SIZE_OF_BYTE);
unsafe.putByte(base, address + index, (byte) (value & 0xFF));
} | class class_name[name] begin[{]
method[setByte, return_type[void], modifier[public], parameter[index, value]] begin[{]
call[.checkIndexLength, parameter[member[.index], member[SizeOf.SIZE_OF_BYTE]]]
call[unsafe.putByte, parameter[member[.base], binary_operation[member[.address],... | Keyword[public] Keyword[void] identifier[setByte] operator[SEP] Keyword[int] identifier[index] , Keyword[int] identifier[value] operator[SEP] {
identifier[checkIndexLength] operator[SEP] identifier[index] , identifier[SizeOf] operator[SEP] identifier[SIZE_OF_BYTE] operator[SEP] operator[SEP] identifier[unsafe]... |
public R filterMany(ExpressionList<T> filter) {
@SuppressWarnings("unchecked")
ExpressionList<T> expressionList = (ExpressionList<T>) expr().filterMany(_name);
expressionList.addAll(filter);
return _root;
} | class class_name[name] begin[{]
method[filterMany, return_type[type[R]], modifier[public], parameter[filter]] begin[{]
local_variable[type[ExpressionList], expressionList]
call[expressionList.addAll, parameter[member[.filter]]]
return[member[._root]]
end[}]
END[}] | Keyword[public] identifier[R] identifier[filterMany] operator[SEP] identifier[ExpressionList] operator[<] identifier[T] operator[>] identifier[filter] operator[SEP] {
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[ExpressionList] operator[<] identifier[T] operat... |
private void checkAsXML(InputSource is) throws IOException, SAXException {
xmlParser.setCharacterHandler(sourceCode);
sourceCode.initialize(is);
try {
xmlReader.parse(is);
} catch (SAXParseException e) {
} catch (FatalSAXException e) {
}
} | class class_name[name] begin[{]
method[checkAsXML, return_type[void], modifier[private], parameter[is]] begin[{]
call[xmlParser.setCharacterHandler, parameter[member[.sourceCode]]]
call[sourceCode.initialize, parameter[member[.is]]]
TryStatement(block=[StatementExpressio... | Keyword[private] Keyword[void] identifier[checkAsXML] operator[SEP] identifier[InputSource] identifier[is] operator[SEP] Keyword[throws] identifier[IOException] , identifier[SAXException] {
identifier[xmlParser] operator[SEP] identifier[setCharacterHandler] operator[SEP] identifier[sourceCode] operator[SEP] ope... |
public LoadBalancerFilter descriptionContains(String... subStrings) {
allItemsNotNull(subStrings, "Load balancer description subStrings");
predicate = predicate.and(combine(
LoadBalancerMetadata::getDescription, in(asList(subStrings), Predicates::containsIgnoreCase)
));
... | class class_name[name] begin[{]
method[descriptionContains, return_type[type[LoadBalancerFilter]], modifier[public], parameter[subStrings]] begin[{]
call[.allItemsNotNull, parameter[member[.subStrings], literal["Load balancer description subStrings"]]]
assign[member[.predicate],... | Keyword[public] identifier[LoadBalancerFilter] identifier[descriptionContains] operator[SEP] identifier[String] operator[...] identifier[subStrings] operator[SEP] {
identifier[allItemsNotNull] operator[SEP] identifier[subStrings] , literal[String] operator[SEP] operator[SEP] identifier[predicate] operator[=] id... |
protected void resetAppIcons() {
CmsObject cms = A_CmsUI.getCmsObject();
Locale locale = UI.getCurrent().getLocale();
m_standardApps.removeAllComponents();
m_userApps.removeAllComponents();
m_availableApps.removeAllComponents();
Collection<I_CmsWorkplaceAppConfiguration>... | class class_name[name] begin[{]
method[resetAppIcons, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[CmsObject], cms]
local_variable[type[Locale], locale]
call[m_standardApps.removeAllComponents, parameter[]]
call[m_userApps.rem... | Keyword[protected] Keyword[void] identifier[resetAppIcons] operator[SEP] operator[SEP] {
identifier[CmsObject] identifier[cms] operator[=] identifier[A_CmsUI] operator[SEP] identifier[getCmsObject] operator[SEP] operator[SEP] operator[SEP] identifier[Locale] identifier[locale] operator[=] identifier[UI] operator... |
public URL uploadFile(File file) throws InterruptedException, XMPPException.XMPPErrorException,
SmackException, IOException {
return uploadFile(file, null);
} | class class_name[name] begin[{]
method[uploadFile, return_type[type[URL]], modifier[public], parameter[file]] begin[{]
return[call[.uploadFile, parameter[member[.file], literal[null]]]]
end[}]
END[}] | Keyword[public] identifier[URL] identifier[uploadFile] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[InterruptedException] , identifier[XMPPException] operator[SEP] identifier[XMPPErrorException] , identifier[SmackException] , identifier[IOException] {
Keyword[return... |
public Collection<PrimaryWorkitem> getOwnedPrimaryWorkitems(PrimaryWorkitemFilter filter) {
filter = (filter != null) ? filter : new PrimaryWorkitemFilter();
filter.owners.clear();
filter.owners.add(this);
return getInstance().get().primaryWorkitems(filter);
} | class class_name[name] begin[{]
method[getOwnedPrimaryWorkitems, return_type[type[Collection]], modifier[public], parameter[filter]] begin[{]
assign[member[.filter], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qu... | Keyword[public] identifier[Collection] operator[<] identifier[PrimaryWorkitem] operator[>] identifier[getOwnedPrimaryWorkitems] operator[SEP] identifier[PrimaryWorkitemFilter] identifier[filter] operator[SEP] {
identifier[filter] operator[=] operator[SEP] identifier[filter] operator[!=] Other[null] operator[SEP]... |
public EClass getIfcTextureCoordinate() {
if (ifcTextureCoordinateEClass == null) {
ifcTextureCoordinateEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(608);
}
return ifcTextureCoordinateEClass;
} | class class_name[name] begin[{]
method[getIfcTextureCoordinate, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcTextureCoordinateEClass], ==, literal[null]]] begin[{]
assign[member[.ifcTextureCoordinateEClass], Cast(expre... | Keyword[public] identifier[EClass] identifier[getIfcTextureCoordinate] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcTextureCoordinateEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcTextureCoordinateEClass] operator[=] operator[SEP] identifier[EClass] operator[SE... |
protected void showBootLogging() {
if (logger.isInfoEnabled()) {
logger.info("[Async Manager]");
logger.info(" defaultConcurrentAsyncOption: " + defaultConcurrentAsyncOption);
logger.info(" primaryExecutorService: " + buildExecutorNamedExp(primaryExecutorService));
... | class class_name[name] begin[{]
method[showBootLogging, return_type[void], modifier[protected], parameter[]] begin[{]
if[call[logger.isInfoEnabled, parameter[]]] begin[{]
call[logger.info, parameter[literal["[Async Manager]"]]]
call[logger.info, p... | Keyword[protected] Keyword[void] identifier[showBootLogging] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] op... |
public int splitRandomly(ArrayModifiableDBIDs ind, int begin, int end, DoubleDataStore tpro, Random rand) {
final int nele = end - begin;
DBIDArrayIter it = ind.iter();
// pick random splitting element based on position
double rs = tpro.doubleValue(it.seek(begin + rand.nextInt(nele)));
int minInd = ... | class class_name[name] begin[{]
method[splitRandomly, return_type[type[int]], modifier[public], parameter[ind, begin, end, tpro, rand]] begin[{]
local_variable[type[int], nele]
local_variable[type[DBIDArrayIter], it]
local_variable[type[double], rs]
local_variable[type[int], min... | Keyword[public] Keyword[int] identifier[splitRandomly] operator[SEP] identifier[ArrayModifiableDBIDs] identifier[ind] , Keyword[int] identifier[begin] , Keyword[int] identifier[end] , identifier[DoubleDataStore] identifier[tpro] , identifier[Random] identifier[rand] operator[SEP] {
Keyword[final] Keyword[int... |
public final <T> ColumnsValues
evalColumnsValues(final Map<String, Object> pAddParam,
final T pEntity) throws Exception {
TableSql tableSql = getTablesMap().get(pEntity.getClass().getSimpleName());
if (tableSql.getFieldsMap().containsKey(ISrvOrm.VERSION_NAME)) {
pAddParam.put("versionAlgorithm",... | class class_name[name] begin[{]
method[evalColumnsValues, return_type[type[ColumnsValues]], modifier[final public], parameter[pAddParam, pEntity]] begin[{]
local_variable[type[TableSql], tableSql]
if[call[tableSql.getFieldsMap, parameter[]]] begin[{]
call[pAddPar... | Keyword[public] Keyword[final] operator[<] identifier[T] operator[>] identifier[ColumnsValues] identifier[evalColumnsValues] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[T] identifier[pEntity] operator[SE... |
@ProblemFactCollectionProperty
private List<TopicConflict> calculateTopicConflictList() {
List<TopicConflict> topicConflictList = new ArrayList<>();
for (Topic leftTopic : topicList) {
for (Topic rightTopic : topicList) {
if (leftTopic.getId() < rightTopic.getId()) {
... | class class_name[name] begin[{]
method[calculateTopicConflictList, return_type[type[List]], modifier[private], parameter[]] begin[{]
local_variable[type[List], topicConflictList]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[If... | annotation[@] identifier[ProblemFactCollectionProperty] Keyword[private] identifier[List] operator[<] identifier[TopicConflict] operator[>] identifier[calculateTopicConflictList] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[TopicConflict] operator[>] identifier[topicConflictList] operato... |
public static Set<Policy> policy(BasicSettings settings, String name) {
Function<Config, Set<Policy>> factory = FACTORIES.get(name.toLowerCase(US));
checkNotNull(factory, "%s not found", name);
return factory.apply(settings.config());
} | class class_name[name] begin[{]
method[policy, return_type[type[Set]], modifier[public static], parameter[settings, name]] begin[{]
local_variable[type[Function], factory]
call[.checkNotNull, parameter[member[.factory], literal["%s not found"], member[.name]]]
return[call[factor... | Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Policy] operator[>] identifier[policy] operator[SEP] identifier[BasicSettings] identifier[settings] , identifier[String] identifier[name] operator[SEP] {
identifier[Function] operator[<] identifier[Config] , identifier[Set] operator[<] iden... |
public static MutableFst importFst(String basename, Semiring semiring) {
Optional<MutableSymbolTable> maybeInputs = importSymbols(basename + INPUT_SYMS);
Optional<MutableSymbolTable> maybeOutputs = importSymbols(basename + OUTPUT_SYMS);
Optional<MutableSymbolTable> maybeStates = importSymbols(basename + ST... | class class_name[name] begin[{]
method[importFst, return_type[type[MutableFst]], modifier[public static], parameter[basename, semiring]] begin[{]
local_variable[type[Optional], maybeInputs]
local_variable[type[Optional], maybeOutputs]
local_variable[type[Optional], maybeStates]
... | Keyword[public] Keyword[static] identifier[MutableFst] identifier[importFst] operator[SEP] identifier[String] identifier[basename] , identifier[Semiring] identifier[semiring] operator[SEP] {
identifier[Optional] operator[<] identifier[MutableSymbolTable] operator[>] identifier[maybeInputs] operator[=] identifie... |
public String dummyVariable() {
StringBuilder buf = new StringBuilder();
buf.append("$_");
buf.append(dummyVariableCount++);
return buf.toString();
} | class class_name[name] begin[{]
method[dummyVariable, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[StringBuilder], buf]
call[buf.append, parameter[literal["$_"]]]
call[buf.append, parameter[member[.dummyVariableCount]]]
r... | Keyword[public] identifier[String] identifier[dummyVariable] operator[SEP] operator[SEP] {
identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator... |
public void setActions(java.util.Collection<DatasetActionSummary> actions) {
if (actions == null) {
this.actions = null;
return;
}
this.actions = new java.util.ArrayList<DatasetActionSummary>(actions);
} | class class_name[name] begin[{]
method[setActions, return_type[void], modifier[public], parameter[actions]] begin[{]
if[binary_operation[member[.actions], ==, literal[null]]] begin[{]
assign[THIS[member[None.actions]], literal[null]]
return[None]
else... | Keyword[public] Keyword[void] identifier[setActions] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[DatasetActionSummary] operator[>] identifier[actions] operator[SEP] {
Keyword[if] operator[SEP] identifier[actions] operator[==] Other[nul... |
public static void main(String[] args) {
// Read arguments
List<String> tmpArgs = new ArrayList<String>(Arrays.asList(args));
parseArguments(tmpArgs);
args = tmpArgs.toArray(new String[0]);
// Init Task
StringBuilder cliString = new StringBuilder();
for (int i = 0; i < args.length; i++) {
... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
local_variable[type[List], tmpArgs]
call[.parseArguments, parameter[member[.tmpArgs]]]
assign[member[.args], call[tmpArgs.toArray, parameter[ArrayCreator(di... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[tmpArgs] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String... |
public static void log(String topic, LogLevel level, String msg) {
log(topic, level, msg, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0);
} | class class_name[name] begin[{]
method[log, return_type[void], modifier[public static], parameter[topic, level, msg]] begin[{]
call[.log, parameter[member[.topic], member[.level], member[.msg], literal[null], literal[null], literal[null], literal[null], literal[null], literal[null], literal[nul... | Keyword[public] Keyword[static] Keyword[void] identifier[log] operator[SEP] identifier[String] identifier[topic] , identifier[LogLevel] identifier[level] , identifier[String] identifier[msg] operator[SEP] {
identifier[log] operator[SEP] identifier[topic] , identifier[level] , identifier[msg] , Other[null] ,... |
private synchronized void appendXMLProperty(Document doc, Element conf,
String propertyName) {
// skip writing if given property name is empty or null
if (!Strings.isNullOrEmpty(propertyName)) {
String value = properties.getProperty(propertyName);
if (value != null... | class class_name[name] begin[{]
method[appendXMLProperty, return_type[void], modifier[synchronized private], parameter[doc, conf, propertyName]] begin[{]
if[call[Strings.isNullOrEmpty, parameter[member[.propertyName]]]] begin[{]
local_variable[type[String], value]
... | Keyword[private] Keyword[synchronized] Keyword[void] identifier[appendXMLProperty] operator[SEP] identifier[Document] identifier[doc] , identifier[Element] identifier[conf] , identifier[String] identifier[propertyName] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[Strings] operator[SEP] iden... |
@Override
public ResourceSet<Command> read(final TwilioRestClient client) {
return new ResourceSet<>(this, client, firstPage(client));
} | class class_name[name] begin[{]
method[read, return_type[type[ResourceSet]], modifier[public], parameter[client]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=client, postfix_operators=[], prefix_operators=... | annotation[@] identifier[Override] Keyword[public] identifier[ResourceSet] operator[<] identifier[Command] operator[>] identifier[read] operator[SEP] Keyword[final] identifier[TwilioRestClient] identifier[client] operator[SEP] {
Keyword[return] Keyword[new] identifier[ResourceSet] operator[<] operator[>] operato... |
protected String getText(Area node)
{
String s = node.getText().trim();
//if (s.contains("\""))
// System.out.println("jo!");
s = s.replaceAll("^[\\\"\\p{Pi}]+", "");
s = s.replaceAll("[\\\"\\p{Pf}]+$", "");
return s;
} | class class_name[name] begin[{]
method[getText, return_type[type[String]], modifier[protected], parameter[node]] begin[{]
local_variable[type[String], s]
assign[member[.s], call[s.replaceAll, parameter[literal["^[\\\"\\p{Pi}]+"], literal[""]]]]
assign[member[.s], call[s.... | Keyword[protected] identifier[String] identifier[getText] operator[SEP] identifier[Area] identifier[node] operator[SEP] {
identifier[String] identifier[s] operator[=] identifier[node] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator... |
public String get(String key) {
final Map<String, String> map = copyOnThreadLocal.get();
if ((map != null) && (key != null)) {
return map.get(key);
} else {
return null;
}
} | class class_name[name] begin[{]
method[get, return_type[type[String]], modifier[public], parameter[key]] begin[{]
local_variable[type[Map], map]
if[binary_operation[binary_operation[member[.map], !=, literal[null]], &&, binary_operation[member[.key], !=, literal[null]]]] begin[{]
... | Keyword[public] identifier[String] identifier[get] operator[SEP] identifier[String] identifier[key] operator[SEP] {
Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[map] operator[=] identifier[copyOnThreadLocal] operator[SEP] identifier[get] operator[SEP]... |
@Nonnull
public static FileIOError createDir (@Nonnull final File aDir)
{
ValueEnforcer.notNull (aDir, "Directory");
// Does the directory already exist?
if (aDir.exists ())
return EFileIOErrorCode.TARGET_ALREADY_EXISTS.getAsIOError (EFileIOOperation.CREATE_DIR, aDir);
// Is the parent direc... | class class_name[name] begin[{]
method[createDir, return_type[type[FileIOError]], modifier[public static], parameter[aDir]] begin[{]
call[ValueEnforcer.notNull, parameter[member[.aDir], literal["Directory"]]]
if[call[aDir.exists, parameter[]]] begin[{]
return[call[EFileIOErrorCo... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[FileIOError] identifier[createDir] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[File] identifier[aDir] operator[SEP] {
identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aDi... |
@XmlElementDecl(namespace = "urn:switchyard-quickstart-demo:library:1.0", name = "loanRequest")
public JAXBElement<LoanRequest> createLoanRequest(LoanRequest value) {
return new JAXBElement<LoanRequest>(LOAN_REQUEST_QNAME, LoanRequest.class, null, value);
} | class class_name[name] begin[{]
method[createLoanRequest, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=LOAN_REQUEST_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_o... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[LoanRequest] operator[>] identifier[createLoanRequest] operator[SEP] identifier[LoanReques... |
public String getString(int index) {
Object tmp = mArray.get(index);
return tmp == null ? null : tmp.toString();
} | class class_name[name] begin[{]
method[getString, return_type[type[String]], modifier[public], parameter[index]] begin[{]
local_variable[type[Object], tmp]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifie... | Keyword[public] identifier[String] identifier[getString] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
identifier[Object] identifier[tmp] operator[=] identifier[mArray] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[return] identifier[tmp] operato... |
String formatMessage(int msgLogLevel, String tag, String msg, Throwable exception) {
if (exception != null) {
return DateHelper.getUTC(System.currentTimeMillis()) + "/" + getLevelTag(msgLogLevel) + tag + ": " + msg + "\n" + getStackTrace(exception) + "\n";
} else {
return DateHel... | class class_name[name] begin[{]
method[formatMessage, return_type[type[String]], modifier[default], parameter[msgLogLevel, tag, msg, exception]] begin[{]
if[binary_operation[member[.exception], !=, literal[null]]] begin[{]
return[binary_operation[binary_operation[binary_operation[bi... | identifier[String] identifier[formatMessage] operator[SEP] Keyword[int] identifier[msgLogLevel] , identifier[String] identifier[tag] , identifier[String] identifier[msg] , identifier[Throwable] identifier[exception] operator[SEP] {
Keyword[if] operator[SEP] identifier[exception] operator[!=] Other[null] opera... |
public static void write(File file, String text, String charset) throws IOException {
write(file, text, charset, false);
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public static], parameter[file, text, charset]] begin[{]
call[.write, parameter[member[.file], member[.text], member[.charset], literal[false]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[write] operator[SEP] identifier[File] identifier[file] , identifier[String] identifier[text] , identifier[String] identifier[charset] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[write] operator[SEP] identifier[file] , identifier[t... |
@Override
public int update(DataColumns dataColumns) throws SQLException {
UpdateBuilder<DataColumns, TableColumnKey> ub = updateBuilder();
ub.updateColumnValue(DataColumns.COLUMN_NAME, dataColumns.getName());
ub.updateColumnValue(DataColumns.COLUMN_TITLE, dataColumns.getTitle());
ub.updateColumnValue(DataCol... | class class_name[name] begin[{]
method[update, return_type[type[int]], modifier[public], parameter[dataColumns]] begin[{]
local_variable[type[UpdateBuilder], ub]
call[ub.updateColumnValue, parameter[member[DataColumns.COLUMN_NAME], call[dataColumns.getName, parameter[]]]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[update] operator[SEP] identifier[DataColumns] identifier[dataColumns] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[UpdateBuilder] operator[<] identifier[DataColumns] , identifier[TableColumnKey] operator[>] identif... |
@Override
public EEnum getIfcElectricDistributionBoardTypeEnum() {
if (ifcElectricDistributionBoardTypeEnumEEnum == null) {
ifcElectricDistributionBoardTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE
.getEPackage(Ifc4Package.eNS_URI).getEClassifiers().get(975);
}
return ifcElectricDistributionBo... | class class_name[name] begin[{]
method[getIfcElectricDistributionBoardTypeEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcElectricDistributionBoardTypeEnumEEnum], ==, literal[null]]] begin[{]
assign[member[.ifcElectr... | annotation[@] identifier[Override] Keyword[public] identifier[EEnum] identifier[getIfcElectricDistributionBoardTypeEnum] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcElectricDistributionBoardTypeEnumEEnum] operator[==] Other[null] operator[SEP] {
identifier[ifcElectricDistribu... |
private long getNewClientId() {
while (true) {
long clientId = Math.abs(clientIdsGenerator.nextLong());
if (!clientsData.containsKey(clientId)) {
return clientId;
}
}
} | class class_name[name] begin[{]
method[getNewClientId, return_type[type[long]], modifier[private], parameter[]] begin[{]
while[literal[true]] begin[{]
local_variable[type[long], clientId]
if[call[clientsData.containsKey, parameter[member[.clientId]]]] begin[{... | Keyword[private] Keyword[long] identifier[getNewClientId] operator[SEP] operator[SEP] {
Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
Keyword[long] identifier[clientId] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[clientIdsGenerator] operator[SEP]... |
private GinjectorBindings locateHighestAccessibleSource(Key<?> key, GinjectorBindings origin) {
// If we don't already have a binding, and the key is "pinned", it means that this injector
// is supposed to contain a binding, but it needs to have one created implicitly. We return
// null so that we attempt ... | class class_name[name] begin[{]
method[locateHighestAccessibleSource, return_type[type[GinjectorBindings]], modifier[private], parameter[key, origin]] begin[{]
if[binary_operation[call[origin.isBound, parameter[member[.key]]], &&, call[origin.isPinned, parameter[member[.key]]]]] begin[{]
... | Keyword[private] identifier[GinjectorBindings] identifier[locateHighestAccessibleSource] operator[SEP] identifier[Key] operator[<] operator[?] operator[>] identifier[key] , identifier[GinjectorBindings] identifier[origin] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[origin] operator[SEP] ide... |
public static Data of(final String name, final int parameterCount) {
return of(name, singletonList(Sample.of(parameterCount)));
} | class class_name[name] begin[{]
method[of, return_type[type[Data]], modifier[public static], parameter[name, parameterCount]] begin[{]
return[call[.of, parameter[member[.name], call[.singletonList, parameter[call[Sample.of, parameter[member[.parameterCount]]]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Data] identifier[of] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] Keyword[int] identifier[parameterCount] operator[SEP] {
Keyword[return] identifier[of] operator[SEP] identifier[name] , identifier[singletonList] operator[SEP] ident... |
private double[][][] estimateXi(int[] o, double[][] alpha, double[][] beta) {
if (o.length <= 1) {
throw new IllegalArgumentException("Observation sequence is too short.");
}
int n = o.length - 1;
double xi[][][] = new double[n][numStates][numStates];
for (int t = 0... | class class_name[name] begin[{]
method[estimateXi, return_type[type[double]], modifier[private], parameter[o, alpha, beta]] begin[{]
if[binary_operation[member[o.length], <=, literal[1]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix... | Keyword[private] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[estimateXi] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[o] , Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[alpha] , Keyword[double]... |
public Term intLiteral() throws SourceCodeException
{
Token valToken = consumeToken(INTEGER_LITERAL);
NumericType result = new IntLiteral(Integer.parseInt(valToken.image));
// Set the position that the literal was parsed from.
SourceCodePosition position =
new SourceCod... | class class_name[name] begin[{]
method[intLiteral, return_type[type[Term]], modifier[public], parameter[]] begin[{]
local_variable[type[Token], valToken]
local_variable[type[NumericType], result]
local_variable[type[SourceCodePosition], position]
call[result.setSourceCod... | Keyword[public] identifier[Term] identifier[intLiteral] operator[SEP] operator[SEP] Keyword[throws] identifier[SourceCodeException] {
identifier[Token] identifier[valToken] operator[=] identifier[consumeToken] operator[SEP] identifier[INTEGER_LITERAL] operator[SEP] operator[SEP] identifier[NumericType] identifie... |
public ServiceFuture<JobInner> updateAsync(String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters, final ServiceCallback<JobInner> serviceCallback) {
return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, transformName, j... | class class_name[name] begin[{]
method[updateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, accountName, transformName, jobName, parameters, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.updateWithServiceResponseAsync, parame... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[JobInner] operator[>] identifier[updateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[accountName] , identifier[String] identifier[transformName] , identifier[String] identifier[jobName] , identif... |
public void releaseClient(StorageClient client) {
try {
if (client != null) {
pool.returnObject(client);
LOGGER.debug("Released storage client pool client:" + client);
}
} catch (Exception e) {
LOGGER.warn("Failed to close connection " ... | class class_name[name] begin[{]
method[releaseClient, return_type[void], modifier[public], parameter[client]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal... | Keyword[public] Keyword[void] identifier[releaseClient] operator[SEP] identifier[StorageClient] identifier[client] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[client] operator[!=] Other[null] operator[SEP] {
identifier[pool] operator[SEP] identifier[returnObject]... |
@Override
public GeoPackage open(String database, boolean writable) {
GeoPackage db = null;
if (exists(database)) {
GeoPackageCursorFactory cursorFactory = new GeoPackageCursorFactory();
String path = null;
SQLiteDatabase sqlite = null;
GeoPackageMet... | class class_name[name] begin[{]
method[open, return_type[type[GeoPackage]], modifier[public], parameter[database, writable]] begin[{]
local_variable[type[GeoPackage], db]
if[call[.exists, parameter[member[.database]]]] begin[{]
local_variable[type[GeoPackageCursorFactory], c... | annotation[@] identifier[Override] Keyword[public] identifier[GeoPackage] identifier[open] operator[SEP] identifier[String] identifier[database] , Keyword[boolean] identifier[writable] operator[SEP] {
identifier[GeoPackage] identifier[db] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifie... |
public static boolean isAlpha(final CharSequence cs) {
if (isEmpty(cs)) {
return false;
}
final int sz = cs.length();
for (int i = 0; i < sz; i++) {
if (!Character.isLetter(cs.charAt(i))) {
return false;
}
}
return true;... | class class_name[name] begin[{]
method[isAlpha, return_type[type[boolean]], modifier[public static], parameter[cs]] begin[{]
if[call[.isEmpty, parameter[member[.cs]]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[type[int], sz]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isAlpha] operator[SEP] Keyword[final] identifier[CharSequence] identifier[cs] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] identifier[cs] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] operator[S... |
public List<HistoricCaseActivityInstance> executeList(CommandContext commandContext, Map<String, Object> parameterMap, int firstResult, int maxResults) {
return commandContext
.getHistoricCaseActivityInstanceManager()
.findHistoricCaseActivityInstancesByNativeQuery(parameterMap, firstResult, maxResults)... | class class_name[name] begin[{]
method[executeList, return_type[type[List]], modifier[public], parameter[commandContext, parameterMap, firstResult, maxResults]] begin[{]
return[call[commandContext.getHistoricCaseActivityInstanceManager, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[HistoricCaseActivityInstance] operator[>] identifier[executeList] operator[SEP] identifier[CommandContext] identifier[commandContext] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameterMap] , Keyword[int] ident... |
public static JSONCompareResult compareJSON(String expectedStr, String actualStr, JSONComparator comparator)
throws JSONException {
Object expected = JSONParser.parseJSON(expectedStr);
Object actual = JSONParser.parseJSON(actualStr);
if ((expected instanceof JSONObject) && (actual in... | class class_name[name] begin[{]
method[compareJSON, return_type[type[JSONCompareResult]], modifier[public static], parameter[expectedStr, actualStr, comparator]] begin[{]
local_variable[type[Object], expected]
local_variable[type[Object], actual]
if[binary_operation[binary_opera... | Keyword[public] Keyword[static] identifier[JSONCompareResult] identifier[compareJSON] operator[SEP] identifier[String] identifier[expectedStr] , identifier[String] identifier[actualStr] , identifier[JSONComparator] identifier[comparator] operator[SEP] Keyword[throws] identifier[JSONException] {
identifier[Obje... |
protected void handleNotSignedIn(final Activity context, SocialNetworkPostListener listener) {
String msg = "Not signed into Facebook";
if(listener != null) {
listener.onNetworkError(context, SocialNetwork.FACEBOOK, new SocializeException(msg));
}
else {
handleNonListenerError(msg, new SocializeException(... | class class_name[name] begin[{]
method[handleNotSignedIn, return_type[void], modifier[protected], parameter[context, listener]] begin[{]
local_variable[type[String], msg]
if[binary_operation[member[.listener], !=, literal[null]]] begin[{]
call[listener.onNetworkE... | Keyword[protected] Keyword[void] identifier[handleNotSignedIn] operator[SEP] Keyword[final] identifier[Activity] identifier[context] , identifier[SocialNetworkPostListener] identifier[listener] operator[SEP] {
identifier[String] identifier[msg] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP]... |
public HttpRequest keepAlive(final HttpResponse httpResponse, final boolean doContinue) {
boolean keepAlive = httpResponse.isConnectionPersistent();
if (keepAlive) {
HttpConnection previousConnection = httpResponse.getHttpRequest().httpConnection;
if (previousConnection != null) {
// keep using the conne... | class class_name[name] begin[{]
method[keepAlive, return_type[type[HttpRequest]], modifier[public], parameter[httpResponse, doContinue]] begin[{]
local_variable[type[boolean], keepAlive]
if[member[.keepAlive]] begin[{]
local_variable[type[HttpConnection], previousConnection]... | Keyword[public] identifier[HttpRequest] identifier[keepAlive] operator[SEP] Keyword[final] identifier[HttpResponse] identifier[httpResponse] , Keyword[final] Keyword[boolean] identifier[doContinue] operator[SEP] {
Keyword[boolean] identifier[keepAlive] operator[=] identifier[httpResponse] operator[SEP] identifi... |
public GetAllDomainsPlayCountResponse getAllDomainsPlayCount(GetAllDomainsStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getTimeInterval(), "timeInterval should NOT be null");
checkStringNotEmpty(request.getStartTime(... | class class_name[name] begin[{]
method[getAllDomainsPlayCount, return_type[type[GetAllDomainsPlayCountResponse]], modifier[public], parameter[request]] begin[{]
call[.checkNotNull, parameter[member[.request], literal["The parameter request should NOT be null."]]]
call[.checkStri... | Keyword[public] identifier[GetAllDomainsPlayCountResponse] identifier[getAllDomainsPlayCount] operator[SEP] identifier[GetAllDomainsStatisticsRequest] identifier[request] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[request] , literal[String] operator[SEP] operator[SEP] identifier[checkStri... |
public Observable<Page<TransformInner>> listNextAsync(final String nextPageLink) {
return listNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<TransformInner>>, Page<TransformInner>>() {
@Override
public Page<TransformInner> call(ServiceR... | class class_name[name] begin[{]
method[listNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{]
return[call[.listNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[TransformInner] operator[>] operator[>] identifier[listNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] {
Keyword[return] identifier[listNextWithServiceResponseAsync] operat... |
public Drawer build() {
if (mUsed) {
throw new RuntimeException("you must not reuse a DrawerBuilder builder");
}
if (mActivity == null) {
throw new RuntimeException("please pass an activity");
}
//set that this builder was used. now you have to create a n... | class class_name[name] begin[{]
method[build, return_type[type[Drawer]], modifier[public], parameter[]] begin[{]
if[member[.mUsed]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="you ... | Keyword[public] identifier[Drawer] identifier[build] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[mUsed] operator[SEP] {
Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] id... |
public static nssimpleacl6[] get_filtered(nitro_service service, String filter) throws Exception{
nssimpleacl6 obj = new nssimpleacl6();
options option = new options();
option.set_filter(filter);
nssimpleacl6[] response = (nssimpleacl6[]) obj.getfiltered(service, option);
return response;
} | class class_name[name] begin[{]
method[get_filtered, return_type[type[nssimpleacl6]], modifier[public static], parameter[service, filter]] begin[{]
local_variable[type[nssimpleacl6], obj]
local_variable[type[options], option]
call[option.set_filter, parameter[member[.filter]]]
... | Keyword[public] Keyword[static] identifier[nssimpleacl6] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[nssimpleacl6] identifier[obj] operato... |
public static void generate(ConfigurationImpl configuration,
IndexBuilder indexbuilder) {
SplitIndexWriter indexgen;
DocPath filename = DocPath.empty;
DocPath path = DocPaths.INDEX_FILES;
try {
for (int i = 0; i < indexbuilder.elements().length... | class class_name[name] begin[{]
method[generate, return_type[void], modifier[public static], parameter[configuration, indexbuilder]] begin[{]
local_variable[type[SplitIndexWriter], indexgen]
local_variable[type[DocPath], filename]
local_variable[type[DocPath], path]
TryStatement... | Keyword[public] Keyword[static] Keyword[void] identifier[generate] operator[SEP] identifier[ConfigurationImpl] identifier[configuration] , identifier[IndexBuilder] identifier[indexbuilder] operator[SEP] {
identifier[SplitIndexWriter] identifier[indexgen] operator[SEP] identifier[DocPath] identifier[filename] op... |
public void initLeading()
{
this.leading = 0;
while (this.leading < this.value.length() && this.value.charAt(this.leading) == ' ')
{
this.leading++;
}
if (this.leading == this.value.length())
{
this.setEmpty();
}
} | class class_name[name] begin[{]
method[initLeading, return_type[void], modifier[public], parameter[]] begin[{]
assign[THIS[member[None.leading]], literal[0]]
while[binary_operation[binary_operation[THIS[member[None.leading]], <, THIS[member[None.value]call[None.length, parameter... | Keyword[public] Keyword[void] identifier[initLeading] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[leading] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] Keyword[this] operator[SEP] identifier[leading] operator[<] Keyword[this] operator[SEP] identifier[value] operator[SE... |
private static byte[] readFile(final HttpQuery query,
final File file,
final int max_length) {
final int length = (int) file.length();
if (length <= 0) {
return null;
}
FileInputStream in;
try {
in = new FileInputStream(fi... | class class_name[name] begin[{]
method[readFile, return_type[type[byte]], modifier[private static], parameter[query, file, max_length]] begin[{]
local_variable[type[int], length]
if[binary_operation[member[.length], <=, literal[0]]] begin[{]
return[literal[null]]
els... | Keyword[private] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[readFile] operator[SEP] Keyword[final] identifier[HttpQuery] identifier[query] , Keyword[final] identifier[File] identifier[file] , Keyword[final] Keyword[int] identifier[max_length] operator[SEP] {
Keyword[final] Keyword[int... |
public static xen_hotfix delete(nitro_service client, xen_hotfix resource) throws Exception
{
resource.validate("delete");
return ((xen_hotfix[]) resource.delete_resource(client))[0];
} | class class_name[name] begin[{]
method[delete, return_type[type[xen_hotfix]], modifier[public static], parameter[client, resource]] begin[{]
call[resource.validate, parameter[literal["delete"]]]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=client, postfix_op... | Keyword[public] Keyword[static] identifier[xen_hotfix] identifier[delete] operator[SEP] identifier[nitro_service] identifier[client] , identifier[xen_hotfix] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[resource] operator[SEP] identifier[validate] operator[SEP] literal[S... |
public static YggdrasilAuthenticator password(final String username, final String password, final CharacterSelector characterSelector, String clientToken, AuthenticationService service) throws AuthenticationException {
return password(service, createPasswordProvider(username, password, characterSelector), clientToken... | class class_name[name] begin[{]
method[password, return_type[type[YggdrasilAuthenticator]], modifier[public static], parameter[username, password, characterSelector, clientToken, service]] begin[{]
return[call[.password, parameter[member[.service], call[.createPasswordProvider, parameter[member[.userna... | Keyword[public] Keyword[static] identifier[YggdrasilAuthenticator] identifier[password] operator[SEP] Keyword[final] identifier[String] identifier[username] , Keyword[final] identifier[String] identifier[password] , Keyword[final] identifier[CharacterSelector] identifier[characterSelector] , identifier[String] ident... |
public static Observable<Boolean> ifExists(final String path) {
return Observable.fromCallable(new Func0<Boolean>() {
@Override
public Boolean call() {
return new File(path).exists();
}
});
} | class class_name[name] begin[{]
method[ifExists, return_type[type[Observable]], modifier[public static], parameter[path]] begin[{]
return[call[Observable.fromCallable, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStateme... | Keyword[public] Keyword[static] identifier[Observable] operator[<] identifier[Boolean] operator[>] identifier[ifExists] operator[SEP] Keyword[final] identifier[String] identifier[path] operator[SEP] {
Keyword[return] identifier[Observable] operator[SEP] identifier[fromCallable] operator[SEP] Keyword[new] identif... |
public static void openChainedTasks(List<ChainedDriver<?, ?>> tasks, AbstractInvokable parent) throws Exception {
// start all chained tasks
for (int i = 0; i < tasks.size(); i++) {
final ChainedDriver<?, ?> task = tasks.get(i);
if (LOG.isDebugEnabled()) {
LOG.debug(constructLogString("Start task code", t... | class class_name[name] begin[{]
method[openChainedTasks, return_type[void], modifier[public static], parameter[tasks, parent]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvo... | Keyword[public] Keyword[static] Keyword[void] identifier[openChainedTasks] operator[SEP] identifier[List] operator[<] identifier[ChainedDriver] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[tasks] , identifier[AbstractInvokable] identifier[parent] operator[SEP] Keyword[throws] identifier[Ex... |
public static void initLogConfig(String logConfigpath)
{
try {
LoggerContext context =(LoggerContext)LogManager.getContext(false);
if(context!=null)
{
context.setConfigLocation(new File(logConfigpath).toURI());
context.reconfigure();//重新初始化Log4j2的配置上下文
}else
{
ConfigurationSource sour... | class class_name[name] begin[{]
method[initLogConfig, return_type[void], modifier[public static], parameter[logConfigpath]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[Litera... | Keyword[public] Keyword[static] Keyword[void] identifier[initLogConfig] operator[SEP] identifier[String] identifier[logConfigpath] operator[SEP] {
Keyword[try] {
identifier[LoggerContext] identifier[context] operator[=] operator[SEP] identifier[LoggerContext] operator[SEP] identifier[LogManager] opera... |
public boolean isSameOrNewerThan(JavaVersion other) {
return this.major > other.major || (this.major == other.major && this.minor >= other.minor);
} | class class_name[name] begin[{]
method[isSameOrNewerThan, return_type[type[boolean]], modifier[public], parameter[other]] begin[{]
return[binary_operation[binary_operation[THIS[member[None.major]], >, member[other.major]], ||, binary_operation[binary_operation[THIS[member[None.major]], ==, member[other... | Keyword[public] Keyword[boolean] identifier[isSameOrNewerThan] operator[SEP] identifier[JavaVersion] identifier[other] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP] identifier[major] operator[>] identifier[other] operator[SEP] identifier[major] operator[||] operator[SEP] Keyword[this] operator[SEP]... |
public void initialize() throws ResourceInitializationException {
mDocNum = 0;
convertTimex3To2 = (Boolean) getConfigParameterValue(PARAM_CONVERTTIMEX3TO2);
mOutputDir = new File((String) getConfigParameterValue(PARAM_OUTPUTDIR));
if (!mOutputDir.exists()) {
mOutputDir.mkdirs();
}
} | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[public], parameter[]] begin[{]
assign[member[.mDocNum], literal[0]]
assign[member[.convertTimex3To2], Cast(expression=MethodInvocation(arguments=[MemberReference(member=PARAM_CONVERTTIMEX3TO2, postfix... | Keyword[public] Keyword[void] identifier[initialize] operator[SEP] operator[SEP] Keyword[throws] identifier[ResourceInitializationException] {
identifier[mDocNum] operator[=] Other[0] operator[SEP] identifier[convertTimex3To2] operator[=] operator[SEP] identifier[Boolean] operator[SEP] identifier[getConfigParame... |
@Nonnull
public final WSClientConfig setSSLSocketFactoryTrustAll (final boolean bDebugMode) throws KeyManagementException
{
try
{
final SSLContext aSSLContext = SSLContext.getInstance ("TLSv1.2");
aSSLContext.init (null,
new TrustManager [] { new TrustManagerTrustAll (bDe... | class class_name[name] begin[{]
method[setSSLSocketFactoryTrustAll, return_type[type[WSClientConfig]], modifier[final public], parameter[bDebugMode]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argumen... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[final] identifier[WSClientConfig] identifier[setSSLSocketFactoryTrustAll] operator[SEP] Keyword[final] Keyword[boolean] identifier[bDebugMode] operator[SEP] Keyword[throws] identifier[KeyManagementException] {
Keyword[try] {
Keyword[final] iden... |
private IQTree liftTree(IQTree queryTree, VariableGenerator variableGenerator) {
if (queryTree instanceof UnaryIQTree)
return liftUnary((UnaryIQTree) queryTree, variableGenerator);
else if (queryTree instanceof NaryIQTree)
return liftNary((NaryIQTree) queryTree, variableGenerator... | class class_name[name] begin[{]
method[liftTree, return_type[type[IQTree]], modifier[private], parameter[queryTree, variableGenerator]] begin[{]
if[binary_operation[member[.queryTree], instanceof, type[UnaryIQTree]]] begin[{]
return[call[.liftUnary, parameter[Cast(expression=MemberReference(mem... | Keyword[private] identifier[IQTree] identifier[liftTree] operator[SEP] identifier[IQTree] identifier[queryTree] , identifier[VariableGenerator] identifier[variableGenerator] operator[SEP] {
Keyword[if] operator[SEP] identifier[queryTree] Keyword[instanceof] identifier[UnaryIQTree] operator[SEP] Keyword[return] ... |
@Override
public UpdateSketch rebuild() {
final int lgNomLongs = getLgNomLongs();
final int preambleLongs = mem_.getByte(PREAMBLE_LONGS_BYTE) & 0X3F;
if (getRetainedEntries(true) > (1 << lgNomLongs)) {
quickSelectAndRebuild(mem_, preambleLongs, lgNomLongs);
}
return this;
} | class class_name[name] begin[{]
method[rebuild, return_type[type[UpdateSketch]], modifier[public], parameter[]] begin[{]
local_variable[type[int], lgNomLongs]
local_variable[type[int], preambleLongs]
if[binary_operation[call[.getRetainedEntries, parameter[literal[true]]], >, bin... | annotation[@] identifier[Override] Keyword[public] identifier[UpdateSketch] identifier[rebuild] operator[SEP] operator[SEP] {
Keyword[final] Keyword[int] identifier[lgNomLongs] operator[=] identifier[getLgNomLongs] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[preambleLongs] op... |
public synchronized EmbeddedElastic start() throws IOException, InterruptedException {
if (!started) {
started = true;
installElastic();
startElastic();
createRestClient();
createTemplates();
createIndices();
}
return this;
... | class class_name[name] begin[{]
method[start, return_type[type[EmbeddedElastic]], modifier[synchronized public], parameter[]] begin[{]
if[member[.started]] begin[{]
assign[member[.started], literal[true]]
call[.installElastic, parameter[]]
... | Keyword[public] Keyword[synchronized] identifier[EmbeddedElastic] identifier[start] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] {
Keyword[if] operator[SEP] operator[!] identifier[started] operator[SEP] {
identifier[started] operator[=] litera... |
public static CharSequence unescapeHtml(final CharSequence cs) {
if (cs == null) {
return cs;
}
return StringEscapeUtils.unescapeHtml(cs.toString());
} | class class_name[name] begin[{]
method[unescapeHtml, return_type[type[CharSequence]], modifier[public static], parameter[cs]] begin[{]
if[binary_operation[member[.cs], ==, literal[null]]] begin[{]
return[member[.cs]]
else begin[{]
None
end[}]
return[call[Stri... | Keyword[public] Keyword[static] identifier[CharSequence] identifier[unescapeHtml] operator[SEP] Keyword[final] identifier[CharSequence] identifier[cs] operator[SEP] {
Keyword[if] operator[SEP] identifier[cs] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[cs] operator[SEP]
}... |
public void drawImage(Image img, double x, double y, double width, double height) {
this.gc.drawImage(img,
doc2fxX(x), doc2fxY(y),
doc2fxSize(width), doc2fxSize(height));
} | class class_name[name] begin[{]
method[drawImage, return_type[void], modifier[public], parameter[img, x, y, width, height]] begin[{]
THIS[member[None.gc]call[None.drawImage, parameter[member[.img], call[.doc2fxX, parameter[member[.x]]], call[.doc2fxY, parameter[member[.y]]], call[.doc2fxSize, p... | Keyword[public] Keyword[void] identifier[drawImage] operator[SEP] identifier[Image] identifier[img] , Keyword[double] identifier[x] , Keyword[double] identifier[y] , Keyword[double] identifier[width] , Keyword[double] identifier[height] operator[SEP] {
Keyword[this] operator[SEP] identifier[gc] operator[SEP]... |
private void checkReady() {
if (allReady()) {
log.debug(String.format("%s - All components ready in network, starting components", NetworkManager.this));
// Set the network's status key to the current context version. This
// can be used by listeners to determine when a configuration change is com... | class class_name[name] begin[{]
method[checkReady, return_type[void], modifier[private], parameter[]] begin[{]
if[call[.allReady, parameter[]]] begin[{]
call[log.debug, parameter[call[String.format, parameter[literal["%s - All components ready in network, starting compon... | Keyword[private] Keyword[void] identifier[checkReady] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[allReady] operator[SEP] operator[SEP] operator[SEP] {
identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP]... |
public static <T, BT extends Procedure<? super T>> void forEach(
Iterable<T> iterable,
BT procedure,
int minForkSize,
int taskCount)
{
ParallelIterate.forEach(iterable, procedure, minForkSize, taskCount, ParallelIterate.EXECUTOR_SERVICE);
} | class class_name[name] begin[{]
method[forEach, return_type[void], modifier[public static], parameter[iterable, procedure, minForkSize, taskCount]] begin[{]
call[ParallelIterate.forEach, parameter[member[.iterable], member[.procedure], member[.minForkSize], member[.taskCount], member[ParallelIt... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[BT] Keyword[extends] identifier[Procedure] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] Keyword[void] identifier[forEach] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[iterable] ... |
public static double getInterpolated(
NavigableMap<Double, ? extends Number> map, double key)
{
if (map.isEmpty())
{
throw new IllegalArgumentException("Empty map");
}
Entry<Double, ? extends Number> c = map.ceilingEntry(key);
Entry<Double, ? exten... | class class_name[name] begin[{]
method[getInterpolated, return_type[type[double]], modifier[public static], parameter[map, key]] begin[{]
if[call[map.isEmpty, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], ... | Keyword[public] Keyword[static] Keyword[double] identifier[getInterpolated] operator[SEP] identifier[NavigableMap] operator[<] identifier[Double] , operator[?] Keyword[extends] identifier[Number] operator[>] identifier[map] , Keyword[double] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[... |
public ImageResolutionXBase createImageResolutionXBaseFromString(EDataType eDataType, String initialValue) {
ImageResolutionXBase result = ImageResolutionXBase.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getN... | class class_name[name] begin[{]
method[createImageResolutionXBaseFromString, return_type[type[ImageResolutionXBase]], modifier[public], parameter[eDataType, initialValue]] begin[{]
local_variable[type[ImageResolutionXBase], result]
if[binary_operation[member[.result], ==, literal[null]]... | Keyword[public] identifier[ImageResolutionXBase] identifier[createImageResolutionXBaseFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] {
identifier[ImageResolutionXBase] identifier[result] operator[=] identifier[ImageResolutionXBas... |
public int getLastStrokeChunk() {
int lastIdx = line.size() - 1;
for (; lastIdx >= 0; --lastIdx) {
PdfChunk chunk = (PdfChunk)line.get(lastIdx);
if (chunk.isStroked())
break;
}
return lastIdx;
} | class class_name[name] begin[{]
method[getLastStrokeChunk, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], lastIdx]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensi... | Keyword[public] Keyword[int] identifier[getLastStrokeChunk] operator[SEP] operator[SEP] {
Keyword[int] identifier[lastIdx] operator[=] identifier[line] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] operator[SEP] identifier[lastIdx] operat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.