code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
private static void setUnconditionalArgumentNullness(
Updates bothUpdates, List<Node> arguments, ClassAndMethod callee) {
Set<Integer> requiredNonNullParameters = REQUIRED_NON_NULL_PARAMETERS.get(callee.name());
for (LocalVariableNode var : variablesAtIndexes(requiredNonNullParameters, arguments)) {
... | class class_name[name] begin[{]
method[setUnconditionalArgumentNullness, return_type[void], modifier[private static], parameter[bothUpdates, arguments, callee]] begin[{]
local_variable[type[Set], requiredNonNullParameters]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpres... | Keyword[private] Keyword[static] Keyword[void] identifier[setUnconditionalArgumentNullness] operator[SEP] identifier[Updates] identifier[bothUpdates] , identifier[List] operator[<] identifier[Node] operator[>] identifier[arguments] , identifier[ClassAndMethod] identifier[callee] operator[SEP] {
identifier[Set]... |
public VircurexLastTrade getVircurexTicker(CurrencyPair currencyPair) throws IOException {
VircurexLastTrade vircurexLastTrade =
vircurexAuthenticated.getLastTrade(
currencyPair.base.getCurrencyCode().toLowerCase(),
currencyPair.counter.getCurrencyCode().toLowerCase());
return ... | class class_name[name] begin[{]
method[getVircurexTicker, return_type[type[VircurexLastTrade]], modifier[public], parameter[currencyPair]] begin[{]
local_variable[type[VircurexLastTrade], vircurexLastTrade]
return[member[.vircurexLastTrade]]
end[}]
END[}] | Keyword[public] identifier[VircurexLastTrade] identifier[getVircurexTicker] operator[SEP] identifier[CurrencyPair] identifier[currencyPair] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[VircurexLastTrade] identifier[vircurexLastTrade] operator[=] identifier[vircurexAuthenticated] operator[SE... |
@Override
public void setExceptionListener(ExceptionListener eListener) throws IllegalStateRuntimeException, JMSRuntimeException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "setExceptionListener", new Object[] { eListener });
try {
... | class class_name[name] begin[{]
method[setExceptionListener, return_type[void], modifier[public], parameter[eListener]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setExceptionListener] operator[SEP] identifier[ExceptionListener] identifier[eListener] operator[SEP] Keyword[throws] identifier[IllegalStateRuntimeException] , identifier[JMSRuntimeException] {
Keyword[if] operator[SEP] identifier[Trac... |
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "solidArrayProperty")
public JAXBElement<SolidArrayPropertyType> createSolidArrayProperty(SolidArrayPropertyType value) {
return new JAXBElement<SolidArrayPropertyType>(_SolidArrayProperty_QNAME, SolidArrayPropertyType.class, null, value);
... | class class_name[name] begin[{]
method[createSolidArrayProperty, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_SolidArrayProperty_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassRefer... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[SolidArrayPropertyType] operator[>] identifier[createSolidArrayProperty] operator[SEP] ide... |
protected static void registerStatsdMetricObserver(List<MetricObserver> observers, String prefix, String host, String port) {
// verify at least hostname is set, else cannot configure this observer
if (null == host || host.trim().isEmpty()) {
LOGGER.info("StatdsMetricObserver not configured,... | class class_name[name] begin[{]
method[registerStatsdMetricObserver, return_type[void], modifier[static protected], parameter[observers, prefix, host, port]] begin[{]
if[binary_operation[binary_operation[literal[null], ==, member[.host]], ||, call[host.trim, parameter[]]]] begin[{]
... | Keyword[protected] Keyword[static] Keyword[void] identifier[registerStatsdMetricObserver] operator[SEP] identifier[List] operator[<] identifier[MetricObserver] operator[>] identifier[observers] , identifier[String] identifier[prefix] , identifier[String] identifier[host] , identifier[String] identifier[port] operato... |
public void setAdapter(StickyListHeadersAdapter adapter) {
if (adapter == null) {
if (mAdapter instanceof SectionIndexerAdapterWrapper) {
((SectionIndexerAdapterWrapper) mAdapter).mSectionIndexerDelegate = null;
}
if (mAdapter != null) {
mAdapt... | class class_name[name] begin[{]
method[setAdapter, return_type[void], modifier[public], parameter[adapter]] begin[{]
if[binary_operation[member[.adapter], ==, literal[null]]] begin[{]
if[binary_operation[member[.mAdapter], instanceof, type[SectionIndexerAdapterWrapper]]]... | Keyword[public] Keyword[void] identifier[setAdapter] operator[SEP] identifier[StickyListHeadersAdapter] identifier[adapter] operator[SEP] {
Keyword[if] operator[SEP] identifier[adapter] operator[==] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[mAdapter] Keyword[instanceof] identifi... |
protected Integer getKeyHash(final Map<String, Object> seed) {
//Determine the attributes to build the cache key with
final Set<String> cacheAttributes;
if (this.useAllAttributes) {
cacheAttributes = seed.keySet();
} else if (this.cacheKeyAttributes != null) {
cac... | class class_name[name] begin[{]
method[getKeyHash, return_type[type[Integer]], modifier[protected], parameter[seed]] begin[{]
local_variable[type[Set], cacheAttributes]
if[THIS[member[None.useAllAttributes]]] begin[{]
assign[member[.cacheAttributes], call[seed.ke... | Keyword[protected] identifier[Integer] identifier[getKeyHash] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[seed] operator[SEP] {
Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[cacheAttributes] operat... |
public static void checkArgument(boolean b, String message, Object... args) {
if (!b) {
throwEx(message, args);
}
} | class class_name[name] begin[{]
method[checkArgument, return_type[void], modifier[public static], parameter[b, message, args]] begin[{]
if[member[.b]] begin[{]
call[.throwEx, parameter[member[.message], member[.args]]]
else begin[{]
None
end[}]
end[}]... | Keyword[public] Keyword[static] Keyword[void] identifier[checkArgument] operator[SEP] Keyword[boolean] identifier[b] , identifier[String] identifier[message] , identifier[Object] operator[...] identifier[args] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[b] operator[SEP] {
identi... |
private static MethodRef getSetOrAddMethod(FieldDescriptor descriptor) {
TypeInfo builder = builderRuntimeType(descriptor.getContainingType());
String prefix = descriptor.isRepeated() ? "add" : "set";
boolean isProto3EnumField = isProto3EnumField(descriptor);
String suffix = isProto3EnumField ? "Value" ... | class class_name[name] begin[{]
method[getSetOrAddMethod, return_type[type[MethodRef]], modifier[private static], parameter[descriptor]] begin[{]
local_variable[type[TypeInfo], builder]
local_variable[type[String], prefix]
local_variable[type[boolean], isProto3EnumField]
local_v... | Keyword[private] Keyword[static] identifier[MethodRef] identifier[getSetOrAddMethod] operator[SEP] identifier[FieldDescriptor] identifier[descriptor] operator[SEP] {
identifier[TypeInfo] identifier[builder] operator[=] identifier[builderRuntimeType] operator[SEP] identifier[descriptor] operator[SEP] identifier[g... |
public static InternalLogApi getLog(Class<?> clazz) {
return factoryConfigured
? factory.doGetLog(clazz)
: new InternalLog(clazz.getName()); // will look up actual logger per log
} | class class_name[name] begin[{]
method[getLog, return_type[type[InternalLogApi]], modifier[public static], parameter[clazz]] begin[{]
return[TernaryExpression(condition=MemberReference(member=factoryConfigured, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=ClassCreator(... | Keyword[public] Keyword[static] identifier[InternalLogApi] identifier[getLog] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] {
Keyword[return] identifier[factoryConfigured] operator[?] identifier[factory] operator[SEP] identifier[doGetLog] operator[SEP] identi... |
protected void processForwardConfig( HttpServletRequest request, HttpServletResponse response, ForwardConfig fwd )
throws IOException, ServletException
{
ServletContext servletContext = getServletContext();
ForwardRedirectHandler fwdRedirectHandler = _handlers.getForwardRedirectHandler()... | class class_name[name] begin[{]
method[processForwardConfig, return_type[void], modifier[protected], parameter[request, response, fwd]] begin[{]
local_variable[type[ServletContext], servletContext]
local_variable[type[ForwardRedirectHandler], fwdRedirectHandler]
local_variable[type[Flow... | Keyword[protected] Keyword[void] identifier[processForwardConfig] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , identifier[ForwardConfig] identifier[fwd] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] {... |
private void mapFormContainerStatesTo(
Form previousMappedForm,
ResultSet resultSetParam
) throws SQLException {
if(previousMappedForm == null) {
return;
}
//Form Container State...
Long formContainerState = resultSetParam.getLong(
SQLColumnIndex._07_FORM_CONTAINER_STATE);
long formContStateId ... | class class_name[name] begin[{]
method[mapFormContainerStatesTo, return_type[void], modifier[private], parameter[previousMappedForm, resultSetParam]] begin[{]
if[binary_operation[member[.previousMappedForm], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
... | Keyword[private] Keyword[void] identifier[mapFormContainerStatesTo] operator[SEP] identifier[Form] identifier[previousMappedForm] , identifier[ResultSet] identifier[resultSetParam] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[previousMappedForm] operator[==] Othe... |
synchronized void refresh(RollingSegmentHandle source) {
Preconditions.checkArgument(source.getSegmentName().equals(this.getSegmentName()), "SegmentName mismatch.");
if (this.readOnly == source.readOnly) {
// Update the header handle, but only if both this handle and the source one have the ... | class class_name[name] begin[{]
method[refresh, return_type[void], modifier[synchronized], parameter[source]] begin[{]
call[Preconditions.checkArgument, parameter[call[source.getSegmentName, parameter[]], literal["SegmentName mismatch."]]]
if[binary_operation[THIS[member[None.re... | Keyword[synchronized] Keyword[void] identifier[refresh] operator[SEP] identifier[RollingSegmentHandle] identifier[source] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[source] operator[SEP] identifier[getSegmentName] operator[SEP] operator[SEP] operato... |
public Vector2i mul(int scalar, Vector2i dest) {
dest.x = x * scalar;
dest.y = y * scalar;
return dest;
} | class class_name[name] begin[{]
method[mul, return_type[type[Vector2i]], modifier[public], parameter[scalar, dest]] begin[{]
assign[member[dest.x], binary_operation[member[.x], *, member[.scalar]]]
assign[member[dest.y], binary_operation[member[.y], *, member[.scalar]]]
... | Keyword[public] identifier[Vector2i] identifier[mul] operator[SEP] Keyword[int] identifier[scalar] , identifier[Vector2i] identifier[dest] operator[SEP] {
identifier[dest] operator[SEP] identifier[x] operator[=] identifier[x] operator[*] identifier[scalar] operator[SEP] identifier[dest] operator[SEP] identifier... |
@Override
public ConsumerManager chooseConsumerManager(SIBUuid12 gatheringTargetUuid,
SIBUuid8 fixedMEUuid,
HashSet<SIBUuid8> scopedMEs)
throws SIResourceException
{
if (TraceComponent.i... | class class_name[name] begin[{]
method[chooseConsumerManager, return_type[type[ConsumerManager]], modifier[public], parameter[gatheringTargetUuid, fixedMEUuid, scopedMEs]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]... | annotation[@] identifier[Override] Keyword[public] identifier[ConsumerManager] identifier[chooseConsumerManager] operator[SEP] identifier[SIBUuid12] identifier[gatheringTargetUuid] , identifier[SIBUuid8] identifier[fixedMEUuid] , identifier[HashSet] operator[<] identifier[SIBUuid8] operator[>] identifier[scopedMEs] o... |
public static boolean log(Level level, Throwable t, String format, Object... arguments) {
return log(LogFactory.get(CallerUtil.getCallerCaller()), level, t, format, arguments);
} | class class_name[name] begin[{]
method[log, return_type[type[boolean]], modifier[public static], parameter[level, t, format, arguments]] begin[{]
return[call[.log, parameter[call[LogFactory.get, parameter[call[CallerUtil.getCallerCaller, parameter[]]]], member[.level], member[.t], member[.format], memb... | Keyword[public] Keyword[static] Keyword[boolean] identifier[log] operator[SEP] identifier[Level] identifier[level] , identifier[Throwable] identifier[t] , identifier[String] identifier[format] , identifier[Object] operator[...] identifier[arguments] operator[SEP] {
Keyword[return] identifier[log] operator[SEP... |
public boolean checkTimeframeArg(String timeframe) {
if (Pattern.compile("\\d*(d|h)", Pattern.CASE_INSENSITIVE).matcher(timeframe).matches()) {
return true;
} else {
return false;
}
} | class class_name[name] begin[{]
method[checkTimeframeArg, return_type[type[boolean]], modifier[public], parameter[timeframe]] begin[{]
if[call[Pattern.compile, parameter[literal["\\d*(d|h)"], member[Pattern.CASE_INSENSITIVE]]]] begin[{]
return[literal[true]]
else begin[{]
... | Keyword[public] Keyword[boolean] identifier[checkTimeframeArg] operator[SEP] identifier[String] identifier[timeframe] operator[SEP] {
Keyword[if] operator[SEP] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] literal[String] , identifier[Pattern] operator[SEP] identifier[CASE_INSENSITIVE] ope... |
@Override
public void init (Injector injector)
throws Exception
{
super.init(injector);
// configure the client manager to use our bits
_clmgr.setDefaultSessionFactory(new SessionFactory() {
@Override
public Class<? extends PresentsSession> getSessionClas... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[injector]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=injector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=init, postfix_operators=[], prefix_oper... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[Injector] identifier[injector] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[super] operator[SEP] identifier[init] operator[SEP] identifier[injector] operator[SEP] operator[SEP] identifier[_... |
public void writeString(String value) throws UnsupportedEncodingException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeString", value);
getBodyList().add(value);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "writeStri... | class class_name[name] begin[{]
method[writeString, return_type[void], modifier[public], parameter[value]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[THIS[], memb... | Keyword[public] Keyword[void] identifier[writeString] operator[SEP] identifier[String] identifier[value] operator[SEP] Keyword[throws] identifier[UnsupportedEncodingException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator... |
public static <T> T invokeSetters(final T instance, final Map<String,Object> vars)
throws ReflectiveOperationException {
if (instance != null && vars != null) {
final Class<?> clazz = instance.getClass();
final Method[] methods = clazz.getMethods();
for (final En... | class class_name[name] begin[{]
method[invokeSetters, return_type[type[T]], modifier[public static], parameter[instance, vars]] begin[{]
if[binary_operation[binary_operation[member[.instance], !=, literal[null]], &&, binary_operation[member[.vars], !=, literal[null]]]] begin[{]
loca... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[invokeSetters] operator[SEP] Keyword[final] identifier[T] identifier[instance] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[vars] operator[SEP] Keyword[throws] ... |
public static HsqlProperties argArrayToProps(String[] arg, String type) {
HsqlProperties props = new HsqlProperties();
for (int i = 0; i < arg.length; i++) {
String p = arg[i];
if (p.equals("--help") || p.equals("-help")) {
props.addError(NO_VALUE_FOR_KEY, p.su... | class class_name[name] begin[{]
method[argArrayToProps, return_type[type[HsqlProperties]], modifier[public static], parameter[arg, type]] begin[{]
local_variable[type[HsqlProperties], props]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declar... | Keyword[public] Keyword[static] identifier[HsqlProperties] identifier[argArrayToProps] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[arg] , identifier[String] identifier[type] operator[SEP] {
identifier[HsqlProperties] identifier[props] operator[=] Keyword[new] identifier[HsqlPropertie... |
public static String getLocation(File file) {
Assert.notNull(file, "File cannot be null");
File parent = file.getParentFile();
Assert.notNull(parent, new IllegalArgumentException(String.format(
"Unable to determine the location of file [%1$s]", file)));
return tryGetCanonicalPathElseGetAbsolutePat... | class class_name[name] begin[{]
method[getLocation, return_type[type[String]], modifier[public static], parameter[file]] begin[{]
call[Assert.notNull, parameter[member[.file], literal["File cannot be null"]]]
local_variable[type[File], parent]
call[Assert.notNull, parame... | Keyword[public] Keyword[static] identifier[String] identifier[getLocation] operator[SEP] identifier[File] identifier[file] operator[SEP] {
identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[file] , literal[String] operator[SEP] operator[SEP] identifier[File] identifier[parent] operato... |
protected Check<T> newCheck(final String id, final IModel<T> model, final int index)
{
final Check<T> check = new Check<T>(id, model)
{
/**
* The serialVersionUID.
*/
private static final long serialVersionUID = 1L;
/**
* {@inheritDoc}
*/
@Override
public IModel<String> getLabel()
... | class class_name[name] begin[{]
method[newCheck, return_type[type[Check]], modifier[protected], parameter[id, model, index]] begin[{]
local_variable[type[Check], check]
return[member[.check]]
end[}]
END[}] | Keyword[protected] identifier[Check] operator[<] identifier[T] operator[>] identifier[newCheck] operator[SEP] Keyword[final] identifier[String] identifier[id] , Keyword[final] identifier[IModel] operator[<] identifier[T] operator[>] identifier[model] , Keyword[final] Keyword[int] identifier[index] operator[SEP] {
... |
public static void lsp_prev_compose(
float lsp_ele[], /* (i) Q13 : LSP vectors */
float lsp[], /* (o) Q13 : quantized LSP parameters */
float fg[][], /* (i) Q15 : MA prediction coef. */
float freq_prev[][], /* (i) Q13 : previous LS... | class class_name[name] begin[{]
method[lsp_prev_compose, return_type[void], modifier[public static], parameter[lsp_ele, lsp, fg, freq_prev, fg_sum]] begin[{]
local_variable[type[int], j]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressio... | Keyword[public] Keyword[static] Keyword[void] identifier[lsp_prev_compose] operator[SEP] Keyword[float] identifier[lsp_ele] operator[SEP] operator[SEP] , Keyword[float] identifier[lsp] operator[SEP] operator[SEP] , Keyword[float] identifier[fg] operator[SEP] operator[SEP] operator[SEP] operator[SEP] , Keyword[float]... |
public void reset() {
origVisibleRange = new Range(0, this.delegate.getList().size());
snapshot();
clearFilter();
filter.setText("");
} | class class_name[name] begin[{]
method[reset, return_type[void], modifier[public], parameter[]] begin[{]
assign[member[.origVisibleRange], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), This(postfix_operators=[], prefix_operato... | Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] {
identifier[origVisibleRange] operator[=] Keyword[new] identifier[Range] operator[SEP] Other[0] , Keyword[this] operator[SEP] identifier[delegate] operator[SEP] identifier[getList] operator[SEP] operator[SEP] operator[SEP] identifier[s... |
public static boolean intersect(LineParametric3D_F64 line , Sphere3D_F64 sphere ,
Point3D_F64 a, Point3D_F64 b ) {
// this equation was found by solving for l:
// ||(P + V*l) - X0|| == r
double r2 = sphere.radius*sphere.radius;
double PP = GeometryMath_F64.dot(line.p,line.p);
double PV = GeometryM... | class class_name[name] begin[{]
method[intersect, return_type[type[boolean]], modifier[public static], parameter[line, sphere, a, b]] begin[{]
local_variable[type[double], r2]
local_variable[type[double], PP]
local_variable[type[double], PV]
local_variable[type[double], PX]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[intersect] operator[SEP] identifier[LineParametric3D_F64] identifier[line] , identifier[Sphere3D_F64] identifier[sphere] , identifier[Point3D_F64] identifier[a] , identifier[Point3D_F64] identifier[b] operator[SEP] {
Keyword[double] identifier[r2] op... |
@Override
public void visit(final GedFile gedfile) {
Root root;
if (gedfile.getFinder() == null) {
root = new Root();
} else {
root = new Root(gedfile.getFinder());
}
root.setFilename(gedfile.getFilename());
root.setDbName(gedfile.getDbName());... | class class_name[name] begin[{]
method[visit, return_type[void], modifier[public], parameter[gedfile]] begin[{]
local_variable[type[Root], root]
if[binary_operation[call[gedfile.getFinder, parameter[]], ==, literal[null]]] begin[{]
assign[member[.root], ClassCrea... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] Keyword[final] identifier[GedFile] identifier[gedfile] operator[SEP] {
identifier[Root] identifier[root] operator[SEP] Keyword[if] operator[SEP] identifier[gedfile] operator[SEP] identifier[getFinder] operator[SEP] o... |
@SuppressWarnings("rawtypes")
public boolean hasSensitiveWord(String source)
{
char[] chars = source.toCharArray();
Map nowMap = pool;
for (int i = 0; i < chars.length; i++)
{
char ch = Character.toUpperCase(chars[i]);
nowMap = (Map) nowMap.get(ch);
if (nowMap != null)
{
if ("1".equals(nowMap.... | class class_name[name] begin[{]
method[hasSensitiveWord, return_type[type[boolean]], modifier[public], parameter[source]] begin[{]
local_variable[type[char], chars]
local_variable[type[Map], nowMap]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annota... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[boolean] identifier[hasSensitiveWord] operator[SEP] identifier[String] identifier[source] operator[SEP] {
Keyword[char] operator[SEP] operator[SEP] identifier[chars] operator[=] identifier[source] opera... |
public Observable<List<DatabasePrincipalInner>> listPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName) {
return listPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).map(new Func1<ServiceResponse<List<DatabasePrincipalInner>>, List<DatabasePrincipal... | class class_name[name] begin[{]
method[listPrincipalsAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, clusterName, databaseName]] begin[{]
return[call[.listPrincipalsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.clusterName], member[.databas... | Keyword[public] identifier[Observable] operator[<] identifier[List] operator[<] identifier[DatabasePrincipalInner] operator[>] operator[>] identifier[listPrincipalsAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[clusterName] , identifier[String] identifier[databas... |
private void convertYieldOfAsyncGenerator(NodeTraversal t, LexicalContext ctx, Node yieldNode) {
checkNotNull(yieldNode);
checkState(yieldNode.isYield());
checkState(ctx != null && ctx.function != null);
checkState(ctx.function.isAsyncGeneratorFunction());
Node expression = yieldNode.removeFirstChi... | class class_name[name] begin[{]
method[convertYieldOfAsyncGenerator, return_type[void], modifier[private], parameter[t, ctx, yieldNode]] begin[{]
call[.checkNotNull, parameter[member[.yieldNode]]]
call[.checkState, parameter[call[yieldNode.isYield, parameter[]]]]
... | Keyword[private] Keyword[void] identifier[convertYieldOfAsyncGenerator] operator[SEP] identifier[NodeTraversal] identifier[t] , identifier[LexicalContext] identifier[ctx] , identifier[Node] identifier[yieldNode] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[yieldNode] operator[SEP] operator... |
@Handler(dynamic = true)
public void onConfigurationUpdate(ConfigurationUpdate event)
throws BackingStoreException {
if (event instanceof InitialPreferences) {
return;
}
for (String path : event.paths()) {
Optional<Map<String, String>> prefs = event.values... | class class_name[name] begin[{]
method[onConfigurationUpdate, return_type[void], modifier[public], parameter[event]] begin[{]
if[binary_operation[member[.event], instanceof, type[InitialPreferences]]] begin[{]
return[None]
else begin[{]
None
end[}]
ForStateme... | annotation[@] identifier[Handler] operator[SEP] identifier[dynamic] operator[=] literal[boolean] operator[SEP] Keyword[public] Keyword[void] identifier[onConfigurationUpdate] operator[SEP] identifier[ConfigurationUpdate] identifier[event] operator[SEP] Keyword[throws] identifier[BackingStoreException] {
Keyword[... |
public static BeanInfo createBeanInfo(Class<? extends Object> c) {
BeanInfo bi = DefaultBeanInfoResolver.getBeanInfoHelper(c);
if (bi == null) {
bi = new ConfigBeanInfo(c);
DefaultBeanInfoResolver.addBeanInfo(c, bi);
}
return bi;
} | class class_name[name] begin[{]
method[createBeanInfo, return_type[type[BeanInfo]], modifier[public static], parameter[c]] begin[{]
local_variable[type[BeanInfo], bi]
if[binary_operation[member[.bi], ==, literal[null]]] begin[{]
assign[member[.bi], ClassCreator(a... | Keyword[public] Keyword[static] identifier[BeanInfo] identifier[createBeanInfo] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Object] operator[>] identifier[c] operator[SEP] {
identifier[BeanInfo] identifier[bi] operator[=] identifier[DefaultBeanInfoResolver] operator[SEP] i... |
public Table addTableToContent(final String name, final int rowCapacity,
final int columnCapacity) throws IOException {
final Table previousTable = this.contentElement.getLastTable();
final Table table = this.contentElement.addTable(name, rowCapacity, columnCapacity... | class class_name[name] begin[{]
method[addTableToContent, return_type[type[Table]], modifier[public], parameter[name, rowCapacity, columnCapacity]] begin[{]
local_variable[type[Table], previousTable]
local_variable[type[Table], table]
THIS[member[None.settingsElement]call[None.a... | Keyword[public] identifier[Table] identifier[addTableToContent] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] Keyword[int] identifier[rowCapacity] , Keyword[final] Keyword[int] identifier[columnCapacity] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] ... |
public boolean selectionChanged(Object source, int iStartRow, int iEndRow, int iSelectType)
{
boolean bChanged = super.selectionChanged(source, iStartRow, iEndRow, iSelectType);
if (bChanged)
{ // Notify all the listSelectionListeners
this.fireMySelectionChanged(new MyListSelecti... | class class_name[name] begin[{]
method[selectionChanged, return_type[type[boolean]], modifier[public], parameter[source, iStartRow, iEndRow, iSelectType]] begin[{]
local_variable[type[boolean], bChanged]
if[member[.bChanged]] begin[{]
THIS[call[None.fireMySelecti... | Keyword[public] Keyword[boolean] identifier[selectionChanged] operator[SEP] identifier[Object] identifier[source] , Keyword[int] identifier[iStartRow] , Keyword[int] identifier[iEndRow] , Keyword[int] identifier[iSelectType] operator[SEP] {
Keyword[boolean] identifier[bChanged] operator[=] Keyword[super] oper... |
public int writeDependencyEntry(Object id,
Object entry) {
int rc = NO_EXCEPTION;
if (!this.disableDependencyId) {
if (delayOffload) {
ValueSet vs = auxDataDependencyTable.getEntries(id);
if (vs == null) {
... | class class_name[name] begin[{]
method[writeDependencyEntry, return_type[type[int]], modifier[public], parameter[id, entry]] begin[{]
local_variable[type[int], rc]
if[THIS[member[None.disableDependencyId]]] begin[{]
if[member[.delayOffload]] begin[{]
... | Keyword[public] Keyword[int] identifier[writeDependencyEntry] operator[SEP] identifier[Object] identifier[id] , identifier[Object] identifier[entry] operator[SEP] {
Keyword[int] identifier[rc] operator[=] identifier[NO_EXCEPTION] operator[SEP] Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] id... |
@Override
public java.util.List<com.liferay.commerce.price.list.model.CommercePriceListAccountRel> getCommercePriceListAccountRels(
int start, int end) {
return _commercePriceListAccountRelLocalService.getCommercePriceListAccountRels(start,
end);
} | class class_name[name] begin[{]
method[getCommercePriceListAccountRels, return_type[type[java]], modifier[public], parameter[start, end]] begin[{]
return[call[_commercePriceListAccountRelLocalService.getCommercePriceListAccountRels, parameter[member[.start], member[.end]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[price] operator[SEP] identifier[list] operator[SEP] identifier[model... |
private AbstractHTTPDestination findDestination(HttpServletRequest req, Bus bus) throws ServletException
{
// Find destination based on request URI
String requestURI = req.getRequestURI();
DestinationRegistry destRegistry = getDestinationRegistryFromBus(bus);
if (destRegistry == null)
{... | class class_name[name] begin[{]
method[findDestination, return_type[type[AbstractHTTPDestination]], modifier[private], parameter[req, bus]] begin[{]
local_variable[type[String], requestURI]
local_variable[type[DestinationRegistry], destRegistry]
if[binary_operation[member[.destR... | Keyword[private] identifier[AbstractHTTPDestination] identifier[findDestination] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[Bus] identifier[bus] operator[SEP] Keyword[throws] identifier[ServletException] {
identifier[String] identifier[requestURI] operator[=] identifier[req] opera... |
public void setSeedUserListStatus(com.google.api.ads.adwords.axis.v201809.rm.UserListMembershipStatus seedUserListStatus) {
this.seedUserListStatus = seedUserListStatus;
} | class class_name[name] begin[{]
method[setSeedUserListStatus, return_type[void], modifier[public], parameter[seedUserListStatus]] begin[{]
assign[THIS[member[None.seedUserListStatus]], member[.seedUserListStatus]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setSeedUserListStatus] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[rm] opera... |
public static void
setOutputCompressorClass(JobConf conf,
Class<? extends CompressionCodec> codecClass) {
setCompressOutput(conf, true);
conf.setClass("mapred.output.compression.codec", codecClass,
CompressionCodec.class);
} | class class_name[name] begin[{]
method[setOutputCompressorClass, return_type[void], modifier[public static], parameter[conf, codecClass]] begin[{]
call[.setCompressOutput, parameter[member[.conf], literal[true]]]
call[conf.setClass, parameter[literal["mapred.output.compression.c... | Keyword[public] Keyword[static] Keyword[void] identifier[setOutputCompressorClass] operator[SEP] identifier[JobConf] identifier[conf] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[CompressionCodec] operator[>] identifier[codecClass] operator[SEP] {
identifier[setCompressOutput] operato... |
public static <T> LazyIterable<T> tap(Iterable<T> iterable, Procedure<? super T> procedure)
{
return new TapIterable<T>(iterable, procedure);
} | class class_name[name] begin[{]
method[tap, return_type[type[LazyIterable]], modifier[public static], parameter[iterable, procedure]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=iterable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pro... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[LazyIterable] operator[<] identifier[T] operator[>] identifier[tap] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[iterable] , identifier[Procedure] operator[<] operator[?] Keyword[super] identifier[T]... |
public void onImageChange(Bitmap bitmap, String localPath) {
if(profileLayoutView != null) {
profileLayoutView.onImageChange(bitmap);
}
// Set the image in the user settings
try {
UserUtils.getUserSettings(getContext()).setLocalImagePath(localPath);
}
catch (SocializeException e) {
Log.e(Sociali... | class class_name[name] begin[{]
method[onImageChange, return_type[void], modifier[public], parameter[bitmap, localPath]] begin[{]
if[binary_operation[member[.profileLayoutView], !=, literal[null]]] begin[{]
call[profileLayoutView.onImageChange, parameter[member[.bitmap]]... | Keyword[public] Keyword[void] identifier[onImageChange] operator[SEP] identifier[Bitmap] identifier[bitmap] , identifier[String] identifier[localPath] operator[SEP] {
Keyword[if] operator[SEP] identifier[profileLayoutView] operator[!=] Other[null] operator[SEP] {
identifier[profileLayoutView] operato... |
public static File getNewSubroot() throws IOException {
ensureUserRootExists();
File tempFile = File.createTempFile("foo", "", m_root);
if (!tempFile.delete()) {
throw new IOException();
}
tempFile = new File(tempFile.getPath() + m_magic);
if (!tempFile.mkdir(... | class class_name[name] begin[{]
method[getNewSubroot, return_type[type[File]], modifier[public static], parameter[]] begin[{]
call[.ensureUserRootExists, parameter[]]
local_variable[type[File], tempFile]
if[call[tempFile.delete, parameter[]]] begin[{]
ThrowSt... | Keyword[public] Keyword[static] identifier[File] identifier[getNewSubroot] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[ensureUserRootExists] operator[SEP] operator[SEP] operator[SEP] identifier[File] identifier[tempFile] operator[=] identifier[File] operator[SEP] identifier[c... |
public final EObject ruleXtendEnumLiteral() throws RecognitionException {
EObject current = null;
AntlrDatatypeRuleToken lv_name_1_0 = null;
enterRule();
try {
// InternalSARL.g:7417:2: ( ( () ( (lv_name_1_0= ruleValidID ) ) ) )
// InternalSARL.g:7418:2: ( (... | class class_name[name] begin[{]
method[ruleXtendEnumLiteral, return_type[type[EObject]], modifier[final public], parameter[]] begin[{]
local_variable[type[EObject], current]
local_variable[type[AntlrDatatypeRuleToken], lv_name_1_0]
call[.enterRule, parameter[]]
TryStatem... | Keyword[public] Keyword[final] identifier[EObject] identifier[ruleXtendEnumLiteral] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[AntlrDatatypeRuleToken] identifier[lv_name_1_0] operator[=] O... |
@Override
public RemoteModel setRemotingPort(Integer remotingPort) {
String rp = remotingPort != null ? remotingPort.toString() : null;
setModelAttribute("remotingPort", rp);
return this;
} | class class_name[name] begin[{]
method[setRemotingPort, return_type[type[RemoteModel]], modifier[public], parameter[remotingPort]] begin[{]
local_variable[type[String], rp]
call[.setModelAttribute, parameter[literal["remotingPort"], member[.rp]]]
return[THIS[]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[RemoteModel] identifier[setRemotingPort] operator[SEP] identifier[Integer] identifier[remotingPort] operator[SEP] {
identifier[String] identifier[rp] operator[=] identifier[remotingPort] operator[!=] Other[null] operator[?] identifier[remotingPort] op... |
@Override
public Map<String, WroModelFactory> provideModelFactories() {
final Map<String, WroModelFactory> map = new HashMap<String, WroModelFactory>();
map.put(GroovyModelFactory.ALIAS, new GroovyModelFactory());
map.put(JsonModelFactory.ALIAS, new JsonModelFactory());
map.put(SmartWroModelFactory.AL... | class class_name[name] begin[{]
method[provideModelFactories, return_type[type[Map]], modifier[public], parameter[]] begin[{]
local_variable[type[Map], map]
call[map.put, parameter[member[GroovyModelFactory.ALIAS], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, p... | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[WroModelFactory] operator[>] identifier[provideModelFactories] operator[SEP] operator[SEP] {
Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[WroModelFactory] operator[>] ide... |
private void applyDefaultValues(Map<String, Object> parameterValues) {
for (Parameter<?> parameter : allParameters) {
parameterValues.put(parameter.getName(), getParameterDefaultValue(parameter));
}
} | class class_name[name] begin[{]
method[applyDefaultValues, return_type[void], modifier[private], parameter[parameterValues]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfi... | Keyword[private] Keyword[void] identifier[applyDefaultValues] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameterValues] operator[SEP] {
Keyword[for] operator[SEP] identifier[Parameter] operator[<] operator[?] operator[>] identifier[parameter] opera... |
private void removePreferenceFragmentUnconditionally() {
if (isPreferenceFragmentShown()) {
resetTitle();
hideToolbarNavigationIcon();
adaptBreadCrumbVisibility();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transa... | class class_name[name] begin[{]
method[removePreferenceFragmentUnconditionally, return_type[void], modifier[private], parameter[]] begin[{]
if[call[.isPreferenceFragmentShown, parameter[]]] begin[{]
call[.resetTitle, parameter[]]
call[.hideToolbar... | Keyword[private] Keyword[void] identifier[removePreferenceFragmentUnconditionally] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isPreferenceFragmentShown] operator[SEP] operator[SEP] operator[SEP] {
identifier[resetTitle] operator[SEP] operator[SEP] operator[SEP] identifier[hideT... |
public int scanCStringLength() throws IOException {
int pos = index;
while (true) {
while (pos < endIndex) {
if (buffer[pos++] == '\0') {
return pos - index;
}
}
if (!readMore(STRING_SCAN_SPAN)) {
throw new EOFException();
}
pos = index;
}
} | class class_name[name] begin[{]
method[scanCStringLength, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], pos]
while[literal[true]] begin[{]
while[binary_operation[member[.pos], <, member[.endIndex]]] begin[{]
... | Keyword[public] Keyword[int] identifier[scanCStringLength] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[pos] operator[=] identifier[index] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
Keyword[while] operator[SEP] identifie... |
public void initialize(Server server) {
serverFailureCounts = new MeasuredRate(failureCountSlidingWindowInterval);
requestCountInWindow = new MeasuredRate(300000L);
if (publisher == null) {
dataDist = new DataDistribution(getBufferSize(), PERCENTS);
publisher = new DataPu... | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[public], parameter[server]] begin[{]
assign[member[.serverFailureCounts], ClassCreator(arguments=[MemberReference(member=failureCountSlidingWindowInterval, postfix_operators=[], prefix_operators=[], qualifier=, selec... | Keyword[public] Keyword[void] identifier[initialize] operator[SEP] identifier[Server] identifier[server] operator[SEP] {
identifier[serverFailureCounts] operator[=] Keyword[new] identifier[MeasuredRate] operator[SEP] identifier[failureCountSlidingWindowInterval] operator[SEP] operator[SEP] identifier[requestCoun... |
@Override
public void handleNotification(Notification notification, Object handback) {
if(notification instanceof MBeanServerNotification) {
MBeanServerNotification mbeanNotification = (MBeanServerNotification) notification;
if(mbeanNotification.getType().equals("JMX.mbean.registered... | class class_name[name] begin[{]
method[handleNotification, return_type[void], modifier[public], parameter[notification, handback]] begin[{]
if[binary_operation[member[.notification], instanceof, type[MBeanServerNotification]]] begin[{]
local_variable[type[MBeanServerNotification], m... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleNotification] operator[SEP] identifier[Notification] identifier[notification] , identifier[Object] identifier[handback] operator[SEP] {
Keyword[if] operator[SEP] identifier[notification] Keyword[instanceof] identifier[MBeanServerN... |
public BooleanExpr expand(BooleanExpr booleanExpr) {
if (booleanExpr == null || booleanExpr instanceof ConstantBooleanExpr) {
return booleanExpr;
}
Collector collector = new Collector();
booleanExpr.acceptVisitor(collector);
if (!collector.foundIndexed) {
return Constan... | class class_name[name] begin[{]
method[expand, return_type[type[BooleanExpr]], modifier[public], parameter[booleanExpr]] begin[{]
if[binary_operation[binary_operation[member[.booleanExpr], ==, literal[null]], ||, binary_operation[member[.booleanExpr], instanceof, type[ConstantBooleanExpr]]]] be... | Keyword[public] identifier[BooleanExpr] identifier[expand] operator[SEP] identifier[BooleanExpr] identifier[booleanExpr] operator[SEP] {
Keyword[if] operator[SEP] identifier[booleanExpr] operator[==] Other[null] operator[||] identifier[booleanExpr] Keyword[instanceof] identifier[ConstantBooleanExpr] operator[SEP... |
public CoinbaseTransaction requestMoneyCoinbaseRequest(
CoinbaseRequestMoneyRequest transactionRequest) throws IOException {
final CoinbaseTransaction pendingTransaction =
coinbase.requestMoney(
new CoinbaseTransaction(transactionRequest),
exchange.getExchangeSpecification().g... | class class_name[name] begin[{]
method[requestMoneyCoinbaseRequest, return_type[type[CoinbaseTransaction]], modifier[public], parameter[transactionRequest]] begin[{]
local_variable[type[CoinbaseTransaction], pendingTransaction]
return[call[.handleResponse, parameter[member[.pendingTransaction]]... | Keyword[public] identifier[CoinbaseTransaction] identifier[requestMoneyCoinbaseRequest] operator[SEP] identifier[CoinbaseRequestMoneyRequest] identifier[transactionRequest] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[CoinbaseTransaction] identifier[pendingTransaction] operat... |
public static MD5Hash computeMd5ForFile(File dataFile) throws IOException {
InputStream in = new FileInputStream(dataFile);
try {
MessageDigest digester = MD5Hash.getDigester();
DigestInputStream dis = new DigestInputStream(in, digester);
IOUtils.copyBytes(dis, new IOUtils.NullOutputStream(), ... | class class_name[name] begin[{]
method[computeMd5ForFile, return_type[type[MD5Hash]], modifier[public static], parameter[dataFile]] begin[{]
local_variable[type[InputStream], in]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initiali... | Keyword[public] Keyword[static] identifier[MD5Hash] identifier[computeMd5ForFile] operator[SEP] identifier[File] identifier[dataFile] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[InputStream] identifier[in] operator[=] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[dataFi... |
public static <T> CompletableFuture<Void> allOf(Collection<CompletableFuture<T>> futures) {
return CompletableFuture.allOf(futures.toArray(new CompletableFuture[futures.size()]));
} | class class_name[name] begin[{]
method[allOf, return_type[type[CompletableFuture]], modifier[public static], parameter[futures]] begin[{]
return[call[CompletableFuture.allOf, parameter[call[futures.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[CompletableFuture] operator[<] identifier[Void] operator[>] identifier[allOf] operator[SEP] identifier[Collection] operator[<] identifier[CompletableFuture] operator[<] identifier[T] operator[>] operator[>] identifier[futures] operator[SEP... |
private final String getValidJPAColumnName()
{
String name = null;
if (member.isAnnotationPresent(Column.class))
{
Column c = member.getAnnotation(Column.class);
if (!c.name().isEmpty())
{
name = c.name();
}
}
... | class class_name[name] begin[{]
method[getValidJPAColumnName, return_type[type[String]], modifier[final private], parameter[]] begin[{]
local_variable[type[String], name]
if[call[member.isAnnotationPresent, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, ... | Keyword[private] Keyword[final] identifier[String] identifier[getValidJPAColumnName] operator[SEP] operator[SEP] {
identifier[String] identifier[name] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[member] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[Column] ... |
public void close(final LogNode log) {
if (!closed.getAndSet(true)) {
if (inflaterRecycler != null) {
inflaterRecycler.forceClose();
inflaterRecycler = null;
}
if (moduleRefToModuleReaderProxyRecyclerMap != null) {
try {
... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[log]] begin[{]
if[call[closed.getAndSet, parameter[literal[true]]]] begin[{]
if[binary_operation[member[.inflaterRecycler], !=, literal[null]]] begin[{]
... | Keyword[public] Keyword[void] identifier[close] operator[SEP] Keyword[final] identifier[LogNode] identifier[log] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[closed] operator[SEP] identifier[getAndSet] operator[SEP] literal[boolean] operator[SEP] operator[SEP] {
Keyword[if] operato... |
public static Object[] toObjectArray(Object array) {
//fixme 以下写法太丑陋,其实可以简单实现
if (!array.getClass().isArray()) {
throw new IllegalArgumentException("入参必须是数组");
}
if (int[].class.isInstance(array)) {
int[] intArr = int[].class.cast(array);
Integer[] obj... | class class_name[name] begin[{]
method[toObjectArray, return_type[type[Object]], modifier[public static], parameter[array]] begin[{]
if[call[array.getClass, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qu... | Keyword[public] Keyword[static] identifier[Object] operator[SEP] operator[SEP] identifier[toObjectArray] operator[SEP] identifier[Object] identifier[array] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[array] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifi... |
public static boolean isDuplicated(final String input) {
int len = input.length();
if (len % 2 == 0) {
int half = len / 2;
if (hasEqualParts(input, half, half)) {
return true;
}
if (input.substring(half, half + 1).equals(" ")
&& input.substring(half - 1, half).matches("... | class class_name[name] begin[{]
method[isDuplicated, return_type[type[boolean]], modifier[public static], parameter[input]] begin[{]
local_variable[type[int], len]
if[binary_operation[binary_operation[member[.len], %, literal[2]], ==, literal[0]]] begin[{]
local_variable[typ... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isDuplicated] operator[SEP] Keyword[final] identifier[String] identifier[input] operator[SEP] {
Keyword[int] identifier[len] operator[=] identifier[input] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SE... |
public @Nullable <Z> Z mapWithCopyQuietly(Function<T, Z> function) {
final @Nullable SharedReference<T> localRef = getCopy();
try {
if (localRef == null) {
return function.apply(null);
} else {
return function.apply(localRef.get());
}
... | class class_name[name] begin[{]
method[mapWithCopyQuietly, return_type[type[Z]], modifier[public], parameter[function]] begin[{]
local_variable[type[SharedReference], localRef]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=localRef, postfix_operators=... | Keyword[public] annotation[@] identifier[Nullable] operator[<] identifier[Z] operator[>] identifier[Z] identifier[mapWithCopyQuietly] operator[SEP] identifier[Function] operator[<] identifier[T] , identifier[Z] operator[>] identifier[function] operator[SEP] {
Keyword[final] annotation[@] identifier[Nullable] id... |
@Override
protected void resumeFaxJobImpl(FaxJob faxJob)
{
//create HTTP request
HTTPRequest httpRequest=this.createResumeFaxJobHTTPRequest(faxJob);
//submit HTTP request
this.submitHTTPRequest(faxJob,httpRequest,FaxActionType.RESUME_FAX_JOB);
} | class class_name[name] begin[{]
method[resumeFaxJobImpl, return_type[void], modifier[protected], parameter[faxJob]] begin[{]
local_variable[type[HTTPRequest], httpRequest]
THIS[call[None.submitHTTPRequest, parameter[member[.faxJob], member[.httpRequest], member[FaxActionType.RESUME_FAX_... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[resumeFaxJobImpl] operator[SEP] identifier[FaxJob] identifier[faxJob] operator[SEP] {
identifier[HTTPRequest] identifier[httpRequest] operator[=] Keyword[this] operator[SEP] identifier[createResumeFaxJobHTTPRequest] operator[SEP] iden... |
private void step2primitive(DBIDRef id, DBIDArrayIter it, int n, Relation<? extends O> relation, PrimitiveDistanceFunction<? super O> distFunc, WritableDoubleDataStore m) {
O newObj = relation.get(id);
for(it.seek(0); it.getOffset() < n; it.advance()) {
// M(i) = dist(i, n+1)
m.putDouble(it, distFun... | class class_name[name] begin[{]
method[step2primitive, return_type[void], modifier[private], parameter[id, it, n, relation, distFunc, m]] begin[{]
local_variable[type[O], newObj]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[... | Keyword[private] Keyword[void] identifier[step2primitive] operator[SEP] identifier[DBIDRef] identifier[id] , identifier[DBIDArrayIter] identifier[it] , Keyword[int] identifier[n] , identifier[Relation] operator[<] operator[?] Keyword[extends] identifier[O] operator[>] identifier[relation] , identifier[PrimitiveDist... |
private static boolean inEncoding(char ch, String encoding) {
boolean isInEncoding;
try {
char cArray[] = new char[1];
cArray[0] = ch;
// Construct a String from the char
String s = new String(cArray);
// Encode the String into a sequence of b... | class class_name[name] begin[{]
method[inEncoding, return_type[type[boolean]], modifier[private static], parameter[ch, encoding]] begin[{]
local_variable[type[boolean], isInEncoding]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[None], ... | Keyword[private] Keyword[static] Keyword[boolean] identifier[inEncoding] operator[SEP] Keyword[char] identifier[ch] , identifier[String] identifier[encoding] operator[SEP] {
Keyword[boolean] identifier[isInEncoding] operator[SEP] Keyword[try] {
Keyword[char] identifier[cArray] operator[SEP] operator[... |
@Override
public Map<URI, MatchResult> listMatchesAtLeastOfType(URI origin, MatchType minType) {
return listMatchesWithinRange(origin, minType, this.matchTypesSupported.getHighest());
} | class class_name[name] begin[{]
method[listMatchesAtLeastOfType, return_type[type[Map]], modifier[public], parameter[origin, minType]] begin[{]
return[call[.listMatchesWithinRange, parameter[member[.origin], member[.minType], THIS[member[None.matchTypesSupported]call[None.getHighest, parameter[]]]]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[URI] , identifier[MatchResult] operator[>] identifier[listMatchesAtLeastOfType] operator[SEP] identifier[URI] identifier[origin] , identifier[MatchType] identifier[minType] operator[SEP] {
Keyword[return] identifier[listM... |
public final HttpServer cookieCodec(ServerCookieEncoder encoder, ServerCookieDecoder decoder) {
return tcpConfiguration(tcp -> tcp.bootstrap(
b -> HttpServerConfiguration.cookieCodec(b, encoder, decoder)));
} | class class_name[name] begin[{]
method[cookieCodec, return_type[type[HttpServer]], modifier[final public], parameter[encoder, decoder]] begin[{]
return[call[.tcpConfiguration, parameter[LambdaExpression(body=MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(m... | Keyword[public] Keyword[final] identifier[HttpServer] identifier[cookieCodec] operator[SEP] identifier[ServerCookieEncoder] identifier[encoder] , identifier[ServerCookieDecoder] identifier[decoder] operator[SEP] {
Keyword[return] identifier[tcpConfiguration] operator[SEP] identifier[tcp] operator[->] identifier... |
protected void render(FacesContext context) throws IOException {
String src = (String) getAttributes().get("src");
boolean base64 = Boolean.parseBoolean((String) getAttributes().get("src"));
String imagePath = getImageUrl(context, src, base64);
ResponseWriter writer = context.getResponseWriter();
writer.writ... | class class_name[name] begin[{]
method[render, return_type[void], modifier[protected], parameter[context]] begin[{]
local_variable[type[String], src]
local_variable[type[boolean], base64]
local_variable[type[String], imagePath]
local_variable[type[ResponseWriter], writer]
... | Keyword[protected] Keyword[void] identifier[render] operator[SEP] identifier[FacesContext] identifier[context] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[src] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP... |
public Priority[] getPriorities() {
List<Priority> actualPriorities = new ArrayList<Priority>();
for (String priority : getAvailablePriorities()) {
if (provider.getNumberOfAnnotations(priority) > 0) {
actualPriorities.add(Priority.fromString(priority));
}
... | class class_name[name] begin[{]
method[getPriorities, return_type[type[Priority]], modifier[public], parameter[]] begin[{]
local_variable[type[List], actualPriorities]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(argume... | Keyword[public] identifier[Priority] operator[SEP] operator[SEP] identifier[getPriorities] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Priority] operator[>] identifier[actualPriorities] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Priority] operator[>] operator[... |
public void noteOpenConnection(ServerStats serverStats) {
if (serverStats == null) {
return;
}
try {
serverStats.incrementActiveRequestsCount();
} catch (Exception ex) {
logger.error("Error noting stats for client {}", clientName, ex);
} ... | class class_name[name] begin[{]
method[noteOpenConnection, return_type[void], modifier[public], parameter[serverStats]] begin[{]
if[binary_operation[member[.serverStats], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
TryStatement(block=[... | Keyword[public] Keyword[void] identifier[noteOpenConnection] operator[SEP] identifier[ServerStats] identifier[serverStats] operator[SEP] {
Keyword[if] operator[SEP] identifier[serverStats] operator[==] Other[null] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[try] {
... |
public Object firstRow() throws SQLException {
List rows = rows();
if (rows.isEmpty()) return null;
return (rows.get(0));
} | class class_name[name] begin[{]
method[firstRow, return_type[type[Object]], modifier[public], parameter[]] begin[{]
local_variable[type[List], rows]
if[call[rows.isEmpty, parameter[]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
return[call[rows.get,... | Keyword[public] identifier[Object] identifier[firstRow] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[List] identifier[rows] operator[=] identifier[rows] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rows] operator[SEP] identifier[isEmpty] oper... |
public Moonlight on(CalendarDate date) {
// initialization
PlainDate d = SolarTime.toGregorian(date);
Timezone tz = Timezone.of(this.observerZoneID);
Moment start =
((tz.getHistory() == null)
? d.at(PlainTime.midnightAtStartOfDay()).in(tz)
: d... | class class_name[name] begin[{]
method[on, return_type[type[Moonlight]], modifier[public], parameter[date]] begin[{]
local_variable[type[PlainDate], d]
local_variable[type[Timezone], tz]
local_variable[type[Moment], start]
local_variable[type[double], mjd0]
local_variabl... | Keyword[public] identifier[Moonlight] identifier[on] operator[SEP] identifier[CalendarDate] identifier[date] operator[SEP] {
identifier[PlainDate] identifier[d] operator[=] identifier[SolarTime] operator[SEP] identifier[toGregorian] operator[SEP] identifier[date] operator[SEP] operator[SEP] identifier[Timezone] ... |
public static void writeToCheckpoint(OutputStream output, List<? extends Checkpointed> components)
throws IOException, InterruptedException {
OutputChunked chunked = new OutputChunked(
new CheckpointOutputStream(output, CheckpointType.COMPOUND), 64 * Constants.KB);
for (Checkpointed component : co... | class class_name[name] begin[{]
method[writeToCheckpoint, return_type[void], modifier[public static], parameter[output, components]] begin[{]
local_variable[type[OutputChunked], chunked]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arg... | Keyword[public] Keyword[static] Keyword[void] identifier[writeToCheckpoint] operator[SEP] identifier[OutputStream] identifier[output] , identifier[List] operator[<] operator[?] Keyword[extends] identifier[Checkpointed] operator[>] identifier[components] operator[SEP] Keyword[throws] identifier[IOException] , identifi... |
public ServiceFuture<OperationStatus> updateClosedListAsync(UUID appId, String versionId, UUID clEntityId, ClosedListModelUpdateObject closedListModelUpdateObject, final ServiceCallback<OperationStatus> serviceCallback) {
return ServiceFuture.fromResponse(updateClosedListWithServiceResponseAsync(appId, versionI... | class class_name[name] begin[{]
method[updateClosedListAsync, return_type[type[ServiceFuture]], modifier[public], parameter[appId, versionId, clEntityId, closedListModelUpdateObject, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.updateClosedListWithServiceResponseAs... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[OperationStatus] operator[>] identifier[updateClosedListAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[clEntityId] , identifier[ClosedListModelUpdateObject] identifier[cl... |
public final void mLINE_COMMENT() throws RecognitionException {
try {
int _type = LINE_COMMENT;
int _channel = DEFAULT_TOKEN_CHANNEL;
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1403:5: ( '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
// src/main/resources/org/drools/compiler/s... | class class_name[name] begin[{]
method[mLINE_COMMENT, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=LINE_COMMENT, postfix_operators=[], prefi... | Keyword[public] Keyword[final] Keyword[void] identifier[mLINE_COMMENT] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
Keyword[int] identifier[_type] operator[=] identifier[LINE_COMMENT] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifie... |
public static CommerceAvailabilityEstimate findByUuid_First(String uuid,
OrderByComparator<CommerceAvailabilityEstimate> orderByComparator)
throws com.liferay.commerce.exception.NoSuchAvailabilityEstimateException {
return getPersistence().findByUuid_First(uuid, orderByComparator);
} | class class_name[name] begin[{]
method[findByUuid_First, return_type[type[CommerceAvailabilityEstimate]], modifier[public static], parameter[uuid, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CommerceAvailabilityEstimate] identifier[findByUuid_First] operator[SEP] identifier[String] identifier[uuid] , identifier[OrderByComparator] operator[<] identifier[CommerceAvailabilityEstimate] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier... |
public <T> T toBeanIgnoreCase(T bean) {
BeanUtil.fillBeanWithMapIgnoreCase(this, bean, false);
return bean;
} | class class_name[name] begin[{]
method[toBeanIgnoreCase, return_type[type[T]], modifier[public], parameter[bean]] begin[{]
call[BeanUtil.fillBeanWithMapIgnoreCase, parameter[THIS[], member[.bean], literal[false]]]
return[member[.bean]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[toBeanIgnoreCase] operator[SEP] identifier[T] identifier[bean] operator[SEP] {
identifier[BeanUtil] operator[SEP] identifier[fillBeanWithMapIgnoreCase] operator[SEP] Keyword[this] , identifier[bean] , literal[boolean] operator[SEP] ... |
static public void registerTransform( String transformName, Class c) {
if (!(VertTransformBuilderIF.class.isAssignableFrom( c)) && !(HorizTransformBuilderIF.class.isAssignableFrom( c)))
throw new IllegalArgumentException("Class "+c.getName()+" must implement VertTransformBuilderIF or HorizTransformBuilderIF... | class class_name[name] begin[{]
method[registerTransform, return_type[void], modifier[public static], parameter[transformName, c]] begin[{]
if[binary_operation[ClassReference(postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=No... | Keyword[static] Keyword[public] Keyword[void] identifier[registerTransform] operator[SEP] identifier[String] identifier[transformName] , identifier[Class] identifier[c] operator[SEP] {
Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[VertTransformBuilderIF] operator[SEP] Keyword[class] operator[SE... |
@SuppressWarnings("unchecked")
private <IN1, IN2, OUT> TypeInformation<OUT> privateCreateTypeInfo(Type returnType, TypeInformation<IN1> in1Type, TypeInformation<IN2> in2Type) {
ArrayList<Type> typeHierarchy = new ArrayList<Type>();
// get info from hierarchy
return (TypeInformation<OUT>) createTypeInfoWithTypeH... | class class_name[name] begin[{]
method[privateCreateTypeInfo, return_type[type[TypeInformation]], modifier[private], parameter[returnType, in1Type, in2Type]] begin[{]
local_variable[type[ArrayList], typeHierarchy]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=typeHie... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] operator[<] identifier[IN1] , identifier[IN2] , identifier[OUT] operator[>] identifier[TypeInformation] operator[<] identifier[OUT] operator[>] identifier[privateCreateTypeInfo] operator[SEP] identifier[Type] ident... |
public boolean is(T state, T... otherStates) {
return EnumSet.of(state, otherStates).contains(currentState);
} | class class_name[name] begin[{]
method[is, return_type[type[boolean]], modifier[public], parameter[state, otherStates]] begin[{]
return[call[EnumSet.of, parameter[member[.state], member[.otherStates]]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[is] operator[SEP] identifier[T] identifier[state] , identifier[T] operator[...] identifier[otherStates] operator[SEP] {
Keyword[return] identifier[EnumSet] operator[SEP] identifier[of] operator[SEP] identifier[state] , identifier[otherStates] operator[SEP] operator[S... |
static GraphNode getServiceNode(HttpServletRequest request) {
final IRI serviceUri = new IRI(getFullRequestUrl(request));
final Graph resultGraph = new SimpleGraph();
return new GraphNode(serviceUri, resultGraph);
} | class class_name[name] begin[{]
method[getServiceNode, return_type[type[GraphNode]], modifier[static], parameter[request]] begin[{]
local_variable[type[IRI], serviceUri]
local_variable[type[Graph], resultGraph]
return[ClassCreator(arguments=[MemberReference(member=serviceUri, postfix_op... | Keyword[static] identifier[GraphNode] identifier[getServiceNode] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] {
Keyword[final] identifier[IRI] identifier[serviceUri] operator[=] Keyword[new] identifier[IRI] operator[SEP] identifier[getFullRequestUrl] operator[SEP] identifier[req... |
public static String getPrettyFormatted(String str) {
return String.format("%s-%s-%s-%s-%s", new Object[] { str.substring(0, 8), str.substring(8, 12), str.substring(12, 16), str.substring(16, 20), str.substring(20) });
} | class class_name[name] begin[{]
method[getPrettyFormatted, return_type[type[String]], modifier[public static], parameter[str]] begin[{]
return[call[String.format, parameter[literal["%s-%s-%s-%s-%s"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[... | Keyword[public] Keyword[static] identifier[String] identifier[getPrettyFormatted] operator[SEP] identifier[String] identifier[str] operator[SEP] {
Keyword[return] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] {
... |
public RuntimeException handleException(final Exception e) {
log.error(e.getMessage(), e);
if (e instanceof RuntimeException && EnvUtil.isPortableType(e.getClass()) ) {
return (RuntimeException) e;
}
return new GenericPortableException( e.getMessage(), e );
} | class class_name[name] begin[{]
method[handleException, return_type[type[RuntimeException]], modifier[public], parameter[e]] begin[{]
call[log.error, parameter[call[e.getMessage, parameter[]], member[.e]]]
if[binary_operation[binary_operation[member[.e], instanceof, type[Runtime... | Keyword[public] identifier[RuntimeException] identifier[handleException] operator[SEP] Keyword[final] identifier[Exception] identifier[e] operator[SEP] {
identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] o... |
public static <X extends Throwable> void throwOrHandle(final X e, final Predicate<X> p, final Consumer<X> handler) {
if (p.test(e))
throw ExceptionSoftener.<RuntimeException> uncheck(e);
else
handler.accept(e);
} | class class_name[name] begin[{]
method[throwOrHandle, return_type[void], modifier[public static], parameter[e, p, handler]] begin[{]
if[call[p.test, parameter[member[.e]]]] begin[{]
ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_oper... | Keyword[public] Keyword[static] operator[<] identifier[X] Keyword[extends] identifier[Throwable] operator[>] Keyword[void] identifier[throwOrHandle] operator[SEP] Keyword[final] identifier[X] identifier[e] , Keyword[final] identifier[Predicate] operator[<] identifier[X] operator[>] identifier[p] , Keyword[final] iden... |
public static XorRelayedAddressAttribute createXorRelayedAddressAttribute(
TransportAddress address, byte[] tranID) {
XorRelayedAddressAttribute attribute = new XorRelayedAddressAttribute();
// TODO shouldn't we be XORing the address before setting it?
attribute.setAddress(address, tranID);
return attribute... | class class_name[name] begin[{]
method[createXorRelayedAddressAttribute, return_type[type[XorRelayedAddressAttribute]], modifier[public static], parameter[address, tranID]] begin[{]
local_variable[type[XorRelayedAddressAttribute], attribute]
call[attribute.setAddress, parameter[member[.... | Keyword[public] Keyword[static] identifier[XorRelayedAddressAttribute] identifier[createXorRelayedAddressAttribute] operator[SEP] identifier[TransportAddress] identifier[address] , Keyword[byte] operator[SEP] operator[SEP] identifier[tranID] operator[SEP] {
identifier[XorRelayedAddressAttribute] identifier[attr... |
public String[] exec(String toExec) {
Matcher m = getMatcher(toExec);
if (m.find()) {
List<String> list = new ArrayList<>();
int count = m.groupCount();
For(1).to(count).loop(i -> {
li... | class class_name[name] begin[{]
method[exec, return_type[type[String]], modifier[public], parameter[toExec]] begin[{]
local_variable[type[Matcher], m]
if[call[m.find, parameter[]]] begin[{]
local_variable[type[List], list]
local_variable[type[int], count]
... | Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[exec] operator[SEP] identifier[String] identifier[toExec] operator[SEP] {
identifier[Matcher] identifier[m] operator[=] identifier[getMatcher] operator[SEP] identifier[toExec] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifie... |
public static void writeStringSet(DataOutputStream os, Collection<String> set) throws IOException {
if(set==null) {
os.writeInt(-1);
} else {
os.writeInt(set.size());
for(String s : set) {
writeString(os, s);
}
}
} | class class_name[name] begin[{]
method[writeStringSet, return_type[void], modifier[public static], parameter[os, set]] begin[{]
if[binary_operation[member[.set], ==, literal[null]]] begin[{]
call[os.writeInt, parameter[literal[1]]]
else begin[{]
... | Keyword[public] Keyword[static] Keyword[void] identifier[writeStringSet] operator[SEP] identifier[DataOutputStream] identifier[os] , identifier[Collection] operator[<] identifier[String] operator[>] identifier[set] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[set]... |
public void loadContext(Context ctx) {
validateContextNotNull(ctx);
for (ContextDataFactory cdf : this.contextDataFactories) {
cdf.loadContextData(getSession(), ctx);
}
} | class class_name[name] begin[{]
method[loadContext, return_type[void], modifier[public], parameter[ctx]] begin[{]
call[.validateContextNotNull, parameter[member[.ctx]]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Me... | Keyword[public] Keyword[void] identifier[loadContext] operator[SEP] identifier[Context] identifier[ctx] operator[SEP] {
identifier[validateContextNotNull] operator[SEP] identifier[ctx] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ContextDataFactory] identifier[cdf] operator[:] Keyword[this]... |
public void deserialize(long mask) throws DeserializationException {
if (mask <= RpcDeserializeLevel.DESERIALIZE_CLAZZ) {
this.deserializeClazz();
} else if (mask <= RpcDeserializeLevel.DESERIALIZE_HEADER) {
this.deserializeClazz();
this.deserializeHeader(this.getInvo... | class class_name[name] begin[{]
method[deserialize, return_type[void], modifier[public], parameter[mask]] begin[{]
if[binary_operation[member[.mask], <=, member[RpcDeserializeLevel.DESERIALIZE_CLAZZ]]] begin[{]
THIS[call[None.deserializeClazz, parameter[]]]
else ... | Keyword[public] Keyword[void] identifier[deserialize] operator[SEP] Keyword[long] identifier[mask] operator[SEP] Keyword[throws] identifier[DeserializationException] {
Keyword[if] operator[SEP] identifier[mask] operator[<=] identifier[RpcDeserializeLevel] operator[SEP] identifier[DESERIALIZE_CLAZZ] operator[SEP]... |
protected static void read(InputStream xmlInputStream) throws SAXException, IOException, ParserConfigurationException, JAXBException {
LOGGER.info("process example file");
Is24XmlDocument doc = Is24XmlUtils.createDocument(xmlInputStream);
if (doc == null) {
LOGGER.warn("> provided XM... | class class_name[name] begin[{]
method[read, return_type[void], modifier[static protected], parameter[xmlInputStream]] begin[{]
call[LOGGER.info, parameter[literal["process example file"]]]
local_variable[type[Is24XmlDocument], doc]
if[binary_operation[member[.doc], ==, ... | Keyword[protected] Keyword[static] Keyword[void] identifier[read] operator[SEP] identifier[InputStream] identifier[xmlInputStream] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] , identifier[ParserConfigurationException] , identifier[JAXBException] {
identifier[LOGGER] operat... |
public void setContentLength(int len) {
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15
logger.entering(CLASS_NAME,"setContentLength", "length --> " + String.valueOf(len) + " ["+this+"]");
}
// d151464 - check the include flag... | class class_name[name] begin[{]
method[setContentLength, return_type[void], modifier[public], parameter[len]] begin[{]
if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[logger.isLoggable, parameter[member[Level.FINE]]]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setContentLength] operator[SEP] Keyword[int] identifier[len] operator[SEP] {
Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifi... |
private List<HalFormsProperty> determineInputs() {
if (!ENTITY_ALTERING_METHODS.contains(getHttpMethod())) {
return Collections.emptyList();
}
return PropertyUtils.findPropertyNames(getInputType()).stream() //
.map(propertyName -> new HalFormsProperty() //
.withName(propertyName) //
.withRequ... | class class_name[name] begin[{]
method[determineInputs, return_type[type[List]], modifier[private], parameter[]] begin[{]
if[call[ENTITY_ALTERING_METHODS.contains, parameter[call[.getHttpMethod, parameter[]]]]] begin[{]
return[call[Collections.emptyList, parameter[]]]
else b... | Keyword[private] identifier[List] operator[<] identifier[HalFormsProperty] operator[>] identifier[determineInputs] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[ENTITY_ALTERING_METHODS] operator[SEP] identifier[contains] operator[SEP] identifier[getHttpMethod] operator[SEP] opera... |
void handleProcessFinish(InternalEvent event) throws ProcessException
{
try {
String ownerType = event.getOwnerType();
String secondaryOwnerType = event.getSecondaryOwnerType();
if (!OwnerType.ACTIVITY_INSTANCE.equals(secondaryOwnerType)) {
// top level pr... | class class_name[name] begin[{]
method[handleProcessFinish, return_type[void], modifier[default], parameter[event]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getOwnerType, postfi... | Keyword[void] identifier[handleProcessFinish] operator[SEP] identifier[InternalEvent] identifier[event] operator[SEP] Keyword[throws] identifier[ProcessException] {
Keyword[try] {
identifier[String] identifier[ownerType] operator[=] identifier[event] operator[SEP] identifier[getOwnerType] operator[SEP... |
public IStatus validateDrop(Object target, int aDropOperation,
TransferData transferType) {
// if (VdmUIPlugin.DEBUG)
// System.out.println("Target Object for drop: "
// + target.getClass().toString());
if (target instanceof IVdmContainer) {
target = ((IVdmContainer) target).getContainer();
}
if (... | class class_name[name] begin[{]
method[validateDrop, return_type[type[IStatus]], modifier[public], parameter[target, aDropOperation, transferType]] begin[{]
if[binary_operation[member[.target], instanceof, type[IVdmContainer]]] begin[{]
assign[member[.target], Cast(expre... | Keyword[public] identifier[IStatus] identifier[validateDrop] operator[SEP] identifier[Object] identifier[target] , Keyword[int] identifier[aDropOperation] , identifier[TransferData] identifier[transferType] operator[SEP] {
Keyword[if] operator[SEP] identifier[target] Keyword[instanceof] identifier[IVdmContaine... |
public static CircuitBreakerExports ofCircuitBreaker(String prefix, CircuitBreaker circuitBreaker) {
requireNonNull(prefix);
requireNonNull(circuitBreaker);
return new CircuitBreakerExports(prefix, Array.of(circuitBreaker));
} | class class_name[name] begin[{]
method[ofCircuitBreaker, return_type[type[CircuitBreakerExports]], modifier[public static], parameter[prefix, circuitBreaker]] begin[{]
call[.requireNonNull, parameter[member[.prefix]]]
call[.requireNonNull, parameter[member[.circuitBreaker]]]
... | Keyword[public] Keyword[static] identifier[CircuitBreakerExports] identifier[ofCircuitBreaker] operator[SEP] identifier[String] identifier[prefix] , identifier[CircuitBreaker] identifier[circuitBreaker] operator[SEP] {
identifier[requireNonNull] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] ident... |
public static void escapePropertiesKey(final String text, final Writer writer, final PropertiesKeyEscapeLevel level)
throws IOException {
if (writer == null) {
throw new IllegalArgumentException("Argument 'writer' cannot be null");
}
if (level == null) {
thr... | class class_name[name] begin[{]
method[escapePropertiesKey, return_type[void], modifier[public static], parameter[text, writer, level]] begin[{]
if[binary_operation[member[.writer], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operat... | Keyword[public] Keyword[static] Keyword[void] identifier[escapePropertiesKey] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[Writer] identifier[writer] , Keyword[final] identifier[PropertiesKeyEscapeLevel] identifier[level] operator[SEP] Keyword[throws] identifier[IOExcep... |
final public void Equality() throws ParseException {
Compare();
label_9:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case EQ0:
case EQ1:
case NE0:
case NE1:
;
break;
default:
jj_la1[14] = jj_gen;
break label_9;
}
swit... | class class_name[name] begin[{]
method[Equality, return_type[void], modifier[final public], parameter[]] begin[{]
call[.Compare, parameter[]]
while[literal[true]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['EQ0', 'EQ1', 'NE0', 'NE1'], statements=[State... | Keyword[final] Keyword[public] Keyword[void] identifier[Equality] operator[SEP] operator[SEP] Keyword[throws] identifier[ParseException] {
identifier[Compare] operator[SEP] operator[SEP] operator[SEP] identifier[label_9] operator[:] Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
Keywor... |
public void bindValue(InternalQName varName, Value value) throws IllegalArgumentException, RepositoryException
{
if (!variableNames.contains(varName))
{
throw new IllegalArgumentException("not a valid variable in this query");
}
else
{
bindValues.put(varName, value);
... | class class_name[name] begin[{]
method[bindValue, return_type[void], modifier[public], parameter[varName, value]] begin[{]
if[call[variableNames.contains, parameter[member[.varName]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_op... | Keyword[public] Keyword[void] identifier[bindValue] operator[SEP] identifier[InternalQName] identifier[varName] , identifier[Value] identifier[value] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] , identifier[RepositoryException] {
Keyword[if] operator[SEP] operator[!] identifier[variableN... |
public HashIntMap<User> loadUsersFromId (int[] userIds)
throws PersistenceException
{
HashIntMap<User> data = new HashIntMap<User>();
if (userIds.length > 0) {
String query = "where userId in (" + genIdString(userIds) + ")";
for (User user : loadAll(_utable, query)) {... | class class_name[name] begin[{]
method[loadUsersFromId, return_type[type[HashIntMap]], modifier[public], parameter[userIds]] begin[{]
local_variable[type[HashIntMap], data]
if[binary_operation[member[userIds.length], >, literal[0]]] begin[{]
local_variable[type[String], quer... | Keyword[public] identifier[HashIntMap] operator[<] identifier[User] operator[>] identifier[loadUsersFromId] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[userIds] operator[SEP] Keyword[throws] identifier[PersistenceException] {
identifier[HashIntMap] operator[<] identifier[User] operator[>] i... |
public void checkInvariants(CallStack frame, Tuple<Expr> invariants) {
for (int i = 0; i != invariants.size(); ++i) {
RValue.Bool b = executeExpression(BOOL_T, invariants.get(i), frame);
if (b == RValue.False) {
// FIXME: need to do more here
throw new AssertionError();
}
}
} | class class_name[name] begin[{]
method[checkInvariants, return_type[void], modifier[public], parameter[frame, invariants]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocati... | Keyword[public] Keyword[void] identifier[checkInvariants] operator[SEP] identifier[CallStack] identifier[frame] , identifier[Tuple] operator[<] identifier[Expr] operator[>] identifier[invariants] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[... |
public void away (ClientObject caller, String message)
{
BodyObject body = _locator.forClient(caller);
// we modify this field via an invocation service request because a body object is not
// modifiable by the client
body.setAwayMessage(message);
} | class class_name[name] begin[{]
method[away, return_type[void], modifier[public], parameter[caller, message]] begin[{]
local_variable[type[BodyObject], body]
call[body.setAwayMessage, parameter[member[.message]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[away] operator[SEP] identifier[ClientObject] identifier[caller] , identifier[String] identifier[message] operator[SEP] {
identifier[BodyObject] identifier[body] operator[=] identifier[_locator] operator[SEP] identifier[forClient] operator[SEP] identifier[caller] operator... |
protected void addPartialInfo(ClassDoc cd, Content contentTree) {
addPreQualifiedStrongClassLink(LinkInfoImpl.Kind.TREE, cd, contentTree);
} | class class_name[name] begin[{]
method[addPartialInfo, return_type[void], modifier[protected], parameter[cd, contentTree]] begin[{]
call[.addPreQualifiedStrongClassLink, parameter[member[LinkInfoImpl.Kind.TREE], member[.cd], member[.contentTree]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[addPartialInfo] operator[SEP] identifier[ClassDoc] identifier[cd] , identifier[Content] identifier[contentTree] operator[SEP] {
identifier[addPreQualifiedStrongClassLink] operator[SEP] identifier[LinkInfoImpl] operator[SEP] identifier[Kind] operator[SEP] identifier[TR... |
private void setAsyncListener(MessageListener listener) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "setAsyncListener", listener);
consumer = new Consumer(listener, session, sessionAckMode);
try {
// Consum... | class class_name[name] begin[{]
method[setAsyncListener, return_type[void], modifier[private], parameter[listener]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[THI... | Keyword[private] Keyword[void] identifier[setAsyncListener] operator[SEP] identifier[MessageListener] identifier[listener] operator[SEP] Keyword[throws] identifier[JMSException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.