code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
@Override
public void checkRepositoryStatus() throws IOException {
for (File f : assets) {
if (!f.exists()) {
throw new FileNotFoundException("Could not find " + f + " in the LooseFileRepository");
}
}
} | class class_name[name] begin[{]
method[checkRepositoryStatus, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=['!'], qualifier=f... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[checkRepositoryStatus] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[for] operator[SEP] identifier[File] identifier[f] operator[:] identifier[assets] operator[SEP] {
Keyword[if] operator[SEP] o... |
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ptr_expandable_list);
mPullRefreshListView = (PullToRefreshExpandableListView) findViewById(R.id.pull_refresh_expandable_list);
// Set a listener to be invoked when the list should... | class class_name[name] begin[{]
method[onCreate, return_type[void], modifier[public], parameter[savedInstanceState]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=savedInstanceState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onCreate, postf... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onCreate] operator[SEP] identifier[Bundle] identifier[savedInstanceState] operator[SEP] {
Keyword[super] operator[SEP] identifier[onCreate] operator[SEP] identifier[savedInstanceState] operator[SEP] operator[SEP] identifier[setContentVie... |
@Override
public String fromActionNameToPath(final String actionName) {
if (!actionName.endsWith(actionSuffix)) {
throw new IllegalArgumentException(actionName);
}
String name = actionName.substring(0, actionName.length() - actionSuffix.length());
return adjustViewRootPat... | class class_name[name] begin[{]
method[fromActionNameToPath, return_type[type[String]], modifier[public], parameter[actionName]] begin[{]
if[call[actionName.endsWith, parameter[member[.actionSuffix]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[fromActionNameToPath] operator[SEP] Keyword[final] identifier[String] identifier[actionName] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[actionName] operator[SEP] identifier[endsWith] operator[SEP] identifier[ac... |
final Table SEQUENCES() {
Table t = sysTables[SEQUENCES];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[SEQUENCES]);
addColumn(t, "SEQUENCE_CATALOG", SQL_IDENTIFIER);
addColumn(t, "SEQUENCE_SCHEMA", SQL_IDENTIFIER);
addColumn(t, "SEQUENCE_NAME... | class class_name[name] begin[{]
method[SEQUENCES, return_type[type[Table]], modifier[final], parameter[]] begin[{]
local_variable[type[Table], t]
if[binary_operation[member[.t], ==, literal[null]]] begin[{]
assign[member[.t], call[.createBlankTable, parameter[mem... | Keyword[final] identifier[Table] identifier[SEQUENCES] operator[SEP] operator[SEP] {
identifier[Table] identifier[t] operator[=] identifier[sysTables] operator[SEP] identifier[SEQUENCES] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] {
identi... |
public @CheckForNull Future<FormValidation> updateDirectly(final boolean signatureCheck) {
if (! getDataFile().exists() || isDue()) {
return Jenkins.getInstance().getUpdateCenter().updateService.submit(new Callable<FormValidation>() {
@Override public FormValidation call() throws Exc... | class class_name[name] begin[{]
method[updateDirectly, return_type[type[Future]], modifier[public], parameter[signatureCheck]] begin[{]
if[binary_operation[call[.getDataFile, parameter[]], ||, call[.isDue, parameter[]]]] begin[{]
return[call[Jenkins.getInstance, parameter[]]]
... | Keyword[public] annotation[@] identifier[CheckForNull] identifier[Future] operator[<] identifier[FormValidation] operator[>] identifier[updateDirectly] operator[SEP] Keyword[final] Keyword[boolean] identifier[signatureCheck] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[getDataFile] operator[S... |
protected boolean addValueSample(int statOffset, long statDeltaBits) {
if (this.values != null && this.values[statOffset] != null) {
this.values[statOffset].prepareNextBits(statDeltaBits);
return true;
} else {
return false;
}
} | class class_name[name] begin[{]
method[addValueSample, return_type[type[boolean]], modifier[protected], parameter[statOffset, statDeltaBits]] begin[{]
if[binary_operation[binary_operation[THIS[member[None.values]], !=, literal[null]], &&, binary_operation[THIS[member[None.values]ArraySelector(i... | Keyword[protected] Keyword[boolean] identifier[addValueSample] operator[SEP] Keyword[int] identifier[statOffset] , Keyword[long] identifier[statDeltaBits] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[values] operator[!=] Other[null] operator[&&] Keyword[this] operator[SEP] id... |
public Date getDate(String key) {
String value = get(key);
Date result = Utils.isEmpty(value) ? null : Utils.dateFromString(value);
return result;
} | class class_name[name] begin[{]
method[getDate, return_type[type[Date]], modifier[public], parameter[key]] begin[{]
local_variable[type[String], value]
local_variable[type[Date], result]
return[member[.result]]
end[}]
END[}] | Keyword[public] identifier[Date] identifier[getDate] operator[SEP] identifier[String] identifier[key] operator[SEP] {
identifier[String] identifier[value] operator[=] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[Date] identifier[result] operator[=] identifier[Utils] operat... |
@GuardedBy("writeLock")
private void updateFileList(FileListCacheValue fileList) {
if (writeAsync) {
cacheNoRetrieve.putAsync(fileListCacheKey, fileList);
}
else {
if (trace) {
log.tracef("Updating file listing view from %s", getAddress(cacheNoRetrieve));
}
... | class class_name[name] begin[{]
method[updateFileList, return_type[void], modifier[private], parameter[fileList]] begin[{]
if[member[.writeAsync]] begin[{]
call[cacheNoRetrieve.putAsync, parameter[member[.fileListCacheKey], member[.fileList]]]
else begin[{]
... | annotation[@] identifier[GuardedBy] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[updateFileList] operator[SEP] identifier[FileListCacheValue] identifier[fileList] operator[SEP] {
Keyword[if] operator[SEP] identifier[writeAsync] operator[SEP] {
identifier[cacheN... |
public TableOperation createLimitWithOffset(int offset, TableOperation child) {
SortTableOperation previousSort = validateAndGetChildSort(child);
if (offset < 0) {
throw new ValidationException("Offset should be greater or equal 0");
}
if (previousSort.getOffset() != -1) {
throw new ValidationException(... | class class_name[name] begin[{]
method[createLimitWithOffset, return_type[type[TableOperation]], modifier[public], parameter[offset, child]] begin[{]
local_variable[type[SortTableOperation], previousSort]
if[binary_operation[member[.offset], <, literal[0]]] begin[{]
ThrowSta... | Keyword[public] identifier[TableOperation] identifier[createLimitWithOffset] operator[SEP] Keyword[int] identifier[offset] , identifier[TableOperation] identifier[child] operator[SEP] {
identifier[SortTableOperation] identifier[previousSort] operator[=] identifier[validateAndGetChildSort] operator[SEP] identifi... |
@SuppressWarnings("unchecked")
public List<String> getInputArguments() {
if (Holder.getInputArgumentsMethod != null) {
try {
return (List<String>) Holder.getInputArgumentsMethod.invoke(runtimeMxBean);
} catch (ClassCastException e) { // no multi-catch with source level 6
// fallthrough... | class class_name[name] begin[{]
method[getInputArguments, return_type[type[List]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[Holder.getInputArgumentsMethod], !=, literal[null]]] begin[{]
TryStatement(block=[ReturnStatement(expression=Cast(expression=MethodIn... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getInputArguments] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[Holder] operator[SEP] identifier[getInputArgumentsMet... |
protected static int codePointAt(CharSequence seq, int index, int end) {
checkNotNull(seq);
if (index < end) {
char c1 = seq.charAt(index++);
if (c1 < Character.MIN_HIGH_SURROGATE || c1 > Character.MAX_LOW_SURROGATE) {
// Fast path (first test is probably all we need to do)
return c1... | class class_name[name] begin[{]
method[codePointAt, return_type[type[int]], modifier[static protected], parameter[seq, index, end]] begin[{]
call[.checkNotNull, parameter[member[.seq]]]
if[binary_operation[member[.index], <, member[.end]]] begin[{]
local_variable[typ... | Keyword[protected] Keyword[static] Keyword[int] identifier[codePointAt] operator[SEP] identifier[CharSequence] identifier[seq] , Keyword[int] identifier[index] , Keyword[int] identifier[end] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[seq] operator[SEP] operator[SEP] Keyword[if] operator[... |
public String getSelectedResourceName() {
String resParam = getJsp().getRequest().getParameter(getListId() + LIST_RACTION_SEL);
if (CmsStringUtil.isNotEmpty(resParam)) {
CmsListItem item = getList().getItem(resParam);
return (String)item.get(LIST_COLUMN_NAME);
}
... | class class_name[name] begin[{]
method[getSelectedResourceName, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], resParam]
if[call[CmsStringUtil.isNotEmpty, parameter[member[.resParam]]]] begin[{]
local_variable[type[CmsListItem... | Keyword[public] identifier[String] identifier[getSelectedResourceName] operator[SEP] operator[SEP] {
identifier[String] identifier[resParam] operator[=] identifier[getJsp] operator[SEP] operator[SEP] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] identifier[getParameter] operator[... |
public Collection<ApplicableToProduct> getNonApplicableResourcesForName(String resourceName) {
List<ApplicableToProduct> result = nameToNonApplicableResources.get(resourceName);
if (result == null) {
// We don't expect this to happen, if we're looking for non-applicable resources, it's beca... | class class_name[name] begin[{]
method[getNonApplicableResourcesForName, return_type[type[Collection]], modifier[public], parameter[resourceName]] begin[{]
local_variable[type[List], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
call[.... | Keyword[public] identifier[Collection] operator[<] identifier[ApplicableToProduct] operator[>] identifier[getNonApplicableResourcesForName] operator[SEP] identifier[String] identifier[resourceName] operator[SEP] {
identifier[List] operator[<] identifier[ApplicableToProduct] operator[>] identifier[result] operato... |
private void pauseAndTrainModal(List<FormInput> formInputs) {
/* If we are doing a training crawl, allow the user to edit remaining forms. */
WebDriver driver = browser.getWebDriver();
driver.manage().timeouts().setScriptTimeout(180, TimeUnit.SECONDS);
String js = "";
/* Inject the modal notification. */
... | class class_name[name] begin[{]
method[pauseAndTrainModal, return_type[void], modifier[private], parameter[formInputs]] begin[{]
local_variable[type[WebDriver], driver]
call[driver.manage, parameter[]]
local_variable[type[String], js]
assign[member[.js], literal[... | Keyword[private] Keyword[void] identifier[pauseAndTrainModal] operator[SEP] identifier[List] operator[<] identifier[FormInput] operator[>] identifier[formInputs] operator[SEP] {
identifier[WebDriver] identifier[driver] operator[=] identifier[browser] operator[SEP] identifier[getWebDriver] operator[SEP] operator[... |
public void fidelityAccount_PUT(OvhFidelityAccount body) throws IOException {
String qPath = "/me/fidelityAccount";
StringBuilder sb = path(qPath);
exec(qPath, "PUT", sb.toString(), body);
} | class class_name[name] begin[{]
method[fidelityAccount_PUT, return_type[void], modifier[public], parameter[body]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
call[.exec, parameter[member[.qPath], literal["PUT"], call[sb.toString, paramete... | Keyword[public] Keyword[void] identifier[fidelityAccount_PUT] operator[SEP] identifier[OvhFidelityAccount] identifier[body] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] i... |
@CheckReturnValue
@NonNull
@SchedulerSupport(SchedulerSupport.NONE)
public final Completable concatWith(CompletableSource other) {
ObjectHelper.requireNonNull(other, "other is null");
return RxJavaPlugins.onAssembly(new CompletableAndThenCompletable(this, other));
} | class class_name[name] begin[{]
method[concatWith, return_type[type[Completable]], modifier[final public], parameter[other]] begin[{]
call[ObjectHelper.requireNonNull, parameter[member[.other], literal["other is null"]]]
return[call[RxJavaPlugins.onAssembly, parameter[ClassCreator(argum... | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[NonNull] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] identifier[Completable] identifier[concatWith] operator[SEP] identifier[Completab... |
public final EObject entryRuleXOrExpression() throws RecognitionException {
EObject current = null;
EObject iv_ruleXOrExpression = null;
try {
// InternalSARL.g:12283:54: (iv_ruleXOrExpression= ruleXOrExpression EOF )
// InternalSARL.g:12284:2: iv_ruleXOrExpression= ru... | class class_name[name] begin[{]
method[entryRuleXOrExpression, return_type[type[EObject]], modifier[final public], parameter[]] begin[{]
local_variable[type[EObject], current]
local_variable[type[EObject], iv_ruleXOrExpression]
TryStatement(block=[BlockStatement(label=None, statements=[... | Keyword[public] Keyword[final] identifier[EObject] identifier[entryRuleXOrExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[iv_ruleXOrExpression] operator[=] Other... |
public void addLayoutComponent(Component comp, Object constraint) {
if (debug) System.out.println(name+ " addLayoutComponent= "+ comp.getClass().getName()+" "+comp.hashCode()+" "+constraint);
if (!(constraint instanceof Constraint))
throw new IllegalArgumentException( "MySpringLayout must be Constra... | class class_name[name] begin[{]
method[addLayoutComponent, return_type[void], modifier[public], parameter[comp, constraint]] begin[{]
if[member[.debug]] begin[{]
call[System.out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[b... | Keyword[public] Keyword[void] identifier[addLayoutComponent] operator[SEP] identifier[Component] identifier[comp] , identifier[Object] identifier[constraint] operator[SEP] {
Keyword[if] operator[SEP] identifier[debug] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[printl... |
public void startConditional() throws Exception {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "startConditional", this);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
SibTr.debug(tc, "Activating MBean for ME " + getName());... | class class_name[name] begin[{]
method[startConditional, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc],... | Keyword[public] Keyword[void] identifier[startConditional] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntr... |
@Override
public boolean isPaused(String targets) throws PauseableComponentControllerRequestFailedException {
Set<String> foundTargets = new HashSet<String>();
Set<String> targetList = createTargetList(targets);
if (targetList.isEmpty()) {
Tr.warning(tc, "warning.server.status... | class class_name[name] begin[{]
method[isPaused, return_type[type[boolean]], modifier[public], parameter[targets]] begin[{]
local_variable[type[Set], foundTargets]
local_variable[type[Set], targetList]
if[call[targetList.isEmpty, parameter[]]] begin[{]
ca... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isPaused] operator[SEP] identifier[String] identifier[targets] operator[SEP] Keyword[throws] identifier[PauseableComponentControllerRequestFailedException] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[foundT... |
public static void main(String[] args) throws Exception {
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
context.getLoggerList().get(0).setLevel(Level.ERROR);
System.out.println("Pravega Admin Tools.\n");
@Cleanup
AdminCommandState state = new AdminCo... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
local_variable[type[LoggerContext], context]
call[context.getLoggerList, parameter[]]
call[System.out.println, parameter[literal["Pravega Admin Tools.\n"]]]... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[LoggerContext] identifier[context] operator[=] operator[SEP] identifier[LoggerContext] operator[SEP] identi... |
private void recoverAndCommitInternal(TransactionHolder<TXN> transactionHolder) {
try {
logWarningIfTimeoutAlmostReached(transactionHolder);
recoverAndCommit(transactionHolder.handle);
} catch (final Exception e) {
final long elapsedTime = clock.millis() - transactionHolder.transactionStartTime;
if (ign... | class class_name[name] begin[{]
method[recoverAndCommitInternal, return_type[void], modifier[private], parameter[transactionHolder]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transactionHolder, postfix_operators=[], prefix_operators=[... | Keyword[private] Keyword[void] identifier[recoverAndCommitInternal] operator[SEP] identifier[TransactionHolder] operator[<] identifier[TXN] operator[>] identifier[transactionHolder] operator[SEP] {
Keyword[try] {
identifier[logWarningIfTimeoutAlmostReached] operator[SEP] identifier[transactionHolder] ... |
public Parse getParse(String params) throws Exception {
String action = "parse";
Api api = getActionResult(action, params);
super.handleError(api);
return api.getParse();
} | class class_name[name] begin[{]
method[getParse, return_type[type[Parse]], modifier[public], parameter[params]] begin[{]
local_variable[type[String], action]
local_variable[type[Api], api]
SuperMethodInvocation(arguments=[MemberReference(member=api, postfix_operators=[], prefix_... | Keyword[public] identifier[Parse] identifier[getParse] operator[SEP] identifier[String] identifier[params] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[action] operator[=] literal[String] operator[SEP] identifier[Api] identifier[api] operator[=] identifier[getActionResult] ... |
public String toGrammarRules() {
StringBuffer sb = new StringBuffer();
System.out.println("R0 -> " + this.r0String);
for (int i = 1; i <= this.theRules.size(); i++) {
RePairRule r = this.theRules.get(i);
sb.append(THE_R).append(r.ruleNumber).append(" -> ").append(r.toRuleString()).append(" : ")
... | class class_name[name] begin[{]
method[toGrammarRules, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[StringBuffer], sb]
call[System.out.println, parameter[binary_operation[literal["R0 -> "], +, THIS[member[None.r0String]]]]]
ForStatement(... | Keyword[public] identifier[String] identifier[toGrammarRules] operator[SEP] operator[SEP] {
identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operat... |
protected void repairRow(JDBCStorageConnection conn, ResultSet resultSet) throws SQLException
{
if (resultSet.getInt(DBConstants.COLUMN_CLASS) == 1)
{
assignRootAsParent(conn, resultSet);
}
else
{
deleteProperty(conn, resultSet);
}
} | class class_name[name] begin[{]
method[repairRow, return_type[void], modifier[protected], parameter[conn, resultSet]] begin[{]
if[binary_operation[call[resultSet.getInt, parameter[member[DBConstants.COLUMN_CLASS]]], ==, literal[1]]] begin[{]
call[.assignRootAsParent, par... | Keyword[protected] Keyword[void] identifier[repairRow] operator[SEP] identifier[JDBCStorageConnection] identifier[conn] , identifier[ResultSet] identifier[resultSet] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[resultSet] operator[SEP] identifier[getInt] operator... |
protected List<DockerCloud> getAvailableDockerClouds(Label label) {
return getAllDockerClouds().stream()
.filter(cloud ->
cloud.canProvision(label) &&
(countCurrentDockerSlaves(cloud) >= 0) &&
(countCurrentDo... | class class_name[name] begin[{]
method[getAvailableDockerClouds, return_type[type[List]], modifier[protected], parameter[label]] begin[{]
return[call[.getAllDockerClouds, parameter[]]]
end[}]
END[}] | Keyword[protected] identifier[List] operator[<] identifier[DockerCloud] operator[>] identifier[getAvailableDockerClouds] operator[SEP] identifier[Label] identifier[label] operator[SEP] {
Keyword[return] identifier[getAllDockerClouds] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] oper... |
public void close()
{
inputManager.unregisterInputDeviceListener(inputDeviceListener);
mouseDeviceManager.forceStopThread();
gamepadDeviceManager.forceStopThread();
controllerIds.clear();
cache.clear();
controllers.clear();
} | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
call[inputManager.unregisterInputDeviceListener, parameter[member[.inputDeviceListener]]]
call[mouseDeviceManager.forceStopThread, parameter[]]
call[gamepadDe... | Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] {
identifier[inputManager] operator[SEP] identifier[unregisterInputDeviceListener] operator[SEP] identifier[inputDeviceListener] operator[SEP] operator[SEP] identifier[mouseDeviceManager] operator[SEP] identifier[forceStopThread] operato... |
@Override
public void activate() throws InterruptedException, CouldNotPerformException {
manageLock.lockWrite(this);
try {
validateInitialization();
logger.debug("Activate AbstractControllerServer for: " + this);
setAvailabilityState(ACTIVATING);
asser... | class class_name[name] begin[{]
method[activate, return_type[void], modifier[public], parameter[]] begin[{]
call[manageLock.lockWrite, parameter[THIS[]]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=validateInitialization, postfix_operators=[]... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[activate] operator[SEP] operator[SEP] Keyword[throws] identifier[InterruptedException] , identifier[CouldNotPerformException] {
identifier[manageLock] operator[SEP] identifier[lockWrite] operator[SEP] Keyword[this] operator[SEP] operato... |
private JsonNode invokeCallbackMethod(final InvokeRequest req, final String cookie) {
Object obj = this.getObject(req.getObjref());
Method method = this.findCallbackMethod(obj.getClass(), cookie);
final Class<?>[] argTypes = method.getParameterTypes();
final Object[] args = new Object[a... | class class_name[name] begin[{]
method[invokeCallbackMethod, return_type[type[JsonNode]], modifier[private], parameter[req, cookie]] begin[{]
local_variable[type[Object], obj]
local_variable[type[Method], method]
local_variable[type[Class], argTypes]
local_variable[type[Object],... | Keyword[private] identifier[JsonNode] identifier[invokeCallbackMethod] operator[SEP] Keyword[final] identifier[InvokeRequest] identifier[req] , Keyword[final] identifier[String] identifier[cookie] operator[SEP] {
identifier[Object] identifier[obj] operator[=] Keyword[this] operator[SEP] identifier[getObject] op... |
public IssueCategory getByID(String categoryID)
{
IssueCategory issueCategory = this.issueCategories.get(categoryID);
if (issueCategory == null)
{
// We do not have this one yet, so store it as a placeholder. It will presumably be loaded later on.
issueCategory = new ... | class class_name[name] begin[{]
method[getByID, return_type[type[IssueCategory]], modifier[public], parameter[categoryID]] begin[{]
local_variable[type[IssueCategory], issueCategory]
if[binary_operation[member[.issueCategory], ==, literal[null]]] begin[{]
assign[... | Keyword[public] identifier[IssueCategory] identifier[getByID] operator[SEP] identifier[String] identifier[categoryID] operator[SEP] {
identifier[IssueCategory] identifier[issueCategory] operator[=] Keyword[this] operator[SEP] identifier[issueCategories] operator[SEP] identifier[get] operator[SEP] identifier[cate... |
private static BeanBox[] getParameterInjectAsBeanBoxArray(Object o, boolean allowSpringJsrAnno) {
Annotation[][] annoss = null;
Class<?>[] paramTypes = null;
if (o instanceof Method) {
annoss = ((Method) o).getParameterAnnotations();
paramTypes = ((Method) o).getParameterTypes();
} else if (o instanceof C... | class class_name[name] begin[{]
method[getParameterInjectAsBeanBoxArray, return_type[type[BeanBox]], modifier[private static], parameter[o, allowSpringJsrAnno]] begin[{]
local_variable[type[Annotation], annoss]
local_variable[type[Class], paramTypes]
if[binary_operation[member[.... | Keyword[private] Keyword[static] identifier[BeanBox] operator[SEP] operator[SEP] identifier[getParameterInjectAsBeanBoxArray] operator[SEP] identifier[Object] identifier[o] , Keyword[boolean] identifier[allowSpringJsrAnno] operator[SEP] {
identifier[Annotation] operator[SEP] operator[SEP] operator[SEP] operator... |
public final ByteArrayWrapper append(byte[] src, int start, int limit)
{
int len = limit - start;
ensureCapacity(size + len);
copyBytes(src, start, bytes, size, len);
size += len;
return this;
} | class class_name[name] begin[{]
method[append, return_type[type[ByteArrayWrapper]], modifier[final public], parameter[src, start, limit]] begin[{]
local_variable[type[int], len]
call[.ensureCapacity, parameter[binary_operation[member[.size], +, member[.len]]]]
call[.copy... | Keyword[public] Keyword[final] identifier[ByteArrayWrapper] identifier[append] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[src] , Keyword[int] identifier[start] , Keyword[int] identifier[limit] operator[SEP] {
Keyword[int] identifier[len] operator[=] identifier[limit] operator[-] identif... |
private AMethodWithItsArgs findBestMethodForVarargs(Set<Method> methods, JsonNode paramsNode) {
for (Method method : methods) {
if (method.getParameterTypes().length != 1) {
continue;
}
if (method.isVarArgs()) {
return new AMethodWithItsArgs(method, paramsNod... | class class_name[name] begin[{]
method[findBestMethodForVarargs, return_type[type[AMethodWithItsArgs]], modifier[private], parameter[methods, paramsNode]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], memb... | Keyword[private] identifier[AMethodWithItsArgs] identifier[findBestMethodForVarargs] operator[SEP] identifier[Set] operator[<] identifier[Method] operator[>] identifier[methods] , identifier[JsonNode] identifier[paramsNode] operator[SEP] {
Keyword[for] operator[SEP] identifier[Method] identifier[method] operato... |
private Set<String> findResourceNamesFromFileSystem(String classPathRootOnDisk, String scanRootLocation, File folder) {
LOGGER.debug("Scanning for resources in path: {} ({})", folder.getPath(), scanRootLocation);
File[] files = folder.listFiles();
if (files == null) {
return emptySe... | class class_name[name] begin[{]
method[findResourceNamesFromFileSystem, return_type[type[Set]], modifier[private], parameter[classPathRootOnDisk, scanRootLocation, folder]] begin[{]
call[LOGGER.debug, parameter[literal["Scanning for resources in path: {} ({})"], call[folder.getPath, parameter[]... | Keyword[private] identifier[Set] operator[<] identifier[String] operator[>] identifier[findResourceNamesFromFileSystem] operator[SEP] identifier[String] identifier[classPathRootOnDisk] , identifier[String] identifier[scanRootLocation] , identifier[File] identifier[folder] operator[SEP] {
identifier[LOGGER] ope... |
public void addActionCheckBox( String menuName, AbstractAction act, boolean state) {
JMenuItem mi = new JCheckBoxMenuItem(menuName, state);
mi.addActionListener( new BAMutil.ActionToggle(act, mi));
act.putValue(BAMutil.STATE, new Boolean(state));
add( mi);
} | class class_name[name] begin[{]
method[addActionCheckBox, return_type[void], modifier[public], parameter[menuName, act, state]] begin[{]
local_variable[type[JMenuItem], mi]
call[mi.addActionListener, parameter[ClassCreator(arguments=[MemberReference(member=act, postfix_operators=[], pre... | Keyword[public] Keyword[void] identifier[addActionCheckBox] operator[SEP] identifier[String] identifier[menuName] , identifier[AbstractAction] identifier[act] , Keyword[boolean] identifier[state] operator[SEP] {
identifier[JMenuItem] identifier[mi] operator[=] Keyword[new] identifier[JCheckBoxMenuItem] operato... |
private Object resolvePropertyTypedValue(FieldData field) {
Object value;
if (field.metaData.isInstantiableCollectionType()) {
value = getArrayPropertyAsCollection(field);
} else {
value = resolvePropertyTypedValue(field, field.metaData.getType());
}
retur... | class class_name[name] begin[{]
method[resolvePropertyTypedValue, return_type[type[Object]], modifier[private], parameter[field]] begin[{]
local_variable[type[Object], value]
if[call[field.metaData.isInstantiableCollectionType, parameter[]]] begin[{]
assign[membe... | Keyword[private] identifier[Object] identifier[resolvePropertyTypedValue] operator[SEP] identifier[FieldData] identifier[field] operator[SEP] {
identifier[Object] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[field] operator[SEP] identifier[metaData] operator[SEP] identifier[isInstantiable... |
public static double getMinLength(double[] widths, double[] heights) {
double minWidth = getMinLength(widths);
double minHeight = getMinLength(heights);
double minLength = Math.max(minWidth, minHeight);
return minLength;
} | class class_name[name] begin[{]
method[getMinLength, return_type[type[double]], modifier[public static], parameter[widths, heights]] begin[{]
local_variable[type[double], minWidth]
local_variable[type[double], minHeight]
local_variable[type[double], minLength]
return[member[.min... | Keyword[public] Keyword[static] Keyword[double] identifier[getMinLength] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[widths] , Keyword[double] operator[SEP] operator[SEP] identifier[heights] operator[SEP] {
Keyword[double] identifier[minWidth] operator[=] identifier[getMinLength] operat... |
public ChargeMode getChargeModeFromEvses(Set<Evse> evses) {
ChargeMode chargeMode = ChargeMode.UNSPECIFIED;
for (Evse evse : evses) {
if (!evse.getConnectors().isEmpty()) {
chargeMode = ChargeMode.fromChargingProtocol(evse.getConnectors().get(0).getChargingProtocol());
... | class class_name[name] begin[{]
method[getChargeModeFromEvses, return_type[type[ChargeMode]], modifier[public], parameter[evses]] begin[{]
local_variable[type[ChargeMode], chargeMode]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], m... | Keyword[public] identifier[ChargeMode] identifier[getChargeModeFromEvses] operator[SEP] identifier[Set] operator[<] identifier[Evse] operator[>] identifier[evses] operator[SEP] {
identifier[ChargeMode] identifier[chargeMode] operator[=] identifier[ChargeMode] operator[SEP] identifier[UNSPECIFIED] operator[SEP] K... |
public boolean isPolled(final String polledObject) throws DevFailed {
try {
return AttributeGetterSetter.getAttribute(polledObject, device.getAttributeList()).isPolled();
} catch (final DevFailed e) {
return device.getCommand(polledObject).isPolled();
}
} | class class_name[name] begin[{]
method[isPolled, return_type[type[boolean]], modifier[public], parameter[polledObject]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=polledObject, postfix_operators=[], prefix_operators=[], qualifier=, selecto... | Keyword[public] Keyword[boolean] identifier[isPolled] operator[SEP] Keyword[final] identifier[String] identifier[polledObject] operator[SEP] Keyword[throws] identifier[DevFailed] {
Keyword[try] {
Keyword[return] identifier[AttributeGetterSetter] operator[SEP] identifier[getAttribute] operator[SEP] ide... |
public static long dotProduct3(
final long x0,
final long y0,
final long z0,
final long x1,
final long y1,
final long z1)
{
final long x = x0 * x1;
final long y = y0 * y1;
final long z = z0 * z1;
return x + y + z;
} | class class_name[name] begin[{]
method[dotProduct3, return_type[type[long]], modifier[public static], parameter[x0, y0, z0, x1, y1, z1]] begin[{]
local_variable[type[long], x]
local_variable[type[long], y]
local_variable[type[long], z]
return[binary_operation[binary_operation[me... | Keyword[public] Keyword[static] Keyword[long] identifier[dotProduct3] operator[SEP] Keyword[final] Keyword[long] identifier[x0] , Keyword[final] Keyword[long] identifier[y0] , Keyword[final] Keyword[long] identifier[z0] , Keyword[final] Keyword[long] identifier[x1] , Keyword[final] Keyword[long] identifier[y1] , K... |
void setPageSizeAsString(String pageSize) {
if (CmsStringUtil.isEmpty(pageSize)) {
return;
}
try {
m_pageSize = Integer.parseInt(pageSize);
} catch (NumberFormatException e) {
// intentionally left blank
}
} | class class_name[name] begin[{]
method[setPageSizeAsString, return_type[void], modifier[default], parameter[pageSize]] begin[{]
if[call[CmsStringUtil.isEmpty, parameter[member[.pageSize]]]] begin[{]
return[None]
else begin[{]
None
end[}]
TryStatement(block=[S... | Keyword[void] identifier[setPageSizeAsString] operator[SEP] identifier[String] identifier[pageSize] operator[SEP] {
Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isEmpty] operator[SEP] identifier[pageSize] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP]
... |
public static <T> boolean listEquals(List<T> left, List<T> right) {
if (left == null) {
return right == null;
} else {
if (right == null) {
return false;
}
if (left.size() != right.size()) {
return false;
}
... | class class_name[name] begin[{]
method[listEquals, return_type[type[boolean]], modifier[public static], parameter[left, right]] begin[{]
if[binary_operation[member[.left], ==, literal[null]]] begin[{]
return[binary_operation[member[.right], ==, literal[null]]]
else begin[{]
... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[boolean] identifier[listEquals] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[left] , identifier[List] operator[<] identifier[T] operator[>] identifier[right] operator[SEP] {
Keyword[if] operator[SEP]... |
public BuilderType assign(LuaLocal local, String value) {
add(assignment(local(local.getName()), stringValue(value)));
return thisBuilder();
} | class class_name[name] begin[{]
method[assign, return_type[type[BuilderType]], modifier[public], parameter[local, value]] begin[{]
call[.add, parameter[call[.assignment, parameter[call[.local, parameter[call[local.getName, parameter[]]]], call[.stringValue, parameter[member[.value]]]]]]]
... | Keyword[public] identifier[BuilderType] identifier[assign] operator[SEP] identifier[LuaLocal] identifier[local] , identifier[String] identifier[value] operator[SEP] {
identifier[add] operator[SEP] identifier[assignment] operator[SEP] identifier[local] operator[SEP] identifier[local] operator[SEP] identifier[get... |
static MavenSettings parseMavenSettings(File settingsFile) throws IOException {
MavenSettings settings = new MavenSettings();
try {
DocumentBuilder xmlBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document xmlDoc = xmlBuilder.parse(settingsFile);
NodeList mirrorList = xmlDoc.getD... | class class_name[name] begin[{]
method[parseMavenSettings, return_type[type[MavenSettings]], modifier[static], parameter[settingsFile]] begin[{]
local_variable[type[MavenSettings], settings]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=... | Keyword[static] identifier[MavenSettings] identifier[parseMavenSettings] operator[SEP] identifier[File] identifier[settingsFile] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[MavenSettings] identifier[settings] operator[=] Keyword[new] identifier[MavenSettings] operator[SEP] operator[SEP] op... |
@SuppressWarnings({ "rawtypes", "unchecked" })
protected Object parseCollection(GetterMethodCover method,
Collection collection) {
if(method.isArrayObjectCollection()) {
return parseArrayObjectCollection(method, collection);
}
else if(method.isObjectCollection()) {
... | class class_name[name] begin[{]
method[parseCollection, return_type[type[Object]], modifier[protected], parameter[method, collection]] begin[{]
if[call[method.isArrayObjectCollection, parameter[]]] begin[{]
return[call[.parseArrayObjectCollection, parameter[member[.method], member[.... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String]
} operator[SEP] Keyword[protected] identifier[Object] identifier[parseCollection] operator[SEP] identifier[GetterMethodCover] identifier[method] , identifier[Collection] identifier[collection] operator[SEP] {
... |
public static void setFieldVal(Object obj, String fieldName, Object value) {
Field field;
if (obj == null) {
return;
}
try {
field = getField(obj.getClass(), fieldName);
field.setAccessible(true);//取消安全机制限制
field.set(obj, value);
} ... | class class_name[name] begin[{]
method[setFieldVal, return_type[void], modifier[public static], parameter[obj, fieldName, value]] begin[{]
local_variable[type[Field], field]
if[binary_operation[member[.obj], ==, literal[null]]] begin[{]
return[None]
else begin[{]
Non... | Keyword[public] Keyword[static] Keyword[void] identifier[setFieldVal] operator[SEP] identifier[Object] identifier[obj] , identifier[String] identifier[fieldName] , identifier[Object] identifier[value] operator[SEP] {
identifier[Field] identifier[field] operator[SEP] Keyword[if] operator[SEP] identifier[obj] op... |
public static DMatrixRMaj checkZerosLT(DMatrixRMaj A , int numRows , int numCols) {
if( A == null ) {
return new DMatrixRMaj(numRows,numCols);
} else if( numRows != A.numRows || numCols != A.numCols ) {
A.reshape(numRows,numCols);
A.zero();
} else {
... | class class_name[name] begin[{]
method[checkZerosLT, return_type[type[DMatrixRMaj]], modifier[public static], parameter[A, numRows, numCols]] begin[{]
if[binary_operation[member[.A], ==, literal[null]]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=numRows, postfix_... | Keyword[public] Keyword[static] identifier[DMatrixRMaj] identifier[checkZerosLT] operator[SEP] identifier[DMatrixRMaj] identifier[A] , Keyword[int] identifier[numRows] , Keyword[int] identifier[numCols] operator[SEP] {
Keyword[if] operator[SEP] identifier[A] operator[==] Other[null] operator[SEP] {
... |
public Email to(String... to) {
for (String t : to) {
to(new EmailAddress(t));
}
return this;
} | class class_name[name] begin[{]
method[to, return_type[type[Email]], modifier[public], parameter[to]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=t, postfix_operators=[], pref... | Keyword[public] identifier[Email] identifier[to] operator[SEP] identifier[String] operator[...] identifier[to] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[t] operator[:] identifier[to] operator[SEP] {
identifier[to] operator[SEP] Keyword[new] identifier[EmailAddress] oper... |
Marker addMarker() {
if (!lazyInitDocumentation()) {
return null;
}
if (documentation.markers == null) {
documentation.markers = new ArrayList<>();
}
Marker marker = new Marker();
documentation.markers.add(marker);
return marker;
} | class class_name[name] begin[{]
method[addMarker, return_type[type[Marker]], modifier[default], parameter[]] begin[{]
if[call[.lazyInitDocumentation, parameter[]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
if[binary_operation[member[doc... | identifier[Marker] identifier[addMarker] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[lazyInitDocumentation] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[if] operator[SEP] identifier[documentation] opera... |
@Deprecated
public static void monitorMeter(Registry registry, Meter meter) {
ConcurrentMap<Id, Object> state = registry.state();
Object c = Utils.computeIfAbsent(state, meter.id(), MeterState::new);
if (!(c instanceof MeterState)) {
Utils.propagateTypeError(registry, meter.id(), MeterState.class, c... | class class_name[name] begin[{]
method[monitorMeter, return_type[void], modifier[public static], parameter[registry, meter]] begin[{]
local_variable[type[ConcurrentMap], state]
local_variable[type[Object], c]
if[binary_operation[member[.c], instanceof, type[MeterState]]] begin[{... | annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] Keyword[void] identifier[monitorMeter] operator[SEP] identifier[Registry] identifier[registry] , identifier[Meter] identifier[meter] operator[SEP] {
identifier[ConcurrentMap] operator[<] identifier[Id] , identifier[Object] operator[>] identif... |
private QueryResultImpl eliminateDuplicates(QueryResultImpl result) {
QueryResultImpl ret = new QueryResultImpl(result.getQuery());
Set<QueryBindingImpl> distinctSet = new HashSet<>(result.getBindings());
distinctSet.forEach(ret::add);
return ret;
} | class class_name[name] begin[{]
method[eliminateDuplicates, return_type[type[QueryResultImpl]], modifier[private], parameter[result]] begin[{]
local_variable[type[QueryResultImpl], ret]
local_variable[type[Set], distinctSet]
call[distinctSet.forEach, parameter[MethodReference(ex... | Keyword[private] identifier[QueryResultImpl] identifier[eliminateDuplicates] operator[SEP] identifier[QueryResultImpl] identifier[result] operator[SEP] {
identifier[QueryResultImpl] identifier[ret] operator[=] Keyword[new] identifier[QueryResultImpl] operator[SEP] identifier[result] operator[SEP] identifier[getQ... |
public void doDynamic(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
String path = req.getRestOfPath();
if (path.charAt(0)=='/') path = path.substring(1);
if(!allowedResources.containsKey(path)) {
if(!allowResourceToBeServed(path)) {
... | class class_name[name] begin[{]
method[doDynamic, return_type[void], modifier[public], parameter[req, rsp]] begin[{]
local_variable[type[String], path]
if[binary_operation[call[path.charAt, parameter[literal[0]]], ==, literal['/']]] begin[{]
assign[member[.path], call[path.s... | Keyword[public] Keyword[void] identifier[doDynamic] operator[SEP] identifier[StaplerRequest] identifier[req] , identifier[StaplerResponse] identifier[rsp] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] {
identifier[String] identifier[path] operator[=] identifier[req] opera... |
private Cipher getCipherInstance(String algorithm) {
Cipher cipher = null;
if (!useBCProvider) {
try {
cipher = Cipher.getInstance(algorithm);
} catch (NoSuchAlgorithmException e) {
Log.v(Log.TAG_SYMMETRIC_KEY, "Cannot find a cipher (no algorithm)... | class class_name[name] begin[{]
method[getCipherInstance, return_type[type[Cipher]], modifier[private], parameter[algorithm]] begin[{]
local_variable[type[Cipher], cipher]
if[member[.useBCProvider]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expre... | Keyword[private] identifier[Cipher] identifier[getCipherInstance] operator[SEP] identifier[String] identifier[algorithm] operator[SEP] {
identifier[Cipher] identifier[cipher] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[useBCProvider] operator[SEP] {
Keyword[t... |
void notifyObservers(ApptentiveNotification notification) {
boolean hasLostReferences = false;
// create a temporary list of observers to avoid concurrent modification errors
List<ApptentiveNotificationObserver> temp = new ArrayList<>(observers.size());
for (int i = 0; i < observers.size(); ++i) {
Apptentiv... | class class_name[name] begin[{]
method[notifyObservers, return_type[void], modifier[default], parameter[notification]] begin[{]
local_variable[type[boolean], hasLostReferences]
local_variable[type[List], temp]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclara... | Keyword[void] identifier[notifyObservers] operator[SEP] identifier[ApptentiveNotification] identifier[notification] operator[SEP] {
Keyword[boolean] identifier[hasLostReferences] operator[=] literal[boolean] operator[SEP] identifier[List] operator[<] identifier[ApptentiveNotificationObserver] operator[>] identif... |
@Deprecated
public static boolean disableIfNotPublish(Set<String> runModes, ComponentContext componentContext, Logger log) {
return disableIfNoRunModeActive(runModes, new String[] {
PUBLISH
}, componentContext, log);
} | class class_name[name] begin[{]
method[disableIfNotPublish, return_type[type[boolean]], modifier[public static], parameter[runModes, componentContext, log]] begin[{]
return[call[.disableIfNoRunModeActive, parameter[member[.runModes], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initiali... | annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] Keyword[boolean] identifier[disableIfNotPublish] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[runModes] , identifier[ComponentContext] identifier[componentContext] , identifier[Logger] identifier[log] operator[... |
public void addItem(@Nonnull final ExpressionItem item) {
if (item == null) {
throw new PreprocessorException("[Expression]Item is null", this.sources, this.includeStack, null);
}
if (last.isEmptySlot()) {
last = new ExpressionTreeElement(item, this.includeStack, this.sources);
} else {
... | class class_name[name] begin[{]
method[addItem, return_type[void], modifier[public], parameter[item]] begin[{]
if[binary_operation[member[.item], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifi... | Keyword[public] Keyword[void] identifier[addItem] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[ExpressionItem] identifier[item] operator[SEP] {
Keyword[if] operator[SEP] identifier[item] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Prepro... |
@Override
public void removeAll() {
if (null == this.connTasks || this.connTasks.isEmpty()) {
return;
}
if (null != this.connTasks && !this.connTasks.isEmpty()) {
Iterator<String> iter = this.connTasks.keySet().iterator();
while (iter.hasNext()) {
... | class class_name[name] begin[{]
method[removeAll, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[binary_operation[literal[null], ==, THIS[member[None.connTasks]]], ||, THIS[member[None.connTasks]call[None.isEmpty, parameter[]]]]] begin[{]
return[None]... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeAll] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] Keyword[this] operator[SEP] identifier[connTasks] operator[||] Keyword[this] operator[SEP] identifier[connTasks] operator[SEP] identifier[isEmpty... |
public void create() {
RunInstancesRequest runInstancesRequest =
new RunInstancesRequest().withImageId(amiId).withInstanceType(size).withKeyName(keyPair)
.withMinCount(1).withSecurityGroupIds(securityGroupId).withMaxCount(numBoxes);
AmazonE... | class class_name[name] begin[{]
method[create, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[RunInstancesRequest], runInstancesRequest]
local_variable[type[AmazonEC2], ec2]
call[ec2.setRegion, parameter[call[com.amazonaws.regions.Region.getRegion... | Keyword[public] Keyword[void] identifier[create] operator[SEP] operator[SEP] {
identifier[RunInstancesRequest] identifier[runInstancesRequest] operator[=] Keyword[new] identifier[RunInstancesRequest] operator[SEP] operator[SEP] operator[SEP] identifier[withImageId] operator[SEP] identifier[amiId] operator[SEP] o... |
public Geometry toGeometry(GoogleMapShape shape) {
Geometry geometry = null;
Object shapeObject = shape.getShape();
switch (shape.getGeometryType()) {
case POINT:
LatLng point = null;
switch (shape.getShapeType()) {
case LAT_LNG:... | class class_name[name] begin[{]
method[toGeometry, return_type[type[Geometry]], modifier[public], parameter[shape]] begin[{]
local_variable[type[Geometry], geometry]
local_variable[type[Object], shapeObject]
SwitchStatement(cases=[SwitchStatementCase(case=['POINT'], statements=[LocalVar... | Keyword[public] identifier[Geometry] identifier[toGeometry] operator[SEP] identifier[GoogleMapShape] identifier[shape] operator[SEP] {
identifier[Geometry] identifier[geometry] operator[=] Other[null] operator[SEP] identifier[Object] identifier[shapeObject] operator[=] identifier[shape] operator[SEP] identifier[... |
public NotificationChain basicSetRight(Keyword newRight, NotificationChain msgs) {
Keyword oldRight = right;
right = newRight;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, XtextPackage.CHARACTER_RANGE__RIGHT, oldRight, newRight);
if (msgs == n... | class class_name[name] begin[{]
method[basicSetRight, return_type[type[NotificationChain]], modifier[public], parameter[newRight, msgs]] begin[{]
local_variable[type[Keyword], oldRight]
assign[member[.right], member[.newRight]]
if[call[.eNotificationRequired, parameter[]... | Keyword[public] identifier[NotificationChain] identifier[basicSetRight] operator[SEP] identifier[Keyword] identifier[newRight] , identifier[NotificationChain] identifier[msgs] operator[SEP] {
identifier[Keyword] identifier[oldRight] operator[=] identifier[right] operator[SEP] identifier[right] operator[=] ident... |
public void setCustomTargetingSegment(com.google.api.ads.admanager.axis.v201902.CustomCriteria[] customTargetingSegment) {
this.customTargetingSegment = customTargetingSegment;
} | class class_name[name] begin[{]
method[setCustomTargetingSegment, return_type[void], modifier[public], parameter[customTargetingSegment]] begin[{]
assign[THIS[member[None.customTargetingSegment]], member[.customTargetingSegment]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setCustomTargetingSegment] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201902] operator[SEP] identifier[Cus... |
@Override
protected Expression instantiate(Object oldInstance, Encoder enc)
{
if (oldInstance instanceof Character)
{
return new Expression(oldInstance, oldInstance.toString(), "charAt", new Object[] { Integer.valueOf(0) }); //$NON-NLS-1$
}
return new Expression(oldInstance, oldInstance.getClass(), "new", ... | class class_name[name] begin[{]
method[instantiate, return_type[type[Expression]], modifier[protected], parameter[oldInstance, enc]] begin[{]
if[binary_operation[member[.oldInstance], instanceof, type[Character]]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=oldIns... | annotation[@] identifier[Override] Keyword[protected] identifier[Expression] identifier[instantiate] operator[SEP] identifier[Object] identifier[oldInstance] , identifier[Encoder] identifier[enc] operator[SEP] {
Keyword[if] operator[SEP] identifier[oldInstance] Keyword[instanceof] identifier[Character] operator... |
public static List<Tuple2<Se3_F64,Vector3D_F64>> decomposeHomography( DMatrixRMaj H ) {
DecomposeHomography d = new DecomposeHomography();
d.decompose(H);
List<Vector3D_F64> solutionsN = d.getSolutionsN();
List<Se3_F64> solutionsSe = d.getSolutionsSE();
List<Tuple2<Se3_F64,Vector3D_F64>> ret = new ArrayLis... | class class_name[name] begin[{]
method[decomposeHomography, return_type[type[List]], modifier[public static], parameter[H]] begin[{]
local_variable[type[DecomposeHomography], d]
call[d.decompose, parameter[member[.H]]]
local_variable[type[List], solutionsN]
local_variabl... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Tuple2] operator[<] identifier[Se3_F64] , identifier[Vector3D_F64] operator[>] operator[>] identifier[decomposeHomography] operator[SEP] identifier[DMatrixRMaj] identifier[H] operator[SEP] {
identifier[DecomposeHomography] identifier[d] ope... |
public int bindShader(GVRContext context, GVRShaderData material, String vertexDesc)
{
String signature = getClass().getSimpleName();
GVRShaderManager shaderManager = context.getShaderManager();
synchronized (shaderManager)
{
int nativeShader = shaderManager.getShader(si... | class class_name[name] begin[{]
method[bindShader, return_type[type[int]], modifier[public], parameter[context, material, vertexDesc]] begin[{]
local_variable[type[String], signature]
local_variable[type[GVRShaderManager], shaderManager]
SYNCHRONIZED[member[.shaderManager]] BEGI... | Keyword[public] Keyword[int] identifier[bindShader] operator[SEP] identifier[GVRContext] identifier[context] , identifier[GVRShaderData] identifier[material] , identifier[String] identifier[vertexDesc] operator[SEP] {
identifier[String] identifier[signature] operator[=] identifier[getClass] operator[SEP] opera... |
static Map<Method, Setter> toSetters(SetterFactory setterFactory,
Target<?> target,
Set<Method> methods) {
Map<Method, Setter> result = new LinkedHashMap<Method, Setter>();
for (Method method : methods) {
method.setAccessible(tr... | class class_name[name] begin[{]
method[toSetters, return_type[type[Map]], modifier[static], parameter[setterFactory, target, methods]] begin[{]
local_variable[type[Map], result]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[L... | Keyword[static] identifier[Map] operator[<] identifier[Method] , identifier[Setter] operator[>] identifier[toSetters] operator[SEP] identifier[SetterFactory] identifier[setterFactory] , identifier[Target] operator[<] operator[?] operator[>] identifier[target] , identifier[Set] operator[<] identifier[Method] operator... |
public void setParentKetMetadata(ParentKeyMetadata parentKeyMetadata) {
if (this.parentKeyMetadata != null) {
String format = "Class %s has two fields, %s and %s marked with %s annotation. Only one "
+ "field can be marked as ParentKey. ";
String message = String.format(format, entityClass.get... | class class_name[name] begin[{]
method[setParentKetMetadata, return_type[void], modifier[public], parameter[parentKeyMetadata]] begin[{]
if[binary_operation[THIS[member[None.parentKeyMetadata]], !=, literal[null]]] begin[{]
local_variable[type[String], format]
local_vari... | Keyword[public] Keyword[void] identifier[setParentKetMetadata] operator[SEP] identifier[ParentKeyMetadata] identifier[parentKeyMetadata] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[parentKeyMetadata] operator[!=] Other[null] operator[SEP] {
identifier[String] ident... |
private void HelperRGB(float red, float green, float blue) {
PdfXConformanceImp.checkPDFXConformance(writer, PdfXConformanceImp.PDFXKEY_RGB, null);
if (red < 0)
red = 0.0f;
else if (red > 1.0f)
red = 1.0f;
if (green < 0)
green = 0.0f;
else if (gre... | class class_name[name] begin[{]
method[HelperRGB, return_type[void], modifier[private], parameter[red, green, blue]] begin[{]
call[PdfXConformanceImp.checkPDFXConformance, parameter[member[.writer], member[PdfXConformanceImp.PDFXKEY_RGB], literal[null]]]
if[binary_operation[memb... | Keyword[private] Keyword[void] identifier[HelperRGB] operator[SEP] Keyword[float] identifier[red] , Keyword[float] identifier[green] , Keyword[float] identifier[blue] operator[SEP] {
identifier[PdfXConformanceImp] operator[SEP] identifier[checkPDFXConformance] operator[SEP] identifier[writer] , identifier[Pdf... |
private PathElement[] getRangeShapeSafely(int start, int end) {
PathElement[] shape;
if (end <= paragraph.length()) {
// selection w/o newline char
shape = getRangeShape(start, end);
} else {
// Selection includes a newline character.
if (paragraph... | class class_name[name] begin[{]
method[getRangeShapeSafely, return_type[type[PathElement]], modifier[private], parameter[start, end]] begin[{]
local_variable[type[PathElement], shape]
if[binary_operation[member[.end], <=, call[paragraph.length, parameter[]]]] begin[{]
... | Keyword[private] identifier[PathElement] operator[SEP] operator[SEP] identifier[getRangeShapeSafely] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
identifier[PathElement] operator[SEP] operator[SEP] identifier[shape] operator[SEP] Keyword[if] operator[SEP] identifie... |
boolean run(Iterable<? extends Archive> archives,
Map<Location, Archive> locationMap)
{
this.locationToArchive.putAll(locationMap);
// traverse and analyze all dependencies
for (Archive archive : archives) {
Dependences deps = new Dependences(archive, type);
... | class class_name[name] begin[{]
method[run, return_type[type[boolean]], modifier[default], parameter[archives, locationMap]] begin[{]
THIS[member[None.locationToArchive]call[None.putAll, parameter[member[.locationMap]]]]
ForStatement(body=BlockStatement(label=None, statements=[LocalVari... | Keyword[boolean] identifier[run] operator[SEP] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[Archive] operator[>] identifier[archives] , identifier[Map] operator[<] identifier[Location] , identifier[Archive] operator[>] identifier[locationMap] operator[SEP] {
Keyword[this] operator[S... |
public HttpResponse invoke(String uri, String payload, HttpMethod method, Map<String, String> headers) {
HttpResponse result = null;
String url = directoryAddresses + uri;
try {
if (method == HttpMethod.PUT) {
result = HttpUtils.put(url, payload, headers);
... | class class_name[name] begin[{]
method[invoke, return_type[type[HttpResponse]], modifier[public], parameter[uri, payload, method, headers]] begin[{]
local_variable[type[HttpResponse], result]
local_variable[type[String], url]
TryStatement(block=[IfStatement(condition=BinaryOperation(ope... | Keyword[public] identifier[HttpResponse] identifier[invoke] operator[SEP] identifier[String] identifier[uri] , identifier[String] identifier[payload] , identifier[HttpMethod] identifier[method] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[headers] operator[SEP] {
... |
private int[] fetchDatabaseNameRangeIndexFromURLForH2FileMode(String url) {
int fileLabelIndex = url.indexOf(FILE_MODE_FLAG);
int parameterLabelIndex = url.indexOf(";", fileLabelIndex);
if (parameterLabelIndex == -1) {
parameterLabelIndex = url.length();
}
if (fileLabelIndex != -1) {
re... | class class_name[name] begin[{]
method[fetchDatabaseNameRangeIndexFromURLForH2FileMode, return_type[type[int]], modifier[private], parameter[url]] begin[{]
local_variable[type[int], fileLabelIndex]
local_variable[type[int], parameterLabelIndex]
if[binary_operation[member[.parame... | Keyword[private] Keyword[int] operator[SEP] operator[SEP] identifier[fetchDatabaseNameRangeIndexFromURLForH2FileMode] operator[SEP] identifier[String] identifier[url] operator[SEP] {
Keyword[int] identifier[fileLabelIndex] operator[=] identifier[url] operator[SEP] identifier[indexOf] operator[SEP] identifier[FIL... |
@Override
public RemoveTagsFromVaultResult removeTagsFromVault(RemoveTagsFromVaultRequest request) {
request = beforeClientExecution(request);
return executeRemoveTagsFromVault(request);
} | class class_name[name] begin[{]
method[removeTagsFromVault, return_type[type[RemoveTagsFromVaultResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeRemoveTagsFromVault, parameter... | annotation[@] identifier[Override] Keyword[public] identifier[RemoveTagsFromVaultResult] identifier[removeTagsFromVault] operator[SEP] identifier[RemoveTagsFromVaultRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ope... |
protected void setSyncConfig(SyncToolConfig syncConfig) {
this.syncConfig = syncConfig;
this.syncConfig.setVersion(version);
File exclusionListFile = this.syncConfig.getExcludeList();
if (exclusionListFile != null) {
this.fileExclusionManager = new FileExclusionManager(exclus... | class class_name[name] begin[{]
method[setSyncConfig, return_type[void], modifier[protected], parameter[syncConfig]] begin[{]
assign[THIS[member[None.syncConfig]], member[.syncConfig]]
THIS[member[None.syncConfig]call[None.setVersion, parameter[member[.version]]]]
local_... | Keyword[protected] Keyword[void] identifier[setSyncConfig] operator[SEP] identifier[SyncToolConfig] identifier[syncConfig] operator[SEP] {
Keyword[this] operator[SEP] identifier[syncConfig] operator[=] identifier[syncConfig] operator[SEP] Keyword[this] operator[SEP] identifier[syncConfig] operator[SEP] identifie... |
@Override
public synchronized void run() {
try {
// do the rename operation
m_mergePages.actionMerge(getReport());
} catch (Exception e) {
getReport().println(e);
if (LOG.isErrorEnabled()) {
LOG.error(e.getLocalizedMessage());
... | class class_name[name] begin[{]
method[run, return_type[void], modifier[synchronized public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getReport, postfix_operators=[], prefix_operators=[], qualifier=, sele... | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[run] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[m_mergePages] operator[SEP] identifier[actionMerge] operator[SEP] identifier[getReport] operator[SEP] operator[SEP] operator[SEP] operator[SEP]... |
public static Index getSharedIndex() {
if (ddb == null) {
getClient();
}
try {
Table t = ddb.getTable(getTableNameForAppid(SHARED_TABLE));
if (t != null) {
return t.getIndex(getSharedIndexName());
}
} catch (Exception e) {
logger.info("Could not get shared index: {}.", e.getMessage());
}
... | class class_name[name] begin[{]
method[getSharedIndex, return_type[type[Index]], modifier[public static], parameter[]] begin[{]
if[binary_operation[member[.ddb], ==, literal[null]]] begin[{]
call[.getClient, parameter[]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] identifier[Index] identifier[getSharedIndex] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ddb] operator[==] Other[null] operator[SEP] {
identifier[getClient] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[try] {
identi... |
public static IntraMDWMessenger newIntraMDWMessenger(String serverSpec)
throws NamingException {
if (serverSpec==null || serverSpec.equals("@")) {
if (internalMessenger.equals(RMI))
return new IntraMDWMessengerRmi(null);
else if (internalMessenger.equals(JMS))
... | class class_name[name] begin[{]
method[newIntraMDWMessenger, return_type[type[IntraMDWMessenger]], modifier[public static], parameter[serverSpec]] begin[{]
if[binary_operation[binary_operation[member[.serverSpec], ==, literal[null]], ||, call[serverSpec.equals, parameter[literal["@"]]]]] begin[... | Keyword[public] Keyword[static] identifier[IntraMDWMessenger] identifier[newIntraMDWMessenger] operator[SEP] identifier[String] identifier[serverSpec] operator[SEP] Keyword[throws] identifier[NamingException] {
Keyword[if] operator[SEP] identifier[serverSpec] operator[==] Other[null] operator[||] identifier[serv... |
public void init(EntityConfig config) {
this.response = (Phrase) config.getValue(SOURCE);
this.header_name = (Phrase) config.getValue(HEADER_NAME);
this.header_value = (Phrase) config.getValue(HEADER_VALUE);
} | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[config]] begin[{]
assign[THIS[member[None.response]], Cast(expression=MethodInvocation(arguments=[MemberReference(member=SOURCE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], mem... | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[EntityConfig] identifier[config] operator[SEP] {
Keyword[this] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[Phrase] operator[SEP] identifier[config] operator[SEP] identifier[getValue] operator[SEP] identifier[SOURC... |
public static Date toDate(final String pString, final DateFormat pFormat) {
try {
synchronized (pFormat) {
// Parse date using given format
return pFormat.parse(pString);
}
}
catch (ParseException pe) {
// Wrap in Runtim... | class class_name[name] begin[{]
method[toDate, return_type[type[Date]], modifier[public static], parameter[pString, pFormat]] begin[{]
TryStatement(block=[SynchronizedStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=pString, postfix_operators=[], prefix_ope... | Keyword[public] Keyword[static] identifier[Date] identifier[toDate] operator[SEP] Keyword[final] identifier[String] identifier[pString] , Keyword[final] identifier[DateFormat] identifier[pFormat] operator[SEP] {
Keyword[try] {
Keyword[synchronized] operator[SEP] identifier[pFormat] operator[SEP] {
... |
public boolean delete(Marker marker) {
boolean deleted = false;
if (contains(marker)) {
deleted = true;
ShapeMarkers shapeMarkers = shapeMarkersMap.remove(marker.getId());
if (shapeMarkers != null) {
shapeMarkers.delete(marker);
}
... | class class_name[name] begin[{]
method[delete, return_type[type[boolean]], modifier[public], parameter[marker]] begin[{]
local_variable[type[boolean], deleted]
if[call[.contains, parameter[member[.marker]]]] begin[{]
assign[member[.deleted], literal[true]]
... | Keyword[public] Keyword[boolean] identifier[delete] operator[SEP] identifier[Marker] identifier[marker] operator[SEP] {
Keyword[boolean] identifier[deleted] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[contains] operator[SEP] identifier[marker] operator[SEP] operator[SEP] {
... |
protected int indexFirstOf(char[] s, char delim, int offset) {
if (s == null || s.length == 0) {
return -1;
}
// check boundaries
if (offset < 0) {
offset = 0;
} else if (offset > s.length) {
return -1;
}
for (int i = offset; i ... | class class_name[name] begin[{]
method[indexFirstOf, return_type[type[int]], modifier[protected], parameter[s, delim, offset]] begin[{]
if[binary_operation[binary_operation[member[.s], ==, literal[null]], ||, binary_operation[member[s.length], ==, literal[0]]]] begin[{]
return[liter... | Keyword[protected] Keyword[int] identifier[indexFirstOf] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[s] , Keyword[char] identifier[delim] , Keyword[int] identifier[offset] operator[SEP] {
Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[||] identifier[s] operator... |
public static JPanel makeHBox (Policy policy, Justification justification)
{
return new JPanel(new HGroupLayout(policy, justification));
} | class class_name[name] begin[{]
method[makeHBox, return_type[type[JPanel]], modifier[public static], parameter[policy, justification]] begin[{]
return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=policy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Mem... | Keyword[public] Keyword[static] identifier[JPanel] identifier[makeHBox] operator[SEP] identifier[Policy] identifier[policy] , identifier[Justification] identifier[justification] operator[SEP] {
Keyword[return] Keyword[new] identifier[JPanel] operator[SEP] Keyword[new] identifier[HGroupLayout] operator[SEP] iden... |
public <T extends MPBase> T getByIndex(int index) {
T resource = (T) _resourceArray.get(index);
return resource;
} | class class_name[name] begin[{]
method[getByIndex, return_type[type[T]], modifier[public], parameter[index]] begin[{]
local_variable[type[T], resource]
return[member[.resource]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[MPBase] operator[>] identifier[T] identifier[getByIndex] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
identifier[T] identifier[resource] operator[=] operator[SEP] identifier[T] operator[SEP] identifier[_resourceArray] operator[... |
private void initGUI() {
Panel pQuery = new Panel();
Panel pCommand = new Panel();
// define a Panel pCard which takes four different cards/views:
// tree of tables, command SQL text area, result window and an editor/input form
pCard = new Panel();
layoutCard = n... | class class_name[name] begin[{]
method[initGUI, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[Panel], pQuery]
local_variable[type[Panel], pCommand]
assign[member[.pCard], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, pos... | Keyword[private] Keyword[void] identifier[initGUI] operator[SEP] operator[SEP] {
identifier[Panel] identifier[pQuery] operator[=] Keyword[new] identifier[Panel] operator[SEP] operator[SEP] operator[SEP] identifier[Panel] identifier[pCommand] operator[=] Keyword[new] identifier[Panel] operator[SEP] operator[SEP] ... |
public static XmlWebApplicationContext getAppContext(Page page) {
return page == null ? null : (XmlWebApplicationContext) page.getAttribute(APP_CONTEXT_ATTRIB);
} | class class_name[name] begin[{]
method[getAppContext, return_type[type[XmlWebApplicationContext]], modifier[public static], parameter[page]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=page, postfix_operators=[], prefix_operators=[], qualifier=, selectors... | Keyword[public] Keyword[static] identifier[XmlWebApplicationContext] identifier[getAppContext] operator[SEP] identifier[Page] identifier[page] operator[SEP] {
Keyword[return] identifier[page] operator[==] Other[null] operator[?] Other[null] operator[:] operator[SEP] identifier[XmlWebApplicationContext] operator... |
public static ComponentsMultiThread getComponentsMultiThread() {
TransactionLogger instance = getInstance();
if (instance == null) {
return null;
}
return instance.componentsMultiThread;
} | class class_name[name] begin[{]
method[getComponentsMultiThread, return_type[type[ComponentsMultiThread]], modifier[public static], parameter[]] begin[{]
local_variable[type[TransactionLogger], instance]
if[binary_operation[member[.instance], ==, literal[null]]] begin[{]
ret... | Keyword[public] Keyword[static] identifier[ComponentsMultiThread] identifier[getComponentsMultiThread] operator[SEP] operator[SEP] {
identifier[TransactionLogger] identifier[instance] operator[=] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[instance] oper... |
protected ThirdPartyAlpnNegotiator tryToRegisterAlpnNegotiator(SSLEngine engine, SSLConnectionLink link, boolean useAlpn) {
if (isNativeAlpnActive()) {
if (useAlpn) {
registerNativeAlpn(engine);
}
} else if (isIbmAlpnActive()) {
registerIbmAlpn(engine,... | class class_name[name] begin[{]
method[tryToRegisterAlpnNegotiator, return_type[type[ThirdPartyAlpnNegotiator]], modifier[protected], parameter[engine, link, useAlpn]] begin[{]
if[call[.isNativeAlpnActive, parameter[]]] begin[{]
if[member[.useAlpn]] begin[{]
... | Keyword[protected] identifier[ThirdPartyAlpnNegotiator] identifier[tryToRegisterAlpnNegotiator] operator[SEP] identifier[SSLEngine] identifier[engine] , identifier[SSLConnectionLink] identifier[link] , Keyword[boolean] identifier[useAlpn] operator[SEP] {
Keyword[if] operator[SEP] identifier[isNativeAlpnActive]... |
Optional<PeriodForecast> getWidestFitPeriodForecast(ZonedDateTime from) {
if (from == null) {
return Optional.empty();
}
return getWidestFitScoreForecast(from).map(ScoreForecast::getPeriodForecast);
} | class class_name[name] begin[{]
method[getWidestFitPeriodForecast, return_type[type[Optional]], modifier[default], parameter[from]] begin[{]
if[binary_operation[member[.from], ==, literal[null]]] begin[{]
return[call[Optional.empty, parameter[]]]
else begin[{]
None
e... | identifier[Optional] operator[<] identifier[PeriodForecast] operator[>] identifier[getWidestFitPeriodForecast] operator[SEP] identifier[ZonedDateTime] identifier[from] operator[SEP] {
Keyword[if] operator[SEP] identifier[from] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[Optiona... |
public static void upto(Date self, Date to, Closure closure) {
if (self.compareTo(to) <= 0) {
for (Date i = (Date) self.clone(); i.compareTo(to) <= 0; i = next(i)) {
closure.call(i);
}
} else
throw new GroovyRuntimeException("The argument (" + to +
... | class class_name[name] begin[{]
method[upto, return_type[void], modifier[public static], parameter[self, to, closure]] begin[{]
if[binary_operation[call[self.compareTo, parameter[member[.to]]], <=, literal[0]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[Statem... | Keyword[public] Keyword[static] Keyword[void] identifier[upto] operator[SEP] identifier[Date] identifier[self] , identifier[Date] identifier[to] , identifier[Closure] identifier[closure] operator[SEP] {
Keyword[if] operator[SEP] identifier[self] operator[SEP] identifier[compareTo] operator[SEP] identifier[to] ... |
@Override
public List getActiveOutboundMEtoMEConversations() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "getActiveOutboundMEtoMEConversations");
List convs = null;
if (connectionTracker != null) {
convs = connectionTracke... | class class_name[name] begin[{]
method[getActiveOutboundMEtoMEConversations, return_type[type[List]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.ent... | annotation[@] identifier[Override] Keyword[public] identifier[List] identifier[getActiveOutboundMEtoMEConversations] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SE... |
protected void setTimerState(TimerState state, Thread thread) {
assert ((state == TimerState.IN_TIMEOUT || state == TimerState.RETRY_TIMEOUT) && thread != null) || thread == null : "Invalid to set timer state " + state + " with executing Thread " + thread;
this.timerState = state;
this.executing... | class class_name[name] begin[{]
method[setTimerState, return_type[void], modifier[protected], parameter[state, thread]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=state, postfix_operators=... | Keyword[protected] Keyword[void] identifier[setTimerState] operator[SEP] identifier[TimerState] identifier[state] , identifier[Thread] identifier[thread] operator[SEP] {
Keyword[assert] operator[SEP] operator[SEP] identifier[state] operator[==] identifier[TimerState] operator[SEP] identifier[IN_TIMEOUT] operato... |
public static RiverInfo getRiverInfo( List<SimpleFeature> riverPointsFeatures, List<SimpleFeature> sectionFeatures,
List<SimpleFeature> sectionPointsFeatures ) {
RiverInfo riverInfo = new RiverInfo();
for( SimpleFeature riverPointFeature : riverPointsFeatures ) {
int sectionId =... | class class_name[name] begin[{]
method[getRiverInfo, return_type[type[RiverInfo]], modifier[public static], parameter[riverPointsFeatures, sectionFeatures, sectionPointsFeatures]] begin[{]
local_variable[type[RiverInfo], riverInfo]
ForStatement(body=BlockStatement(label=None, statements=[LocalV... | Keyword[public] Keyword[static] identifier[RiverInfo] identifier[getRiverInfo] operator[SEP] identifier[List] operator[<] identifier[SimpleFeature] operator[>] identifier[riverPointsFeatures] , identifier[List] operator[<] identifier[SimpleFeature] operator[>] identifier[sectionFeatures] , identifier[List] operator[<... |
public void setUnsuccessful(java.util.Collection<UnsuccessfulItem> unsuccessful) {
if (unsuccessful == null) {
this.unsuccessful = null;
return;
}
this.unsuccessful = new com.amazonaws.internal.SdkInternalList<UnsuccessfulItem>(unsuccessful);
} | class class_name[name] begin[{]
method[setUnsuccessful, return_type[void], modifier[public], parameter[unsuccessful]] begin[{]
if[binary_operation[member[.unsuccessful], ==, literal[null]]] begin[{]
assign[THIS[member[None.unsuccessful]], literal[null]]
retur... | Keyword[public] Keyword[void] identifier[setUnsuccessful] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[UnsuccessfulItem] operator[>] identifier[unsuccessful] operator[SEP] {
Keyword[if] operator[SEP] identifier[unsuccessful] operator[==... |
public void setData(InputStream in) throws IOException {
m_dirty = true;
FileOutputStream out = new FileOutputStream(m_dataFile);
byte[] buf = new byte[4096];
int i = 0;
m_size = 0;
while ((i = in.read(buf)) != -1) {
m_size += i;
out.write(buf, 0, ... | class class_name[name] begin[{]
method[setData, return_type[void], modifier[public], parameter[in]] begin[{]
assign[member[.m_dirty], literal[true]]
local_variable[type[FileOutputStream], out]
local_variable[type[byte], buf]
local_variable[type[int], i]
a... | Keyword[public] Keyword[void] identifier[setData] operator[SEP] identifier[InputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[m_dirty] operator[=] literal[boolean] operator[SEP] identifier[FileOutputStream] identifier[out] operator[=] Keyword[new] identifier[FileOutput... |
public static Classifier consume(File file) throws PMMLConversionException {
PMML pmml = null;
try {
if (isGzipped(file)) {
logger.debug("Consuming GZipped PMML file '{}'.", file.getAbsolutePath());
try (FileInputStream fis = new FileInputStream(file);
... | class class_name[name] begin[{]
method[consume, return_type[type[Classifier]], modifier[public static], parameter[file]] begin[{]
local_variable[type[PMML], pmml]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_oper... | Keyword[public] Keyword[static] identifier[Classifier] identifier[consume] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[PMMLConversionException] {
identifier[PMML] identifier[pmml] operator[=] Other[null] operator[SEP] Keyword[try] {
Keyword[if] operator[SEP... |
@Override
public Object evaluate(Map<String, ? extends Object> contextMap, LaContainer container, Class<?> resultType) {
if (parsed instanceof String) {
final Object hooked = hookPlainly((String) parsed, contextMap, container, resultType);
if (hooked != null) {
if (is... | class class_name[name] begin[{]
method[evaluate, return_type[type[Object]], modifier[public], parameter[contextMap, container, resultType]] begin[{]
if[binary_operation[member[.parsed], instanceof, type[String]]] begin[{]
local_variable[type[Object], hooked]
... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[evaluate] operator[SEP] identifier[Map] operator[<] identifier[String] , operator[?] Keyword[extends] identifier[Object] operator[>] identifier[contextMap] , identifier[LaContainer] identifier[container] , identifier[Class] operator[<] ... |
private void initializeThemePreference() {
Preference themePreference = findPreference(getString(R.string.theme_preference_key));
themePreference.setOnPreferenceChangeListener(createThemeChangeListener());
} | class class_name[name] begin[{]
method[initializeThemePreference, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[Preference], themePreference]
call[themePreference.setOnPreferenceChangeListener, parameter[call[.createThemeChangeListener, parameter[]]]]
... | Keyword[private] Keyword[void] identifier[initializeThemePreference] operator[SEP] operator[SEP] {
identifier[Preference] identifier[themePreference] operator[=] identifier[findPreference] operator[SEP] identifier[getString] operator[SEP] identifier[R] operator[SEP] identifier[string] operator[SEP] identifier[th... |
protected void broadcastServicesChanged(boolean local) {
Tree message = new Tree();
message.put("localService", true);
eventbus.broadcast("$services.changed", message, null, true);
} | class class_name[name] begin[{]
method[broadcastServicesChanged, return_type[void], modifier[protected], parameter[local]] begin[{]
local_variable[type[Tree], message]
call[message.put, parameter[literal["localService"], literal[true]]]
call[eventbus.broadcast, parameter... | Keyword[protected] Keyword[void] identifier[broadcastServicesChanged] operator[SEP] Keyword[boolean] identifier[local] operator[SEP] {
identifier[Tree] identifier[message] operator[=] Keyword[new] identifier[Tree] operator[SEP] operator[SEP] operator[SEP] identifier[message] operator[SEP] identifier[put] operato... |
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<Empty, OperationMetadata> deployModelAsync(String name) {
DeployModelRequest request = DeployModelRequest.newBuilder().setName(name).build();
return deployModelAsync(request... | class class_name[name] begin[{]
method[deployModelAsync, return_type[type[OperationFuture]], modifier[final public], parameter[name]] begin[{]
local_variable[type[DeployModelRequest], request]
return[call[.deployModelAsync, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[Empty] , identifier[OperationMetadata] operator[>] identifier[deployModelAsync] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identi... |
public Iterable<StopTime> getOrderedStopTimesForTrip (String trip_id) {
Map<Fun.Tuple2, StopTime> tripStopTimes =
stop_times.subMap(
Fun.t2(trip_id, null),
Fun.t2(trip_id, Fun.HI)
);
return tripStopTimes.values();
} | class class_name[name] begin[{]
method[getOrderedStopTimesForTrip, return_type[type[Iterable]], modifier[public], parameter[trip_id]] begin[{]
local_variable[type[Map], tripStopTimes]
return[call[tripStopTimes.values, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Iterable] operator[<] identifier[StopTime] operator[>] identifier[getOrderedStopTimesForTrip] operator[SEP] identifier[String] identifier[trip_id] operator[SEP] {
identifier[Map] operator[<] identifier[Fun] operator[SEP] identifier[Tuple2] , identifier[StopTime] operator[>] identifier... |
public static Long getLongProperty(Map<String, Object> properties, String key, long defaultVal) {
if (properties == null) {
return defaultVal;
}
Object propertyVal = properties.get(key);
if (propertyVal == null) {
return defaultVal;
}
if (!(pro... | class class_name[name] begin[{]
method[getLongProperty, return_type[type[Long]], modifier[public static], parameter[properties, key, defaultVal]] begin[{]
if[binary_operation[member[.properties], ==, literal[null]]] begin[{]
return[member[.defaultVal]]
else begin[{]
None
... | Keyword[public] Keyword[static] identifier[Long] identifier[getLongProperty] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[properties] , identifier[String] identifier[key] , Keyword[long] identifier[defaultVal] operator[SEP] {
Keyword[if] operator[SEP... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.