code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public boolean indexAppliesTo( Constraint constraint ) {
if (constraint instanceof Comparison) {
return indexAppliesTo((Comparison)constraint);
}
if (constraint instanceof And) {
return indexAppliesTo((And)constraint);
}
if (constraint instanceof Or) {
... | class class_name[name] begin[{]
method[indexAppliesTo, return_type[type[boolean]], modifier[public], parameter[constraint]] begin[{]
if[binary_operation[member[.constraint], instanceof, type[Comparison]]] begin[{]
return[call[.indexAppliesTo, parameter[Cast(expression=MemberReferenc... | Keyword[public] Keyword[boolean] identifier[indexAppliesTo] operator[SEP] identifier[Constraint] identifier[constraint] operator[SEP] {
Keyword[if] operator[SEP] identifier[constraint] Keyword[instanceof] identifier[Comparison] operator[SEP] {
Keyword[return] identifier[indexAppliesTo] operator[SEP] o... |
protected void postInvoke(Method m, Object [] args, Object retval, Throwable t, String [] interceptorNames, String pivotedInterceptor)
{
try
{
Vector<InvokeListener> invokeListeners = getInvokeListeners();
if (invokeListeners.size() > 0)
{
for (Inv... | class class_name[name] begin[{]
method[postInvoke, return_type[void], modifier[protected], parameter[m, args, retval, t, interceptorNames, pivotedInterceptor]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocati... | Keyword[protected] Keyword[void] identifier[postInvoke] operator[SEP] identifier[Method] identifier[m] , identifier[Object] operator[SEP] operator[SEP] identifier[args] , identifier[Object] identifier[retval] , identifier[Throwable] identifier[t] , identifier[String] operator[SEP] operator[SEP] identifier[intercept... |
public static <K, V> CacheEventFilterConverter<K, V, ObjectFilter.FilterResult> makeFilter(String queryString, Map<String, Object> namedParameters) {
IckleFilterAndConverter<K, V> filterAndConverter = new IckleFilterAndConverter<>(queryString, namedParameters, ReflectionMatcher.class);
return new IckleCache... | class class_name[name] begin[{]
method[makeFilter, return_type[type[CacheEventFilterConverter]], modifier[public static], parameter[queryString, namedParameters]] begin[{]
local_variable[type[IckleFilterAndConverter], filterAndConverter]
return[ClassCreator(arguments=[MemberReference(member=fil... | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[CacheEventFilterConverter] operator[<] identifier[K] , identifier[V] , identifier[ObjectFilter] operator[SEP] identifier[FilterResult] operator[>] identifier[makeFilter] operator[SEP] identifier[String] identifier[queryS... |
public void marshall(ListAssociationsForLicenseConfigurationRequest listAssociationsForLicenseConfigurationRequest, ProtocolMarshaller protocolMarshaller) {
if (listAssociationsForLicenseConfigurationRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[listAssociationsForLicenseConfigurationRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.listAssociationsForLicenseConfigurationRequest], ==, literal[null]]] begin[{]
Thr... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ListAssociationsForLicenseConfigurationRequest] identifier[listAssociationsForLicenseConfigurationRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[listAssociat... |
@Override
public void setStrength(int newStrength) {
checkNotFrozen();
if(newStrength == getStrength()) { return; }
CollationSettings ownedSettings = getOwnedSettings();
ownedSettings.setStrength(newStrength);
setFastLatinOptions(ownedSettings);
} | class class_name[name] begin[{]
method[setStrength, return_type[void], modifier[public], parameter[newStrength]] begin[{]
call[.checkNotFrozen, parameter[]]
if[binary_operation[member[.newStrength], ==, call[.getStrength, parameter[]]]] begin[{]
return[None]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setStrength] operator[SEP] Keyword[int] identifier[newStrength] operator[SEP] {
identifier[checkNotFrozen] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newStrength] operator[==] identifier[getStrength] o... |
public static boolean isStatic(final HttpServletRequest request) {
final boolean requestStaticResourceChecked = null == request.getAttribute(Keys.HttpRequest.REQUEST_STATIC_RESOURCE_CHECKED)
? false
: (Boolean) request.getAttribute(Keys.HttpRequest.REQUEST_STATIC_RESOURCE_CHECKED... | class class_name[name] begin[{]
method[isStatic, return_type[type[boolean]], modifier[public static], parameter[request]] begin[{]
local_variable[type[boolean], requestStaticResourceChecked]
if[member[.requestStaticResourceChecked]] begin[{]
return[Cast(expression=MethodInvo... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isStatic] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[request] operator[SEP] {
Keyword[final] Keyword[boolean] identifier[requestStaticResourceChecked] operator[=] Other[null] operator[==] identifier[request] operator[SEP] ide... |
private void initOutputFormat() {
ClassLoader userCodeClassLoader = getUserCodeClassLoader();
// obtain task configuration (including stub parameters)
Configuration taskConf = getTaskConfiguration();
this.config = new TaskConfig(taskConf);
try {
this.format = config.<OutputFormat<IT>>getStubWrapper(userCo... | class class_name[name] begin[{]
method[initOutputFormat, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[ClassLoader], userCodeClassLoader]
local_variable[type[Configuration], taskConf]
assign[THIS[member[None.config]], ClassCreator(arguments=[Mem... | Keyword[private] Keyword[void] identifier[initOutputFormat] operator[SEP] operator[SEP] {
identifier[ClassLoader] identifier[userCodeClassLoader] operator[=] identifier[getUserCodeClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[Configuration] identifier[taskConf] operator[=] identifier[getTaskC... |
public void sendObjectToTopic(@Observes @JsTopicEvent("") Object payload, EventMetadata metadata) {
MessageToClient msg = new MessageToClient();
InjectionPoint injectionPoint = metadata.getInjectionPoint();
Annotated annotated = injectionPoint.getAnnotated();
JsTopicEvent jte = annotated.getAnnotation(JsTop... | class class_name[name] begin[{]
method[sendObjectToTopic, return_type[void], modifier[public], parameter[payload, metadata]] begin[{]
local_variable[type[MessageToClient], msg]
local_variable[type[InjectionPoint], injectionPoint]
local_variable[type[Annotated], annotated]
local_... | Keyword[public] Keyword[void] identifier[sendObjectToTopic] operator[SEP] annotation[@] identifier[Observes] annotation[@] identifier[JsTopicEvent] operator[SEP] literal[String] operator[SEP] identifier[Object] identifier[payload] , identifier[EventMetadata] identifier[metadata] operator[SEP] {
identifier[Messa... |
public static <T> Observable<T> toObservable(final Publisher<T> publisher) {
return Observable.create(new Observable.OnSubscribe<T>() {
@Override
public void call(final rx.Subscriber<? super T> rxSubscriber) {
publisher.subscribe(toSubscriber(rxSubscriber));
}... | class class_name[name] begin[{]
method[toObservable, return_type[type[Observable]], modifier[public static], parameter[publisher]] begin[{]
return[call[Observable.create, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementE... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Observable] operator[<] identifier[T] operator[>] identifier[toObservable] operator[SEP] Keyword[final] identifier[Publisher] operator[<] identifier[T] operator[>] identifier[publisher] operator[SEP] {
Keyword[return] identifier[Obs... |
public String toMetatypeString(boolean includeHeaders) {
for (MetatypeOcd ocd : ocds) {
ocd.setParentMetatype(this);
ocd.sort(true);
}
int padSpaces = 0;
StringBuilder sb = new StringBuilder();
if (includeHeaders) {
++padSpaces;
... | class class_name[name] begin[{]
method[toMetatypeString, return_type[type[String]], modifier[public], parameter[includeHeaders]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], q... | Keyword[public] identifier[String] identifier[toMetatypeString] operator[SEP] Keyword[boolean] identifier[includeHeaders] operator[SEP] {
Keyword[for] operator[SEP] identifier[MetatypeOcd] identifier[ocd] operator[:] identifier[ocds] operator[SEP] {
identifier[ocd] operator[SEP] identifier[setParentM... |
public ApiResponse<Void> putCharactersCharacterIdMailMailIdWithHttpInfo(Integer characterId, Integer mailId,
String datasource, String token, MailMetaData mailMetaData) throws ApiException {
com.squareup.okhttp.Call call = putCharactersCharacterIdMailMailIdValidateBeforeCall(characterId, mailId,
... | class class_name[name] begin[{]
method[putCharactersCharacterIdMailMailIdWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[characterId, mailId, datasource, token, mailMetaData]] begin[{]
local_variable[type[com], call]
return[call[apiClient.execute, parameter[member[.cal... | Keyword[public] identifier[ApiResponse] operator[<] identifier[Void] operator[>] identifier[putCharactersCharacterIdMailMailIdWithHttpInfo] operator[SEP] identifier[Integer] identifier[characterId] , identifier[Integer] identifier[mailId] , identifier[String] identifier[datasource] , identifier[String] identifier[to... |
private void init(Object object) throws JSONException{
if (object instanceof CharSequence) {
// JSON字符串
init((CharSequence) object);
} else {
Iterator<?> iter;
if (object.getClass().isArray()) {// 数组
iter = new ArrayIter<>(object);
} else if (object instanceof Iterator<?>) {// Iterator
... | class class_name[name] begin[{]
method[init, return_type[void], modifier[private], parameter[object]] begin[{]
if[binary_operation[member[.object], instanceof, type[CharSequence]]] begin[{]
call[.init, parameter[Cast(expression=MemberReference(member=object, postfix_oper... | Keyword[private] Keyword[void] identifier[init] operator[SEP] identifier[Object] identifier[object] operator[SEP] Keyword[throws] identifier[JSONException] {
Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[CharSequence] operator[SEP] {
identifier[init] operator[SEP] operato... |
public void marshall(GetBackupPlanRequest getBackupPlanRequest, ProtocolMarshaller protocolMarshaller) {
if (getBackupPlanRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(getBackupPlanReques... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getBackupPlanRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getBackupPlanRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Liter... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetBackupPlanRequest] identifier[getBackupPlanRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getBackupPlanRequest] operator[==] Other[null] operator[SEP] {
... |
public static FastByteArrayOutputStream copyToOutputStream(final Reader input, final String encoding, final int count) throws IOException {
try (FastByteArrayOutputStream output = createFastByteArrayOutputStream()) {
copy(input, output, encoding, count);
return output;
}
} | class class_name[name] begin[{]
method[copyToOutputStream, return_type[type[FastByteArrayOutputStream]], modifier[public static], parameter[input, encoding, count]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[]... | Keyword[public] Keyword[static] identifier[FastByteArrayOutputStream] identifier[copyToOutputStream] operator[SEP] Keyword[final] identifier[Reader] identifier[input] , Keyword[final] identifier[String] identifier[encoding] , Keyword[final] Keyword[int] identifier[count] operator[SEP] Keyword[throws] identifier[IOExc... |
public void removeTarget(T target) {
for (MethodlessRouter<T> r : routers.values()) r.removeTarget(target);
anyMethodRouter.removeTarget(target);
} | class class_name[name] begin[{]
method[removeTarget, return_type[void], modifier[public], parameter[target]] begin[{]
ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member... | Keyword[public] Keyword[void] identifier[removeTarget] operator[SEP] identifier[T] identifier[target] operator[SEP] {
Keyword[for] operator[SEP] identifier[MethodlessRouter] operator[<] identifier[T] operator[>] identifier[r] operator[:] identifier[routers] operator[SEP] identifier[values] operator[SEP] operato... |
public void inflate(double minx, double miny, double minz, double maxx, double maxy, double maxz) {
this.setFromCorners(this.getMinX()+ minx,this.getMinY()+ miny,this.getMinZ()+ minz,this.getMaxX()+ maxx,this.getMaxY()+ maxy,this.getMaxZ()+ maxz);
} | class class_name[name] begin[{]
method[inflate, return_type[void], modifier[public], parameter[minx, miny, minz, maxx, maxy, maxz]] begin[{]
THIS[call[None.setFromCorners, parameter[binary_operation[THIS[call[None.getMinX, parameter[]]], +, member[.minx]], binary_operation[THIS[call[None.getMin... | Keyword[public] Keyword[void] identifier[inflate] operator[SEP] Keyword[double] identifier[minx] , Keyword[double] identifier[miny] , Keyword[double] identifier[minz] , Keyword[double] identifier[maxx] , Keyword[double] identifier[maxy] , Keyword[double] identifier[maxz] operator[SEP] {
Keyword[this] operat... |
public static UsernameAttribute createUsernameAttribute(String username) {
UsernameAttribute attribute = new UsernameAttribute();
try {
attribute.setUsername(username.getBytes("UTF-8"));
} catch (UnsupportedEncodingException ueex) {
throw new UndeclaredThrowableException(ueex);
}
return attribute;
} | class class_name[name] begin[{]
method[createUsernameAttribute, return_type[type[UsernameAttribute]], modifier[public static], parameter[username]] begin[{]
local_variable[type[UsernameAttribute], attribute]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodIn... | Keyword[public] Keyword[static] identifier[UsernameAttribute] identifier[createUsernameAttribute] operator[SEP] identifier[String] identifier[username] operator[SEP] {
identifier[UsernameAttribute] identifier[attribute] operator[=] Keyword[new] identifier[UsernameAttribute] operator[SEP] operator[SEP] operator[S... |
public static int nvgraphConvertGraph(
nvgraphHandle handle,
nvgraphGraphDescr srcDescrG,
nvgraphGraphDescr dstDescrG,
int dstTType)
{
return checkResult(nvgraphConvertGraphNative(handle, srcDescrG, dstDescrG, dstTType));
} | class class_name[name] begin[{]
method[nvgraphConvertGraph, return_type[type[int]], modifier[public static], parameter[handle, srcDescrG, dstDescrG, dstTType]] begin[{]
return[call[.checkResult, parameter[call[.nvgraphConvertGraphNative, parameter[member[.handle], member[.srcDescrG], member[.dstDescrG]... | Keyword[public] Keyword[static] Keyword[int] identifier[nvgraphConvertGraph] operator[SEP] identifier[nvgraphHandle] identifier[handle] , identifier[nvgraphGraphDescr] identifier[srcDescrG] , identifier[nvgraphGraphDescr] identifier[dstDescrG] , Keyword[int] identifier[dstTType] operator[SEP] {
Keyword[return... |
public static <T> List<SelectionStrategy<? super T>> createDefaultOptions(Probability tournamentProbability,
double truncationRatio)
{
List<SelectionStrategy<? super T>> options = new LinkedList<SelectionStrategy<? super T>>();
... | class class_name[name] begin[{]
method[createDefaultOptions, return_type[type[List]], modifier[public static], parameter[tournamentProbability, truncationRatio]] begin[{]
local_variable[type[List], options]
call[options.add, parameter[ClassCreator(arguments=[], body=None, constructor_ty... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[SelectionStrategy] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] identifier[createDefaultOptions] operator[SEP] identifier[Probability] identifier[tournamentProbability] , Keywor... |
public int getInt(final String key) {
Object o = get(key);
if (o == null) {
throw new NullPointerException("no value for: " + key);
}
return toInt(o);
} | class class_name[name] begin[{]
method[getInt, return_type[type[int]], modifier[public], parameter[key]] begin[{]
local_variable[type[Object], o]
if[binary_operation[member[.o], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(op... | Keyword[public] Keyword[int] identifier[getInt] operator[SEP] Keyword[final] identifier[String] identifier[key] operator[SEP] {
identifier[Object] identifier[o] operator[=] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[o] operator[==] Other[null] o... |
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case AfplibPackage.EIM__IDO_NAME:
setIdoName((String)newValue);
return;
case AfplibPackage.EIM__TRIPLETS:
getTriplets().clear();
getTriplets().addAll((Collection<? extends Triplet>)... | class class_name[name] begin[{]
method[eSet, return_type[void], modifier[public], parameter[featureID, newValue]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=EIM__IDO_NAME, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statement... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eSet] operator[SEP] Keyword[int] identifier[featureID] , identifier[Object] identifier[newValue] operator[SEP] {
Keyword[switch] operator[SEP] identi... |
private String getDistinctColumnName(final String innerExpression) {
Pattern pattern = Pattern.compile("\\(\\s*DISTINCT\\s+(\\S+)\\s*\\)", Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher(innerExpression);
String result = "";
if (matcher.find()) {
result = matcher... | class class_name[name] begin[{]
method[getDistinctColumnName, return_type[type[String]], modifier[private], parameter[innerExpression]] begin[{]
local_variable[type[Pattern], pattern]
local_variable[type[Matcher], matcher]
local_variable[type[String], result]
if[call[mat... | Keyword[private] identifier[String] identifier[getDistinctColumnName] operator[SEP] Keyword[final] identifier[String] identifier[innerExpression] operator[SEP] {
identifier[Pattern] identifier[pattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] literal[String] , identifier[P... |
public QueryBuilder withCommitId(CommitId commitId) {
Validate.argumentIsNotNull(commitId);
queryParamsBuilder.commitId(commitId);
return this;
} | class class_name[name] begin[{]
method[withCommitId, return_type[type[QueryBuilder]], modifier[public], parameter[commitId]] begin[{]
call[Validate.argumentIsNotNull, parameter[member[.commitId]]]
call[queryParamsBuilder.commitId, parameter[member[.commitId]]]
return[THI... | Keyword[public] identifier[QueryBuilder] identifier[withCommitId] operator[SEP] identifier[CommitId] identifier[commitId] operator[SEP] {
identifier[Validate] operator[SEP] identifier[argumentIsNotNull] operator[SEP] identifier[commitId] operator[SEP] operator[SEP] identifier[queryParamsBuilder] operator[SEP] id... |
public com.google.api.ads.adwords.axis.v201809.cm.AdStrengthInfo getAdStrengthInfo() {
return adStrengthInfo;
} | class class_name[name] begin[{]
method[getAdStrengthInfo, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[member[.adStrengthInfo]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[AdStrengthInfo] identifier[getAdStrengthIn... |
protected boolean substitute(final StrBuilder buf, final int offset, final int length) {
return substitute(buf, offset, length, null) > 0;
} | class class_name[name] begin[{]
method[substitute, return_type[type[boolean]], modifier[protected], parameter[buf, offset, length]] begin[{]
return[binary_operation[call[.substitute, parameter[member[.buf], member[.offset], member[.length], literal[null]]], >, literal[0]]]
end[}]
END[}] | Keyword[protected] Keyword[boolean] identifier[substitute] operator[SEP] Keyword[final] identifier[StrBuilder] identifier[buf] , Keyword[final] Keyword[int] identifier[offset] , Keyword[final] Keyword[int] identifier[length] operator[SEP] {
Keyword[return] identifier[substitute] operator[SEP] identifier[buf] ,... |
public SectionComponent addSection() { //3
SectionComponent t = new SectionComponent();
if (this.section == null)
this.section = new ArrayList<SectionComponent>();
this.section.add(t);
return t;
} | class class_name[name] begin[{]
method[addSection, return_type[type[SectionComponent]], modifier[public], parameter[]] begin[{]
local_variable[type[SectionComponent], t]
if[binary_operation[THIS[member[None.section]], ==, literal[null]]] begin[{]
assign[THIS[member[None.sect... | Keyword[public] identifier[SectionComponent] identifier[addSection] operator[SEP] operator[SEP] {
identifier[SectionComponent] identifier[t] operator[=] Keyword[new] identifier[SectionComponent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[section] op... |
private Range<K> coalescedRange(Range<K> range, V value) {
Range<K> coalescedRange = range;
Entry<Cut<K>, RangeMapEntry<K, V>> lowerEntry =
entriesByLowerBound.lowerEntry(range.lowerBound);
coalescedRange = coalesce(coalescedRange, value, lowerEntry);
Entry<Cut<K>, RangeMapEntry<K, V>> higherEn... | class class_name[name] begin[{]
method[coalescedRange, return_type[type[Range]], modifier[private], parameter[range, value]] begin[{]
local_variable[type[Range], coalescedRange]
local_variable[type[Entry], lowerEntry]
assign[member[.coalescedRange], call[.coalesce, parameter[mem... | Keyword[private] identifier[Range] operator[<] identifier[K] operator[>] identifier[coalescedRange] operator[SEP] identifier[Range] operator[<] identifier[K] operator[>] identifier[range] , identifier[V] identifier[value] operator[SEP] {
identifier[Range] operator[<] identifier[K] operator[>] identifier[coalesc... |
@SuppressWarnings("deprecation")
@SuppressLint("NewApi")
private void setBackground(View view, Drawable drawable) {
if (Build.VERSION.SDK_INT >= SET_DRAWABLE_MIN_SDK)
view.setBackground(drawable);
else
view.setBackgroundDrawable(drawable);
} | class class_name[name] begin[{]
method[setBackground, return_type[void], modifier[private], parameter[view, drawable]] begin[{]
if[binary_operation[member[Build.VERSION.SDK_INT], >=, member[.SET_DRAWABLE_MIN_SDK]]] begin[{]
call[view.setBackground, parameter[member[.drawable]]]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[SuppressLint] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[setBackground] operator[SEP] identifier[View] identifier[view] , identifier[Drawable] identifier[drawable] ... |
public Task writeTask() {
Task task = new Task();
addProperty(task, ACCOUNT_PROP, getAccount());
addProperty(task, STORE_ID_PROP, getStoreId());
addProperty(task, SPACE_ID_PROP, getSpaceId());
return task;
} | class class_name[name] begin[{]
method[writeTask, return_type[type[Task]], modifier[public], parameter[]] begin[{]
local_variable[type[Task], task]
call[.addProperty, parameter[member[.task], member[.ACCOUNT_PROP], call[.getAccount, parameter[]]]]
call[.addProperty, para... | Keyword[public] identifier[Task] identifier[writeTask] operator[SEP] operator[SEP] {
identifier[Task] identifier[task] operator[=] Keyword[new] identifier[Task] operator[SEP] operator[SEP] operator[SEP] identifier[addProperty] operator[SEP] identifier[task] , identifier[ACCOUNT_PROP] , identifier[getAccount] o... |
public Coordinate getCoordinate(Geometry geometry) {
LineString lineString = getLineString(geometry);
if (lineString != null && coordinateIndex >= 0) {
return lineString.getCoordinateN(coordinateIndex);
}
return null;
} | class class_name[name] begin[{]
method[getCoordinate, return_type[type[Coordinate]], modifier[public], parameter[geometry]] begin[{]
local_variable[type[LineString], lineString]
if[binary_operation[binary_operation[member[.lineString], !=, literal[null]], &&, binary_operation[member[.co... | Keyword[public] identifier[Coordinate] identifier[getCoordinate] operator[SEP] identifier[Geometry] identifier[geometry] operator[SEP] {
identifier[LineString] identifier[lineString] operator[=] identifier[getLineString] operator[SEP] identifier[geometry] operator[SEP] operator[SEP] Keyword[if] operator[SEP] ide... |
public static int[] randomPermutation(final int[] out, Random random) {
for(int i = out.length - 1; i > 0; i--) {
// Swap with random preceeding element.
int ri = random.nextInt(i + 1);
int tmp = out[ri];
out[ri] = out[i];
out[i] = tmp;
}
return out;
} | class class_name[name] begin[{]
method[randomPermutation, return_type[type[int]], modifier[public static], parameter[out, random]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Method... | Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[randomPermutation] operator[SEP] Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[out] , identifier[Random] identifier[random] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] i... |
@DELETE
public Response deleteResource(@PathParam(JaxRxConstants.SYSTEM) final String system,
@PathParam(JaxRxConstants.RESOURCE) final String resource, @Context final HttpHeaders headers) {
final JaxRx impl = Systems.getInstance(system);
final String info = impl.delete(new ResourcePath(res... | class class_name[name] begin[{]
method[deleteResource, return_type[type[Response]], modifier[public], parameter[system, resource, headers]] begin[{]
local_variable[type[JaxRx], impl]
local_variable[type[String], info]
return[call[Response.ok, parameter[]]]
end[}]
END[}] | annotation[@] identifier[DELETE] Keyword[public] identifier[Response] identifier[deleteResource] operator[SEP] annotation[@] identifier[PathParam] operator[SEP] identifier[JaxRxConstants] operator[SEP] identifier[SYSTEM] operator[SEP] Keyword[final] identifier[String] identifier[system] , annotation[@] identifier[Path... |
public static base_response add(nitro_service client, lbvserver resource) throws Exception {
lbvserver addresource = new lbvserver();
addresource.name = resource.name;
addresource.servicetype = resource.servicetype;
addresource.ipv46 = resource.ipv46;
addresource.ippattern = resource.ippattern;
addresource.... | class class_name[name] begin[{]
method[add, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{]
local_variable[type[lbvserver], addresource]
assign[member[addresource.name], member[resource.name]]
assign[member[addresource.ser... | Keyword[public] Keyword[static] identifier[base_response] identifier[add] operator[SEP] identifier[nitro_service] identifier[client] , identifier[lbvserver] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[lbvserver] identifier[addresource] operator[=] Keyword[new] identifie... |
@Override
public void setTargetTransportChain(String newTargetTransportChain) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "setTargetTransportChain", newTargetTransportChain);
jcaManagedConnectionFactory.setTargetTransportCh... | class class_name[name] begin[{]
method[setTargetTransportChain, return_type[void], modifier[public], parameter[newTargetTransportChain]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setTargetTransportChain] operator[SEP] identifier[String] identifier[newTargetTransportChain] operator[SEP] Keyword[throws] identifier[JMSException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTra... |
@Override
public <E, R> AppEngineGetScalar<E, R> get(Aggregation<R> aggregation) {
if (aggregation == null) {
throw new IllegalArgumentException("'aggregation' must not be [" + aggregation + "]");
}
return new AppEngineGetScalar<E, R>(aggregation, this);
} | class class_name[name] begin[{]
method[get, return_type[type[AppEngineGetScalar]], modifier[public], parameter[aggregation]] begin[{]
if[binary_operation[member[.aggregation], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Bin... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[E] , identifier[R] operator[>] identifier[AppEngineGetScalar] operator[<] identifier[E] , identifier[R] operator[>] identifier[get] operator[SEP] identifier[Aggregation] operator[<] identifier[R] operator[>] identifier[aggregation] operator[SEP... |
@Override
public Collection<Monitor<?>> getRegisteredMonitors() {
if (updatePending.getAndSet(false)) {
monitorList.set(UnmodifiableList.copyOf(monitors.values()));
}
return monitorList.get();
} | class class_name[name] begin[{]
method[getRegisteredMonitors, return_type[type[Collection]], modifier[public], parameter[]] begin[{]
if[call[updatePending.getAndSet, parameter[literal[false]]]] begin[{]
call[monitorList.set, parameter[call[UnmodifiableList.copyOf, parame... | annotation[@] identifier[Override] Keyword[public] identifier[Collection] operator[<] identifier[Monitor] operator[<] operator[?] operator[>] operator[>] identifier[getRegisteredMonitors] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[updatePending] operator[SEP] identifier[getAndSet] operato... |
public boolean offer(float value, long timeout, TimeUnit unit)
throws InterruptedException {
// non volatile read ( which is quicker )
final int writeLocation = this.producerWriteLocation;
// sets the nextWriteLocation my moving it on by 1, this may cause it it wrap back to the st... | class class_name[name] begin[{]
method[offer, return_type[type[boolean]], modifier[public], parameter[value, timeout, unit]] begin[{]
local_variable[type[int], writeLocation]
local_variable[type[int], nextWriteLocation]
if[binary_operation[member[.nextWriteLocation], ==, binary_... | Keyword[public] Keyword[boolean] identifier[offer] operator[SEP] Keyword[float] identifier[value] , Keyword[long] identifier[timeout] , identifier[TimeUnit] identifier[unit] operator[SEP] Keyword[throws] identifier[InterruptedException] {
Keyword[final] Keyword[int] identifier[writeLocation] operator[=] Keywor... |
public void restoreState(FacesContext facesContext, Object state)
{
if (state != null)
{
Object values[] = (Object[])state;
_currencyCode = (String)values[0];
_currencySymbol = (String)values[1];
_locale = (Locale)values[2];
Integer value =... | class class_name[name] begin[{]
method[restoreState, return_type[void], modifier[public], parameter[facesContext, state]] begin[{]
if[binary_operation[member[.state], !=, literal[null]]] begin[{]
local_variable[type[Object], values]
assign[member[._currencyCo... | Keyword[public] Keyword[void] identifier[restoreState] operator[SEP] identifier[FacesContext] identifier[facesContext] , identifier[Object] identifier[state] operator[SEP] {
Keyword[if] operator[SEP] identifier[state] operator[!=] Other[null] operator[SEP] {
identifier[Object] identifier[values] oper... |
private void postSave(Group group, boolean isNew) throws Exception
{
for (GroupEventListener listener : listeners)
{
listener.postSave(group, isNew);
}
} | class class_name[name] begin[{]
method[postSave, return_type[void], modifier[private], parameter[group, isNew]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=group, postfix_operators=[], prefix_operato... | Keyword[private] Keyword[void] identifier[postSave] operator[SEP] identifier[Group] identifier[group] , Keyword[boolean] identifier[isNew] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[for] operator[SEP] identifier[GroupEventListener] identifier[listener] operator[:] identifier[listeners] opera... |
public Optional<T> filter(Predicate<? super T> predicate) {
Objects.requireNonNull(predicate);
if (!isPresent())
return this;
else
return predicate.test(value) ? this : empty();
} | class class_name[name] begin[{]
method[filter, return_type[type[Optional]], modifier[public], parameter[predicate]] begin[{]
call[Objects.requireNonNull, parameter[member[.predicate]]]
if[call[.isPresent, parameter[]]] begin[{]
return[THIS[]]
else begin[{]
return[Ternary... | Keyword[public] identifier[Optional] operator[<] identifier[T] operator[>] identifier[filter] operator[SEP] identifier[Predicate] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[predicate] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] ident... |
private void removeFromTable(Node node) {
int last = data.size() - 1;
table[node.index] = table[last];
table[node.index].index = node.index;
table[last] = null;
} | class class_name[name] begin[{]
method[removeFromTable, return_type[void], modifier[private], parameter[node]] begin[{]
local_variable[type[int], last]
assign[member[.table], member[.table]]
assign[member[.table], member[node.index]]
assign[member[.table]... | Keyword[private] Keyword[void] identifier[removeFromTable] operator[SEP] identifier[Node] identifier[node] operator[SEP] {
Keyword[int] identifier[last] operator[=] identifier[data] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[table] operator[SEP] ident... |
public String getStringOf(final String param, final List<String> possibleValues) {
checkNotNull(possibleValues);
checkArgument(!possibleValues.isEmpty());
final String value = getString(param);
if (possibleValues.contains(value)) {
return value;
} else {
throw new InvalidEnumeratedProp... | class class_name[name] begin[{]
method[getStringOf, return_type[type[String]], modifier[public], parameter[param, possibleValues]] begin[{]
call[.checkNotNull, parameter[member[.possibleValues]]]
call[.checkArgument, parameter[call[possibleValues.isEmpty, parameter[]]]]
... | Keyword[public] identifier[String] identifier[getStringOf] operator[SEP] Keyword[final] identifier[String] identifier[param] , Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[possibleValues] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[possibleValues] o... |
private void doWrite(SelectionKey key) throws IOException {
WebSocketImpl conn = (WebSocketImpl) key.attachment();
if( SocketChannelIOHelper.batch( conn, conn.getChannel() ) ) {
if( key.isValid() ) {
key.interestOps(SelectionKey.OP_READ);
}
}
} | class class_name[name] begin[{]
method[doWrite, return_type[void], modifier[private], parameter[key]] begin[{]
local_variable[type[WebSocketImpl], conn]
if[call[SocketChannelIOHelper.batch, parameter[member[.conn], call[conn.getChannel, parameter[]]]]] begin[{]
i... | Keyword[private] Keyword[void] identifier[doWrite] operator[SEP] identifier[SelectionKey] identifier[key] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[WebSocketImpl] identifier[conn] operator[=] operator[SEP] identifier[WebSocketImpl] operator[SEP] identifier[key] operator[SEP] identifier[a... |
public void setLoadBalancerAddresses(java.util.Collection<LoadBalancerAddress> loadBalancerAddresses) {
if (loadBalancerAddresses == null) {
this.loadBalancerAddresses = null;
return;
}
this.loadBalancerAddresses = new java.util.ArrayList<LoadBalancerAddress>(loadBalance... | class class_name[name] begin[{]
method[setLoadBalancerAddresses, return_type[void], modifier[public], parameter[loadBalancerAddresses]] begin[{]
if[binary_operation[member[.loadBalancerAddresses], ==, literal[null]]] begin[{]
assign[THIS[member[None.loadBalancerAddresses... | Keyword[public] Keyword[void] identifier[setLoadBalancerAddresses] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[LoadBalancerAddress] operator[>] identifier[loadBalancerAddresses] operator[SEP] {
Keyword[if] operator[SEP] identifier[load... |
public void marshall(GitConfigForUpdate gitConfigForUpdate, ProtocolMarshaller protocolMarshaller) {
if (gitConfigForUpdate == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(gitConfigForUpdate.getSec... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[gitConfigForUpdate, protocolMarshaller]] begin[{]
if[binary_operation[member[.gitConfigForUpdate], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(p... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GitConfigForUpdate] identifier[gitConfigForUpdate] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[gitConfigForUpdate] operator[==] Other[null] operator[SEP] {
... |
private boolean checkNlTin(final String ptin) {
final int checkSum = ptin.charAt(8) - '0';
int sum = 0;
for (int i = 0; i < ptin.length() - 1; i++) {
sum += (ptin.charAt(i) - '0') * (9 - i);
}
sum -= checkSum;
return sum % 11 == 0;
} | class class_name[name] begin[{]
method[checkNlTin, return_type[type[boolean]], modifier[private], parameter[ptin]] begin[{]
local_variable[type[int], checkSum]
local_variable[type[int], sum]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignme... | Keyword[private] Keyword[boolean] identifier[checkNlTin] operator[SEP] Keyword[final] identifier[String] identifier[ptin] operator[SEP] {
Keyword[final] Keyword[int] identifier[checkSum] operator[=] identifier[ptin] operator[SEP] identifier[charAt] operator[SEP] Other[8] operator[SEP] operator[-] literal[String]... |
@Override
public int doEndTag() throws JspException {
String input = null;
// determine the input by...
if (valueSpecified) {
// ... reading 'value' attribute
input = value;
} else {
// ... retrieving and trimming our body
if (bodyCon... | class class_name[name] begin[{]
method[doEndTag, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[String], input]
if[member[.valueSpecified]] begin[{]
assign[member[.input], member[.value]]
else begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[doEndTag] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] {
identifier[String] identifier[input] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[valueSpecified] operator[SEP] {
id... |
public void startHawkularAgent(AgentCoreEngineConfiguration newConfiguration) {
synchronized (agentServiceStatus) {
boolean processStatus = true;
while (processStatus) {
switch (agentServiceStatus.get()) {
case RUNNING: {
retur... | class class_name[name] begin[{]
method[startHawkularAgent, return_type[void], modifier[public], parameter[newConfiguration]] begin[{]
SYNCHRONIZED[member[.agentServiceStatus]] BEGIN[{]
local_variable[type[boolean], processStatus]
while[member[.processStatus]]... | Keyword[public] Keyword[void] identifier[startHawkularAgent] operator[SEP] identifier[AgentCoreEngineConfiguration] identifier[newConfiguration] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[agentServiceStatus] operator[SEP] {
Keyword[boolean] identifier[processStatus] operator[=] lit... |
@Override
void start() throws InitializationException {
if (hsqlServer == null) {
hsqlServer = new Server();
hsqlServer.setLogWriter(null);
hsqlServer.setSilent(true);
hsqlServer.setDatabaseName(0, EMBEDED_DB_NAME);
hsqlServer.setDatabasePath(0, "f... | class class_name[name] begin[{]
method[start, return_type[void], modifier[default], parameter[]] begin[{]
if[binary_operation[member[.hsqlServer], ==, literal[null]]] begin[{]
assign[member[.hsqlServer], ClassCreator(arguments=[], body=None, constructor_type_arguments=No... | annotation[@] identifier[Override] Keyword[void] identifier[start] operator[SEP] operator[SEP] Keyword[throws] identifier[InitializationException] {
Keyword[if] operator[SEP] identifier[hsqlServer] operator[==] Other[null] operator[SEP] {
identifier[hsqlServer] operator[=] Keyword[new] identifier[Serv... |
void append(String s) throws IOException {
if (closed) throw new IllegalStateException("closed");
if (nextFlush != null) {
int nextNewline = s.indexOf('\n');
// If s doesn't cause the current line to cross the limit, buffer it and return. We'll decide
// whether or not we have to wrap it lat... | class class_name[name] begin[{]
method[append, return_type[void], modifier[default], parameter[s]] begin[{]
if[member[.closed]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="closed")], body=None... | Keyword[void] identifier[append] operator[SEP] identifier[String] identifier[s] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[closed] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP... |
@Override
public void generateError(String response) {
extractParameter(response, MESSAGE_REGEX_PATTERN, false);
throw new FacebookAccessTokenErrorResponse(extractParameter(response, MESSAGE_REGEX_PATTERN, false),
extractParameter(response, TYPE_REGEX_PATTERN, false),
... | class class_name[name] begin[{]
method[generateError, return_type[void], modifier[public], parameter[response]] begin[{]
call[.extractParameter, parameter[member[.response], member[.MESSAGE_REGEX_PATTERN], literal[false]]]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocati... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[generateError] operator[SEP] identifier[String] identifier[response] operator[SEP] {
identifier[extractParameter] operator[SEP] identifier[response] , identifier[MESSAGE_REGEX_PATTERN] , literal[boolean] operator[SEP] operator[SEP] Key... |
public List<Motion> findCameraMotions(Camera target , @Nullable List<Motion> storage ) {
if( storage == null )
storage = new ArrayList<>();
for (int i = 0; i < edges.size(); i++) {
Motion m = edges.get(i);
if( m.viewSrc.camera == target && m.viewDst.camera == target ) {
storage.add(m);
}
}
ret... | class class_name[name] begin[{]
method[findCameraMotions, return_type[type[List]], modifier[public], parameter[target, storage]] begin[{]
if[binary_operation[member[.storage], ==, literal[null]]] begin[{]
assign[member[.storage], ClassCreator(arguments=[], body=None, constructor_typ... | Keyword[public] identifier[List] operator[<] identifier[Motion] operator[>] identifier[findCameraMotions] operator[SEP] identifier[Camera] identifier[target] , annotation[@] identifier[Nullable] identifier[List] operator[<] identifier[Motion] operator[>] identifier[storage] operator[SEP] {
Keyword[if] operator[... |
private static double purge(int ll, double[][] Q, double[] r, double[] q, double[] ra, double[] qa, double[] eta, double[] oldeta, int step, double rnm, double tol, double eps, double reps) {
if (step < ll + 2) {
return rnm;
}
double t, tq, tr;
int k = idamax(step - (ll + 1)... | class class_name[name] begin[{]
method[purge, return_type[type[double]], modifier[private static], parameter[ll, Q, r, q, ra, qa, eta, oldeta, step, rnm, tol, eps, reps]] begin[{]
if[binary_operation[member[.step], <, binary_operation[member[.ll], +, literal[2]]]] begin[{]
return[me... | Keyword[private] Keyword[static] Keyword[double] identifier[purge] operator[SEP] Keyword[int] identifier[ll] , Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Q] , Keyword[double] operator[SEP] operator[SEP] identifier[r] , Keyword[double] operator[SEP] operator[SEP] identifier[q] ... |
private void addToWrapper(EntityMetadata entityMetadata, AttributeWrapper wrapper, Object embeddedObject,
Attribute attrib, Attribute embeddedAttrib)
{
if (embeddedObject == null)
{
return;
}
byte[] value = PropertyAccessorHelper.get(embeddedObject, (... | class class_name[name] begin[{]
method[addToWrapper, return_type[void], modifier[private], parameter[entityMetadata, wrapper, embeddedObject, attrib, embeddedAttrib]] begin[{]
if[binary_operation[member[.embeddedObject], ==, literal[null]]] begin[{]
return[None]
else begin[{... | Keyword[private] Keyword[void] identifier[addToWrapper] operator[SEP] identifier[EntityMetadata] identifier[entityMetadata] , identifier[AttributeWrapper] identifier[wrapper] , identifier[Object] identifier[embeddedObject] , identifier[Attribute] identifier[attrib] , identifier[Attribute] identifier[embeddedAttrib]... |
@Override
public void fit(Dataframe trainingData) {
Set<TypeInference.DataType> supportedXDataTypes = getSupportedXDataTypes();
for(TypeInference.DataType d : trainingData.getXDataTypes().values()) {
if(!supportedXDataTypes.contains(d)) {
throw new IllegalArgumentExceptio... | class class_name[name] begin[{]
method[fit, return_type[void], modifier[public], parameter[trainingData]] begin[{]
local_variable[type[Set], supportedXDataTypes]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=d, ... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[fit] operator[SEP] identifier[Dataframe] identifier[trainingData] operator[SEP] {
identifier[Set] operator[<] identifier[TypeInference] operator[SEP] identifier[DataType] operator[>] identifier[supportedXDataTypes] operator[=] identifier... |
public DescribeTerminationPolicyTypesResult withTerminationPolicyTypes(String... terminationPolicyTypes) {
if (this.terminationPolicyTypes == null) {
setTerminationPolicyTypes(new com.amazonaws.internal.SdkInternalList<String>(terminationPolicyTypes.length));
}
for (String ele : term... | class class_name[name] begin[{]
method[withTerminationPolicyTypes, return_type[type[DescribeTerminationPolicyTypesResult]], modifier[public], parameter[terminationPolicyTypes]] begin[{]
if[binary_operation[THIS[member[None.terminationPolicyTypes]], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[DescribeTerminationPolicyTypesResult] identifier[withTerminationPolicyTypes] operator[SEP] identifier[String] operator[...] identifier[terminationPolicyTypes] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[terminationPolicyTypes] operator[==] Other[nul... |
public Throwable getMostSpecificCause()
{
Throwable rootCause = null;
Throwable cause = getCause();
while (cause != null && cause != rootCause) {
rootCause = cause;
cause = cause.getCause();
}
return (rootCause == null ? this : rootCause);
} | class class_name[name] begin[{]
method[getMostSpecificCause, return_type[type[Throwable]], modifier[public], parameter[]] begin[{]
local_variable[type[Throwable], rootCause]
local_variable[type[Throwable], cause]
while[binary_operation[binary_operation[member[.cause], !=, litera... | Keyword[public] identifier[Throwable] identifier[getMostSpecificCause] operator[SEP] operator[SEP] {
identifier[Throwable] identifier[rootCause] operator[=] Other[null] operator[SEP] identifier[Throwable] identifier[cause] operator[=] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] Keyword[while] ... |
public float bFlat(float y, float A, float B, float C) {
float tmp1 = Math.min((float) 0, (float) Math.floor(y - B)) * A * (B - y) / B;
float tmp2 = Math.min((float) 0, (float) Math.floor(C - y)) * (1 - A) * (y - C) / (1 - C);
return correctTo01(A + tmp1 - tmp2);
} | class class_name[name] begin[{]
method[bFlat, return_type[type[float]], modifier[public], parameter[y, A, B, C]] begin[{]
local_variable[type[float], tmp1]
local_variable[type[float], tmp2]
return[call[.correctTo01, parameter[binary_operation[binary_operation[member[.A], +, member[.tmp1... | Keyword[public] Keyword[float] identifier[bFlat] operator[SEP] Keyword[float] identifier[y] , Keyword[float] identifier[A] , Keyword[float] identifier[B] , Keyword[float] identifier[C] operator[SEP] {
Keyword[float] identifier[tmp1] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] oper... |
@Nullable
protected List<Match> addLegacyMatches(List <Match> existingSugMatches, String messageStr,
boolean inMessage) {
List<Match> sugMatch = new ArrayList<>();
int pos = 0;
int ind = 0;
int matchCounter = 0;
while (pos != -1) {
pos = messageStr.indexOf('\\', ind);
if (pos != ... | class class_name[name] begin[{]
method[addLegacyMatches, return_type[type[List]], modifier[protected], parameter[existingSugMatches, messageStr, inMessage]] begin[{]
local_variable[type[List], sugMatch]
local_variable[type[int], pos]
local_variable[type[int], ind]
local_variable... | annotation[@] identifier[Nullable] Keyword[protected] identifier[List] operator[<] identifier[Match] operator[>] identifier[addLegacyMatches] operator[SEP] identifier[List] operator[<] identifier[Match] operator[>] identifier[existingSugMatches] , identifier[String] identifier[messageStr] , Keyword[boolean] identifie... |
public static <T> T median(final T a, final T b, final T c, Comparator<? super T> cmp) {
cmp = cmp == null ? NATURAL_ORDER : cmp;
int ab = cmp.compare(a, b);
int ac = cmp.compare(a, c);
int bc = 0;
if ((ab >= 0 && ac <= 0) || (ac >= 0 && ab <= 0)) {
return a... | class class_name[name] begin[{]
method[median, return_type[type[T]], modifier[public static], parameter[a, b, c, cmp]] begin[{]
assign[member[.cmp], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=cmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[median] operator[SEP] Keyword[final] identifier[T] identifier[a] , Keyword[final] identifier[T] identifier[b] , Keyword[final] identifier[T] identifier[c] , identifier[Comparator] operator[<] operator[?] Keyword[super] ide... |
@Override
public Fingerprint resolve(Double sparsity, Model model) throws JsonProcessingException, ApiException {
validateRequiredModels(model);
LOG.debug("Resolve expression for model: " + model.toJson());
return this.expressionsApi.resolveExpression(model.toJson(), retinaName, sparsity);
... | class class_name[name] begin[{]
method[resolve, return_type[type[Fingerprint]], modifier[public], parameter[sparsity, model]] begin[{]
call[.validateRequiredModels, parameter[member[.model]]]
call[LOG.debug, parameter[binary_operation[literal["Resolve expression for model: "], +... | annotation[@] identifier[Override] Keyword[public] identifier[Fingerprint] identifier[resolve] operator[SEP] identifier[Double] identifier[sparsity] , identifier[Model] identifier[model] operator[SEP] Keyword[throws] identifier[JsonProcessingException] , identifier[ApiException] {
identifier[validateRequiredMo... |
public Double getDoubleFrom(JsonValue json) {
if (json.isNumber()) {
return json.asDouble();
} else {
return Double.valueOf(json.asString());
}
} | class class_name[name] begin[{]
method[getDoubleFrom, return_type[type[Double]], modifier[public], parameter[json]] begin[{]
if[call[json.isNumber, parameter[]]] begin[{]
return[call[json.asDouble, parameter[]]]
else begin[{]
return[call[Double.valueOf, parameter... | Keyword[public] identifier[Double] identifier[getDoubleFrom] operator[SEP] identifier[JsonValue] identifier[json] operator[SEP] {
Keyword[if] operator[SEP] identifier[json] operator[SEP] identifier[isNumber] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[json] operator[SEP] ide... |
public static CouchbaseCluster create(final List<String> nodes) {
return new CouchbaseCluster(
DefaultCouchbaseEnvironment.create(),
ConnectionString.fromHostnames(nodes),
false
);
} | class class_name[name] begin[{]
method[create, return_type[type[CouchbaseCluster]], modifier[public static], parameter[nodes]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=create, postfix_operators=[], prefix_operators=[], qualifier=DefaultCouchbaseEnvironment, selector... | Keyword[public] Keyword[static] identifier[CouchbaseCluster] identifier[create] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[nodes] operator[SEP] {
Keyword[return] Keyword[new] identifier[CouchbaseCluster] operator[SEP] identifier[DefaultCouchbaseEnvironment... |
public static String signature(String endpoint, Map<String, String> params, String clientSecret) throws InstagramException {
SecretKeySpec keySpec = new SecretKeySpec(clientSecret.getBytes(UTF_8), HMAC_SHA256);
// ensure we iterate through the keys in sorted order
List<String> values = new Arra... | class class_name[name] begin[{]
method[signature, return_type[type[String]], modifier[public static], parameter[endpoint, params, clientSecret]] begin[{]
local_variable[type[SecretKeySpec], keySpec]
local_variable[type[List], values]
ForStatement(body=BlockStatement(label=None, statemen... | Keyword[public] Keyword[static] identifier[String] identifier[signature] operator[SEP] identifier[String] identifier[endpoint] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] , identifier[String] identifier[clientSecret] operator[SEP] Keyword[throws] identifier[In... |
private void executeConnectionLostDetection(WebSocket webSocket, long minimumPongTime) {
if (!(webSocket instanceof WebSocketImpl)) {
return;
}
WebSocketImpl webSocketImpl = (WebSocketImpl) webSocket;
if( webSocketImpl.getLastPong() < minimumPongTime ) {
log.trace("Closing connection due to no pong receiv... | class class_name[name] begin[{]
method[executeConnectionLostDetection, return_type[void], modifier[private], parameter[webSocket, minimumPongTime]] begin[{]
if[binary_operation[member[.webSocket], instanceof, type[WebSocketImpl]]] begin[{]
return[None]
else begin[{]
None
... | Keyword[private] Keyword[void] identifier[executeConnectionLostDetection] operator[SEP] identifier[WebSocket] identifier[webSocket] , Keyword[long] identifier[minimumPongTime] operator[SEP] {
Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[webSocket] Keyword[instanceof] identifier[WebSocketImpl] ... |
public static String drpcPids(Map conf) throws IOException {
String ret = drpc_local_dir(conf) + FILE_SEPERATEOR + "pids";
try {
FileUtils.forceMkdir(new File(ret));
} catch (IOException e) {
LOG.error("Failed to create dir " + ret, e);
throw e;
}
... | class class_name[name] begin[{]
method[drpcPids, return_type[type[String]], modifier[public static], parameter[conf]] begin[{]
local_variable[type[String], ret]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=ret, pos... | Keyword[public] Keyword[static] identifier[String] identifier[drpcPids] operator[SEP] identifier[Map] identifier[conf] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[ret] operator[=] identifier[drpc_local_dir] operator[SEP] identifier[conf] operator[SEP] operator[+] identif... |
public static void prepare(IAtomContainer container, boolean ringQuery) {
if (ringQuery) {
SMARTSAtomInvariants.configureDaylightWithRingInfo(container);
} else {
SMARTSAtomInvariants.configureDaylightWithoutRingInfo(container);
}
} | class class_name[name] begin[{]
method[prepare, return_type[void], modifier[public static], parameter[container, ringQuery]] begin[{]
if[member[.ringQuery]] begin[{]
call[SMARTSAtomInvariants.configureDaylightWithRingInfo, parameter[member[.container]]]
else begi... | Keyword[public] Keyword[static] Keyword[void] identifier[prepare] operator[SEP] identifier[IAtomContainer] identifier[container] , Keyword[boolean] identifier[ringQuery] operator[SEP] {
Keyword[if] operator[SEP] identifier[ringQuery] operator[SEP] {
identifier[SMARTSAtomInvariants] operator[SEP] iden... |
public GetUserInfoListResponse getUserInfoList(List<UserInfo> userInfoList){
String url = BASE_API_URL + "cgi-bin/user/info/batchget?access_token=#";
Map<String, List<UserInfo>> param = new HashMap<String, List<UserInfo>>();
param.put("user_list", userInfoList);
BaseResponse r=executePos... | class class_name[name] begin[{]
method[getUserInfoList, return_type[type[GetUserInfoListResponse]], modifier[public], parameter[userInfoList]] begin[{]
local_variable[type[String], url]
local_variable[type[Map], param]
call[param.put, parameter[literal["user_list"], member[.user... | Keyword[public] identifier[GetUserInfoListResponse] identifier[getUserInfoList] operator[SEP] identifier[List] operator[<] identifier[UserInfo] operator[>] identifier[userInfoList] operator[SEP] {
identifier[String] identifier[url] operator[=] identifier[BASE_API_URL] operator[+] literal[String] operator[SEP] id... |
@Override
public CPDisplayLayout findByC_C(long classNameId, long classPK)
throws NoSuchCPDisplayLayoutException {
CPDisplayLayout cpDisplayLayout = fetchByC_C(classNameId, classPK);
if (cpDisplayLayout == null) {
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.app... | class class_name[name] begin[{]
method[findByC_C, return_type[type[CPDisplayLayout]], modifier[public], parameter[classNameId, classPK]] begin[{]
local_variable[type[CPDisplayLayout], cpDisplayLayout]
if[binary_operation[member[.cpDisplayLayout], ==, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] identifier[CPDisplayLayout] identifier[findByC_C] operator[SEP] Keyword[long] identifier[classNameId] , Keyword[long] identifier[classPK] operator[SEP] Keyword[throws] identifier[NoSuchCPDisplayLayoutException] {
identifier[CPDisplayLayout] identifier[cpDisplay... |
public static Class<?> getRawType(Type type, Class<?> implClass) {
if (type instanceof Class) {
return (Class<?>) type;
}
if (type instanceof ParameterizedType) {
ParameterizedType pType = (ParameterizedType) type;
return getRawType(pType.getRawType(), implCla... | class class_name[name] begin[{]
method[getRawType, return_type[type[Class]], modifier[public static], parameter[type, implClass]] begin[{]
if[binary_operation[member[.type], instanceof, type[Class]]] begin[{]
return[Cast(expression=MemberReference(member=type, postfix_operators=[], ... | Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[getRawType] operator[SEP] identifier[Type] identifier[type] , identifier[Class] operator[<] operator[?] operator[>] identifier[implClass] operator[SEP] {
Keyword[if] operator[SEP] identifier[type] Keyword[instanceof... |
public static String formatDate(final int style, final Date value)
{
return context.get().formatDate(style, value);
} | class class_name[name] begin[{]
method[formatDate, return_type[type[String]], modifier[public static], parameter[style, value]] begin[{]
return[call[context.get, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[formatDate] operator[SEP] Keyword[final] Keyword[int] identifier[style] , Keyword[final] identifier[Date] identifier[value] operator[SEP] {
Keyword[return] identifier[context] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] id... |
public static int checkedMultiply(int a, int b) {
long result = (long) a * b;
checkNoOverflow(result == (int) result);
return (int) result;
} | class class_name[name] begin[{]
method[checkedMultiply, return_type[type[int]], modifier[public static], parameter[a, b]] begin[{]
local_variable[type[long], result]
call[.checkNoOverflow, parameter[binary_operation[member[.result], ==, Cast(expression=MemberReference(member=result, pos... | Keyword[public] Keyword[static] Keyword[int] identifier[checkedMultiply] operator[SEP] Keyword[int] identifier[a] , Keyword[int] identifier[b] operator[SEP] {
Keyword[long] identifier[result] operator[=] operator[SEP] Keyword[long] operator[SEP] identifier[a] operator[*] identifier[b] operator[SEP] identifier[c... |
public NumberExpression<Integer> indexOf(Expression<String> str) {
return Expressions.numberOperation(Integer.class, Ops.INDEX_OF, mixin, str);
} | class class_name[name] begin[{]
method[indexOf, return_type[type[NumberExpression]], modifier[public], parameter[str]] begin[{]
return[call[Expressions.numberOperation, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimen... | Keyword[public] identifier[NumberExpression] operator[<] identifier[Integer] operator[>] identifier[indexOf] operator[SEP] identifier[Expression] operator[<] identifier[String] operator[>] identifier[str] operator[SEP] {
Keyword[return] identifier[Expressions] operator[SEP] identifier[numberOperation] operator[S... |
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@NonNull
public final <R> Observable<R> switchMapSingleDelayError(@NonNull Function<? super T, ? extends SingleSource<? extends R>> mapper) {
ObjectHelper.requireNonNull(mapper, "mapper is null");
return RxJavaPlugins.onAssembly(new ... | class class_name[name] begin[{]
method[switchMapSingleDelayError, return_type[type[Observable]], modifier[final public], parameter[mapper]] begin[{]
call[ObjectHelper.requireNonNull, parameter[member[.mapper], literal["mapper is null"]]]
return[call[RxJavaPlugins.onAssembly, parameter[C... | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] annotation[@] identifier[NonNull] Keyword[public] Keyword[final] operator[<] identifier[R] operator[>] identifier[Observable] operator[<] identifi... |
public boolean checkSuffixes(String uri, String[] patterns) {
for (String pattern : patterns) {
if (pattern.length() > 0) {
if (uri.endsWith(pattern)) {
return true;
}
}
}
return false;
} | class class_name[name] begin[{]
method[checkSuffixes, return_type[type[boolean]], modifier[public], parameter[uri, patterns]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=... | Keyword[public] Keyword[boolean] identifier[checkSuffixes] operator[SEP] identifier[String] identifier[uri] , identifier[String] operator[SEP] operator[SEP] identifier[patterns] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[pattern] operator[:] identifier[patterns] operator[SEP] {
... |
private int computeDifficulty(Operation left)
{
int difficulty = 0;
if (left instanceof MappedOperation)
{
difficulty = 10*getMappingDepth(left);
}
return difficulty;
} | class class_name[name] begin[{]
method[computeDifficulty, return_type[type[int]], modifier[private], parameter[left]] begin[{]
local_variable[type[int], difficulty]
if[binary_operation[member[.left], instanceof, type[MappedOperation]]] begin[{]
assign[member[.dif... | Keyword[private] Keyword[int] identifier[computeDifficulty] operator[SEP] identifier[Operation] identifier[left] operator[SEP] {
Keyword[int] identifier[difficulty] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[left] Keyword[instanceof] identifier[MappedOperation] operator[SEP] {
... |
public Observable<ServiceResponse<HierarchicalEntityExtractor>> getHierarchicalEntityWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
... | class class_name[name] begin[{]
method[getHierarchicalEntityWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[appId, versionId, hEntityId]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.endpoint, parameter[]]], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[HierarchicalEntityExtractor] operator[>] operator[>] identifier[getHierarchicalEntityWithServiceResponseAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[... |
public static List<CommerceDiscount> findByG_C(long groupId,
String couponCode) {
return getPersistence().findByG_C(groupId, couponCode);
} | class class_name[name] begin[{]
method[findByG_C, return_type[type[List]], modifier[public static], parameter[groupId, couponCode]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CommerceDiscount] operator[>] identifier[findByG_C] operator[SEP] Keyword[long] identifier[groupId] , identifier[String] identifier[couponCode] operator[SEP] {
Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[... |
static boolean methodsMatch(Method m1, Method m2)
{
if (m1 == m2)
{
return true;
}
else if (m1.getName().equals(m2.getName()))
{
Class<?>[] parms1 = m1.getParameterTypes();
Class<?>[] parms2 = m2.getParameterTypes();
if (parms1.... | class class_name[name] begin[{]
method[methodsMatch, return_type[type[boolean]], modifier[static], parameter[m1, m2]] begin[{]
if[binary_operation[member[.m1], ==, member[.m2]]] begin[{]
return[literal[true]]
else begin[{]
if[call[m1.getName, parameter[]]] begin[... | Keyword[static] Keyword[boolean] identifier[methodsMatch] operator[SEP] identifier[Method] identifier[m1] , identifier[Method] identifier[m2] operator[SEP] {
Keyword[if] operator[SEP] identifier[m1] operator[==] identifier[m2] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
... |
public EnumSet<Block.VerifyFlag> getBlockVerificationFlags(final Block block,
final VersionTally tally, final Integer height) {
final EnumSet<Block.VerifyFlag> flags = EnumSet.noneOf(Block.VerifyFlag.class);
if (block.isBIP34()) {
final Integer count = tally.getCountAtOrAbove(Bl... | class class_name[name] begin[{]
method[getBlockVerificationFlags, return_type[type[EnumSet]], modifier[public], parameter[block, tally, height]] begin[{]
local_variable[type[EnumSet], flags]
if[call[block.isBIP34, parameter[]]] begin[{]
local_variable[type[Integer], count]
... | Keyword[public] identifier[EnumSet] operator[<] identifier[Block] operator[SEP] identifier[VerifyFlag] operator[>] identifier[getBlockVerificationFlags] operator[SEP] Keyword[final] identifier[Block] identifier[block] , Keyword[final] identifier[VersionTally] identifier[tally] , Keyword[final] identifier[Integer] ide... |
private static List<Word> selectBest(List<List<Word>> candidateWords){
if(LOGGER.isDebugEnabled()) {
LOGGER.debug("开始从多个识别结果中选择一个最佳的结果:{}", candidateWords);
}
Map<List<Word>, Integer> map = new ConcurrentHashMap<>();
AtomicInteger i = new AtomicInteger();
candidateWor... | class class_name[name] begin[{]
method[selectBest, return_type[type[List]], modifier[private static], parameter[candidateWords]] begin[{]
if[call[LOGGER.isDebugEnabled, parameter[]]] begin[{]
call[LOGGER.debug, parameter[literal["开始从多个识别结果中选择一个最佳的结果:{}"], member[.candida... | Keyword[private] Keyword[static] identifier[List] operator[<] identifier[Word] operator[>] identifier[selectBest] operator[SEP] identifier[List] operator[<] identifier[List] operator[<] identifier[Word] operator[>] operator[>] identifier[candidateWords] operator[SEP] {
Keyword[if] operator[SEP] identifier[LOGGER... |
public static Message buildSyncEnd(ClusterConfiguration config) {
ZabMessage.Zxid version = toProtoZxid(config.getVersion());
ZabMessage.ClusterConfiguration zConfig
= ZabMessage.ClusterConfiguration.newBuilder()
.setVersion(version)
... | class class_name[name] begin[{]
method[buildSyncEnd, return_type[type[Message]], modifier[public static], parameter[config]] begin[{]
local_variable[type[ZabMessage], version]
local_variable[type[ZabMessage], zConfig]
return[call[Message.newBuilder, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Message] identifier[buildSyncEnd] operator[SEP] identifier[ClusterConfiguration] identifier[config] operator[SEP] {
identifier[ZabMessage] operator[SEP] identifier[Zxid] identifier[version] operator[=] identifier[toProtoZxid] operator[SEP] identifier[config] operator[SE... |
public void initServices() {
initService(repositoryService);
initService(runtimeService);
initService(historyService);
initService(taskService);
initService(managementService);
initService(dynamicBpmnService);
} | class class_name[name] begin[{]
method[initServices, return_type[void], modifier[public], parameter[]] begin[{]
call[.initService, parameter[member[.repositoryService]]]
call[.initService, parameter[member[.runtimeService]]]
call[.initService, parameter[member[.h... | Keyword[public] Keyword[void] identifier[initServices] operator[SEP] operator[SEP] {
identifier[initService] operator[SEP] identifier[repositoryService] operator[SEP] operator[SEP] identifier[initService] operator[SEP] identifier[runtimeService] operator[SEP] operator[SEP] identifier[initService] operator[SEP] i... |
public Program getGenericProgram(Channel channel) {
TvContentRating rating = RATING_PG;
return new Program.Builder()
.setTitle(channel.getName() + " Live")
.setProgramId(channel.getServiceId())
// .setEpisodeNumber(1)
// .setSeasonNumber(1)
/... | class class_name[name] begin[{]
method[getGenericProgram, return_type[type[Program]], modifier[public], parameter[channel]] begin[{]
local_variable[type[TvContentRating], rating]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators... | Keyword[public] identifier[Program] identifier[getGenericProgram] operator[SEP] identifier[Channel] identifier[channel] operator[SEP] {
identifier[TvContentRating] identifier[rating] operator[=] identifier[RATING_PG] operator[SEP] Keyword[return] Keyword[new] identifier[Program] operator[SEP] identifier[Builder]... |
private DoubleArrayResult arrangingEnergy(ArrayList<Double> array) {
DoubleArrayResult results = new DoubleArrayResult();
int count = array.size();
for (int i = 0; i < count; i++) {
double min = array.get(0);
int pos = 0;
for (int j = 0; j < array.size(); j++... | class class_name[name] begin[{]
method[arrangingEnergy, return_type[type[DoubleArrayResult]], modifier[private], parameter[array]] begin[{]
local_variable[type[DoubleArrayResult], results]
local_variable[type[int], count]
ForStatement(body=BlockStatement(label=None, statements=[LocalVar... | Keyword[private] identifier[DoubleArrayResult] identifier[arrangingEnergy] operator[SEP] identifier[ArrayList] operator[<] identifier[Double] operator[>] identifier[array] operator[SEP] {
identifier[DoubleArrayResult] identifier[results] operator[=] Keyword[new] identifier[DoubleArrayResult] operator[SEP] operat... |
public static boolean isChar(char c) {
return Character.isDigit(c)||Character.isLowerCase(c)||Character.isUpperCase(c);
} | class class_name[name] begin[{]
method[isChar, return_type[type[boolean]], modifier[public static], parameter[c]] begin[{]
return[binary_operation[binary_operation[call[Character.isDigit, parameter[member[.c]]], ||, call[Character.isLowerCase, parameter[member[.c]]]], ||, call[Character.isUpperCase, pa... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isChar] operator[SEP] Keyword[char] identifier[c] operator[SEP] {
Keyword[return] identifier[Character] operator[SEP] identifier[isDigit] operator[SEP] identifier[c] operator[SEP] operator[||] identifier[Character] operator[SEP] identifier[isLowerCase] ... |
public static Locale parseLocaleAttributeValue(Object stringOrLocale) {
if (stringOrLocale instanceof Locale) {
return (Locale) stringOrLocale;
} else if (stringOrLocale instanceof String) {
String string = (String) stringOrLocale;
if (string.length() == 0) {
... | class class_name[name] begin[{]
method[parseLocaleAttributeValue, return_type[type[Locale]], modifier[public static], parameter[stringOrLocale]] begin[{]
if[binary_operation[member[.stringOrLocale], instanceof, type[Locale]]] begin[{]
return[Cast(expression=MemberReference(member=st... | Keyword[public] Keyword[static] identifier[Locale] identifier[parseLocaleAttributeValue] operator[SEP] identifier[Object] identifier[stringOrLocale] operator[SEP] {
Keyword[if] operator[SEP] identifier[stringOrLocale] Keyword[instanceof] identifier[Locale] operator[SEP] {
Keyword[return] operator[SEP]... |
public com.google.api.ads.admanager.axis.v201805.ProductSegmentation getProductSegmentation() {
return productSegmentation;
} | class class_name[name] begin[{]
method[getProductSegmentation, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[member[.productSegmentation]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201805] operator[SEP] identifier[ProductSegmentation] identifier[getProductSegmentation] operator[SEP]... |
public void addObjects(List[] objects)
{
if (tc.isEntryEnabled())
tc.entry(this,cclass, "addObjects", "objects: " + objects);
if (delegate != null)
delegate.addObjects(objects);
if (tc.isEntryEnabled())
tc.exit(this,cclass, "addObjects");
} | class class_name[name] begin[{]
method[addObjects, return_type[void], modifier[public], parameter[objects]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[tc.entry, parameter[THIS[], member[.cclass], literal["addObjects"], binary_operation[literal["objects: "], +, m... | Keyword[public] Keyword[void] identifier[addObjects] operator[SEP] identifier[List] operator[SEP] operator[SEP] identifier[objects] operator[SEP] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[tc] operator[SEP] identifier[e... |
public static <T> Consumer<T> pipeline(Consumer<T>... actions) {
return new PipelinedConsumer<T>(Iterations.iterable(actions));
} | class class_name[name] begin[{]
method[pipeline, return_type[type[Consumer]], modifier[public static], parameter[actions]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=actions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=it... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Consumer] operator[<] identifier[T] operator[>] identifier[pipeline] operator[SEP] identifier[Consumer] operator[<] identifier[T] operator[>] operator[...] identifier[actions] operator[SEP] {
Keyword[return] Keyword[new] identifier[... |
@Override
public boolean tryAssignPayload(Payload payload) {
Preconditions.checkNotNull(payload);
// check that we can actually run in this slot
if (isCanceled()) {
return false;
}
// atomically assign the vertex
if (!PAYLOAD_UPDATER.compareAndSet(this, null, payload)) {
return false;
}
// we ... | class class_name[name] begin[{]
method[tryAssignPayload, return_type[type[boolean]], modifier[public], parameter[payload]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.payload]]]
if[call[.isCanceled, parameter[]]] begin[{]
return[literal[false]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[tryAssignPayload] operator[SEP] identifier[Payload] identifier[payload] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[payload] operator[SEP] operator[SEP] Keyword[if] operato... |
@Nullable
@ThriftField(value = 1, requiredness = OPTIONAL)
public Map<String, PrestoThriftDomain> getDomains()
{
return domains;
} | class class_name[name] begin[{]
method[getDomains, return_type[type[Map]], modifier[public], parameter[]] begin[{]
return[member[.domains]]
end[}]
END[}] | annotation[@] identifier[Nullable] annotation[@] identifier[ThriftField] operator[SEP] identifier[value] operator[=] Other[1] , identifier[requiredness] operator[=] identifier[OPTIONAL] operator[SEP] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[PrestoThriftDomain] operator[>] identifier... |
private ParseTree parseObjectLiteral() {
SourcePosition start = getTreeStartLocation();
ImmutableList.Builder<ParseTree> result = ImmutableList.builder();
eat(TokenType.OPEN_CURLY);
Token commaToken = null;
while (peek(TokenType.SPREAD)
|| peekPropertyNameOrComputedProp(0)
|| peek(T... | class class_name[name] begin[{]
method[parseObjectLiteral, return_type[type[ParseTree]], modifier[private], parameter[]] begin[{]
local_variable[type[SourcePosition], start]
local_variable[type[ImmutableList], result]
call[.eat, parameter[member[TokenType.OPEN_CURLY]]]
l... | Keyword[private] identifier[ParseTree] identifier[parseObjectLiteral] operator[SEP] operator[SEP] {
identifier[SourcePosition] identifier[start] operator[=] identifier[getTreeStartLocation] operator[SEP] operator[SEP] operator[SEP] identifier[ImmutableList] operator[SEP] identifier[Builder] operator[<] identifie... |
public static boolean isJsp21(ServletContext context)
{
//if running on GAE, treat like it is JSP 2.0
if(isRunningOnGoogleAppEngine(context))
{
return false;
}
try
{
// simply check if the class JspApplicationContext is available
... | class class_name[name] begin[{]
method[isJsp21, return_type[type[boolean]], modifier[public static], parameter[context]] begin[{]
if[call[.isRunningOnGoogleAppEngine, parameter[member[.context]]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
TryS... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isJsp21] operator[SEP] identifier[ServletContext] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] identifier[isRunningOnGoogleAppEngine] operator[SEP] identifier[context] operator[SEP] operator[SEP] {
Keyword[return] literal[boo... |
@Implementation(minSdk = P)
protected static void nativeThemeApplyStyle(long ptr, long theme_ptr, @StyleRes int resid,
boolean force) {
// AssetManager is accessed via the theme, so grab an explicit lock here.
CppAssetManager2 assetmanager = AssetManagerFromLong(ptr);
Theme theme = Registries.NATIVE... | class class_name[name] begin[{]
method[nativeThemeApplyStyle, return_type[void], modifier[static protected], parameter[ptr, theme_ptr, resid, force]] begin[{]
local_variable[type[CppAssetManager2], assetmanager]
local_variable[type[Theme], theme]
call[.CHECK, parameter[binary_op... | annotation[@] identifier[Implementation] operator[SEP] identifier[minSdk] operator[=] identifier[P] operator[SEP] Keyword[protected] Keyword[static] Keyword[void] identifier[nativeThemeApplyStyle] operator[SEP] Keyword[long] identifier[ptr] , Keyword[long] identifier[theme_ptr] , annotation[@] identifier[StyleRes] Ke... |
@SuppressWarnings("unchecked")
public static LeafNode getOpenLeafNode(PubSubManager pubSubManager, String nodeName)
throws PubSubException.NotALeafNodeException {
try {
// Get access to the PubSubManager's nodeMap
Field field = pubSubManager.getClass().getDeclaredField(... | class class_name[name] begin[{]
method[getOpenLeafNode, return_type[type[LeafNode]], modifier[public static], parameter[pubSubManager, nodeName]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[LeafNode] identifier[getOpenLeafNode] operator[SEP] identifier[PubSubManager] identifier[pubSubManager] , identifier[String] identifier[nodeName] operator[SEP] Keyword[throws] identifier[Pu... |
public static DMatrixRMaj sumCols(DMatrixRMaj input , DMatrixRMaj output ) {
if( output == null ) {
output = new DMatrixRMaj(1,input.numCols);
} else {
output.reshape(1,input.numCols);
}
for( int cols = 0; cols < input.numCols; cols++ ) {
double total... | class class_name[name] begin[{]
method[sumCols, return_type[type[DMatrixRMaj]], modifier[public static], parameter[input, output]] begin[{]
if[binary_operation[member[.output], ==, literal[null]]] begin[{]
assign[member[.output], ClassCreator(arguments=[Literal(postfix_o... | Keyword[public] Keyword[static] identifier[DMatrixRMaj] identifier[sumCols] operator[SEP] identifier[DMatrixRMaj] identifier[input] , identifier[DMatrixRMaj] identifier[output] operator[SEP] {
Keyword[if] operator[SEP] identifier[output] operator[==] Other[null] operator[SEP] {
identifier[output] ope... |
public static LongBigArrayBigList index(final InputStream in, final ProgressLogger pl) throws IOException {
final LongBigArrayBigList pointers = new LongBigArrayBigList();
long current = 0;
final GZIPArchiveReader gzar = new GZIPArchiveReader(in);
GZIPArchive.ReadEntry re;
for (;;) {
re = gzar.skipEntry();... | class class_name[name] begin[{]
method[index, return_type[type[LongBigArrayBigList]], modifier[public static], parameter[in, pl]] begin[{]
local_variable[type[LongBigArrayBigList], pointers]
local_variable[type[long], current]
local_variable[type[GZIPArchiveReader], gzar]
local_... | Keyword[public] Keyword[static] identifier[LongBigArrayBigList] identifier[index] operator[SEP] Keyword[final] identifier[InputStream] identifier[in] , Keyword[final] identifier[ProgressLogger] identifier[pl] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[LongBigArrayBigList] ... |
public static List getAllPossibleLevels() {
ArrayList list = new ArrayList();
list.add(FINE);
list.add(FINER);
list.add(FINEST);
list.add(INFO);
list.add(CONFIG);
list.add(WARNING);
list.add(SEVERE);
return list;
} | class class_name[name] begin[{]
method[getAllPossibleLevels, return_type[type[List]], modifier[public static], parameter[]] begin[{]
local_variable[type[ArrayList], list]
call[list.add, parameter[member[.FINE]]]
call[list.add, parameter[member[.FINER]]]
c... | Keyword[public] Keyword[static] identifier[List] identifier[getAllPossibleLevels] operator[SEP] operator[SEP] {
identifier[ArrayList] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[F... |
private void processCurrency(Row row)
{
String currencyName = row.getString("curr_short_name");
DecimalFormatSymbols symbols = new DecimalFormatSymbols();
symbols.setDecimalSeparator(row.getString("decimal_symbol").charAt(0));
symbols.setGroupingSeparator(row.getString("digit_group_symbol").c... | class class_name[name] begin[{]
method[processCurrency, return_type[void], modifier[private], parameter[row]] begin[{]
local_variable[type[String], currencyName]
local_variable[type[DecimalFormatSymbols], symbols]
call[symbols.setDecimalSeparator, parameter[call[row.getString, p... | Keyword[private] Keyword[void] identifier[processCurrency] operator[SEP] identifier[Row] identifier[row] operator[SEP] {
identifier[String] identifier[currencyName] operator[=] identifier[row] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[DecimalFormatSy... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.