code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public boolean startProgressMonitorTask( ProgressMonitorTask pmt) {
if (busy) return false;
busy = true;
this.task = pmt;
isCancelled = false;
count = 0;
setIcon(icon[0]);
// create timer, whose events happen on the awt event Thread
ActionListener watcher = new ActionListener() {
... | class class_name[name] begin[{]
method[startProgressMonitorTask, return_type[type[boolean]], modifier[public], parameter[pmt]] begin[{]
if[member[.busy]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
assign[member[.busy], literal[true]]
... | Keyword[public] Keyword[boolean] identifier[startProgressMonitorTask] operator[SEP] identifier[ProgressMonitorTask] identifier[pmt] operator[SEP] {
Keyword[if] operator[SEP] identifier[busy] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[busy] operator[=] literal[boolean] operator[SEP] K... |
public static boolean hasAdjacentDuplicates( Polygon2D_F64 polygon , double tol ) {
for (int i = polygon.vertexes.size()-1,j=0; i >= 0 && polygon.size()>1; j=i,i--) {
if( polygon.get(i).isIdentical(polygon.get(j),tol)) {
return true;
}
}
return false;
} | class class_name[name] begin[{]
method[hasAdjacentDuplicates, return_type[type[boolean]], modifier[public static], parameter[polygon, tol]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[],... | Keyword[public] Keyword[static] Keyword[boolean] identifier[hasAdjacentDuplicates] operator[SEP] identifier[Polygon2D_F64] identifier[polygon] , Keyword[double] identifier[tol] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[polygon] operator[SEP] identifier[vertexes... |
private static Point2d getMidPoint(Tuple2d a, Tuple2d b) {
return new Point2d((a.x + b.x) / 2, (a.y + b.y) / 2);
} | class class_name[name] begin[{]
method[getMidPoint, return_type[type[Point2d]], modifier[private static], parameter[a, b]] begin[{]
return[ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=a, selector... | Keyword[private] Keyword[static] identifier[Point2d] identifier[getMidPoint] operator[SEP] identifier[Tuple2d] identifier[a] , identifier[Tuple2d] identifier[b] operator[SEP] {
Keyword[return] Keyword[new] identifier[Point2d] operator[SEP] operator[SEP] identifier[a] operator[SEP] identifier[x] operator[+] iden... |
@Override
public SIDestinationAddress createTemporaryDestination(Distribution distribution,
String destinationPrefix)
throws SIConnectionUnavailableException, SIConnectionDroppedException,
SIResourceException, SIConn... | class class_name[name] begin[{]
method[createTemporaryDestination, return_type[type[SIDestinationAddress]], modifier[public], parameter[distribution, destinationPrefix]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[CoreSPIConnection.tc.isEntryEnab... | annotation[@] identifier[Override] Keyword[public] identifier[SIDestinationAddress] identifier[createTemporaryDestination] operator[SEP] identifier[Distribution] identifier[distribution] , identifier[String] identifier[destinationPrefix] operator[SEP] Keyword[throws] identifier[SIConnectionUnavailableException] , ide... |
protected T getClass(Class<?> clazz)
{
// First check if we already have it
T result = peek(clazz);
if (result != null)
return result;
// Instantiate
result = instantiate(clazz);
// Put the preliminary result into the cache
put(clazz, result);
// Generate t... | class class_name[name] begin[{]
method[getClass, return_type[type[T]], modifier[protected], parameter[clazz]] begin[{]
local_variable[type[T], result]
if[binary_operation[member[.result], !=, literal[null]]] begin[{]
return[member[.result]]
else begin[{]
None
end[}]
... | Keyword[protected] identifier[T] identifier[getClass] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] {
identifier[T] identifier[result] operator[=] identifier[peek] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifie... |
public final void setPreviewBackground(final Drawable background) {
this.previewBackground = background;
if (previewLoader != null) {
previewLoader.setBackground(background);
}
adaptPreviewView();
} | class class_name[name] begin[{]
method[setPreviewBackground, return_type[void], modifier[final public], parameter[background]] begin[{]
assign[THIS[member[None.previewBackground]], member[.background]]
if[binary_operation[member[.previewLoader], !=, literal[null]]] begin[{]
... | Keyword[public] Keyword[final] Keyword[void] identifier[setPreviewBackground] operator[SEP] Keyword[final] identifier[Drawable] identifier[background] operator[SEP] {
Keyword[this] operator[SEP] identifier[previewBackground] operator[=] identifier[background] operator[SEP] Keyword[if] operator[SEP] identifier[pr... |
protected Text createText(Composite parent, String initialValue)
{
Text t = SWTFactory.createText(parent, SWT.SINGLE | SWT.BORDER, 1);
t.setText(initialValue);
return t;
} | class class_name[name] begin[{]
method[createText, return_type[type[Text]], modifier[protected], parameter[parent, initialValue]] begin[{]
local_variable[type[Text], t]
call[t.setText, parameter[member[.initialValue]]]
return[member[.t]]
end[}]
END[}] | Keyword[protected] identifier[Text] identifier[createText] operator[SEP] identifier[Composite] identifier[parent] , identifier[String] identifier[initialValue] operator[SEP] {
identifier[Text] identifier[t] operator[=] identifier[SWTFactory] operator[SEP] identifier[createText] operator[SEP] identifier[parent] ... |
private Map<String, List<ViewRiksdagenCommitteeDecisionTypeOrgDailySummary>> getCommitteeDecisionTypeOrgMap() {
final DataContainer<ViewRiksdagenCommitteeDecisionTypeOrgDailySummary, RiksdagenCommitteeDecisionTypeOrgSummaryEmbeddedId> committeeBallotDecisionPartyDataContainer = getApplicationManager()
.getDataCon... | class class_name[name] begin[{]
method[getCommitteeDecisionTypeOrgMap, return_type[type[Map]], modifier[private], parameter[]] begin[{]
local_variable[type[DataContainer], committeeBallotDecisionPartyDataContainer]
return[call[committeeBallotDecisionPartyDataContainer.getAll, parameter[]]]
... | Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[ViewRiksdagenCommitteeDecisionTypeOrgDailySummary] operator[>] operator[>] identifier[getCommitteeDecisionTypeOrgMap] operator[SEP] operator[SEP] {
Keyword[final] identifier[DataContainer] operator[<] ident... |
public FSArray getChemicalList() {
if (ManualDescriptor_Type.featOkTst && ((ManualDescriptor_Type)jcasType).casFeat_chemicalList == null)
jcasType.jcas.throwFeatMissing("chemicalList", "de.julielab.jules.types.pubmed.ManualDescriptor");
return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_ge... | class class_name[name] begin[{]
method[getChemicalList, return_type[type[FSArray]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[ManualDescriptor_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[... | Keyword[public] identifier[FSArray] identifier[getChemicalList] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ManualDescriptor_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[ManualDescriptor_Type] operator[SEP] identifier[jcasType] operator[SEP]... |
public OperationStatusResponseInner beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) {
return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body();
} | class class_name[name] begin[{]
method[beginUpdateInstances, return_type[type[OperationStatusResponseInner]], modifier[public], parameter[resourceGroupName, vmScaleSetName, instanceIds]] begin[{]
return[call[.beginUpdateInstancesWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.vm... | Keyword[public] identifier[OperationStatusResponseInner] identifier[beginUpdateInstances] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[vmScaleSetName] , identifier[List] operator[<] identifier[String] operator[>] identifier[instanceIds] operator[SEP] {
Keyword[... |
public static <T> Stream<T> parallelConcat(final Collection<? extends Stream<? extends T>> c) {
return parallelConcat(c, DEFAULT_READING_THREAD_NUM);
} | class class_name[name] begin[{]
method[parallelConcat, return_type[type[Stream]], modifier[public static], parameter[c]] begin[{]
return[call[.parallelConcat, parameter[member[.c], member[.DEFAULT_READING_THREAD_NUM]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Stream] operator[<] identifier[T] operator[>] identifier[parallelConcat] operator[SEP] Keyword[final] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[Stream] operator[<] operator[?] Keyword[extends] identifier[T]... |
protected ArrayList<Long> getSequencePortion(String seqName, int number) {
if (number < 1 || number > 100000)
throw new IllegalArgumentException("Invalid requested sequence count: " + number);
String sql = "select nextval('" + seqName + "') as seqval from generate_series(1," + number + ")";
List<ResSeqVal> seq... | class class_name[name] begin[{]
method[getSequencePortion, return_type[type[ArrayList]], modifier[protected], parameter[seqName, number]] begin[{]
if[binary_operation[binary_operation[member[.number], <, literal[1]], ||, binary_operation[member[.number], >, literal[100000]]]] begin[{]
ThrowStat... | Keyword[protected] identifier[ArrayList] operator[<] identifier[Long] operator[>] identifier[getSequencePortion] operator[SEP] identifier[String] identifier[seqName] , Keyword[int] identifier[number] operator[SEP] {
Keyword[if] operator[SEP] identifier[number] operator[<] Other[1] operator[||] identifier[number... |
protected void mergeAnnotationPropertyError(String property) throws InjectionConfigurationException {
JNDIEnvironmentRefType refType = getJNDIEnvironmentRefType();
String component = ivNameSpaceConfig.getDisplayName();
String module = ivNameSpaceConfig.getModuleName();
String application... | class class_name[name] begin[{]
method[mergeAnnotationPropertyError, return_type[void], modifier[protected], parameter[property]] begin[{]
local_variable[type[JNDIEnvironmentRefType], refType]
local_variable[type[String], component]
local_variable[type[String], module]
local_var... | Keyword[protected] Keyword[void] identifier[mergeAnnotationPropertyError] operator[SEP] identifier[String] identifier[property] operator[SEP] Keyword[throws] identifier[InjectionConfigurationException] {
identifier[JNDIEnvironmentRefType] identifier[refType] operator[=] identifier[getJNDIEnvironmentRefType] oper... |
private MethodSpec buildConstructor( JClassType mappedTypeClass ) {
Optional<JsonRootName> jsonRootName
= findFirstEncounteredAnnotationsOnAllHierarchy( configuration, mappedTypeClass, JsonRootName.class );
String rootName;
if ( !jsonRootName.isPresent() || Strings.isNullOrEmpty(... | class class_name[name] begin[{]
method[buildConstructor, return_type[type[MethodSpec]], modifier[private], parameter[mappedTypeClass]] begin[{]
local_variable[type[Optional], jsonRootName]
local_variable[type[String], rootName]
if[binary_operation[call[jsonRootName.isPresent, pa... | Keyword[private] identifier[MethodSpec] identifier[buildConstructor] operator[SEP] identifier[JClassType] identifier[mappedTypeClass] operator[SEP] {
identifier[Optional] operator[<] identifier[JsonRootName] operator[>] identifier[jsonRootName] operator[=] identifier[findFirstEncounteredAnnotationsOnAllHierarchy... |
public void setValue(float value) {
mBarPointerPosition = Math.round((mSVToPosFactor * (1 - value))
+ mBarPointerHaloRadius + (mBarLength / 2));
calculateColor(mBarPointerPosition);
mBarPointerPaint.setColor(mColor);
// Check whether the Saturation/Value bar is added to the ColorPicker
// wheel
if (mPic... | class class_name[name] begin[{]
method[setValue, return_type[void], modifier[public], parameter[value]] begin[{]
assign[member[.mBarPointerPosition], call[Math.round, parameter[binary_operation[binary_operation[binary_operation[member[.mSVToPosFactor], *, binary_operation[literal[1], -, member[... | Keyword[public] Keyword[void] identifier[setValue] operator[SEP] Keyword[float] identifier[value] operator[SEP] {
identifier[mBarPointerPosition] operator[=] identifier[Math] operator[SEP] identifier[round] operator[SEP] operator[SEP] identifier[mSVToPosFactor] operator[*] operator[SEP] Other[1] operator[-] iden... |
public static Predicate<Field> isAnnotatedWith(Class<? extends Annotation>... annotations) {
return field -> {
for (Class<? extends Annotation> annotation : annotations) {
if (field.isAnnotationPresent(annotation)) {
return true;
}
}
... | class class_name[name] begin[{]
method[isAnnotatedWith, return_type[type[Predicate]], modifier[public static], parameter[annotations]] begin[{]
return[LambdaExpression(body=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member... | Keyword[public] Keyword[static] identifier[Predicate] operator[<] identifier[Field] operator[>] identifier[isAnnotatedWith] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Annotation] operator[>] operator[...] identifier[annotations] operator[SEP] {
Keyword[return] identifier[... |
public EClass getGFARC() {
if (gfarcEClass == null) {
gfarcEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(451);
}
return gfarcEClass;
} | class class_name[name] begin[{]
method[getGFARC, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.gfarcEClass], ==, literal[null]]] begin[{]
assign[member[.gfarcEClass], Cast(expression=MethodInvocation(arguments=[MemberRefer... | Keyword[public] identifier[EClass] identifier[getGFARC] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[gfarcEClass] operator[==] Other[null] operator[SEP] {
identifier[gfarcEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identif... |
protected List<String> parseOptionalStringValues(final String path) {
final List<I_CmsXmlContentValue> values = m_xml.getValues(path, m_locale);
if (values == null) {
return null;
} else {
List<String> stringValues = new ArrayList<String>(values.size());
for ... | class class_name[name] begin[{]
method[parseOptionalStringValues, return_type[type[List]], modifier[protected], parameter[path]] begin[{]
local_variable[type[List], values]
if[binary_operation[member[.values], ==, literal[null]]] begin[{]
return[literal[null]]
else b... | Keyword[protected] identifier[List] operator[<] identifier[String] operator[>] identifier[parseOptionalStringValues] operator[SEP] Keyword[final] identifier[String] identifier[path] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[I_CmsXmlContentValue] operator[>] identifier[values] operato... |
public String getStatement()
{
if(sql == null)
{
StringBuffer stmt = new StringBuffer(128);
ClassDescriptor cld = getClassDescriptor();
FieldDescriptor[] fieldDescriptors = cld.getPkFields();
if(fieldDescriptors == null || fieldDescriptors.len... | class class_name[name] begin[{]
method[getStatement, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.sql], ==, literal[null]]] begin[{]
local_variable[type[StringBuffer], stmt]
local_variable[type[ClassDescriptor], cld]
... | Keyword[public] identifier[String] identifier[getStatement] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[sql] operator[==] Other[null] operator[SEP] {
identifier[StringBuffer] identifier[stmt] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] Other[128] operator[SEP... |
public String getPropertyAsString( Object target,
Property property )
throws SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException,
InvocationTargetException {
Object value = getProperty(target, property);
String... | class class_name[name] begin[{]
method[getPropertyAsString, return_type[type[String]], modifier[public], parameter[target, property]] begin[{]
local_variable[type[Object], value]
local_variable[type[StringBuilder], sb]
call[.writeObjectAsString, parameter[member[.value], member[... | Keyword[public] identifier[String] identifier[getPropertyAsString] operator[SEP] identifier[Object] identifier[target] , identifier[Property] identifier[property] operator[SEP] Keyword[throws] identifier[SecurityException] , identifier[IllegalArgumentException] , identifier[NoSuchMethodException] , identifier[Illeg... |
@Override
public void compile(JQElement element, JSON attrs) {
String text = SafeHtmlUtils.htmlEscape(element.text());
element.empty().append(prettifier.prettify(text));
} | class class_name[name] begin[{]
method[compile, return_type[void], modifier[public], parameter[element, attrs]] begin[{]
local_variable[type[String], text]
call[element.empty, parameter[]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[compile] operator[SEP] identifier[JQElement] identifier[element] , identifier[JSON] identifier[attrs] operator[SEP] {
identifier[String] identifier[text] operator[=] identifier[SafeHtmlUtils] operator[SEP] identifier[htmlEscape] operato... |
public TolerantFloatComparison isNotWithin(final float tolerance) {
return new TolerantFloatComparison() {
@Override
public void of(float expected) {
Float actual = actual();
checkNotNull(
actual, "actual value cannot be null. tolerance=%s expected=%s", tolerance, expected);
... | class class_name[name] begin[{]
method[isNotWithin, return_type[type[TolerantFloatComparison]], modifier[public], parameter[tolerance]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[]... | Keyword[public] identifier[TolerantFloatComparison] identifier[isNotWithin] operator[SEP] Keyword[final] Keyword[float] identifier[tolerance] operator[SEP] {
Keyword[return] Keyword[new] identifier[TolerantFloatComparison] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public... |
public WelcomeFileListType<T> welcomeFile(String ... values)
{
if (values != null)
{
for(String name: values)
{
childNode.createChild("welcome-file").text(name);
}
}
return this;
} | class class_name[name] begin[{]
method[welcomeFile, return_type[type[WelcomeFileListType]], modifier[public], parameter[values]] begin[{]
if[binary_operation[member[.values], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(ex... | Keyword[public] identifier[WelcomeFileListType] operator[<] identifier[T] operator[>] identifier[welcomeFile] operator[SEP] identifier[String] operator[...] identifier[values] operator[SEP] {
Keyword[if] operator[SEP] identifier[values] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SE... |
protected void checkMappings(int arrayPosition) {
final int index = positions.indexOfValue(arrayPosition);
if (index >= 0) {
positions.removeAt(index);
}
} | class class_name[name] begin[{]
method[checkMappings, return_type[void], modifier[protected], parameter[arrayPosition]] begin[{]
local_variable[type[int], index]
if[binary_operation[member[.index], >=, literal[0]]] begin[{]
call[positions.removeAt, parameter[memb... | Keyword[protected] Keyword[void] identifier[checkMappings] operator[SEP] Keyword[int] identifier[arrayPosition] operator[SEP] {
Keyword[final] Keyword[int] identifier[index] operator[=] identifier[positions] operator[SEP] identifier[indexOfValue] operator[SEP] identifier[arrayPosition] operator[SEP] operator[SEP... |
public void close() throws CGateException
{
if (!connected)
return;
synchronized (ping_connections)
{
try
{
sendCommand("quit").toArray();
}
catch (Exception e) {}
try
{
comm... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
if[member[.connected]] begin[{]
return[None]
else begin[{]
None
end[}]
SYNCHRONIZED[member[.ping_connections]] BEGIN[{]
TryStatement(block=[Statem... | Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[CGateException] {
Keyword[if] operator[SEP] operator[!] identifier[connected] operator[SEP] Keyword[return] operator[SEP] Keyword[synchronized] operator[SEP] identifier[ping_connections] operator[SEP] {
... |
@SuppressWarnings("unchecked")
@Override
public EList<RevisionSummaryType> getTypes() {
return (EList<RevisionSummaryType>) eGet(StorePackage.Literals.REVISION_SUMMARY_CONTAINER__TYPES, true);
} | class class_name[name] begin[{]
method[getTypes, return_type[type[EList]], modifier[public], parameter[]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=REVISION_SUMMARY_CONTAINER__TYPES, postfix_operators=[], prefix_operators=[], qualifier=StorePackage.Literals, sel... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[EList] operator[<] identifier[RevisionSummaryType] operator[>] identifier[getTypes] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP] identifier[EList] op... |
public static <E> Bag<E> of(E... values)
{
return new ImmutableBag<E>(new ArrayBag<E>(values));
} | class class_name[name] begin[{]
method[of, return_type[type[Bag]], modifier[public static], parameter[values]] begin[{]
return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_typ... | Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Bag] operator[<] identifier[E] operator[>] identifier[of] operator[SEP] identifier[E] operator[...] identifier[values] operator[SEP] {
Keyword[return] Keyword[new] identifier[ImmutableBag] operator[<] identifier[E] operator[>] opera... |
public com.google.api.ads.admanager.axis.v201902.RateType getRateType() {
return rateType;
} | class class_name[name] begin[{]
method[getRateType, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[member[.rateType]]
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[v201902] operator[SEP] identifier[RateType] identifier[getRateType] operator[SEP] operator[SEP] {
... |
public void setInto(ReadWritableInterval writableInterval, Object object, Chronology chrono) {
String str = (String) object;
int separator = str.indexOf('/');
if (separator < 0) {
throw new IllegalArgumentException("Format requires a '/' separator: " + str);
}
Strin... | class class_name[name] begin[{]
method[setInto, return_type[void], modifier[public], parameter[writableInterval, object, chrono]] begin[{]
local_variable[type[String], str]
local_variable[type[int], separator]
if[binary_operation[member[.separator], <, literal[0]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setInto] operator[SEP] identifier[ReadWritableInterval] identifier[writableInterval] , identifier[Object] identifier[object] , identifier[Chronology] identifier[chrono] operator[SEP] {
identifier[String] identifier[str] operator[=] operator[SEP] identifier[String] opera... |
public T get(final Class<?> key, final Supplier<T> valueSupplier) {
return map.computeIfAbsent(key, aClass -> valueSupplier.get());
} | class class_name[name] begin[{]
method[get, return_type[type[T]], modifier[public], parameter[key, valueSupplier]] begin[{]
return[call[map.computeIfAbsent, parameter[member[.key], LambdaExpression(body=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=valu... | Keyword[public] identifier[T] identifier[get] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[key] , Keyword[final] identifier[Supplier] operator[<] identifier[T] operator[>] identifier[valueSupplier] operator[SEP] {
Keyword[return] identifier[map] operator[SEP] ide... |
public static long count_filtered(nitro_service service, lbmonbindings obj, String filter) throws Exception{
options option = new options();
option.set_count(true);
option.set_filter(filter);
option.set_args(nitro_util.object_to_string_withoutquotes(obj));
lbmonbindings[] response = (lbmonbindings[]) obj.getf... | class class_name[name] begin[{]
method[count_filtered, return_type[type[long]], modifier[public static], parameter[service, obj, filter]] begin[{]
local_variable[type[options], option]
call[option.set_count, parameter[literal[true]]]
call[option.set_filter, parameter[mem... | Keyword[public] Keyword[static] Keyword[long] identifier[count_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[lbmonbindings] identifier[obj] , identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[options] identifier[option] o... |
public int subtreeDepth() throws UnsupportedOperationException {
String subtree=name;
int i=1;
/* count dots */
for (; subtree.lastIndexOf('.') >= 0; i++) {
subtree=subtree.substring(0,subtree.lastIndexOf('.'));
}
return i;
} | class class_name[name] begin[{]
method[subtreeDepth, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[String], subtree]
local_variable[type[int], i]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expr... | Keyword[public] Keyword[int] identifier[subtreeDepth] operator[SEP] operator[SEP] Keyword[throws] identifier[UnsupportedOperationException] {
identifier[String] identifier[subtree] operator[=] identifier[name] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] Keyword[for] operator[SEP] ... |
public static void main(String[] args) throws Exception {
Logger logger = Logger.getLogger("MASReader.main");
Properties beastConfigProperties = new Properties();
String beastConfigPropertiesFile = null;
if (args.length > 0) {
beastConfigPropertiesFile = args[0];
... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
local_variable[type[Logger], logger]
local_variable[type[Properties], beastConfigProperties]
local_variable[type[String], beastConfigPropertiesFile]
if[bina... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Logger] identifier[logger] operator[=] identifier[Logger] operator[SEP] identifier[getLogger] operator[SEP]... |
public String[] names(){
List<String> namesList = new ArrayList<>();
Enumeration names = RequestContext.getHttpRequest().getSession(true).getAttributeNames();
while (names.hasMoreElements()) {
Object o = names.nextElement();
namesList.add(o.toString());
}
... | class class_name[name] begin[{]
method[names, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[List], namesList]
local_variable[type[Enumeration], names]
while[call[names.hasMoreElements, parameter[]]] begin[{]
local_variable[typ... | Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[names] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[namesList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identif... |
public Package definePackage(String name, Manifest manifest, URL sealBase) throws IllegalArgumentException {
Attributes mA = manifest.getMainAttributes();
String specTitle = mA.getValue(Name.SPECIFICATION_TITLE);
String specVersion = mA.getValue(Name.SPECIFICATION_VERSION);
String specVe... | class class_name[name] begin[{]
method[definePackage, return_type[type[Package]], modifier[public], parameter[name, manifest, sealBase]] begin[{]
local_variable[type[Attributes], mA]
local_variable[type[String], specTitle]
local_variable[type[String], specVersion]
local_variable... | Keyword[public] identifier[Package] identifier[definePackage] operator[SEP] identifier[String] identifier[name] , identifier[Manifest] identifier[manifest] , identifier[URL] identifier[sealBase] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
identifier[Attributes] identifier[mA] operator[... |
@Override
public void removeByUuid(String uuid) {
for (CommerceNotificationAttachment commerceNotificationAttachment : findByUuid(
uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
remove(commerceNotificationAttachment);
}
} | class class_name[name] begin[{]
method[removeByUuid, return_type[void], modifier[public], parameter[uuid]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commerceNotificationAttachment, postfix_operator... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByUuid] operator[SEP] identifier[String] identifier[uuid] operator[SEP] {
Keyword[for] operator[SEP] identifier[CommerceNotificationAttachment] identifier[commerceNotificationAttachment] operator[:] identifier[findByUuid] operator... |
public Observable<Page<PublicIPPrefixInner>> listAsync() {
return listWithServiceResponseAsync()
.map(new Func1<ServiceResponse<Page<PublicIPPrefixInner>>, Page<PublicIPPrefixInner>>() {
@Override
public Page<PublicIPPrefixInner> call(ServiceResponse<Page<PublicIPPref... | class class_name[name] begin[{]
method[listAsync, return_type[type[Observable]], modifier[public], parameter[]] begin[{]
return[call[.listWithServiceResponseAsync, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[PublicIPPrefixInner] operator[>] operator[>] identifier[listAsync] operator[SEP] operator[SEP] {
Keyword[return] identifier[listWithServiceResponseAsync] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[S... |
public boolean isMemStubEnabled() {
Object memStubEnabled = this.getJointCompilationOptions().get(MEM_STUB);
if (null == memStubEnabled) {
return false;
}
return "true".equals(memStubEnabled.toString());
} | class class_name[name] begin[{]
method[isMemStubEnabled, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[Object], memStubEnabled]
if[binary_operation[literal[null], ==, member[.memStubEnabled]]] begin[{]
return[literal[false]]
... | Keyword[public] Keyword[boolean] identifier[isMemStubEnabled] operator[SEP] operator[SEP] {
identifier[Object] identifier[memStubEnabled] operator[=] Keyword[this] operator[SEP] identifier[getJointCompilationOptions] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[MEM_STUB] ope... |
public <T> T as(@SuppressWarnings("rawtypes") TypeToken typeToken) throws AlgorithmException {
return this.as(typeToken.getType());
} | class class_name[name] begin[{]
method[as, return_type[type[T]], modifier[public], parameter[typeToken]] begin[{]
return[THIS[call[None.as, parameter[call[typeToken.getType, parameter[]]]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[as] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[TypeToken] identifier[typeToken] operator[SEP] Keyword[throws] identifier[AlgorithmException] {
Keyword[return] Keywor... |
@SuppressWarnings("PMD.GuardLogStatementJavaUtil")
@Override
public final void create(final Events event, final String userId) {
Validate.notNull(event, "The validated object 'event' is null");
Validate.notBlank(userId, "The validated character sequence 'userId' is null or empty");
// ... | class class_name[name] begin[{]
method[create, return_type[void], modifier[final public], parameter[event, userId]] begin[{]
call[Validate.notNull, parameter[member[.event], literal["The validated object 'event' is null"]]]
call[Validate.notBlank, parameter[member[.userId], lite... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[create] operator[SEP] Keyword[final] identifier[Events] identifier[event] , Keyword[final] identifier[String] identifier[userId] operator[SEP... |
public final String catalogToStr(
final CatalogGs pCatalog,
final List<I18nCatalogGs> pI18nCatalogs, final String pLang) {
if (pI18nCatalogs != null) {
for (I18nCatalogGs icat : pI18nCatalogs) {
if (icat.getLang().getItsId().equals(pLang) && pCatalog.getItsId()
.equals(icat.getHasN... | class class_name[name] begin[{]
method[catalogToStr, return_type[type[String]], modifier[final public], parameter[pCatalog, pI18nCatalogs, pLang]] begin[{]
if[binary_operation[member[.pI18nCatalogs], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statement... | Keyword[public] Keyword[final] identifier[String] identifier[catalogToStr] operator[SEP] Keyword[final] identifier[CatalogGs] identifier[pCatalog] , Keyword[final] identifier[List] operator[<] identifier[I18nCatalogGs] operator[>] identifier[pI18nCatalogs] , Keyword[final] identifier[String] identifier[pLang] operato... |
private String preventLogForging(String logMsg) {
String result = logMsg;
// use precompiled pattern for performance reasons
result = LINEBREAK_PATTERN.matcher(logMsg).replaceAll(SingleLinePatternLayout.LINE_SEP);
return result;
} | class class_name[name] begin[{]
method[preventLogForging, return_type[type[String]], modifier[private], parameter[logMsg]] begin[{]
local_variable[type[String], result]
assign[member[.result], call[LINEBREAK_PATTERN.matcher, parameter[member[.logMsg]]]]
return[member[.result]]
... | Keyword[private] identifier[String] identifier[preventLogForging] operator[SEP] identifier[String] identifier[logMsg] operator[SEP] {
identifier[String] identifier[result] operator[=] identifier[logMsg] operator[SEP] identifier[result] operator[=] identifier[LINEBREAK_PATTERN] operator[SEP] identifier[matcher] o... |
public SigRating getSigRatings(String sigId) throws VoteSmartException, VoteSmartErrorException {
return api.query("Rating.getSigRatings", new ArgMap("sigId", sigId), SigRating.class );
} | class class_name[name] begin[{]
method[getSigRatings, return_type[type[SigRating]], modifier[public], parameter[sigId]] begin[{]
return[call[api.query, parameter[literal["Rating.getSigRatings"], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], val... | Keyword[public] identifier[SigRating] identifier[getSigRatings] operator[SEP] identifier[String] identifier[sigId] operator[SEP] Keyword[throws] identifier[VoteSmartException] , identifier[VoteSmartErrorException] {
Keyword[return] identifier[api] operator[SEP] identifier[query] operator[SEP] literal[String] , ... |
@BetaApi
public final Operation insertSubnetwork(ProjectRegionName region, Subnetwork subnetworkResource) {
InsertSubnetworkHttpRequest request =
InsertSubnetworkHttpRequest.newBuilder()
.setRegion(region == null ? null : region.toString())
.setSubnetworkResource(subnetworkResourc... | class class_name[name] begin[{]
method[insertSubnetwork, return_type[type[Operation]], modifier[final public], parameter[region, subnetworkResource]] begin[{]
local_variable[type[InsertSubnetworkHttpRequest], request]
return[call[.insertSubnetwork, parameter[member[.request]]]]
end[}]
END[}... | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[insertSubnetwork] operator[SEP] identifier[ProjectRegionName] identifier[region] , identifier[Subnetwork] identifier[subnetworkResource] operator[SEP] {
identifier[InsertSubnetworkHttpRequest] identifier[request] o... |
@Override
public boolean login() throws LoginException {
try {
Callback[] callbacks = getHandledCallbacks();
setPasswordCredentialInTemporarySubject(callbacks);
} catch (Exception e) {
throw new LoginException(e.getMessage());
}
return succeeded;
... | class class_name[name] begin[{]
method[login, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getHandledCallbacks, postfix_op... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[login] operator[SEP] operator[SEP] Keyword[throws] identifier[LoginException] {
Keyword[try] {
identifier[Callback] operator[SEP] operator[SEP] identifier[callbacks] operator[=] identifier[getHandledCallbacks] operator[SEP]... |
public static <T> T ascClone(final T comparableArray) {
if (isComparableArray(comparableArray)) {
T clone = BeanUtils.clone(comparableArray);
ascByReflex(clone);
return clone;
}
return comparableArray;
} | class class_name[name] begin[{]
method[ascClone, return_type[type[T]], modifier[public static], parameter[comparableArray]] begin[{]
if[call[.isComparableArray, parameter[member[.comparableArray]]]] begin[{]
local_variable[type[T], clone]
call[.ascByReflex, p... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[ascClone] operator[SEP] Keyword[final] identifier[T] identifier[comparableArray] operator[SEP] {
Keyword[if] operator[SEP] identifier[isComparableArray] operator[SEP] identifier[comparableArray] operator[SEP] operator[... |
public Tree setName(String name) {
if (parent == null) {
throw new UnsupportedOperationException("Root node has no name!");
}
if (!parent.isMap()) {
throw new UnsupportedOperationException("Unable to set name (this node's parent is not a Map)!");
}
parent.remove((String) key);
key = name;
p... | class class_name[name] begin[{]
method[setName, return_type[type[Tree]], modifier[public], parameter[name]] begin[{]
if[binary_operation[member[.parent], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[],... | Keyword[public] identifier[Tree] identifier[setName] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[parent] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[Strin... |
public final boolean compareAndSetForkJoinTaskTag(short expect, short update) {
for (int s;;) {
if ((short) (s = status) != expect)
return false;
if (U.compareAndSwapInt(this, STATUS, s, (s & ~SMASK) | (update & SMASK)))
return true;
}
} | class class_name[name] begin[{]
method[compareAndSetForkJoinTaskTag, return_type[type[boolean]], modifier[final public], parameter[expect, update]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Cast(expression=Assignment(expressionl=Mem... | Keyword[public] Keyword[final] Keyword[boolean] identifier[compareAndSetForkJoinTaskTag] operator[SEP] Keyword[short] identifier[expect] , Keyword[short] identifier[update] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[s] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] op... |
@NotNull
public String toSimpleString(boolean allowDecimal)
{
if (_denominator == 0 && _numerator != 0) {
return toString();
} else if (isInteger()) {
return Integer.toString(intValue());
} else if (_numerator != 1 && _denominator % _numerator == 0) {
... | class class_name[name] begin[{]
method[toSimpleString, return_type[type[String]], modifier[public], parameter[allowDecimal]] begin[{]
if[binary_operation[binary_operation[member[._denominator], ==, literal[0]], &&, binary_operation[member[._numerator], !=, literal[0]]]] begin[{]
ret... | annotation[@] identifier[NotNull] Keyword[public] identifier[String] identifier[toSimpleString] operator[SEP] Keyword[boolean] identifier[allowDecimal] operator[SEP] {
Keyword[if] operator[SEP] identifier[_denominator] operator[==] Other[0] operator[&&] identifier[_numerator] operator[!=] Other[0] operator[SEP] ... |
public Object atomUnmarshall(String oDataEntityXml, String fullResponse, ODataClientQuery query)
throws UnsupportedEncodingException, ODataClientException {
Object unmarshalledEntity;
// build a dummy request context which contains the Xml
ODataRequest request = buildODataRequestFrom... | class class_name[name] begin[{]
method[atomUnmarshall, return_type[type[Object]], modifier[public], parameter[oDataEntityXml, fullResponse, query]] begin[{]
local_variable[type[Object], unmarshalledEntity]
local_variable[type[ODataRequest], request]
local_variable[type[ODataRequestConte... | Keyword[public] identifier[Object] identifier[atomUnmarshall] operator[SEP] identifier[String] identifier[oDataEntityXml] , identifier[String] identifier[fullResponse] , identifier[ODataClientQuery] identifier[query] operator[SEP] Keyword[throws] identifier[UnsupportedEncodingException] , identifier[ODataClientExcep... |
public static OSFamily getOSFamilyFromGNUString(String gnuString)
{
final String nativeOs = (gnuString != null ? gnuString.toLowerCase() : "");
final OSFamily retval;
if (nativeOs.startsWith("mingw") || nativeOs.startsWith("cygwin"))
retval = OSFamily.WINDOWS;
else if (nativeOs.startsWith("darwi... | class class_name[name] begin[{]
method[getOSFamilyFromGNUString, return_type[type[OSFamily]], modifier[public static], parameter[gnuString]] begin[{]
local_variable[type[String], nativeOs]
local_variable[type[OSFamily], retval]
if[binary_operation[call[nativeOs.startsWith, param... | Keyword[public] Keyword[static] identifier[OSFamily] identifier[getOSFamilyFromGNUString] operator[SEP] identifier[String] identifier[gnuString] operator[SEP] {
Keyword[final] identifier[String] identifier[nativeOs] operator[=] operator[SEP] identifier[gnuString] operator[!=] Other[null] operator[?] identifier[g... |
public Observable<PacketCaptureResultInner> createAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName, PacketCaptureInner parameters) {
return createWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName, parameters).map(new Func1<ServiceResponse<Packet... | class class_name[name] begin[{]
method[createAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, networkWatcherName, packetCaptureName, parameters]] begin[{]
return[call[.createWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.networkWatcherName], ... | Keyword[public] identifier[Observable] operator[<] identifier[PacketCaptureResultInner] operator[>] identifier[createAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[networkWatcherName] , identifier[String] identifier[packetCaptureName] , identifier[PacketCaptureI... |
@Override
public String lookup(String key) {
final String value = System.getenv(key);
if (value == null && strict) {
throw new UndefinedEnvironmentVariableException("The environment variable '" + key
+ "' is not defined; could not substitute the expression '${"
... | class class_name[name] begin[{]
method[lookup, return_type[type[String]], modifier[public], parameter[key]] begin[{]
local_variable[type[String], value]
if[binary_operation[binary_operation[member[.value], ==, literal[null]], &&, member[.strict]]] begin[{]
ThrowStatement(exp... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[lookup] operator[SEP] identifier[String] identifier[key] operator[SEP] {
Keyword[final] identifier[String] identifier[value] operator[=] identifier[System] operator[SEP] identifier[getenv] operator[SEP] identifier[key] operator[SEP]... |
protected PluginStrategy createPluginStrategy() {
String strategyName = SystemProperties.getString(PluginStrategy.class.getName());
if (strategyName != null) {
try {
Class<?> klazz = getClass().getClassLoader().loadClass(strategyName);
Object strategy = klazz.getConstructor(PluginManager.class)
.ne... | class class_name[name] begin[{]
method[createPluginStrategy, return_type[type[PluginStrategy]], modifier[protected], parameter[]] begin[{]
local_variable[type[String], strategyName]
if[binary_operation[member[.strategyName], !=, literal[null]]] begin[{]
TryStatement(block=[L... | Keyword[protected] identifier[PluginStrategy] identifier[createPluginStrategy] operator[SEP] operator[SEP] {
identifier[String] identifier[strategyName] operator[=] identifier[SystemProperties] operator[SEP] identifier[getString] operator[SEP] identifier[PluginStrategy] operator[SEP] Keyword[class] operator[SEP]... |
public void set (final int r, final int c, final float value) throws MatrixException
{
if ((r < 0) || (r >= m_nRows) || (c < 0) || (c >= m_nCols))
{
throw new MatrixException (MatrixException.INVALID_INDEX);
}
m_aValues[r][c] = value;
} | class class_name[name] begin[{]
method[set, return_type[void], modifier[public], parameter[r, c, value]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[member[.r], <, literal[0]], ||, binary_operation[member[.r], >=, member[.m_nRows]]], ||, binary_operation[memb... | Keyword[public] Keyword[void] identifier[set] operator[SEP] Keyword[final] Keyword[int] identifier[r] , Keyword[final] Keyword[int] identifier[c] , Keyword[final] Keyword[float] identifier[value] operator[SEP] Keyword[throws] identifier[MatrixException] {
Keyword[if] operator[SEP] operator[SEP] identifier[r] o... |
public boolean pageScroll(int direction) {
boolean down = direction == View.FOCUS_DOWN;
int height = getHeight();
if (down) {
mTempRect.top = getScrollY() + height;
int count = getChildCount();
if (count > 0) {
View view = getChildAt(count - 1);
if (mTempRect.top + height > view.getBottom()) {
... | class class_name[name] begin[{]
method[pageScroll, return_type[type[boolean]], modifier[public], parameter[direction]] begin[{]
local_variable[type[boolean], down]
local_variable[type[int], height]
if[member[.down]] begin[{]
assign[member[mTempRect.top], ... | Keyword[public] Keyword[boolean] identifier[pageScroll] operator[SEP] Keyword[int] identifier[direction] operator[SEP] {
Keyword[boolean] identifier[down] operator[=] identifier[direction] operator[==] identifier[View] operator[SEP] identifier[FOCUS_DOWN] operator[SEP] Keyword[int] identifier[height] operator[=]... |
String buildProjectionExpression(SubstitutionContext context) {
if (projections.size() == 0)
return null;
StringBuilder sb = new StringBuilder();
for (PathOperand projection : projections) {
if (sb.length() > 0)
sb.append(", ");
sb.append(proje... | class class_name[name] begin[{]
method[buildProjectionExpression, return_type[type[String]], modifier[default], parameter[context]] begin[{]
if[binary_operation[call[projections.size, parameter[]], ==, literal[0]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
... | identifier[String] identifier[buildProjectionExpression] operator[SEP] identifier[SubstitutionContext] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] identifier[projections] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[return] Other[null] o... |
public RuntimeTypeAdapterFactory<T> registerSubtype(Class<? extends T> type, String label) {
if (type == null || label == null) {
throw new NullPointerException();
}
if (subtypeToLabel.containsKey(type) || labelToSubtype.containsKey(label)) {
throw new IllegalArgumentException("types and labels ... | class class_name[name] begin[{]
method[registerSubtype, return_type[type[RuntimeTypeAdapterFactory]], modifier[public], parameter[type, label]] begin[{]
if[binary_operation[binary_operation[member[.type], ==, literal[null]], ||, binary_operation[member[.label], ==, literal[null]]]] begin[{]
... | Keyword[public] identifier[RuntimeTypeAdapterFactory] operator[<] identifier[T] operator[>] identifier[registerSubtype] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[type] , identifier[String] identifier[label] operator[SEP] {
Keyword[if] operator[... |
private String getText(JsonNode jsonObject, String nodeName) {
JsonNode subNode = jsonObject.get(nodeName);
if (subNode == null) {
return null;
}
if (!subNode.isTextual()) {
throw new IllegalStateException(nodeName + " from credential process should be textual, ... | class class_name[name] begin[{]
method[getText, return_type[type[String]], modifier[private], parameter[jsonObject, nodeName]] begin[{]
local_variable[type[JsonNode], subNode]
if[binary_operation[member[.subNode], ==, literal[null]]] begin[{]
return[literal[null]]
el... | Keyword[private] identifier[String] identifier[getText] operator[SEP] identifier[JsonNode] identifier[jsonObject] , identifier[String] identifier[nodeName] operator[SEP] {
identifier[JsonNode] identifier[subNode] operator[=] identifier[jsonObject] operator[SEP] identifier[get] operator[SEP] identifier[nodeName]... |
public final <U, V> Flux<Flux<T>> windowWhen(Publisher<U> bucketOpening,
final Function<? super U, ? extends Publisher<V>> closeSelector) {
return onAssembly(new FluxWindowWhen<>(this,
bucketOpening,
closeSelector,
Queues.unbounded(Queues.XS_BUFFER_SIZE)));
} | class class_name[name] begin[{]
method[windowWhen, return_type[type[Flux]], modifier[final public], parameter[bucketOpening, closeSelector]] begin[{]
return[call[.onAssembly, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference... | Keyword[public] Keyword[final] operator[<] identifier[U] , identifier[V] operator[>] identifier[Flux] operator[<] identifier[Flux] operator[<] identifier[T] operator[>] operator[>] identifier[windowWhen] operator[SEP] identifier[Publisher] operator[<] identifier[U] operator[>] identifier[bucketOpening] , Keyword[fina... |
public static base_response add(nitro_service client, route6 resource) throws Exception {
route6 addresource = new route6();
addresource.network = resource.network;
addresource.gateway = resource.gateway;
addresource.vlan = resource.vlan;
addresource.weight = resource.weight;
addresource.distance = resource... | class class_name[name] begin[{]
method[add, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{]
local_variable[type[route6], addresource]
assign[member[addresource.network], member[resource.network]]
assign[member[addresource.... | Keyword[public] Keyword[static] identifier[base_response] identifier[add] operator[SEP] identifier[nitro_service] identifier[client] , identifier[route6] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[route6] identifier[addresource] operator[=] Keyword[new] identifier[rout... |
@SuppressWarnings("unchecked")
private static <S extends Storable> ExistsFilter<S> getCanonical(ChainedProperty<S> property,
Filter<?> subFilter,
boolean not)
{
... | class class_name[name] begin[{]
method[getCanonical, return_type[type[ExistsFilter]], modifier[private static], parameter[property, subFilter, not]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operator... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] operator[<] identifier[S] Keyword[extends] identifier[Storable] operator[>] identifier[ExistsFilter] operator[<] identifier[S] operator[>] identifier[getCanonical] operator[SEP] identifier[ChainedProp... |
void internalOpenDialog(
final I_CmsEditableData editableData,
final boolean isNew,
String dependingElementId,
String mode,
CmsEditHandlerData editHandlerData) {
if ((editableData.getStructureId() != null) && !isNew) {
m_currentElementId = editableData.getStr... | class class_name[name] begin[{]
method[internalOpenDialog, return_type[void], modifier[default], parameter[editableData, isNew, dependingElementId, mode, editHandlerData]] begin[{]
if[binary_operation[binary_operation[call[editableData.getStructureId, parameter[]], !=, literal[null]], &&, membe... | Keyword[void] identifier[internalOpenDialog] operator[SEP] Keyword[final] identifier[I_CmsEditableData] identifier[editableData] , Keyword[final] Keyword[boolean] identifier[isNew] , identifier[String] identifier[dependingElementId] , identifier[String] identifier[mode] , identifier[CmsEditHandlerData] identifier[e... |
protected void blockTag() {
int p = bp;
try {
nextChar();
if (isIdentifierStart(ch)) {
String name = readTagName();
TagParser tp = tagParsers.get(name);
if (tp == null) {
blockContent();
} else {
... | class class_name[name] begin[{]
method[blockTag, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[int], p]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=nextChar, postfix_operators=[], prefix_operators=[], qualifier=, s... | Keyword[protected] Keyword[void] identifier[blockTag] operator[SEP] operator[SEP] {
Keyword[int] identifier[p] operator[=] identifier[bp] operator[SEP] Keyword[try] {
identifier[nextChar] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isIdentifierStart] operator[SEP] id... |
protected String getEntityIdFromRequest(final RequestContext requestContext) {
val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
return request.getParameter(this.entityIdParameterName);
} | class class_name[name] begin[{]
method[getEntityIdFromRequest, return_type[type[String]], modifier[protected], parameter[requestContext]] begin[{]
local_variable[type[val], request]
return[call[request.getParameter, parameter[THIS[member[None.entityIdParameterName]]]]]
end[}]
END[}] | Keyword[protected] identifier[String] identifier[getEntityIdFromRequest] operator[SEP] Keyword[final] identifier[RequestContext] identifier[requestContext] operator[SEP] {
identifier[val] identifier[request] operator[=] identifier[WebUtils] operator[SEP] identifier[getHttpServletRequestFromExternalWebflowContext... |
public <T> Map<String, T> nextMap(@NonNull Class<T> valueType) throws IOException {
return nextMap(null, valueType);
} | class class_name[name] begin[{]
method[nextMap, return_type[type[Map]], modifier[public], parameter[valueType]] begin[{]
return[call[.nextMap, parameter[literal[null], member[.valueType]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] identifier[Map] operator[<] identifier[String] , identifier[T] operator[>] identifier[nextMap] operator[SEP] annotation[@] identifier[NonNull] identifier[Class] operator[<] identifier[T] operator[>] identifier[valueType] operator[SEP] Keyword[throws] identifier[IOE... |
public static int registerDiagnosticModule(DiagnosticModule diagnosticModule, String packageName) {
if (modules.containsKey(packageName)) {
return 1;
}
try {
diagnosticModule.init();
} catch (Throwable th) {
// No FFDC code needed - we're reporting th... | class class_name[name] begin[{]
method[registerDiagnosticModule, return_type[type[int]], modifier[public static], parameter[diagnosticModule, packageName]] begin[{]
if[call[modules.containsKey, parameter[member[.packageName]]]] begin[{]
return[literal[1]]
else begin[{]
None
... | Keyword[public] Keyword[static] Keyword[int] identifier[registerDiagnosticModule] operator[SEP] identifier[DiagnosticModule] identifier[diagnosticModule] , identifier[String] identifier[packageName] operator[SEP] {
Keyword[if] operator[SEP] identifier[modules] operator[SEP] identifier[containsKey] operator[SEP]... |
private static void compress(File source, ZipArchiveOutputStream zipOut, String zipEntryName) throws IOException {
String tempZipEntryName = $.notEmpty(zipEntryName) ? zipEntryName : source.getName();
byte[] buff = new byte[512];
int readLen = -1;
if (source.isFile()) {
// System.out.println("压缩文件:"... | class class_name[name] begin[{]
method[compress, return_type[void], modifier[private static], parameter[source, zipOut, zipEntryName]] begin[{]
local_variable[type[String], tempZipEntryName]
local_variable[type[byte], buff]
local_variable[type[int], readLen]
if[call[sour... | Keyword[private] Keyword[static] Keyword[void] identifier[compress] operator[SEP] identifier[File] identifier[source] , identifier[ZipArchiveOutputStream] identifier[zipOut] , identifier[String] identifier[zipEntryName] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[tempZ... |
public synchronized EventData getNextEvent(int event_type) throws DevFailed {
EventData ev_data = null;
for (EventData event : events)
if (event.event_type == event_type)
ev_data = event;
if (ev_data == null)
Except.throw_exception("BUFFER_EMPTY",
... | class class_name[name] begin[{]
method[getNextEvent, return_type[type[EventData]], modifier[synchronized public], parameter[event_type]] begin[{]
local_variable[type[EventData], ev_data]
ForStatement(body=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=event_type, postfix_... | Keyword[public] Keyword[synchronized] identifier[EventData] identifier[getNextEvent] operator[SEP] Keyword[int] identifier[event_type] operator[SEP] Keyword[throws] identifier[DevFailed] {
identifier[EventData] identifier[ev_data] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[EventD... |
public INDArray getArrForVarName(@NonNull String varName) {
Preconditions.checkState(variables.containsKey(varName), "No variable found with name \"%s\"", varName);
SDVariable v = variables.get(varName).getVariable();
switch(v.getVariableType()){
case VARIABLE:
if(!va... | class class_name[name] begin[{]
method[getArrForVarName, return_type[type[INDArray]], modifier[public], parameter[varName]] begin[{]
call[Preconditions.checkState, parameter[call[variables.containsKey, parameter[member[.varName]]], literal["No variable found with name \"%s\""], member[.varName]... | Keyword[public] identifier[INDArray] identifier[getArrForVarName] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[varName] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] identifier[variables] operator[SEP] identifier[containsKey] operato... |
@SneakyThrows
public static String decodeByteArrayToString(final byte[] bytes) {
@Cleanup
val bais = new ByteArrayInputStream(bytes);
@Cleanup
val baos = new ByteArrayOutputStream();
val buf = new byte[bytes.length];
try (val iis = new InflaterInputStream(bais)) {
... | class class_name[name] begin[{]
method[decodeByteArrayToString, return_type[type[String]], modifier[public static], parameter[bytes]] begin[{]
local_variable[type[val], bais]
local_variable[type[val], baos]
local_variable[type[val], buf]
TryStatement(block=[LocalVariableDeclarat... | annotation[@] identifier[SneakyThrows] Keyword[public] Keyword[static] identifier[String] identifier[decodeByteArrayToString] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] {
annotation[@] identifier[Cleanup] identifier[val] identifier[bais] operator[=] Key... |
private Collection<Class<? extends Saga>> removeAbstractTypes(final Collection<Class<? extends Saga>> foundTypes) {
Collection<Class<? extends Saga>> sagaTypes = new ArrayList<>();
for (Class<? extends Saga> entryType : foundTypes) {
if (!Modifier.isAbstract(entryType.getModifiers())) {
... | class class_name[name] begin[{]
method[removeAbstractTypes, return_type[type[Collection]], modifier[private], parameter[foundTypes]] begin[{]
local_variable[type[Collection], sagaTypes]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Me... | Keyword[private] identifier[Collection] operator[<] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Saga] operator[>] operator[>] identifier[removeAbstractTypes] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Sa... |
public Document read(Reader reader) throws DocumentException, IOException,
XmlPullParserException {
getXPPParser().setInput(reader);
return parseDocument();
} | class class_name[name] begin[{]
method[read, return_type[type[Document]], modifier[public], parameter[reader]] begin[{]
call[.getXPPParser, parameter[]]
return[call[.parseDocument, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Document] identifier[read] operator[SEP] identifier[Reader] identifier[reader] operator[SEP] Keyword[throws] identifier[DocumentException] , identifier[IOException] , identifier[XmlPullParserException] {
identifier[getXPPParser] operator[SEP] operator[SEP] operator[SEP] identifier[se... |
public Observable<ServiceResponse<Page<StorageAccountCredentialInner>>> listByDataBoxEdgeDeviceSinglePageAsync(final String deviceName, final String resourceGroupName) {
if (deviceName == null) {
throw new IllegalArgumentException("Parameter deviceName is required and cannot be null.");
}
... | class class_name[name] begin[{]
method[listByDataBoxEdgeDeviceSinglePageAsync, return_type[type[Observable]], modifier[public], parameter[deviceName, resourceGroupName]] begin[{]
if[binary_operation[member[.deviceName], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCre... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[StorageAccountCredentialInner] operator[>] operator[>] operator[>] identifier[listByDataBoxEdgeDeviceSinglePageAsync] operator[SEP] Keyword[final] identifier[String] identifier[deviceName] ... |
public static String quoteEscaped(final String str) {
if (N.isNullOrEmpty(str)) {
return str;
}
final StringBuilder sb = Objectory.createStringBuilder();
final char[] chars = getCharsForReadOnly(str);
try {
char ch = 0;
for (int i =... | class class_name[name] begin[{]
method[quoteEscaped, return_type[type[String]], modifier[public static], parameter[str]] begin[{]
if[call[N.isNullOrEmpty, parameter[member[.str]]]] begin[{]
return[member[.str]]
else begin[{]
None
end[}]
local_variable[type[St... | Keyword[public] Keyword[static] identifier[String] identifier[quoteEscaped] operator[SEP] Keyword[final] identifier[String] identifier[str] operator[SEP] {
Keyword[if] operator[SEP] identifier[N] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[str] operator[SEP] operator[SEP] {
Keywor... |
public Element createOrUpdateElement(Object parent, String name, String type, Style style, boolean generateId) {
Element element;
// check existence
if (name != null) {
if (!generateId) {
element = Dom.getElementById(name);
} else {
element = getElement(parent, name);
}
} else {
return null;... | class class_name[name] begin[{]
method[createOrUpdateElement, return_type[type[Element]], modifier[public], parameter[parent, name, type, style, generateId]] begin[{]
local_variable[type[Element], element]
if[binary_operation[member[.name], !=, literal[null]]] begin[{]
... | Keyword[public] identifier[Element] identifier[createOrUpdateElement] operator[SEP] identifier[Object] identifier[parent] , identifier[String] identifier[name] , identifier[String] identifier[type] , identifier[Style] identifier[style] , Keyword[boolean] identifier[generateId] operator[SEP] {
identifier[Elem... |
public static KountConfiguration fromJson(JSONObject json) {
if (json == null) {
json = new JSONObject();
}
KountConfiguration kountConfiguration = new KountConfiguration();
kountConfiguration.mKountMerchantId = Json.optString(json, KOUNT_MERCHANT_ID_KEY, "");
retur... | class class_name[name] begin[{]
method[fromJson, return_type[type[KountConfiguration]], modifier[public static], parameter[json]] begin[{]
if[binary_operation[member[.json], ==, literal[null]]] begin[{]
assign[member[.json], ClassCreator(arguments=[], body=None, construc... | Keyword[public] Keyword[static] identifier[KountConfiguration] identifier[fromJson] operator[SEP] identifier[JSONObject] identifier[json] operator[SEP] {
Keyword[if] operator[SEP] identifier[json] operator[==] Other[null] operator[SEP] {
identifier[json] operator[=] Keyword[new] identifier[JSONObject]... |
protected JavaCC newJavaCC ()
{
final JavaCC javacc = new JavaCC ();
javacc.setLog (getLog ());
javacc.setGrammarEncoding (this.grammarEncoding);
javacc.setOutputEncoding (this.outputEncoding);
javacc.setJdkVersion (this.jdkVersion);
javacc.setBuildParser (this.buildParser);
javacc.setBuil... | class class_name[name] begin[{]
method[newJavaCC, return_type[type[JavaCC]], modifier[protected], parameter[]] begin[{]
local_variable[type[JavaCC], javacc]
call[javacc.setLog, parameter[call[.getLog, parameter[]]]]
call[javacc.setGrammarEncoding, parameter[THIS[member[N... | Keyword[protected] identifier[JavaCC] identifier[newJavaCC] operator[SEP] operator[SEP] {
Keyword[final] identifier[JavaCC] identifier[javacc] operator[=] Keyword[new] identifier[JavaCC] operator[SEP] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setLog] operator[SEP] identifier[getLog]... |
public List<Rulebases.Rulebase> getRulebase() {
if (rulebase == null) {
rulebase = new ArrayList<Rulebases.Rulebase>();
}
return this.rulebase;
} | class class_name[name] begin[{]
method[getRulebase, return_type[type[List]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.rulebase], ==, literal[null]]] begin[{]
assign[member[.rulebase], ClassCreator(arguments=[], body=None, constructor_type_argum... | Keyword[public] identifier[List] operator[<] identifier[Rulebases] operator[SEP] identifier[Rulebase] operator[>] identifier[getRulebase] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[rulebase] operator[==] Other[null] operator[SEP] {
identifier[rulebase] operator[=] Keyword[new] ... |
public ServiceFuture<SourceUploadDefinitionInner> getBuildSourceUploadUrlAsync(String resourceGroupName, String registryName, final ServiceCallback<SourceUploadDefinitionInner> serviceCallback) {
return ServiceFuture.fromResponse(getBuildSourceUploadUrlWithServiceResponseAsync(resourceGroupName, registryName), ... | class class_name[name] begin[{]
method[getBuildSourceUploadUrlAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, registryName, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.getBuildSourceUploadUrlWithServiceResponseAsync, paramet... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[SourceUploadDefinitionInner] operator[>] identifier[getBuildSourceUploadUrlAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[registryName] , Keyword[final] identifier[ServiceCallback] operator[<] ident... |
public Observable<Page<DetectorResponseInner>> listSiteDetectorResponsesNextAsync(final String nextPageLink) {
return listSiteDetectorResponsesNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<DetectorResponseInner>>, Page<DetectorResponseInner>>() {
@Ove... | class class_name[name] begin[{]
method[listSiteDetectorResponsesNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{]
return[call[.listSiteDetectorResponsesNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[DetectorResponseInner] operator[>] operator[>] identifier[listSiteDetectorResponsesNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] {
Keyword[return] identifier[listSiteDete... |
private List<CmsResource> readChangedResourcesInsideProject(
CmsDbContext dbc,
CmsUUID projectId,
CmsReadChangedProjectResourceMode mode)
throws CmsException {
String cacheKey = projectId + "_" + mode.toString();
List<CmsResource> result = m_monitor.getCachedProjectResources... | class class_name[name] begin[{]
method[readChangedResourcesInsideProject, return_type[type[List]], modifier[private], parameter[dbc, projectId, mode]] begin[{]
local_variable[type[String], cacheKey]
local_variable[type[List], result]
if[binary_operation[member[.result], !=, lite... | Keyword[private] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[readChangedResourcesInsideProject] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[CmsUUID] identifier[projectId] , identifier[CmsReadChangedProjectResourceMode] identifier[mode] operator[SEP] Keyword[thro... |
public static void cursorStringToContentValues(Cursor cursor, String field,
ContentValues values, String key) {
values.put(key, cursor.getString(cursor.getColumnIndexOrThrow(field)));
} | class class_name[name] begin[{]
method[cursorStringToContentValues, return_type[void], modifier[public static], parameter[cursor, field, values, key]] begin[{]
call[values.put, parameter[member[.key], call[cursor.getString, parameter[call[cursor.getColumnIndexOrThrow, parameter[member[.field]]]... | Keyword[public] Keyword[static] Keyword[void] identifier[cursorStringToContentValues] operator[SEP] identifier[Cursor] identifier[cursor] , identifier[String] identifier[field] , identifier[ContentValues] identifier[values] , identifier[String] identifier[key] operator[SEP] {
identifier[values] operator[SEP] ... |
public static String getConfPath() {
String classpath = CommonUtils.class.getResource("/").getPath();
String confPath = classpath + "../conf/";
if (new File(confPath).exists()) {
return confPath;
} else {
return classpath;
}
} | class class_name[name] begin[{]
method[getConfPath, return_type[type[String]], modifier[public static], parameter[]] begin[{]
local_variable[type[String], classpath]
local_variable[type[String], confPath]
if[ClassCreator(arguments=[MemberReference(member=confPath, postfix_operat... | Keyword[public] Keyword[static] identifier[String] identifier[getConfPath] operator[SEP] operator[SEP] {
identifier[String] identifier[classpath] operator[=] identifier[CommonUtils] operator[SEP] Keyword[class] operator[SEP] identifier[getResource] operator[SEP] literal[String] operator[SEP] operator[SEP] identi... |
public static ClassLoader getClassLoaderOfObject(Object o) {
if (o == null) {
throw new NullPointerException("Argument cannot be null");
}
return getClassLoaderOfClass(o.getClass());
} | class class_name[name] begin[{]
method[getClassLoaderOfObject, return_type[type[ClassLoader]], modifier[public static], parameter[o]] begin[{]
if[binary_operation[member[.o], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[],... | Keyword[public] Keyword[static] identifier[ClassLoader] identifier[getClassLoaderOfObject] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
Keyword[if] operator[SEP] identifier[o] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[NullPointerException] operat... |
public Classification nameOf(String classificationName, String name) {
return findClassificationMeta((String) classificationName, () -> {
return "nameOf('" + classificationName + "', '" + name + "')";
}).nameOf(name);
} | class class_name[name] begin[{]
method[nameOf, return_type[type[Classification]], modifier[public], parameter[classificationName, name]] begin[{]
return[call[.findClassificationMeta, parameter[Cast(expression=MemberReference(member=classificationName, postfix_operators=[], prefix_operators=[], qualifie... | Keyword[public] identifier[Classification] identifier[nameOf] operator[SEP] identifier[String] identifier[classificationName] , identifier[String] identifier[name] operator[SEP] {
Keyword[return] identifier[findClassificationMeta] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[classific... |
static TypeVariableName get(
TypeVariable mirror, Map<TypeParameterElement, TypeVariableName> typeVariables) {
TypeParameterElement element = (TypeParameterElement) mirror.asElement();
TypeVariableName typeVariableName = typeVariables.get(element);
if (typeVariableName == null) {
// Since the bo... | class class_name[name] begin[{]
method[get, return_type[type[TypeVariableName]], modifier[static], parameter[mirror, typeVariables]] begin[{]
local_variable[type[TypeParameterElement], element]
local_variable[type[TypeVariableName], typeVariableName]
if[binary_operation[member[.... | Keyword[static] identifier[TypeVariableName] identifier[get] operator[SEP] identifier[TypeVariable] identifier[mirror] , identifier[Map] operator[<] identifier[TypeParameterElement] , identifier[TypeVariableName] operator[>] identifier[typeVariables] operator[SEP] {
identifier[TypeParameterElement] identifier[... |
@Nullable
public static ThreadFactory unwrap(@Nullable ThreadFactory threadFactory) {
if (!isDisableInheritableThreadFactory(threadFactory)) return threadFactory;
return ((DisableInheritableThreadFactory) threadFactory).unwrap();
} | class class_name[name] begin[{]
method[unwrap, return_type[type[ThreadFactory]], modifier[public static], parameter[threadFactory]] begin[{]
if[call[.isDisableInheritableThreadFactory, parameter[member[.threadFactory]]]] begin[{]
return[member[.threadFactory]]
else begin[{]
None
... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[ThreadFactory] identifier[unwrap] operator[SEP] annotation[@] identifier[Nullable] identifier[ThreadFactory] identifier[threadFactory] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[isDisableInheritableThreadFactory] ... |
public static void endAccessContext() {
AccessContext.clearAccessContextOnThread();
final AccessContext accessContext = SuspendedAccessContext.getAccessContextOnThread();
if (accessContext != null) { // resume
AccessContext.setAccessContextOnThread(accessContext);
Suspend... | class class_name[name] begin[{]
method[endAccessContext, return_type[void], modifier[public static], parameter[]] begin[{]
call[AccessContext.clearAccessContextOnThread, parameter[]]
local_variable[type[AccessContext], accessContext]
if[binary_operation[member[.accessCon... | Keyword[public] Keyword[static] Keyword[void] identifier[endAccessContext] operator[SEP] operator[SEP] {
identifier[AccessContext] operator[SEP] identifier[clearAccessContextOnThread] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[AccessContext] identifier[accessContext] operator[=] identifi... |
public void removeAllConversations(Object connectionReference) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "removeAllConversations", connectionReference);
final ArrayList list;
synchronized (activeConversations) {
list = (Arra... | class class_name[name] begin[{]
method[removeAllConversations, return_type[void], modifier[public], parameter[connectionReference]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entr... | Keyword[public] Keyword[void] identifier[removeAllConversations] operator[SEP] identifier[Object] identifier[connectionReference] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP... |
private void setStartRule(int month, int dayOfWeekInMonth, int dayOfWeek, int time, int mode) {
assert (!isFrozen());
startMonth = month;
startDay = dayOfWeekInMonth;
startDayOfWeek = dayOfWeek;
startTime = time;
startTimeMode = mode;
decodeStart... | class class_name[name] begin[{]
method[setStartRule, return_type[void], modifier[private], parameter[month, dayOfWeekInMonth, dayOfWeek, time, mode]] begin[{]
AssertStatement(condition=MethodInvocation(arguments=[], member=isFrozen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], t... | Keyword[private] Keyword[void] identifier[setStartRule] operator[SEP] Keyword[int] identifier[month] , Keyword[int] identifier[dayOfWeekInMonth] , Keyword[int] identifier[dayOfWeek] , Keyword[int] identifier[time] , Keyword[int] identifier[mode] operator[SEP] {
Keyword[assert] operator[SEP] operator[!] ident... |
public Class locatePropertiesClassForType(final ClassOrInterfaceType type) {
if (cachedPropertiesClasses.containsKey(type.getNameAsString())) {
return cachedPropertiesClasses.get(type.getNameAsString());
}
val packageName = ConfigurationMetadataGenerator.class.getPackage().getName()... | class class_name[name] begin[{]
method[locatePropertiesClassForType, return_type[type[Class]], modifier[public], parameter[type]] begin[{]
if[call[cachedPropertiesClasses.containsKey, parameter[call[type.getNameAsString, parameter[]]]]] begin[{]
return[call[cachedPropertiesClasses.g... | Keyword[public] identifier[Class] identifier[locatePropertiesClassForType] operator[SEP] Keyword[final] identifier[ClassOrInterfaceType] identifier[type] operator[SEP] {
Keyword[if] operator[SEP] identifier[cachedPropertiesClasses] operator[SEP] identifier[containsKey] operator[SEP] identifier[type] operator[SEP... |
public void itransVector()
{
// itrans_consonants = new Vector();
itransVowels.add("a : \u0905");
itransVowels.add("aa/A : \u0906");
itransVowels.add("i : \u0907");
itransVowels.add("ii/I : \u0908");
itransVowels.add("u : \u0909");
itransVowels.add("uu/U : \... | class class_name[name] begin[{]
method[itransVector, return_type[void], modifier[public], parameter[]] begin[{]
call[itransVowels.add, parameter[literal["a : अ"]]]
call[itransVowels.add, parameter[literal["aa/A : आ"]]]
call[itransVowels.add, parameter[literal["i ... | Keyword[public] Keyword[void] identifier[itransVector] operator[SEP] operator[SEP] {
identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] id... |
public EEnum getIfcHeatExchangerTypeEnum() {
if (ifcHeatExchangerTypeEnumEEnum == null) {
ifcHeatExchangerTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(846);
}
return ifcHeatExchangerTypeEnumEEnum;
} | class class_name[name] begin[{]
method[getIfcHeatExchangerTypeEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcHeatExchangerTypeEnumEEnum], ==, literal[null]]] begin[{]
assign[member[.ifcHeatExchangerTypeEnumEEnum], C... | Keyword[public] identifier[EEnum] identifier[getIfcHeatExchangerTypeEnum] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcHeatExchangerTypeEnumEEnum] operator[==] Other[null] operator[SEP] {
identifier[ifcHeatExchangerTypeEnumEEnum] operator[=] operator[SEP] identifier[EEnum] ope... |
protected void backpatchMessageLength(final int startPosition, final BsonOutput bsonOutput) {
int messageLength = bsonOutput.getPosition() - startPosition;
bsonOutput.writeInt32(bsonOutput.getPosition() - messageLength, messageLength);
} | class class_name[name] begin[{]
method[backpatchMessageLength, return_type[void], modifier[protected], parameter[startPosition, bsonOutput]] begin[{]
local_variable[type[int], messageLength]
call[bsonOutput.writeInt32, parameter[binary_operation[call[bsonOutput.getPosition, parameter[]]... | Keyword[protected] Keyword[void] identifier[backpatchMessageLength] operator[SEP] Keyword[final] Keyword[int] identifier[startPosition] , Keyword[final] identifier[BsonOutput] identifier[bsonOutput] operator[SEP] {
Keyword[int] identifier[messageLength] operator[=] identifier[bsonOutput] operator[SEP] identifie... |
public Shape createScrollCap(int x, int y, int w, int h) {
path.reset();
path.moveTo(x, y);
path.lineTo(x, y + h);
path.lineTo(x + w, y + h);
addScrollGapPath(x, y, w, h, true);
path.closePath();
return path;
} | class class_name[name] begin[{]
method[createScrollCap, return_type[type[Shape]], modifier[public], parameter[x, y, w, h]] begin[{]
call[path.reset, parameter[]]
call[path.moveTo, parameter[member[.x], member[.y]]]
call[path.lineTo, parameter[member[.x], binary_o... | Keyword[public] identifier[Shape] identifier[createScrollCap] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[w] , Keyword[int] identifier[h] operator[SEP] {
identifier[path] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[pa... |
@Override
public void init(VirtualConnection inVC) {
this.vcHashCode = inVC.hashCode();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "init, vc=" + getVCHash());
}
// Create the read and write interfaces for this connection link.
... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[inVC]] begin[{]
assign[THIS[member[None.vcHashCode]], call[inVC.hashCode, parameter[]]]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabl... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[VirtualConnection] identifier[inVC] operator[SEP] {
Keyword[this] operator[SEP] identifier[vcHashCode] operator[=] identifier[inVC] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SE... |
public Node getBestSuggestions(String prefix) {
if(prefix.isEmpty())
throw new IllegalArgumentException();
int i = 0;
Node n = root;
while(n != null) {
if(prefix.charAt(i) < n.firstChar)
n = n.left;
else if(prefix.charAt(i) > n.firstCha... | class class_name[name] begin[{]
method[getBestSuggestions, return_type[type[Node]], modifier[public], parameter[prefix]] begin[{]
if[call[prefix.isEmpty, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[],... | Keyword[public] identifier[Node] identifier[getBestSuggestions] operator[SEP] identifier[String] identifier[prefix] operator[SEP] {
Keyword[if] operator[SEP] identifier[prefix] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentExcept... |
@SuppressWarnings("deprecation")
protected String getExpressionUrl(String expression) {
String template = _config.getValue(Property.AUDIT_METRIC_URL_TEMPLATE.getName(), Property.AUDIT_METRIC_URL_TEMPLATE.getDefaultValue());
try {
expression = URLEncoder.encode(expression, "UTF-8");
} catch (Exception ex) {
... | class class_name[name] begin[{]
method[getExpressionUrl, return_type[type[String]], modifier[protected], parameter[expression]] begin[{]
local_variable[type[String], template]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=expression, postfix_op... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[String] identifier[getExpressionUrl] operator[SEP] identifier[String] identifier[expression] operator[SEP] {
identifier[String] identifier[template] operator[=] identifier[_config] operator[SEP] i... |
public StringBuffer minifyStringBuffer(StringBuffer sb, Charset charset) throws IOException, JSMinException {
byte[] bundleBytes = sb.toString().getBytes(charset.name());
ByteArrayInputStream bIs = new ByteArrayInputStream(bundleBytes);
ByteArrayOutputStream bOs = new ByteArrayOutputStream();
// Compress data ... | class class_name[name] begin[{]
method[minifyStringBuffer, return_type[type[StringBuffer]], modifier[public], parameter[sb, charset]] begin[{]
local_variable[type[byte], bundleBytes]
local_variable[type[ByteArrayInputStream], bIs]
local_variable[type[ByteArrayOutputStream], bOs]
... | Keyword[public] identifier[StringBuffer] identifier[minifyStringBuffer] operator[SEP] identifier[StringBuffer] identifier[sb] , identifier[Charset] identifier[charset] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JSMinException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[bundl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.