code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static CPInstance fetchByUuid_C_Last(String uuid, long companyId,
OrderByComparator<CPInstance> orderByComparator) {
return getPersistence()
.fetchByUuid_C_Last(uuid, companyId, orderByComparator);
} | class class_name[name] begin[{]
method[fetchByUuid_C_Last, return_type[type[CPInstance]], modifier[public static], parameter[uuid, companyId, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CPInstance] identifier[fetchByUuid_C_Last] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] , identifier[OrderByComparator] operator[<] identifier[CPInstance] operator[>] identifier[orderByComparator] operator[SEP] {
Keyword[retu... |
@Override
public void close() throws IOException {
super.close();
if (this.shxWriter != null) {
this.shxWriter.close();
}
if (this.dbfWriter != null) {
this.dbfWriter.close();
this.attrContainers = null;
}
} | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
SuperMethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
if[binary_operation[THIS[membe... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[super] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[shxWri... |
public void registerPlugin(final DajlabExtension plugin) {
if (plugin != null) {
if (plugin instanceof DajlabControllerExtensionInterface) {
controllers.add((DajlabControllerExtensionInterface<DajlabModelInterface>) plugin);
}
if (plugin instanceof TabExtensionInterface) {
tabPlugins.add((Tab... | class class_name[name] begin[{]
method[registerPlugin, return_type[void], modifier[public], parameter[plugin]] begin[{]
if[binary_operation[member[.plugin], !=, literal[null]]] begin[{]
if[binary_operation[member[.plugin], instanceof, type[DajlabControllerExtensionInterf... | Keyword[public] Keyword[void] identifier[registerPlugin] operator[SEP] Keyword[final] identifier[DajlabExtension] identifier[plugin] operator[SEP] {
Keyword[if] operator[SEP] identifier[plugin] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[plugin] Keyword[instanceof] id... |
private void loadLemmatizerDicts(final Properties props) {
final String resourcesDirectory = props.getProperty("resourcesDirectory");
final Resources resources = new Resources();
final URL binLemmatizerURL = resources.getBinaryDict(this.lang, resourcesDirectory);
if (binLemmatizerURL == null) {
fi... | class class_name[name] begin[{]
method[loadLemmatizerDicts, return_type[void], modifier[private], parameter[props]] begin[{]
local_variable[type[String], resourcesDirectory]
local_variable[type[Resources], resources]
local_variable[type[URL], binLemmatizerURL]
if[binary_... | Keyword[private] Keyword[void] identifier[loadLemmatizerDicts] operator[SEP] Keyword[final] identifier[Properties] identifier[props] operator[SEP] {
Keyword[final] identifier[String] identifier[resourcesDirectory] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] o... |
public static void reverse(final char[] a, int fromIndex, int toIndex) {
checkFromToIndex(fromIndex, toIndex, len(a));
if (N.isNullOrEmpty(a) || a.length == 1) {
return;
}
char tmp = 0;
for (int i = fromIndex, j = toIndex - 1; i < j; i++, j--) {
... | class class_name[name] begin[{]
method[reverse, return_type[void], modifier[public static], parameter[a, fromIndex, toIndex]] begin[{]
call[.checkFromToIndex, parameter[member[.fromIndex], member[.toIndex], call[.len, parameter[member[.a]]]]]
if[binary_operation[call[N.isNullOrE... | Keyword[public] Keyword[static] Keyword[void] identifier[reverse] operator[SEP] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[a] , Keyword[int] identifier[fromIndex] , Keyword[int] identifier[toIndex] operator[SEP] {
identifier[checkFromToIndex] operator[SEP] identifier[fromIndex] , iden... |
public void marshall(OutputDetail outputDetail, ProtocolMarshaller protocolMarshaller) {
if (outputDetail == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(outputDetail.getDurationInMs(), DURATIONINM... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[outputDetail, protocolMarshaller]] begin[{]
if[binary_operation[member[.outputDetail], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_opera... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[OutputDetail] identifier[outputDetail] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[outputDetail] operator[==] Other[null] operator[SEP] {
Keyword[throw]... |
public void setOut(PrintStream out) {
this.out = out;
if (!(System.out instanceof ThreadLocalPrintStream)) {
throw new IllegalStateException("System.out should be set by nailgun.");
}
ThreadLocalPrintStream tls = (ThreadLocalPrintStream) System.out;
tls.init(out);
} | class class_name[name] begin[{]
method[setOut, return_type[void], modifier[public], parameter[out]] begin[{]
assign[THIS[member[None.out]], member[.out]]
if[binary_operation[member[System.out], instanceof, type[ThreadLocalPrintStream]]] begin[{]
ThrowStatement(expres... | Keyword[public] Keyword[void] identifier[setOut] operator[SEP] identifier[PrintStream] identifier[out] operator[SEP] {
Keyword[this] operator[SEP] identifier[out] operator[=] identifier[out] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[System] operator[SEP] identifier[out] Keyword... |
public void setControlValue(Object objValue)
{
String strValue = ZERO;
if (objValue instanceof Integer)
strValue = objValue.toString();
this.setName(strValue);
} | class class_name[name] begin[{]
method[setControlValue, return_type[void], modifier[public], parameter[objValue]] begin[{]
local_variable[type[String], strValue]
if[binary_operation[member[.objValue], instanceof, type[Integer]]] begin[{]
assign[member[.strValue], call[objVal... | Keyword[public] Keyword[void] identifier[setControlValue] operator[SEP] identifier[Object] identifier[objValue] operator[SEP] {
identifier[String] identifier[strValue] operator[=] identifier[ZERO] operator[SEP] Keyword[if] operator[SEP] identifier[objValue] Keyword[instanceof] identifier[Integer] operator[SEP] i... |
public static Context time(String appid, Class<?> clazz, String... names) {
String className = getClassName(clazz);
Timer systemTimer = getTimer(SYSTEM_METRICS_NAME, className, names);
Timer appTimer = appid == null || appid.isEmpty() ? null : getTimer(appid, className, names);
return new Context(systemTimer, a... | class class_name[name] begin[{]
method[time, return_type[type[Context]], modifier[public static], parameter[appid, clazz, names]] begin[{]
local_variable[type[String], className]
local_variable[type[Timer], systemTimer]
local_variable[type[Timer], appTimer]
return[ClassCreator(a... | Keyword[public] Keyword[static] identifier[Context] identifier[time] operator[SEP] identifier[String] identifier[appid] , identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] operator[...] identifier[names] operator[SEP] {
identifier[String] identifier[className] operato... |
public final void deleteContext(ContextName name) {
DeleteContextRequest request =
DeleteContextRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteContext(request);
} | class class_name[name] begin[{]
method[deleteContext, return_type[void], modifier[final public], parameter[name]] begin[{]
local_variable[type[DeleteContextRequest], request]
call[.deleteContext, parameter[member[.request]]]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[void] identifier[deleteContext] operator[SEP] identifier[ContextName] identifier[name] operator[SEP] {
identifier[DeleteContextRequest] identifier[request] operator[=] identifier[DeleteContextRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator... |
@Override
public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) {
SourceTargetUtility cache;
synchronized (SOURCE_CACHE) {
//String id = getID();
cache = SOURCE_CACHE.get(norm2);
if (cache == null) {
cac... | class class_name[name] begin[{]
method[addSourceTargetSet, return_type[void], modifier[public], parameter[inputFilter, sourceSet, targetSet]] begin[{]
local_variable[type[SourceTargetUtility], cache]
SYNCHRONIZED[member[.SOURCE_CACHE]] BEGIN[{]
assign[member[.cac... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[addSourceTargetSet] operator[SEP] identifier[UnicodeSet] identifier[inputFilter] , identifier[UnicodeSet] identifier[sourceSet] , identifier[UnicodeSet] identifier[targetSet] operator[SEP] {
identifier[SourceTargetUtility] identifier[c... |
public void startSwipe(ViewHolder viewHolder) {
if (!mCallback.hasSwipeFlag(mRecyclerView, viewHolder)) {
Log.e(TAG, "Start swipe has been called but swiping is not enabled");
return;
}
if (viewHolder.itemView.getParent() != mRecyclerView) {
Log.e(TAG, "Start ... | class class_name[name] begin[{]
method[startSwipe, return_type[void], modifier[public], parameter[viewHolder]] begin[{]
if[call[mCallback.hasSwipeFlag, parameter[member[.mRecyclerView], member[.viewHolder]]]] begin[{]
call[Log.e, parameter[member[.TAG], literal["Start sw... | Keyword[public] Keyword[void] identifier[startSwipe] operator[SEP] identifier[ViewHolder] identifier[viewHolder] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[mCallback] operator[SEP] identifier[hasSwipeFlag] operator[SEP] identifier[mRecyclerView] , identifier[viewHolder] operator[SEP] opera... |
public void setLogTypesToEnable(java.util.Collection<String> logTypesToEnable) {
if (logTypesToEnable == null) {
this.logTypesToEnable = null;
return;
}
this.logTypesToEnable = new java.util.ArrayList<String>(logTypesToEnable);
} | class class_name[name] begin[{]
method[setLogTypesToEnable, return_type[void], modifier[public], parameter[logTypesToEnable]] begin[{]
if[binary_operation[member[.logTypesToEnable], ==, literal[null]]] begin[{]
assign[THIS[member[None.logTypesToEnable]], literal[null]]
... | Keyword[public] Keyword[void] identifier[setLogTypesToEnable] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[logTypesToEnable] operator[SEP] {
Keyword[if] operator[SEP] identifier[logTypesToEnable] operator[... |
private static double regularizedIncompleteGammaSeries(double a, double x) {
if (a < 0.0 || x < 0.0 || x >= a + 1) {
throw new IllegalArgumentException(String.format("Invalid a = %f, x = %f", a, x));
}
int i = 0;
double igf = 0.0;
boolean check = true;
doubl... | class class_name[name] begin[{]
method[regularizedIncompleteGammaSeries, return_type[type[double]], modifier[private static], parameter[a, x]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.a], <, literal[0.0]], ||, binary_operation[member[.x], <, literal[0.0]]], ||, bin... | Keyword[private] Keyword[static] Keyword[double] identifier[regularizedIncompleteGammaSeries] operator[SEP] Keyword[double] identifier[a] , Keyword[double] identifier[x] operator[SEP] {
Keyword[if] operator[SEP] identifier[a] operator[<] literal[Float] operator[||] identifier[x] operator[<] literal[Float] opera... |
private void sendHubHeartbeats()
{
RackHeartbeat rack = _rack;
UpdateRackHeartbeat updateRack = rack.getUpdate();
UpdatePodSystem updatePod = getUpdatePodSystem();
long now = CurrentTime.currentTime();
if (! isJoinComplete()) {
updatePod = null;
}
// send hub update t... | class class_name[name] begin[{]
method[sendHubHeartbeats, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[RackHeartbeat], rack]
local_variable[type[UpdateRackHeartbeat], updateRack]
local_variable[type[UpdatePodSystem], updatePod]
local_variable[t... | Keyword[private] Keyword[void] identifier[sendHubHeartbeats] operator[SEP] operator[SEP] {
identifier[RackHeartbeat] identifier[rack] operator[=] identifier[_rack] operator[SEP] identifier[UpdateRackHeartbeat] identifier[updateRack] operator[=] identifier[rack] operator[SEP] identifier[getUpdate] operator[SEP] o... |
public void extract(@NotNull final InputStream inputStream, @NotNull final Metadata metadata) throws IOException
{
RandomAccessStreamReader reader = new RandomAccessStreamReader(inputStream);
EpsDirectory directory = new EpsDirectory();
metadata.addDirectory(directory);
/*
... | class class_name[name] begin[{]
method[extract, return_type[void], modifier[public], parameter[inputStream, metadata]] begin[{]
local_variable[type[RandomAccessStreamReader], reader]
local_variable[type[EpsDirectory], directory]
call[metadata.addDirectory, parameter[member[.dire... | Keyword[public] Keyword[void] identifier[extract] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[InputStream] identifier[inputStream] , annotation[@] identifier[NotNull] Keyword[final] identifier[Metadata] identifier[metadata] operator[SEP] Keyword[throws] identifier[IOException] {
id... |
protected String htmlPagingBar() {
if (getNumberOfPages() < 2) {
return "";
}
StringBuffer html = new StringBuffer(1024);
CmsMessages messages = Messages.get().getBundle(getWp().getLocale());
html.append("<table width='100%' cellspacing='0' style='margin-top: 5px;'>\... | class class_name[name] begin[{]
method[htmlPagingBar, return_type[type[String]], modifier[protected], parameter[]] begin[{]
if[binary_operation[call[.getNumberOfPages, parameter[]], <, literal[2]]] begin[{]
return[literal[""]]
else begin[{]
None
end[}]
local_... | Keyword[protected] identifier[String] identifier[htmlPagingBar] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[getNumberOfPages] operator[SEP] operator[SEP] operator[<] Other[2] operator[SEP] {
Keyword[return] literal[String] operator[SEP]
}
identifier[StringBuffer] i... |
public void parse(UNode resultsNode) throws IllegalArgumentException {
// Root must be a "results" node.
Utils.require("results".equals(resultsNode.getName()),
"'results' expected: " + resultsNode.getName());
// Parse "groupsets" first if present.
UNo... | class class_name[name] begin[{]
method[parse, return_type[void], modifier[public], parameter[resultsNode]] begin[{]
call[Utils.require, parameter[literal["results"], binary_operation[literal["'results' expected: "], +, call[resultsNode.getName, parameter[]]]]]
local_variable[type[UNode]... | Keyword[public] Keyword[void] identifier[parse] operator[SEP] identifier[UNode] identifier[resultsNode] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
identifier[Utils] operator[SEP] identifier[require] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[... |
public boolean isKeyword(String... keywords) {
if (keywords.length == 0) {
return is(TokenType.KEYWORD);
}
for (String keyword : keywords) {
if (matches(TokenType.KEYWORD, keyword)) {
return true;
}
}
return false;
} | class class_name[name] begin[{]
method[isKeyword, return_type[type[boolean]], modifier[public], parameter[keywords]] begin[{]
if[binary_operation[member[keywords.length], ==, literal[0]]] begin[{]
return[call[.is, parameter[member[TokenType.KEYWORD]]]]
else begin[{]
None
... | Keyword[public] Keyword[boolean] identifier[isKeyword] operator[SEP] identifier[String] operator[...] identifier[keywords] operator[SEP] {
Keyword[if] operator[SEP] identifier[keywords] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] {
Keyword[return] identifier[is] operator[SEP] ... |
public InputStream sendRequest(String requestMethod,
Map<String, String> parameters) throws IOException {
String queryString = getQueryString(parameters);
URL url = new URL(this.apiBaseUrl);
HttpURLConnection connection = (HttpURLConnection) WebResourceFetcherImpl
.getUrlConnection(url);
setupConnection... | class class_name[name] begin[{]
method[sendRequest, return_type[type[InputStream]], modifier[public], parameter[requestMethod, parameters]] begin[{]
local_variable[type[String], queryString]
local_variable[type[URL], url]
local_variable[type[HttpURLConnection], connection]
... | Keyword[public] identifier[InputStream] identifier[sendRequest] operator[SEP] identifier[String] identifier[requestMethod] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[parameters] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifi... |
public static <T, F> Function<F, T> memoize(final Function<F, T> function) {
return new MemoizeFunction<F, T>() {
@Override
public T calc(F arg) {
return function.apply(arg);
}
};
} | class class_name[name] begin[{]
method[memoize, return_type[type[Function]], modifier[public static], parameter[function]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(argument... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[F] operator[>] identifier[Function] operator[<] identifier[F] , identifier[T] operator[>] identifier[memoize] operator[SEP] Keyword[final] identifier[Function] operator[<] identifier[F] , identifier[T] operator[>] identifier[function] operator[SE... |
public Matrix solve (Matrix B) throws SingularityException {
if (B.getRowCount() != m) {
throw new IllegalArgumentException("Matrix row dimensions must agree.");
}
if (!this.isNonsingular()) {
throw new SingularityException("Matrix is singular.");
}
// Copy right hand si... | class class_name[name] begin[{]
method[solve, return_type[type[Matrix]], modifier[public], parameter[B]] begin[{]
if[binary_operation[call[B.getRowCount, parameter[]], !=, member[.m]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_op... | Keyword[public] identifier[Matrix] identifier[solve] operator[SEP] identifier[Matrix] identifier[B] operator[SEP] Keyword[throws] identifier[SingularityException] {
Keyword[if] operator[SEP] identifier[B] operator[SEP] identifier[getRowCount] operator[SEP] operator[SEP] operator[!=] identifier[m] operator[SEP] ... |
@Override
public String getjcaResource() {
final boolean trace = TraceComponent.isAnyTracingEnabled();
Collection<JCAResourceMBeanImpl> c = jcaMBeanRuntime.jcaResources.values();
Iterator<JCAResourceMBeanImpl> i = c.iterator();
String jcaResourceString = null;
while (i.hasNex... | class class_name[name] begin[{]
method[getjcaResource, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], trace]
local_variable[type[Collection], c]
local_variable[type[Iterator], i]
local_variable[type[String], jcaResourceString]
... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getjcaResource] operator[SEP] operator[SEP] {
Keyword[final] Keyword[boolean] identifier[trace] operator[=] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] identifie... |
@Override
protected void init() throws Exception {
BootstrapContextImpl bootstrapContext = bootstrapContextRef.getServiceWithException();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(this, tc, "loading", mcfImplClassName);
if (mcfImplClassName == nul... | class class_name[name] begin[{]
method[init, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[BootstrapContextImpl], bootstrapContext]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] b... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[init] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[BootstrapContextImpl] identifier[bootstrapContext] operator[=] identifier[bootstrapContextRef] operator[SEP] identifier[getServiceWithException] oper... |
public static JUnitCommandLineParseResult parse(String[] args) {
JUnitCommandLineParseResult result = new JUnitCommandLineParseResult();
result.parseArgs(args);
return result;
} | class class_name[name] begin[{]
method[parse, return_type[type[JUnitCommandLineParseResult]], modifier[public static], parameter[args]] begin[{]
local_variable[type[JUnitCommandLineParseResult], result]
call[result.parseArgs, parameter[member[.args]]]
return[member[.result]]
... | Keyword[public] Keyword[static] identifier[JUnitCommandLineParseResult] identifier[parse] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
identifier[JUnitCommandLineParseResult] identifier[result] operator[=] Keyword[new] identifier[JUnitCommandLineParseResult] opera... |
public static InetSocketAddress createWithResolveRetry(
String hostname,
int port,
int delayMillis,
int maxAttempt
) {
InetSocketAddress socketAddress;
int attempts = 0;
do {
socketAddress = new InetSocketAddress(hostname, port);
// if dns failed, try one more time
if (s... | class class_name[name] begin[{]
method[createWithResolveRetry, return_type[type[InetSocketAddress]], modifier[public static], parameter[hostname, port, delayMillis, maxAttempt]] begin[{]
local_variable[type[InetSocketAddress], socketAddress]
local_variable[type[int], attempts]
d... | Keyword[public] Keyword[static] identifier[InetSocketAddress] identifier[createWithResolveRetry] operator[SEP] identifier[String] identifier[hostname] , Keyword[int] identifier[port] , Keyword[int] identifier[delayMillis] , Keyword[int] identifier[maxAttempt] operator[SEP] {
identifier[InetSocketAddress] iden... |
public void write(final Object object, final String path)
throws IOException
{
write(object, new File(path));
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[object, path]] begin[{]
call[.write, parameter[member[.object], ClassCreator(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, con... | Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[final] identifier[Object] identifier[object] , Keyword[final] identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[write] operator[SEP] identifier[object] , Keyword[new] identifier[File] oper... |
public void receive(WSMessage message) {
log.trace("receive message");
if (isConnected()) {
WebSocketPlugin plugin = (WebSocketPlugin) PluginRegistry.getPlugin("WebSocketPlugin");
Optional<WebSocketScopeManager> optional = Optional.ofNullable((WebSocketScopeManager) session.getAt... | class class_name[name] begin[{]
method[receive, return_type[void], modifier[public], parameter[message]] begin[{]
call[log.trace, parameter[literal["receive message"]]]
if[call[.isConnected, parameter[]]] begin[{]
local_variable[type[WebSocketPlugin], plugin]
... | Keyword[public] Keyword[void] identifier[receive] operator[SEP] identifier[WSMessage] identifier[message] operator[SEP] {
identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isConnected] operator[SEP] operator[SEP] operato... |
private void obtainTextColor(@NonNull final TypedArray typedArray) {
ColorStateList colorStateList =
typedArray.getColorStateList(R.styleable.ActionPreference_android_textColor);
if (colorStateList == null) {
colorStateList = ContextCompat
.getColorStateL... | class class_name[name] begin[{]
method[obtainTextColor, return_type[void], modifier[private], parameter[typedArray]] begin[{]
local_variable[type[ColorStateList], colorStateList]
if[binary_operation[member[.colorStateList], ==, literal[null]]] begin[{]
assign[mem... | Keyword[private] Keyword[void] identifier[obtainTextColor] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[TypedArray] identifier[typedArray] operator[SEP] {
identifier[ColorStateList] identifier[colorStateList] operator[=] identifier[typedArray] operator[SEP] identifier[getColorStateLi... |
public void requestState(long fileId, final FileCallback callback) {
if (LOG) {
Log.d(TAG, "Requesting state file #" + fileId);
}
Downloaded downloaded1 = downloaded.getValue(fileId);
if (downloaded1 != null) {
FileSystemReference reference = Storage.fileFromDesc... | class class_name[name] begin[{]
method[requestState, return_type[void], modifier[public], parameter[fileId, callback]] begin[{]
if[member[.LOG]] begin[{]
call[Log.d, parameter[member[.TAG], binary_operation[literal["Requesting state file #"], +, member[.fileId]]]]
... | Keyword[public] Keyword[void] identifier[requestState] operator[SEP] Keyword[long] identifier[fileId] , Keyword[final] identifier[FileCallback] identifier[callback] operator[SEP] {
Keyword[if] operator[SEP] identifier[LOG] operator[SEP] {
identifier[Log] operator[SEP] identifier[d] operator[SEP] iden... |
@Trivial
private static boolean contains(String[] fileList, String fileName) {
if (fileList != null) {
for (String name : fileList) {
if (name.equals(fileName)) {
return true;
}
}
}
return false;
} | class class_name[name] begin[{]
method[contains, return_type[type[boolean]], modifier[private static], parameter[fileList, fileName]] begin[{]
if[binary_operation[member[.fileList], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(con... | annotation[@] identifier[Trivial] Keyword[private] Keyword[static] Keyword[boolean] identifier[contains] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[fileList] , identifier[String] identifier[fileName] operator[SEP] {
Keyword[if] operator[SEP] identifier[fileList] operator[!=] Other[n... |
public static final String printPercent(Double value)
{
return value == null ? null : Double.toString(value.doubleValue() / 100.0);
} | class class_name[name] begin[{]
method[printPercent, return_type[type[String]], modifier[final public static], parameter[value]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), opera... | Keyword[public] Keyword[static] Keyword[final] identifier[String] identifier[printPercent] operator[SEP] identifier[Double] identifier[value] operator[SEP] {
Keyword[return] identifier[value] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[Double] operator[SEP] identifier[toString] opera... |
public static String addMethod(Method m) {
if (methods == null) {
methods = new HashMap<String, Method>();
}
String hashCode = String.valueOf(m.hashCode());
if (!methods.containsKey(hashCode)) {
methods.put(hashCode, m);
}
return String.valueOf(m.hashCode());
} | class class_name[name] begin[{]
method[addMethod, return_type[type[String]], modifier[public static], parameter[m]] begin[{]
if[binary_operation[member[.methods], ==, literal[null]]] begin[{]
assign[member[.methods], ClassCreator(arguments=[], body=None, constructor_type... | Keyword[public] Keyword[static] identifier[String] identifier[addMethod] operator[SEP] identifier[Method] identifier[m] operator[SEP] {
Keyword[if] operator[SEP] identifier[methods] operator[==] Other[null] operator[SEP] {
identifier[methods] operator[=] Keyword[new] identifier[HashMap] operator[<] id... |
public List<Example> actionCells(Example row)
{
List<Example> checkRow = new ArrayList<Example>();
checkRow.add(row.at(0, 1));
return checkRow;
} | class class_name[name] begin[{]
method[actionCells, return_type[type[List]], modifier[public], parameter[row]] begin[{]
local_variable[type[List], checkRow]
call[checkRow.add, parameter[call[row.at, parameter[literal[0], literal[1]]]]]
return[member[.checkRow]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[Example] operator[>] identifier[actionCells] operator[SEP] identifier[Example] identifier[row] operator[SEP] {
identifier[List] operator[<] identifier[Example] operator[>] identifier[checkRow] operator[=] Keyword[new] identifier[ArrayList] operator[<] ident... |
@Override
public Table<AllocationStatus, Integer, Long> getAllocationStatistics() {
Table<AllocationStatus, Integer, Long> table = HashBasedTable.create();
table.put(AllocationStatus.HOST, 0, zeroUseCounter.get());
for (Integer deviceId : configuration.getAvailableDevices()) {
ta... | class class_name[name] begin[{]
method[getAllocationStatistics, return_type[type[Table]], modifier[public], parameter[]] begin[{]
local_variable[type[Table], table]
call[table.put, parameter[member[AllocationStatus.HOST], literal[0], call[zeroUseCounter.get, parameter[]]]]
ForSt... | annotation[@] identifier[Override] Keyword[public] identifier[Table] operator[<] identifier[AllocationStatus] , identifier[Integer] , identifier[Long] operator[>] identifier[getAllocationStatistics] operator[SEP] operator[SEP] {
identifier[Table] operator[<] identifier[AllocationStatus] , identifier[Integer] ... |
@Override
public CPMeasurementUnit fetchByG_K_T(long groupId, String key, int type,
boolean retrieveFromCache) {
Object[] finderArgs = new Object[] { groupId, key, type };
Object result = null;
if (retrieveFromCache) {
result = finderCache.getResult(FINDER_PATH_FETCH_BY_G_K_T,
finderArgs, this);
}
... | class class_name[name] begin[{]
method[fetchByG_K_T, return_type[type[CPMeasurementUnit]], modifier[public], parameter[groupId, key, type, retrieveFromCache]] begin[{]
local_variable[type[Object], finderArgs]
local_variable[type[Object], result]
if[member[.retrieveFromCache]] be... | annotation[@] identifier[Override] Keyword[public] identifier[CPMeasurementUnit] identifier[fetchByG_K_T] operator[SEP] Keyword[long] identifier[groupId] , identifier[String] identifier[key] , Keyword[int] identifier[type] , Keyword[boolean] identifier[retrieveFromCache] operator[SEP] {
identifier[Object] ope... |
private static Templates initTemplates() {
try {
URL xsltURL = ThemeUtil.class.getResource(RESOURCE_NAME);
if (xsltURL != null) {
Source xsltSource = new StreamSource(xsltURL.openStream(), xsltURL.toExternalForm());
TransformerFactory factory = new net.sf.saxon.TransformerFactoryImpl();
Templates te... | class class_name[name] begin[{]
method[initTemplates, return_type[type[Templates]], modifier[private static], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassReference(postfix_operators=[], prefix_operato... | Keyword[private] Keyword[static] identifier[Templates] identifier[initTemplates] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[URL] identifier[xsltURL] operator[=] identifier[ThemeUtil] operator[SEP] Keyword[class] operator[SEP] identifier[getResource] operator[SEP] identifier[RESOURCE_NAME]... |
public MisplacedClassProcessor getProcessorForName(String name) {
if (name == null) {
return getDefaultProcessor();
}
switch (Strategy.valueOf(name.toUpperCase())) {
case FATAL: return new FatalMisplacedClassProcessor();
case MOVE: return new MoveMisplacedClassProcessor();
case OMIT... | class class_name[name] begin[{]
method[getProcessorForName, return_type[type[MisplacedClassProcessor]], modifier[public], parameter[name]] begin[{]
if[binary_operation[member[.name], ==, literal[null]]] begin[{]
return[call[.getDefaultProcessor, parameter[]]]
else begin[{]
N... | Keyword[public] identifier[MisplacedClassProcessor] identifier[getProcessorForName] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[getDefaultProcessor] operator[SEP] operat... |
public void setRoleMembership(String subject, Set<String> roles) {
validateStringValue(subject);
Validate.notNull(roles);
if(roles.isEmpty())
return;
Validate.noNullElements(roles);
props.setProperty(String.format(ROLE_MEMBERSHIP_FORMAT, subject), ArrayUtils.toString(encapsulateValues(roles)));
} | class class_name[name] begin[{]
method[setRoleMembership, return_type[void], modifier[public], parameter[subject, roles]] begin[{]
call[.validateStringValue, parameter[member[.subject]]]
call[Validate.notNull, parameter[member[.roles]]]
if[call[roles.isEmpty, par... | Keyword[public] Keyword[void] identifier[setRoleMembership] operator[SEP] identifier[String] identifier[subject] , identifier[Set] operator[<] identifier[String] operator[>] identifier[roles] operator[SEP] {
identifier[validateStringValue] operator[SEP] identifier[subject] operator[SEP] operator[SEP] identifier... |
@Override
public synchronized QueryBatcher withForestConfig(ForestConfiguration forestConfig) {
super.withForestConfig(forestConfig);
Forest[] forests = forestConfig.listForests();
Set<Forest> oldForests = new HashSet<>(forestResults.keySet());
Map<String,Forest> hosts = new HashMap<>();
for ( For... | class class_name[name] begin[{]
method[withForestConfig, return_type[type[QueryBatcher]], modifier[synchronized public], parameter[forestConfig]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=forestConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])],... | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] identifier[QueryBatcher] identifier[withForestConfig] operator[SEP] identifier[ForestConfiguration] identifier[forestConfig] operator[SEP] {
Keyword[super] operator[SEP] identifier[withForestConfig] operator[SEP] identifier[forestConfig] op... |
public void setInHeader(boolean inHeader) {
super.setInHeader(inHeader);
for(int i = 0; i < this.items.size(); i++) {
((RtfBasicElement) this.items.get(i)).setInHeader(inHeader);
}
} | class class_name[name] begin[{]
method[setInHeader, return_type[void], modifier[public], parameter[inHeader]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=inHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setInHeader, postfix_operators=[... | Keyword[public] Keyword[void] identifier[setInHeader] operator[SEP] Keyword[boolean] identifier[inHeader] operator[SEP] {
Keyword[super] operator[SEP] identifier[setInHeader] operator[SEP] identifier[inHeader] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] ... |
@Override
public String requestDepositAddress(Currency currency, String... arguments) throws IOException {
CryptonitDepositAddress response = null;
throw new NotYetImplementedForExchangeException();
// return response.getDepositAddress();
} | class class_name[name] begin[{]
method[requestDepositAddress, return_type[type[String]], modifier[public], parameter[currency, arguments]] begin[{]
local_variable[type[CryptonitDepositAddress], response]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[requestDepositAddress] operator[SEP] identifier[Currency] identifier[currency] , identifier[String] operator[...] identifier[arguments] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[CryptonitDepositAddress] ide... |
public static <A, B> Map<A, B> fromLists(List<A> keys, List<B> values) {
Preconditions.checkArgument(keys.size() == values.size());
Map<A, B> map = Maps.newHashMap();
for (int i = 0; i < keys.size(); i++) {
map.put(keys.get(i), values.get(i));
}
return map;
} | class class_name[name] begin[{]
method[fromLists, return_type[type[Map]], modifier[public static], parameter[keys, values]] begin[{]
call[Preconditions.checkArgument, parameter[binary_operation[call[keys.size, parameter[]], ==, call[values.size, parameter[]]]]]
local_variable[type[Map],... | Keyword[public] Keyword[static] operator[<] identifier[A] , identifier[B] operator[>] identifier[Map] operator[<] identifier[A] , identifier[B] operator[>] identifier[fromLists] operator[SEP] identifier[List] operator[<] identifier[A] operator[>] identifier[keys] , identifier[List] operator[<] identifier[B] operator... |
public AptEventSet getEventSet(String name)
{
for (AptEventSet eventSet: getEventSets())
if (eventSet.getClassName().equals(name))
return eventSet;
if (_superClass != null)
return _superClass.getEventSet(name);
return null;
} | class class_name[name] begin[{]
method[getEventSet, return_type[type[AptEventSet]], modifier[public], parameter[name]] begin[{]
ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[], member=getClassName, postfix_operators=[], prefix_operators=[], qualifier=eventSet, selectors=[MethodInv... | Keyword[public] identifier[AptEventSet] identifier[getEventSet] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[for] operator[SEP] identifier[AptEventSet] identifier[eventSet] operator[:] identifier[getEventSets] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] ident... |
private void writeMap(String fieldName, Object value) throws IOException
{
@SuppressWarnings("unchecked")
Map<String, Object> map = (Map<String, Object>) value;
m_writer.writeStartObject(fieldName);
for (Map.Entry<String, Object> entry : map.entrySet())
{
Object entryValue = en... | class class_name[name] begin[{]
method[writeMap, return_type[void], modifier[private], parameter[fieldName, value]] begin[{]
local_variable[type[Map], map]
call[m_writer.writeStartObject, parameter[member[.fieldName]]]
ForStatement(body=BlockStatement(label=None, statements=[Loc... | Keyword[private] Keyword[void] identifier[writeMap] operator[SEP] identifier[String] identifier[fieldName] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] {
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Map] operato... |
public static long parseLong (@Nullable final String sStr, @Nonnegative final int nRadix, final long nDefault)
{
if (sStr != null && sStr.length () > 0)
try
{
return Long.parseLong (sStr, nRadix);
}
catch (final NumberFormatException ex)
{
// Fall through
}
... | class class_name[name] begin[{]
method[parseLong, return_type[type[long]], modifier[public static], parameter[sStr, nRadix, nDefault]] begin[{]
if[binary_operation[binary_operation[member[.sStr], !=, literal[null]], &&, binary_operation[call[sStr.length, parameter[]], >, literal[0]]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[long] identifier[parseLong] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sStr] , annotation[@] identifier[Nonnegative] Keyword[final] Keyword[int] identifier[nRadix] , Keyword[final] Keyword[long] identifier[nDefault] operator[SE... |
public static Map<String, List<ExtensionElement>> getExtensionElements(DelegateExecution execution) {
if (isExecutingExecutionListener(execution)) {
return getListenerExtensionElements(execution);
} else {
return getFlowElementExtensionElements(execution);
}
} | class class_name[name] begin[{]
method[getExtensionElements, return_type[type[Map]], modifier[public static], parameter[execution]] begin[{]
if[call[.isExecutingExecutionListener, parameter[member[.execution]]]] begin[{]
return[call[.getListenerExtensionElements, parameter[member[.e... | Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[ExtensionElement] operator[>] operator[>] identifier[getExtensionElements] operator[SEP] identifier[DelegateExecution] identifier[execution] operator[SEP] {
Keyword[if] operator[SEP] identifi... |
static public CoordinateTransform makeCoordinateTransform (NetcdfDataset ds, AttributeContainer ctv, Formatter parseInfo, Formatter errInfo) {
// standard name
String transform_name = ctv.findAttValueIgnoreCase("transform_name", null);
if (null == transform_name)
transform_name = ctv.findAttValueI... | class class_name[name] begin[{]
method[makeCoordinateTransform, return_type[type[CoordinateTransform]], modifier[public static], parameter[ds, ctv, parseInfo, errInfo]] begin[{]
local_variable[type[String], transform_name]
if[binary_operation[literal[null], ==, member[.transform_name]]]... | Keyword[static] Keyword[public] identifier[CoordinateTransform] identifier[makeCoordinateTransform] operator[SEP] identifier[NetcdfDataset] identifier[ds] , identifier[AttributeContainer] identifier[ctv] , identifier[Formatter] identifier[parseInfo] , identifier[Formatter] identifier[errInfo] operator[SEP] {
... |
private <T> void runProcessorsOnInlineContent(ProxyBuilder<T> proxyBuilder,
ParagraphCoordinates paragraphCoordinates) {
ParagraphWrapper paragraph = new ParagraphWrapper(paragraphCoordinates.getParagraph());
List<String> processorExpressions = expressionUtil
... | class class_name[name] begin[{]
method[runProcessorsOnInlineContent, return_type[void], modifier[private], parameter[proxyBuilder, paragraphCoordinates]] begin[{]
local_variable[type[ParagraphWrapper], paragraph]
local_variable[type[List], processorExpressions]
ForStatement(body=BlockSt... | Keyword[private] operator[<] identifier[T] operator[>] Keyword[void] identifier[runProcessorsOnInlineContent] operator[SEP] identifier[ProxyBuilder] operator[<] identifier[T] operator[>] identifier[proxyBuilder] , identifier[ParagraphCoordinates] identifier[paragraphCoordinates] operator[SEP] {
identifier[Parag... |
public void propertyChange(final java.beans.PropertyChangeEvent p1) {
this.firePropertyChange(p1.getPropertyName(), p1.getOldValue(), p1.getNewValue());
} | class class_name[name] begin[{]
method[propertyChange, return_type[void], modifier[public], parameter[p1]] begin[{]
THIS[call[None.firePropertyChange, parameter[call[p1.getPropertyName, parameter[]], call[p1.getOldValue, parameter[]], call[p1.getNewValue, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[propertyChange] operator[SEP] Keyword[final] identifier[java] operator[SEP] identifier[beans] operator[SEP] identifier[PropertyChangeEvent] identifier[p1] operator[SEP] {
Keyword[this] operator[SEP] identifier[firePropertyChange] operator[SEP] identifier[p1] operator[SEP]... |
private static <E> void loadIntoCounter(String filename, Class<E> c, Counter<E> counter) throws RuntimeException {
try {
Constructor<E> m = c.getConstructor(String.class);
BufferedReader in = IOUtils.getBufferedFileReader(filename);// new
... | class class_name[name] begin[{]
method[loadIntoCounter, return_type[void], modifier[private static], parameter[filename, c, counter]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReferen... | Keyword[private] Keyword[static] operator[<] identifier[E] operator[>] Keyword[void] identifier[loadIntoCounter] operator[SEP] identifier[String] identifier[filename] , identifier[Class] operator[<] identifier[E] operator[>] identifier[c] , identifier[Counter] operator[<] identifier[E] operator[>] identifier[counter]... |
protected final CnvBnRsToDouble<RS>
createPutCnvBnRsToDouble() throws Exception {
CnvBnRsToDouble<RS> convrt = new CnvBnRsToDouble<RS>();
//assigning fully initialized object:
this.convertersMap
.put(CnvBnRsToDouble.class.getSimpleName(), convrt);
return convrt;
} | class class_name[name] begin[{]
method[createPutCnvBnRsToDouble, return_type[type[CnvBnRsToDouble]], modifier[final protected], parameter[]] begin[{]
local_variable[type[CnvBnRsToDouble], convrt]
THIS[member[None.convertersMap]call[None.put, parameter[ClassReference(postfix_operators=[]... | Keyword[protected] Keyword[final] identifier[CnvBnRsToDouble] operator[<] identifier[RS] operator[>] identifier[createPutCnvBnRsToDouble] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[CnvBnRsToDouble] operator[<] identifier[RS] operator[>] identifier[convrt] operator[=] Keyword[n... |
@Trivial
public void log(TraceComponent logger) {
Tr.debug(logger, MessageFormat.format("Annotation [ {0} ]", getAnnotationClassName()));
// Only log the non-defaulted values.
for (String valueName : this.values.keySet()) {
AnnotationValueImpl nextValue = getValue(valueName);
... | class class_name[name] begin[{]
method[log, return_type[void], modifier[public], parameter[logger]] begin[{]
call[Tr.debug, parameter[member[.logger], call[MessageFormat.format, parameter[literal["Annotation [ {0} ]"], call[.getAnnotationClassName, parameter[]]]]]]
ForStatement(body=Blo... | annotation[@] identifier[Trivial] Keyword[public] Keyword[void] identifier[log] operator[SEP] identifier[TraceComponent] identifier[logger] operator[SEP] {
identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[logger] , identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] l... |
@Override
public EClass getIfcStructuralLoadTemperature() {
if (ifcStructuralLoadTemperatureEClass == null) {
ifcStructuralLoadTemperatureEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(652);
}
return ifcStructuralLoadTemperatureEClass;
} | class class_name[name] begin[{]
method[getIfcStructuralLoadTemperature, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcStructuralLoadTemperatureEClass], ==, literal[null]]] begin[{]
assign[member[.ifcStructuralLoadTemper... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcStructuralLoadTemperature] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcStructuralLoadTemperatureEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcStructuralLoadTemperatureEClas... |
public static List<ClassReference> analyze(WildcardImportResolver importResolver, Set<String> libraryPaths, Set<String> sourcePaths,
Path sourceFile)
{
ASTParser parser = ASTParser.newParser(AST.JLS11);
parser.setEnvironment(libraryPaths.toArray(new String[libraryPaths.size()]), sour... | class class_name[name] begin[{]
method[analyze, return_type[type[List]], modifier[public static], parameter[importResolver, libraryPaths, sourcePaths, sourceFile]] begin[{]
local_variable[type[ASTParser], parser]
call[parser.setEnvironment, parameter[call[libraryPaths.toArray, parameter... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[ClassReference] operator[>] identifier[analyze] operator[SEP] identifier[WildcardImportResolver] identifier[importResolver] , identifier[Set] operator[<] identifier[String] operator[>] identifier[libraryPaths] , identifier[Set] operator[<] identi... |
protected void interceptIntDataType(Op op) {
// FIXME: Remove this method, after we'll add support for <int> dtype operations
if (op.x() != null && op.x().data().dataType() == DataBuffer.Type.INT)
throw new ND4JIllegalStateException(
"Op.X contains INT data. Oper... | class class_name[name] begin[{]
method[interceptIntDataType, return_type[void], modifier[protected], parameter[op]] begin[{]
if[binary_operation[binary_operation[call[op.x, parameter[]], !=, literal[null]], &&, binary_operation[call[op.x, parameter[]], ==, member[DataBuffer.Type.INT]]]] begin[{... | Keyword[protected] Keyword[void] identifier[interceptIntDataType] operator[SEP] identifier[Op] identifier[op] operator[SEP] {
Keyword[if] operator[SEP] identifier[op] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[op] operator[SEP] identifier[x] operator[... |
public static String getPathFromBaseDir(String path) {
int i = path.indexOf("grails-app/");
if(i > -1 ) {
return path.substring(i + 11);
}
else {
try {
File baseDir = BuildSettings.BASE_DIR;
String basePath = baseDir != null ? baseD... | class class_name[name] begin[{]
method[getPathFromBaseDir, return_type[type[String]], modifier[public static], parameter[path]] begin[{]
local_variable[type[int], i]
if[binary_operation[member[.i], >, literal[1]]] begin[{]
return[call[path.substring, parameter[binary_operati... | Keyword[public] Keyword[static] identifier[String] identifier[getPathFromBaseDir] operator[SEP] identifier[String] identifier[path] operator[SEP] {
Keyword[int] identifier[i] operator[=] identifier[path] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] opera... |
@Override
public boolean execute(final LineReader reader, final String[] parts, final SqlConfig sqlConfig,
final Properties props) {
PrintWriter writer = reader.getTerminal().writer();
writer.println("LIST:");
writer.flush();
List<String> pathList = null;
if (parts.length > 1) {
pathList = sqlConfig.g... | class class_name[name] begin[{]
method[execute, return_type[type[boolean]], modifier[public], parameter[reader, parts, sqlConfig, props]] begin[{]
local_variable[type[PrintWriter], writer]
call[writer.println, parameter[literal["LIST:"]]]
call[writer.flush, parameter[]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[execute] operator[SEP] Keyword[final] identifier[LineReader] identifier[reader] , Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[parts] , Keyword[final] identifier[SqlConfig] identifier[sqlConfig] , Keyword[final... |
public SymbolOptions withLatLng(LatLng latLng) {
geometry = Point.fromLngLat(latLng.getLongitude(), latLng.getLatitude());
return this;
} | class class_name[name] begin[{]
method[withLatLng, return_type[type[SymbolOptions]], modifier[public], parameter[latLng]] begin[{]
assign[member[.geometry], call[Point.fromLngLat, parameter[call[latLng.getLongitude, parameter[]], call[latLng.getLatitude, parameter[]]]]]
return[THIS[]]
... | Keyword[public] identifier[SymbolOptions] identifier[withLatLng] operator[SEP] identifier[LatLng] identifier[latLng] operator[SEP] {
identifier[geometry] operator[=] identifier[Point] operator[SEP] identifier[fromLngLat] operator[SEP] identifier[latLng] operator[SEP] identifier[getLongitude] operator[SEP] operat... |
public static InternetAddress parseFirstAddress(String address, Charset charset) {
final InternetAddress[] internetAddresses = parseAddress(address, charset);
if (ArrayUtil.isEmpty(internetAddresses)) {
try {
return new InternetAddress(address);
} catch (AddressException e) {
throw new MailExcep... | class class_name[name] begin[{]
method[parseFirstAddress, return_type[type[InternetAddress]], modifier[public static], parameter[address, charset]] begin[{]
local_variable[type[InternetAddress], internetAddresses]
if[call[ArrayUtil.isEmpty, parameter[member[.internetAddresses]]]] begin[... | Keyword[public] Keyword[static] identifier[InternetAddress] identifier[parseFirstAddress] operator[SEP] identifier[String] identifier[address] , identifier[Charset] identifier[charset] operator[SEP] {
Keyword[final] identifier[InternetAddress] operator[SEP] operator[SEP] identifier[internetAddresses] operator[=... |
@Override
public String retrievePublicIpAddress( TargetHandlerParameters parameters, String machineId )
throws TargetException {
String result = null;
try {
AmazonEC2 ec2 = createEc2Client( parameters.getTargetProperties());
DescribeInstancesRequest dis = new DescribeInstancesRequest();
dis.setInstanceI... | class class_name[name] begin[{]
method[retrievePublicIpAddress, return_type[type[String]], modifier[public], parameter[parameters, machineId]] begin[{]
local_variable[type[String], result]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[]... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[retrievePublicIpAddress] operator[SEP] identifier[TargetHandlerParameters] identifier[parameters] , identifier[String] identifier[machineId] operator[SEP] Keyword[throws] identifier[TargetException] {
identifier[String] identifier[... |
@Override
public void addSynchronizationObserver(Observer<Registry<KEY, ENTRY>,Long> observer) {
synchronisationObservable.addObserver(observer);
} | class class_name[name] begin[{]
method[addSynchronizationObserver, return_type[void], modifier[public], parameter[observer]] begin[{]
call[synchronisationObservable.addObserver, parameter[member[.observer]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[addSynchronizationObserver] operator[SEP] identifier[Observer] operator[<] identifier[Registry] operator[<] identifier[KEY] , identifier[ENTRY] operator[>] , identifier[Long] operator[>] identifier[observer] operator[SEP] {
identifier[... |
public void addHttpSessionListener(HttpSessionListener listener, String J2EEName) {
synchronized (mHttpSessionListeners) {
mHttpSessionListeners.add(listener);
mHttpSessionListenersJ2eeNames.add(J2EEName);
sessionListener = true;
_coreHttpSessionManager.getIStore(... | class class_name[name] begin[{]
method[addHttpSessionListener, return_type[void], modifier[public], parameter[listener, J2EEName]] begin[{]
SYNCHRONIZED[member[.mHttpSessionListeners]] BEGIN[{]
call[mHttpSessionListeners.add, parameter[member[.listener]]]
... | Keyword[public] Keyword[void] identifier[addHttpSessionListener] operator[SEP] identifier[HttpSessionListener] identifier[listener] , identifier[String] identifier[J2EEName] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[mHttpSessionListeners] operator[SEP] {
identifier[mHttpSessionLi... |
public java.util.List<Object> getDispQuoteOrSpeechOrStatement() {
if (dispQuoteOrSpeechOrStatement == null) {
dispQuoteOrSpeechOrStatement = new ArrayList<Object>();
}
return this.dispQuoteOrSpeechOrStatement;
} | class class_name[name] begin[{]
method[getDispQuoteOrSpeechOrStatement, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.dispQuoteOrSpeechOrStatement], ==, literal[null]]] begin[{]
assign[member[.dispQuoteOrSpeechOrStatement], ... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] identifier[getDispQuoteOrSpeechOrStatement] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[dispQuoteOrSpeechOrStatement] operator[==] Other[null] operator[... |
public boolean store (T item) {
if (size == items.length) {
if (!resizable) return false;
// Resize this queue
resize(Math.max(8, (int)(items.length * 1.75f)));
}
size++;
items[tail++] = item;
if (tail == items.length) tail = 0;
return true;
} | class class_name[name] begin[{]
method[store, return_type[type[boolean]], modifier[public], parameter[item]] begin[{]
if[binary_operation[member[.size], ==, member[items.length]]] begin[{]
if[member[.resizable]] begin[{]
return[literal[false]]
else begin[{]
N... | Keyword[public] Keyword[boolean] identifier[store] operator[SEP] identifier[T] identifier[item] operator[SEP] {
Keyword[if] operator[SEP] identifier[size] operator[==] identifier[items] operator[SEP] identifier[length] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[resizable] operato... |
public static int countNaN(double[] v) {
int c = 0;
for (double d : v) {
if (Double.isNaN(d)) {
c++;
}
}
return c;
} | class class_name[name] begin[{]
method[countNaN, return_type[type[int]], modifier[public static], parameter[v]] begin[{]
local_variable[type[int], c]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=d, postfix_oper... | Keyword[public] Keyword[static] Keyword[int] identifier[countNaN] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[v] operator[SEP] {
Keyword[int] identifier[c] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[double] identifier[d] operator[:] identifier[v] operator[SEP]... |
public Observable<ServiceResponse<FlowLogInformationInner>> beginGetFlowLogStatusWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and c... | class class_name[name] begin[{]
method[beginGetFlowLogStatusWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, networkWatcherName, targetResourceId]] begin[{]
if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[FlowLogInformationInner] operator[>] operator[>] identifier[beginGetFlowLogStatusWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[networkWatcherN... |
@Override
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {
// EE subsystem doesn't have any attributes, so make sure that the xml doesn't have any
requireNoAttributes(reader);
final ModelNode eeSubSystem = Util.createAddOperation(Path... | class class_name[name] begin[{]
method[readElement, return_type[void], modifier[public], parameter[reader, list]] begin[{]
call[.requireNoAttributes, parameter[member[.reader]]]
local_variable[type[ModelNode], eeSubSystem]
call[list.add, parameter[member[.eeSubSystem]]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[readElement] operator[SEP] identifier[XMLExtendedStreamReader] identifier[reader] , identifier[List] operator[<] identifier[ModelNode] operator[>] identifier[list] operator[SEP] Keyword[throws] identifier[XMLStreamException] {
identifie... |
public Observable<RegistryUsageListResultInner> listUsagesAsync(String resourceGroupName, String registryName) {
return listUsagesWithServiceResponseAsync(resourceGroupName, registryName).map(new Func1<ServiceResponse<RegistryUsageListResultInner>, RegistryUsageListResultInner>() {
@Override
... | class class_name[name] begin[{]
method[listUsagesAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, registryName]] begin[{]
return[call[.listUsagesWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.registryName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[RegistryUsageListResultInner] operator[>] identifier[listUsagesAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[registryName] operator[SEP] {
Keyword[return] identifier[listUsagesWithServiceRespons... |
public void deallocate(long block)
throws IOException
{
int size;
if (readOnly) {
throw (new FileManagerException("Attempt to deallocate in read only mode"));
}
block = block - HDR_SIZE;
if (block < FIRST_TAIL) {
throw (new FileManagerException("I... | class class_name[name] begin[{]
method[deallocate, return_type[void], modifier[public], parameter[block]] begin[{]
local_variable[type[int], size]
if[member[.readOnly]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=... | Keyword[public] Keyword[void] identifier[deallocate] operator[SEP] Keyword[long] identifier[block] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[size] operator[SEP] Keyword[if] operator[SEP] identifier[readOnly] operator[SEP] {
Keyword[throw] operator[SEP] Keyword[new... |
public Plan selectPlan(PlanSelectionPolicy policy) {
Plan plan = null;
int index = 0;
switch (policy) {
case FIRST:
case LAST:
Plan[] plans = bindings.keySet().toArray(new Plan[0]);
plan = (policy == PlanSelectionPolicy.FIRST) ? plans[0] : plans[plans.length - 1];
index =... | class class_name[name] begin[{]
method[selectPlan, return_type[type[Plan]], modifier[public], parameter[policy]] begin[{]
local_variable[type[Plan], plan]
local_variable[type[int], index]
SwitchStatement(cases=[SwitchStatementCase(case=['FIRST', 'LAST'], statements=[LocalVariableDeclara... | Keyword[public] identifier[Plan] identifier[selectPlan] operator[SEP] identifier[PlanSelectionPolicy] identifier[policy] operator[SEP] {
identifier[Plan] identifier[plan] operator[=] Other[null] operator[SEP] Keyword[int] identifier[index] operator[=] Other[0] operator[SEP] Keyword[switch] operator[SEP] identifi... |
public Observable<ServiceResponse<FoundFaces>> findFacesWithServiceResponseAsync(FindFacesOptionalParameter findFacesOptionalParameter) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
fina... | class class_name[name] begin[{]
method[findFacesWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[findFacesOptionalParameter]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.baseUrl, parameter[]]], ==, literal[null]]] begin[{]
Throw... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[FoundFaces] operator[>] operator[>] identifier[findFacesWithServiceResponseAsync] operator[SEP] identifier[FindFacesOptionalParameter] identifier[findFacesOptionalParameter] operator[SEP] {
Keyword[if] operator[... |
public void checkout(@Nonnull Run<?,?> build, @Nonnull Launcher launcher, @Nonnull FilePath workspace, @Nonnull TaskListener listener, @CheckForNull File changelogFile, @CheckForNull SCMRevisionState baseline) throws IOException, InterruptedException {
if (build instanceof AbstractBuild && listener instanceof B... | class class_name[name] begin[{]
method[checkout, return_type[void], modifier[public], parameter[build, launcher, workspace, listener, changelogFile, baseline]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.build], instanceof, type[AbstractBuild]], &&, binary_operation[m... | Keyword[public] Keyword[void] identifier[checkout] operator[SEP] annotation[@] identifier[Nonnull] identifier[Run] operator[<] operator[?] , operator[?] operator[>] identifier[build] , annotation[@] identifier[Nonnull] identifier[Launcher] identifier[launcher] , annotation[@] identifier[Nonnull] identifier[FilePath]... |
public void setupAll(Connection connection, Statement statement)
throws SQLException {
for (Object key : mappings.keySet()) {
Parameter parameter = mappings.get(key);
if (parameter.getInput() != null) {
Object value = parameter.getInput().getValue();
... | class class_name[name] begin[{]
method[setupAll, return_type[void], modifier[public], parameter[connection, statement]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(... | Keyword[public] Keyword[void] identifier[setupAll] operator[SEP] identifier[Connection] identifier[connection] , identifier[Statement] identifier[statement] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[for] operator[SEP] identifier[Object] identifier[key] operator[:] identifier[mappings] op... |
public static Class<?> commonBase(Class<?> a, Class<?> b) {
Class<?> result;
Class<?> ifc;
if (b == null) {
throw new IllegalArgumentException();
} else if (a == null) {
return b;
} else {
result = commonSuperClass(a, b);
if (Objec... | class class_name[name] begin[{]
method[commonBase, return_type[type[Class]], modifier[public static], parameter[a, b]] begin[{]
local_variable[type[Class], result]
local_variable[type[Class], ifc]
if[binary_operation[member[.b], ==, literal[null]]] begin[{]
ThrowStat... | Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[commonBase] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[a] , identifier[Class] operator[<] operator[?] operator[>] identifier[b] operator[SEP] {
identifier[Class] operator[<] opera... |
public String toExternalForm() {
// pre-compute length of StringBuffer
int len = this.getProtocol().length() + 1;
if (this.getAuthority() != null && this.getAuthority().length() > 0) {
len += 2 + this.getAuthority().length();
}
if (this.getPath() != null) {
len += this.getPath().length(... | class class_name[name] begin[{]
method[toExternalForm, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[int], len]
if[binary_operation[binary_operation[THIS[call[None.getAuthority, parameter[]]], !=, literal[null]], &&, binary_operation[THIS[call[No... | Keyword[public] identifier[String] identifier[toExternalForm] operator[SEP] operator[SEP] {
Keyword[int] identifier[len] operator[=] Keyword[this] operator[SEP] identifier[getProtocol] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] Keyw... |
private void addPostParams(final Request request) {
if (to != null) {
request.addPostParam("To", to);
}
if (channel != null) {
request.addPostParam("Channel", channel);
}
if (customMessage != null) {
request.addPostParam("CustomMessage", cust... | class class_name[name] begin[{]
method[addPostParams, return_type[void], modifier[private], parameter[request]] begin[{]
if[binary_operation[member[.to], !=, literal[null]]] begin[{]
call[request.addPostParam, parameter[literal["To"], member[.to]]]
else begin[{]
... | Keyword[private] Keyword[void] identifier[addPostParams] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] {
Keyword[if] operator[SEP] identifier[to] operator[!=] Other[null] operator[SEP] {
identifier[request] operator[SEP] identifier[addPostParam] operator[SEP] liter... |
public static String join(String separator, List<String> topicsArray) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < topicsArray.size(); i++) {
if (sb.length() > 0) {
sb.append(",");
}
sb.append(topicsArray.get(i));
}
return sb.toString();
} | class class_name[name] begin[{]
method[join, return_type[type[String]], modifier[public static], parameter[separator, topicsArray]] begin[{]
local_variable[type[StringBuilder], sb]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvo... | Keyword[public] Keyword[static] identifier[String] identifier[join] operator[SEP] identifier[String] identifier[separator] , identifier[List] operator[<] identifier[String] operator[>] identifier[topicsArray] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuil... |
@Override
public void stop(final Throwable exception) {
LOG.entering(CLASS_NAME, "stop");
synchronized (this.schedule) {
if (this.isClosed) {
LOG.log(Level.FINEST, "Clock has already been closed");
return;
}
this.isClosed = true;
this.exceptionCausedStop = exception... | class class_name[name] begin[{]
method[stop, return_type[void], modifier[public], parameter[exception]] begin[{]
call[LOG.entering, parameter[member[.CLASS_NAME], literal["stop"]]]
SYNCHRONIZED[THIS[member[None.schedule]]] BEGIN[{]
if[THIS[member[None.isC... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[stop] operator[SEP] Keyword[final] identifier[Throwable] identifier[exception] operator[SEP] {
identifier[LOG] operator[SEP] identifier[entering] operator[SEP] identifier[CLASS_NAME] , literal[String] operator[SEP] operator[SEP] Keyword... |
public List<CmsResource> getUsersPubList(CmsDbContext dbc, CmsUUID userId) throws CmsDataAccessException {
synchronized (m_publishListUpdateLock) {
updateLog(dbc);
return m_projectDriver.getUsersPubList(dbc, userId);
}
} | class class_name[name] begin[{]
method[getUsersPubList, return_type[type[List]], modifier[public], parameter[dbc, userId]] begin[{]
SYNCHRONIZED[member[.m_publishListUpdateLock]] BEGIN[{]
call[.updateLog, parameter[member[.dbc]]]
return[call[m_projectDriver.g... | Keyword[public] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[getUsersPubList] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[CmsUUID] identifier[userId] operator[SEP] Keyword[throws] identifier[CmsDataAccessException] {
Keyword[synchronized] operator[SEP] iden... |
public AuthorizedList addResource(String theResource) {
Validate.notNull(theResource, "theResource must not be null");
if (myAllowedInstances == null) {
myAllowedInstances = new ArrayList<>();
}
myAllowedInstances.add(theResource);
return this;
} | class class_name[name] begin[{]
method[addResource, return_type[type[AuthorizedList]], modifier[public], parameter[theResource]] begin[{]
call[Validate.notNull, parameter[member[.theResource], literal["theResource must not be null"]]]
if[binary_operation[member[.myAllowedInstanc... | Keyword[public] identifier[AuthorizedList] identifier[addResource] operator[SEP] identifier[String] identifier[theResource] operator[SEP] {
identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[theResource] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identif... |
private void createAnalyzers(final AnalysisJobBuilder ajb, final Class<? extends Analyzer<?>> analyzerClass,
final List<InputColumn<?>> columns) {
final int columnsPerAnalyzer = getColumnsPerAnalyzer();
AnalyzerComponentBuilder<?> analyzerJobBuilder = ajb.addAnalyzer(analyzerClass);
... | class class_name[name] begin[{]
method[createAnalyzers, return_type[void], modifier[private], parameter[ajb, analyzerClass, columns]] begin[{]
local_variable[type[int], columnsPerAnalyzer]
local_variable[type[AnalyzerComponentBuilder], analyzerJobBuilder]
local_variable[type[int], colum... | Keyword[private] Keyword[void] identifier[createAnalyzers] operator[SEP] Keyword[final] identifier[AnalysisJobBuilder] identifier[ajb] , Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Analyzer] operator[<] operator[?] operator[>] operator[>] identifier[analyzerClass] , Keyword[fi... |
public static boolean isValidJsonStrict(String s) {
try {
new JSONParser(MODE_RFC4627).parse(s, FakeMapper.DEFAULT);
return true;
} catch (ParseException e) {
return false;
}
} | class class_name[name] begin[{]
method[isValidJsonStrict, return_type[type[boolean]], modifier[public static], parameter[s]] begin[{]
TryStatement(block=[StatementExpression(expression=ClassCreator(arguments=[MemberReference(member=MODE_RFC4627, postfix_operators=[], prefix_operators=[], qualifier=, se... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isValidJsonStrict] operator[SEP] identifier[String] identifier[s] operator[SEP] {
Keyword[try] {
Keyword[new] identifier[JSONParser] operator[SEP] identifier[MODE_RFC4627] operator[SEP] operator[SEP] identifier[parse] operator[SEP] identifier... |
public static void print( IntegralKernel kernel )
{
int x0 = 0,x1=0,y0=0,y1=0;
for( ImageRectangle k : kernel.blocks) {
if( k.x0 < x0 )
x0 = k.x0;
if( k.y0 < y0 )
y0 = k.y0;
if( k.x1 > x1 )
x1 = k.x1;
if( k.y1 > y1 )
y1 = k.y1;
}
int w = x1-x0;
int h = y1-y0;
int sum[] = new i... | class class_name[name] begin[{]
method[print, return_type[void], modifier[public static], parameter[kernel]] begin[{]
local_variable[type[int], x0]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=x0, postfix_operator... | Keyword[public] Keyword[static] Keyword[void] identifier[print] operator[SEP] identifier[IntegralKernel] identifier[kernel] operator[SEP] {
Keyword[int] identifier[x0] operator[=] Other[0] , identifier[x1] operator[=] Other[0] , identifier[y0] operator[=] Other[0] , identifier[y1] operator[=] Other[0] operato... |
public void onItemBind(int position, T item) {
if (onItemBind != null) {
variableId = VAR_INVALID;
layoutRes = LAYOUT_NONE;
onItemBind.onItemBind(this, position, item);
if (variableId == VAR_INVALID) {
throw new IllegalStateException("variableId no... | class class_name[name] begin[{]
method[onItemBind, return_type[void], modifier[public], parameter[position, item]] begin[{]
if[binary_operation[member[.onItemBind], !=, literal[null]]] begin[{]
assign[member[.variableId], member[.VAR_INVALID]]
ass... | Keyword[public] Keyword[void] identifier[onItemBind] operator[SEP] Keyword[int] identifier[position] , identifier[T] identifier[item] operator[SEP] {
Keyword[if] operator[SEP] identifier[onItemBind] operator[!=] Other[null] operator[SEP] {
identifier[variableId] operator[=] identifier[VAR_INVALID] op... |
public static Element drawCross(SVGPlot svgp, Projection2D proj, NumberVector mid, double radius) {
final double[] v_mid = mid.toArray();
final long[] dims = proj.getVisibleDimensions2D();
SVGPath path = new SVGPath();
for(int dim = BitsUtil.nextSetBit(dims, 0); dim >= 0; dim = BitsUtil.nextSetBit(dims... | class class_name[name] begin[{]
method[drawCross, return_type[type[Element]], modifier[public static], parameter[svgp, proj, mid, radius]] begin[{]
local_variable[type[double], v_mid]
local_variable[type[long], dims]
local_variable[type[SVGPath], path]
ForStatement(body=BlockSta... | Keyword[public] Keyword[static] identifier[Element] identifier[drawCross] operator[SEP] identifier[SVGPlot] identifier[svgp] , identifier[Projection2D] identifier[proj] , identifier[NumberVector] identifier[mid] , Keyword[double] identifier[radius] operator[SEP] {
Keyword[final] Keyword[double] operator[SEP] ... |
public ConsulResponse<List<CatalogService>> getService(@SuppressWarnings("SameParameterValue") final String serviceName) {
return getService(serviceName, null, null, RequestOptions.BLANK);
} | class class_name[name] begin[{]
method[getService, return_type[type[ConsulResponse]], modifier[public], parameter[serviceName]] begin[{]
return[call[.getService, parameter[member[.serviceName], literal[null], literal[null], member[RequestOptions.BLANK]]]]
end[}]
END[}] | Keyword[public] identifier[ConsulResponse] operator[<] identifier[List] operator[<] identifier[CatalogService] operator[>] operator[>] identifier[getService] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[final] identifier[String] identifier[serviceName] ope... |
private void sendRequest(Object request, ContextualFuture future) {
if (open && connection.open) {
long requestId = ++this.requestId;
futures.put(requestId, future);
connection.handleRequest(requestId, request);
} else {
future.context.executor().execute(() -> future.completeExceptionall... | class class_name[name] begin[{]
method[sendRequest, return_type[void], modifier[private], parameter[request, future]] begin[{]
if[binary_operation[member[.open], &&, member[connection.open]]] begin[{]
local_variable[type[long], requestId]
call[futures.put, pa... | Keyword[private] Keyword[void] identifier[sendRequest] operator[SEP] identifier[Object] identifier[request] , identifier[ContextualFuture] identifier[future] operator[SEP] {
Keyword[if] operator[SEP] identifier[open] operator[&&] identifier[connection] operator[SEP] identifier[open] operator[SEP] {
K... |
public static int getInteger(String pStr, int defval) {
if (isEmpty(pStr)) return defval;
try {
return Integer.parseInt(pStr);
} catch (NumberFormatException nm) {
return defval;
}
} | class class_name[name] begin[{]
method[getInteger, return_type[type[int]], modifier[public static], parameter[pStr, defval]] begin[{]
if[call[.isEmpty, parameter[member[.pStr]]]] begin[{]
return[member[.defval]]
else begin[{]
None
end[}]
TryStatement(block=[ReturnStateme... | Keyword[public] Keyword[static] Keyword[int] identifier[getInteger] operator[SEP] identifier[String] identifier[pStr] , Keyword[int] identifier[defval] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] identifier[pStr] operator[SEP] operator[SEP] Keyword[return] identifier[defval] oper... |
public void marshall(CreateConnectorDefinitionRequest createConnectorDefinitionRequest, ProtocolMarshaller protocolMarshaller) {
if (createConnectorDefinitionRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMar... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[createConnectorDefinitionRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.createConnectorDefinitionRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=Class... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CreateConnectorDefinitionRequest] identifier[createConnectorDefinitionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[createConnectorDefinitionRequest] operat... |
public boolean step7() {
Target target = new ImageTarget(new File("image7.png"));
target.setMinScore(DEFAULT_MINSCORE);
ScreenRegion loc = screenRegion.find(target);
if (loc != null){
mouse.click(loc.getCenter());
keyboard.type("something to type");
return true;
}else{... | class class_name[name] begin[{]
method[step7, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[Target], target]
call[target.setMinScore, parameter[member[.DEFAULT_MINSCORE]]]
local_variable[type[ScreenRegion], loc]
if[binary... | Keyword[public] Keyword[boolean] identifier[step7] operator[SEP] operator[SEP] {
identifier[Target] identifier[target] operator[=] Keyword[new] identifier[ImageTarget] operator[SEP] Keyword[new] identifier[File] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[target] operator[S... |
@Override
public final int get(int codePoint) {
int value;
int ix;
if (codePoint >= 0) {
if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) {
// Ordinary BMP code point, excluding leading surrogates.
// BMP uses a si... | class class_name[name] begin[{]
method[get, return_type[type[int]], modifier[final public], parameter[codePoint]] begin[{]
local_variable[type[int], value]
local_variable[type[int], ix]
if[binary_operation[member[.codePoint], >=, literal[0]]] begin[{]
if[... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[int] identifier[get] operator[SEP] Keyword[int] identifier[codePoint] operator[SEP] {
Keyword[int] identifier[value] operator[SEP] Keyword[int] identifier[ix] operator[SEP] Keyword[if] operator[SEP] identifier[codePoint] operator[>=] Other... |
@RequestMapping(value = "information/{entityType}/{id}", method = RequestMethod.GET)
public Resources<EntityInformation> getInformation(@PathVariable ProjectEntityType entityType, @PathVariable ID id) {
// Gets the entity
ProjectEntity entity = getEntity(entityType, id);
// List of informati... | class class_name[name] begin[{]
method[getInformation, return_type[type[Resources]], modifier[public], parameter[entityType, id]] begin[{]
local_variable[type[ProjectEntity], entity]
local_variable[type[List], informations]
return[call[Resources.of, parameter[member[.informations], call... | annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[GET] operator[SEP] Keyword[public] identifier[Resources] operator[<] identifier[EntityInformation] operator[>] identifier[getInformati... |
private static <K, V> CacheStream<Entry<K, V>> cacheStreamCast(CacheStream stream) {
return stream;
} | class class_name[name] begin[{]
method[cacheStreamCast, return_type[type[CacheStream]], modifier[private static], parameter[stream]] begin[{]
return[member[.stream]]
end[}]
END[}] | Keyword[private] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[CacheStream] operator[<] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[cacheStreamCast] operator[SEP] identifier[CacheStream] identifier[stream] operator[SEP] {
Key... |
protected int getRetryInterval() throws ActivityException {
try {
String v = getAttributeValueSmart(PROP_RETRY_INTERVAL);
return StringHelper.getInteger(v, 600);
}
catch (PropertyException ex) {
throw new ActivityException(ex.getMessage(), ex);
}
} | class class_name[name] begin[{]
method[getRetryInterval, return_type[type[int]], modifier[protected], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=PROP_RET... | Keyword[protected] Keyword[int] identifier[getRetryInterval] operator[SEP] operator[SEP] Keyword[throws] identifier[ActivityException] {
Keyword[try] {
identifier[String] identifier[v] operator[=] identifier[getAttributeValueSmart] operator[SEP] identifier[PROP_RETRY_INTERVAL] operator[SEP] operator[S... |
@SuppressWarnings("unchecked")
public <T> T continueWith(final Object currentInstance, final String methodName, final Class<T> target) {
Class currentClass = currentInstance.getClass();
Method method;
try {
method = currentClass.getDeclaredMethod(methodName);
}
catch (NoSuchMethodException e) {
throw... | class class_name[name] begin[{]
method[continueWith, return_type[type[T]], modifier[public], parameter[currentInstance, methodName, target]] begin[{]
local_variable[type[Class], currentClass]
local_variable[type[Method], method]
TryStatement(block=[StatementExpression(expression=Assignm... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[continueWith] operator[SEP] Keyword[final] identifier[Object] identifier[currentInstance] , Keyword[final] identifier[String] identifier[methodName] , K... |
public ListTagsForResourceResult withResourceTags(Tag... resourceTags) {
if (this.resourceTags == null) {
setResourceTags(new com.amazonaws.internal.SdkInternalList<Tag>(resourceTags.length));
}
for (Tag ele : resourceTags) {
this.resourceTags.add(ele);
}
... | class class_name[name] begin[{]
method[withResourceTags, return_type[type[ListTagsForResourceResult]], modifier[public], parameter[resourceTags]] begin[{]
if[binary_operation[THIS[member[None.resourceTags]], ==, literal[null]]] begin[{]
call[.setResourceTags, parameter[C... | Keyword[public] identifier[ListTagsForResourceResult] identifier[withResourceTags] operator[SEP] identifier[Tag] operator[...] identifier[resourceTags] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[resourceTags] operator[==] Other[null] operator[SEP] {
identifier[set... |
@Override
public double probability(double x0, double x1) throws NumberIsTooLargeException {
if (x0 > x1) {
throw new NumberIsTooLargeException(LocalizedFormats.LOWER_ENDPOINT_ABOVE_UPPER_ENDPOINT, x0, x1, true);
}
final double denom = standardDeviation * SQRT2;
final dou... | class class_name[name] begin[{]
method[probability, return_type[type[double]], modifier[public], parameter[x0, x1]] begin[{]
if[binary_operation[member[.x0], >, member[.x1]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=LOWER_ENDPOINT_ABOVE_UPPER... | annotation[@] identifier[Override] Keyword[public] Keyword[double] identifier[probability] operator[SEP] Keyword[double] identifier[x0] , Keyword[double] identifier[x1] operator[SEP] Keyword[throws] identifier[NumberIsTooLargeException] {
Keyword[if] operator[SEP] identifier[x0] operator[>] identifier[x1] opera... |
@SuppressWarnings("unchecked")
public Collection<V> getValues(Object src) {
ArrayList<V> values = new ArrayList<V>();
if( src instanceof String ) {
String[] words = ((String)src).split(",");
if( words.length < 1 ) {
values.add(getValue(sr... | class class_name[name] begin[{]
method[getValues, return_type[type[Collection]], modifier[public], parameter[src]] begin[{]
local_variable[type[ArrayList], values]
if[binary_operation[member[.src], instanceof, type[String]]] begin[{]
local_variable[type[String], words]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Collection] operator[<] identifier[V] operator[>] identifier[getValues] operator[SEP] identifier[Object] identifier[src] operator[SEP] {
identifier[ArrayList] operator[<] identifier[V] operator[>] id... |
public final int decodeValues(int index, TypedArrayDecoder tad,
InputProblemReporter rep)
throws XMLStreamException
{
if (index < 0 || index >= mAttrCount) {
throwIndex(index);
}
// Char[] faster than String... and no need to trim here:
... | class class_name[name] begin[{]
method[decodeValues, return_type[type[int]], modifier[final public], parameter[index, tad, rep]] begin[{]
if[binary_operation[binary_operation[member[.index], <, literal[0]], ||, binary_operation[member[.index], >=, member[.mAttrCount]]]] begin[{]
... | Keyword[public] Keyword[final] Keyword[int] identifier[decodeValues] operator[SEP] Keyword[int] identifier[index] , identifier[TypedArrayDecoder] identifier[tad] , identifier[InputProblemReporter] identifier[rep] operator[SEP] Keyword[throws] identifier[XMLStreamException] {
Keyword[if] operator[SEP] identifie... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.