code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void setThreshold(final double THRESHOLD) {
if (Double.compare(THRESHOLD, minValue) >= 0 && Double.compare(THRESHOLD, maxValue) <= 0) {
threshold = THRESHOLD;
} else {
if (THRESHOLD < niceMinValue) {
threshold = niceMinValue;
}
if (... | class class_name[name] begin[{]
method[setThreshold, return_type[void], modifier[public], parameter[THRESHOLD]] begin[{]
if[binary_operation[binary_operation[call[Double.compare, parameter[member[.THRESHOLD], member[.minValue]]], >=, literal[0]], &&, binary_operation[call[Double.compare, parame... | Keyword[public] Keyword[void] identifier[setThreshold] operator[SEP] Keyword[final] Keyword[double] identifier[THRESHOLD] operator[SEP] {
Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[THRESHOLD] , identifier[minValue] operator[SEP] operator[>=] Other[0] ... |
public static void clearallLocalDBs() {
for (final Map.Entry<MongoClient, Boolean> entry : localInstances.entrySet()) {
for (final String dbName : entry.getKey().listDatabaseNames()) {
entry.getKey().getDatabase(dbName).drop();
}
}
} | class class_name[name] begin[{]
method[clearallLocalDBs, return_type[void], modifier[public static], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], memb... | Keyword[public] Keyword[static] Keyword[void] identifier[clearallLocalDBs] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[final] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[MongoClient] , identifier[Boolean] operator[>] identifier[entry] operator[:] identifier[local... |
public synchronized Collection<T> getAll() {
List<T> all = new ArrayList<T>(size);
for (T e = head; e != null; e = e.getNext()) {
all.add(e);
}
return all;
} | class class_name[name] begin[{]
method[getAll, return_type[type[Collection]], modifier[synchronized public], parameter[]] begin[{]
local_variable[type[List], all]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(... | Keyword[public] Keyword[synchronized] identifier[Collection] operator[<] identifier[T] operator[>] identifier[getAll] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[T] operator[>] identifier[all] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[T] operator[>] operator[... |
@Pure
@SuppressWarnings({"checkstyle:returncount", "checkstyle:npathcomplexity"})
public static Class<?> forName(String name) throws ClassNotFoundException {
if (name == null || "".equals(name) || "null".equals(name) //$NON-NLS-1$ //$NON-NLS-2$
|| "void".equals(name)) { //$NON-NLS-1$
return void.class;
}
... | class class_name[name] begin[{]
method[forName, return_type[type[Class]], modifier[public static], parameter[name]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[member[.name], ==, literal[null]], ||, literal[""]], ||, literal["null"]], ||, literal["void"]]] be... | annotation[@] identifier[Pure] annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String]
} operator[SEP] Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[forName] operator[SEP] identifier[String] identifier[name] operator[SEP]... |
public final void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) servletRequest;
HttpServletResponse response = (HttpServletResponse) servletResponse;
String localPath =... | class class_name[name] begin[{]
method[doFilter, return_type[void], modifier[final public], parameter[servletRequest, servletResponse, filterChain]] begin[{]
local_variable[type[HttpServletRequest], request]
local_variable[type[HttpServletResponse], response]
local_variable[type[String]... | Keyword[public] Keyword[final] Keyword[void] identifier[doFilter] operator[SEP] identifier[ServletRequest] identifier[servletRequest] , identifier[ServletResponse] identifier[servletResponse] , identifier[FilterChain] identifier[filterChain] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletE... |
public static final FilterOperation mapFilterHintToOperation(FilterOperationHint hint) {
for(int i = 0; i < FILTER_OPERATIONS.length; i++) {
FilterOperation op = FILTER_OPERATIONS[i];
if(op.getOperationHint().equals(hint))
return op;
}
return null;
} | class class_name[name] begin[{]
method[mapFilterHintToOperation, return_type[type[FilterOperation]], modifier[final public static], parameter[hint]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], ... | Keyword[public] Keyword[static] Keyword[final] identifier[FilterOperation] identifier[mapFilterHintToOperation] operator[SEP] identifier[FilterOperationHint] identifier[hint] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identif... |
public static GenerationConfig getGenerationConfig(Boolean generateBuilders, Boolean includeAdditionalProperties,
Boolean includeDynamicAccessors, Boolean useLongIntegers) {
return new DefaultGenerationConfig() {
@Override
public boolean isGenerateBuilders() { // set config option by
// overrid... | class class_name[name] begin[{]
method[getGenerationConfig, return_type[type[GenerationConfig]], modifier[public static], parameter[generateBuilders, includeAdditionalProperties, includeDynamicAccessors, useLongIntegers]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[A... | Keyword[public] Keyword[static] identifier[GenerationConfig] identifier[getGenerationConfig] operator[SEP] identifier[Boolean] identifier[generateBuilders] , identifier[Boolean] identifier[includeAdditionalProperties] , identifier[Boolean] identifier[includeDynamicAccessors] , identifier[Boolean] identifier[useLongI... |
@Nonnull
public BugInstance addClassAndMethod(MethodGen methodGen, String sourceFile) {
addClass(methodGen.getClassName());
addMethod(methodGen, sourceFile);
if (!MemberUtils.isUserGenerated(methodGen)) {
foundInAutogeneratedMethod();
}
return this;
} | class class_name[name] begin[{]
method[addClassAndMethod, return_type[type[BugInstance]], modifier[public], parameter[methodGen, sourceFile]] begin[{]
call[.addClass, parameter[call[methodGen.getClassName, parameter[]]]]
call[.addMethod, parameter[member[.methodGen], member[.sou... | annotation[@] identifier[Nonnull] Keyword[public] identifier[BugInstance] identifier[addClassAndMethod] operator[SEP] identifier[MethodGen] identifier[methodGen] , identifier[String] identifier[sourceFile] operator[SEP] {
identifier[addClass] operator[SEP] identifier[methodGen] operator[SEP] identifier[getClass... |
public static BinaryData toHawkularFormat(BasicMessage msg, InputStream extraData) {
String msgJson = toHawkularFormat(msg);
return new BinaryData(msgJson.getBytes(), extraData);
} | class class_name[name] begin[{]
method[toHawkularFormat, return_type[type[BinaryData]], modifier[public static], parameter[msg, extraData]] begin[{]
local_variable[type[String], msgJson]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBytes, postfix_operators=[], prefix_... | Keyword[public] Keyword[static] identifier[BinaryData] identifier[toHawkularFormat] operator[SEP] identifier[BasicMessage] identifier[msg] , identifier[InputStream] identifier[extraData] operator[SEP] {
identifier[String] identifier[msgJson] operator[=] identifier[toHawkularFormat] operator[SEP] identifier[msg]... |
@Override
public List<V> load(List<SortProperty> sorting) {
return load(getFirst(), getPageSize(), sorting);
} | class class_name[name] begin[{]
method[load, return_type[type[List]], modifier[public], parameter[sorting]] begin[{]
return[call[.load, parameter[call[.getFirst, parameter[]], call[.getPageSize, parameter[]], member[.sorting]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[V] operator[>] identifier[load] operator[SEP] identifier[List] operator[<] identifier[SortProperty] operator[>] identifier[sorting] operator[SEP] {
Keyword[return] identifier[load] operator[SEP] identifier[getFirst] operat... |
public void execute() throws ActivityException {
EventWaitInstance received = registerWaitEvents(false, true);
if (received!=null) {
setReturnCodeAndExitStatus(received.getCompletionCode());
processMessage(getExternalEventInstanceDetails(received.getMessageDocumentId()));
... | class class_name[name] begin[{]
method[execute, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[EventWaitInstance], received]
if[binary_operation[member[.received], !=, literal[null]]] begin[{]
call[.setReturnCodeAndExitStatus, para... | Keyword[public] Keyword[void] identifier[execute] operator[SEP] operator[SEP] Keyword[throws] identifier[ActivityException] {
identifier[EventWaitInstance] identifier[received] operator[=] identifier[registerWaitEvents] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] op... |
protected boolean reportHeartBeat(DatanodeID node) {
if (node != null && shouldUpdateNodes()) {
reportRegister(node);
synchronized(this) {
if (outStandingHeartbeats.remove(node)) {
outStandingReports.add(node);
return true;
}
}
}
return false;
} | class class_name[name] begin[{]
method[reportHeartBeat, return_type[type[boolean]], modifier[protected], parameter[node]] begin[{]
if[binary_operation[binary_operation[member[.node], !=, literal[null]], &&, call[.shouldUpdateNodes, parameter[]]]] begin[{]
call[.reportReg... | Keyword[protected] Keyword[boolean] identifier[reportHeartBeat] operator[SEP] identifier[DatanodeID] identifier[node] operator[SEP] {
Keyword[if] operator[SEP] identifier[node] operator[!=] Other[null] operator[&&] identifier[shouldUpdateNodes] operator[SEP] operator[SEP] operator[SEP] {
identifier[re... |
private String toLabel(final TimeUnit unit) {
switch(unit) {
case DAYS: return "day";
case HOURS: return "hour";
case MINUTES: return "minute";
case SECONDS: return "second";
case MILLISECONDS: return "ms";
case MICROSECONDS: return "us";
case NANOSEC... | class class_name[name] begin[{]
method[toLabel, return_type[type[String]], modifier[private], parameter[unit]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['DAYS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value... | Keyword[private] identifier[String] identifier[toLabel] operator[SEP] Keyword[final] identifier[TimeUnit] identifier[unit] operator[SEP] {
Keyword[switch] operator[SEP] identifier[unit] operator[SEP] {
Keyword[case] identifier[DAYS] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[ca... |
protected void doWrite(HttpServletRequest request,
HttpServletResponse response, String tunnelUUID)
throws GuacamoleException {
GuacamoleTunnel tunnel = getTunnel(tunnelUUID);
// We still need to set the content type to avoid the default of
// text/html, as such a conte... | class class_name[name] begin[{]
method[doWrite, return_type[void], modifier[protected], parameter[request, response, tunnelUUID]] begin[{]
local_variable[type[GuacamoleTunnel], tunnel]
call[response.setContentType, parameter[literal["application/octet-stream"]]]
call[res... | Keyword[protected] Keyword[void] identifier[doWrite] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , identifier[String] identifier[tunnelUUID] operator[SEP] Keyword[throws] identifier[GuacamoleException] {
identifier[GuacamoleTunnel] ide... |
protected Link extractLink(Object element, LinkRelation rel) {
return new Link(element.toString(), rel);
} | class class_name[name] begin[{]
method[extractLink, return_type[type[Link]], modifier[protected], parameter[element, rel]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[], type_arguments=N... | Keyword[protected] identifier[Link] identifier[extractLink] operator[SEP] identifier[Object] identifier[element] , identifier[LinkRelation] identifier[rel] operator[SEP] {
Keyword[return] Keyword[new] identifier[Link] operator[SEP] identifier[element] operator[SEP] identifier[toString] operator[SEP] operator[SE... |
public static String getInvalidFileSizeMessage(final long maxFileSize) {
return String.format(I18nUtilities.format(null, InternalMessages.DEFAULT_VALIDATION_ERROR_FILE_WRONG_SIZE),
FileUtil.readableFileSize(maxFileSize));
} | class class_name[name] begin[{]
method[getInvalidFileSizeMessage, return_type[type[String]], modifier[public static], parameter[maxFileSize]] begin[{]
return[call[String.format, parameter[call[I18nUtilities.format, parameter[literal[null], member[InternalMessages.DEFAULT_VALIDATION_ERROR_FILE_WRONG_SIZ... | Keyword[public] Keyword[static] identifier[String] identifier[getInvalidFileSizeMessage] operator[SEP] Keyword[final] Keyword[long] identifier[maxFileSize] operator[SEP] {
Keyword[return] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[I18nUtilities] operator[SEP] identifier[format] ... |
public static String getPackageResource(Class<?> type, String resourceName)
{
StringBuilder builder = new StringBuilder();
builder.append(type.getPackage().getName().replace('.', '/'));
if(resourceName.charAt(0) != '/') {
builder.append('/');
}
builder.append(resourceName);
retur... | class class_name[name] begin[{]
method[getPackageResource, return_type[type[String]], modifier[public static], parameter[type, resourceName]] begin[{]
local_variable[type[StringBuilder], builder]
call[builder.append, parameter[call[type.getPackage, parameter[]]]]
if[bina... | Keyword[public] Keyword[static] identifier[String] identifier[getPackageResource] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , identifier[String] identifier[resourceName] operator[SEP] {
identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[S... |
public DatePickerNumberOfMonths getNumberOfMonths()
{
IComplexOption numberOfMonths = getComplexOption("numberOfMonths");
if (numberOfMonths != null && numberOfMonths instanceof DatePickerNumberOfMonths)
{
return (DatePickerNumberOfMonths) numberOfMonths;
}
return new DatePickerNumberOfMonths(new Short(... | class class_name[name] begin[{]
method[getNumberOfMonths, return_type[type[DatePickerNumberOfMonths]], modifier[public], parameter[]] begin[{]
local_variable[type[IComplexOption], numberOfMonths]
if[binary_operation[binary_operation[member[.numberOfMonths], !=, literal[null]], &&, binar... | Keyword[public] identifier[DatePickerNumberOfMonths] identifier[getNumberOfMonths] operator[SEP] operator[SEP] {
identifier[IComplexOption] identifier[numberOfMonths] operator[=] identifier[getComplexOption] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[numberOfMo... |
private void a2(StringBuilder sb, int x) {
if (x < 10) {
sb.append('0');
}
sb.append(x);
} | class class_name[name] begin[{]
method[a2, return_type[void], modifier[private], parameter[sb, x]] begin[{]
if[binary_operation[member[.x], <, literal[10]]] begin[{]
call[sb.append, parameter[literal['0']]]
else begin[{]
None
end[}]
call[s... | Keyword[private] Keyword[void] identifier[a2] operator[SEP] identifier[StringBuilder] identifier[sb] , Keyword[int] identifier[x] operator[SEP] {
Keyword[if] operator[SEP] identifier[x] operator[<] Other[10] operator[SEP] {
identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String]... |
@Exported
public int getBusyExecutors() {
int r=0;
for (Node n : getNodes()) {
Computer c = n.toComputer();
if(c!=null && c.isOnline())
r += c.countBusy();
}
return r;
} | class class_name[name] begin[{]
method[getBusyExecutors, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], r]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], ... | annotation[@] identifier[Exported] Keyword[public] Keyword[int] identifier[getBusyExecutors] operator[SEP] operator[SEP] {
Keyword[int] identifier[r] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Node] identifier[n] operator[:] identifier[getNodes] operator[SEP] operator[SEP] operator... |
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case VALUES:
return isSetValues();
case NULLS:
return isSetNulls();
}
throw new IllegalStateException();
} | class class_name[name] begin[{]
method[isSet, return_type[type[boolean]], modifier[public], parameter[field]] begin[{]
if[binary_operation[member[.field], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, po... | Keyword[public] Keyword[boolean] identifier[isSet] operator[SEP] identifier[_Fields] identifier[field] operator[SEP] {
Keyword[if] operator[SEP] identifier[field] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] opera... |
public UserListing getAllUsersByJobView(JobView jobViewParam) {
if(this.serviceTicket != null && jobViewParam != null) {
jobViewParam.setServiceTicket(this.serviceTicket);
}
try {
return new UserListing(this.postJson(
jobViewParam,
... | class class_name[name] begin[{]
method[getAllUsersByJobView, return_type[type[UserListing]], modifier[public], parameter[jobViewParam]] begin[{]
if[binary_operation[binary_operation[THIS[member[None.serviceTicket]], !=, literal[null]], &&, binary_operation[member[.jobViewParam], !=, literal[nul... | Keyword[public] identifier[UserListing] identifier[getAllUsersByJobView] operator[SEP] identifier[JobView] identifier[jobViewParam] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[serviceTicket] operator[!=] Other[null] operator[&&] identifier[jobViewParam] operator[!=] Other[nul... |
@GwtIncompatible // TODO
public static ListeningExecutorService listeningDecorator(ExecutorService delegate) {
return (delegate instanceof ListeningExecutorService)
? (ListeningExecutorService) delegate
: (delegate instanceof ScheduledExecutorService)
? new ScheduledListeningDecorator(... | class class_name[name] begin[{]
method[listeningDecorator, return_type[type[ListeningExecutorService]], modifier[public static], parameter[delegate]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=delegate, postfix_operators=[], prefix_operators=[], qualifie... | annotation[@] identifier[GwtIncompatible] Keyword[public] Keyword[static] identifier[ListeningExecutorService] identifier[listeningDecorator] operator[SEP] identifier[ExecutorService] identifier[delegate] operator[SEP] {
Keyword[return] operator[SEP] identifier[delegate] Keyword[instanceof] identifier[ListeningE... |
@Override
public void readFragmentFrom(MwsReader r) {
payment = r.read("Payment", Money.class);
paymentMethod = r.read("PaymentMethod", String.class);
} | class class_name[name] begin[{]
method[readFragmentFrom, return_type[void], modifier[public], parameter[r]] begin[{]
assign[member[.payment], call[r.read, parameter[literal["Payment"], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(argumen... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[readFragmentFrom] operator[SEP] identifier[MwsReader] identifier[r] operator[SEP] {
identifier[payment] operator[=] identifier[r] operator[SEP] identifier[read] operator[SEP] literal[String] , identifier[Money] operator[SEP] Keyword[cla... |
public Map<String, UserGroup> getUserGroups(LDAPConnection ldapConnection)
throws GuacamoleException {
// Do not return any user groups if base DN is not specified
String groupBaseDN = confService.getGroupBaseDN();
if (groupBaseDN == null)
return Collections.emptyMap();
... | class class_name[name] begin[{]
method[getUserGroups, return_type[type[Map]], modifier[public], parameter[ldapConnection]] begin[{]
local_variable[type[String], groupBaseDN]
if[binary_operation[member[.groupBaseDN], ==, literal[null]]] begin[{]
return[call[Collections.emptyMap, paramete... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[UserGroup] operator[>] identifier[getUserGroups] operator[SEP] identifier[LDAPConnection] identifier[ldapConnection] operator[SEP] Keyword[throws] identifier[GuacamoleException] {
identifier[String] identifier[groupBaseDN] operator[=] i... |
private void executeInParallel(Collection<Object> objList, String description, final Callback callback) {
SimultaneousExecutor executor = new SimultaneousExecutor(threadsPerCpu, getClass(), description);
for(final Object obj : objList) {
executor.execute(() -> callback.call(obj));
}
... | class class_name[name] begin[{]
method[executeInParallel, return_type[void], modifier[private], parameter[objList, description, callback]] begin[{]
local_variable[type[SimultaneousExecutor], executor]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Method... | Keyword[private] Keyword[void] identifier[executeInParallel] operator[SEP] identifier[Collection] operator[<] identifier[Object] operator[>] identifier[objList] , identifier[String] identifier[description] , Keyword[final] identifier[Callback] identifier[callback] operator[SEP] {
identifier[SimultaneousExecuto... |
public static void hash(@Nonnull final InstructionGroup group,
@Nonnull final String className)
{
final InstructionGroupHasher groupHasher
= new InstructionGroupHasher(group, className);
final String name = groupHasher.hashAndGetName();
group.setName(name);
} | class class_name[name] begin[{]
method[hash, return_type[void], modifier[public static], parameter[group, className]] begin[{]
local_variable[type[InstructionGroupHasher], groupHasher]
local_variable[type[String], name]
call[group.setName, parameter[member[.name]]]
end[}]
EN... | Keyword[public] Keyword[static] Keyword[void] identifier[hash] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[InstructionGroup] identifier[group] , annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[className] operator[SEP] {
Keyword[final] identifier[Instr... |
private static boolean analyse500Response(final String content) {
if (content.contains("error") && content.contains("{not_found, missing_named_view}")) {
LOGGER.debug("Design document not found, error is {}", content);
return false;
}
if (content.contains("error") && cont... | class class_name[name] begin[{]
method[analyse500Response, return_type[type[boolean]], modifier[private static], parameter[content]] begin[{]
if[binary_operation[call[content.contains, parameter[literal["error"]]], &&, call[content.contains, parameter[literal["{not_found, missing_named_view}"]]... | Keyword[private] Keyword[static] Keyword[boolean] identifier[analyse500Response] operator[SEP] Keyword[final] identifier[String] identifier[content] operator[SEP] {
Keyword[if] operator[SEP] identifier[content] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[&&] identifier... |
@Override
public void merge(JMSConnectionFactoryDefinition annotation, Class<?> instanceClass, Member member) throws InjectionException {
if (member != null) {
// ConnectionFactoryDefinition is a class-level annotation only.
throw new IllegalArgumentException(member.toString());
... | class class_name[name] begin[{]
method[merge, return_type[void], modifier[public], parameter[annotation, instanceClass, member]] begin[{]
if[binary_operation[member[.member], !=, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[]... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[merge] operator[SEP] identifier[JMSConnectionFactoryDefinition] identifier[annotation] , identifier[Class] operator[<] operator[?] operator[>] identifier[instanceClass] , identifier[Member] identifier[member] operator[SEP] Keyword[throws] ide... |
private static InetAddress chooseAddress(String preferred) throws UnknownHostException {
Set<InetAddress> addresses = getAddresses();
if (preferred != null && !preferred.isEmpty()) {
//Favor preferred address if exists
try {
InetAddress preferredAddress = InetAddr... | class class_name[name] begin[{]
method[chooseAddress, return_type[type[InetAddress]], modifier[private static], parameter[preferred]] begin[{]
local_variable[type[Set], addresses]
if[binary_operation[binary_operation[member[.preferred], !=, literal[null]], &&, call[preferred.isEmpty, pa... | Keyword[private] Keyword[static] identifier[InetAddress] identifier[chooseAddress] operator[SEP] identifier[String] identifier[preferred] operator[SEP] Keyword[throws] identifier[UnknownHostException] {
identifier[Set] operator[<] identifier[InetAddress] operator[>] identifier[addresses] operator[=] identifier[g... |
private void init() throws SlickException {
try {
Texture tex = InternalTextureLoader.get().createTexture(image.getWidth(), image.getHeight(), image.getFilter());
pbuffer = new Pbuffer(screenWidth, screenHeight, new PixelFormat(8, 0, 0), null, null);
// Initialise state of the pbuffer context.
pbuf... | class class_name[name] begin[{]
method[init, return_type[void], modifier[private], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operat... | Keyword[private] Keyword[void] identifier[init] operator[SEP] operator[SEP] Keyword[throws] identifier[SlickException] {
Keyword[try] {
identifier[Texture] identifier[tex] operator[=] identifier[InternalTextureLoader] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[c... |
public Script getScriptSig() throws ScriptException {
// Transactions that generate new coins don't actually have a script. Instead this
// parameter is overloaded to be something totally different.
Script script = scriptSig == null ? null : scriptSig.get();
if (script == null) {
... | class class_name[name] begin[{]
method[getScriptSig, return_type[type[Script]], modifier[public], parameter[]] begin[{]
local_variable[type[Script], script]
if[binary_operation[member[.script], ==, literal[null]]] begin[{]
assign[member[.script], ClassCreator(arg... | Keyword[public] identifier[Script] identifier[getScriptSig] operator[SEP] operator[SEP] Keyword[throws] identifier[ScriptException] {
identifier[Script] identifier[script] operator[=] identifier[scriptSig] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[scriptSig] operator[SEP] identifie... |
public static HostAddress fromParts(String host, int port)
{
if (!isValidPort(port)) {
throw new IllegalArgumentException("Port is invalid: " + port);
}
HostAddress parsedHost = fromString(host);
if (parsedHost.hasPort()) {
throw new IllegalArgumentException("... | class class_name[name] begin[{]
method[fromParts, return_type[type[HostAddress]], modifier[public static], parameter[host, port]] begin[{]
if[call[.isValidPort, parameter[member[.port]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(pos... | Keyword[public] Keyword[static] identifier[HostAddress] identifier[fromParts] operator[SEP] identifier[String] identifier[host] , Keyword[int] identifier[port] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[isValidPort] operator[SEP] identifier[port] operator[SEP] operator[SEP] {
Ke... |
public void exportWorkspaceSystemView(OutputStream out, boolean skipBinary, boolean noRecurse) throws IOException,
PathNotFoundException, RepositoryException
{
checkLive();
LocationFactory factory = new LocationFactory(((NamespaceRegistryImpl)repository.getNamespaceRegistry()));
WorkspaceEn... | class class_name[name] begin[{]
method[exportWorkspaceSystemView, return_type[void], modifier[public], parameter[out, skipBinary, noRecurse]] begin[{]
call[.checkLive, parameter[]]
local_variable[type[LocationFactory], factory]
local_variable[type[WorkspaceEntry], wsConfig]
... | Keyword[public] Keyword[void] identifier[exportWorkspaceSystemView] operator[SEP] identifier[OutputStream] identifier[out] , Keyword[boolean] identifier[skipBinary] , Keyword[boolean] identifier[noRecurse] operator[SEP] Keyword[throws] identifier[IOException] , identifier[PathNotFoundException] , identifier[Reposit... |
public Long getLong(String name, boolean strict) throws JsonException {
JsonElement el = get(name);
Long res = null;
if (strict && !el.isNumber()) {
throw Util.typeMismatch(name, el, "long", true);
}
if (el.isNumber()) {
res = el.asLong();
}
... | class class_name[name] begin[{]
method[getLong, return_type[type[Long]], modifier[public], parameter[name, strict]] begin[{]
local_variable[type[JsonElement], el]
local_variable[type[Long], res]
if[binary_operation[member[.strict], &&, call[el.isNumber, parameter[]]]] begin[{]
... | Keyword[public] identifier[Long] identifier[getLong] operator[SEP] identifier[String] identifier[name] , Keyword[boolean] identifier[strict] operator[SEP] Keyword[throws] identifier[JsonException] {
identifier[JsonElement] identifier[el] operator[=] identifier[get] operator[SEP] identifier[name] operator[SEP] o... |
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
if (iMoveMode != DBConstants.SCREEN_MOVE) // This is necessary if an override change the repondsTo.
// Also, if just refreshing the record, don't change this if set
if ((m_bChangeDataOnRefresh) || ((this.getOwner().getRecord().g... | class class_name[name] begin[{]
method[fieldChanged, return_type[type[int]], modifier[public], parameter[bDisplayOption, iMoveMode]] begin[{]
if[binary_operation[member[.iMoveMode], !=, member[DBConstants.SCREEN_MOVE]]] begin[{]
if[binary_operation[member[.m_bChangeDataOnRefresh], |... | Keyword[public] Keyword[int] identifier[fieldChanged] operator[SEP] Keyword[boolean] identifier[bDisplayOption] , Keyword[int] identifier[iMoveMode] operator[SEP] {
Keyword[if] operator[SEP] identifier[iMoveMode] operator[!=] identifier[DBConstants] operator[SEP] identifier[SCREEN_MOVE] operator[SEP] Keyword[if... |
public IStore createStore(SessionManagerConfig smc, String smid, ServletContext sc, boolean applicationSessionStore , boolean removeAttrOnInvalidate) {
IStore store = null;
MemoryStoreHelper storeHelper = this.createStoreHelper(sc);
SessionStoreService service = this.sessionStoreService;
... | class class_name[name] begin[{]
method[createStore, return_type[type[IStore]], modifier[public], parameter[smc, smid, sc, applicationSessionStore, removeAttrOnInvalidate]] begin[{]
local_variable[type[IStore], store]
local_variable[type[MemoryStoreHelper], storeHelper]
local_variable[ty... | Keyword[public] identifier[IStore] identifier[createStore] operator[SEP] identifier[SessionManagerConfig] identifier[smc] , identifier[String] identifier[smid] , identifier[ServletContext] identifier[sc] , Keyword[boolean] identifier[applicationSessionStore] , Keyword[boolean] identifier[removeAttrOnInvalidate] ope... |
public Matrix4f setOrtho2D(float left, float right, float bottom, float top) {
if ((properties & PROPERTY_IDENTITY) == 0)
MemUtil.INSTANCE.identity(this);
this._m00(2.0f / (right - left));
this._m11(2.0f / (top - bottom));
this._m22(-1.0f);
this._m30((right + left) / ... | class class_name[name] begin[{]
method[setOrtho2D, return_type[type[Matrix4f]], modifier[public], parameter[left, right, bottom, top]] begin[{]
if[binary_operation[binary_operation[member[.properties], &, member[.PROPERTY_IDENTITY]], ==, literal[0]]] begin[{]
call[MemUtil.INSTANCE.i... | Keyword[public] identifier[Matrix4f] identifier[setOrtho2D] operator[SEP] Keyword[float] identifier[left] , Keyword[float] identifier[right] , Keyword[float] identifier[bottom] , Keyword[float] identifier[top] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[properties] operator[&] identifie... |
public static ByteBuffer getByteBufferFromInputStreamAndCloseStream(InputStream is) throws IOException {
try {
// is.available() may return 0, or 1, or the total number of bytes in the stream,
// or some other number.
// Do not try to use is.available() == 0 to find the end o... | class class_name[name] begin[{]
method[getByteBufferFromInputStreamAndCloseStream, return_type[type[ByteBuffer]], modifier[public static], parameter[is]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=bytes)], ... | Keyword[public] Keyword[static] identifier[ByteBuffer] identifier[getByteBufferFromInputStreamAndCloseStream] operator[SEP] identifier[InputStream] identifier[is] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator... |
public String getProperty(String expression) {
if (expression == null || expression.length() == 0) { return expression; }
for (int i = 0; i < expression.length(); i++) {
char c = expression.charAt(i);
if (c == Nested) {
return expression.substring(0, i);
} else if (c == MappedStart || ... | class class_name[name] begin[{]
method[getProperty, return_type[type[String]], modifier[public], parameter[expression]] begin[{]
if[binary_operation[binary_operation[member[.expression], ==, literal[null]], ||, binary_operation[call[expression.length, parameter[]], ==, literal[0]]]] begin[{]
... | Keyword[public] identifier[String] identifier[getProperty] operator[SEP] identifier[String] identifier[expression] operator[SEP] {
Keyword[if] operator[SEP] identifier[expression] operator[==] Other[null] operator[||] identifier[expression] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==... |
@Deprecated
public Blade put(@NonNull String path, @NonNull RouteHandler0 handler) {
this.routeMatcher.addRoute(path, handler, HttpMethod.PUT);
return this;
} | class class_name[name] begin[{]
method[put, return_type[type[Blade]], modifier[public], parameter[path, handler]] begin[{]
THIS[member[None.routeMatcher]call[None.addRoute, parameter[member[.path], member[.handler], member[HttpMethod.PUT]]]]
return[THIS[]]
end[}]
END[}] | annotation[@] identifier[Deprecated] Keyword[public] identifier[Blade] identifier[put] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[path] , annotation[@] identifier[NonNull] identifier[RouteHandler0] identifier[handler] operator[SEP] {
Keyword[this] operator[SEP] identifier[rout... |
public static void runExample(
AdManagerServices adManagerServices,
AdManagerSession session,
long rateCardId,
long productPackageItemId)
throws RemoteException {
// Get the BaseRateService.
BaseRateServiceInterface baseRateService =
adManagerServices.get(session, BaseRateS... | class class_name[name] begin[{]
method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session, rateCardId, productPackageItemId]] begin[{]
local_variable[type[BaseRateServiceInterface], baseRateService]
local_variable[type[ProductPackageItemBaseRate], produ... | Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] , Keyword[long] identifier[rateCardId] , Keyword[long] identifier[productPackageItemId] operator[SEP] Keyword[throws] ident... |
public ApiSuccessResponse sendMessage(String id, AcceptData1 acceptData) throws ApiException {
ApiResponse<ApiSuccessResponse> resp = sendMessageWithHttpInfo(id, acceptData);
return resp.getData();
} | class class_name[name] begin[{]
method[sendMessage, return_type[type[ApiSuccessResponse]], modifier[public], parameter[id, acceptData]] begin[{]
local_variable[type[ApiResponse], resp]
return[call[resp.getData, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[ApiSuccessResponse] identifier[sendMessage] operator[SEP] identifier[String] identifier[id] , identifier[AcceptData1] identifier[acceptData] operator[SEP] Keyword[throws] identifier[ApiException] {
identifier[ApiResponse] operator[<] identifier[ApiSuccessResponse] operator[>] identifi... |
@Execute
public HtmlResponse createnew(final String dictId) {
saveToken();
return asHtml(path_AdminDictStopwords_AdminDictStopwordsEditJsp).useForm(CreateForm.class, op -> {
op.setup(form -> {
form.initialize();
form.crudMode = CrudMode.CREATE;
... | class class_name[name] begin[{]
method[createnew, return_type[type[HtmlResponse]], modifier[public], parameter[dictId]] begin[{]
call[.saveToken, parameter[]]
return[call[.asHtml, parameter[member[.path_AdminDictStopwords_AdminDictStopwordsEditJsp]]]]
end[}]
END[}] | annotation[@] identifier[Execute] Keyword[public] identifier[HtmlResponse] identifier[createnew] operator[SEP] Keyword[final] identifier[String] identifier[dictId] operator[SEP] {
identifier[saveToken] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[asHtml] operator[SEP] identifier[path_Admi... |
private static Optional<Object> deserialize(InputStream input) throws IOException {
try {
BufferedInputStream bis = new BufferedInputStream(input);
ObjectInputStream ois = new ObjectInputStream(bis);
return Optional.of(ois.readObject());
} catch (ClassNotFoundExcepti... | class class_name[name] begin[{]
method[deserialize, return_type[type[Optional]], modifier[private static], parameter[input]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=in... | Keyword[private] Keyword[static] identifier[Optional] operator[<] identifier[Object] operator[>] identifier[deserialize] operator[SEP] identifier[InputStream] identifier[input] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
identifier[BufferedInputStream] identifier[bis] operat... |
public ProjectFileInner update(String groupName, String serviceName, String projectName, String fileName, ProjectFileInner parameters) {
return updateWithServiceResponseAsync(groupName, serviceName, projectName, fileName, parameters).toBlocking().single().body();
} | class class_name[name] begin[{]
method[update, return_type[type[ProjectFileInner]], modifier[public], parameter[groupName, serviceName, projectName, fileName, parameters]] begin[{]
return[call[.updateWithServiceResponseAsync, parameter[member[.groupName], member[.serviceName], member[.projectName], mem... | Keyword[public] identifier[ProjectFileInner] identifier[update] operator[SEP] identifier[String] identifier[groupName] , identifier[String] identifier[serviceName] , identifier[String] identifier[projectName] , identifier[String] identifier[fileName] , identifier[ProjectFileInner] identifier[parameters] operator[SE... |
protected void processSuperMethods() {
for (ClassReader cr : targetClassInfo.superClassReaders) {
cr.accept(new EmptyClassVisitor() {
String declaredClassName;
@Override
public void visit(final int version, final int access, final String name, final String signature, final String superName, final St... | class class_name[name] begin[{]
method[processSuperMethods, return_type[void], modifier[protected], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[],... | Keyword[protected] Keyword[void] identifier[processSuperMethods] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[ClassReader] identifier[cr] operator[:] identifier[targetClassInfo] operator[SEP] identifier[superClassReaders] operator[SEP] {
identifier[cr] operator[SEP] identifier[... |
private static int scriptNameToCode(String name) {
try{
int[] codes = UScript.getCode(name);
return codes != null ? codes[0] : UScript.INVALID_CODE;
}catch( MissingResourceException e){
///CLOVER:OFF
return UScript.INVALID_CODE;
///CLOVER:ON
... | class class_name[name] begin[{]
method[scriptNameToCode, return_type[type[int]], modifier[private static], parameter[name]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member... | Keyword[private] Keyword[static] Keyword[int] identifier[scriptNameToCode] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[try] {
Keyword[int] operator[SEP] operator[SEP] identifier[codes] operator[=] identifier[UScript] operator[SEP] identifier[getCode] operator[SEP] identif... |
@Override
public CreateDBClusterEndpointResult createDBClusterEndpoint(CreateDBClusterEndpointRequest request) {
request = beforeClientExecution(request);
return executeCreateDBClusterEndpoint(request);
} | class class_name[name] begin[{]
method[createDBClusterEndpoint, return_type[type[CreateDBClusterEndpointResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeCreateDBClusterEndpoin... | annotation[@] identifier[Override] Keyword[public] identifier[CreateDBClusterEndpointResult] identifier[createDBClusterEndpoint] operator[SEP] identifier[CreateDBClusterEndpointRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[... |
private static void internalHorizontalBlur(
int[] pixels, int[] outRow, int w, int row, int diameter, int[] div) {
final int firstInByte = w * row;
final int lastInByte = w * (row + 1) - 1;
final int radius = diameter >> 1;
int a = 0, r = 0, g = 0, b = 0;
int pixel;
// Iterate over relat... | class class_name[name] begin[{]
method[internalHorizontalBlur, return_type[void], modifier[private static], parameter[pixels, outRow, w, row, diameter, div]] begin[{]
local_variable[type[int], firstInByte]
local_variable[type[int], lastInByte]
local_variable[type[int], radius]
l... | Keyword[private] Keyword[static] Keyword[void] identifier[internalHorizontalBlur] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[pixels] , Keyword[int] operator[SEP] operator[SEP] identifier[outRow] , Keyword[int] identifier[w] , Keyword[int] identifier[row] , Keyword[int] identifier[diameter] , ... |
public static void close(@CheckForNull OutputStream outputStream) {
if (outputStream == null) {
return;
}
try {
outputStream.close();
} catch (IOException e) {
// Ignore
}
} | class class_name[name] begin[{]
method[close, return_type[void], modifier[public static], parameter[outputStream]] begin[{]
if[binary_operation[member[.outputStream], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
TryStatement(block=[Stat... | Keyword[public] Keyword[static] Keyword[void] identifier[close] operator[SEP] annotation[@] identifier[CheckForNull] identifier[OutputStream] identifier[outputStream] operator[SEP] {
Keyword[if] operator[SEP] identifier[outputStream] operator[==] Other[null] operator[SEP] {
Keyword[return] operator[SE... |
protected SpdDouble getSpdDouble() {
myValue.reset(false);
for (int i = 0; i < members.size(); i++) {
Object member = members.get(i);
if (member == null)
continue;
if (member instanceof SpdDouble) {
myValue.combine((SpdDouble) member);
... | class class_name[name] begin[{]
method[getSpdDouble, return_type[type[SpdDouble]], modifier[protected], parameter[]] begin[{]
call[myValue.reset, parameter[literal[false]]]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Var... | Keyword[protected] identifier[SpdDouble] identifier[getSpdDouble] operator[SEP] operator[SEP] {
identifier[myValue] operator[SEP] identifier[reset] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] ope... |
public static final String prettyPrint(final String binaryString, final char separator) {
String paddedBinaryString = zeroPadString(binaryString);
List<String> splitted = Splitter.fixedLength(4).splitToList(paddedBinaryString);
return Joiner.on(separator).join(splitted);
} | class class_name[name] begin[{]
method[prettyPrint, return_type[type[String]], modifier[final public static], parameter[binaryString, separator]] begin[{]
local_variable[type[String], paddedBinaryString]
local_variable[type[List], splitted]
return[call[Joiner.on, parameter[member[.separ... | Keyword[public] Keyword[static] Keyword[final] identifier[String] identifier[prettyPrint] operator[SEP] Keyword[final] identifier[String] identifier[binaryString] , Keyword[final] Keyword[char] identifier[separator] operator[SEP] {
identifier[String] identifier[paddedBinaryString] operator[=] identifier[zeroPad... |
private void gitSetConfig(final String name, String value)
throws MojoFailureException, CommandLineException {
if (value == null || value.isEmpty()) {
value = "\"\"";
}
// ignore error exit codes
executeGitCommandExitCode("config", name, value);
} | class class_name[name] begin[{]
method[gitSetConfig, return_type[void], modifier[private], parameter[name, value]] begin[{]
if[binary_operation[binary_operation[member[.value], ==, literal[null]], ||, call[value.isEmpty, parameter[]]]] begin[{]
assign[member[.value], lit... | Keyword[private] Keyword[void] identifier[gitSetConfig] operator[SEP] Keyword[final] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] Keyword[throws] identifier[MojoFailureException] , identifier[CommandLineException] {
Keyword[if] operator[SEP] identifier[value] operato... |
private void setEnvironmentalImpactDetails(
RROtherProjectInfo12Document.RROtherProjectInfo12 rrOtherProjectInfo) {
EnvironmentalImpact environmentalImpact = EnvironmentalImpact.Factory
.newInstance();
setEnvironmentalImpactIndicatorAndExplanation(environmentalImpact);
setEnvironmentalExemption(environment... | class class_name[name] begin[{]
method[setEnvironmentalImpactDetails, return_type[void], modifier[private], parameter[rrOtherProjectInfo]] begin[{]
local_variable[type[EnvironmentalImpact], environmentalImpact]
call[.setEnvironmentalImpactIndicatorAndExplanation, parameter[member[.envir... | Keyword[private] Keyword[void] identifier[setEnvironmentalImpactDetails] operator[SEP] identifier[RROtherProjectInfo12Document] operator[SEP] identifier[RROtherProjectInfo12] identifier[rrOtherProjectInfo] operator[SEP] {
identifier[EnvironmentalImpact] identifier[environmentalImpact] operator[=] identifier[Envi... |
private void updateRoutingStrategies(Cluster cluster, List<StoreDefinition> storeDefs) {
// acquire write lock
writeLock.lock();
try {
VectorClock clock = new VectorClock();
if(metadataCache.containsKey(ROUTING_STRATEGY_KEY))
clock = (VectorClock) metadata... | class class_name[name] begin[{]
method[updateRoutingStrategies, return_type[void], modifier[private], parameter[cluster, storeDefs]] begin[{]
call[writeLock.lock, parameter[]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], ini... | Keyword[private] Keyword[void] identifier[updateRoutingStrategies] operator[SEP] identifier[Cluster] identifier[cluster] , identifier[List] operator[<] identifier[StoreDefinition] operator[>] identifier[storeDefs] operator[SEP] {
identifier[writeLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] o... |
public DaoPageResult<ENTITY> page2(List<Match> matches, DaoPage daoPage) {
DaoPageResult<ENTITY> daoPageResult = new DaoPageResult<ENTITY>();
// 结果
List<ENTITY> result = page(matches, daoPage);
daoPageResult.setResult(result);
// 总数
int totalCount = count(matches);
... | class class_name[name] begin[{]
method[page2, return_type[type[DaoPageResult]], modifier[public], parameter[matches, daoPage]] begin[{]
local_variable[type[DaoPageResult], daoPageResult]
local_variable[type[List], result]
call[daoPageResult.setResult, parameter[member[.result]]]... | Keyword[public] identifier[DaoPageResult] operator[<] identifier[ENTITY] operator[>] identifier[page2] operator[SEP] identifier[List] operator[<] identifier[Match] operator[>] identifier[matches] , identifier[DaoPage] identifier[daoPage] operator[SEP] {
identifier[DaoPageResult] operator[<] identifier[ENTITY] o... |
public Object getPropertyValue(Property property) {
Validate.argumentIsNotNull(property);
Object val = properties.get(property.getName());
if (val == null){
return Defaults.defaultValue(property.getGenericType());
}
return val;
} | class class_name[name] begin[{]
method[getPropertyValue, return_type[type[Object]], modifier[public], parameter[property]] begin[{]
call[Validate.argumentIsNotNull, parameter[member[.property]]]
local_variable[type[Object], val]
if[binary_operation[member[.val], ==, lite... | Keyword[public] identifier[Object] identifier[getPropertyValue] operator[SEP] identifier[Property] identifier[property] operator[SEP] {
identifier[Validate] operator[SEP] identifier[argumentIsNotNull] operator[SEP] identifier[property] operator[SEP] operator[SEP] identifier[Object] identifier[val] operator[=] id... |
public A callbackUri(String callbackUri) {
this.headers.add(Pair.of("X-CallbackURI", callbackUri));
return (A)this;
} | class class_name[name] begin[{]
method[callbackUri, return_type[type[A]], modifier[public], parameter[callbackUri]] begin[{]
THIS[member[None.headers]call[None.add, parameter[call[Pair.of, parameter[literal["X-CallbackURI"], member[.callbackUri]]]]]]
return[Cast(expression=This(postfix_... | Keyword[public] identifier[A] identifier[callbackUri] operator[SEP] identifier[String] identifier[callbackUri] operator[SEP] {
Keyword[this] operator[SEP] identifier[headers] operator[SEP] identifier[add] operator[SEP] identifier[Pair] operator[SEP] identifier[of] operator[SEP] literal[String] , identifier[call... |
public View getView(String id, int index){
View viewToReturn = null;
Context targetContext = instrumentation.getTargetContext();
String packageName = targetContext.getPackageName();
int viewId = targetContext.getResources().getIdentifier(id, "id", packageName);
if(viewId != 0){
viewToReturn = getView(vi... | class class_name[name] begin[{]
method[getView, return_type[type[View]], modifier[public], parameter[id, index]] begin[{]
local_variable[type[View], viewToReturn]
local_variable[type[Context], targetContext]
local_variable[type[String], packageName]
local_variable[type[int], vie... | Keyword[public] identifier[View] identifier[getView] operator[SEP] identifier[String] identifier[id] , Keyword[int] identifier[index] operator[SEP] {
identifier[View] identifier[viewToReturn] operator[=] Other[null] operator[SEP] identifier[Context] identifier[targetContext] operator[=] identifier[instrumentati... |
public static Object streamIn(byte[] bytes, ClassLoader classLoader, boolean compressed)
throws IOException, ClassNotFoundException {
return streamIn(new ByteArrayInputStream(bytes), classLoader, compressed);
} | class class_name[name] begin[{]
method[streamIn, return_type[type[Object]], modifier[public static], parameter[bytes, classLoader, compressed]] begin[{]
return[call[.streamIn, parameter[ClassCreator(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selector... | Keyword[public] Keyword[static] identifier[Object] identifier[streamIn] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] , identifier[ClassLoader] identifier[classLoader] , Keyword[boolean] identifier[compressed] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoun... |
@Override
public Object allocateConnection(ManagedConnectionFactory factory, ConnectionRequestInfo requestInfo) throws ResourceException {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled()) {
Tr.entry(this, tc, "allocateConnection");
... | class class_name[name] begin[{]
method[allocateConnection, return_type[type[Object]], modifier[public], parameter[factory, requestInfo]] begin[{]
local_variable[type[boolean], isTraceOn]
if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[allocateConnection] operator[SEP] identifier[ManagedConnectionFactory] identifier[factory] , identifier[ConnectionRequestInfo] identifier[requestInfo] operator[SEP] Keyword[throws] identifier[ResourceException] {
Keyword[final] Key... |
public String createOutputStreamAppender(String name, String pattern, String encoding, Collection<String> loggerNames,
String levelStr, boolean recursive, boolean overrideLogLevel) {
Level level = getLevel(levelStr);
String encodingToUse = StringUtils.isEmpty(encoding) ? "UTF-8" : encoding;
PatternLayout ... | class class_name[name] begin[{]
method[createOutputStreamAppender, return_type[type[String]], modifier[public], parameter[name, pattern, encoding, loggerNames, levelStr, recursive, overrideLogLevel]] begin[{]
local_variable[type[Level], level]
local_variable[type[String], encodingToUse]
... | Keyword[public] identifier[String] identifier[createOutputStreamAppender] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[pattern] , identifier[String] identifier[encoding] , identifier[Collection] operator[<] identifier[String] operator[>] identifier[loggerNames] , identifier[Stri... |
public static <C extends Compound> List<C> toList(Sequence<C> sequence) {
List<C> list = new ArrayList<C>(sequence.getLength());
for (C compound : sequence) {
list.add(compound);
}
return list;
} | class class_name[name] begin[{]
method[toList, return_type[type[List]], modifier[public static], parameter[sequence]] begin[{]
local_variable[type[List], list]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(mem... | Keyword[public] Keyword[static] operator[<] identifier[C] Keyword[extends] identifier[Compound] operator[>] identifier[List] operator[<] identifier[C] operator[>] identifier[toList] operator[SEP] identifier[Sequence] operator[<] identifier[C] operator[>] identifier[sequence] operator[SEP] {
identifier[List] oper... |
public boolean tryLock(String key, String request) {
//get connection
Object connection = getConnection();
String result ;
if (connection instanceof Jedis){
result = ((Jedis) connection).set(lockPrefix + key, request, SET_IF_NOT_EXIST, SET_WITH_EXPIRE_TIME, 10 * TIME);
... | class class_name[name] begin[{]
method[tryLock, return_type[type[boolean]], modifier[public], parameter[key, request]] begin[{]
local_variable[type[Object], connection]
local_variable[type[String], result]
if[binary_operation[member[.connection], instanceof, type[Jedis]]] begin[... | Keyword[public] Keyword[boolean] identifier[tryLock] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[request] operator[SEP] {
identifier[Object] identifier[connection] operator[=] identifier[getConnection] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[r... |
public static <P> void addListWithIndex(final List<P> list, final P element, final int index) {
ArgUtils.notNull(list, "list");
ArgUtils.notMin(index, 0, "index");
final int listSize = list.size();
if(listSize < index) {
// 足りない場合は、要素を追加する。
final int lackS... | class class_name[name] begin[{]
method[addListWithIndex, return_type[void], modifier[public static], parameter[list, element, index]] begin[{]
call[ArgUtils.notNull, parameter[member[.list], literal["list"]]]
call[ArgUtils.notMin, parameter[member[.index], literal[0], literal["i... | Keyword[public] Keyword[static] operator[<] identifier[P] operator[>] Keyword[void] identifier[addListWithIndex] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[P] operator[>] identifier[list] , Keyword[final] identifier[P] identifier[element] , Keyword[final] Keyword[int] identifier[index] opera... |
public void setOuUsers(List<CmsUser> ouUsers) {
m_ouUsers = ouUsers;
getJsp().getRequest().getSession().setAttribute(A_CmsOrgUnitUsersList.ORGUNIT_USERS, m_ouUsers);
} | class class_name[name] begin[{]
method[setOuUsers, return_type[void], modifier[public], parameter[ouUsers]] begin[{]
assign[member[.m_ouUsers], member[.ouUsers]]
call[.getJsp, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setOuUsers] operator[SEP] identifier[List] operator[<] identifier[CmsUser] operator[>] identifier[ouUsers] operator[SEP] {
identifier[m_ouUsers] operator[=] identifier[ouUsers] operator[SEP] identifier[getJsp] operator[SEP] operator[SEP] operator[SEP] identifier[getReques... |
public final void abortAdd(final PersistentTransaction transaction) throws SevereMessageStoreException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "abortAdd", transaction);
long _referredID = getTuple().getReferredID();
super.abortAdd(transaction... | class class_name[name] begin[{]
method[abortAdd, return_type[void], modifier[final public], parameter[transaction]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[THI... | Keyword[public] Keyword[final] Keyword[void] identifier[abortAdd] operator[SEP] Keyword[final] identifier[PersistentTransaction] identifier[transaction] operator[SEP] Keyword[throws] identifier[SevereMessageStoreException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTraci... |
private static boolean checkRequestAmount(WireRequest request) {
boolean sufficientBalance = request.getAmount() < MAX_ALLOWABLE_AMOUNT;
if (!sufficientBalance) {
LOG.warning(
String.format("Rejected excessive request of $%d",
request.getAmount()));
}
return sufficientBal... | class class_name[name] begin[{]
method[checkRequestAmount, return_type[type[boolean]], modifier[private static], parameter[request]] begin[{]
local_variable[type[boolean], sufficientBalance]
if[member[.sufficientBalance]] begin[{]
call[LOG.warning, parameter[call... | Keyword[private] Keyword[static] Keyword[boolean] identifier[checkRequestAmount] operator[SEP] identifier[WireRequest] identifier[request] operator[SEP] {
Keyword[boolean] identifier[sufficientBalance] operator[=] identifier[request] operator[SEP] identifier[getAmount] operator[SEP] operator[SEP] operator[<] ide... |
private void clearDeck(CdjStatus update) {
if (hotCache.remove(DeckReference.getDeckReference(update.getDeviceNumber(), 0)) != null) {
deliverTrackMetadataUpdate(update.getDeviceNumber(), null);
}
} | class class_name[name] begin[{]
method[clearDeck, return_type[void], modifier[private], parameter[update]] begin[{]
if[binary_operation[call[hotCache.remove, parameter[call[DeckReference.getDeckReference, parameter[call[update.getDeviceNumber, parameter[]], literal[0]]]]], !=, literal[null]]] b... | Keyword[private] Keyword[void] identifier[clearDeck] operator[SEP] identifier[CdjStatus] identifier[update] operator[SEP] {
Keyword[if] operator[SEP] identifier[hotCache] operator[SEP] identifier[remove] operator[SEP] identifier[DeckReference] operator[SEP] identifier[getDeckReference] operator[SEP] identifier[u... |
public int drainTo(@NotNull byte[] dest, int destOffset, int maxSize) {
int s = maxSize;
while (hasRemaining()) {
ByteBuf buf = bufs[first];
int remaining = buf.readRemaining();
if (s < remaining) {
arraycopy(buf.array(), buf.head(), dest, destOffset, s);
buf.moveHead(s);
return maxSize;
} e... | class class_name[name] begin[{]
method[drainTo, return_type[type[int]], modifier[public], parameter[dest, destOffset, maxSize]] begin[{]
local_variable[type[int], s]
while[call[.hasRemaining, parameter[]]] begin[{]
local_variable[type[ByteBuf], buf]
local_variabl... | Keyword[public] Keyword[int] identifier[drainTo] operator[SEP] annotation[@] identifier[NotNull] Keyword[byte] operator[SEP] operator[SEP] identifier[dest] , Keyword[int] identifier[destOffset] , Keyword[int] identifier[maxSize] operator[SEP] {
Keyword[int] identifier[s] operator[=] identifier[maxSize] operato... |
public Map<String, BigDecimal> getKrakenBalance() throws IOException {
KrakenBalanceResult balanceResult =
kraken.balance(
exchange.getExchangeSpecification().getApiKey(),
signatureCreator,
exchange.getNonceFactory());
return checkResult(balanceResult);
} | class class_name[name] begin[{]
method[getKrakenBalance, return_type[type[Map]], modifier[public], parameter[]] begin[{]
local_variable[type[KrakenBalanceResult], balanceResult]
return[call[.checkResult, parameter[member[.balanceResult]]]]
end[}]
END[}] | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[BigDecimal] operator[>] identifier[getKrakenBalance] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[KrakenBalanceResult] identifier[balanceResult] operator[=] identifier[kraken] operator[SEP] identifier... |
@Override
public void initialize(String keyStoreName, String keyStorePath, String keyStoreType, String keyStoreProvider,
String keyStorePassword, String keyAlias) throws AuditSigningException {
WsLocationAdmin locationAdmin = locationAdminRef.getService();
if (locationAdm... | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[public], parameter[keyStoreName, keyStorePath, keyStoreType, keyStoreProvider, keyStorePassword, keyAlias]] begin[{]
local_variable[type[WsLocationAdmin], locationAdmin]
if[binary_operation[member[.locationAd... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[initialize] operator[SEP] identifier[String] identifier[keyStoreName] , identifier[String] identifier[keyStorePath] , identifier[String] identifier[keyStoreType] , identifier[String] identifier[keyStoreProvider] , identifier[String] identif... |
public static LanguageTag parse(String languageTag, ParseStatus sts) {
if (sts == null) {
sts = new ParseStatus();
} else {
sts.reset();
}
StringTokenIterator itr;
// Check if the tag is grandfathered
String[] gfmap = GRANDFATHERED.get(LocaleUtil... | class class_name[name] begin[{]
method[parse, return_type[type[LanguageTag]], modifier[public static], parameter[languageTag, sts]] begin[{]
if[binary_operation[member[.sts], ==, literal[null]]] begin[{]
assign[member[.sts], ClassCreator(arguments=[], body=None, construc... | Keyword[public] Keyword[static] identifier[LanguageTag] identifier[parse] operator[SEP] identifier[String] identifier[languageTag] , identifier[ParseStatus] identifier[sts] operator[SEP] {
Keyword[if] operator[SEP] identifier[sts] operator[==] Other[null] operator[SEP] {
identifier[sts] operator[=] K... |
@Override
public List<CommercePriceEntry> getCommercePriceEntriesByUuidAndCompanyId(
String uuid, long companyId) {
return commercePriceEntryPersistence.findByUuid_C(uuid, companyId);
} | class class_name[name] begin[{]
method[getCommercePriceEntriesByUuidAndCompanyId, return_type[type[List]], modifier[public], parameter[uuid, companyId]] begin[{]
return[call[commercePriceEntryPersistence.findByUuid_C, parameter[member[.uuid], member[.companyId]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommercePriceEntry] operator[>] identifier[getCommercePriceEntriesByUuidAndCompanyId] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] operator[SEP] {
Keyword[return] identifier[comm... |
public java.util.List<? extends com.google.privacy.dlp.v2.FieldIdOrBuilder>
getHeadersOrBuilderList() {
return headers_;
} | class class_name[name] begin[{]
method[getHeadersOrBuilderList, return_type[type[java]], modifier[public], parameter[]] begin[{]
return[member[.headers_]]
end[}]
END[}] | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[privacy] operator[SEP] identifier[dlp] operator[SEP] identifier[v2] operator[SEP] identifier[FieldIdOrBuilder]... |
private static String byte2hex(byte[] b) {
StringBuilder hs = new StringBuilder();
String stmp;
for (int n = 0; b!=null && n < b.length; n++) {
stmp = Integer.toHexString(b[n] & 0XFF);
if (stmp.length() == 1)
hs.append('0');
hs.append(stmp);
}
return hs.toString().toUpperCase();
} | class class_name[name] begin[{]
method[byte2hex, return_type[type[String]], modifier[private static], parameter[b]] begin[{]
local_variable[type[StringBuilder], hs]
local_variable[type[String], stmp]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression... | Keyword[private] Keyword[static] identifier[String] identifier[byte2hex] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b] operator[SEP] {
identifier[StringBuilder] identifier[hs] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[String] i... |
@Override
public java.util.concurrent.Future<ListJobsResult> listJobsAsync(com.amazonaws.handlers.AsyncHandler<ListJobsRequest, ListJobsResult> asyncHandler) {
return listJobsAsync(new ListJobsRequest(), asyncHandler);
} | class class_name[name] begin[{]
method[listJobsAsync, return_type[type[java]], modifier[public], parameter[asyncHandler]] begin[{]
return[call[.listJobsAsync, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, sele... | annotation[@] identifier[Override] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[concurrent] operator[SEP] identifier[Future] operator[<] identifier[ListJobsResult] operator[>] identifier[listJobsAsync] operator[SEP] identifier[com] operator[SEP] identifier[amazonaws] operator... |
public MemorySegment[] getNextBuffers(int bufferSize) {
MemorySegment[] memorySegments = new MemorySegment[bufferSize];
for (int i = 0; i < bufferSize; i++) {
MemorySegment nextBuffer = getNextBuffer();
if (nextBuffer == null) {
throw new RuntimeException("No enough buffers!");
}
memorySegments[i] =... | class class_name[name] begin[{]
method[getNextBuffers, return_type[type[MemorySegment]], modifier[public], parameter[bufferSize]] begin[{]
local_variable[type[MemorySegment], memorySegments]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declar... | Keyword[public] identifier[MemorySegment] operator[SEP] operator[SEP] identifier[getNextBuffers] operator[SEP] Keyword[int] identifier[bufferSize] operator[SEP] {
identifier[MemorySegment] operator[SEP] operator[SEP] identifier[memorySegments] operator[=] Keyword[new] identifier[MemorySegment] operator[SEP] iden... |
public void marshall(Fleet fleet, ProtocolMarshaller protocolMarshaller) {
if (fleet == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(fleet.getName(), NAME_BINDING);
protocolMarshaller.m... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[fleet, protocolMarshaller]] begin[{]
if[binary_operation[member[.fleet], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefi... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Fleet] identifier[fleet] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[fleet] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identif... |
public static int findOffsetFromCodePoint(StringBuffer source, int offset32) {
char ch;
int size = source.length(), result = 0, count = offset32;
if (offset32 < 0 || offset32 > size) {
throw new StringIndexOutOfBoundsException(offset32);
}
while (result < size && coun... | class class_name[name] begin[{]
method[findOffsetFromCodePoint, return_type[type[int]], modifier[public static], parameter[source, offset32]] begin[{]
local_variable[type[char], ch]
local_variable[type[int], size]
if[binary_operation[binary_operation[member[.offset32], <, litera... | Keyword[public] Keyword[static] Keyword[int] identifier[findOffsetFromCodePoint] operator[SEP] identifier[StringBuffer] identifier[source] , Keyword[int] identifier[offset32] operator[SEP] {
Keyword[char] identifier[ch] operator[SEP] Keyword[int] identifier[size] operator[=] identifier[source] operator[SEP] ide... |
static MultiLoopsStatistics run(final Object instance, final Method method, final List<?> args, final Method setUpForMethod, final Method tearDownForMethod,
final Method setUpForLoop, final Method tearDownForLoop, final int threadNum, final long threadDelay, final int loopNum, final long loopDelay,
... | class class_name[name] begin[{]
method[run, return_type[type[MultiLoopsStatistics]], modifier[static], parameter[instance, method, args, setUpForMethod, tearDownForMethod, setUpForLoop, tearDownForLoop, threadNum, threadDelay, loopNum, loopDelay, roundNum]] begin[{]
return[call[.run, parameter[member[.... | Keyword[static] identifier[MultiLoopsStatistics] identifier[run] operator[SEP] Keyword[final] identifier[Object] identifier[instance] , Keyword[final] identifier[Method] identifier[method] , Keyword[final] identifier[List] operator[<] operator[?] operator[>] identifier[args] , Keyword[final] identifier[Method] ident... |
protected void handleBindException(String userDn, String username, Throwable cause) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to bind as " + userDn + ": " + cause);
}
} | class class_name[name] begin[{]
method[handleBindException, return_type[void], modifier[protected], parameter[userDn, username, cause]] begin[{]
if[call[logger.isDebugEnabled, parameter[]]] begin[{]
call[logger.debug, parameter[binary_operation[binary_operation[binary_op... | Keyword[protected] Keyword[void] identifier[handleBindException] operator[SEP] identifier[String] identifier[userDn] , identifier[String] identifier[username] , identifier[Throwable] identifier[cause] operator[SEP] {
Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator... |
public static String getBaseName(String className) {
int i = className.indexOf("$");
if (i == -1)
return className;
return className.substring(i + 1);
} | class class_name[name] begin[{]
method[getBaseName, return_type[type[String]], modifier[public static], parameter[className]] begin[{]
local_variable[type[int], i]
if[binary_operation[member[.i], ==, literal[1]]] begin[{]
return[member[.className]]
else begin[{]
None
end... | Keyword[public] Keyword[static] identifier[String] identifier[getBaseName] operator[SEP] identifier[String] identifier[className] operator[SEP] {
Keyword[int] identifier[i] operator[=] identifier[className] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] op... |
@Deprecated
protected final boolean enhanceSuperType(List<LightweightTypeReference> superTypes, List<LightweightTypeReference> initiallyRequested,
ParameterizedTypeReference result) {
CommonSuperTypeFinder typeFinder = newCommonSuperTypeFinder(superTypes.get(0).getOwner());
typeFinder.requestsInProgress = Lists... | class class_name[name] begin[{]
method[enhanceSuperType, return_type[type[boolean]], modifier[final protected], parameter[superTypes, initiallyRequested, result]] begin[{]
local_variable[type[CommonSuperTypeFinder], typeFinder]
assign[member[typeFinder.requestsInProgress], call[Lists.ne... | annotation[@] identifier[Deprecated] Keyword[protected] Keyword[final] Keyword[boolean] identifier[enhanceSuperType] operator[SEP] identifier[List] operator[<] identifier[LightweightTypeReference] operator[>] identifier[superTypes] , identifier[List] operator[<] identifier[LightweightTypeReference] operator[>] identif... |
public int defineTemporaryVariable(String name, ClassNode node, boolean store) {
BytecodeVariable answer = defineVar(name, node, false, false);
temporaryVariables.addFirst(answer); // TRICK: we add at the beginning so when we find for remove or get we always have the last one
usedVariables.remov... | class class_name[name] begin[{]
method[defineTemporaryVariable, return_type[type[int]], modifier[public], parameter[name, node, store]] begin[{]
local_variable[type[BytecodeVariable], answer]
call[temporaryVariables.addFirst, parameter[member[.answer]]]
call[usedVariable... | Keyword[public] Keyword[int] identifier[defineTemporaryVariable] operator[SEP] identifier[String] identifier[name] , identifier[ClassNode] identifier[node] , Keyword[boolean] identifier[store] operator[SEP] {
identifier[BytecodeVariable] identifier[answer] operator[=] identifier[defineVar] operator[SEP] identi... |
protected static List<Grammar> getEffectivelyUsedGrammars(final Grammar grammar) {
final List<AbstractRule> allRules = GrammarUtil.allRules(grammar);
final List<Grammar> map = ListExtensions.<AbstractRule, Grammar>map(allRules, it -> GrammarUtil.getGrammar(it));
final Iterable<Grammar> filter = IterableExtensions... | class class_name[name] begin[{]
method[getEffectivelyUsedGrammars, return_type[type[List]], modifier[static protected], parameter[grammar]] begin[{]
local_variable[type[List], allRules]
local_variable[type[List], map]
local_variable[type[Iterable], filter]
local_variable[type[Se... | Keyword[protected] Keyword[static] identifier[List] operator[<] identifier[Grammar] operator[>] identifier[getEffectivelyUsedGrammars] operator[SEP] Keyword[final] identifier[Grammar] identifier[grammar] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[AbstractRule] operator[>] identifier[a... |
static Date parse(String date, String pattern, String... patterns) {
Set<String> set = new HashSet<>();
set.add(pattern);
if (patterns != null) {
addAll(set, patterns);
}
for (String p : set) {
try {
return df(p).parse(date);
}
catch (ParseException ex) {
// Skip pattern
}
}
retur... | class class_name[name] begin[{]
method[parse, return_type[type[Date]], modifier[static], parameter[date, pattern, patterns]] begin[{]
local_variable[type[Set], set]
call[set.add, parameter[member[.pattern]]]
if[binary_operation[member[.patterns], !=, literal[null]]] begi... | Keyword[static] identifier[Date] identifier[parse] operator[SEP] identifier[String] identifier[date] , identifier[String] identifier[pattern] , identifier[String] operator[...] identifier[patterns] operator[SEP] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[set] operator[=] Keyword[ne... |
@Override
public void notifySubscribers(final List<? extends Subscriber> subscribers, final SyndFeed value, final SubscriptionSummaryCallback callback) {
String mimeType = null;
if (value.getFeedType().startsWith("rss")) {
mimeType = "application/rss+xml";
} else {
... | class class_name[name] begin[{]
method[notifySubscribers, return_type[void], modifier[public], parameter[subscribers, value, callback]] begin[{]
local_variable[type[String], mimeType]
if[call[value.getFeedType, parameter[]]] begin[{]
assign[member[.mimeType], lit... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[notifySubscribers] operator[SEP] Keyword[final] identifier[List] operator[<] operator[?] Keyword[extends] identifier[Subscriber] operator[>] identifier[subscribers] , Keyword[final] identifier[SyndFeed] identifier[value] , Keyword[final] iden... |
static String saveGetLocation(WebDriver driver) {
logger.entering(driver);
String location = "n/a";
try {
if (driver != null) {
location = driver.getCurrentUrl();
}
} catch (Exception exception) {
logger.log(Level.FINER, "Current locati... | class class_name[name] begin[{]
method[saveGetLocation, return_type[type[String]], modifier[static], parameter[driver]] begin[{]
call[logger.entering, parameter[member[.driver]]]
local_variable[type[String], location]
TryStatement(block=[IfStatement(condition=BinaryOperation(ope... | Keyword[static] identifier[String] identifier[saveGetLocation] operator[SEP] identifier[WebDriver] identifier[driver] operator[SEP] {
identifier[logger] operator[SEP] identifier[entering] operator[SEP] identifier[driver] operator[SEP] operator[SEP] identifier[String] identifier[location] operator[=] literal[Stri... |
public void storeStream(String id, InputStream inputStream, ByteTransferListener listener) throws IOException {
Assert.isNotNull(id);
Assert.isNotNull(inputStream);
CountingInputStream countingInputStream = new CountingInputStream(inputStream);
countingInputStream.addByteTransferListener(new ByteTransferListen... | class class_name[name] begin[{]
method[storeStream, return_type[void], modifier[public], parameter[id, inputStream, listener]] begin[{]
call[Assert.isNotNull, parameter[member[.id]]]
call[Assert.isNotNull, parameter[member[.inputStream]]]
local_variable[type[CountingInpu... | Keyword[public] Keyword[void] identifier[storeStream] operator[SEP] identifier[String] identifier[id] , identifier[InputStream] identifier[inputStream] , identifier[ByteTransferListener] identifier[listener] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Assert] operator[SEP] identifier[isN... |
public static void drawRightBracket()
{
Tortoise.setAngle(-90);
Tortoise.setX(MakeALogo.XValue + 250);
Tortoise.setY(MakeALogo.YValue - 20);
Tortoise.turn(180);
Tortoise.move(30);
TKPLogo.curve3();
Tortoise.move(40);
TKPLogo.curve4();
Tortoise.move(10);
Tortoise.turn(-90);
... | class class_name[name] begin[{]
method[drawRightBracket, return_type[void], modifier[public static], parameter[]] begin[{]
call[Tortoise.setAngle, parameter[literal[90]]]
call[Tortoise.setX, parameter[binary_operation[member[MakeALogo.XValue], +, literal[250]]]]
... | Keyword[public] Keyword[static] Keyword[void] identifier[drawRightBracket] operator[SEP] operator[SEP] {
identifier[Tortoise] operator[SEP] identifier[setAngle] operator[SEP] operator[-] Other[90] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[setX] operator[SEP] identifier[MakeALogo] ... |
public float at (final float x)
{
if (m_nDataPoints < 2)
return Float.NaN;
float y = m_aDivDiff[0][0];
float xFactor = 1;
// Compute the value of the function.
for (int order = 1; order < m_nDataPoints; ++order)
{
xFactor = xFactor * (x - m_aData[order - 1].getX ());
y = y ... | class class_name[name] begin[{]
method[at, return_type[type[float]], modifier[public], parameter[x]] begin[{]
if[binary_operation[member[.m_nDataPoints], <, literal[2]]] begin[{]
return[member[Float.NaN]]
else begin[{]
None
end[}]
local_variable[type[float], y]
l... | Keyword[public] Keyword[float] identifier[at] operator[SEP] Keyword[final] Keyword[float] identifier[x] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_nDataPoints] operator[<] Other[2] operator[SEP] Keyword[return] identifier[Float] operator[SEP] identifier[NaN] operator[SEP] Keyword[float] identifier[y]... |
protected void generateAnonymousClassDefinition(AnonymousClass anonClass, IAppendable it, IExtraLanguageGeneratorContext context) {
if (!it.hasName(anonClass) && it instanceof PyAppendable) {
final LightweightTypeReference jvmAnonType = getExpectedType(anonClass);
final String anonName = it.declareSyntheticVari... | class class_name[name] begin[{]
method[generateAnonymousClassDefinition, return_type[void], modifier[protected], parameter[anonClass, it, context]] begin[{]
if[binary_operation[call[it.hasName, parameter[member[.anonClass]]], &&, binary_operation[member[.it], instanceof, type[PyAppendable]]]] b... | Keyword[protected] Keyword[void] identifier[generateAnonymousClassDefinition] operator[SEP] identifier[AnonymousClass] identifier[anonClass] , identifier[IAppendable] identifier[it] , identifier[IExtraLanguageGeneratorContext] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier... |
public static String extractMavenPropertyName(String propName) {
Matcher matcher = Pattern.compile(MAVEN_PROPERTY_REGEXP).matcher(propName);
if (matcher.matches()) {
return matcher.group(1);
} else {
return null;
}
} | class class_name[name] begin[{]
method[extractMavenPropertyName, return_type[type[String]], modifier[public static], parameter[propName]] begin[{]
local_variable[type[Matcher], matcher]
if[call[matcher.matches, parameter[]]] begin[{]
return[call[matcher.group, parameter[lite... | Keyword[public] Keyword[static] identifier[String] identifier[extractMavenPropertyName] operator[SEP] identifier[String] identifier[propName] operator[SEP] {
identifier[Matcher] identifier[matcher] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[MAVEN_PROPERTY_REGEXP] o... |
public void setImageUri(int viewId, @Nullable Uri uri) {
ViewHelper.setImageUri(mCacheView, viewId, uri);
} | class class_name[name] begin[{]
method[setImageUri, return_type[void], modifier[public], parameter[viewId, uri]] begin[{]
call[ViewHelper.setImageUri, parameter[member[.mCacheView], member[.viewId], member[.uri]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setImageUri] operator[SEP] Keyword[int] identifier[viewId] , annotation[@] identifier[Nullable] identifier[Uri] identifier[uri] operator[SEP] {
identifier[ViewHelper] operator[SEP] identifier[setImageUri] operator[SEP] identifier[mCacheView] , identifier[viewId] , iden... |
public void applyBounds(final Bbox bounds) {
org.geomajas.gwt.client.spatial.Bbox bbox = new org.geomajas.gwt.client.spatial.Bbox(bounds.getX(),
bounds.getY(), bounds.getWidth(), bounds.getHeight());
mapView.applyBounds(bbox, zoomOption);
} | class class_name[name] begin[{]
method[applyBounds, return_type[void], modifier[public], parameter[bounds]] begin[{]
local_variable[type[org], bbox]
call[mapView.applyBounds, parameter[member[.bbox], member[.zoomOption]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[applyBounds] operator[SEP] Keyword[final] identifier[Bbox] identifier[bounds] operator[SEP] {
identifier[org] operator[SEP] identifier[geomajas] operator[SEP] identifier[gwt] operator[SEP] identifier[client] operator[SEP] identifier[spatial] operator[SEP] identifier[Bbox]... |
public void setPosition(double x, double y, double z) {
this.x = x;
this.y = y;
this.z = z;
} | class class_name[name] begin[{]
method[setPosition, return_type[void], modifier[public], parameter[x, y, z]] begin[{]
assign[THIS[member[None.x]], member[.x]]
assign[THIS[member[None.y]], member[.y]]
assign[THIS[member[None.z]], member[.z]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setPosition] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] , Keyword[double] identifier[z] operator[SEP] {
Keyword[this] operator[SEP] identifier[x] operator[=] identifier[x] operator[SEP] Keyword[this] operator[SEP] identifier[y] operator[... |
private final static byte[] getDecodabet(final int options) {
if ((options & Base64.URL_SAFE) == Base64.URL_SAFE) {
return Base64._URL_SAFE_DECODABET;
} else if ((options & Base64.ORDERED) == Base64.ORDERED) {
return Base64._ORDERED_DECODABET;
} else {
return Base64._STANDARD_DECODABET;
... | class class_name[name] begin[{]
method[getDecodabet, return_type[type[byte]], modifier[final private static], parameter[options]] begin[{]
if[binary_operation[binary_operation[member[.options], &, member[Base64.URL_SAFE]], ==, member[Base64.URL_SAFE]]] begin[{]
return[member[Base64.... | Keyword[private] Keyword[final] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[getDecodabet] operator[SEP] Keyword[final] Keyword[int] identifier[options] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[options] operator[&] identifier[Base64] operator[SEP] identifier[URL_... |
public void stop() {
try {
if (server != null) {
server.stop();
server.join();
}
} catch (Exception e) {
LOG.warn("Got exception shutting down proxy", e);
}
} | class class_name[name] begin[{]
method[stop, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=server, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operat... | Keyword[public] Keyword[void] identifier[stop] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[server] operator[!=] Other[null] operator[SEP] {
identifier[server] operator[SEP] identifier[stop] operator[SEP] operator[SEP] operator[SEP] identifier[server... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.