code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
Shape atLocation(float x, float y) {
start.setLocation(x, y); // Store new start
p.reset(); // Erase current path
createStar(); // create new path
return p; ... | class class_name[name] begin[{]
method[atLocation, return_type[type[Shape]], modifier[default], parameter[x, y]] begin[{]
call[start.setLocation, parameter[member[.x], member[.y]]]
call[p.reset, parameter[]]
call[.createStar, parameter[]]
return[member[.p... | identifier[Shape] identifier[atLocation] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] operator[SEP] {
identifier[start] operator[SEP] identifier[setLocation] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[reset] operat... |
public final DatastoreConfig getDatastoreConfig(String id) {
try{
return m_moduleContext.getBean(id,DatastoreConfiguration.class);
}
catch (Throwable t){
logger.info(t.getMessage(),t);
return null;
}
} | class class_name[name] begin[{]
method[getDatastoreConfig, return_type[type[DatastoreConfig]], modifier[final public], parameter[id]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, sel... | Keyword[public] Keyword[final] identifier[DatastoreConfig] identifier[getDatastoreConfig] operator[SEP] identifier[String] identifier[id] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[m_moduleContext] operator[SEP] identifier[getBean] operator[SEP] identifier[id] , identifier[DatastoreCon... |
public static void moveChildren(Element from, Element to) {
if (from == null || to == null || from == to) return;
for (int k = from.getChildCount() - 1; k >= 0; k--) {
Node node = from.getChild(k);
from.removeChild(node);
to.insertFirst(node);
}
} | class class_name[name] begin[{]
method[moveChildren, return_type[void], modifier[public static], parameter[from, to]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.from], ==, literal[null]], ||, binary_operation[member[.to], ==, literal[null]]], ||, binary_operation[mem... | Keyword[public] Keyword[static] Keyword[void] identifier[moveChildren] operator[SEP] identifier[Element] identifier[from] , identifier[Element] identifier[to] operator[SEP] {
Keyword[if] operator[SEP] identifier[from] operator[==] Other[null] operator[||] identifier[to] operator[==] Other[null] operator[||] ide... |
private AuditEntityAttribute attributes(Entity e) {
AuditEntityAttribute auditEntityAttributes = new AuditEntityAttribute();
matchCreationAuthor(e, auditEntityAttributes);
matchCreationDate(e, auditEntityAttributes);
matchLastModificationAuthor(e, auditEntityAttributes);
matchLas... | class class_name[name] begin[{]
method[attributes, return_type[type[AuditEntityAttribute]], modifier[private], parameter[e]] begin[{]
local_variable[type[AuditEntityAttribute], auditEntityAttributes]
call[.matchCreationAuthor, parameter[member[.e], member[.auditEntityAttributes]]]
... | Keyword[private] identifier[AuditEntityAttribute] identifier[attributes] operator[SEP] identifier[Entity] identifier[e] operator[SEP] {
identifier[AuditEntityAttribute] identifier[auditEntityAttributes] operator[=] Keyword[new] identifier[AuditEntityAttribute] operator[SEP] operator[SEP] operator[SEP] identifier... |
public ServiceFuture<PolicyEventsQueryResultsInner> listQueryResultsForSubscriptionAsync(String subscriptionId, final ServiceCallback<PolicyEventsQueryResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(listQueryResultsForSubscriptionWithServiceResponseAsync(subscriptionId), serviceCallback);
... | class class_name[name] begin[{]
method[listQueryResultsForSubscriptionAsync, return_type[type[ServiceFuture]], modifier[public], parameter[subscriptionId, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.listQueryResultsForSubscriptionWithServiceResponseAsync, paramete... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[PolicyEventsQueryResultsInner] operator[>] identifier[listQueryResultsForSubscriptionAsync] operator[SEP] identifier[String] identifier[subscriptionId] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[PolicyEventsQueryResultsInner] ope... |
private int readMethod(
final ClassVisitor classVisitor, final Context context, final int methodInfoOffset) {
char[] charBuffer = context.charBuffer;
// Read the access_flags, name_index and descriptor_index fields.
int currentOffset = methodInfoOffset;
context.currentMethodAccessFlags = readUnsi... | class class_name[name] begin[{]
method[readMethod, return_type[type[int]], modifier[private], parameter[classVisitor, context, methodInfoOffset]] begin[{]
local_variable[type[char], charBuffer]
local_variable[type[int], currentOffset]
assign[member[context.currentMethodAccessFla... | Keyword[private] Keyword[int] identifier[readMethod] operator[SEP] Keyword[final] identifier[ClassVisitor] identifier[classVisitor] , Keyword[final] identifier[Context] identifier[context] , Keyword[final] Keyword[int] identifier[methodInfoOffset] operator[SEP] {
Keyword[char] operator[SEP] operator[SEP] ident... |
public static DynamicClassLoader create(ClassLoader parent,
PathImpl path,
String prefix)
{
DynamicClassLoader loader = new DynamicClassLoader(parent, false, true);
SimpleLoader simpleLoader = new SimpleLoader(loader, path, p... | class class_name[name] begin[{]
method[create, return_type[type[DynamicClassLoader]], modifier[public static], parameter[parent, path, prefix]] begin[{]
local_variable[type[DynamicClassLoader], loader]
local_variable[type[SimpleLoader], simpleLoader]
call[simpleLoader.init, para... | Keyword[public] Keyword[static] identifier[DynamicClassLoader] identifier[create] operator[SEP] identifier[ClassLoader] identifier[parent] , identifier[PathImpl] identifier[path] , identifier[String] identifier[prefix] operator[SEP] {
identifier[DynamicClassLoader] identifier[loader] operator[=] Keyword[new] i... |
@Override
public void eUnset(int featureID) {
switch (featureID) {
case AfplibPackage.CPC__DEF_CHAR_ID:
setDefCharID(DEF_CHAR_ID_EDEFAULT);
return;
case AfplibPackage.CPC__PRT_FLAGS:
setPrtFlags(PRT_FLAGS_EDEFAULT);
return;
case AfplibPackage.CPC__CPIRG_LEN:
setCPIRGLen(CPIRG_LEN_EDEFAUL... | class class_name[name] begin[{]
method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=CPC__DEF_CHAR_ID, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[St... | 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[CPC__DEF_CHAR_ID] op... |
protected byte[] getAnonymousObjectId(long n) {
String s = anonOidPrefix + Long.toString(n);
return s.getBytes(StandardCharsets.UTF_8);
} | class class_name[name] begin[{]
method[getAnonymousObjectId, return_type[type[byte]], modifier[protected], parameter[n]] begin[{]
local_variable[type[String], s]
return[call[s.getBytes, parameter[member[StandardCharsets.UTF_8]]]]
end[}]
END[}] | Keyword[protected] Keyword[byte] operator[SEP] operator[SEP] identifier[getAnonymousObjectId] operator[SEP] Keyword[long] identifier[n] operator[SEP] {
identifier[String] identifier[s] operator[=] identifier[anonOidPrefix] operator[+] identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[n... |
private String redisKey(ModelExt<?> m) {
Table table = m.table();
StringBuilder key = new StringBuilder();
key.append(RECORDS);
key.append(table.getName());
key.append(":");
//fetch primary keys' values
String[] primaryKeys = table.getPrimaryKey();
//format key
for (int idx = 0; idx < primaryKeys.leng... | class class_name[name] begin[{]
method[redisKey, return_type[type[String]], modifier[private], parameter[m]] begin[{]
local_variable[type[Table], table]
local_variable[type[StringBuilder], key]
call[key.append, parameter[member[.RECORDS]]]
call[key.append, parame... | Keyword[private] identifier[String] identifier[redisKey] operator[SEP] identifier[ModelExt] operator[<] operator[?] operator[>] identifier[m] operator[SEP] {
identifier[Table] identifier[table] operator[=] identifier[m] operator[SEP] identifier[table] operator[SEP] operator[SEP] operator[SEP] identifier[StringBu... |
private static boolean variableIsParameter(Var variable) {
Node variableParent = variable.getParentNode();
return variableParent != null && variableParent.isParamList();
} | class class_name[name] begin[{]
method[variableIsParameter, return_type[type[boolean]], modifier[private static], parameter[variable]] begin[{]
local_variable[type[Node], variableParent]
return[binary_operation[binary_operation[member[.variableParent], !=, literal[null]], &&, call[variableParen... | Keyword[private] Keyword[static] Keyword[boolean] identifier[variableIsParameter] operator[SEP] identifier[Var] identifier[variable] operator[SEP] {
identifier[Node] identifier[variableParent] operator[=] identifier[variable] operator[SEP] identifier[getParentNode] operator[SEP] operator[SEP] operator[SEP] Keywo... |
public boolean isWrapperFor(
java.lang.Class<?> iface) throws java.sql.SQLException {
checkClosed();
return (iface != null && iface.isAssignableFrom(this.getClass()));
} | class class_name[name] begin[{]
method[isWrapperFor, return_type[type[boolean]], modifier[public], parameter[iface]] begin[{]
call[.checkClosed, parameter[]]
return[binary_operation[binary_operation[member[.iface], !=, literal[null]], &&, call[iface.isAssignableFrom, parameter[THIS[call... | Keyword[public] Keyword[boolean] identifier[isWrapperFor] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[iface] operator[SEP] Keyword[throws] identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[SQLException... |
@Override
public void generateWriteProperty2WhereCondition(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property) {
generateWriteProperty2ContentValues(methodBuilder, beanName, beanClass, property);
} | class class_name[name] begin[{]
method[generateWriteProperty2WhereCondition, return_type[void], modifier[public], parameter[methodBuilder, beanName, beanClass, property]] begin[{]
call[.generateWriteProperty2ContentValues, parameter[member[.methodBuilder], member[.beanName], member[.beanClass],... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[generateWriteProperty2WhereCondition] operator[SEP] identifier[Builder] identifier[methodBuilder] , identifier[String] identifier[beanName] , identifier[TypeName] identifier[beanClass] , identifier[ModelProperty] identifier[property] operato... |
@Override
public Tuple7<T1, T2, T3, T4, T5, T6, T7> get() throws PromiseException {
return _task.get();
} | class class_name[name] begin[{]
method[get, return_type[type[Tuple7]], modifier[public], parameter[]] begin[{]
return[call[_task.get, parameter[]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Tuple7] operator[<] identifier[T1] , identifier[T2] , identifier[T3] , identifier[T4] , identifier[T5] , identifier[T6] , identifier[T7] operator[>] identifier[get] operator[SEP] operator[SEP] Keyword[throws] identifier[PromiseException] {
Keywo... |
public static ByteBuffer toBuffer(byte[] array) {
if (array == null)
return EMPTY_BUFFER;
return toBuffer(array, 0, array.length);
} | class class_name[name] begin[{]
method[toBuffer, return_type[type[ByteBuffer]], modifier[public static], parameter[array]] begin[{]
if[binary_operation[member[.array], ==, literal[null]]] begin[{]
return[member[.EMPTY_BUFFER]]
else begin[{]
None
end[}]
return[call[.toBuf... | Keyword[public] Keyword[static] identifier[ByteBuffer] identifier[toBuffer] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[array] operator[SEP] {
Keyword[if] operator[SEP] identifier[array] operator[==] Other[null] operator[SEP] Keyword[return] identifier[EMPTY_BUFFER] operator[SEP] Keyword[r... |
@Override
public final void generate(final Module module, final Element element) {
final DCModule dcModule = (DCModule) module;
final String title = dcModule.getTitle();
if (title != null) {
element.addContent(generateSimpleElementList("title", dcModule.getTitles()));
}... | class class_name[name] begin[{]
method[generate, return_type[void], modifier[final public], parameter[module, element]] begin[{]
local_variable[type[DCModule], dcModule]
local_variable[type[String], title]
if[binary_operation[member[.title], !=, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[generate] operator[SEP] Keyword[final] identifier[Module] identifier[module] , Keyword[final] identifier[Element] identifier[element] operator[SEP] {
Keyword[final] identifier[DCModule] identifier[dcModule] operator[=] op... |
public static <K, V> MapDataStore<K, V> createWriteThroughStore(MapStoreContext mapStoreContext) {
final MapStoreWrapper store = mapStoreContext.getMapStoreWrapper();
final MapServiceContext mapServiceContext = mapStoreContext.getMapServiceContext();
final NodeEngine nodeEngine = mapServiceConte... | class class_name[name] begin[{]
method[createWriteThroughStore, return_type[type[MapDataStore]], modifier[public static], parameter[mapStoreContext]] begin[{]
local_variable[type[MapStoreWrapper], store]
local_variable[type[MapServiceContext], mapServiceContext]
local_variable[type[Node... | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[MapDataStore] operator[<] identifier[K] , identifier[V] operator[>] identifier[createWriteThroughStore] operator[SEP] identifier[MapStoreContext] identifier[mapStoreContext] operator[SEP] {
Keyword[final] identifie... |
void moveBlockToHead(BlockInfo b) {
blockList = b.listRemove(blockList, this);
blockList = b.listInsert(blockList, this, -1);
} | class class_name[name] begin[{]
method[moveBlockToHead, return_type[void], modifier[default], parameter[b]] begin[{]
assign[member[.blockList], call[b.listRemove, parameter[member[.blockList], THIS[]]]]
assign[member[.blockList], call[b.listInsert, parameter[member[.blockList], ... | Keyword[void] identifier[moveBlockToHead] operator[SEP] identifier[BlockInfo] identifier[b] operator[SEP] {
identifier[blockList] operator[=] identifier[b] operator[SEP] identifier[listRemove] operator[SEP] identifier[blockList] , Keyword[this] operator[SEP] operator[SEP] identifier[blockList] operator[=] ident... |
@Override
public String getPrefix() {
String prefix = "";
switch (nodeKind) {
case ELEMENT:
case ATTRIBUTE:
prefix = qName.getPrefix();
break;
default:
/*
* Change nothing, return empty String in case of a treeData which isn't... | class class_name[name] begin[{]
method[getPrefix, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], prefix]
SwitchStatement(cases=[SwitchStatementCase(case=['ELEMENT', 'ATTRIBUTE'], statements=[StatementExpression(expression=Assignment(expressionl=M... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getPrefix] operator[SEP] operator[SEP] {
identifier[String] identifier[prefix] operator[=] literal[String] operator[SEP] Keyword[switch] operator[SEP] identifier[nodeKind] operator[SEP] {
Keyword[case] identifier[ELEMENT]... |
@Override
public void registerResources(String alias, String name, HttpContext context) throws NamespaceException {
if (!isNameValid(name)) {
throw new IllegalArgumentException("Malformed resource name [" + name + "]");
}
try {
Servlet servlet = new ResourceServlet(n... | class class_name[name] begin[{]
method[registerResources, return_type[void], modifier[public], parameter[alias, name, context]] begin[{]
if[call[.isNameValid, parameter[member[.name]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperati... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[registerResources] operator[SEP] identifier[String] identifier[alias] , identifier[String] identifier[name] , identifier[HttpContext] identifier[context] operator[SEP] Keyword[throws] identifier[NamespaceException] {
Keyword[if] operat... |
public String formatThroughput(int theNumOperations, TimeUnit theUnit) {
double throughput = getThroughput(theNumOperations, theUnit);
return new DecimalFormat("0.0").format(throughput);
} | class class_name[name] begin[{]
method[formatThroughput, return_type[type[String]], modifier[public], parameter[theNumOperations, theUnit]] begin[{]
local_variable[type[double], throughput]
return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selecto... | Keyword[public] identifier[String] identifier[formatThroughput] operator[SEP] Keyword[int] identifier[theNumOperations] , identifier[TimeUnit] identifier[theUnit] operator[SEP] {
Keyword[double] identifier[throughput] operator[=] identifier[getThroughput] operator[SEP] identifier[theNumOperations] , identifier... |
public final CompletionStage<V> getOrTimeout(Duration timeout, ScheduledExecutorService timeoutExecutor) {
if (GATE_UPDATER.get(this) == GATE_OPEN && timeoutScheduleFuture == null) {
this.timeoutScheduleFuture = timeoutExecutor.schedule(this::emit, timeout.toNanos(), TimeUnit.NANOSECONDS);
... | class class_name[name] begin[{]
method[getOrTimeout, return_type[type[CompletionStage]], modifier[final public], parameter[timeout, timeoutExecutor]] begin[{]
if[binary_operation[binary_operation[call[GATE_UPDATER.get, parameter[THIS[]]], ==, member[.GATE_OPEN]], &&, binary_operation[member[.ti... | Keyword[public] Keyword[final] identifier[CompletionStage] operator[<] identifier[V] operator[>] identifier[getOrTimeout] operator[SEP] identifier[Duration] identifier[timeout] , identifier[ScheduledExecutorService] identifier[timeoutExecutor] operator[SEP] {
Keyword[if] operator[SEP] identifier[GATE_UPDATER] o... |
public static Progression subToEnd(Progression model) {
if (model != null) {
return model.subTask(model.getMaximum() - model.getValue());
}
return null;
} | class class_name[name] begin[{]
method[subToEnd, return_type[type[Progression]], modifier[public static], parameter[model]] begin[{]
if[binary_operation[member[.model], !=, literal[null]]] begin[{]
return[call[model.subTask, parameter[binary_operation[call[model.getMaximum, paramete... | Keyword[public] Keyword[static] identifier[Progression] identifier[subToEnd] operator[SEP] identifier[Progression] identifier[model] operator[SEP] {
Keyword[if] operator[SEP] identifier[model] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[model] operator[SEP] identifier[subTask] ... |
public static ExpectedCondition<WebElement> elementToBeClickable(final WebElement element) {
return new ExpectedCondition<WebElement>() {
@Override
public WebElement apply(WebDriver driver) {
WebElement visibleElement = visibilityOf(element).apply(driver);
try {
if (visibleEle... | class class_name[name] begin[{]
method[elementToBeClickable, return_type[type[ExpectedCondition]], modifier[public static], parameter[element]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annota... | Keyword[public] Keyword[static] identifier[ExpectedCondition] operator[<] identifier[WebElement] operator[>] identifier[elementToBeClickable] operator[SEP] Keyword[final] identifier[WebElement] identifier[element] operator[SEP] {
Keyword[return] Keyword[new] identifier[ExpectedCondition] operator[<] identifier[W... |
public Observable<Page<SiteInner>> beginSuspendNextAsync(final String nextPageLink) {
return beginSuspendNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<SiteInner>>, Page<SiteInner>>() {
@Override
public Page<SiteInner> call(ServiceRespo... | class class_name[name] begin[{]
method[beginSuspendNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{]
return[call[.beginSuspendNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[SiteInner] operator[>] operator[>] identifier[beginSuspendNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] {
Keyword[return] identifier[beginSuspendNextWithServiceResponseAs... |
public DbxClientV2 asAdmin(String adminId) {
if (adminId == null) {
throw new IllegalArgumentException("'adminId' should not be null");
}
DbxRawClientV2 asAdminClient = new DbxTeamRawClientV2(
_client.getRequestConfig(),
credential,
_client.getHos... | class class_name[name] begin[{]
method[asAdmin, return_type[type[DbxClientV2]], modifier[public], parameter[adminId]] begin[{]
if[binary_operation[member[.adminId], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_op... | Keyword[public] identifier[DbxClientV2] identifier[asAdmin] operator[SEP] identifier[String] identifier[adminId] operator[SEP] {
Keyword[if] operator[SEP] identifier[adminId] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal... |
public void setOptions(Set<Option> options) {
this.options = (options == null)
? Collections.<Option>emptySet()
: new HashSet<Option>(options);
} | class class_name[name] begin[{]
method[setOptions, return_type[void], modifier[public], parameter[options]] begin[{]
assign[THIS[member[None.options]], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, sel... | Keyword[public] Keyword[void] identifier[setOptions] operator[SEP] identifier[Set] operator[<] identifier[Option] operator[>] identifier[options] operator[SEP] {
Keyword[this] operator[SEP] identifier[options] operator[=] operator[SEP] identifier[options] operator[==] Other[null] operator[SEP] operator[?] identi... |
private void sendPipelineCheckMaster() throws IOException {
if (urlParser.getHaMode() == HaMode.AURORA) {
writer.startPacket(0);
writer.write(COM_QUERY);
writer.write(IS_MASTER_QUERY);
writer.flush();
}
} | class class_name[name] begin[{]
method[sendPipelineCheckMaster, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[call[urlParser.getHaMode, parameter[]], ==, member[HaMode.AURORA]]] begin[{]
call[writer.startPacket, parameter[literal[0]]]
... | Keyword[private] Keyword[void] identifier[sendPipelineCheckMaster] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[urlParser] operator[SEP] identifier[getHaMode] operator[SEP] operator[SEP] operator[==] identifier[HaMode] operator[SEP] identifier[AURORA]... |
public final void entryRuleXConstructorCall() throws RecognitionException {
try {
// InternalXbase.g:1259:1: ( ruleXConstructorCall EOF )
// InternalXbase.g:1260:1: ruleXConstructorCall EOF
{
if ( state.backtracking==0 ) {
before(grammarAccess.getXC... | class class_name[name] begin[{]
method[entryRuleXConstructorCall, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_... | Keyword[public] Keyword[final] Keyword[void] identifier[entryRuleXConstructorCall] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
{
Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] ope... |
ElementKind getAnnotationKindForName(AnnotationMirror annotation) {
String annotationName = annotation.getAnnotationType().toString();
ElementKind kind;
if (annotationName.equals("com.google.java.contract.Invariant")) {
kind = ElementKind.INVARIANT;
} else if (annotationName.equals("com.google.jav... | class class_name[name] begin[{]
method[getAnnotationKindForName, return_type[type[ElementKind]], modifier[default], parameter[annotation]] begin[{]
local_variable[type[String], annotationName]
local_variable[type[ElementKind], kind]
if[call[annotationName.equals, parameter[liter... | identifier[ElementKind] identifier[getAnnotationKindForName] operator[SEP] identifier[AnnotationMirror] identifier[annotation] operator[SEP] {
identifier[String] identifier[annotationName] operator[=] identifier[annotation] operator[SEP] identifier[getAnnotationType] operator[SEP] operator[SEP] operator[SEP] ide... |
@VisibleForTesting
ByteMap<ByteMap<List<GetRequest>>> prepareRequestsNoMeta(final List<byte[][]> tagv_compounds,
final List<Long> base_time_list) {
final int row_size = (Const.SALT_WIDTH() + tsdb.metrics.width()
+ Const.TIMESTAMP_BYTES
+ (tsdb.tag_names.width() * tags.get(... | class class_name[name] begin[{]
method[prepareRequestsNoMeta, return_type[type[ByteMap]], modifier[default], parameter[tagv_compounds, base_time_list]] begin[{]
local_variable[type[int], row_size]
local_variable[type[ByteMap], tsuid_rows]
ForStatement(body=BlockStatement(label=None, sta... | annotation[@] identifier[VisibleForTesting] identifier[ByteMap] operator[<] identifier[ByteMap] operator[<] identifier[List] operator[<] identifier[GetRequest] operator[>] operator[>] operator[>] identifier[prepareRequestsNoMeta] operator[SEP] Keyword[final] identifier[List] operator[<] Keyword[byte] operator[SEP] oper... |
@Override
public void begin() throws TransactionManagementException {
logger.entering(CLASSNAME, "begin");
try {
userTran.begin();
logger.log(Level.FINE, "javax.transaction.Status: {0}", userTran.getStatus());
} catch (NotSupportedException e) {
throw new TransactionManagementException(e);
} catch ... | class class_name[name] begin[{]
method[begin, return_type[void], modifier[public], parameter[]] begin[{]
call[logger.entering, parameter[member[.CLASSNAME], literal["begin"]]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=begin, postfix_operato... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[begin] operator[SEP] operator[SEP] Keyword[throws] identifier[TransactionManagementException] {
identifier[logger] operator[SEP] identifier[entering] operator[SEP] identifier[CLASSNAME] , literal[String] operator[SEP] operator[SEP] Keyw... |
public Observable<ServiceResponse<DatabaseInner>> getByRecommendedElasticPoolWithServiceResponseAsync(String resourceGroupName, String serverName, String recommendedElasticPoolName, String databaseName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.... | class class_name[name] begin[{]
method[getByRecommendedElasticPoolWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, serverName, recommendedElasticPoolName, databaseName]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.subscri... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[DatabaseInner] operator[>] operator[>] identifier[getByRecommendedElasticPoolWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , iden... |
public static Request newUploadPhotoRequest(Session session, Bitmap image, Callback callback) {
Bundle parameters = new Bundle(1);
parameters.putParcelable(PICTURE_PARAM, image);
return new Request(session, MY_PHOTOS, parameters, HttpMethod.POST, callback);
} | class class_name[name] begin[{]
method[newUploadPhotoRequest, return_type[type[Request]], modifier[public static], parameter[session, image, callback]] begin[{]
local_variable[type[Bundle], parameters]
call[parameters.putParcelable, parameter[member[.PICTURE_PARAM], member[.image]]]
... | Keyword[public] Keyword[static] identifier[Request] identifier[newUploadPhotoRequest] operator[SEP] identifier[Session] identifier[session] , identifier[Bitmap] identifier[image] , identifier[Callback] identifier[callback] operator[SEP] {
identifier[Bundle] identifier[parameters] operator[=] Keyword[new] ident... |
public List<PvPLeaderBoard> getPvPSeasonLeaderboardInfo(String id, String type, World.Region region) throws GuildWars2Exception {
try {
Response<List<PvPLeaderBoard>> response = gw2API.getPvPSeasonLeaderBoardInfo(id, type, region.name().toLowerCase()).execute();
if (!response.isSuccessful()) throwError(response... | class class_name[name] begin[{]
method[getPvPSeasonLeaderboardInfo, return_type[type[List]], modifier[public], parameter[id, type, region]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Member... | Keyword[public] identifier[List] operator[<] identifier[PvPLeaderBoard] operator[>] identifier[getPvPSeasonLeaderboardInfo] operator[SEP] identifier[String] identifier[id] , identifier[String] identifier[type] , identifier[World] operator[SEP] identifier[Region] identifier[region] operator[SEP] Keyword[throws] identi... |
public static base_response add(nitro_service client, dnskey resource) throws Exception {
dnskey addresource = new dnskey();
addresource.keyname = resource.keyname;
addresource.publickey = resource.publickey;
addresource.privatekey = resource.privatekey;
addresource.expires = resource.expires;
addresource.u... | class class_name[name] begin[{]
method[add, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{]
local_variable[type[dnskey], addresource]
assign[member[addresource.keyname], member[resource.keyname]]
assign[member[addresource.... | Keyword[public] Keyword[static] identifier[base_response] identifier[add] operator[SEP] identifier[nitro_service] identifier[client] , identifier[dnskey] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[dnskey] identifier[addresource] operator[=] Keyword[new] identifier[dnsk... |
@Override
@SuppressWarnings("unchecked")
public void run(Object... otherArgs) {
try {
//only use facts of the specified type
FactMap<T> typeFilteredFacts = new FactMap<T>((Map<String, NameValueReferable<T>>)_facts.values().stream()
.filter((Object fact) -> _factType.isAssignableFrom(((Fact... | class class_name[name] begin[{]
method[run, return_type[void], modifier[public], parameter[otherArgs]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Cast(expression=MethodInvocation(arguments=[], ... | annotation[@] identifier[Override] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[run] operator[SEP] identifier[Object] operator[...] identifier[otherArgs] operator[SEP] {
Keyword[try] {
identifier[FactMap] operator[<] id... |
static HeapCompactDoublesSketch createFromUpdateSketch(final UpdateDoublesSketch sketch) {
final int k = sketch.getK();
final long n = sketch.getN();
final HeapCompactDoublesSketch hcds = new HeapCompactDoublesSketch(k); // checks k
hcds.n_ = n;
hcds.bitPattern_ = computeBitPattern(k, n);
asse... | class class_name[name] begin[{]
method[createFromUpdateSketch, return_type[type[HeapCompactDoublesSketch]], modifier[static], parameter[sketch]] begin[{]
local_variable[type[int], k]
local_variable[type[long], n]
local_variable[type[HeapCompactDoublesSketch], hcds]
assig... | Keyword[static] identifier[HeapCompactDoublesSketch] identifier[createFromUpdateSketch] operator[SEP] Keyword[final] identifier[UpdateDoublesSketch] identifier[sketch] operator[SEP] {
Keyword[final] Keyword[int] identifier[k] operator[=] identifier[sketch] operator[SEP] identifier[getK] operator[SEP] operator[SE... |
public boolean setMargins(float marginLeft, float marginRight,
float marginTop, float marginBottom) {
this.marginLeft = marginLeft;
this.marginRight = marginRight;
this.marginTop = marginTop;
this.marginBottom = marginBottom;
DocListener listener;
for (Iterator iterator = li... | class class_name[name] begin[{]
method[setMargins, return_type[type[boolean]], modifier[public], parameter[marginLeft, marginRight, marginTop, marginBottom]] begin[{]
assign[THIS[member[None.marginLeft]], member[.marginLeft]]
assign[THIS[member[None.marginRight]], member[.margin... | Keyword[public] Keyword[boolean] identifier[setMargins] operator[SEP] Keyword[float] identifier[marginLeft] , Keyword[float] identifier[marginRight] , Keyword[float] identifier[marginTop] , Keyword[float] identifier[marginBottom] operator[SEP] {
Keyword[this] operator[SEP] identifier[marginLeft] operator[=] i... |
public static void putValue(String registryName, String key, Object value) {
if (StringUtils.isBlank(registryName) || StringUtils.isBlank(key) || value == null) {
return;
}
Sysprop registryObject = readRegistryObject(registryName);
if (registryObject == null) {
registryObject = new Sysprop(getRegistryID(r... | class class_name[name] begin[{]
method[putValue, return_type[void], modifier[public static], parameter[registryName, key, value]] begin[{]
if[binary_operation[binary_operation[call[StringUtils.isBlank, parameter[member[.registryName]]], ||, call[StringUtils.isBlank, parameter[member[.key]]]], |... | Keyword[public] Keyword[static] Keyword[void] identifier[putValue] operator[SEP] identifier[String] identifier[registryName] , identifier[String] identifier[key] , identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[S... |
public final Position[] getEarthLimb(int radials) {
Position[] result = new Position[radials];
double radialDegrees = 0.0;
double incDegrees = 360.0 / radials;
double quarterEarthKm = circumferenceEarthKm / 4.0;
Position surfacePosition = new Position(this.lat, this.lon, 0.0);
// Assert( this.alt>0.0, "g... | class class_name[name] begin[{]
method[getEarthLimb, return_type[type[Position]], modifier[final public], parameter[radials]] begin[{]
local_variable[type[Position], result]
local_variable[type[double], radialDegrees]
local_variable[type[double], incDegrees]
local_variable[type[... | Keyword[public] Keyword[final] identifier[Position] operator[SEP] operator[SEP] identifier[getEarthLimb] operator[SEP] Keyword[int] identifier[radials] operator[SEP] {
identifier[Position] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] identifier[Position] operator[SEP] identifier[radial... |
public ServiceFuture<List<EntityExtractor>> listEntitiesAsync(UUID appId, String versionId, ListEntitiesOptionalParameter listEntitiesOptionalParameter, final ServiceCallback<List<EntityExtractor>> serviceCallback) {
return ServiceFuture.fromResponse(listEntitiesWithServiceResponseAsync(appId, versionId, listEn... | class class_name[name] begin[{]
method[listEntitiesAsync, return_type[type[ServiceFuture]], modifier[public], parameter[appId, versionId, listEntitiesOptionalParameter, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.listEntitiesWithServiceResponseAsync, parameter[mem... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[EntityExtractor] operator[>] operator[>] identifier[listEntitiesAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[ListEntitiesOptionalParameter] identifier[listEn... |
public static boolean matchPath(String pattern, String str,
boolean isCaseSensitive) {
String[] patDirs = tokenizePathAsArray(pattern);
String[] strDirs = tokenizePathAsArray(str);
int patIdxStart = 0;
int patIdxEnd = patDirs.length - 1;
int s... | class class_name[name] begin[{]
method[matchPath, return_type[type[boolean]], modifier[public static], parameter[pattern, str, isCaseSensitive]] begin[{]
local_variable[type[String], patDirs]
local_variable[type[String], strDirs]
local_variable[type[int], patIdxStart]
local_vari... | Keyword[public] Keyword[static] Keyword[boolean] identifier[matchPath] operator[SEP] identifier[String] identifier[pattern] , identifier[String] identifier[str] , Keyword[boolean] identifier[isCaseSensitive] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[patDirs] operator[=] identifi... |
public static <T, K> Func1<Iterable<T>, SolidMap<K, T>> toSolidMap(final Func1<T, K> keyExtractor) {
return toSolidMap(keyExtractor, new Func1<T, T>() {
@Override
public T call(T value) {
return value;
}
});
} | class class_name[name] begin[{]
method[toSolidMap, return_type[type[Func1]], modifier[public static], parameter[keyExtractor]] begin[{]
return[call[.toSolidMap, parameter[member[.keyExtractor], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], bod... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[K] operator[>] identifier[Func1] operator[<] identifier[Iterable] operator[<] identifier[T] operator[>] , identifier[SolidMap] operator[<] identifier[K] , identifier[T] operator[>] operator[>] identifier[toSolidMap] operator[SEP] Keyword[final] i... |
@Override
public void verify(Statement s) throws SymbolWarning, IndexingFailure,
ResourceDownloadError {
List<Parameter> parameters = s.getAllParameters();
// first iteration to open all namespaces
for (Parameter p : parameters) {
if (p.getNamespace() == null
... | class class_name[name] begin[{]
method[verify, return_type[void], modifier[public], parameter[s]] begin[{]
local_variable[type[List], parameters]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arg... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[verify] operator[SEP] identifier[Statement] identifier[s] operator[SEP] Keyword[throws] identifier[SymbolWarning] , identifier[IndexingFailure] , identifier[ResourceDownloadError] {
identifier[List] operator[<] identifier[Parameter] op... |
@Override
public void serialize(Relationship relationship, JsonGenerator jg, SerializerProvider
serializerProvider) throws IOException {
jg.writeStartObject();
jg.writeFieldName(FIELD_ID);
jg.writeString(relationship.getId());
jg.writeFieldName(FIELD_NAME);
jg.w... | class class_name[name] begin[{]
method[serialize, return_type[void], modifier[public], parameter[relationship, jg, serializerProvider]] begin[{]
call[jg.writeStartObject, parameter[]]
call[jg.writeFieldName, parameter[member[.FIELD_ID]]]
call[jg.writeString, para... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[serialize] operator[SEP] identifier[Relationship] identifier[relationship] , identifier[JsonGenerator] identifier[jg] , identifier[SerializerProvider] identifier[serializerProvider] operator[SEP] Keyword[throws] identifier[IOException] {
... |
public SDVariable pad(SDVariable input, int[][] padding, double constant){
return pad(input, sd.constant(Nd4j.createFromArray(padding)), constant);
} | class class_name[name] begin[{]
method[pad, return_type[type[SDVariable]], modifier[public], parameter[input, padding, constant]] begin[{]
return[call[.pad, parameter[member[.input], call[sd.constant, parameter[call[Nd4j.createFromArray, parameter[member[.padding]]]]], member[.constant]]]]
end[}]
E... | Keyword[public] identifier[SDVariable] identifier[pad] operator[SEP] identifier[SDVariable] identifier[input] , Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[padding] , Keyword[double] identifier[constant] operator[SEP] {
Keyword[return] identifier[pad] operator[SEP] identifie... |
private static ImmutableSortedSet<String> buildNodeModulesFoldersRegistry(
Iterable<String> modulePaths, Iterable<String> moduleRootPaths) {
SortedSet<String> registry =
new TreeSet<>(
// TODO(b/28382956): Take better advantage of Java8 comparing() to simplify this
(a, b) -> {
... | class class_name[name] begin[{]
method[buildNodeModulesFoldersRegistry, return_type[type[ImmutableSortedSet]], modifier[private static], parameter[modulePaths, moduleRootPaths]] begin[{]
local_variable[type[SortedSet], registry]
ForStatement(body=BlockStatement(label=None, statements=[ForStatem... | Keyword[private] Keyword[static] identifier[ImmutableSortedSet] operator[<] identifier[String] operator[>] identifier[buildNodeModulesFoldersRegistry] operator[SEP] identifier[Iterable] operator[<] identifier[String] operator[>] identifier[modulePaths] , identifier[Iterable] operator[<] identifier[String] operator[>] ... |
protected String getCommonSuperClass(final String type1, final String type2) {
ClassLoader classLoader = getClassLoader();
Class<?> class1;
try {
class1 = Class.forName(type1.replace('/', '.'), false, classLoader);
} catch (ClassNotFoundException e) {
throw new TypeNotPresentException(type1,... | class class_name[name] begin[{]
method[getCommonSuperClass, return_type[type[String]], modifier[protected], parameter[type1, type2]] begin[{]
local_variable[type[ClassLoader], classLoader]
local_variable[type[Class], class1]
TryStatement(block=[StatementExpression(expression=Assignment(... | Keyword[protected] identifier[String] identifier[getCommonSuperClass] operator[SEP] Keyword[final] identifier[String] identifier[type1] , Keyword[final] identifier[String] identifier[type2] operator[SEP] {
identifier[ClassLoader] identifier[classLoader] operator[=] identifier[getClassLoader] operator[SEP] opera... |
public static TransformSplit ofSearchReplace(@NonNull BaseInputSplit sourceSplit, @NonNull final String search,
@NonNull final String replace) throws URISyntaxException {
return new TransformSplit(sourceSplit, new URITransform() {
@Override
... | class class_name[name] begin[{]
method[ofSearchReplace, return_type[type[TransformSplit]], modifier[public static], parameter[sourceSplit, search, replace]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=sourceSplit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ... | Keyword[public] Keyword[static] identifier[TransformSplit] identifier[ofSearchReplace] operator[SEP] annotation[@] identifier[NonNull] identifier[BaseInputSplit] identifier[sourceSplit] , annotation[@] identifier[NonNull] Keyword[final] identifier[String] identifier[search] , annotation[@] identifier[NonNull] Keyword... |
public void addNode(N node)
{
if(!nodes.containsKey(node))
nodes.put(node, new Pair<HashSet<N>, HashSet<N>>(new HashSet<N>(), new HashSet<N>()));
} | class class_name[name] begin[{]
method[addNode, return_type[void], modifier[public], parameter[node]] begin[{]
if[call[nodes.containsKey, parameter[member[.node]]]] begin[{]
call[nodes.put, parameter[member[.node], ClassCreator(arguments=[ClassCreator(arguments=[], body=None, constr... | Keyword[public] Keyword[void] identifier[addNode] operator[SEP] identifier[N] identifier[node] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[nodes] operator[SEP] identifier[containsKey] operator[SEP] identifier[node] operator[SEP] operator[SEP] identifier[nodes] operator[SEP] identifier[put] o... |
private void addAnyAttachments(final List<EmailAttachment<? extends DataSource>> attachments, final MimeMultipart multipart) throws MessagingException {
for (final EmailAttachment<? extends DataSource> attachment : attachments) {
final MimeBodyPart bodyPart = createAttachmentBodyPart(attachment);
multipart.addB... | class class_name[name] begin[{]
method[addAnyAttachments, return_type[void], modifier[private], parameter[attachments, multipart]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Method... | Keyword[private] Keyword[void] identifier[addAnyAttachments] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[EmailAttachment] operator[<] operator[?] Keyword[extends] identifier[DataSource] operator[>] operator[>] identifier[attachments] , Keyword[final] identifier[MimeMultipart] identifier[multip... |
public void save(HttpServletRequest req, HttpServletResponse res, AuthenticationResult authResult, boolean keepInput) {
if (!req.getMethod().equalsIgnoreCase("POST")) {
return;
}
if (!(req instanceof IExtendedRequest)) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "I... | class class_name[name] begin[{]
method[save, return_type[void], modifier[public], parameter[req, res, authResult, keepInput]] begin[{]
if[call[req.getMethod, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
if[binary_operation[member[.req... | Keyword[public] Keyword[void] identifier[save] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[HttpServletResponse] identifier[res] , identifier[AuthenticationResult] identifier[authResult] , Keyword[boolean] identifier[keepInput] operator[SEP] {
Keyword[if] operator[SEP] operator[!]... |
@VisibleForTesting
static void pretendValidateResource(String resourceName, ContentKind kind) {
int index = resourceName.lastIndexOf('.');
Preconditions.checkArgument(
index >= 0, "Currently, we only validate resources with explicit extensions.");
String fileExtension = resourceName.substring(inde... | class class_name[name] begin[{]
method[pretendValidateResource, return_type[void], modifier[static], parameter[resourceName, kind]] begin[{]
local_variable[type[int], index]
call[Preconditions.checkArgument, parameter[binary_operation[member[.index], >=, literal[0]], literal["Currently,... | annotation[@] identifier[VisibleForTesting] Keyword[static] Keyword[void] identifier[pretendValidateResource] operator[SEP] identifier[String] identifier[resourceName] , identifier[ContentKind] identifier[kind] operator[SEP] {
Keyword[int] identifier[index] operator[=] identifier[resourceName] operator[SEP] ide... |
public static OffsetDateTime getCreationTime(long entityId)
{
long timestamp = (entityId >>> TIMESTAMP_OFFSET) + DISCORD_EPOCH;
Calendar gmt = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
gmt.setTimeInMillis(timestamp);
return OffsetDateTime.ofInstant(gmt.toInstant(), gmt.getTi... | class class_name[name] begin[{]
method[getCreationTime, return_type[type[OffsetDateTime]], modifier[public static], parameter[entityId]] begin[{]
local_variable[type[long], timestamp]
local_variable[type[Calendar], gmt]
call[gmt.setTimeInMillis, parameter[member[.timestamp]]]
... | Keyword[public] Keyword[static] identifier[OffsetDateTime] identifier[getCreationTime] operator[SEP] Keyword[long] identifier[entityId] operator[SEP] {
Keyword[long] identifier[timestamp] operator[=] operator[SEP] identifier[entityId] operator[>] operator[>] operator[>] identifier[TIMESTAMP_OFFSET] operator[SEP]... |
private static String lowPart(final String text) {
final String sector;
final String[] sectors = MediaType.sectors(text);
if (sectors.length > 1) {
sector = sectors[1].trim();
} else {
sector = "";
}
return sector;
} | class class_name[name] begin[{]
method[lowPart, return_type[type[String]], modifier[private static], parameter[text]] begin[{]
local_variable[type[String], sector]
local_variable[type[String], sectors]
if[binary_operation[member[sectors.length], >, literal[1]]] begin[{]
... | Keyword[private] Keyword[static] identifier[String] identifier[lowPart] operator[SEP] Keyword[final] identifier[String] identifier[text] operator[SEP] {
Keyword[final] identifier[String] identifier[sector] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[sectors] operator[=]... |
public Observable<Evaluate> evaluateMethodAsync(EvaluateMethodOptionalParameter evaluateMethodOptionalParameter) {
return evaluateMethodWithServiceResponseAsync(evaluateMethodOptionalParameter).map(new Func1<ServiceResponse<Evaluate>, Evaluate>() {
@Override
public Evaluate call(ServiceR... | class class_name[name] begin[{]
method[evaluateMethodAsync, return_type[type[Observable]], modifier[public], parameter[evaluateMethodOptionalParameter]] begin[{]
return[call[.evaluateMethodWithServiceResponseAsync, parameter[member[.evaluateMethodOptionalParameter]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Evaluate] operator[>] identifier[evaluateMethodAsync] operator[SEP] identifier[EvaluateMethodOptionalParameter] identifier[evaluateMethodOptionalParameter] operator[SEP] {
Keyword[return] identifier[evaluateMethodWithServiceResponseAsync] operator[SEP... |
public void validateMove(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope) {
validateMoveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).toBlocking().single().body();
} | class class_name[name] begin[{]
method[validateMove, return_type[void], modifier[public], parameter[resourceGroupName, moveResourceEnvelope]] begin[{]
call[.validateMoveWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.moveResourceEnvelope]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[validateMove] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[CsmMoveResourceEnvelope] identifier[moveResourceEnvelope] operator[SEP] {
identifier[validateMoveWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[... |
private ClientRequest<?> completeClientRequest() {
ClientRequest<?> local = atomicNullOutClientRequest();
if(local == null) {
return null;
}
if(isExpired) {
local.timeOut();
}
else {
local.complete();
}
if(logger.isTra... | class class_name[name] begin[{]
method[completeClientRequest, return_type[type[ClientRequest]], modifier[private], parameter[]] begin[{]
local_variable[type[ClientRequest], local]
if[binary_operation[member[.local], ==, literal[null]]] begin[{]
return[literal[null]]
... | Keyword[private] identifier[ClientRequest] operator[<] operator[?] operator[>] identifier[completeClientRequest] operator[SEP] operator[SEP] {
identifier[ClientRequest] operator[<] operator[?] operator[>] identifier[local] operator[=] identifier[atomicNullOutClientRequest] operator[SEP] operator[SEP] operator[SE... |
private <E extends Event> EventHandler<E> wrapbuildHandler(final EventAdapter eventAdapter, final Class<? extends EventAdapter> adapterClass, final Class<? extends EventHandler<E>> handlerClass)
throws CoreException {
try {
return handlerClass.getDeclaredConstructor(adapterClass).newInst... | class class_name[name] begin[{]
method[wrapbuildHandler, return_type[type[EventHandler]], modifier[private], parameter[eventAdapter, adapterClass, handlerClass]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=adapterClass, postfix_operators=[]... | Keyword[private] operator[<] identifier[E] Keyword[extends] identifier[Event] operator[>] identifier[EventHandler] operator[<] identifier[E] operator[>] identifier[wrapbuildHandler] operator[SEP] Keyword[final] identifier[EventAdapter] identifier[eventAdapter] , Keyword[final] identifier[Class] operator[<] operator[?]... |
public ExpressRouteLinkInner get(String resourceGroupName, String expressRoutePortName, String linkName) {
return getWithServiceResponseAsync(resourceGroupName, expressRoutePortName, linkName).toBlocking().single().body();
} | class class_name[name] begin[{]
method[get, return_type[type[ExpressRouteLinkInner]], modifier[public], parameter[resourceGroupName, expressRoutePortName, linkName]] begin[{]
return[call[.getWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.expressRoutePortName], member[.linkName]... | Keyword[public] identifier[ExpressRouteLinkInner] identifier[get] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[expressRoutePortName] , identifier[String] identifier[linkName] operator[SEP] {
Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] ... |
public void setTargetHeight (int targetHeight)
{
if (targetHeight <= 0) {
throw new IllegalArgumentException(
"Invalid target height '" + targetHeight + "'");
}
_constraints.width = 0;
_constraints.height = targetHeight;
invalidate("setTargetHeight... | class class_name[name] begin[{]
method[setTargetHeight, return_type[void], modifier[public], parameter[targetHeight]] begin[{]
if[binary_operation[member[.targetHeight], <=, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperat... | Keyword[public] Keyword[void] identifier[setTargetHeight] operator[SEP] Keyword[int] identifier[targetHeight] operator[SEP] {
Keyword[if] operator[SEP] identifier[targetHeight] operator[<=] Other[0] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[... |
public static long[] flipI(long[] v, int off) {
final int wordindex = off >>> LONG_LOG2_SIZE;
v[wordindex] ^= (1L << off);
return v;
} | class class_name[name] begin[{]
method[flipI, return_type[type[long]], modifier[public static], parameter[v, off]] begin[{]
local_variable[type[int], wordindex]
assign[member[.v], binary_operation[literal[1L], <<, member[.off]]]
return[member[.v]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[long] operator[SEP] operator[SEP] identifier[flipI] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[v] , Keyword[int] identifier[off] operator[SEP] {
Keyword[final] Keyword[int] identifier[wordindex] operator[=] identifier[off] operator[>] operator[>] o... |
public IntervalConverter removeIntervalConverter(IntervalConverter converter)
throws SecurityException {
checkAlterIntervalConverters();
if (converter == null) {
return null;
}
IntervalConverter[] removed = new IntervalConverter[1];
iIntervalConve... | class class_name[name] begin[{]
method[removeIntervalConverter, return_type[type[IntervalConverter]], modifier[public], parameter[converter]] begin[{]
call[.checkAlterIntervalConverters, parameter[]]
if[binary_operation[member[.converter], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[IntervalConverter] identifier[removeIntervalConverter] operator[SEP] identifier[IntervalConverter] identifier[converter] operator[SEP] Keyword[throws] identifier[SecurityException] {
identifier[checkAlterIntervalConverters] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator... |
@Override
public InstrumentationFieldFetchParameters withNewState(InstrumentationState instrumentationState) {
return new InstrumentationFieldFetchParameters(
this.getExecutionContext(), this.getField(), this.getEnvironment(),
instrumentationState, executionStrategyParameters... | class class_name[name] begin[{]
method[withNewState, return_type[type[InstrumentationFieldFetchParameters]], modifier[public], parameter[instrumentationState]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[... | annotation[@] identifier[Override] Keyword[public] identifier[InstrumentationFieldFetchParameters] identifier[withNewState] operator[SEP] identifier[InstrumentationState] identifier[instrumentationState] operator[SEP] {
Keyword[return] Keyword[new] identifier[InstrumentationFieldFetchParameters] operator[SEP] Ke... |
private int linearSearch(OMMapBufferEntry[] fileEntries, long beginOffset, int beginPosition, int endPosition) {
for (int i = beginPosition; i <= endPosition; i++) {
final OMMapBufferEntry entry = fileEntries[i];
if (entry.beginOffset + entry.size > beginOffset && entry.beginOffset <= beginOffset) {
... | class class_name[name] begin[{]
method[linearSearch, return_type[type[int]], modifier[private], parameter[fileEntries, beginOffset, beginPosition, endPosition]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dim... | Keyword[private] Keyword[int] identifier[linearSearch] operator[SEP] identifier[OMMapBufferEntry] operator[SEP] operator[SEP] identifier[fileEntries] , Keyword[long] identifier[beginOffset] , Keyword[int] identifier[beginPosition] , Keyword[int] identifier[endPosition] operator[SEP] {
Keyword[for] operator[SE... |
final void addLineNumber(final int lineNumber) {
if (this.lineNumber == 0) {
this.lineNumber = (short) lineNumber;
} else {
if (otherLineNumbers == null) {
otherLineNumbers = new int[LINE_NUMBERS_CAPACITY_INCREMENT];
}
int otherLineNumberIndex = ++otherLineNumbers[0];
if (o... | class class_name[name] begin[{]
method[addLineNumber, return_type[void], modifier[final], parameter[lineNumber]] begin[{]
if[binary_operation[THIS[member[None.lineNumber]], ==, literal[0]]] begin[{]
assign[THIS[member[None.lineNumber]], Cast(expression=MemberReference(me... | Keyword[final] Keyword[void] identifier[addLineNumber] operator[SEP] Keyword[final] Keyword[int] identifier[lineNumber] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[lineNumber] operator[==] Other[0] operator[SEP] {
Keyword[this] operator[SEP] identifier[lineNumber] ... |
private static List<Token> createTokens(final Map<String, String> properties) {
List<Token> tokens = new ArrayList<Token>();
for (Entry<String, String> entry : properties.entrySet()) {
if (entry.getKey().toLowerCase(Locale.ROOT).startsWith(FIELD_PREFIX)) {
tokens.add(FormatPatternParser.parse(entry.getValue(... | class class_name[name] begin[{]
method[createTokens, return_type[type[List]], modifier[private static], parameter[properties]] begin[{]
local_variable[type[List], tokens]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getKey,... | Keyword[private] Keyword[static] identifier[List] operator[<] identifier[Token] operator[>] identifier[createTokens] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[properties] operator[SEP] {
identifier[List] operator[<] identifier[Token] ... |
public void setStoreSalesUploadCommonMetadata(com.google.api.ads.adwords.axis.v201809.rm.StoreSalesUploadCommonMetadata storeSalesUploadCommonMetadata) {
this.storeSalesUploadCommonMetadata = storeSalesUploadCommonMetadata;
} | class class_name[name] begin[{]
method[setStoreSalesUploadCommonMetadata, return_type[void], modifier[public], parameter[storeSalesUploadCommonMetadata]] begin[{]
assign[THIS[member[None.storeSalesUploadCommonMetadata]], member[.storeSalesUploadCommonMetadata]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setStoreSalesUploadCommonMetadata] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifi... |
public void save(File file) throws IOException {
try (FileOutputStream out = new FileOutputStream(file)) {
save(out);
}
} | class class_name[name] begin[{]
method[save, return_type[void], modifier[public], parameter[file]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=save, post... | Keyword[public] Keyword[void] identifier[save] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] operator[SEP] identifier[FileOutputStream] identifier[out] operator[=] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[file] opera... |
protected void createOutputSectionItems(Composite composite, OutputConfiguration outputConfiguration) {
final Text defaultDirectoryField = addTextField(composite,
org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_Directory,
BuilderPreferenceAccess.getKey(outputConfiguration,
Eclipse... | class class_name[name] begin[{]
method[createOutputSectionItems, return_type[void], modifier[protected], parameter[composite, outputConfiguration]] begin[{]
local_variable[type[Text], defaultDirectoryField]
call[.addCheckBox, parameter[member[.composite], member[org.eclipse.xtext.builde... | Keyword[protected] Keyword[void] identifier[createOutputSectionItems] operator[SEP] identifier[Composite] identifier[composite] , identifier[OutputConfiguration] identifier[outputConfiguration] operator[SEP] {
Keyword[final] identifier[Text] identifier[defaultDirectoryField] operator[=] identifier[addTextField]... |
public GlobeCoordinatesValue copy(GlobeCoordinatesValue object) {
return dataObjectFactory.getGlobeCoordinatesValue(
object.getLatitude(), object.getLongitude(),
object.getPrecision(), object.getGlobe());
} | class class_name[name] begin[{]
method[copy, return_type[type[GlobeCoordinatesValue]], modifier[public], parameter[object]] begin[{]
return[call[dataObjectFactory.getGlobeCoordinatesValue, parameter[call[object.getLatitude, parameter[]], call[object.getLongitude, parameter[]], call[object.getPrecision,... | Keyword[public] identifier[GlobeCoordinatesValue] identifier[copy] operator[SEP] identifier[GlobeCoordinatesValue] identifier[object] operator[SEP] {
Keyword[return] identifier[dataObjectFactory] operator[SEP] identifier[getGlobeCoordinatesValue] operator[SEP] identifier[object] operator[SEP] identifier[getLatit... |
public synchronized void updateKey(final byte[] key) {
if (key == null || key.length == 0) {
throw new IllegalArgumentException(SR.INVALID_KEY);
}
this.key = key;
this.hmacSha256 = null;
} | class class_name[name] begin[{]
method[updateKey, return_type[void], modifier[synchronized public], parameter[key]] begin[{]
if[binary_operation[binary_operation[member[.key], ==, literal[null]], ||, binary_operation[member[key.length], ==, literal[0]]]] begin[{]
ThrowStatement(expr... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[updateKey] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[||] identifier[key] operator[SEP] identifier[length] operato... |
public static synchronized short getNearestColor(
final Color awtColor) {
if (triplets == null) {
triplets = HSSFColor.getTripletHash();
}
if (triplets == null || triplets.isEmpty()) {
System.out.println("Unable to get triplet hashtable");
return ... | class class_name[name] begin[{]
method[getNearestColor, return_type[type[short]], modifier[synchronized public static], parameter[awtColor]] begin[{]
if[binary_operation[member[.triplets], ==, literal[null]]] begin[{]
assign[member[.triplets], call[HSSFColor.getTripletHa... | Keyword[public] Keyword[static] Keyword[synchronized] Keyword[short] identifier[getNearestColor] operator[SEP] Keyword[final] identifier[Color] identifier[awtColor] operator[SEP] {
Keyword[if] operator[SEP] identifier[triplets] operator[==] Other[null] operator[SEP] {
identifier[triplets] operator[=] ... |
void fail(Throwable cause, boolean complete) {
if (cause != null) {
Throwable e = this.failureCause.get();
if (e != null && e != cause) {
cause.addSuppressed(e);
}
this.failureCause.set(cause);
}
endAttempt();
WriteLedger ... | class class_name[name] begin[{]
method[fail, return_type[void], modifier[default], parameter[cause, complete]] begin[{]
if[binary_operation[member[.cause], !=, literal[null]]] begin[{]
local_variable[type[Throwable], e]
if[binary_operation[binary_operation[me... | Keyword[void] identifier[fail] operator[SEP] identifier[Throwable] identifier[cause] , Keyword[boolean] identifier[complete] operator[SEP] {
Keyword[if] operator[SEP] identifier[cause] operator[!=] Other[null] operator[SEP] {
identifier[Throwable] identifier[e] operator[=] Keyword[this] operator[SEP]... |
public int getTransitionSelectivity()
{
int count = 0;
for (Transition<DFAState<T>> t : transitions.values())
{
CharRange range = t.getCondition();
count += range.getTo()-range.getFrom();
}
return count/transitions.size();
} | class class_name[name] begin[{]
method[getTransitionSelectivity, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], count]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dim... | Keyword[public] Keyword[int] identifier[getTransitionSelectivity] operator[SEP] operator[SEP] {
Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Transition] operator[<] identifier[DFAState] operator[<] identifier[T] operator[>] operator[>] identifier[t] oper... |
protected String join(Object[] values)
{
StringBuilder sb = new StringBuilder(100);
if(values.length == 0)
return sb.toString();
sb.append(values[0]);
if(values.length == 1)
return sb.toString();
for (int i = 1; i < values.length; i++)
{
... | class class_name[name] begin[{]
method[join, return_type[type[String]], modifier[protected], parameter[values]] begin[{]
local_variable[type[StringBuilder], sb]
if[binary_operation[member[values.length], ==, literal[0]]] begin[{]
return[call[sb.toString, parameter[]]]
else begin... | Keyword[protected] identifier[String] identifier[join] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[values] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[100] operator[SEP] operator[SEP] Keyword[if] opera... |
private void getDescriptor(final StringBuilder buf) {
if (this.buf == null) {
// descriptor is in byte 3 of 'off' for primitive types (buf ==
// null)
buf.append((char) ((off & 0xFF000000) >>> 24));
} else if (sort == OBJECT) {
buf.append('L');
... | class class_name[name] begin[{]
method[getDescriptor, return_type[void], modifier[private], parameter[buf]] begin[{]
if[binary_operation[THIS[member[None.buf]], ==, literal[null]]] begin[{]
call[buf.append, parameter[Cast(expression=BinaryOperation(operandl=BinaryOperati... | Keyword[private] Keyword[void] identifier[getDescriptor] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[buf] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[buf] operator[==] Other[null] operator[SEP] {
identifier[buf] operator[SEP] identifier[append... |
public static String getReferencePropertyOriginalName(final String refPropertyName) {
final int i = refPropertyName.lastIndexOf(REFERENCE_PROPERTY_SUFFIX);
return i < 0 ? refPropertyName : refPropertyName.substring(0, i);
} | class class_name[name] begin[{]
method[getReferencePropertyOriginalName, return_type[type[String]], modifier[public static], parameter[refPropertyName]] begin[{]
local_variable[type[int], i]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=... | Keyword[public] Keyword[static] identifier[String] identifier[getReferencePropertyOriginalName] operator[SEP] Keyword[final] identifier[String] identifier[refPropertyName] operator[SEP] {
Keyword[final] Keyword[int] identifier[i] operator[=] identifier[refPropertyName] operator[SEP] identifier[lastIndexOf] opera... |
public static CodeStatisticsResult countingCode(File src,
String suffix,
boolean countSubFolder,
CodeAnalysisConf conf) {
if (!Files.isDirectory(src)) {
... | class class_name[name] begin[{]
method[countingCode, return_type[type[CodeStatisticsResult]], modifier[public static], parameter[src, suffix, countSubFolder, conf]] begin[{]
if[call[Files.isDirectory, parameter[member[.src]]]] begin[{]
ThrowStatement(expression=ClassCreator(argument... | Keyword[public] Keyword[static] identifier[CodeStatisticsResult] identifier[countingCode] operator[SEP] identifier[File] identifier[src] , identifier[String] identifier[suffix] , Keyword[boolean] identifier[countSubFolder] , identifier[CodeAnalysisConf] identifier[conf] operator[SEP] {
Keyword[if] operator[SE... |
public void setSOLid(Integer newSOLid) {
Integer oldSOLid = soLid;
soLid = newSOLid;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.LND__SO_LID, oldSOLid, soLid));
} | class class_name[name] begin[{]
method[setSOLid, return_type[void], modifier[public], parameter[newSOLid]] begin[{]
local_variable[type[Integer], oldSOLid]
assign[member[.soLid], member[.newSOLid]]
if[call[.eNotificationRequired, parameter[]]] begin[{]
call[.... | Keyword[public] Keyword[void] identifier[setSOLid] operator[SEP] identifier[Integer] identifier[newSOLid] operator[SEP] {
identifier[Integer] identifier[oldSOLid] operator[=] identifier[soLid] operator[SEP] identifier[soLid] operator[=] identifier[newSOLid] operator[SEP] Keyword[if] operator[SEP] identifier[eNot... |
public UrlStringBuilder addParameter(String name, String... values) {
this.addParameter(name, values != null ? Arrays.asList(values) : null);
return this;
} | class class_name[name] begin[{]
method[addParameter, return_type[type[UrlStringBuilder]], modifier[public], parameter[name, values]] begin[{]
THIS[call[None.addParameter, parameter[member[.name], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=values, postfix_operato... | Keyword[public] identifier[UrlStringBuilder] identifier[addParameter] operator[SEP] identifier[String] identifier[name] , identifier[String] operator[...] identifier[values] operator[SEP] {
Keyword[this] operator[SEP] identifier[addParameter] operator[SEP] identifier[name] , identifier[values] operator[!=] Oth... |
public void setCustomVerificationEmailTemplates(java.util.Collection<CustomVerificationEmailTemplate> customVerificationEmailTemplates) {
if (customVerificationEmailTemplates == null) {
this.customVerificationEmailTemplates = null;
return;
}
this.customVerificationEmailT... | class class_name[name] begin[{]
method[setCustomVerificationEmailTemplates, return_type[void], modifier[public], parameter[customVerificationEmailTemplates]] begin[{]
if[binary_operation[member[.customVerificationEmailTemplates], ==, literal[null]]] begin[{]
assign[THIS[... | Keyword[public] Keyword[void] identifier[setCustomVerificationEmailTemplates] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[CustomVerificationEmailTemplate] operator[>] identifier[customVerificationEmailTemplates] operator[SEP] {
Keyword... |
private void ssHeapSort(int Td, int PA, int sa, int size) {
int i, m, t;
m = size;
if ((size % 2) == 0) {
m--;
if (T[start + Td + SA[PA + SA[sa + (m / 2)]]] < T[start + Td
+ SA[PA + SA[sa + m]]]) {
swapInSA(sa + m, sa + (m / 2));
... | class class_name[name] begin[{]
method[ssHeapSort, return_type[void], modifier[private], parameter[Td, PA, sa, size]] begin[{]
local_variable[type[int], i]
assign[member[.m], member[.size]]
if[binary_operation[binary_operation[member[.size], %, literal[2]], ==, literal[0... | Keyword[private] Keyword[void] identifier[ssHeapSort] operator[SEP] Keyword[int] identifier[Td] , Keyword[int] identifier[PA] , Keyword[int] identifier[sa] , Keyword[int] identifier[size] operator[SEP] {
Keyword[int] identifier[i] , identifier[m] , identifier[t] operator[SEP] identifier[m] operator[=] ident... |
public boolean addMetatypeAd(MetatypeAd metatypeAd) {
if (this.metatypeAds == null)
this.metatypeAds = new LinkedList<MetatypeAd>();
for (MetatypeAd ad : metatypeAds)
if (ad.getID().equals(metatypeAd.getID()))
return false;
this.metatypeAds.add(metatypeA... | class class_name[name] begin[{]
method[addMetatypeAd, return_type[type[boolean]], modifier[public], parameter[metatypeAd]] begin[{]
if[binary_operation[THIS[member[None.metatypeAds]], ==, literal[null]]] begin[{]
assign[THIS[member[None.metatypeAds]], ClassCreator(arguments=[], body... | Keyword[public] Keyword[boolean] identifier[addMetatypeAd] operator[SEP] identifier[MetatypeAd] identifier[metatypeAd] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[metatypeAds] operator[==] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[metatypeAds] operator[... |
@Override
public ListApplicationSnapshotsResult listApplicationSnapshots(ListApplicationSnapshotsRequest request) {
request = beforeClientExecution(request);
return executeListApplicationSnapshots(request);
} | class class_name[name] begin[{]
method[listApplicationSnapshots, return_type[type[ListApplicationSnapshotsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListApplicationSnaps... | annotation[@] identifier[Override] Keyword[public] identifier[ListApplicationSnapshotsResult] identifier[listApplicationSnapshots] operator[SEP] identifier[ListApplicationSnapshotsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifi... |
protected void onEval() {
Node control = getSrcControl();
if (hasErrors.get()) {
control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, true);
if (control instanceof Control) {
Tooltip controlTooltip = ((Control) control).getTooltip();
if (controlToo... | class class_name[name] begin[{]
method[onEval, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[Node], control]
if[call[hasErrors.get, parameter[]]] begin[{]
call[control.pseudoClassStateChanged, parameter[member[.PSEUDO_CLASS_ERR... | Keyword[protected] Keyword[void] identifier[onEval] operator[SEP] operator[SEP] {
identifier[Node] identifier[control] operator[=] identifier[getSrcControl] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hasErrors] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator... |
public E find(E e) {
Node<E> node = elmap.get(e);
if(node == null) return e;
return _find_root(node).element;
} | class class_name[name] begin[{]
method[find, return_type[type[E]], modifier[public], parameter[e]] begin[{]
local_variable[type[Node], node]
if[binary_operation[member[.node], ==, literal[null]]] begin[{]
return[member[.e]]
else begin[{]
None
end[}]
return[call[.... | Keyword[public] identifier[E] identifier[find] operator[SEP] identifier[E] identifier[e] operator[SEP] {
identifier[Node] operator[<] identifier[E] operator[>] identifier[node] operator[=] identifier[elmap] operator[SEP] identifier[get] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[if] operator... |
private void flushBuffer(final ByteBuffer buffer, final DataOutput stream) throws IOException {
buffer.flip();
stream.write(buffer.array(), buffer.arrayOffset(), buffer.remaining());
buffer.clear();
} | class class_name[name] begin[{]
method[flushBuffer, return_type[void], modifier[private], parameter[buffer, stream]] begin[{]
call[buffer.flip, parameter[]]
call[stream.write, parameter[call[buffer.array, parameter[]], call[buffer.arrayOffset, parameter[]], call[buffer.remaining... | Keyword[private] Keyword[void] identifier[flushBuffer] operator[SEP] Keyword[final] identifier[ByteBuffer] identifier[buffer] , Keyword[final] identifier[DataOutput] identifier[stream] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[buffer] operator[SEP] identifier[flip] operator[SEP] operato... |
public SDVariable biasAdd(String name, SDVariable input, SDVariable bias) {
validateFloatingPoint("biasAdd", "input", input);
validateFloatingPoint("biasAdd", "bias", bias);
SDVariable ret = f().biasAdd(input, bias);
return updateVariableNameAndReference(ret, name);
} | class class_name[name] begin[{]
method[biasAdd, return_type[type[SDVariable]], modifier[public], parameter[name, input, bias]] begin[{]
call[.validateFloatingPoint, parameter[literal["biasAdd"], literal["input"], member[.input]]]
call[.validateFloatingPoint, parameter[literal["b... | Keyword[public] identifier[SDVariable] identifier[biasAdd] operator[SEP] identifier[String] identifier[name] , identifier[SDVariable] identifier[input] , identifier[SDVariable] identifier[bias] operator[SEP] {
identifier[validateFloatingPoint] operator[SEP] literal[String] , literal[String] , identifier[inpu... |
public Attribute getInversedBy() {
// FIXME besides checking mappedBy attr name also check
// attr.getRefEntity().getFullyQualifiedName
if (hasRefEntity()) {
return Streams.stream(getRefEntity().getAtomicAttributes())
.filter(Attribute::isMappedBy)
.filter(attr -> getName().equals(... | class class_name[name] begin[{]
method[getInversedBy, return_type[type[Attribute]], modifier[public], parameter[]] begin[{]
if[call[.hasRefEntity, parameter[]]] begin[{]
return[call[Streams.stream, parameter[call[.getRefEntity, parameter[]]]]]
else begin[{]
retur... | Keyword[public] identifier[Attribute] identifier[getInversedBy] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[hasRefEntity] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[Streams] operator[SEP] identifier[stream] operator[SEP] identifier[getRefEntity] opera... |
public void validateMethodArgs(String uriPattern) {
Set<String> namedParameters = new LinkedHashSet<>();
for (ArgumentExtractor extractor : extractors) {
if (extractor instanceof NamedExtractor) {
NamedExtractor namedExtractor = (NamedExtractor) extractor;
nam... | class class_name[name] begin[{]
method[validateMethodArgs, return_type[void], modifier[public], parameter[uriPattern]] begin[{]
local_variable[type[Set], namedParameters]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(memb... | Keyword[public] Keyword[void] identifier[validateMethodArgs] operator[SEP] identifier[String] identifier[uriPattern] operator[SEP] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[namedParameters] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] operator[>] operator[SEP] oper... |
public static ParametricCcgParser parseFromLexicon(Iterable<String> unfilteredLexiconLines,
Iterable<String> unknownWordLexiconLines, Iterable<String> unfilteredRuleLines,
CcgFeatureFactory featureFactory, Set<String> posTagSet, boolean allowComposition,
Iterable<CcgRuleSchema> allowedCombinationRules... | class class_name[name] begin[{]
method[parseFromLexicon, return_type[type[ParametricCcgParser]], modifier[public static], parameter[unfilteredLexiconLines, unknownWordLexiconLines, unfilteredRuleLines, featureFactory, posTagSet, allowComposition, allowedCombinationRules, normalFormOnly]] begin[{]
... | Keyword[public] Keyword[static] identifier[ParametricCcgParser] identifier[parseFromLexicon] operator[SEP] identifier[Iterable] operator[<] identifier[String] operator[>] identifier[unfilteredLexiconLines] , identifier[Iterable] operator[<] identifier[String] operator[>] identifier[unknownWordLexiconLines] , identifi... |
public boolean isHttpRedirect() {
if (isRevisitDigest() && (getDuplicatePayload() != null)) {
return getDuplicatePayload().isHttpRedirect();
}
String httpCode = getHttpCode();
return (httpCode.startsWith("3"));
} | class class_name[name] begin[{]
method[isHttpRedirect, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[.isRevisitDigest, parameter[]], &&, binary_operation[call[.getDuplicatePayload, parameter[]], !=, literal[null]]]] begin[{]
return[call... | Keyword[public] Keyword[boolean] identifier[isHttpRedirect] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isRevisitDigest] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[getDuplicatePayload] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[SEP] ... |
public <E extends T> void filter (Collection<E> coll)
{
for (Iterator<E> itr = coll.iterator(); itr.hasNext(); ) {
if (!isMatch(itr.next())) {
itr.remove();
}
}
} | class class_name[name] begin[{]
method[filter, return_type[void], modifier[public], parameter[coll]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[],... | Keyword[public] operator[<] identifier[E] Keyword[extends] identifier[T] operator[>] Keyword[void] identifier[filter] operator[SEP] identifier[Collection] operator[<] identifier[E] operator[>] identifier[coll] operator[SEP] {
Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[E] operator[>] i... |
public CMAArray<CMARole> fetchAll(Map<String, String> query) {
throwIfEnvironmentIdIsSet();
return fetchAll(spaceId, query);
} | class class_name[name] begin[{]
method[fetchAll, return_type[type[CMAArray]], modifier[public], parameter[query]] begin[{]
call[.throwIfEnvironmentIdIsSet, parameter[]]
return[call[.fetchAll, parameter[member[.spaceId], member[.query]]]]
end[}]
END[}] | Keyword[public] identifier[CMAArray] operator[<] identifier[CMARole] operator[>] identifier[fetchAll] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[query] operator[SEP] {
identifier[throwIfEnvironmentIdIsSet] operator[SEP] operator[SEP] operator[SEP] Ke... |
public static int getResources_getInteger(Context context, int id) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
return context.getResources().getInteger(id);
}
DisplayMetrics metrics = context.getResources().getDisplayMetrics();
float widthDp = metrics... | class class_name[name] begin[{]
method[getResources_getInteger, return_type[type[int]], modifier[public static], parameter[context, id]] begin[{]
if[binary_operation[member[Build.VERSION.SDK_INT], >=, member[Build.VERSION_CODES.HONEYCOMB_MR2]]] begin[{]
return[call[context.getResour... | Keyword[public] Keyword[static] Keyword[int] identifier[getResources_getInteger] operator[SEP] identifier[Context] identifier[context] , Keyword[int] identifier[id] operator[SEP] {
Keyword[if] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION] operator[SEP] identifier[SDK_INT] operator[>=] identi... |
public DataSiftConfig proxy(String host, int port, String username, String password) {
http.proxy(host, port, username, password);
return this;
} | class class_name[name] begin[{]
method[proxy, return_type[type[DataSiftConfig]], modifier[public], parameter[host, port, username, password]] begin[{]
call[http.proxy, parameter[member[.host], member[.port], member[.username], member[.password]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[DataSiftConfig] identifier[proxy] operator[SEP] identifier[String] identifier[host] , Keyword[int] identifier[port] , identifier[String] identifier[username] , identifier[String] identifier[password] operator[SEP] {
identifier[http] operator[SEP] identifier[proxy] operator[SEP] iden... |
public RowBuilder int16(String name)
{
ColumnInt16 column = new ColumnInt16(_columns.size(), name, _offset);
_offset += column.length();
_columns.add(column);
return this;
} | class class_name[name] begin[{]
method[int16, return_type[type[RowBuilder]], modifier[public], parameter[name]] begin[{]
local_variable[type[ColumnInt16], column]
assign[member[._offset], call[column.length, parameter[]]]
call[_columns.add, parameter[member[.column]]]
... | Keyword[public] identifier[RowBuilder] identifier[int16] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[ColumnInt16] identifier[column] operator[=] Keyword[new] identifier[ColumnInt16] operator[SEP] identifier[_columns] operator[SEP] identifier[size] operator[SEP] operator[SEP] , i... |
public void configure(String conjunction, String disjunction,
String implication, String aggregation,
String defuzzifier, String activation) {
TNormFactory tnormFactory = FactoryManager.instance().tnorm();
SNormFactory snormFactory = FactoryManager.instance().snorm();
TN... | class class_name[name] begin[{]
method[configure, return_type[void], modifier[public], parameter[conjunction, disjunction, implication, aggregation, defuzzifier, activation]] begin[{]
local_variable[type[TNormFactory], tnormFactory]
local_variable[type[SNormFactory], snormFactory]
local... | Keyword[public] Keyword[void] identifier[configure] operator[SEP] identifier[String] identifier[conjunction] , identifier[String] identifier[disjunction] , identifier[String] identifier[implication] , identifier[String] identifier[aggregation] , identifier[String] identifier[defuzzifier] , identifier[String] ident... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.