code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
@Override
public void postDelayed(Object event, long delayMillis) {
if (event == null) {
throw new NullPointerException("Event must not be null");
}
Handler handler = getMainHandlerNotNull();
if (handler.getLooper().getThread().isAlive()) {
mImpl.postDelayed(event, delayMillis, handler);
... | class class_name[name] begin[{]
method[postDelayed, return_type[void], modifier[public], parameter[event, delayMillis]] begin[{]
if[binary_operation[member[.event], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_op... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[postDelayed] operator[SEP] identifier[Object] identifier[event] , Keyword[long] identifier[delayMillis] operator[SEP] {
Keyword[if] operator[SEP] identifier[event] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keywo... |
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case SarlPackage.SARL_EVENT__EXTENDS:
return extends_ != null;
}
return super.eIsSet(featureID);
} | class class_name[name] begin[{]
method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=SARL_EVENT__EXTENDS, postfix_operators=[], prefix_operators=[], qualifier=SarlPackage, selectors=[])], stat... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[SarlPackage] operator[SEP] identifier[SARL_EVENT__EXTENDS... |
public ListRemoteAccessSessionsResult withRemoteAccessSessions(RemoteAccessSession... remoteAccessSessions) {
if (this.remoteAccessSessions == null) {
setRemoteAccessSessions(new java.util.ArrayList<RemoteAccessSession>(remoteAccessSessions.length));
}
for (RemoteAccessSession ele : ... | class class_name[name] begin[{]
method[withRemoteAccessSessions, return_type[type[ListRemoteAccessSessionsResult]], modifier[public], parameter[remoteAccessSessions]] begin[{]
if[binary_operation[THIS[member[None.remoteAccessSessions]], ==, literal[null]]] begin[{]
call[... | Keyword[public] identifier[ListRemoteAccessSessionsResult] identifier[withRemoteAccessSessions] operator[SEP] identifier[RemoteAccessSession] operator[...] identifier[remoteAccessSessions] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[remoteAccessSessions] operator[==] Other[nu... |
public final void entryRuleTerminalGroup() throws RecognitionException {
try {
// InternalXtext.g:1146:1: ( ruleTerminalGroup EOF )
// InternalXtext.g:1147:1: ruleTerminalGroup EOF
{
before(grammarAccess.getTerminalGroupRule());
pushFollow(FollowSets... | class class_name[name] begin[{]
method[entryRuleTerminalGroup, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTerminalGroupRul... | Keyword[public] Keyword[final] Keyword[void] identifier[entryRuleTerminalGroup] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
{
identifier[before] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getTerminalGroupRule] opera... |
public void marshall(OutputSource outputSource, ProtocolMarshaller protocolMarshaller) {
if (outputSource == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(outputSource.getOutputSourceId(), OUTPUTSOU... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[outputSource, protocolMarshaller]] begin[{]
if[binary_operation[member[.outputSource], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_opera... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[OutputSource] identifier[outputSource] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[outputSource] operator[==] Other[null] operator[SEP] {
Keyword[throw]... |
@SuppressWarnings("unused")
private static String parseToolProfileInternal(List<Properties> theTools, Properties info, JSONObject jsonObject)
{
Object o = null;
JSONObject tool_profile = (JSONObject) jsonObject.get("tool_profile");
if ( tool_profile == null ) {
return "JSON missing tool_profile";
}
JSON... | class class_name[name] begin[{]
method[parseToolProfileInternal, return_type[type[String]], modifier[private static], parameter[theTools, info, jsonObject]] begin[{]
local_variable[type[Object], o]
local_variable[type[JSONObject], tool_profile]
if[binary_operation[member[.tool_p... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] identifier[String] identifier[parseToolProfileInternal] operator[SEP] identifier[List] operator[<] identifier[Properties] operator[>] identifier[theTools] , identifier[Properties] identifier[info] , ... |
private static Set<String> removeDecision(final LdapAttribute ldapConsent, final long decisionId) {
val result = new HashSet<String>();
if (ldapConsent.size() != 0) {
ldapConsent.getStringValues()
.stream()
.map(LdapConsentRepository::mapFromJson)
... | class class_name[name] begin[{]
method[removeDecision, return_type[type[Set]], modifier[private static], parameter[ldapConsent, decisionId]] begin[{]
local_variable[type[val], result]
if[binary_operation[call[ldapConsent.size, parameter[]], !=, literal[0]]] begin[{]
... | Keyword[private] Keyword[static] identifier[Set] operator[<] identifier[String] operator[>] identifier[removeDecision] operator[SEP] Keyword[final] identifier[LdapAttribute] identifier[ldapConsent] , Keyword[final] Keyword[long] identifier[decisionId] operator[SEP] {
identifier[val] identifier[result] operator[... |
static byte[] transcodeSignatureToJWS(final byte[] derSignature, int outputLength) throws GeneralSecurityException {
if (derSignature.length < 8 || derSignature[0] != 48) {
throw new GeneralSecurityException("Invalid ECDSA signature format");
}
int offset;
if (derSignature[1] > 0) {
offset = 2;
} else... | class class_name[name] begin[{]
method[transcodeSignatureToJWS, return_type[type[byte]], modifier[static], parameter[derSignature, outputLength]] begin[{]
if[binary_operation[binary_operation[member[derSignature.length], <, literal[8]], ||, binary_operation[member[.derSignature], !=, literal[48... | Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[transcodeSignatureToJWS] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[derSignature] , Keyword[int] identifier[outputLength] operator[SEP] Keyword[throws] identifier[GeneralSecurityException] {
Keyword[if] o... |
private String computeRequestMethod(Element e) {
for (AnnotationMirror am : e.getAnnotationMirrors()) {
final String typeString = am.getAnnotationType().toString();
if (typeString.endsWith(".GET")) {
return "GET";
} else if (typeString.endsWith(".PUT")) {
return "PUT";
} else... | class class_name[name] begin[{]
method[computeRequestMethod, return_type[type[String]], modifier[private], parameter[e]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation... | Keyword[private] identifier[String] identifier[computeRequestMethod] operator[SEP] identifier[Element] identifier[e] operator[SEP] {
Keyword[for] operator[SEP] identifier[AnnotationMirror] identifier[am] operator[:] identifier[e] operator[SEP] identifier[getAnnotationMirrors] operator[SEP] operator[SEP] operato... |
private void removeCacheByGroup(String msId, String mapperNameSpace,boolean removePkCache) {
//删除cachegroup关联缓存
String entityName = mapperNameRalateEntityNames.get(mapperNameSpace);
getCacheProvider().clearGroup(entityName,removePkCache);
logger.debug("_autocache_ method[{}] remove cache Group:{}",msId,enti... | class class_name[name] begin[{]
method[removeCacheByGroup, return_type[void], modifier[private], parameter[msId, mapperNameSpace, removePkCache]] begin[{]
local_variable[type[String], entityName]
call[.getCacheProvider, parameter[]]
call[logger.debug, parameter[literal["... | Keyword[private] Keyword[void] identifier[removeCacheByGroup] operator[SEP] identifier[String] identifier[msId] , identifier[String] identifier[mapperNameSpace] , Keyword[boolean] identifier[removePkCache] operator[SEP] {
identifier[String] identifier[entityName] operator[=] identifier[mapperNameRalateEntityNa... |
@Deprecated
public static Bundle parseUrl(String url) {
// hack to prevent MalformedURLException
url = url.replace("fbconnect", "http");
try {
URL u = new URL(url);
Bundle b = decodeUrl(u.getQuery());
b.putAll(decodeUrl(u.getRef()));
return b;
... | class class_name[name] begin[{]
method[parseUrl, return_type[type[Bundle]], modifier[public static], parameter[url]] begin[{]
assign[member[.url], call[url.replace, parameter[literal["fbconnect"], literal["http"]]]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarator... | annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[Bundle] identifier[parseUrl] operator[SEP] identifier[String] identifier[url] operator[SEP] {
identifier[url] operator[=] identifier[url] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP... |
public void setEmotions(java.util.Collection<Emotion> emotions) {
if (emotions == null) {
this.emotions = null;
return;
}
this.emotions = new java.util.ArrayList<Emotion>(emotions);
} | class class_name[name] begin[{]
method[setEmotions, return_type[void], modifier[public], parameter[emotions]] begin[{]
if[binary_operation[member[.emotions], ==, literal[null]]] begin[{]
assign[THIS[member[None.emotions]], literal[null]]
return[None]
... | Keyword[public] Keyword[void] identifier[setEmotions] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[Emotion] operator[>] identifier[emotions] operator[SEP] {
Keyword[if] operator[SEP] identifier[emotions] operator[==] Other[null] operato... |
public static RawQueryRequest jsonQuery(String jsonQuery, String bucket, String password, String contextId) {
return new RawQueryRequest(jsonQuery, bucket, bucket, password, null, contextId);
} | class class_name[name] begin[{]
method[jsonQuery, return_type[type[RawQueryRequest]], modifier[public static], parameter[jsonQuery, bucket, password, contextId]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=jsonQuery, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]... | Keyword[public] Keyword[static] identifier[RawQueryRequest] identifier[jsonQuery] operator[SEP] identifier[String] identifier[jsonQuery] , identifier[String] identifier[bucket] , identifier[String] identifier[password] , identifier[String] identifier[contextId] operator[SEP] {
Keyword[return] Keyword[new] ide... |
protected void checkThreshold (final int nCount) throws IOException
{
if (!m_bThresholdExceeded && (m_nWritten + nCount > m_nThreshold))
{
m_bThresholdExceeded = true;
onThresholdReached ();
}
} | class class_name[name] begin[{]
method[checkThreshold, return_type[void], modifier[protected], parameter[nCount]] begin[{]
if[binary_operation[member[.m_bThresholdExceeded], &&, binary_operation[binary_operation[member[.m_nWritten], +, member[.nCount]], >, member[.m_nThreshold]]]] begin[{]
... | Keyword[protected] Keyword[void] identifier[checkThreshold] operator[SEP] Keyword[final] Keyword[int] identifier[nCount] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[m_bThresholdExceeded] operator[&&] operator[SEP] identifier[m_nWritten] operator[+] ide... |
public ParserToken consume(@NonNull ParserTokenType expectedType) throws ParseException {
ParserToken next = consume();
if (next == null || !expectedType.isInstance(next.type)) {
throw new ParseException("Expected the next token to be of type " + expectedType + ", but found " + (next == null
... | class class_name[name] begin[{]
method[consume, return_type[type[ParserToken]], modifier[public], parameter[expectedType]] begin[{]
local_variable[type[ParserToken], next]
if[binary_operation[binary_operation[member[.next], ==, literal[null]], ||, call[expectedType.isInstance, parameter... | Keyword[public] identifier[ParserToken] identifier[consume] operator[SEP] annotation[@] identifier[NonNull] identifier[ParserTokenType] identifier[expectedType] operator[SEP] Keyword[throws] identifier[ParseException] {
identifier[ParserToken] identifier[next] operator[=] identifier[consume] operator[SEP] operat... |
public Class getReqClass(String service, String methodName) {
String key = buildMethodKey(service, methodName);
Class reqClass = requestClassCache.get(key);
if (reqClass == null) {
// 读取接口里的方法参数和返回值
String interfaceClass = ConfigUniqueNameGenerator.getInterfaceName(servi... | class class_name[name] begin[{]
method[getReqClass, return_type[type[Class]], modifier[public], parameter[service, methodName]] begin[{]
local_variable[type[String], key]
local_variable[type[Class], reqClass]
if[binary_operation[member[.reqClass], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[Class] identifier[getReqClass] operator[SEP] identifier[String] identifier[service] , identifier[String] identifier[methodName] operator[SEP] {
identifier[String] identifier[key] operator[=] identifier[buildMethodKey] operator[SEP] identifier[service] , identifier[methodName] operato... |
@Override
public RemoveTargetsResult removeTargets(RemoveTargetsRequest request) {
request = beforeClientExecution(request);
return executeRemoveTargets(request);
} | class class_name[name] begin[{]
method[removeTargets, return_type[type[RemoveTargetsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeRemoveTargets, parameter[member[.request]]... | annotation[@] identifier[Override] Keyword[public] identifier[RemoveTargetsResult] identifier[removeTargets] operator[SEP] identifier[RemoveTargetsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operato... |
public int run() throws IOException {
ConfigCheckReport report = mMetaMasterClient.getConfigReport();
ConfigStatus configStatus = report.getConfigStatus();
if (configStatus == ConfigStatus.PASSED) {
// No errors or warnings to show
mPrintStream.println("No server-side configuration errors or war... | class class_name[name] begin[{]
method[run, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[ConfigCheckReport], report]
local_variable[type[ConfigStatus], configStatus]
if[binary_operation[member[.configStatus], ==, member[ConfigStatus.PASSED]... | Keyword[public] Keyword[int] identifier[run] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[ConfigCheckReport] identifier[report] operator[=] identifier[mMetaMasterClient] operator[SEP] identifier[getConfigReport] operator[SEP] operator[SEP] operator[SEP] identifier[ConfigStatus... |
private <R> void notifyHandlers() {
// the response may or may not exist at this point
response.forEach(t -> eventHandlers.stream().forEach(h -> h.notify(t)));
} | class class_name[name] begin[{]
method[notifyHandlers, return_type[void], modifier[private], parameter[]] begin[{]
call[response.forEach, parameter[LambdaExpression(body=MethodInvocation(arguments=[], member=stream, postfix_operators=[], prefix_operators=[], qualifier=eventHandlers, selectors=[... | Keyword[private] operator[<] identifier[R] operator[>] Keyword[void] identifier[notifyHandlers] operator[SEP] operator[SEP] {
identifier[response] operator[SEP] identifier[forEach] operator[SEP] identifier[t] operator[->] identifier[eventHandlers] operator[SEP] identifier[stream] operator[SEP] operator[SEP] oper... |
public String group(int group) {
ensureMatch();
int from = matchOffsets[group * 2];
int to = matchOffsets[(group * 2) + 1];
if (from == -1 || to == -1) {
return null;
} else {
return input.substring(from, to);
}
} | class class_name[name] begin[{]
method[group, return_type[type[String]], modifier[public], parameter[group]] begin[{]
call[.ensureMatch, parameter[]]
local_variable[type[int], from]
local_variable[type[int], to]
if[binary_operation[binary_operation[member[.from],... | Keyword[public] identifier[String] identifier[group] operator[SEP] Keyword[int] identifier[group] operator[SEP] {
identifier[ensureMatch] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[from] operator[=] identifier[matchOffsets] operator[SEP] identifier[group] operator[*] Other[2] operator[SEP]... |
@VisibleForTesting
public FedoraResource getResourceFromPath(final String externalPath) {
final Resource resource = translator().toDomain(externalPath);
final FedoraResource fedoraResource = translator().convert(resource);
if (fedoraResource instanceof Tombstone) {
final String ... | class class_name[name] begin[{]
method[getResourceFromPath, return_type[type[FedoraResource]], modifier[public], parameter[externalPath]] begin[{]
local_variable[type[Resource], resource]
local_variable[type[FedoraResource], fedoraResource]
if[binary_operation[member[.fedoraReso... | annotation[@] identifier[VisibleForTesting] Keyword[public] identifier[FedoraResource] identifier[getResourceFromPath] operator[SEP] Keyword[final] identifier[String] identifier[externalPath] operator[SEP] {
Keyword[final] identifier[Resource] identifier[resource] operator[=] identifier[translator] operator[SEP]... |
private Pair<Boolean, BlockStoreLocation> requestSpaceInternal(long blockId, long additionalBytes)
throws BlockDoesNotExistException {
// NOTE: a temp block is supposed to be visible for its own writer, unnecessary to acquire
// block lock here since no sharing
try (LockResource r = new LockResource(m... | class class_name[name] begin[{]
method[requestSpaceInternal, return_type[type[Pair]], modifier[private], parameter[blockId, additionalBytes]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Memb... | Keyword[private] identifier[Pair] operator[<] identifier[Boolean] , identifier[BlockStoreLocation] operator[>] identifier[requestSpaceInternal] operator[SEP] Keyword[long] identifier[blockId] , Keyword[long] identifier[additionalBytes] operator[SEP] Keyword[throws] identifier[BlockDoesNotExistException] {
Keyw... |
@Override
public void setEntityReference(EntityReference entityReference) {
if(entityReference instanceof ProteinReference || entityReference == null)
super.setEntityReference(entityReference);
else
throw new IllegalBioPAXArgumentException("setEntityReference failed: "
+ entityReference.getUri() + " is ... | class class_name[name] begin[{]
method[setEntityReference, return_type[void], modifier[public], parameter[entityReference]] begin[{]
if[binary_operation[binary_operation[member[.entityReference], instanceof, type[ProteinReference]], ||, binary_operation[member[.entityReference], ==, literal[nul... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setEntityReference] operator[SEP] identifier[EntityReference] identifier[entityReference] operator[SEP] {
Keyword[if] operator[SEP] identifier[entityReference] Keyword[instanceof] identifier[ProteinReference] operator[||] identifier[enti... |
protected R setCanDownload(boolean canDownload) {
JsonObject jsonPermissionsObject = getPermissionsJsonObject();
jsonPermissionsObject.add(BoxSharedLink.Permissions.FIELD_CAN_DOWNLOAD, canDownload);
BoxSharedLink.Permissions permissions = new BoxSharedLink.Permissions(jsonPermissionsObject);
... | class class_name[name] begin[{]
method[setCanDownload, return_type[type[R]], modifier[protected], parameter[canDownload]] begin[{]
local_variable[type[JsonObject], jsonPermissionsObject]
call[jsonPermissionsObject.add, parameter[member[BoxSharedLink.Permissions.FIELD_CAN_DOWNLOAD], memb... | Keyword[protected] identifier[R] identifier[setCanDownload] operator[SEP] Keyword[boolean] identifier[canDownload] operator[SEP] {
identifier[JsonObject] identifier[jsonPermissionsObject] operator[=] identifier[getPermissionsJsonObject] operator[SEP] operator[SEP] operator[SEP] identifier[jsonPermissionsObject] ... |
public void pinVisiblePanels() {
if (layout == Layout.FULL) {
getTabbedFull().pinVisibleTabs();
} else {
getTabbedSelect().pinVisibleTabs();
getTabbedWork().pinVisibleTabs();
getTabbedStatus().pinVisibleTabs();
}
} | class class_name[name] begin[{]
method[pinVisiblePanels, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.layout], ==, member[Layout.FULL]]] begin[{]
call[.getTabbedFull, parameter[]]
else begin[{]
cal... | Keyword[public] Keyword[void] identifier[pinVisiblePanels] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[layout] operator[==] identifier[Layout] operator[SEP] identifier[FULL] operator[SEP] {
identifier[getTabbedFull] operator[SEP] operator[SEP] operator[SEP] identifier[pinVisible... |
public static @Nullable BufferedImage read(@NotNull String imageFilePath) throws IOException {
checkNotNull(imageFilePath);
File imageFile = new File(imageFilePath);
if (!imageFile.isFile()) {
throw new IllegalArgumentException(format("The path <%s> does not belong to a file", imageFilePath));
}
... | class class_name[name] begin[{]
method[read, return_type[type[BufferedImage]], modifier[public static], parameter[imageFilePath]] begin[{]
call[.checkNotNull, parameter[member[.imageFilePath]]]
local_variable[type[File], imageFile]
if[call[imageFile.isFile, parameter[]]]... | Keyword[public] Keyword[static] annotation[@] identifier[Nullable] identifier[BufferedImage] identifier[read] operator[SEP] annotation[@] identifier[NotNull] identifier[String] identifier[imageFilePath] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[checkNotNull] operator[SEP] identifier[imag... |
public static OptionalThing<ActionExecute> findActionExecute(String actionName, String paramPath) {
return findActionMapping(actionName).map(mapping -> mapping.findActionExecute(paramPath));
} | class class_name[name] begin[{]
method[findActionExecute, return_type[type[OptionalThing]], modifier[public static], parameter[actionName, paramPath]] begin[{]
return[call[.findActionMapping, parameter[member[.actionName]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[OptionalThing] operator[<] identifier[ActionExecute] operator[>] identifier[findActionExecute] operator[SEP] identifier[String] identifier[actionName] , identifier[String] identifier[paramPath] operator[SEP] {
Keyword[return] identifier[findActionMapping] operator[SEP]... |
public static DBContext onlineInstance(String name) {
DB db = DBMaker
.fileDB(name)
.fileMmapEnableIfSupported()
.closeOnJvmShutdown()
.transactionEnable()
.make();
return new MapDBContext(db);
} | class class_name[name] begin[{]
method[onlineInstance, return_type[type[DBContext]], modifier[public static], parameter[name]] begin[{]
local_variable[type[DB], db]
return[ClassCreator(arguments=[MemberReference(member=db, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], b... | Keyword[public] Keyword[static] identifier[DBContext] identifier[onlineInstance] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[DB] identifier[db] operator[=] identifier[DBMaker] operator[SEP] identifier[fileDB] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[f... |
static DoublesUnionImpl directInstance(final int maxK, final WritableMemory dstMem) {
final DirectUpdateDoublesSketch sketch = DirectUpdateDoublesSketch.newInstance(maxK, dstMem);
final DoublesUnionImpl union = new DoublesUnionImpl(maxK);
union.maxK_ = maxK;
union.gadget_ = sketch;
return union;
} | class class_name[name] begin[{]
method[directInstance, return_type[type[DoublesUnionImpl]], modifier[static], parameter[maxK, dstMem]] begin[{]
local_variable[type[DirectUpdateDoublesSketch], sketch]
local_variable[type[DoublesUnionImpl], union]
assign[member[union.maxK_], membe... | Keyword[static] identifier[DoublesUnionImpl] identifier[directInstance] operator[SEP] Keyword[final] Keyword[int] identifier[maxK] , Keyword[final] identifier[WritableMemory] identifier[dstMem] operator[SEP] {
Keyword[final] identifier[DirectUpdateDoublesSketch] identifier[sketch] operator[=] identifier[DirectU... |
private Method findSupertypeMethod(Object o, String methodName, Class<?>[] types) {
Method matchingMethod = null;
Method[] methods = o.getClass().getDeclaredMethods();
methodloop:
for (Method method : methods) {
if (methodName.equals(method.getName())) {
Class<?>[] params = metho... | class class_name[name] begin[{]
method[findSupertypeMethod, return_type[type[Method]], modifier[private], parameter[o, methodName, types]] begin[{]
local_variable[type[Method], matchingMethod]
local_variable[type[Method], methods]
ForStatement(body=BlockStatement(label=None, statements=... | Keyword[private] identifier[Method] identifier[findSupertypeMethod] operator[SEP] identifier[Object] identifier[o] , identifier[String] identifier[methodName] , identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[types] operator[SEP] {
identifier[Method] identifier[matc... |
@Nonnull
public PreprocessorContext setSources(@Nonnull @MustNotContainNull final List<String> folderPaths) {
this.sources.clear();
this.sources.addAll(assertDoesntContainNull(folderPaths).stream().map(x -> new SourceFolder(this.baseDir, x)).collect(Collectors.toList()));
return this;
} | class class_name[name] begin[{]
method[setSources, return_type[type[PreprocessorContext]], modifier[public], parameter[folderPaths]] begin[{]
THIS[member[None.sources]call[None.clear, parameter[]]]
THIS[member[None.sources]call[None.addAll, parameter[call[.assertDoesntContainNul... | annotation[@] identifier[Nonnull] Keyword[public] identifier[PreprocessorContext] identifier[setSources] operator[SEP] annotation[@] identifier[Nonnull] annotation[@] identifier[MustNotContainNull] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[folderPaths] operator[SEP] {
... |
public TableModel addColumn(ColumnModel column) {
checkReadOnly();
DialectException.assureNotNull(column);
DialectException.assureNotEmpty(column.getColumnName(), "Column's columnName can not be empty");
column.setTableModel(this);
columns.add(column);
return this;
} | class class_name[name] begin[{]
method[addColumn, return_type[type[TableModel]], modifier[public], parameter[column]] begin[{]
call[.checkReadOnly, parameter[]]
call[DialectException.assureNotNull, parameter[member[.column]]]
call[DialectException.assureNotEmpty,... | Keyword[public] identifier[TableModel] identifier[addColumn] operator[SEP] identifier[ColumnModel] identifier[column] operator[SEP] {
identifier[checkReadOnly] operator[SEP] operator[SEP] operator[SEP] identifier[DialectException] operator[SEP] identifier[assureNotNull] operator[SEP] identifier[column] operator[... |
public GridTable getGridTable(Record gridRecord)
{
GridTable gridTable = super.getGridTable(gridRecord);
gridTable.setCache(true); // Typically, the client is a gridscreen which caches the records (so I don't have to!)
return gridTable;
} | class class_name[name] begin[{]
method[getGridTable, return_type[type[GridTable]], modifier[public], parameter[gridRecord]] begin[{]
local_variable[type[GridTable], gridTable]
call[gridTable.setCache, parameter[literal[true]]]
return[member[.gridTable]]
end[}]
END[}] | Keyword[public] identifier[GridTable] identifier[getGridTable] operator[SEP] identifier[Record] identifier[gridRecord] operator[SEP] {
identifier[GridTable] identifier[gridTable] operator[=] Keyword[super] operator[SEP] identifier[getGridTable] operator[SEP] identifier[gridRecord] operator[SEP] operator[SEP] ide... |
public FollowPath<T, P> setPath (Path<T, P> path) {
this.path = path;
return this;
} | class class_name[name] begin[{]
method[setPath, return_type[type[FollowPath]], modifier[public], parameter[path]] begin[{]
assign[THIS[member[None.path]], member[.path]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[FollowPath] operator[<] identifier[T] , identifier[P] operator[>] identifier[setPath] operator[SEP] identifier[Path] operator[<] identifier[T] , identifier[P] operator[>] identifier[path] operator[SEP] {
Keyword[this] operator[SEP] identifier[path] operator[=] identifier[path] operat... |
private long getScanEndTimeSeconds() {
// Begin with the raw query end time.
long end = getEndTime();
// Convert to seconds if we have a query in ms.
if ((end & Const.SECOND_MASK) != 0L) {
end /= 1000L;
if (end - (end * 1000) < 1) {
// handle an edge case where a user may request a ... | class class_name[name] begin[{]
method[getScanEndTimeSeconds, return_type[type[long]], modifier[private], parameter[]] begin[{]
local_variable[type[long], end]
if[binary_operation[binary_operation[member[.end], &, member[Const.SECOND_MASK]], !=, literal[0L]]] begin[{]
... | Keyword[private] Keyword[long] identifier[getScanEndTimeSeconds] operator[SEP] operator[SEP] {
Keyword[long] identifier[end] operator[=] identifier[getEndTime] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[end] operator[&] identifier[Const] operator[SEP] identifier[... |
public int decreaseKey(E o) {
HeapEntry<E> entry = getEntry(o);
if (o != entry.object) {
if (cmp.compare(o, entry.object) < 0) {
entry.object = o;
}
}
return heapifyUp(entry);
} | class class_name[name] begin[{]
method[decreaseKey, return_type[type[int]], modifier[public], parameter[o]] begin[{]
local_variable[type[HeapEntry], entry]
if[binary_operation[member[.o], !=, member[entry.object]]] begin[{]
if[binary_operation[call[cmp.compare, p... | Keyword[public] Keyword[int] identifier[decreaseKey] operator[SEP] identifier[E] identifier[o] operator[SEP] {
identifier[HeapEntry] operator[<] identifier[E] operator[>] identifier[entry] operator[=] identifier[getEntry] operator[SEP] identifier[o] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifie... |
private void changeDocumentToThis(NodeImpl node) {
Map<String, UserData> userData = node.document.getUserDataMapForRead(node);
if (!userData.isEmpty()) {
getUserDataMap(node).putAll(userData);
}
node.document = this;
// change the document on all child nodes
... | class class_name[name] begin[{]
method[changeDocumentToThis, return_type[void], modifier[private], parameter[node]] begin[{]
local_variable[type[Map], userData]
if[call[userData.isEmpty, parameter[]]] begin[{]
call[.getUserDataMap, parameter[member[.node]]]
... | Keyword[private] Keyword[void] identifier[changeDocumentToThis] operator[SEP] identifier[NodeImpl] identifier[node] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[UserData] operator[>] identifier[userData] operator[=] identifier[node] operator[SEP] identifier[document] operator[SEP]... |
protected void cancelTransfers(IntSet removedSegments) {
synchronized (transferMapsLock) {
List<Integer> segmentsToCancel = new ArrayList<>(removedSegments);
while (!segmentsToCancel.isEmpty()) {
int segmentId = segmentsToCancel.remove(0);
List<InboundTransferTask> inboun... | class class_name[name] begin[{]
method[cancelTransfers, return_type[void], modifier[protected], parameter[removedSegments]] begin[{]
SYNCHRONIZED[member[.transferMapsLock]] BEGIN[{]
local_variable[type[List], segmentsToCancel]
while[call[segmentsToCancel.isEm... | Keyword[protected] Keyword[void] identifier[cancelTransfers] operator[SEP] identifier[IntSet] identifier[removedSegments] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[transferMapsLock] operator[SEP] {
identifier[List] operator[<] identifier[Integer] operator[>] identifier[segmentsToC... |
private Field resolveField(Field inputField) {
if (inputField.isList()) {
return inputField.getListElemField();
} else if (inputField.isSet()) {
return inputField.getSetElemField();
} else {
return inputField;
}
} | class class_name[name] begin[{]
method[resolveField, return_type[type[Field]], modifier[private], parameter[inputField]] begin[{]
if[call[inputField.isList, parameter[]]] begin[{]
return[call[inputField.getListElemField, parameter[]]]
else begin[{]
if[call[inputF... | Keyword[private] identifier[Field] identifier[resolveField] operator[SEP] identifier[Field] identifier[inputField] operator[SEP] {
Keyword[if] operator[SEP] identifier[inputField] operator[SEP] identifier[isList] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[inputField] operat... |
public void saveHWMark(String source, long hwm) {
WaterMarkEntry wmEntry = sourceWaterMarkMap.get(source);
if (wmEntry != null) {
wmEntry.setHWMScn(Math.max(hwm, wmEntry.getHWMScn()));
} else {
wmEntry = new WaterMarkEntry(source);
wmEntry.setHWMScn(hwm);
... | class class_name[name] begin[{]
method[saveHWMark, return_type[void], modifier[public], parameter[source, hwm]] begin[{]
local_variable[type[WaterMarkEntry], wmEntry]
if[binary_operation[member[.wmEntry], !=, literal[null]]] begin[{]
call[wmEntry.setHWMScn, param... | Keyword[public] Keyword[void] identifier[saveHWMark] operator[SEP] identifier[String] identifier[source] , Keyword[long] identifier[hwm] operator[SEP] {
identifier[WaterMarkEntry] identifier[wmEntry] operator[=] identifier[sourceWaterMarkMap] operator[SEP] identifier[get] operator[SEP] identifier[source] operat... |
private void deleteGraphSparqlUpdate(URI graphUri) {
UpdateRequest request = UpdateFactory.create();
request.setPrefixMapping(PrefixMapping.Factory.create().setNsPrefixes(Vocabularies.prefixes));
request.add(new UpdateDrop(graphUri.toASCIIString()));
// Use create form for Sesame-based ... | class class_name[name] begin[{]
method[deleteGraphSparqlUpdate, return_type[void], modifier[private], parameter[graphUri]] begin[{]
local_variable[type[UpdateRequest], request]
call[request.setPrefixMapping, parameter[call[PrefixMapping.Factory.create, parameter[]]]]
cal... | Keyword[private] Keyword[void] identifier[deleteGraphSparqlUpdate] operator[SEP] identifier[URI] identifier[graphUri] operator[SEP] {
identifier[UpdateRequest] identifier[request] operator[=] identifier[UpdateFactory] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] identifier[request] ... |
public void marshall(HealthCheck healthCheck, ProtocolMarshaller protocolMarshaller) {
if (healthCheck == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(healthCheck.getCommand(), COMMAND_BINDING);
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[healthCheck, protocolMarshaller]] begin[{]
if[binary_operation[member[.healthCheck], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operato... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[HealthCheck] identifier[healthCheck] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[healthCheck] operator[==] Other[null] operator[SEP] {
Keyword[throw] Ke... |
public static Transform createViewportTransform(double x, double y, final double width, final double height, final double viewportWidth, final double viewportHeight)
{
if ((width <= 0) || (height <= 0))
{
return null;
}
final double scaleX = viewportWidth / width;
... | class class_name[name] begin[{]
method[createViewportTransform, return_type[type[Transform]], modifier[public static], parameter[x, y, width, height, viewportWidth, viewportHeight]] begin[{]
if[binary_operation[binary_operation[member[.width], <=, literal[0]], ||, binary_operation[member[.heigh... | Keyword[public] Keyword[static] identifier[Transform] identifier[createViewportTransform] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] , Keyword[final] Keyword[double] identifier[width] , Keyword[final] Keyword[double] identifier[height] , Keyword[final] Keyword[double] identifier[vie... |
public CreateAutoScalingGroupRequest withTerminationPolicies(String... terminationPolicies) {
if (this.terminationPolicies == null) {
setTerminationPolicies(new com.amazonaws.internal.SdkInternalList<String>(terminationPolicies.length));
}
for (String ele : terminationPolicies) {
... | class class_name[name] begin[{]
method[withTerminationPolicies, return_type[type[CreateAutoScalingGroupRequest]], modifier[public], parameter[terminationPolicies]] begin[{]
if[binary_operation[THIS[member[None.terminationPolicies]], ==, literal[null]]] begin[{]
call[.set... | Keyword[public] identifier[CreateAutoScalingGroupRequest] identifier[withTerminationPolicies] operator[SEP] identifier[String] operator[...] identifier[terminationPolicies] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[terminationPolicies] operator[==] Other[null] operator[SEP]... |
public boolean markFree() {
if (isEmpty()) {
state = TaskSlotState.FREE;
this.jobId = null;
this.allocationId = null;
return true;
} else {
return false;
}
} | class class_name[name] begin[{]
method[markFree, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[call[.isEmpty, parameter[]]] begin[{]
assign[member[.state], member[TaskSlotState.FREE]]
assign[THIS[member[None.jobId]], liter... | Keyword[public] Keyword[boolean] identifier[markFree] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
identifier[state] operator[=] identifier[TaskSlotState] operator[SEP] identifier[FREE] operator[SEP] Keyword[this] operator[SEP]... |
@Override
public void setCallback(SourceCallback callback) {
try {
mCallbackLock.lock();
mCallback = callback;
mCallbackChanged.signal();
} finally {
mCallbackLock.unlock();
}
} | class class_name[name] begin[{]
method[setCallback, return_type[void], modifier[public], parameter[callback]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operators=[], qualifier=mCallbackLock, selectors=[], type_ar... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setCallback] operator[SEP] identifier[SourceCallback] identifier[callback] operator[SEP] {
Keyword[try] {
identifier[mCallbackLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] identifier[mCallback]... |
@Override
public SIXAResource getSIXAResource()
throws SIConnectionUnavailableException, SIConnectionDroppedException,
SIErrorException
{
if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
SibTr.entry(CoreSPIConnection.t... | class class_name[name] begin[{]
method[getSIXAResource, return_type[type[SIXAResource]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[CoreSPIConnection.tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibT... | annotation[@] identifier[Override] Keyword[public] identifier[SIXAResource] identifier[getSIXAResource] operator[SEP] operator[SEP] Keyword[throws] identifier[SIConnectionUnavailableException] , identifier[SIConnectionDroppedException] , identifier[SIErrorException] {
Keyword[if] operator[SEP] identifier[Trace... |
@Override
public int parity() {
double x1 = coordinates[0].x;
double x2 = coordinates[1].x;
double x3 = coordinates[2].x;
double x4 = coordinates[3].x;
double y1 = coordinates[0].y;
double y2 = coordinates[1].y;
double y3 = coordinates[2].y;
double y... | class class_name[name] begin[{]
method[parity, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[double], x1]
local_variable[type[double], x2]
local_variable[type[double], x3]
local_variable[type[double], x4]
local_variable[type[double],... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[parity] operator[SEP] operator[SEP] {
Keyword[double] identifier[x1] operator[=] identifier[coordinates] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[x] operator[SEP] Keyword[double] identifier[x2] operator[=] identifier[... |
public final boolean fill(CharacterBuffer buffer, Reader reader) throws IOException {
return fill(buffer, reader, buffer.buffer.length);
} | class class_name[name] begin[{]
method[fill, return_type[type[boolean]], modifier[final public], parameter[buffer, reader]] begin[{]
return[call[.fill, parameter[member[.buffer], member[.reader], member[buffer.buffer.length]]]]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[boolean] identifier[fill] operator[SEP] identifier[CharacterBuffer] identifier[buffer] , identifier[Reader] identifier[reader] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[fill] operator[SEP] identifier[buffer] , identifier[reader] , ... |
@Override
public TagInfoFeed getTagInfo(String tagName) throws InstagramException {
String apiMethod = format(Methods.TAGS_BY_NAME, URLUtils.encodeURIComponent(tagName));
String rawApiMethod = format(Methods.TAGS_BY_NAME, tagName);
return createInstagramObject(Verbs.GET, TagInfoFeed.class, a... | class class_name[name] begin[{]
method[getTagInfo, return_type[type[TagInfoFeed]], modifier[public], parameter[tagName]] begin[{]
local_variable[type[String], apiMethod]
local_variable[type[String], rawApiMethod]
return[call[.createInstagramObject, parameter[member[Verbs.GET], ClassRefe... | annotation[@] identifier[Override] Keyword[public] identifier[TagInfoFeed] identifier[getTagInfo] operator[SEP] identifier[String] identifier[tagName] operator[SEP] Keyword[throws] identifier[InstagramException] {
identifier[String] identifier[apiMethod] operator[=] identifier[format] operator[SEP] identifier[Me... |
public final String getTextOrField() {
final String text = getText();
if (text == null) {
return field.getName();
}
return text;
} | class class_name[name] begin[{]
method[getTextOrField, return_type[type[String]], modifier[final public], parameter[]] begin[{]
local_variable[type[String], text]
if[binary_operation[member[.text], ==, literal[null]]] begin[{]
return[call[field.getName, parameter[]]]
... | Keyword[public] Keyword[final] identifier[String] identifier[getTextOrField] operator[SEP] operator[SEP] {
Keyword[final] identifier[String] identifier[text] operator[=] identifier[getText] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[text] operator[==] Other[null] operator[SEP]... |
public static String getDays(RecurringTask task)
{
StringBuilder sb = new StringBuilder();
for (Day day : Day.values())
{
sb.append(task.getWeeklyDay(day) ? "1" : "0");
}
return sb.toString();
} | class class_name[name] begin[{]
method[getDays, return_type[type[String]], modifier[public static], parameter[task]] begin[{]
local_variable[type[StringBuilder], sb]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[TernaryExpres... | Keyword[public] Keyword[static] identifier[String] identifier[getDays] operator[SEP] identifier[RecurringTask] identifier[task] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifi... |
public static void assertAndDestroyProcessGroup(String pgrpId, long interval,
boolean inBackground)
throws IOException {
// Make sure that the pid given is a process group leader
if (!checkPidPgrpidForMatch(pgrpId, PROCFS)) {
throw new IOException("Process with PID " + pgrp... | class class_name[name] begin[{]
method[assertAndDestroyProcessGroup, return_type[void], modifier[public static], parameter[pgrpId, interval, inBackground]] begin[{]
if[call[.checkPidPgrpidForMatch, parameter[member[.pgrpId], member[.PROCFS]]]] begin[{]
ThrowStatement(expression=Clas... | Keyword[public] Keyword[static] Keyword[void] identifier[assertAndDestroyProcessGroup] operator[SEP] identifier[String] identifier[pgrpId] , Keyword[long] identifier[interval] , Keyword[boolean] identifier[inBackground] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[... |
synchronized void initialize() throws IOException {
if (initialized) {
return;
}
final boolean traceLogging = log.isLoggable(Level.FINEST);
final boolean entryExitLogging = log.isLoggable(Level.FINER);
final String methodName = "initialize"; //$NON-NLS-1$
if (entryExitLogging) {
log.entering(D... | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[synchronized], parameter[]] begin[{]
if[member[.initialized]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[boolean], traceLogging]
local_variable[typ... | Keyword[synchronized] Keyword[void] identifier[initialize] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[initialized] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[final] Keyword[boolean] identifier[traceLogging] oper... |
@Override
public boolean syncExtend() throws IOException {
boolean result = header.synchNumrecs();
if (result && log.isDebugEnabled())
log.debug(" N3iosp syncExtend " + raf.getLocation() + " numrecs =" + header.numrecs);
return result;
} | class class_name[name] begin[{]
method[syncExtend, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], result]
if[binary_operation[member[.result], &&, call[log.isDebugEnabled, parameter[]]]] begin[{]
call[log.debug, parameter[bi... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[syncExtend] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[boolean] identifier[result] operator[=] identifier[header] operator[SEP] identifier[synchNumrecs] operator[SEP] operator[SEP] operator[SEP] Keyw... |
public RoleDefinitionInner get(String scope, String roleDefinitionId) {
return getWithServiceResponseAsync(scope, roleDefinitionId).toBlocking().single().body();
} | class class_name[name] begin[{]
method[get, return_type[type[RoleDefinitionInner]], modifier[public], parameter[scope, roleDefinitionId]] begin[{]
return[call[.getWithServiceResponseAsync, parameter[member[.scope], member[.roleDefinitionId]]]]
end[}]
END[}] | Keyword[public] identifier[RoleDefinitionInner] identifier[get] operator[SEP] identifier[String] identifier[scope] , identifier[String] identifier[roleDefinitionId] operator[SEP] {
Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[scope] , identifier[roleDefinitionId] operator[SE... |
public static String getUserShell()
throws EnvironmentException
{
if( isMacOsX() )
{
return getMacUserShell();
}
if( isWindows() )
{
return getWindowsUserShell();
}
if( isUnix() )
{
return getUnixUserShell(... | class class_name[name] begin[{]
method[getUserShell, return_type[type[String]], modifier[public static], parameter[]] begin[{]
if[call[.isMacOsX, parameter[]]] begin[{]
return[call[.getMacUserShell, parameter[]]]
else begin[{]
None
end[}]
if[call[.isW... | Keyword[public] Keyword[static] identifier[String] identifier[getUserShell] operator[SEP] operator[SEP] Keyword[throws] identifier[EnvironmentException] {
Keyword[if] operator[SEP] identifier[isMacOsX] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[getMacUserShell] operator[SEP... |
@Override
protected final double evaluateAsDoublePrimitive(IPidEvaluationArguments<NUMERICTYPE, INTEGRATOR_ARGS_TYPE, DIFFERENTIATOR_ARGS_TYPE> evaluationArguments) {
// use double primitive
NUMERICTYPE errorSignal = evaluationArguments.getErrorSignalValue();
double controlOuput = 0d;
... | class class_name[name] begin[{]
method[evaluateAsDoublePrimitive, return_type[type[double]], modifier[final protected], parameter[evaluationArguments]] begin[{]
local_variable[type[NUMERICTYPE], errorSignal]
local_variable[type[double], controlOuput]
assign[member[.controlOuput]... | annotation[@] identifier[Override] Keyword[protected] Keyword[final] Keyword[double] identifier[evaluateAsDoublePrimitive] operator[SEP] identifier[IPidEvaluationArguments] operator[<] identifier[NUMERICTYPE] , identifier[INTEGRATOR_ARGS_TYPE] , identifier[DIFFERENTIATOR_ARGS_TYPE] operator[>] identifier[evaluationAr... |
public Matrix add(double c)
{
Matrix toReturn = getThisSideMatrix(null);
toReturn.mutableAdd(c);
return toReturn;
} | class class_name[name] begin[{]
method[add, return_type[type[Matrix]], modifier[public], parameter[c]] begin[{]
local_variable[type[Matrix], toReturn]
call[toReturn.mutableAdd, parameter[member[.c]]]
return[member[.toReturn]]
end[}]
END[}] | Keyword[public] identifier[Matrix] identifier[add] operator[SEP] Keyword[double] identifier[c] operator[SEP] {
identifier[Matrix] identifier[toReturn] operator[=] identifier[getThisSideMatrix] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[toReturn] operator[SEP] identifier[mutableAdd] operator... |
@Override
public Date getDate(final int columnIndex, final Calendar cal) throws SQLException {
return wrapped.getDate(columnIndex, cal);
} | class class_name[name] begin[{]
method[getDate, return_type[type[Date]], modifier[public], parameter[columnIndex, cal]] begin[{]
return[call[wrapped.getDate, parameter[member[.columnIndex], member[.cal]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Date] identifier[getDate] operator[SEP] Keyword[final] Keyword[int] identifier[columnIndex] , Keyword[final] identifier[Calendar] identifier[cal] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[return] identifier[wrapped] operator[SE... |
public void marshall(ParameterHistory parameterHistory, ProtocolMarshaller protocolMarshaller) {
if (parameterHistory == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(parameterHistory.getName(), NAM... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[parameterHistory, protocolMarshaller]] begin[{]
if[binary_operation[member[.parameterHistory], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postf... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ParameterHistory] identifier[parameterHistory] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[parameterHistory] operator[==] Other[null] operator[SEP] {
Ke... |
public CompletableFuture<Void> requestSegments() {
return startTransfer(applyState ? StateRequestCommand.Type.START_STATE_TRANSFER : StateRequestCommand.Type.START_CONSISTENCY_CHECK);
} | class class_name[name] begin[{]
method[requestSegments, return_type[type[CompletableFuture]], modifier[public], parameter[]] begin[{]
return[call[.startTransfer, parameter[TernaryExpression(condition=MemberReference(member=applyState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])... | Keyword[public] identifier[CompletableFuture] operator[<] identifier[Void] operator[>] identifier[requestSegments] operator[SEP] operator[SEP] {
Keyword[return] identifier[startTransfer] operator[SEP] identifier[applyState] operator[?] identifier[StateRequestCommand] operator[SEP] identifier[Type] operator[SEP] ... |
protected IRType[] getConstructorParamTypes( IType[] declaredParams, int iTypeParams, IType type )
{
List<IRType> params = new ArrayList<IRType>();
//
// Insert outer 'this'
//
if( isNonStaticInnerClass( type ) )
{
params.add( getDescriptor( getRuntimeEnclosingType( type ) ) );
}
... | class class_name[name] begin[{]
method[getConstructorParamTypes, return_type[type[IRType]], modifier[protected], parameter[declaredParams, iTypeParams, type]] begin[{]
local_variable[type[List], params]
if[call[.isNonStaticInnerClass, parameter[member[.type]]]] begin[{]
... | Keyword[protected] identifier[IRType] operator[SEP] operator[SEP] identifier[getConstructorParamTypes] operator[SEP] identifier[IType] operator[SEP] operator[SEP] identifier[declaredParams] , Keyword[int] identifier[iTypeParams] , identifier[IType] identifier[type] operator[SEP] {
identifier[List] operator[<] ... |
public static <T> T findOne(Iterable<T> collection, Filter<T> filter) {
if (null != collection) {
for (T t : collection) {
if (filter.accept(t)) {
return t;
}
}
}
return null;
} | class class_name[name] begin[{]
method[findOne, return_type[type[T]], modifier[public static], parameter[collection, filter]] begin[{]
if[binary_operation[literal[null], !=, member[.collection]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[findOne] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[collection] , identifier[Filter] operator[<] identifier[T] operator[>] identifier[filter] operator[SEP] {
Keyword[if] operat... |
private void cloneExplorerTypes(
CmsModule targetModule,
Map<String, String> iconPaths,
Map<String, String> descKeys) {
List<CmsExplorerTypeSettings> targetExplorerTypes = targetModule.getExplorerTypes();
for (CmsExplorerTypeSettings expSetting : targetExplorerTypes) {
... | class class_name[name] begin[{]
method[cloneExplorerTypes, return_type[void], modifier[private], parameter[targetModule, iconPaths, descKeys]] begin[{]
local_variable[type[List], targetExplorerTypes]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodI... | Keyword[private] Keyword[void] identifier[cloneExplorerTypes] operator[SEP] identifier[CmsModule] identifier[targetModule] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[iconPaths] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identif... |
protected JSONWriter append(String s) {
if (s == null) {
throw new JSONException("Null pointer");
}
return append(new WritableString(s));
} | class class_name[name] begin[{]
method[append, return_type[type[JSONWriter]], modifier[protected], parameter[s]] begin[{]
if[binary_operation[member[.s], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[],... | Keyword[protected] identifier[JSONWriter] identifier[append] operator[SEP] identifier[String] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[JSONException] operator[SEP] literal[String] operator[SEP]... |
@Override
public PropertyResolver build() {
if (resolver != null) {
return resolver;
}
Converter converter = buildConverter();
List<PropertyResolver> delegates = buildProperties(converter);
return new FirstExistingPropertiesResolver(delegates);
} | class class_name[name] begin[{]
method[build, return_type[type[PropertyResolver]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.resolver], !=, literal[null]]] begin[{]
return[member[.resolver]]
else begin[{]
None
end[}]
local_variable[t... | annotation[@] identifier[Override] Keyword[public] identifier[PropertyResolver] identifier[build] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[resolver] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[resolver] operator[SEP]
}
identifier[Converte... |
public void setPreparedResultUpdateProperties(Object[] parameterValues) {
if (navigator.getSize() == 1) {
((RowSetNavigatorClient) navigator).setData(0, parameterValues);
} else {
navigator.clear();
navigator.add(parameterValues);
}
} | class class_name[name] begin[{]
method[setPreparedResultUpdateProperties, return_type[void], modifier[public], parameter[parameterValues]] begin[{]
if[binary_operation[call[navigator.getSize, parameter[]], ==, literal[1]]] begin[{]
Cast(expression=MemberReference(member=... | Keyword[public] Keyword[void] identifier[setPreparedResultUpdateProperties] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[parameterValues] operator[SEP] {
Keyword[if] operator[SEP] identifier[navigator] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[==] Other[1] ... |
protected void initialize(Collection<MatchingDefinition> definitionList, boolean moreSpaceForSpeed){
// 把所有正则表达式union起来
List<Automaton> list = new ArrayList<Automaton>(definitionList.size());
for (MatchingDefinition c: definitionList) {
Automaton a = new RegExp(c.getRegularExpression()).toAutomaton();
... | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[protected], parameter[definitionList, moreSpaceForSpeed]] begin[{]
local_variable[type[List], list]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Varia... | Keyword[protected] Keyword[void] identifier[initialize] operator[SEP] identifier[Collection] operator[<] identifier[MatchingDefinition] operator[>] identifier[definitionList] , Keyword[boolean] identifier[moreSpaceForSpeed] operator[SEP] {
identifier[List] operator[<] identifier[Automaton] operator[>] identifie... |
public static boolean isNumber(String numberString) {
return Optional.ofNullable(numberPattern)
.orElseGet(() -> numberPattern = Pattern.compile(NumberPattern))
.matcher(numberString).matches();
} | class class_name[name] begin[{]
method[isNumber, return_type[type[boolean]], modifier[public static], parameter[numberString]] begin[{]
return[call[Optional.ofNullable, parameter[member[.numberPattern]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[isNumber] operator[SEP] identifier[String] identifier[numberString] operator[SEP] {
Keyword[return] identifier[Optional] operator[SEP] identifier[ofNullable] operator[SEP] identifier[numberPattern] operator[SEP] operator[SEP] identifier[orElseGet] opera... |
public final void mOCTAL() throws RecognitionException {
try {
int _type = OCTAL;
int _channel = DEFAULT_TOKEN_CHANNEL;
// com/dyuproject/protostuff/parser/ProtoLexer.g:256:5: ( '0' ( '0' .. '7' )+ )
// com/dyuproject/protostuff/parser/ProtoLexer.g:256:9: '0' ( '0... | class class_name[name] begin[{]
method[mOCTAL, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=OCTAL, postfix_operators=[], prefix_operators=[]... | Keyword[public] Keyword[final] Keyword[void] identifier[mOCTAL] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
Keyword[int] identifier[_type] operator[=] identifier[OCTAL] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKE... |
public void setDedicatedIps(java.util.Collection<DedicatedIp> dedicatedIps) {
if (dedicatedIps == null) {
this.dedicatedIps = null;
return;
}
this.dedicatedIps = new java.util.ArrayList<DedicatedIp>(dedicatedIps);
} | class class_name[name] begin[{]
method[setDedicatedIps, return_type[void], modifier[public], parameter[dedicatedIps]] begin[{]
if[binary_operation[member[.dedicatedIps], ==, literal[null]]] begin[{]
assign[THIS[member[None.dedicatedIps]], literal[null]]
retur... | Keyword[public] Keyword[void] identifier[setDedicatedIps] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[DedicatedIp] operator[>] identifier[dedicatedIps] operator[SEP] {
Keyword[if] operator[SEP] identifier[dedicatedIps] operator[==] Oth... |
static boolean isSimple(Geometry geometry, SpatialReference spatialReference) {
OperatorSimplify op = (OperatorSimplify) factory
.getOperator(Operator.Type.Simplify);
boolean result = op.isSimpleAsFeature(geometry, spatialReference, null);
return result;
} | class class_name[name] begin[{]
method[isSimple, return_type[type[boolean]], modifier[static], parameter[geometry, spatialReference]] begin[{]
local_variable[type[OperatorSimplify], op]
local_variable[type[boolean], result]
return[member[.result]]
end[}]
END[}] | Keyword[static] Keyword[boolean] identifier[isSimple] operator[SEP] identifier[Geometry] identifier[geometry] , identifier[SpatialReference] identifier[spatialReference] operator[SEP] {
identifier[OperatorSimplify] identifier[op] operator[=] operator[SEP] identifier[OperatorSimplify] operator[SEP] identifier[fa... |
public static <T> T callConstructor(Class<T> targetClass, Class[] argClasses, Object[] args) {
T output;
try {
Constructor classConstructor = targetClass.getDeclaredConstructor(argClasses);
output = AccessController.doPrivileged(
new SetConstructorPrivileged... | class class_name[name] begin[{]
method[callConstructor, return_type[type[T]], modifier[public static], parameter[targetClass, argClasses, args]] begin[{]
local_variable[type[T], output]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], i... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[callConstructor] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[targetClass] , identifier[Class] operator[SEP] operator[SEP] identifier[argClasses] , identifier[Object] operator[SEP] operat... |
public static PropertyDescriptor[] getPropertyDescriptors(Class<?> beanClass) {
if (beanClass == null) {
throw new IllegalArgumentException("No bean class specified");
}
// Look up any cached descriptors for this bean class
PropertyDescriptor descriptors[] = null;
// Introspect the bean and cache the ge... | class class_name[name] begin[{]
method[getPropertyDescriptors, return_type[type[PropertyDescriptor]], modifier[public static], parameter[beanClass]] begin[{]
if[binary_operation[member[.beanClass], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Litera... | Keyword[public] Keyword[static] identifier[PropertyDescriptor] operator[SEP] operator[SEP] identifier[getPropertyDescriptors] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[beanClass] operator[SEP] {
Keyword[if] operator[SEP] identifier[beanClass] operator[==] Other[null] operator... |
private int getLCADFS(int x, int y) {
// trivial cases
if (x == y || x == father[y]) {
return x;
}
if (y == father[x]) {
return y;
}
// step 1
int b = BitOperations.binaryLCA(I[x] + 1, I[y] + 1);
// step 2
int hb = BitOperations.getFirstExp(b);
if (hb == -1) {
throw new UnsupportedOperation... | class class_name[name] begin[{]
method[getLCADFS, return_type[type[int]], modifier[private], parameter[x, y]] begin[{]
if[binary_operation[binary_operation[member[.x], ==, member[.y]], ||, binary_operation[member[.x], ==, member[.father]]]] begin[{]
return[member[.x]]
else b... | Keyword[private] Keyword[int] identifier[getLCADFS] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] operator[SEP] {
Keyword[if] operator[SEP] identifier[x] operator[==] identifier[y] operator[||] identifier[x] operator[==] identifier[father] operator[SEP] identifier[y] operator[SEP] operat... |
@Override
public Object convert(Object value) {
if(value instanceof Element) {
return parseXmlElement((Element) value);
}
if(value instanceof CompositeData) {
return toMap((CompositeData)value);
}
return value;
} | class class_name[name] begin[{]
method[convert, return_type[type[Object]], modifier[public], parameter[value]] begin[{]
if[binary_operation[member[.value], instanceof, type[Element]]] begin[{]
return[call[.parseXmlElement, parameter[Cast(expression=MemberReference(member=value, post... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[convert] operator[SEP] identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Element] operator[SEP] {
Keyword[return] identifier[parseXmlElement] o... |
@Nullable
private List<IntBuffer> mergeIndexesAndWriteColumns(
final List<IndexableAdapter> adapters,
final ProgressIndicator progress,
final TimeAndDimsIterator timeAndDimsIterator,
final GenericColumnSerializer timeWriter,
final ArrayList<GenericColumnSerializer> metricWriters,
f... | class class_name[name] begin[{]
method[mergeIndexesAndWriteColumns, return_type[type[List]], modifier[private], parameter[adapters, progress, timeAndDimsIterator, timeWriter, metricWriters, mergers, fillRowNumConversions]] begin[{]
local_variable[type[String], section]
call[progress.sta... | annotation[@] identifier[Nullable] Keyword[private] identifier[List] operator[<] identifier[IntBuffer] operator[>] identifier[mergeIndexesAndWriteColumns] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[IndexableAdapter] operator[>] identifier[adapters] , Keyword[final] identifier[ProgressIndicato... |
private static PublicKey commonGetPublickeyByText(String keyText)
throws NoSuchAlgorithmException, InvalidKeySpecException {
byte[] keyBytes = Base64.base64ToByteArray(keyText);
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getI... | class class_name[name] begin[{]
method[commonGetPublickeyByText, return_type[type[PublicKey]], modifier[private static], parameter[keyText]] begin[{]
local_variable[type[byte], keyBytes]
local_variable[type[X509EncodedKeySpec], x509KeySpec]
local_variable[type[KeyFactory], keyFactory]
... | Keyword[private] Keyword[static] identifier[PublicKey] identifier[commonGetPublickeyByText] operator[SEP] identifier[String] identifier[keyText] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] , identifier[InvalidKeySpecException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[keyByte... |
@Override
public Delete createDelete(URI id, String tableName) throws IOException {
Delete del = null;
HTable hTable = getTable(tableName);
if (hTable != null) {
del = new Delete(Bytes.toBytes(id.toString()));
}
return del;
} | class class_name[name] begin[{]
method[createDelete, return_type[type[Delete]], modifier[public], parameter[id, tableName]] begin[{]
local_variable[type[Delete], del]
local_variable[type[HTable], hTable]
if[binary_operation[member[.hTable], !=, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] identifier[Delete] identifier[createDelete] operator[SEP] identifier[URI] identifier[id] , identifier[String] identifier[tableName] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Delete] identifier[del] operator[=] Other[null] operator[SEP] ... |
public static Type hsqlTypeFromVoltType(VoltType voltReturnType) {
Class<?> typeClass = VoltType.classFromByteValue(voltReturnType.getValue());
int typeNo = Types.getParameterSQLTypeNumber(typeClass);
return Type.getDefaultTypeWithSize(typeNo);
} | class class_name[name] begin[{]
method[hsqlTypeFromVoltType, return_type[type[Type]], modifier[public static], parameter[voltReturnType]] begin[{]
local_variable[type[Class], typeClass]
local_variable[type[int], typeNo]
return[call[Type.getDefaultTypeWithSize, parameter[member[.typeNo]]... | Keyword[public] Keyword[static] identifier[Type] identifier[hsqlTypeFromVoltType] operator[SEP] identifier[VoltType] identifier[voltReturnType] operator[SEP] {
identifier[Class] operator[<] operator[?] operator[>] identifier[typeClass] operator[=] identifier[VoltType] operator[SEP] identifier[classFromByteValue]... |
@SuppressWarnings("unchecked")
public static <T> Class<T> forOptionalName(String className)
{
if(className == null) {
return null;
}
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if(loader != null) {
try {
return (Class<T>)Class.forName(className, ... | class class_name[name] begin[{]
method[forOptionalName, return_type[type[Class]], modifier[public static], parameter[className]] begin[{]
if[binary_operation[member[.className], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
loca... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Class] operator[<] identifier[T] operator[>] identifier[forOptionalName] operator[SEP] identifier[String] identifier[className] operator[SEP] {
K... |
protected boolean isTokenToCheck(AnalyzedTokenReadings token) {
return (token.matchesPosTagRegex("(SUB|EIG|VER|ADJ):.*")
&& !token.matchesPosTagRegex("(PRO|A(RT|DV)|VER:(AUX|MOD)):.*")
&& !StringUtils.equalsAny(token.getToken(), "sicher", "weit", "Sie", "Ich"))
|| isUnknownWord(token);
} | class class_name[name] begin[{]
method[isTokenToCheck, return_type[type[boolean]], modifier[protected], parameter[token]] begin[{]
return[binary_operation[binary_operation[binary_operation[call[token.matchesPosTagRegex, parameter[literal["(SUB|EIG|VER|ADJ):.*"]]], &&, call[token.matchesPosTagRegex, par... | Keyword[protected] Keyword[boolean] identifier[isTokenToCheck] operator[SEP] identifier[AnalyzedTokenReadings] identifier[token] operator[SEP] {
Keyword[return] operator[SEP] identifier[token] operator[SEP] identifier[matchesPosTagRegex] operator[SEP] literal[String] operator[SEP] operator[&&] operator[!] identi... |
public void setAvailabilityZones(java.util.Collection<AvailabilityZone> availabilityZones) {
if (availabilityZones == null) {
this.availabilityZones = null;
return;
}
this.availabilityZones = new java.util.ArrayList<AvailabilityZone>(availabilityZones);
} | class class_name[name] begin[{]
method[setAvailabilityZones, return_type[void], modifier[public], parameter[availabilityZones]] begin[{]
if[binary_operation[member[.availabilityZones], ==, literal[null]]] begin[{]
assign[THIS[member[None.availabilityZones]], literal[null... | Keyword[public] Keyword[void] identifier[setAvailabilityZones] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[AvailabilityZone] operator[>] identifier[availabilityZones] operator[SEP] {
Keyword[if] operator[SEP] identifier[availabilityZon... |
public static File getArtifactFileFromProjectDependencies(AbstractWisdomMojo mojo, String artifactId,
String type) {
Preconditions.checkNotNull(mojo);
Preconditions.checkNotNull(artifactId);
Preconditions.checkNotNull(type);
... | class class_name[name] begin[{]
method[getArtifactFileFromProjectDependencies, return_type[type[File]], modifier[public static], parameter[mojo, artifactId, type]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.mojo]]]
call[Preconditions.checkNotNull, parameter[memb... | Keyword[public] Keyword[static] identifier[File] identifier[getArtifactFileFromProjectDependencies] operator[SEP] identifier[AbstractWisdomMojo] identifier[mojo] , identifier[String] identifier[artifactId] , identifier[String] identifier[type] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[... |
synchronized void pushPair(Session session, Object[] row1, Object[] row2) {
if (maxRowsQueued == 0) {
trigger.fire(triggerType, name.name, table.getName().name, row1,
row2);
return;
}
if (rowsQueued >= maxRowsQueued) {
if (nowait) {... | class class_name[name] begin[{]
method[pushPair, return_type[void], modifier[synchronized], parameter[session, row1, row2]] begin[{]
if[binary_operation[member[.maxRowsQueued], ==, literal[0]]] begin[{]
call[trigger.fire, parameter[member[.triggerType], member[name.name]... | Keyword[synchronized] Keyword[void] identifier[pushPair] operator[SEP] identifier[Session] identifier[session] , identifier[Object] operator[SEP] operator[SEP] identifier[row1] , identifier[Object] operator[SEP] operator[SEP] identifier[row2] operator[SEP] {
Keyword[if] operator[SEP] identifier[maxRowsQueued] ... |
@Programmatic
public boolean canAttach(
final Object candidateToAttachTo) {
final Class<? extends Paperclip> subtype = subtypeClassForElseNull(candidateToAttachTo);
return subtype != null;
} | class class_name[name] begin[{]
method[canAttach, return_type[type[boolean]], modifier[public], parameter[candidateToAttachTo]] begin[{]
local_variable[type[Class], subtype]
return[binary_operation[member[.subtype], !=, literal[null]]]
end[}]
END[}] | annotation[@] identifier[Programmatic] Keyword[public] Keyword[boolean] identifier[canAttach] operator[SEP] Keyword[final] identifier[Object] identifier[candidateToAttachTo] operator[SEP] {
Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Paperclip] operator[>] identifier[subt... |
public void clearTextWrap() {
float tmpHeight = imageEnd - currentHeight;
if (line != null) {
tmpHeight += line.height();
}
if ((imageEnd > -1) && (tmpHeight > 0)) {
carriageReturn();
currentHeight += tmpHeight;
}
} | class class_name[name] begin[{]
method[clearTextWrap, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[float], tmpHeight]
if[binary_operation[member[.line], !=, literal[null]]] begin[{]
assign[member[.tmpHeight], call[line.height, pa... | Keyword[public] Keyword[void] identifier[clearTextWrap] operator[SEP] operator[SEP] {
Keyword[float] identifier[tmpHeight] operator[=] identifier[imageEnd] operator[-] identifier[currentHeight] operator[SEP] Keyword[if] operator[SEP] identifier[line] operator[!=] Other[null] operator[SEP] {
identifier... |
public static Map<String, Version> identify(ClassLoader classLoader) {
if (classLoader == null) {
classLoader = PlatformDependent.getContextClassLoader();
}
// Collect all properties.
Properties props = new Properties();
try {
Enumeration<URL> resources =... | class class_name[name] begin[{]
method[identify, return_type[type[Map]], modifier[public static], parameter[classLoader]] begin[{]
if[binary_operation[member[.classLoader], ==, literal[null]]] begin[{]
assign[member[.classLoader], call[PlatformDependent.getContextClassLo... | Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Version] operator[>] identifier[identify] operator[SEP] identifier[ClassLoader] identifier[classLoader] operator[SEP] {
Keyword[if] operator[SEP] identifier[classLoader] operator[==] Other[null] operator[SEP] {
... |
public void hideInstructionList() {
rvInstructions.stopScroll();
beginDelayedTransition();
if (isLandscape()) {
updateLandscapeConstraintsTo(R.layout.instruction_layout);
}
instructionListLayout.setVisibility(GONE);
onInstructionListVisibilityChanged(false);
} | class class_name[name] begin[{]
method[hideInstructionList, return_type[void], modifier[public], parameter[]] begin[{]
call[rvInstructions.stopScroll, parameter[]]
call[.beginDelayedTransition, parameter[]]
if[call[.isLandscape, parameter[]]] begin[{]
... | Keyword[public] Keyword[void] identifier[hideInstructionList] operator[SEP] operator[SEP] {
identifier[rvInstructions] operator[SEP] identifier[stopScroll] operator[SEP] operator[SEP] operator[SEP] identifier[beginDelayedTransition] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[i... |
public static long getTxIfoCacheTimeout(FluoConfiguration conf, TimeUnit tu) {
long millis = conf.getLong(TX_INFO_CACHE_TIMEOUT, TX_INFO_CACHE_TIMEOUT_DEFAULT);
if (millis <= 0) {
throw new IllegalArgumentException("Timeout must positive for " + TX_INFO_CACHE_TIMEOUT);
}
return tu.convert(millis, ... | class class_name[name] begin[{]
method[getTxIfoCacheTimeout, return_type[type[long]], modifier[public static], parameter[conf, tu]] begin[{]
local_variable[type[long], millis]
if[binary_operation[member[.millis], <=, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreat... | Keyword[public] Keyword[static] Keyword[long] identifier[getTxIfoCacheTimeout] operator[SEP] identifier[FluoConfiguration] identifier[conf] , identifier[TimeUnit] identifier[tu] operator[SEP] {
Keyword[long] identifier[millis] operator[=] identifier[conf] operator[SEP] identifier[getLong] operator[SEP] identifi... |
public static final StreamConfiguration getCreateStreamConfig(final CreateStreamRequest createStreamRequest) {
ScalingPolicy scalingPolicy;
if (createStreamRequest.getScalingPolicy().getType() == ScalingConfig.TypeEnum.FIXED_NUM_SEGMENTS) {
scalingPolicy = ScalingPolicy.fixed(createStreamRequ... | class class_name[name] begin[{]
method[getCreateStreamConfig, return_type[type[StreamConfiguration]], modifier[final public static], parameter[createStreamRequest]] begin[{]
local_variable[type[ScalingPolicy], scalingPolicy]
if[binary_operation[call[createStreamRequest.getScalingPolicy,... | Keyword[public] Keyword[static] Keyword[final] identifier[StreamConfiguration] identifier[getCreateStreamConfig] operator[SEP] Keyword[final] identifier[CreateStreamRequest] identifier[createStreamRequest] operator[SEP] {
identifier[ScalingPolicy] identifier[scalingPolicy] operator[SEP] Keyword[if] operator[SEP]... |
private void doGetUpdate() throws PageException {
Struct sct = new StructImpl();
pageContext.setVariable(getString("admin", action, "returnVariable"), sct);
URL location = config.getUpdateLocation();
if (location == null) location = Constants.DEFAULT_UPDATE_URL;
String type = config.getUpdateType();
if (StringUt... | class class_name[name] begin[{]
method[doGetUpdate, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[Struct], sct]
call[pageContext.setVariable, parameter[call[.getString, parameter[literal["admin"], member[.action], literal["returnVariable"]]], member[.sc... | Keyword[private] Keyword[void] identifier[doGetUpdate] operator[SEP] operator[SEP] Keyword[throws] identifier[PageException] {
identifier[Struct] identifier[sct] operator[=] Keyword[new] identifier[StructImpl] operator[SEP] operator[SEP] operator[SEP] identifier[pageContext] operator[SEP] identifier[setVariable]... |
@Override
// TODO This is executed for each client connected. Should we have only one client connected?
// TODO Call queryPurchases() at least twice in your code:
// - Every time your app launches so that you can restore any purchases that a user has made since the app last stopped.
// - In your onResume() method b... | class class_name[name] begin[{]
method[onPurchasesUpdated, return_type[void], modifier[public], parameter[resultCode, purchases]] begin[{]
local_variable[type[InAppBillingErrorCode], inAppBillingErrorCode]
if[binary_operation[member[.inAppBillingErrorCode], ==, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onPurchasesUpdated] operator[SEP] annotation[@] identifier[BillingClient] operator[SEP] identifier[BillingResponse] Keyword[int] identifier[resultCode] , annotation[@] identifier[Nullable] identifier[List] operator[<] identifier[Purchase] oper... |
public static void writePointObsDataset(PointObsDataset pobsDataset, String fileOut) throws IOException {
// see if we have an altitude
String altUnits = null;
DataIterator iterOne = pobsDataset.getDataIterator(-1);
while (iterOne.hasNext()) {
PointObsDatatype pobsData = (PointObsDatatype) iterOn... | class class_name[name] begin[{]
method[writePointObsDataset, return_type[void], modifier[public static], parameter[pobsDataset, fileOut]] begin[{]
local_variable[type[String], altUnits]
local_variable[type[DataIterator], iterOne]
while[call[iterOne.hasNext, parameter[]]] begin[{... | Keyword[public] Keyword[static] Keyword[void] identifier[writePointObsDataset] operator[SEP] identifier[PointObsDataset] identifier[pobsDataset] , identifier[String] identifier[fileOut] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[altUnits] operator[=] Other[null] operat... |
public Future<Map<Long, List<LeagueList>>> getLeagues(long... summoners) {
return new ApiFuture<>(() -> handler.getLeagues(summoners));
} | class class_name[name] begin[{]
method[getLeagues, return_type[type[Future]], modifier[public], parameter[summoners]] begin[{]
return[ClassCreator(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=summoners, postfix_operators=[], prefix_operators=[], qualifier=, select... | Keyword[public] identifier[Future] operator[<] identifier[Map] operator[<] identifier[Long] , identifier[List] operator[<] identifier[LeagueList] operator[>] operator[>] operator[>] identifier[getLeagues] operator[SEP] Keyword[long] operator[...] identifier[summoners] operator[SEP] {
Keyword[return] Keyword[new... |
public double[] homogeneRelativeVector(double[] v) {
assert (v.length == dim);
// TODO: this only works properly when trans[dim][dim] == 1.0, right?
double[] dv = Arrays.copyOf(v, dim + 1);
dv[dim] = 0.0;
return dv;
} | class class_name[name] begin[{]
method[homogeneRelativeVector, return_type[type[double]], modifier[public], parameter[v]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[]), operandr=MemberRefe... | Keyword[public] Keyword[double] operator[SEP] operator[SEP] identifier[homogeneRelativeVector] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[v] operator[SEP] {
Keyword[assert] operator[SEP] identifier[v] operator[SEP] identifier[length] operator[==] identifier[dim] operator[SEP] operator[S... |
public BaseField setupField(int iFieldSeq)
{
BaseField field = null;
if (iFieldSeq == 0)
{
field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
field.setHidden(true);
}
//if (iFieldSeq == 1)
//{
// field = ne... | class class_name[name] begin[{]
method[setupField, return_type[type[BaseField]], modifier[public], parameter[iFieldSeq]] begin[{]
local_variable[type[BaseField], field]
if[binary_operation[member[.iFieldSeq], ==, literal[0]]] begin[{]
assign[member[.field], Class... | Keyword[public] identifier[BaseField] identifier[setupField] operator[SEP] Keyword[int] identifier[iFieldSeq] operator[SEP] {
identifier[BaseField] identifier[field] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[iFieldSeq] operator[==] Other[0] operator[SEP] {
identifier[f... |
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<Table, CreateTableFromSnapshotMetadata> createTableFromSnapshotAsync(
InstanceName parent, String tableId, SnapshotName sourceSnapshot) {
CreateTableFromSnapshotRequest re... | class class_name[name] begin[{]
method[createTableFromSnapshotAsync, return_type[type[OperationFuture]], modifier[final public], parameter[parent, tableId, sourceSnapshot]] begin[{]
local_variable[type[CreateTableFromSnapshotRequest], request]
return[call[.createTableFromSnapshotAsync, paramete... | annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[Table] , identifier[CreateTableFromSnapshotMetadata] operator[>] identifier[createTableFromSnapshotAsync] operator[SEP] identifier[InstanceName] identifier[par... |
public Observable<WorkflowTriggerCallbackUrlInner> listContentCallbackUrlAsync(String resourceGroupName, String integrationAccountName, String assemblyArtifactName) {
return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName).map(new Func1<ServiceRespo... | class class_name[name] begin[{]
method[listContentCallbackUrlAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, integrationAccountName, assemblyArtifactName]] begin[{]
return[call[.listContentCallbackUrlWithServiceResponseAsync, parameter[member[.resourceGroupName], me... | Keyword[public] identifier[Observable] operator[<] identifier[WorkflowTriggerCallbackUrlInner] operator[>] identifier[listContentCallbackUrlAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[integrationAccountName] , identifier[String] identifier[assemblyArtifactName... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.