code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void unregisterExtension(String keyStr) throws NotFound, RuntimeFault, RemoteException {
if (keyStr == null) {
throw new NullPointerException();
}
getVimService().unregisterExtension(getMOR(), keyStr);
} | class class_name[name] begin[{]
method[unregisterExtension, return_type[void], modifier[public], parameter[keyStr]] begin[{]
if[binary_operation[member[.keyStr], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=N... | Keyword[public] Keyword[void] identifier[unregisterExtension] operator[SEP] identifier[String] identifier[keyStr] operator[SEP] Keyword[throws] identifier[NotFound] , identifier[RuntimeFault] , identifier[RemoteException] {
Keyword[if] operator[SEP] identifier[keyStr] operator[==] Other[null] operator[SEP] {
... |
public static Object getFieldValue(Object object, String fieldName) throws NoSuchFieldException {
Field field = getDeclaredField(object, fieldName);
if (!field.isAccessible()) {
field.setAccessible(true);
}
Object result = null;
try {
result = field.get(o... | class class_name[name] begin[{]
method[getFieldValue, return_type[type[Object]], modifier[public static], parameter[object, fieldName]] begin[{]
local_variable[type[Field], field]
if[call[field.isAccessible, parameter[]]] begin[{]
call[field.setAccessible, parame... | Keyword[public] Keyword[static] identifier[Object] identifier[getFieldValue] operator[SEP] identifier[Object] identifier[object] , identifier[String] identifier[fieldName] operator[SEP] Keyword[throws] identifier[NoSuchFieldException] {
identifier[Field] identifier[field] operator[=] identifier[getDeclaredField... |
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case TypesPackage.JVM_COMPONENT_TYPE__ARRAY_TYPE:
return getArrayType();
}
return super.eGet(featureID, resolve, coreType);
} | class class_name[name] begin[{]
method[eGet, return_type[type[Object]], modifier[public], parameter[featureID, resolve, coreType]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=JVM_COMPONENT_TYPE__ARRAY_TYPE, postfix_operators=[], prefix_operators=[], qualifier=TypesP... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[eGet] operator[SEP] Keyword[int] identifier[featureID] , Keyword[boolean] identifier[resolve] , Keyword[boolean] identifier[coreType] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
K... |
public void addTintResourceId(int resId) {
if (mCustomTintDrawableIds == null)
mCustomTintDrawableIds = new ArrayList<Integer>();
mCustomTintDrawableIds.add(resId);
} | class class_name[name] begin[{]
method[addTintResourceId, return_type[void], modifier[public], parameter[resId]] begin[{]
if[binary_operation[member[.mCustomTintDrawableIds], ==, literal[null]]] begin[{]
assign[member[.mCustomTintDrawableIds], ClassCreator(arguments=[], body=None, c... | Keyword[public] Keyword[void] identifier[addTintResourceId] operator[SEP] Keyword[int] identifier[resId] operator[SEP] {
Keyword[if] operator[SEP] identifier[mCustomTintDrawableIds] operator[==] Other[null] operator[SEP] identifier[mCustomTintDrawableIds] operator[=] Keyword[new] identifier[ArrayList] operator[<... |
public void enqueue(SnackbarEvent event) {
synchronized (this) {
if (!eventsSet.contains(event)) {
eventsSet.add(event);
eventQueue.offer(event);
} else if (currentEvent == event && pauseTransition != null) {
pauseTransition.playFromStart()... | class class_name[name] begin[{]
method[enqueue, return_type[void], modifier[public], parameter[event]] begin[{]
SYNCHRONIZED[THIS[]] BEGIN[{]
if[call[eventsSet.contains, parameter[member[.event]]]] begin[{]
call[eventsSet.add, parameter[me... | Keyword[public] Keyword[void] identifier[enqueue] operator[SEP] identifier[SnackbarEvent] identifier[event] operator[SEP] {
Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[eventsSet] operator[SEP] identifier[contains] operator[SEP] ide... |
public static DynamicMessage sdcFieldToProtobufMsg(
Record record,
Descriptors.Descriptor desc,
Map<String, Set<Descriptors.FieldDescriptor>> messageTypeToExtensionMap,
Map<String, Object> defaultValueMap
) throws DataGeneratorException {
return sdcFieldToProtobufMsg(record, record.get(), ... | class class_name[name] begin[{]
method[sdcFieldToProtobufMsg, return_type[type[DynamicMessage]], modifier[public static], parameter[record, desc, messageTypeToExtensionMap, defaultValueMap]] begin[{]
return[call[.sdcFieldToProtobufMsg, parameter[member[.record], call[record.get, parameter[]], literal["... | Keyword[public] Keyword[static] identifier[DynamicMessage] identifier[sdcFieldToProtobufMsg] operator[SEP] identifier[Record] identifier[record] , identifier[Descriptors] operator[SEP] identifier[Descriptor] identifier[desc] , identifier[Map] operator[<] identifier[String] , identifier[Set] operator[<] identifier[De... |
@Override
public Collection<T> readAll() throws InvalidKeyException {
ensureOpen();
ArrayList<T> dataList = new ArrayList<T>();
String sql = "SELECT " + COLUMN_DATA + " FROM " + TABLE_NAME;
Cursor cursor = getReadableDatabase().rawQuery(sql, new String[0]);
try {
... | class class_name[name] begin[{]
method[readAll, return_type[type[Collection]], modifier[public], parameter[]] begin[{]
call[.ensureOpen, parameter[]]
local_variable[type[ArrayList], dataList]
local_variable[type[String], sql]
local_variable[type[Cursor], cursor]
... | annotation[@] identifier[Override] Keyword[public] identifier[Collection] operator[<] identifier[T] operator[>] identifier[readAll] operator[SEP] operator[SEP] Keyword[throws] identifier[InvalidKeyException] {
identifier[ensureOpen] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] iden... |
public static boolean available(final String host, final int port)
{
Socket socket = null;
try
{
socket = newSocket(host, port);
return false;
}
catch (final IOException ignored)
{
return true;
}
finally
{
if (!closeClientSocket(socket))
{
LOGGER.error("Socket could... | class class_name[name] begin[{]
method[available, return_type[type[boolean]], modifier[public static], parameter[host, port]] begin[{]
local_variable[type[Socket], socket]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=socket, postfix_operators=... | Keyword[public] Keyword[static] Keyword[boolean] identifier[available] operator[SEP] Keyword[final] identifier[String] identifier[host] , Keyword[final] Keyword[int] identifier[port] operator[SEP] {
identifier[Socket] identifier[socket] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[... |
public static void unescapeHtml(final String text, final Writer writer)
throws IOException {
if (writer == null) {
throw new IllegalArgumentException("Argument 'writer' cannot be null");
}
if (text == null) {
return;
}
if (text.indexOf('&') < ... | class class_name[name] begin[{]
method[unescapeHtml, return_type[void], modifier[public static], parameter[text, writer]] begin[{]
if[binary_operation[member[.writer], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix... | Keyword[public] Keyword[static] Keyword[void] identifier[unescapeHtml] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[Writer] identifier[writer] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[writer] operator[==] Other[n... |
private String expandLHS(final String lhs,
int lineOffset) {
substitutions = new ArrayList<Map<String, String>>();
// logger.info( "*** LHS>" + lhs + "<" );
final StringBuilder buf = new StringBuilder();
final String[] lines = lhs.split( (lhs... | class class_name[name] begin[{]
method[expandLHS, return_type[type[String]], modifier[private], parameter[lhs, lineOffset]] begin[{]
assign[member[.substitutions], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, s... | Keyword[private] identifier[String] identifier[expandLHS] operator[SEP] Keyword[final] identifier[String] identifier[lhs] , Keyword[int] identifier[lineOffset] operator[SEP] {
identifier[substitutions] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Map] operator[<] identifier[String] , i... |
public SwiftCachedObject get(final String objName) throws IOException {
LOG.trace("Get from cache: {}", objName);
SwiftCachedObject res = cache.get(objName);
if (res == null) {
LOG.trace("Cache get: {} is not in the cache. Access Swift to get content length", objName);
StoredObject rawObj = cont... | class class_name[name] begin[{]
method[get, return_type[type[SwiftCachedObject]], modifier[public], parameter[objName]] begin[{]
call[LOG.trace, parameter[literal["Get from cache: {}"], member[.objName]]]
local_variable[type[SwiftCachedObject], res]
if[binary_operation[m... | Keyword[public] identifier[SwiftCachedObject] identifier[get] operator[SEP] Keyword[final] identifier[String] identifier[objName] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[LOG] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[objName] operator[SEP] operator[SEP... |
public void addComment(Comment comment) {
assertNotNull(comment);
if (comments == null) {
comments = new TreeSet<Comment>(new AstNode.PositionComparator());
}
comments.add(comment);
comment.setParent(this);
} | class class_name[name] begin[{]
method[addComment, return_type[void], modifier[public], parameter[comment]] begin[{]
call[.assertNotNull, parameter[member[.comment]]]
if[binary_operation[member[.comments], ==, literal[null]]] begin[{]
assign[member[.comme... | Keyword[public] Keyword[void] identifier[addComment] operator[SEP] identifier[Comment] identifier[comment] operator[SEP] {
identifier[assertNotNull] operator[SEP] identifier[comment] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[comments] operator[==] Other[null] operator[SEP] {
ide... |
@Cmd
public Reporter registerReporter(final Reporter reporter) {
injector.injectMembers(reporter);
reporters.add(reporter);
return reporter;
} | class class_name[name] begin[{]
method[registerReporter, return_type[type[Reporter]], modifier[public], parameter[reporter]] begin[{]
call[injector.injectMembers, parameter[member[.reporter]]]
call[reporters.add, parameter[member[.reporter]]]
return[member[.reporter]]
... | annotation[@] identifier[Cmd] Keyword[public] identifier[Reporter] identifier[registerReporter] operator[SEP] Keyword[final] identifier[Reporter] identifier[reporter] operator[SEP] {
identifier[injector] operator[SEP] identifier[injectMembers] operator[SEP] identifier[reporter] operator[SEP] operator[SEP] identi... |
public void registerTagError(String message, String tagName, JspTag tag, Throwable e)
throws JspException
{
assert (message != null) : "parameter 'message' must not be null.";
// add the error to the list of errors
if (_errors == null)
_errors = new ArrayList();
... | class class_name[name] begin[{]
method[registerTagError, return_type[void], modifier[public], parameter[message, tagName, tag, e]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=L... | Keyword[public] Keyword[void] identifier[registerTagError] operator[SEP] identifier[String] identifier[message] , identifier[String] identifier[tagName] , identifier[JspTag] identifier[tag] , identifier[Throwable] identifier[e] operator[SEP] Keyword[throws] identifier[JspException] {
Keyword[assert] operator[... |
public boolean expired(int expiration) {
if (null == cliContext) {
return true;
}
if ((daemon || cliContext.inProgress()) && !cliContext.disconnected()) {
return false;
}
long l = expiration * 1000;
return l < ($.ms() - ts);
} | class class_name[name] begin[{]
method[expired, return_type[type[boolean]], modifier[public], parameter[expiration]] begin[{]
if[binary_operation[literal[null], ==, member[.cliContext]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
if[bina... | Keyword[public] Keyword[boolean] identifier[expired] operator[SEP] Keyword[int] identifier[expiration] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[cliContext] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[if] operator[SEP] oper... |
@Override
public <V> Observable<V> mapGet(final String docId, final String key, Class<V> valueType) {
final Func1<DocumentFragment<Lookup>, V> mapResult = new Func1<DocumentFragment<Lookup>, V>() {
@Override
public V call(DocumentFragment<Lookup> documentFragment) {
R... | class class_name[name] begin[{]
method[mapGet, return_type[type[Observable]], modifier[public], parameter[docId, key, valueType]] begin[{]
local_variable[type[Func1], mapResult]
return[call[.lookupIn, parameter[member[.docId]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[V] operator[>] identifier[Observable] operator[<] identifier[V] operator[>] identifier[mapGet] operator[SEP] Keyword[final] identifier[String] identifier[docId] , Keyword[final] identifier[String] identifier[key] , identifier[Class] operator[<]... |
public Either<String, List<Interval>> segments(String dataSource, Map<String, String> reqHeaders) {
Either<String, Either<JSONArray, JSONObject>> resp = fireCommand("druid/coordinator/v1/metadata/datasources/" + dataSource + "/segments?full", null, reqHeaders);
if (resp.isLeft()) {
return ne... | class class_name[name] begin[{]
method[segments, return_type[type[Either]], modifier[public], parameter[dataSource, reqHeaders]] begin[{]
local_variable[type[Either], resp]
if[call[resp.isLeft, parameter[]]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=... | Keyword[public] identifier[Either] operator[<] identifier[String] , identifier[List] operator[<] identifier[Interval] operator[>] operator[>] identifier[segments] operator[SEP] identifier[String] identifier[dataSource] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[reqHe... |
public void start() throws Exception {
installShutdownHook();
System.out.println();
System.out.printf("Starting benchmark(s) [msgs=%d, msgsize=%d, pubs=%d, subs=%d]\n", numMsgs,
size, numPubs, numSubs);
System.out.printf("Current memory usage is %s / %s / %s free/total/m... | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[]] begin[{]
call[.installShutdownHook, parameter[]]
call[System.out.println, parameter[]]
call[System.out.printf, parameter[literal["Starting benchmark(s) [msgs=%d, msgsi... | Keyword[public] Keyword[void] identifier[start] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[installShutdownHook] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP... |
public String getOptionValue(String opt, String defaultValue)
{
String answer = getOptionValue(opt);
return (answer != null) ? answer : defaultValue;
} | class class_name[name] begin[{]
method[getOptionValue, return_type[type[String]], modifier[public], parameter[opt, defaultValue]] begin[{]
local_variable[type[String], answer]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=answer, postfix_operators=[], prefix... | Keyword[public] identifier[String] identifier[getOptionValue] operator[SEP] identifier[String] identifier[opt] , identifier[String] identifier[defaultValue] operator[SEP] {
identifier[String] identifier[answer] operator[=] identifier[getOptionValue] operator[SEP] identifier[opt] operator[SEP] operator[SEP] Keyw... |
public final Session getSession(String name) {
GetSessionRequest request = GetSessionRequest.newBuilder().setName(name).build();
return getSession(request);
} | class class_name[name] begin[{]
method[getSession, return_type[type[Session]], modifier[final public], parameter[name]] begin[{]
local_variable[type[GetSessionRequest], request]
return[call[.getSession, parameter[member[.request]]]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[Session] identifier[getSession] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[GetSessionRequest] identifier[request] operator[=] identifier[GetSessionRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] id... |
public List<String> getAll() {
List<String> values = new ArrayList<String>();
for (DataColumn column : columns) {
values.add(content.get(column));
}
return values;
} | class class_name[name] begin[{]
method[getAll, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], values]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Memb... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getAll] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[values] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] opera... |
public static void advance(Progression model, int value) {
if (model != null && value > 0) {
final SubProgressionModel sub = (SubProgressionModel) model.getSubTask();
final double base;
if (sub == null) {
base = model.getValue();
} else {
base = sub.getMinInParent();
model.ensureNoSubTask();
... | class class_name[name] begin[{]
method[advance, return_type[void], modifier[public static], parameter[model, value]] begin[{]
if[binary_operation[binary_operation[member[.model], !=, literal[null]], &&, binary_operation[member[.value], >, literal[0]]]] begin[{]
local_variable[type[S... | Keyword[public] Keyword[static] Keyword[void] identifier[advance] operator[SEP] identifier[Progression] identifier[model] , Keyword[int] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[model] operator[!=] Other[null] operator[&&] identifier[value] operator[>] Other[0] operator[SEP] {
... |
private Set<String> getMappedCorpora(List<String> originalNames)
{
WebResource rootRes = Helper.getAnnisWebResource();
Set<String> mappedNames = new HashSet<>();
// iterate over given corpora and map names if necessary
for (String selectedCorpusName : originalNames)
{
// get the real corpus ... | class class_name[name] begin[{]
method[getMappedCorpora, return_type[type[Set]], modifier[private], parameter[originalNames]] begin[{]
local_variable[type[WebResource], rootRes]
local_variable[type[Set], mappedNames]
ForStatement(body=BlockStatement(label=None, statements=[TryStatement(... | Keyword[private] identifier[Set] operator[<] identifier[String] operator[>] identifier[getMappedCorpora] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[originalNames] operator[SEP] {
identifier[WebResource] identifier[rootRes] operator[=] identifier[Helper] operator[SEP] ide... |
public int numberOfInserts() {
final Integer cachedValue = numberOfInsertsCache;
if (cachedValue != null) {
return cachedValue;
}
int numberOfInserts = 0;
for (T object : results.keySet()) {
if (results.get(object).wasInserted()) {
numbe... | class class_name[name] begin[{]
method[numberOfInserts, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[Integer], cachedValue]
if[binary_operation[member[.cachedValue], !=, literal[null]]] begin[{]
return[member[.cachedValue]]
else... | Keyword[public] Keyword[int] identifier[numberOfInserts] operator[SEP] operator[SEP] {
Keyword[final] identifier[Integer] identifier[cachedValue] operator[=] identifier[numberOfInsertsCache] operator[SEP] Keyword[if] operator[SEP] identifier[cachedValue] operator[!=] Other[null] operator[SEP] {
Keywor... |
public boolean isJspPage(String uri) throws JasperException {
init();
if (jspProperties == null) {
return false;
}
String uriPath = null;
int index = uri.lastIndexOf('/');
if (index >=0 ) {
uriPath = uri.substring(0, index+1);
}
S... | class class_name[name] begin[{]
method[isJspPage, return_type[type[boolean]], modifier[public], parameter[uri]] begin[{]
call[.init, parameter[]]
if[binary_operation[member[.jspProperties], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
Non... | Keyword[public] Keyword[boolean] identifier[isJspPage] operator[SEP] identifier[String] identifier[uri] operator[SEP] Keyword[throws] identifier[JasperException] {
identifier[init] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jspProperties] operator[==] Other[null] operator[SEP]... |
protected void notifyPropertiesChanged(Properties oldProperties) {
PropertiesReloadedEvent event = new PropertiesReloadedEvent(this, oldProperties);
for (IReloadablePropertiesListener listener : listeners) {
listener.propertiesReloaded(event);
}
} | class class_name[name] begin[{]
method[notifyPropertiesChanged, return_type[void], modifier[protected], parameter[oldProperties]] begin[{]
local_variable[type[PropertiesReloadedEvent], event]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocatio... | Keyword[protected] Keyword[void] identifier[notifyPropertiesChanged] operator[SEP] identifier[Properties] identifier[oldProperties] operator[SEP] {
identifier[PropertiesReloadedEvent] identifier[event] operator[=] Keyword[new] identifier[PropertiesReloadedEvent] operator[SEP] Keyword[this] , identifier[oldPrope... |
@SuppressWarnings({ "rawtypes", "unchecked" })
private AttributeValue getCustomerMarshallerAttributeValue(Method getter, Object getterReturnResult) {
DynamoDBMarshalling annotation = getter.getAnnotation(DynamoDBMarshalling.class);
Class<? extends DynamoDBMarshaller<? extends Object>> marshallerClas... | class class_name[name] begin[{]
method[getCustomerMarshallerAttributeValue, return_type[type[AttributeValue]], modifier[private], parameter[getter, getterReturnResult]] begin[{]
local_variable[type[DynamoDBMarshalling], annotation]
local_variable[type[Class], marshallerClass]
local_vari... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String]
} operator[SEP] Keyword[private] identifier[AttributeValue] identifier[getCustomerMarshallerAttributeValue] operator[SEP] identifier[Method] identifier[getter] , identifier[Object] identifier[getterReturnResult] ope... |
public static <E> Set<E> difference(Set<? extends E> s1, Set<? extends E> s2) {
Set<E> copy1 = new HashSet<>(s1);
copy1.removeAll(new HashSet<>(s2));
return copy1;
} | class class_name[name] begin[{]
method[difference, return_type[type[Set]], modifier[public static], parameter[s1, s2]] begin[{]
local_variable[type[Set], copy1]
call[copy1.removeAll, parameter[ClassCreator(arguments=[MemberReference(member=s2, postfix_operators=[], prefix_operators=[], ... | Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Set] operator[<] identifier[E] operator[>] identifier[difference] operator[SEP] identifier[Set] operator[<] operator[?] Keyword[extends] identifier[E] operator[>] identifier[s1] , identifier[Set] operator[<] operator[?] Keyword[extends] i... |
public static long baseTime(final TSDB tsdb, final byte[] row) {
return Bytes.getUnsignedInt(row, Const.SALT_WIDTH() + TSDB.metrics_width());
} | class class_name[name] begin[{]
method[baseTime, return_type[type[long]], modifier[public static], parameter[tsdb, row]] begin[{]
return[call[Bytes.getUnsignedInt, parameter[member[.row], binary_operation[call[Const.SALT_WIDTH, parameter[]], +, call[TSDB.metrics_width, parameter[]]]]]]
end[}]
END[}... | Keyword[public] Keyword[static] Keyword[long] identifier[baseTime] operator[SEP] Keyword[final] identifier[TSDB] identifier[tsdb] , Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[row] operator[SEP] {
Keyword[return] identifier[Bytes] operator[SEP] identifier[getUnsignedInt] operator[SEP] id... |
Path absolutePathFor( String absPath ) throws RepositoryException {
Path path = null;
try {
path = pathFactory().create(absPath);
} catch (org.modeshape.jcr.value.ValueFormatException e) {
throw new RepositoryException(e.getMessage());
}
if (!path.isAbsolu... | class class_name[name] begin[{]
method[absolutePathFor, return_type[type[Path]], modifier[default], parameter[absPath]] begin[{]
local_variable[type[Path], path]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=path, postfix_operators=[], prefix_o... | identifier[Path] identifier[absolutePathFor] operator[SEP] identifier[String] identifier[absPath] operator[SEP] Keyword[throws] identifier[RepositoryException] {
identifier[Path] identifier[path] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[path] operator[=] identifier[pathFactory] ... |
public final EObject entryRuleXBooleanLiteral() throws RecognitionException {
EObject current = null;
EObject iv_ruleXBooleanLiteral = null;
try {
// InternalXbase.g:4657:56: (iv_ruleXBooleanLiteral= ruleXBooleanLiteral EOF )
// InternalXbase.g:4658:2: iv_ruleXBooleanL... | class class_name[name] begin[{]
method[entryRuleXBooleanLiteral, return_type[type[EObject]], modifier[final public], parameter[]] begin[{]
local_variable[type[EObject], current]
local_variable[type[EObject], iv_ruleXBooleanLiteral]
TryStatement(block=[BlockStatement(label=None, statemen... | Keyword[public] Keyword[final] identifier[EObject] identifier[entryRuleXBooleanLiteral] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[iv_ruleXBooleanLiteral] operator[=] O... |
public Observable<ExpressRouteCircuitsRoutesTableSummaryListResultInner> beginListRoutesTableSummaryAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) {
return beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).map... | class class_name[name] begin[{]
method[beginListRoutesTableSummaryAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, circuitName, peeringName, devicePath]] begin[{]
return[call[.beginListRoutesTableSummaryWithServiceResponseAsync, parameter[member[.resourceGroupName], ... | Keyword[public] identifier[Observable] operator[<] identifier[ExpressRouteCircuitsRoutesTableSummaryListResultInner] operator[>] identifier[beginListRoutesTableSummaryAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[circuitName] , identifier[String] identifier[peer... |
private int getCase(int varIndex) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "getCase", new Object[]{Integer.valueOf(varIndex)});
int result;
synchronized (getMessageLockArtefact()) {
if (map != null) {
result = map.choiceCodes[varIndex];
}... | class class_name[name] begin[{]
method[getCase, return_type[type[int]], modifier[private], parameter[varIndex]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[JmfTr.entry, parameter[THIS[],... | Keyword[private] Keyword[int] identifier[getCase] operator[SEP] Keyword[int] identifier[varIndex] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] ope... |
public static void removeRecursive( Object json, String keyToRemove ) {
if ( ( json == null ) || ( keyToRemove == null ) ) {
return;
}
if ( json instanceof Map ) {
Map<String, Object> jsonMap = cast(json);
// If this level of the tree has the key we are looki... | class class_name[name] begin[{]
method[removeRecursive, return_type[void], modifier[public static], parameter[json, keyToRemove]] begin[{]
if[binary_operation[binary_operation[member[.json], ==, literal[null]], ||, binary_operation[member[.keyToRemove], ==, literal[null]]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[void] identifier[removeRecursive] operator[SEP] identifier[Object] identifier[json] , identifier[String] identifier[keyToRemove] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[json] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] iden... |
protected void initDebugger() {
if (reader == null || writer == null) {
throw new NullPointerException("Reader or writer isn't initialized.");
}
// If debugging is enabled, we open a window and write out all network traffic.
if (debugger != null) {
// Obtain new r... | class class_name[name] begin[{]
method[initDebugger, return_type[void], modifier[protected], parameter[]] begin[{]
if[binary_operation[binary_operation[member[.reader], ==, literal[null]], ||, binary_operation[member[.writer], ==, literal[null]]]] begin[{]
ThrowStatement(expression=... | Keyword[protected] Keyword[void] identifier[initDebugger] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[reader] operator[==] Other[null] operator[||] identifier[writer] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[NullPointerException] operator[S... |
@Override
protected ResultSet findItemByName(String parentId, String name, int index) throws SQLException
{
if (findItemByName == null)
{
findItemByName = dbConnection.prepareStatement(FIND_ITEM_BY_NAME);
}
else
{
findItemByName.clearParameters();
}
fin... | class class_name[name] begin[{]
method[findItemByName, return_type[type[ResultSet]], modifier[protected], parameter[parentId, name, index]] begin[{]
if[binary_operation[member[.findItemByName], ==, literal[null]]] begin[{]
assign[member[.findItemByName], call[dbConnectio... | annotation[@] identifier[Override] Keyword[protected] identifier[ResultSet] identifier[findItemByName] operator[SEP] identifier[String] identifier[parentId] , identifier[String] identifier[name] , Keyword[int] identifier[index] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] ... |
public static tunneltrafficpolicy[] get(nitro_service service, options option) throws Exception{
tunneltrafficpolicy obj = new tunneltrafficpolicy();
tunneltrafficpolicy[] response = (tunneltrafficpolicy[])obj.get_resources(service,option);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[tunneltrafficpolicy]], modifier[public static], parameter[service, option]] begin[{]
local_variable[type[tunneltrafficpolicy], obj]
local_variable[type[tunneltrafficpolicy], response]
return[member[.response]]
end[}]
END[}... | Keyword[public] Keyword[static] identifier[tunneltrafficpolicy] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[options] identifier[option] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[tunneltrafficpolicy] identifier[obj] o... |
@UiHandler("m_everyDay")
void onEveryDayChange(ValueChangeEvent<String> event) {
if (handleChange()) {
m_controller.setInterval(m_everyDay.getFormValueAsString());
}
} | class class_name[name] begin[{]
method[onEveryDayChange, return_type[void], modifier[default], parameter[event]] begin[{]
if[call[.handleChange, parameter[]]] begin[{]
call[m_controller.setInterval, parameter[call[m_everyDay.getFormValueAsString, parameter[]]]]
e... | annotation[@] identifier[UiHandler] operator[SEP] literal[String] operator[SEP] Keyword[void] identifier[onEveryDayChange] operator[SEP] identifier[ValueChangeEvent] operator[<] identifier[String] operator[>] identifier[event] operator[SEP] {
Keyword[if] operator[SEP] identifier[handleChange] operator[SEP] opera... |
public static void serializeHeadersForMultipartRequests(
HttpHeaders headers, StringBuilder logbuf, Logger logger, Writer writer) throws IOException {
serializeHeaders(headers, logbuf, null, logger, null, writer);
} | class class_name[name] begin[{]
method[serializeHeadersForMultipartRequests, return_type[void], modifier[public static], parameter[headers, logbuf, logger, writer]] begin[{]
call[.serializeHeaders, parameter[member[.headers], member[.logbuf], literal[null], member[.logger], literal[null], membe... | Keyword[public] Keyword[static] Keyword[void] identifier[serializeHeadersForMultipartRequests] operator[SEP] identifier[HttpHeaders] identifier[headers] , identifier[StringBuilder] identifier[logbuf] , identifier[Logger] identifier[logger] , identifier[Writer] identifier[writer] operator[SEP] Keyword[throws] identif... |
void renameProperties() {
int propsRenamed = 0;
int propsSkipped = 0;
int instancesRenamed = 0;
int instancesSkipped = 0;
int singleTypeProps = 0;
Set<String> reported = new HashSet<>();
for (Property prop : properties.values()) {
if (prop.shouldRename()) {
UnionFind<JSType> p... | class class_name[name] begin[{]
method[renameProperties, return_type[void], modifier[default], parameter[]] begin[{]
local_variable[type[int], propsRenamed]
local_variable[type[int], propsSkipped]
local_variable[type[int], instancesRenamed]
local_variable[type[int], instancesSki... | Keyword[void] identifier[renameProperties] operator[SEP] operator[SEP] {
Keyword[int] identifier[propsRenamed] operator[=] Other[0] operator[SEP] Keyword[int] identifier[propsSkipped] operator[=] Other[0] operator[SEP] Keyword[int] identifier[instancesRenamed] operator[=] Other[0] operator[SEP] Keyword[int] iden... |
INodeFile getFileINode(byte[][] components) {
readLock();
try {
INode inode = rootDir.getNode(components);
if (inode == null || inode.isDirectory())
return null;
return (INodeFile)inode;
} finally {
readUnlock();
}
} | class class_name[name] begin[{]
method[getFileINode, return_type[type[INodeFile]], modifier[default], parameter[components]] begin[{]
call[.readLock, parameter[]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Meth... | identifier[INodeFile] identifier[getFileINode] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[components] operator[SEP] {
identifier[readLock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[INode] identifier[inode] operator[=] identi... |
public static Set<ConstraintViolation<Object>> validate(final Object obj, final Class<?>... scopes) {
if (scopes == null) {
return validator().validate(obj, Default.class);
}
return validator().validate(obj, scopes);
} | class class_name[name] begin[{]
method[validate, return_type[type[Set]], modifier[public static], parameter[obj, scopes]] begin[{]
if[binary_operation[member[.scopes], ==, literal[null]]] begin[{]
return[call[.validator, parameter[]]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[ConstraintViolation] operator[<] identifier[Object] operator[>] operator[>] identifier[validate] operator[SEP] Keyword[final] identifier[Object] identifier[obj] , Keyword[final] identifier[Class] operator[<] operator[?] operator[>] operator[...] id... |
public void closeReport( Report report ) throws IOException, URISyntaxException {
FileWriter out = null;
try
{
File reportFile = new File( reportsDirectory, outputNameOf( report ) );
String documentUri = report.getDocumentUri();
if (documentUri != null) {
... | class class_name[name] begin[{]
method[closeReport, return_type[void], modifier[public], parameter[report]] begin[{]
local_variable[type[FileWriter], out]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(argumen... | Keyword[public] Keyword[void] identifier[closeReport] operator[SEP] identifier[Report] identifier[report] operator[SEP] Keyword[throws] identifier[IOException] , identifier[URISyntaxException] {
identifier[FileWriter] identifier[out] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[Fil... |
public static POJODefinition find(Class<?> forType)
{
try {
return _find(forType);
} catch (Exception e) {
throw new IllegalArgumentException(String.format
("Failed to introspect ClassDefinition for type '%s': %s",
forType.getNa... | class class_name[name] begin[{]
method[find, return_type[type[POJODefinition]], modifier[public static], parameter[forType]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=forType, postfix_operators=[], prefix_operators=[], qualifier=, selecto... | Keyword[public] Keyword[static] identifier[POJODefinition] identifier[find] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[forType] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[_find] operator[SEP] identifier[forType] operator[SEP] operator[SEP]
}
... |
public static <T> BlockingQueue<T> leftShift(BlockingQueue<T> self, T value) throws InterruptedException {
self.put(value);
return self;
} | class class_name[name] begin[{]
method[leftShift, return_type[type[BlockingQueue]], modifier[public static], parameter[self, value]] begin[{]
call[self.put, parameter[member[.value]]]
return[member[.self]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[BlockingQueue] operator[<] identifier[T] operator[>] identifier[leftShift] operator[SEP] identifier[BlockingQueue] operator[<] identifier[T] operator[>] identifier[self] , identifier[T] identifier[value] operator[SEP] Keyword[throws] iden... |
@Override
public Mono<Void> save(MongoSession session) {
DBObject dbObject = convertToDBObject(this.mongoSessionConverter, session);
if (dbObject != null) {
return this.mongoOperations.save(dbObject, this.collectionName).then();
} else {
return Mono.empty();
}
} | class class_name[name] begin[{]
method[save, return_type[type[Mono]], modifier[public], parameter[session]] begin[{]
local_variable[type[DBObject], dbObject]
if[binary_operation[member[.dbObject], !=, literal[null]]] begin[{]
return[THIS[member[None.mongoOperations]call[None... | annotation[@] identifier[Override] Keyword[public] identifier[Mono] operator[<] identifier[Void] operator[>] identifier[save] operator[SEP] identifier[MongoSession] identifier[session] operator[SEP] {
identifier[DBObject] identifier[dbObject] operator[=] identifier[convertToDBObject] operator[SEP] Keyword[this] ... |
@Deprecated
public C expect(int allowedStatements, Query query) {
return expect(SqlQueries.exactQueries(allowedStatements).type(adapter(query)));
} | class class_name[name] begin[{]
method[expect, return_type[type[C]], modifier[public], parameter[allowedStatements, query]] begin[{]
return[call[.expect, parameter[call[SqlQueries.exactQueries, parameter[member[.allowedStatements]]]]]]
end[}]
END[}] | annotation[@] identifier[Deprecated] Keyword[public] identifier[C] identifier[expect] operator[SEP] Keyword[int] identifier[allowedStatements] , identifier[Query] identifier[query] operator[SEP] {
Keyword[return] identifier[expect] operator[SEP] identifier[SqlQueries] operator[SEP] identifier[exactQueries] oper... |
protected void handleSloProfileRequest(final HttpServletResponse response,
final HttpServletRequest request,
final BaseHttpServletRequestXMLMessageDecoder decoder) throws Exception {
val logout = getSamlProfileHandlerConfigura... | class class_name[name] begin[{]
method[handleSloProfileRequest, return_type[void], modifier[protected], parameter[response, request, decoder]] begin[{]
local_variable[type[val], logout]
if[call[logout.isSingleLogoutCallbacksDisabled, parameter[]]] begin[{]
call[L... | Keyword[protected] Keyword[void] identifier[handleSloProfileRequest] operator[SEP] Keyword[final] identifier[HttpServletResponse] identifier[response] , Keyword[final] identifier[HttpServletRequest] identifier[request] , Keyword[final] identifier[BaseHttpServletRequestXMLMessageDecoder] identifier[decoder] operator[S... |
public <T> void adapt(@NonNull final Observable<T> subscriber, @Nullable final Callback<T> callback) {
subscriber.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<T>() {
@Override
public voi... | class class_name[name] begin[{]
method[adapt, return_type[void], modifier[public], parameter[subscriber, callback]] begin[{]
call[subscriber.subscribeOn, parameter[call[Schedulers.io, parameter[]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[adapt] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Observable] operator[<] identifier[T] operator[>] identifier[subscriber] , annotation[@] identifier[Nullable] Keyword[final] identifier[Callback] operator[<] i... |
private void updateResultSetRow(int row, QueryParameters params) throws SQLException {
int currentRow = getCurrentResultSet().getRow();
if (currentRow == 0) {
// before first or last
if (getCurrentResultSet().isAfterLast() == true) {
// positioning on last
... | class class_name[name] begin[{]
method[updateResultSetRow, return_type[void], modifier[private], parameter[row, params]] begin[{]
local_variable[type[int], currentRow]
if[binary_operation[member[.currentRow], ==, literal[0]]] begin[{]
if[binary_operation[call[.ge... | Keyword[private] Keyword[void] identifier[updateResultSetRow] operator[SEP] Keyword[int] identifier[row] , identifier[QueryParameters] identifier[params] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[int] identifier[currentRow] operator[=] identifier[getCurrentResultSet] operator[SEP] operato... |
@Override
public Axis deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
final JsonObject jsonObject = json.getAsJsonObject();
String _type = jsonObject.get("type").getAsString();
AxisType type = AxisType.valueOf(_type);
Axis a... | class class_name[name] begin[{]
method[deserialize, return_type[type[Axis]], modifier[public], parameter[json, typeOfT, context]] begin[{]
local_variable[type[JsonObject], jsonObject]
local_variable[type[String], _type]
local_variable[type[AxisType], type]
local_variable[type[Ax... | annotation[@] identifier[Override] Keyword[public] identifier[Axis] identifier[deserialize] operator[SEP] identifier[JsonElement] identifier[json] , identifier[Type] identifier[typeOfT] , identifier[JsonDeserializationContext] identifier[context] operator[SEP] Keyword[throws] identifier[JsonParseException] {
K... |
public void changePassword(final String oldPassword, final String newPassword) {
Authentication authentication = SecurityContextHolder.getContext()
.getAuthentication();
Assert.notNull(
authentication,
"No authentication object found in security context. Can't change current user's password!");
Strin... | class class_name[name] begin[{]
method[changePassword, return_type[void], modifier[public], parameter[oldPassword, newPassword]] begin[{]
local_variable[type[Authentication], authentication]
call[Assert.notNull, parameter[member[.authentication], literal["No authentication object found ... | Keyword[public] Keyword[void] identifier[changePassword] operator[SEP] Keyword[final] identifier[String] identifier[oldPassword] , Keyword[final] identifier[String] identifier[newPassword] operator[SEP] {
identifier[Authentication] identifier[authentication] operator[=] identifier[SecurityContextHolder] operato... |
private static <T> boolean anyKeyGeneratable(
final DynamoDBMapperTableModel<T> model,
final T object,
final SaveBehavior saveBehavior
) {
for (final DynamoDBMapperFieldModel<T, Object> field : model.keys()) {
if (canGenerate(model, object, saveBehavior, field)) {
... | class class_name[name] begin[{]
method[anyKeyGeneratable, return_type[type[boolean]], modifier[private static], parameter[model, object, saveBehavior]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=model, postf... | Keyword[private] Keyword[static] operator[<] identifier[T] operator[>] Keyword[boolean] identifier[anyKeyGeneratable] operator[SEP] Keyword[final] identifier[DynamoDBMapperTableModel] operator[<] identifier[T] operator[>] identifier[model] , Keyword[final] identifier[T] identifier[object] , Keyword[final] identifier[... |
@Override
public DescribeHyperParameterTuningJobResult describeHyperParameterTuningJob(DescribeHyperParameterTuningJobRequest request) {
request = beforeClientExecution(request);
return executeDescribeHyperParameterTuningJob(request);
} | class class_name[name] begin[{]
method[describeHyperParameterTuningJob, return_type[type[DescribeHyperParameterTuningJobResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDescri... | annotation[@] identifier[Override] Keyword[public] identifier[DescribeHyperParameterTuningJobResult] identifier[describeHyperParameterTuningJob] operator[SEP] identifier[DescribeHyperParameterTuningJobRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] o... |
public void check(ModelDef modelDef, String checkLevel) throws ConstraintException
{
ensureReferencedKeys(modelDef, checkLevel);
checkReferenceForeignkeys(modelDef, checkLevel);
checkCollectionForeignkeys(modelDef, checkLevel);
checkKeyModifications(modelDef, checkLevel);
} | class class_name[name] begin[{]
method[check, return_type[void], modifier[public], parameter[modelDef, checkLevel]] begin[{]
call[.ensureReferencedKeys, parameter[member[.modelDef], member[.checkLevel]]]
call[.checkReferenceForeignkeys, parameter[member[.modelDef], member[.check... | Keyword[public] Keyword[void] identifier[check] operator[SEP] identifier[ModelDef] identifier[modelDef] , identifier[String] identifier[checkLevel] operator[SEP] Keyword[throws] identifier[ConstraintException] {
identifier[ensureReferencedKeys] operator[SEP] identifier[modelDef] , identifier[checkLevel] operat... |
public HttpCall<Void> newCall() {
HttpUrl url =
pipeline != null
? http.baseUrl.newBuilder("_bulk").addQueryParameter("pipeline", pipeline).build()
: http.baseUrl.resolve("_bulk");
Request request =
new Request.Builder()
.url(url)
.tag(tag)
... | class class_name[name] begin[{]
method[newCall, return_type[type[HttpCall]], modifier[public], parameter[]] begin[{]
local_variable[type[HttpUrl], url]
local_variable[type[Request], request]
return[call[http.newCall, parameter[member[.request], member[.maybeFlush]]]]
end[}]
END[}] | Keyword[public] identifier[HttpCall] operator[<] identifier[Void] operator[>] identifier[newCall] operator[SEP] operator[SEP] {
identifier[HttpUrl] identifier[url] operator[=] identifier[pipeline] operator[!=] Other[null] operator[?] identifier[http] operator[SEP] identifier[baseUrl] operator[SEP] identifier[new... |
String getURI (String prefix)
{
if ("".equals(prefix)) {
return defaultNS;
} else if (prefixTable == null) {
return null;
} else {
return (String)prefixTable.get(prefix);
}
} | class class_name[name] begin[{]
method[getURI, return_type[type[String]], modifier[default], parameter[prefix]] begin[{]
if[literal[""]] begin[{]
return[member[.defaultNS]]
else begin[{]
if[binary_operation[member[.prefixTable], ==, literal[null]]] begin[{]
... | identifier[String] identifier[getURI] operator[SEP] identifier[String] identifier[prefix] operator[SEP] {
Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] {
Keyword[return] identifier[defaultNS] operator[SEP]
... |
@SuppressWarnings("unused")
private void setDraggingToColumn(int column, boolean isDragging) {
Collection<ViewHolder> holders = mViewHolders.getColumnItems(column);
for (ViewHolder holder : holders) {
holder.setIsDragging(isDragging);
}
ViewHolder holder = mHeaderColumnV... | class class_name[name] begin[{]
method[setDraggingToColumn, return_type[void], modifier[private], parameter[column, isDragging]] begin[{]
local_variable[type[Collection], holders]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[setDraggingToColumn] operator[SEP] Keyword[int] identifier[column] , Keyword[boolean] identifier[isDragging] operator[SEP] {
identifier[Collection] operator[<] identifier[ViewHolder] ... |
@Override
public void tagLocation(DataBuffer buffer, Location location) {
if (location == Location.HOST)
AtomicAllocator.getInstance().getAllocationPoint(buffer).tickHostWrite();
else if (location == Location.DEVICE)
AtomicAllocator.getInstance().getAllocationPoint(buffer).ti... | class class_name[name] begin[{]
method[tagLocation, return_type[void], modifier[public], parameter[buffer, location]] begin[{]
if[binary_operation[member[.location], ==, member[Location.HOST]]] begin[{]
call[AtomicAllocator.getInstance, parameter[]]
else begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[tagLocation] operator[SEP] identifier[DataBuffer] identifier[buffer] , identifier[Location] identifier[location] operator[SEP] {
Keyword[if] operator[SEP] identifier[location] operator[==] identifier[Location] operator[SEP] identifier[H... |
public FaunusPipeline groupCount(final String keyClosure, final String valueClosure) {
this.state.assertNotLocked();
this.compiler.addMapReduce(GroupCountMapReduce.Map.class,
GroupCountMapReduce.Combiner.class,
GroupCountMapReduce.Reduce.class,
Text.clas... | class class_name[name] begin[{]
method[groupCount, return_type[type[FaunusPipeline]], modifier[public], parameter[keyClosure, valueClosure]] begin[{]
THIS[member[None.state]call[None.assertNotLocked, parameter[]]]
THIS[member[None.compiler]call[None.addMapReduce, parameter[Class... | Keyword[public] identifier[FaunusPipeline] identifier[groupCount] operator[SEP] Keyword[final] identifier[String] identifier[keyClosure] , Keyword[final] identifier[String] identifier[valueClosure] operator[SEP] {
Keyword[this] operator[SEP] identifier[state] operator[SEP] identifier[assertNotLocked] operator[S... |
private List<String> getFieldPath(String field) {
String[] paths = field.split("(?<!\\\\)\\.");
ImmutableList.Builder<String> fields = ImmutableList.builder();
for (String path : paths) {
fields.add(path.replaceAll("\\\\\\.", ".").replaceAll("\\\\\\\\", "\\\\"));
}
re... | class class_name[name] begin[{]
method[getFieldPath, return_type[type[List]], modifier[private], parameter[field]] begin[{]
local_variable[type[String], paths]
local_variable[type[ImmutableList], fields]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expres... | Keyword[private] identifier[List] operator[<] identifier[String] operator[>] identifier[getFieldPath] operator[SEP] identifier[String] identifier[field] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[paths] operator[=] identifier[field] operator[SEP] identifier[split] operator[SEP] lit... |
public static String convertStreamToString(InputStream is, String charset) {
if (is == null) return null;
StringBuilder sb = new StringBuilder();
String line;
long linecount = 0;
long size = 0;
try {
// TODO: Can this be a performance killer if many many lines or is... | class class_name[name] begin[{]
method[convertStreamToString, return_type[type[String]], modifier[public static], parameter[is, charset]] begin[{]
if[binary_operation[member[.is], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable... | Keyword[public] Keyword[static] identifier[String] identifier[convertStreamToString] operator[SEP] identifier[InputStream] identifier[is] , identifier[String] identifier[charset] operator[SEP] {
Keyword[if] operator[SEP] identifier[is] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[... |
public void onFileChange(File file) {
mojo.getLog().info(EMPTY_STRING);
mojo.getLog().info("The watcher has detected a change in " + file.getAbsolutePath());
mojo.getLog().info(EMPTY_STRING);
for (Watcher watcher : watchers) {
if (watcher.accept(file)) {
clean... | class class_name[name] begin[{]
method[onFileChange, return_type[void], modifier[public], parameter[file]] begin[{]
call[mojo.getLog, parameter[]]
call[mojo.getLog, parameter[]]
call[mojo.getLog, parameter[]]
ForStatement(body=BlockStatement(label=None, s... | Keyword[public] Keyword[void] identifier[onFileChange] operator[SEP] identifier[File] identifier[file] operator[SEP] {
identifier[mojo] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] identifier[EMPTY_STRING] operator[SEP] operator[SEP] identifier[mojo] o... |
private void processMultipart(final Multipart mp) throws MessagingException, IOException {
final int count = mp.getCount();
for (int i = 0; i < count; i++) {
final Part innerPart = mp.getBodyPart(i);
processPart(innerPart);
}
} | class class_name[name] begin[{]
method[processMultipart, return_type[void], modifier[private], parameter[mp]] begin[{]
local_variable[type[int], count]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[]... | Keyword[private] Keyword[void] identifier[processMultipart] operator[SEP] Keyword[final] identifier[Multipart] identifier[mp] operator[SEP] Keyword[throws] identifier[MessagingException] , identifier[IOException] {
Keyword[final] Keyword[int] identifier[count] operator[=] identifier[mp] operator[SEP] identifier... |
public static Object makeSafeProxyCall(final Object proxy,final String methodToCallname,final Class[] signature,final Object[] values) throws PrivilegedActionException
{
//Here we execute in sbb/profile or any other slee component domain
// so no security calls can be made
try {
//AccessControlContext a... | class class_name[name] begin[{]
method[makeSafeProxyCall, return_type[type[Object]], modifier[public static], parameter[proxy, methodToCallname, signature, values]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(ann... | Keyword[public] Keyword[static] identifier[Object] identifier[makeSafeProxyCall] operator[SEP] Keyword[final] identifier[Object] identifier[proxy] , Keyword[final] identifier[String] identifier[methodToCallname] , Keyword[final] identifier[Class] operator[SEP] operator[SEP] identifier[signature] , Keyword[final] ide... |
private ExprKraken parseOrExpr()
{
ExprKraken left = parseAndExpr();
while (true) {
Token token = scanToken();
switch (token) {
case OR:
left = new BinaryExpr(BinaryOp.OR, left, parseAndExpr());
break;
default:
_token = token;
return left;
}
... | class class_name[name] begin[{]
method[parseOrExpr, return_type[type[ExprKraken]], modifier[private], parameter[]] begin[{]
local_variable[type[ExprKraken], left]
while[literal[true]] begin[{]
local_variable[type[Token], token]
SwitchStatement(cases=[SwitchStatem... | Keyword[private] identifier[ExprKraken] identifier[parseOrExpr] operator[SEP] operator[SEP] {
identifier[ExprKraken] identifier[left] operator[=] identifier[parseAndExpr] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
identifier[Token] identifie... |
public static void runExample(
AdManagerServices adManagerServices, AdManagerSession session, long companyId)
throws RemoteException {
// Get the CompanyService.
CompanyServiceInterface companyService =
adManagerServices.get(session, CompanyServiceInterface.class);
// Create a statement... | class class_name[name] begin[{]
method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session, companyId]] begin[{]
local_variable[type[CompanyServiceInterface], companyService]
local_variable[type[StatementBuilder], statementBuilder]
local_variable... | Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] , Keyword[long] identifier[companyId] operator[SEP] Keyword[throws] identifier[RemoteException] {
identifier[CompanyS... |
public java.io.InputStream getAsciiStream() throws SQLException {
checkValid(data);
try {
return new ByteArrayInputStream(data.getBytes("US-ASCII"));
} catch (IOException e) {
return null;
}
} | class class_name[name] begin[{]
method[getAsciiStream, return_type[type[java]], modifier[public], parameter[]] begin[{]
call[.checkValid, parameter[member[.data]]]
TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operator... | Keyword[public] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[InputStream] identifier[getAsciiStream] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[checkValid] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[try] {
Keyword... |
public void launchNewProviderWizard() {
SecurityContext securityContext = securityFramework.getSecurityContext(getProxy().getNameToken());
ResourceDescription resourceDescription = descriptionRegistry.lookup(PROVIDER_TEMPLATE);
final DefaultWindow dialog = new DefaultWindow(
Con... | class class_name[name] begin[{]
method[launchNewProviderWizard, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[SecurityContext], securityContext]
local_variable[type[ResourceDescription], resourceDescription]
local_variable[type[DefaultWindow], dialog]
... | Keyword[public] Keyword[void] identifier[launchNewProviderWizard] operator[SEP] operator[SEP] {
identifier[SecurityContext] identifier[securityContext] operator[=] identifier[securityFramework] operator[SEP] identifier[getSecurityContext] operator[SEP] identifier[getProxy] operator[SEP] operator[SEP] operator[SE... |
public static void setVisible(VisualizerContext context, VisualizationTask task, boolean visibility) {
// Hide other tools
if(visibility && task.isTool()) {
Hierarchy<Object> vistree = context.getVisHierarchy();
for(It<VisualizationTask> iter2 = vistree.iterAll().filter(VisualizationTask.class); ite... | class class_name[name] begin[{]
method[setVisible, return_type[void], modifier[public static], parameter[context, task, visibility]] begin[{]
if[binary_operation[member[.visibility], &&, call[task.isTool, parameter[]]]] begin[{]
local_variable[type[Hierarchy], vistree]
F... | Keyword[public] Keyword[static] Keyword[void] identifier[setVisible] operator[SEP] identifier[VisualizerContext] identifier[context] , identifier[VisualizationTask] identifier[task] , Keyword[boolean] identifier[visibility] operator[SEP] {
Keyword[if] operator[SEP] identifier[visibility] operator[&&] identifie... |
public static <K, V, T extends Map<K, V>> void marshallMap(T map, ElementWriter<K> keyWriter, ElementWriter<V> valueWrite, ObjectOutput out) throws IOException {
final int mapSize = map == null ? NULL_VALUE : map.size();
marshallSize(out, mapSize);
if (mapSize <= 0) return;
for (Map.Entry<K, V>... | class class_name[name] begin[{]
method[marshallMap, return_type[void], modifier[public static], parameter[map, keyWriter, valueWrite, out]] begin[{]
local_variable[type[int], mapSize]
call[.marshallSize, parameter[member[.out], member[.mapSize]]]
if[binary_operation[memb... | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] , identifier[T] Keyword[extends] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] operator[>] Keyword[void] identifier[marshallMap] operator[SEP] identifier[T] identifier[map] , identifier[ElementWriter] operator[<] ident... |
public static xen_appcvpx_image[] get_filtered(nitro_service service, String filter) throws Exception
{
xen_appcvpx_image obj = new xen_appcvpx_image();
options option = new options();
option.set_filter(filter);
xen_appcvpx_image[] response = (xen_appcvpx_image[]) obj.getfiltered(service, option);
retu... | class class_name[name] begin[{]
method[get_filtered, return_type[type[xen_appcvpx_image]], modifier[public static], parameter[service, filter]] begin[{]
local_variable[type[xen_appcvpx_image], obj]
local_variable[type[options], option]
call[option.set_filter, parameter[member[.f... | Keyword[public] Keyword[static] identifier[xen_appcvpx_image] 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[xen_appcvpx_image] identifier[ob... |
@Override
public boolean doLayout(int widthlimit, boolean force, boolean linestart)
{
//Skip if not displayed
if (!displayed)
{
bounds.setSize(0, 0);
return true;
}
//reset textEnd if we are doing a new layout
if (!splitted)
... | class class_name[name] begin[{]
method[doLayout, return_type[type[boolean]], modifier[public], parameter[widthlimit, force, linestart]] begin[{]
if[member[.displayed]] begin[{]
call[bounds.setSize, parameter[literal[0], literal[0]]]
return[literal[true]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[doLayout] operator[SEP] Keyword[int] identifier[widthlimit] , Keyword[boolean] identifier[force] , Keyword[boolean] identifier[linestart] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[displayed] operator[SEP] {
... |
public void addBaseClasses(Class<?>... baseClasses) {
if (this.baseClassList == null) {
this.baseClassList = new ArrayList<>();
}
this.baseClassList.addAll(Arrays.asList(baseClasses));
} | class class_name[name] begin[{]
method[addBaseClasses, return_type[void], modifier[public], parameter[baseClasses]] begin[{]
if[binary_operation[THIS[member[None.baseClassList]], ==, literal[null]]] begin[{]
assign[THIS[member[None.baseClassList]], ClassCreator(arguments... | Keyword[public] Keyword[void] identifier[addBaseClasses] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[...] identifier[baseClasses] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[baseClassList] operator[==] Other[null] operator[SEP] {
Ke... |
public void decode(IBitStream _in, AACDecoderConfig conf, boolean commonWindow) throws AACException {
final SampleFrequency sf = conf.getSampleFrequency();
if(sf.equals(SampleFrequency.SAMPLE_FREQUENCY_NONE)) throw new AACException("invalid sample frequency");
_in.skipBit(); //reserved
windowSequence = windowS... | class class_name[name] begin[{]
method[decode, return_type[void], modifier[public], parameter[_in, conf, commonWindow]] begin[{]
local_variable[type[SampleFrequency], sf]
if[call[sf.equals, parameter[member[SampleFrequency.SAMPLE_FREQUENCY_NONE]]]] begin[{]
ThrowStatement(expression=Cla... | Keyword[public] Keyword[void] identifier[decode] operator[SEP] identifier[IBitStream] identifier[_in] , identifier[AACDecoderConfig] identifier[conf] , Keyword[boolean] identifier[commonWindow] operator[SEP] Keyword[throws] identifier[AACException] {
Keyword[final] identifier[SampleFrequency] identifier[sf] op... |
private void append2slowUUID() {
final int CHUNK_SZ = 1 << H2O.LOG_CHK;
if( _sparseLen > CHUNK_SZ )
throw new ArrayIndexOutOfBoundsException(_sparseLen);
if( _ds==null && _ls!=null ) { // This can happen for columns with all NAs and then a UUID
_xs=null;
alloc_doubles(_sparseLen);
Ar... | class class_name[name] begin[{]
method[append2slowUUID, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[int], CHUNK_SZ]
if[binary_operation[member[._sparseLen], >, member[.CHUNK_SZ]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberRefere... | Keyword[private] Keyword[void] identifier[append2slowUUID] operator[SEP] operator[SEP] {
Keyword[final] Keyword[int] identifier[CHUNK_SZ] operator[=] Other[1] operator[<<] identifier[H2O] operator[SEP] identifier[LOG_CHK] operator[SEP] Keyword[if] operator[SEP] identifier[_sparseLen] operator[>] identifier[CHUNK... |
protected Object resourceFixes(BioPAXElement bpe, Object value)
{
if (this.isFixReusedPEPs() && value instanceof physicalEntityParticipant)
{
value = this.getReusedPEPHelper().fixReusedPEP((physicalEntityParticipant) value, bpe);
}
return value;
} | class class_name[name] begin[{]
method[resourceFixes, return_type[type[Object]], modifier[protected], parameter[bpe, value]] begin[{]
if[binary_operation[THIS[call[None.isFixReusedPEPs, parameter[]]], &&, binary_operation[member[.value], instanceof, type[physicalEntityParticipant]]]] begin[{]
... | Keyword[protected] identifier[Object] identifier[resourceFixes] operator[SEP] identifier[BioPAXElement] identifier[bpe] , identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[isFixReusedPEPs] operator[SEP] operator[SEP] operator[&&] identifier[val... |
@Override
public CommerceTaxFixedRateAddressRel fetchByCommerceTaxMethodId_Last(
long commerceTaxMethodId,
OrderByComparator<CommerceTaxFixedRateAddressRel> orderByComparator) {
int count = countByCommerceTaxMethodId(commerceTaxMethodId);
if (count == 0) {
return null;
}
List<CommerceTaxFixedRateAddre... | class class_name[name] begin[{]
method[fetchByCommerceTaxMethodId_Last, return_type[type[CommerceTaxFixedRateAddressRel]], modifier[public], parameter[commerceTaxMethodId, orderByComparator]] begin[{]
local_variable[type[int], count]
if[binary_operation[member[.count], ==, literal[0]]] ... | annotation[@] identifier[Override] Keyword[public] identifier[CommerceTaxFixedRateAddressRel] identifier[fetchByCommerceTaxMethodId_Last] operator[SEP] Keyword[long] identifier[commerceTaxMethodId] , identifier[OrderByComparator] operator[<] identifier[CommerceTaxFixedRateAddressRel] operator[>] identifier[orderByComp... |
public static void flip( Polygon2D_F64 a ) {
int N = a.size();
int H = N/2;
for (int i = 1; i <= H; i++) {
int j = N-i;
Point2D_F64 tmp = a.vertexes.data[i];
a.vertexes.data[i] = a.vertexes.data[j];
a.vertexes.data[j] = tmp;
}
} | class class_name[name] begin[{]
method[flip, return_type[void], modifier[public static], parameter[a]] begin[{]
local_variable[type[int], N]
local_variable[type[int], H]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Variab... | Keyword[public] Keyword[static] Keyword[void] identifier[flip] operator[SEP] identifier[Polygon2D_F64] identifier[a] operator[SEP] {
Keyword[int] identifier[N] operator[=] identifier[a] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[H] operator[=] identifier[N] o... |
protected CmsAccessControlEntry internalCreateAce(ResultSet res, CmsUUID newId) throws SQLException {
return new CmsAccessControlEntry(
newId,
new CmsUUID(res.getString(m_sqlManager.readQuery("C_ACCESS_PRINCIPAL_ID_0"))),
res.getInt(m_sqlManager.readQuery("C_ACCESS_ACCESS_AL... | class class_name[name] begin[{]
method[internalCreateAce, return_type[type[CmsAccessControlEntry]], modifier[protected], parameter[res, newId]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=newId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(argume... | Keyword[protected] identifier[CmsAccessControlEntry] identifier[internalCreateAce] operator[SEP] identifier[ResultSet] identifier[res] , identifier[CmsUUID] identifier[newId] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[return] Keyword[new] identifier[CmsAccessControlEntry] operator[SEP] ide... |
@Override
public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath workspace, @Nonnull Launcher launcher,
@Nonnull TaskListener listener) {
try {
String sha = getCommitShaSource().get(run, listener);
List<GHRepository> repos = getReposSource().repos(run, ... | class class_name[name] begin[{]
method[perform, return_type[void], modifier[public], parameter[run, workspace, launcher, listener]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getC... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[perform] operator[SEP] annotation[@] identifier[Nonnull] identifier[Run] operator[<] operator[?] , operator[?] operator[>] identifier[run] , annotation[@] identifier[Nonnull] identifier[FilePath] identifier[workspace] , annotation[@] identif... |
private static String removeExplicitGlobalPrefix(String qname) {
for (String global : GLOBAL_NAMES) {
if (qname.startsWith(global)) {
return qname.substring(global.length());
}
}
return qname;
} | class class_name[name] begin[{]
method[removeExplicitGlobalPrefix, return_type[type[String]], modifier[private static], parameter[qname]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=global, postfix_operators=... | Keyword[private] Keyword[static] identifier[String] identifier[removeExplicitGlobalPrefix] operator[SEP] identifier[String] identifier[qname] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[global] operator[:] identifier[GLOBAL_NAMES] operator[SEP] {
Keyword[if] operator[SEP]... |
public void deleteNode(int node) {
int element = getElement(node);
int hash = m_hash.getHash(element);
int bucket = hash % m_hashBuckets.size();
int list = m_hashBuckets.get(bucket);
if (list == -1)
throw new IllegalArgumentException();
int ptr = m_lists.getFirst(list);
int prev = -1;
while (ptr != ... | class class_name[name] begin[{]
method[deleteNode, return_type[void], modifier[public], parameter[node]] begin[{]
local_variable[type[int], element]
local_variable[type[int], hash]
local_variable[type[int], bucket]
local_variable[type[int], list]
if[binary_operat... | Keyword[public] Keyword[void] identifier[deleteNode] operator[SEP] Keyword[int] identifier[node] operator[SEP] {
Keyword[int] identifier[element] operator[=] identifier[getElement] operator[SEP] identifier[node] operator[SEP] operator[SEP] Keyword[int] identifier[hash] operator[=] identifier[m_hash] operator[SEP... |
private void addToReadIndex(StorageOperation operation) {
try {
if (operation instanceof StreamSegmentAppendOperation) {
// Record a StreamSegmentAppendOperation. Just in case, we also support this type of operation, but we need to
// log a warning indicating so. This... | class class_name[name] begin[{]
method[addToReadIndex, return_type[void], modifier[private], parameter[operation]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=operation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr... | Keyword[private] Keyword[void] identifier[addToReadIndex] operator[SEP] identifier[StorageOperation] identifier[operation] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[operation] Keyword[instanceof] identifier[StreamSegmentAppendOperation] operator[SEP] {
identifi... |
public void startPolling(final String polledObject, final int pollingPeriod) throws DevFailed {
try {
final AttributeImpl attr = AttributeGetterSetter.getAttribute(polledObject, device.getAttributeList());
attr.configurePolling(pollingPeriod);
device.startPolling(attr);
... | class class_name[name] begin[{]
method[startPolling, return_type[void], modifier[public], parameter[polledObject, pollingPeriod]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(... | Keyword[public] Keyword[void] identifier[startPolling] operator[SEP] Keyword[final] identifier[String] identifier[polledObject] , Keyword[final] Keyword[int] identifier[pollingPeriod] operator[SEP] Keyword[throws] identifier[DevFailed] {
Keyword[try] {
Keyword[final] identifier[AttributeImpl] identif... |
@Override
public void eUnset(int featureID) {
switch (featureID) {
case AfplibPackage.FNI__RG:
getRg().clear();
return;
}
super.eUnset(featureID);
} | class class_name[name] begin[{]
method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=FNI__RG, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementEx... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[FNI__RG] operator[:]... |
@NonNull
public RequestCreator rotate(float degrees, float pivotX, float pivotY) {
data.rotate(degrees, pivotX, pivotY);
return this;
} | class class_name[name] begin[{]
method[rotate, return_type[type[RequestCreator]], modifier[public], parameter[degrees, pivotX, pivotY]] begin[{]
call[data.rotate, parameter[member[.degrees], member[.pivotX], member[.pivotY]]]
return[THIS[]]
end[}]
END[}] | annotation[@] identifier[NonNull] Keyword[public] identifier[RequestCreator] identifier[rotate] operator[SEP] Keyword[float] identifier[degrees] , Keyword[float] identifier[pivotX] , Keyword[float] identifier[pivotY] operator[SEP] {
identifier[data] operator[SEP] identifier[rotate] operator[SEP] identifier[deg... |
public static String stripBraceAndQuotation(Object o) {
if (null == o) return "";
String s = stripBrace(o);
s = stripQuotation(s);
return s;
} | class class_name[name] begin[{]
method[stripBraceAndQuotation, return_type[type[String]], modifier[public static], parameter[o]] begin[{]
if[binary_operation[literal[null], ==, member[.o]]] begin[{]
return[literal[""]]
else begin[{]
None
end[}]
local_variable[type[String... | Keyword[public] Keyword[static] identifier[String] identifier[stripBraceAndQuotation] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[o] operator[SEP] Keyword[return] literal[String] operator[SEP] identifier[String] identifier[s] operat... |
protected void printTotalPages(PdfTemplate template, float x, float y) throws VectorPrintException, InstantiationException, IllegalAccessException {
if (getSettings().getBooleanProperty(Boolean.FALSE, ReportConstants.PRINTFOOTER)) {
Phrase p = elementProducer.createElement(String.valueOf(lastPage), Phras... | class class_name[name] begin[{]
method[printTotalPages, return_type[void], modifier[protected], parameter[template, x, y]] begin[{]
if[call[.getSettings, parameter[]]] begin[{]
local_variable[type[Phrase], p]
call[ColumnText.showTextAligned, parameter[member[... | Keyword[protected] Keyword[void] identifier[printTotalPages] operator[SEP] identifier[PdfTemplate] identifier[template] , Keyword[float] identifier[x] , Keyword[float] identifier[y] operator[SEP] Keyword[throws] identifier[VectorPrintException] , identifier[InstantiationException] , identifier[IllegalAccessExceptio... |
public static IndexFor onLabel(String label) {
IndexFor ret = IFactory.dropOnLabel(label);
ASTNode an = APIObjectAccess.getAstNode(ret);
an.setClauseType(ClauseType.DROP_INDEX);
return ret;
} | class class_name[name] begin[{]
method[onLabel, return_type[type[IndexFor]], modifier[public static], parameter[label]] begin[{]
local_variable[type[IndexFor], ret]
local_variable[type[ASTNode], an]
call[an.setClauseType, parameter[member[ClauseType.DROP_INDEX]]]
return[... | Keyword[public] Keyword[static] identifier[IndexFor] identifier[onLabel] operator[SEP] identifier[String] identifier[label] operator[SEP] {
identifier[IndexFor] identifier[ret] operator[=] identifier[IFactory] operator[SEP] identifier[dropOnLabel] operator[SEP] identifier[label] operator[SEP] operator[SEP] ident... |
public static IFileContentResultBean compareFiles(final File sourceFile,
final File fileToCompare)
{
return compareFiles(sourceFile, fileToCompare, true, false, false, true, false, true);
} | class class_name[name] begin[{]
method[compareFiles, return_type[type[IFileContentResultBean]], modifier[public static], parameter[sourceFile, fileToCompare]] begin[{]
return[call[.compareFiles, parameter[member[.sourceFile], member[.fileToCompare], literal[true], literal[false], literal[false], litera... | Keyword[public] Keyword[static] identifier[IFileContentResultBean] identifier[compareFiles] operator[SEP] Keyword[final] identifier[File] identifier[sourceFile] , Keyword[final] identifier[File] identifier[fileToCompare] operator[SEP] {
Keyword[return] identifier[compareFiles] operator[SEP] identifier[sourceFil... |
private static LineMap loadScriptMap(Class cl)
{
ClassLoader loader = cl.getClassLoader();
if (loader == null)
return new LineMap(); // null map
try {
String pathName = cl.getName().replace('.', '/') + ".class";
InputStream is = loader.getResourceAsStream(pathName);
if (is ... | class class_name[name] begin[{]
method[loadScriptMap, return_type[type[LineMap]], modifier[private static], parameter[cl]] begin[{]
local_variable[type[ClassLoader], loader]
if[binary_operation[member[.loader], ==, literal[null]]] begin[{]
return[ClassCreator(arguments=[], body=None, co... | Keyword[private] Keyword[static] identifier[LineMap] identifier[loadScriptMap] operator[SEP] identifier[Class] identifier[cl] operator[SEP] {
identifier[ClassLoader] identifier[loader] operator[=] identifier[cl] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operat... |
@Override
public boolean onKeyUp (int keyCode, KeyEvent event){
Fragment frag = getSupportFragmentManager().findFragmentByTag(SAMPLES_FRAGMENT_TAG);
if (frag==null) {
return super.onKeyUp(keyCode, event);
}
if (!(frag instanceof BaseSampleFragment)) {
return s... | class class_name[name] begin[{]
method[onKeyUp, return_type[type[boolean]], modifier[public], parameter[keyCode, event]] begin[{]
local_variable[type[Fragment], frag]
if[binary_operation[member[.frag], ==, literal[null]]] begin[{]
return[SuperMethodInvocation(arguments=[Memb... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[onKeyUp] operator[SEP] Keyword[int] identifier[keyCode] , identifier[KeyEvent] identifier[event] operator[SEP] {
identifier[Fragment] identifier[frag] operator[=] identifier[getSupportFragmentManager] operator[SEP] operator[SEP] oper... |
public String translate(final When when) {
inject(when.condition);
inject(when.action);
return String.format("WHEN %s THEN %s",
when.condition.translate(),
when.action.translate());
} | class class_name[name] begin[{]
method[translate, return_type[type[String]], modifier[public], parameter[when]] begin[{]
call[.inject, parameter[member[when.condition]]]
call[.inject, parameter[member[when.action]]]
return[call[String.format, parameter[literal["WHEN %s T... | Keyword[public] identifier[String] identifier[translate] operator[SEP] Keyword[final] identifier[When] identifier[when] operator[SEP] {
identifier[inject] operator[SEP] identifier[when] operator[SEP] identifier[condition] operator[SEP] operator[SEP] identifier[inject] operator[SEP] identifier[when] operator[SEP]... |
@VisibleForTesting
static <T> TypeToken<? extends T> toGenericType(Class<T> cls) {
if (cls.isArray()) {
Type arrayOfGenericType =
Types.newArrayType(
// If we are passed with int[].class, don't turn it to GenericArrayType
toGenericType(cls.getComponentType()).runtimeTyp... | class class_name[name] begin[{]
method[toGenericType, return_type[type[TypeToken]], modifier[static], parameter[cls]] begin[{]
if[call[cls.isArray, parameter[]]] begin[{]
local_variable[type[Type], arrayOfGenericType]
local_variable[type[TypeToken], result]
r... | annotation[@] identifier[VisibleForTesting] Keyword[static] operator[<] identifier[T] operator[>] identifier[TypeToken] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[toGenericType] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[cls] operator[SEP] {
... |
public String convertIfcTransportElementTypeEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
} | class class_name[name] begin[{]
method[convertIfcTransportElementTypeEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_op... | Keyword[public] identifier[String] identifier[convertIfcTransportElementTypeEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] {
Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:... |
public ArrayList<String> cdn_webstorage_serviceName_storage_GET(String serviceName, OvhOrderStorageEnum storage) throws IOException {
String qPath = "/order/cdn/webstorage/{serviceName}/storage";
StringBuilder sb = path(qPath, serviceName);
query(sb, "storage", storage);
String resp = exec(qPath, "GET", sb.toSt... | class class_name[name] begin[{]
method[cdn_webstorage_serviceName_storage_GET, return_type[type[ArrayList]], modifier[public], parameter[serviceName, storage]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
call[.query, parameter[member[.sb]... | Keyword[public] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[cdn_webstorage_serviceName_storage_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[OvhOrderStorageEnum] identifier[storage] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[St... |
final public P createParametersSchema() {
// special case, because ModelBuilderSchema is the top of the tree and is parameterized differently
if (ModelBuilderSchema.class == this.getClass()) {
return (P)new ModelParametersSchemaV3();
}
try {
Class<? extends ModelParametersSchemaV3> paramete... | class class_name[name] begin[{]
method[createParametersSchema, return_type[type[P]], modifier[final public], parameter[]] begin[{]
if[binary_operation[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Mod... | Keyword[final] Keyword[public] identifier[P] identifier[createParametersSchema] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ModelBuilderSchema] operator[SEP] Keyword[class] operator[==] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] {
... |
public static PeriodType yearDay() {
PeriodType type = cYD;
if (type == null) {
type = new PeriodType(
"YearDay",
new DurationFieldType[] {
DurationFieldType.years(), DurationFieldType.days(),
},
new int[] { ... | class class_name[name] begin[{]
method[yearDay, return_type[type[PeriodType]], modifier[public static], parameter[]] begin[{]
local_variable[type[PeriodType], type]
if[binary_operation[member[.type], ==, literal[null]]] begin[{]
assign[member[.type], ClassCreator... | Keyword[public] Keyword[static] identifier[PeriodType] identifier[yearDay] operator[SEP] operator[SEP] {
identifier[PeriodType] identifier[type] operator[=] identifier[cYD] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[==] Other[null] operator[SEP] {
identifier[type] operator[=] Ke... |
public ListApplicationsResult withApplications(String... applications) {
if (this.applications == null) {
setApplications(new com.amazonaws.internal.SdkInternalList<String>(applications.length));
}
for (String ele : applications) {
this.applications.add(ele);
}
... | class class_name[name] begin[{]
method[withApplications, return_type[type[ListApplicationsResult]], modifier[public], parameter[applications]] begin[{]
if[binary_operation[THIS[member[None.applications]], ==, literal[null]]] begin[{]
call[.setApplications, parameter[Clas... | Keyword[public] identifier[ListApplicationsResult] identifier[withApplications] operator[SEP] identifier[String] operator[...] identifier[applications] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[applications] operator[==] Other[null] operator[SEP] {
identifier[set... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.