code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public TimeSlot insertSlotAtEnd(long newSlotTimeout) {
// this routine assumes that list could be empty
TimeSlot retSlot = new TimeSlot(newSlotTimeout);
if (this.lastSlot == null) {
// list was empty
this.lastSlot = retSlot;
this.firstSlot = retSlot;
}... | class class_name[name] begin[{]
method[insertSlotAtEnd, return_type[type[TimeSlot]], modifier[public], parameter[newSlotTimeout]] begin[{]
local_variable[type[TimeSlot], retSlot]
if[binary_operation[THIS[member[None.lastSlot]], ==, literal[null]]] begin[{]
assign... | Keyword[public] identifier[TimeSlot] identifier[insertSlotAtEnd] operator[SEP] Keyword[long] identifier[newSlotTimeout] operator[SEP] {
identifier[TimeSlot] identifier[retSlot] operator[=] Keyword[new] identifier[TimeSlot] operator[SEP] identifier[newSlotTimeout] operator[SEP] operator[SEP] Keyword[if] operator[... |
protected Map<CmsUUID, CmsElementView> loadElementViews() {
List<CmsElementView> views = new ArrayList<CmsElementView>();
if (m_cms.existsResource("/")) {
views.add(CmsElementView.DEFAULT_ELEMENT_VIEW);
try {
@SuppressWarnings("deprecation")
... | class class_name[name] begin[{]
method[loadElementViews, return_type[type[Map]], modifier[protected], parameter[]] begin[{]
local_variable[type[List], views]
if[call[m_cms.existsResource, parameter[literal["/"]]]] begin[{]
call[views.add, parameter[member[CmsElem... | Keyword[protected] identifier[Map] operator[<] identifier[CmsUUID] , identifier[CmsElementView] operator[>] identifier[loadElementViews] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[CmsElementView] operator[>] identifier[views] operator[=] Keyword[new] identifier[ArrayList] operator[<] ... |
public List<org.openprovenance.prov.model.Type> getType() {
if (type == null) {
type = new ArrayList<org.openprovenance.prov.model.Type>();
}
return this.type;
} | class class_name[name] begin[{]
method[getType, return_type[type[List]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.type], ==, literal[null]]] begin[{]
assign[member[.type], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, p... | Keyword[public] identifier[List] operator[<] identifier[org] operator[SEP] identifier[openprovenance] operator[SEP] identifier[prov] operator[SEP] identifier[model] operator[SEP] identifier[Type] operator[>] identifier[getType] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[type] operator[==]... |
private <T> T orIfIgnoringFieldAbsence(
@NullableDecl T input, @NullableDecl T defaultValue, boolean ignoreFieldAbsence) {
return (input == null && ignoreFieldAbsence) ? defaultValue : input;
} | class class_name[name] begin[{]
method[orIfIgnoringFieldAbsence, return_type[type[T]], modifier[private], parameter[input, defaultValue, ignoreFieldAbsence]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=input, postfix_operators=[],... | Keyword[private] operator[<] identifier[T] operator[>] identifier[T] identifier[orIfIgnoringFieldAbsence] operator[SEP] annotation[@] identifier[NullableDecl] identifier[T] identifier[input] , annotation[@] identifier[NullableDecl] identifier[T] identifier[defaultValue] , Keyword[boolean] identifier[ignoreFieldAbsenc... |
@SuppressWarnings("unchecked")
@Deprecated
public <T extends Item> void send(T item) throws NotConnectedException, InterruptedException, NoResponseException, XMPPErrorException {
publish(item);
} | class class_name[name] begin[{]
method[send, return_type[void], modifier[public], parameter[item]] begin[{]
call[.publish, parameter[member[.item]]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Deprecated] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Item] operator[>] Keyword[void] identifier[send] operator[SEP] identifier[T] identifier[item] operator[SEP] Keyword[throws] id... |
public static List<String> getClasses() {
ArrayList<String> names = new ArrayList<String>();
if(_init._h2oJar != null) {
for( Enumeration<ZipEntry> e = (Enumeration) _init._h2oJar.entries(); e.hasMoreElements(); ) {
String name = e.nextElement().getName();
if( name.endsWith(".class") )
... | class class_name[name] begin[{]
method[getClasses, return_type[type[List]], modifier[public static], parameter[]] begin[{]
local_variable[type[ArrayList], names]
if[binary_operation[member[_init._h2oJar], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=No... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[getClasses] operator[SEP] operator[SEP] {
identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[names] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operato... |
@SuppressWarnings("unchecked")
public static void onSaveState(Bundle bundle) {
final ArrayList<Style> styleList = new ArrayList();
// Create a list of every Style used by a SuperToast in the queue
for (SuperToast superToast : Toaster.getInstance().getQueue()) {
if (superTo... | class class_name[name] begin[{]
method[onSaveState, return_type[void], modifier[public static], parameter[bundle]] begin[{]
local_variable[type[ArrayList], styleList]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=s... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[onSaveState] operator[SEP] identifier[Bundle] identifier[bundle] operator[SEP] {
Keyword[final] identifier[ArrayList] operator[<] identifier[Style] operator[>] identifie... |
@Override
public void putAll(Map<? extends K, ? extends V> map) {
if (isReadyOnly())
throw new UnsupportedOperationException("Can't add properties to read-only dictionary");
this.localMap.putAll(map);
} | class class_name[name] begin[{]
method[putAll, return_type[void], modifier[public], parameter[map]] begin[{]
if[call[.isReadyOnly, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[putAll] operator[SEP] identifier[Map] operator[<] operator[?] Keyword[extends] identifier[K] , operator[?] Keyword[extends] identifier[V] operator[>] identifier[map] operator[SEP] {
Keyword[if] operator[SEP] identifier[isReadyOnly] oper... |
private void commit() {
try {
// Execute any remaining batch inserts and commit the transaction.
insertError.executeBatch();
insertInfo.executeBatch();
connection.commit();
} catch (SQLException ex) {
throw new StorageException(ex);
}
... | class class_name[name] begin[{]
method[commit, return_type[void], modifier[private], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=executeBatch, postfix_operators=[], prefix_operators=[], qualifier=insertError, selectors=[], type_argument... | Keyword[private] Keyword[void] identifier[commit] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[insertError] operator[SEP] identifier[executeBatch] operator[SEP] operator[SEP] operator[SEP] identifier[insertInfo] operator[SEP] identifier[executeBatch] operator[SEP] operator[SEP] operator[SEP... |
public Dictionary invoke(Dictionary args) throws Exception {
String value = time.getCurrentTime();
Hashtable result = new Hashtable();
result.put(RESULT_STATUS,value);
return result;
} | class class_name[name] begin[{]
method[invoke, return_type[type[Dictionary]], modifier[public], parameter[args]] begin[{]
local_variable[type[String], value]
local_variable[type[Hashtable], result]
call[result.put, parameter[member[.RESULT_STATUS], member[.value]]]
retur... | Keyword[public] identifier[Dictionary] identifier[invoke] operator[SEP] identifier[Dictionary] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[value] operator[=] identifier[time] operator[SEP] identifier[getCurrentTime] operator[SEP] operator[SEP] operator[SEP... |
public String hrefTemplate() {
UriTemplateBuilder uriTemplateBuilder = UriTemplate.buildFromTemplate(hrefTemplate);
if (!queryParams.isEmpty()) {
uriTemplateBuilder = uriTemplateBuilder.query(
queryParams.keySet().toArray(new String[queryParams.keySet().size()]));
... | class class_name[name] begin[{]
method[hrefTemplate, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[UriTemplateBuilder], uriTemplateBuilder]
if[call[queryParams.isEmpty, parameter[]]] begin[{]
assign[member[.uriTemplateBuil... | Keyword[public] identifier[String] identifier[hrefTemplate] operator[SEP] operator[SEP] {
identifier[UriTemplateBuilder] identifier[uriTemplateBuilder] operator[=] identifier[UriTemplate] operator[SEP] identifier[buildFromTemplate] operator[SEP] identifier[hrefTemplate] operator[SEP] operator[SEP] Keyword[if] op... |
public static Path copy(Path sourcePath, Path destinationPath,
CopyOption... options) {
return operate(sourcePath, destinationPath, "copy", finalPath -> {
try {
return Files.copy(sourcePath, finalPath, options);
} catch (Exception e) {
return J... | class class_name[name] begin[{]
method[copy, return_type[type[Path]], modifier[public static], parameter[sourcePath, destinationPath, options]] begin[{]
return[call[.operate, parameter[member[.sourcePath], member[.destinationPath], literal["copy"], LambdaExpression(body=[TryStatement(block=[ReturnState... | Keyword[public] Keyword[static] identifier[Path] identifier[copy] operator[SEP] identifier[Path] identifier[sourcePath] , identifier[Path] identifier[destinationPath] , identifier[CopyOption] operator[...] identifier[options] operator[SEP] {
Keyword[return] identifier[operate] operator[SEP] identifier[sourcePa... |
public String getName() {
switch (type) {
case Element.SUBJECT:
return ElementTags.SUBJECT;
case Element.KEYWORDS:
return ElementTags.KEYWORDS;
case Element.AUTHOR:
return ElementTags.AUTHOR;
case Element.TITLE:
... | class class_name[name] begin[{]
method[getName, return_type[type[String]], modifier[public], parameter[]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=SUBJECT, postfix_operators=[], prefix_operators=[], qualifier=Element, selectors=[])], statements=[ReturnStatement(e... | Keyword[public] identifier[String] identifier[getName] operator[SEP] operator[SEP] {
Keyword[switch] operator[SEP] identifier[type] operator[SEP] {
Keyword[case] identifier[Element] operator[SEP] identifier[SUBJECT] operator[:] Keyword[return] identifier[ElementTags] operator[SEP] identifier[SUBJECT]... |
public static CPDefinitionSpecificationOptionValue fetchByC_CSOVI(
long CPDefinitionId, long CPDefinitionSpecificationOptionValueId,
boolean retrieveFromCache) {
return getPersistence()
.fetchByC_CSOVI(CPDefinitionId,
CPDefinitionSpecificationOptionValueId, retrieveFromCache);
} | class class_name[name] begin[{]
method[fetchByC_CSOVI, return_type[type[CPDefinitionSpecificationOptionValue]], modifier[public static], parameter[CPDefinitionId, CPDefinitionSpecificationOptionValueId, retrieveFromCache]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CPDefinitionSpecificationOptionValue] identifier[fetchByC_CSOVI] operator[SEP] Keyword[long] identifier[CPDefinitionId] , Keyword[long] identifier[CPDefinitionSpecificationOptionValueId] , Keyword[boolean] identifier[retrieveFromCache] operator[SEP] {
Keyword[return] ... |
@POST
@Path("getDatabaseProductName")
public String getDatabaseProductName(String id) throws SQLException {
return DatabaseMetaDataHolder.get().get(id).getDatabaseProductName();
} | class class_name[name] begin[{]
method[getDatabaseProductName, return_type[type[String]], modifier[public], parameter[id]] begin[{]
return[call[DatabaseMetaDataHolder.get, parameter[]]]
end[}]
END[}] | annotation[@] identifier[POST] annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[String] identifier[getDatabaseProductName] operator[SEP] identifier[String] identifier[id] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[return] identifier[Datab... |
private void addRelevantBaseTypes(ClassDescriptorDef curType, ArrayList baseTypes)
{
ClassDescriptorDef baseDef;
for (Iterator it = curType.getDirectBaseTypes(); it.hasNext();)
{
baseDef = (ClassDescriptorDef)it.next();
if (!baseDef.getBooleanProperty(Property... | class class_name[name] begin[{]
method[addRelevantBaseTypes, return_type[void], modifier[private], parameter[curType, baseTypes]] begin[{]
local_variable[type[ClassDescriptorDef], baseDef]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(express... | Keyword[private] Keyword[void] identifier[addRelevantBaseTypes] operator[SEP] identifier[ClassDescriptorDef] identifier[curType] , identifier[ArrayList] identifier[baseTypes] operator[SEP] {
identifier[ClassDescriptorDef] identifier[baseDef] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] identifi... |
public void preInvokeMdbAfterActivate(EJSWrapperBase wrapper,
EJSDeployedSupport s,
Object eb, // d414873
Object[] args) throws RemoteException {
// Now perform preinvoke processing that... | class class_name[name] begin[{]
method[preInvokeMdbAfterActivate, return_type[void], modifier[public], parameter[wrapper, s, eb, args]] begin[{]
call[.preInvokeAfterActivate, parameter[member[.wrapper], member[.eb], member[.s], member[.args]]]
local_variable[type[MessageEndpointCollabor... | Keyword[public] Keyword[void] identifier[preInvokeMdbAfterActivate] operator[SEP] identifier[EJSWrapperBase] identifier[wrapper] , identifier[EJSDeployedSupport] identifier[s] , identifier[Object] identifier[eb] , identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifie... |
public static FileInputStream getFileInputStreamPrivileged(final File file) throws FileNotFoundException {
final AtomicReference<FileNotFoundException> exceptionRef = new AtomicReference<FileNotFoundException>();
FileInputStream fis = AccessController.doPrivileged(new PrivilegedAction<FileInputStream>()... | class class_name[name] begin[{]
method[getFileInputStreamPrivileged, return_type[type[FileInputStream]], modifier[public static], parameter[file]] begin[{]
local_variable[type[AtomicReference], exceptionRef]
local_variable[type[FileInputStream], fis]
if[binary_operation[call[exc... | Keyword[public] Keyword[static] identifier[FileInputStream] identifier[getFileInputStreamPrivileged] operator[SEP] Keyword[final] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[FileNotFoundException] {
Keyword[final] identifier[AtomicReference] operator[<] identifier[FileNotFoundExcep... |
public void setCacheNames(Collection<String> names) {
if (names != null) {
for (String name : names) {
getCache(name);
}
dynamic = false;
} else {
dynamic = true;
}
} | class class_name[name] begin[{]
method[setCacheNames, return_type[void], modifier[public], parameter[names]] begin[{]
if[binary_operation[member[.names], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvoca... | Keyword[public] Keyword[void] identifier[setCacheNames] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[names] operator[SEP] {
Keyword[if] operator[SEP] identifier[names] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] i... |
int writeAsciiBytes(byte[] buffer, long bytesToWrite) throws IOException {
if (commPort != null && commPort.isOpen()) {
int cnt = 0;
for (int i = 0; i < bytesToWrite; i++) {
if (writeAsciiByte(buffer[i]) != 2) {
return cnt;
}
... | class class_name[name] begin[{]
method[writeAsciiBytes, return_type[type[int]], modifier[default], parameter[buffer, bytesToWrite]] begin[{]
if[binary_operation[binary_operation[member[.commPort], !=, literal[null]], &&, call[commPort.isOpen, parameter[]]]] begin[{]
local_variable[t... | Keyword[int] identifier[writeAsciiBytes] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] , Keyword[long] identifier[bytesToWrite] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[commPort] operator[!=] Other[null] operator[&&] identifier[com... |
public final String getColumnName(int index) {
assert(verifyTableInvariants());
if ((index < 0) || (index >= m_colCount)) {
throw new IllegalArgumentException("Not a valid column index.");
}
// move to the start of the list of column names
int pos = POS_COL_TYPES + m... | class class_name[name] begin[{]
method[getColumnName, return_type[type[String]], modifier[final public], parameter[index]] begin[{]
AssertStatement(condition=MethodInvocation(arguments=[], member=verifyTableInvariants, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=... | Keyword[public] Keyword[final] identifier[String] identifier[getColumnName] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[assert] operator[SEP] identifier[verifyTableInvariants] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[index... |
public VpnConnectionInner createOrUpdate(String resourceGroupName, String gatewayName, String connectionName, VpnConnectionInner vpnConnectionParameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters).toBlocking().last().body();
} | class class_name[name] begin[{]
method[createOrUpdate, return_type[type[VpnConnectionInner]], modifier[public], parameter[resourceGroupName, gatewayName, connectionName, vpnConnectionParameters]] begin[{]
return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[... | Keyword[public] identifier[VpnConnectionInner] identifier[createOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[gatewayName] , identifier[String] identifier[connectionName] , identifier[VpnConnectionInner] identifier[vpnConnectionParameters] operator[SEP] {
... |
static String fromPackageName(String packageName) {
List<String> tokens = tokenOf(packageName);
return fromTokens(tokens);
} | class class_name[name] begin[{]
method[fromPackageName, return_type[type[String]], modifier[static], parameter[packageName]] begin[{]
local_variable[type[List], tokens]
return[call[.fromTokens, parameter[member[.tokens]]]]
end[}]
END[}] | Keyword[static] identifier[String] identifier[fromPackageName] operator[SEP] identifier[String] identifier[packageName] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[tokens] operator[=] identifier[tokenOf] operator[SEP] identifier[packageName] operator[SEP] operator[SEP] ... |
Resource[] updatePlugin(InputStream is, String realpath, boolean closeStream) throws PageException, IOException, SAXException {
List<Resource> filesDeployed = new ArrayList<Resource>();
deployFilesFromStream(config, config.getPluginDirectory(), is, realpath, closeStream, filesDeployed);
return filesDeployed.toArray(... | class class_name[name] begin[{]
method[updatePlugin, return_type[type[Resource]], modifier[default], parameter[is, realpath, closeStream]] begin[{]
local_variable[type[List], filesDeployed]
call[.deployFilesFromStream, parameter[member[.config], call[config.getPluginDirectory, parameter... | identifier[Resource] operator[SEP] operator[SEP] identifier[updatePlugin] operator[SEP] identifier[InputStream] identifier[is] , identifier[String] identifier[realpath] , Keyword[boolean] identifier[closeStream] operator[SEP] Keyword[throws] identifier[PageException] , identifier[IOException] , identifier[SAXExcept... |
protected Iterator getKeyIterator(final String base, final String modifier, final String key)
{
return new Iterator()
{
// The key ordering count always begins at the start of the ORDER array.
private int i;
public boolean hasNext()
... | class class_name[name] begin[{]
method[getKeyIterator, return_type[type[Iterator]], modifier[protected], parameter[base, modifier, key]] begin[{]
return[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=i)], documenta... | Keyword[protected] identifier[Iterator] identifier[getKeyIterator] operator[SEP] Keyword[final] identifier[String] identifier[base] , Keyword[final] identifier[String] identifier[modifier] , Keyword[final] identifier[String] identifier[key] operator[SEP] {
Keyword[return] Keyword[new] identifier[Iterator] oper... |
public static String preprocessWikiText(String text) {
if (text==null) return "";
text=text.trim();
int length=text.length();
char[] chars=new char[length];
text.getChars(0, length, chars, 0);
StringBuilder sb=new StringBuilder();
boolean blankLine=true;
S... | class class_name[name] begin[{]
method[preprocessWikiText, return_type[type[String]], modifier[public static], parameter[text]] begin[{]
if[binary_operation[member[.text], ==, literal[null]]] begin[{]
return[literal[""]]
else begin[{]
None
end[}]
assign[member[.t... | Keyword[public] Keyword[static] identifier[String] identifier[preprocessWikiText] operator[SEP] identifier[String] identifier[text] operator[SEP] {
Keyword[if] operator[SEP] identifier[text] operator[==] Other[null] operator[SEP] Keyword[return] literal[String] operator[SEP] identifier[text] operator[=] identifi... |
private TreeNodeVisitor train(OnLineStatistics setScore, RegressionDataSet subSet, List<Integer> features, CategoricalData[] catInfo, Random rand)
{
//Should we stop? Stop split(S)
if(subSet.size() < stopSize || setScore.getVarance() <= 0.0 || Double.isNaN(setScore.getVarance()))
return ... | class class_name[name] begin[{]
method[train, return_type[type[TreeNodeVisitor]], modifier[private], parameter[setScore, subSet, features, catInfo, rand]] begin[{]
if[binary_operation[binary_operation[binary_operation[call[subSet.size, parameter[]], <, member[.stopSize]], ||, binary_operation[c... | Keyword[private] identifier[TreeNodeVisitor] identifier[train] operator[SEP] identifier[OnLineStatistics] identifier[setScore] , identifier[RegressionDataSet] identifier[subSet] , identifier[List] operator[<] identifier[Integer] operator[>] identifier[features] , identifier[CategoricalData] operator[SEP] operator[SE... |
private void beforeSessionEvent() throws NewSessionException {
RemoteProxy p = session.getSlot().getProxy();
if (p instanceof TestSessionListener) {
try {
((TestSessionListener) p).beforeSession(session);
} catch (Exception e) {
log.severe("Error running the beforeSessionListener : "... | class class_name[name] begin[{]
method[beforeSessionEvent, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[RemoteProxy], p]
if[binary_operation[member[.p], instanceof, type[TestSessionListener]]] begin[{]
TryStatement(block=[StatementExpressio... | Keyword[private] Keyword[void] identifier[beforeSessionEvent] operator[SEP] operator[SEP] Keyword[throws] identifier[NewSessionException] {
identifier[RemoteProxy] identifier[p] operator[=] identifier[session] operator[SEP] identifier[getSlot] operator[SEP] operator[SEP] operator[SEP] identifier[getProxy] operat... |
public static void unzip(final File zip, final File patchDir) throws IOException {
try (final ZipFile zipFile = new ZipFile(zip)){
unzip(zipFile, patchDir);
}
} | class class_name[name] begin[{]
method[unzip, return_type[void], modifier[public static], parameter[zip, patchDir]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=zipFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]... | Keyword[public] Keyword[static] Keyword[void] identifier[unzip] operator[SEP] Keyword[final] identifier[File] identifier[zip] , Keyword[final] identifier[File] identifier[patchDir] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] operator[SEP] Keyword[final] identifier[ZipFile] identifier[zi... |
static List<Map<String, String>> convertConfigToAttributes(String configPath,
List<ChildData> currentData) {
List<Map<String, String>> attributes = new ArrayList<Map<String, String>>();
if (CommonUtils.isEmpty(currentData)) {
ret... | class class_name[name] begin[{]
method[convertConfigToAttributes, return_type[type[List]], modifier[static], parameter[configPath, currentData]] begin[{]
local_variable[type[List], attributes]
if[call[CommonUtils.isEmpty, parameter[member[.currentData]]]] begin[{]
return[mem... | Keyword[static] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[convertConfigToAttributes] operator[SEP] identifier[String] identifier[configPath] , identifier[List] operator[<] identifier[ChildData] operator[>] identifier[currentData... |
private void initPath(IAtomContainer molecule) {
for (int i = 0; i < molecule.getAtomCount(); i++) {
IAtom atom = molecule.getAtom(i);
atom.setProperty(PATH, new ArrayList<IAtom>());
}
} | class class_name[name] begin[{]
method[initPath, return_type[void], modifier[private], parameter[molecule]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[M... | Keyword[private] Keyword[void] identifier[initPath] operator[SEP] identifier[IAtomContainer] identifier[molecule] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[molecule] operator[SEP] identifier[getAtomCount] operator... |
static <T> Key<T> get(Class<T> type, AnnotationStrategy annotationStrategy) {
return new Key<T>(type, annotationStrategy);
} | class class_name[name] begin[{]
method[get, return_type[type[Key]], modifier[static], parameter[type, annotationStrategy]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=annotationStrategy... | Keyword[static] operator[<] identifier[T] operator[>] identifier[Key] operator[<] identifier[T] operator[>] identifier[get] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , identifier[AnnotationStrategy] identifier[annotationStrategy] operator[SEP] {
Keyword[return] Keywo... |
@Override
protected String doBuildColumnString(String dm) {
StringBuilder sb = new StringBuilder();
sb.append(dm).append(urlId);
sb.append(dm).append(docId);
sb.append(dm).append(order);
sb.append(dm).append(queryId);
sb.append(dm).append(queryRequestedAt);
sb... | class class_name[name] begin[{]
method[doBuildColumnString, return_type[type[String]], modifier[protected], parameter[dm]] begin[{]
local_variable[type[StringBuilder], sb]
call[sb.append, parameter[member[.dm]]]
call[sb.append, parameter[member[.dm]]]
cal... | annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[doBuildColumnString] operator[SEP] identifier[String] identifier[dm] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier... |
public static void initialize(KeenClient client) {
if (client == null) {
throw new IllegalArgumentException("Client must not be null");
}
if (ClientSingleton.INSTANCE.client != null) {
// Do nothing.
return;
}
ClientSingleton.INSTANCE.client ... | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[public static], parameter[client]] begin[{]
if[binary_operation[member[.client], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operato... | Keyword[public] Keyword[static] Keyword[void] identifier[initialize] operator[SEP] identifier[KeenClient] identifier[client] operator[SEP] {
Keyword[if] operator[SEP] identifier[client] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[S... |
public static <T> boolean contains(T[] objectArray, T value)
{
return ArrayIterate.anySatisfyWith(objectArray, Predicates2.equal(), value);
} | class class_name[name] begin[{]
method[contains, return_type[type[boolean]], modifier[public static], parameter[objectArray, value]] begin[{]
return[call[ArrayIterate.anySatisfyWith, parameter[member[.objectArray], call[Predicates2.equal, parameter[]], member[.value]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[boolean] identifier[contains] operator[SEP] identifier[T] operator[SEP] operator[SEP] identifier[objectArray] , identifier[T] identifier[value] operator[SEP] {
Keyword[return] identifier[ArrayIterate] operator[SEP] identifier[anySatis... |
public void displayResourceInfo(List<CmsResource> resources, String messageKey) {
m_infoResources = Lists.newArrayList(resources);
if (m_infoComponent != null) {
m_mainPanel.removeComponent(m_infoComponent);
m_infoComponent = null;
}
if ((resources != null) && !r... | class class_name[name] begin[{]
method[displayResourceInfo, return_type[void], modifier[public], parameter[resources, messageKey]] begin[{]
assign[member[.m_infoResources], call[Lists.newArrayList, parameter[member[.resources]]]]
if[binary_operation[member[.m_infoComponent], !=,... | Keyword[public] Keyword[void] identifier[displayResourceInfo] operator[SEP] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[resources] , identifier[String] identifier[messageKey] operator[SEP] {
identifier[m_infoResources] operator[=] identifier[Lists] operator[SEP] identifier[newArr... |
public TileBasedLayer createLayer(String id, TileConfiguration conf, String url) {
List<String> urls = new ArrayList<String>();
urls.add(url);
return createLayer(id, conf, urls);
} | class class_name[name] begin[{]
method[createLayer, return_type[type[TileBasedLayer]], modifier[public], parameter[id, conf, url]] begin[{]
local_variable[type[List], urls]
call[urls.add, parameter[member[.url]]]
return[call[.createLayer, parameter[member[.id], member[.conf], me... | Keyword[public] identifier[TileBasedLayer] identifier[createLayer] operator[SEP] identifier[String] identifier[id] , identifier[TileConfiguration] identifier[conf] , identifier[String] identifier[url] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[urls] operator[=] Keywo... |
public final void release() {
synchronized (this.LOCK) {
if ((this.owner != null)
&& (this.owner.get() == Thread.currentThread())) {
this.acquire--;
if (this.acquire == 0) {
this.owner = null;
this.LOCK.notify();
}
return;
}
if ((this.owner != null) && (this.owner.get() == n... | class class_name[name] begin[{]
method[release, return_type[void], modifier[final public], parameter[]] begin[{]
SYNCHRONIZED[THIS[member[None.LOCK]]] BEGIN[{]
if[binary_operation[binary_operation[THIS[member[None.owner]], !=, literal[null]], &&, binary_operation[THIS[me... | Keyword[public] Keyword[final] Keyword[void] identifier[release] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] identifier[LOCK] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[owner] operator[!=] Other[null]... |
public static char getChar(MemorySegment[] segments, int offset) {
if (inFirstSegment(segments, offset, 2)) {
return segments[0].getChar(offset);
} else {
return getCharMultiSegments(segments, offset);
}
} | class class_name[name] begin[{]
method[getChar, return_type[type[char]], modifier[public static], parameter[segments, offset]] begin[{]
if[call[.inFirstSegment, parameter[member[.segments], member[.offset], literal[2]]]] begin[{]
return[member[.segments]]
else begin[{]
... | Keyword[public] Keyword[static] Keyword[char] identifier[getChar] operator[SEP] identifier[MemorySegment] operator[SEP] operator[SEP] identifier[segments] , Keyword[int] identifier[offset] operator[SEP] {
Keyword[if] operator[SEP] identifier[inFirstSegment] operator[SEP] identifier[segments] , identifier[offse... |
@Nonnull
@Nonempty
public static String getCheckBoxHiddenFieldName (@Nonnull @Nonempty final String sFieldName)
{
ValueEnforcer.notEmpty (sFieldName, "FieldName");
return DEFAULT_CHECKBOX_HIDDEN_FIELD_PREFIX + sFieldName;
} | class class_name[name] begin[{]
method[getCheckBoxHiddenFieldName, return_type[type[String]], modifier[public static], parameter[sFieldName]] begin[{]
call[ValueEnforcer.notEmpty, parameter[member[.sFieldName], literal["FieldName"]]]
return[binary_operation[member[.DEFAULT_CHECKBOX_HIDD... | annotation[@] identifier[Nonnull] annotation[@] identifier[Nonempty] Keyword[public] Keyword[static] identifier[String] identifier[getCheckBoxHiddenFieldName] operator[SEP] annotation[@] identifier[Nonnull] annotation[@] identifier[Nonempty] Keyword[final] identifier[String] identifier[sFieldName] operator[SEP] {
... |
@Override
public Response sendFAX(String CorpNum, int ItemCode, String MgtKey,
String Sender, String Receiver) throws PopbillException {
return sendFAX(CorpNum, ItemCode, MgtKey, Sender, Receiver, null);
} | class class_name[name] begin[{]
method[sendFAX, return_type[type[Response]], modifier[public], parameter[CorpNum, ItemCode, MgtKey, Sender, Receiver]] begin[{]
return[call[.sendFAX, parameter[member[.CorpNum], member[.ItemCode], member[.MgtKey], member[.Sender], member[.Receiver], literal[null]]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[Response] identifier[sendFAX] operator[SEP] identifier[String] identifier[CorpNum] , Keyword[int] identifier[ItemCode] , identifier[String] identifier[MgtKey] , identifier[String] identifier[Sender] , identifier[String] identifier[Receiver] operator[SEP]... |
public synchronized Object setProperty(
final String key,
final String value)
{
String oldValue = super.getProperty(key);
Object object = super.setProperty(key, value);
if ((oldValue == null) && (object != null)) {
oldValue = object.toString();
}
... | class class_name[name] begin[{]
method[setProperty, return_type[type[Object]], modifier[synchronized public], parameter[key, value]] begin[{]
local_variable[type[String], oldValue]
local_variable[type[Object], object]
if[binary_operation[binary_operation[member[.oldValue], ==, l... | Keyword[public] Keyword[synchronized] identifier[Object] identifier[setProperty] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] identifier[String] identifier[value] operator[SEP] {
identifier[String] identifier[oldValue] operator[=] Keyword[super] operator[SEP] identifier[getPr... |
private boolean isWhitespace(char c) {
if (c > 0x20) {
return false;
}
if ((c == 0x20) || (c == 0x0a) || (c == 0x09) || (c == 0x0d)) {
return true;
}
return false; // illegal ...
} | class class_name[name] begin[{]
method[isWhitespace, return_type[type[boolean]], modifier[private], parameter[c]] begin[{]
if[binary_operation[member[.c], >, literal[0x20]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
if[binary_operation... | Keyword[private] Keyword[boolean] identifier[isWhitespace] operator[SEP] Keyword[char] identifier[c] operator[SEP] {
Keyword[if] operator[SEP] identifier[c] operator[>] literal[Integer] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[if] operator[SEP] operator[SE... |
public void serializeValues( JsonWriter writer, M values, JsonSerializationContext ctx, JsonSerializerParameters params ) {
if ( !values.isEmpty() ) {
Map<K, V> map = values;
if ( ctx.isOrderMapEntriesByKeys() && !(values instanceof SortedMap<?, ?>) ) {
map = new TreeMap<... | class class_name[name] begin[{]
method[serializeValues, return_type[void], modifier[public], parameter[writer, values, ctx, params]] begin[{]
if[call[values.isEmpty, parameter[]]] begin[{]
local_variable[type[Map], map]
if[binary_operation[call[ctx.isOrderMap... | Keyword[public] Keyword[void] identifier[serializeValues] operator[SEP] identifier[JsonWriter] identifier[writer] , identifier[M] identifier[values] , identifier[JsonSerializationContext] identifier[ctx] , identifier[JsonSerializerParameters] identifier[params] operator[SEP] {
Keyword[if] operator[SEP] operat... |
@Nonnull
public static IntConsumer intConsumerFrom(Consumer<IntConsumerBuilder> buildingFunction) {
IntConsumerBuilder builder = new IntConsumerBuilder();
buildingFunction.accept(builder);
return builder.build();
} | class class_name[name] begin[{]
method[intConsumerFrom, return_type[type[IntConsumer]], modifier[public static], parameter[buildingFunction]] begin[{]
local_variable[type[IntConsumerBuilder], builder]
call[buildingFunction.accept, parameter[member[.builder]]]
return[call[builder... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[IntConsumer] identifier[intConsumerFrom] operator[SEP] identifier[Consumer] operator[<] identifier[IntConsumerBuilder] operator[>] identifier[buildingFunction] operator[SEP] {
identifier[IntConsumerBuilder] identifier[builder] operator[... |
public static <T> Stream<T> iterate(final T init, final BooleanSupplier hasNext, final UnaryOperator<T> f) {
N.checkArgNotNull(hasNext);
N.checkArgNotNull(f);
return of(new ObjIteratorEx<T>() {
private T t = (T) NONE;
private boolean hasNextVal = false;
... | class class_name[name] begin[{]
method[iterate, return_type[type[Stream]], modifier[public static], parameter[init, hasNext, f]] begin[{]
call[N.checkArgNotNull, parameter[member[.hasNext]]]
call[N.checkArgNotNull, parameter[member[.f]]]
return[call[.of, parameter[ClassC... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Stream] operator[<] identifier[T] operator[>] identifier[iterate] operator[SEP] Keyword[final] identifier[T] identifier[init] , Keyword[final] identifier[BooleanSupplier] identifier[hasNext] , Keyword[final] identifier[UnaryOperator] ope... |
public IfcSimplePropertyTemplateTypeEnum createIfcSimplePropertyTemplateTypeEnumFromString(EDataType eDataType,
String initialValue) {
IfcSimplePropertyTemplateTypeEnum result = IfcSimplePropertyTemplateTypeEnum.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '"... | class class_name[name] begin[{]
method[createIfcSimplePropertyTemplateTypeEnumFromString, return_type[type[IfcSimplePropertyTemplateTypeEnum]], modifier[public], parameter[eDataType, initialValue]] begin[{]
local_variable[type[IfcSimplePropertyTemplateTypeEnum], result]
if[binary_operat... | Keyword[public] identifier[IfcSimplePropertyTemplateTypeEnum] identifier[createIfcSimplePropertyTemplateTypeEnumFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] {
identifier[IfcSimplePropertyTemplateTypeEnum] identifier[result] ope... |
public <T> T head(final Class<T> type, @DelegatesTo(HttpConfig.class) final Closure closure) {
return type.cast(interceptors.get(HttpVerb.HEAD).apply(configureRequest(type, HttpVerb.HEAD, closure), this::doHead));
} | class class_name[name] begin[{]
method[head, return_type[type[T]], modifier[public], parameter[type, closure]] begin[{]
return[call[type.cast, parameter[call[interceptors.get, parameter[member[HttpVerb.HEAD]]]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[head] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , annotation[@] identifier[DelegatesTo] operator[SEP] identifier[HttpConfig] operator[SEP] Keyword[class] operator[SEP] Keyword[fina... |
public static void packDirectory(File dir, ZipOutputStream zos) throws IOException {
byte[] buffer = new byte[64 * 1024]; // a reusable buffer
try {
traverseAndWrite(dir, zos, new StringBuilder(), true, buffer);
} finally {
close(zos);
}
} | class class_name[name] begin[{]
method[packDirectory, return_type[void], modifier[public static], parameter[dir, zos]] begin[{]
local_variable[type[byte], buffer]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dir, postfix_operators=[], pre... | Keyword[public] Keyword[static] Keyword[void] identifier[packDirectory] operator[SEP] identifier[File] identifier[dir] , identifier[ZipOutputStream] identifier[zos] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] operator[=] Keyword[new] Keywo... |
public static snmpuser[] get(nitro_service service, options option) throws Exception{
snmpuser obj = new snmpuser();
snmpuser[] response = (snmpuser[])obj.get_resources(service,option);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[snmpuser]], modifier[public static], parameter[service, option]] begin[{]
local_variable[type[snmpuser], obj]
local_variable[type[snmpuser], response]
return[member[.response]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[snmpuser] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[options] identifier[option] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[snmpuser] identifier[obj] operator[=] Keyword[new... |
public static UnitResponse createException(Throwable e, String errMsg) {
return UnitResponse.createException(e).setMessage(errMsg);
} | class class_name[name] begin[{]
method[createException, return_type[type[UnitResponse]], modifier[public static], parameter[e, errMsg]] begin[{]
return[call[UnitResponse.createException, parameter[member[.e]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[UnitResponse] identifier[createException] operator[SEP] identifier[Throwable] identifier[e] , identifier[String] identifier[errMsg] operator[SEP] {
Keyword[return] identifier[UnitResponse] operator[SEP] identifier[createException] operator[SEP] identifier[e] operator[S... |
@SuppressWarnings("unused") // called through reflection by RequestServer
public ModelMetricsListSchemaV3 score(int version, ModelMetricsListSchemaV3 s) {
// parameters checking:
if (null == s.model) throw new H2OIllegalArgumentException("model", "predict", s.model);
if (null == DKV.get(s.model.name)) thr... | class class_name[name] begin[{]
method[score, return_type[type[ModelMetricsListSchemaV3]], modifier[public], parameter[version, s]] begin[{]
if[binary_operation[literal[null], ==, member[s.model]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_o... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[ModelMetricsListSchemaV3] identifier[score] operator[SEP] Keyword[int] identifier[version] , identifier[ModelMetricsListSchemaV3] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] Other[null] ... |
public List<NaaccrValidationError> getAllValidationErrors() {
List<NaaccrValidationError> results = new ArrayList<>(getValidationErrors());
results.addAll(getItems().stream().filter(item -> item.getValidationError() != null).map(Item::getValidationError).collect(Collectors.toList()));
for (Tumor... | class class_name[name] begin[{]
method[getAllValidationErrors, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], results]
call[results.addAll, parameter[call[.getItems, parameter[]]]]
ForStatement(body=StatementExpression(expression=Meth... | Keyword[public] identifier[List] operator[<] identifier[NaaccrValidationError] operator[>] identifier[getAllValidationErrors] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[NaaccrValidationError] operator[>] identifier[results] operator[=] Keyword[new] identifier[ArrayList] operator[<] ope... |
public long createLO(int mode) throws SQLException {
if (conn.getAutoCommit()) {
throw new PSQLException(GT.tr("Large Objects may not be used in auto-commit mode."),
PSQLState.NO_ACTIVE_SQL_TRANSACTION);
}
FastpathArg[] args = new FastpathArg[1];
args[0] = new FastpathArg(mode);
retu... | class class_name[name] begin[{]
method[createLO, return_type[type[long]], modifier[public], parameter[mode]] begin[{]
if[call[conn.getAutoCommit, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix... | Keyword[public] Keyword[long] identifier[createLO] operator[SEP] Keyword[int] identifier[mode] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[conn] operator[SEP] identifier[getAutoCommit] operator[SEP] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[... |
public String build(Protocol protocol, String oauthToken, String oauthTokenSecret)
throws IOException, OAuthException, URISyntaxException {
OAuthAccessor accessor = new OAuthAccessor(consumer);
accessor.tokenSecret = oauthTokenSecret;
Map<String, String> parameters = new HashMap<String, String>();
... | class class_name[name] begin[{]
method[build, return_type[type[String]], modifier[public], parameter[protocol, oauthToken, oauthTokenSecret]] begin[{]
local_variable[type[OAuthAccessor], accessor]
assign[member[accessor.tokenSecret], member[.oauthTokenSecret]]
local_variable[typ... | Keyword[public] identifier[String] identifier[build] operator[SEP] identifier[Protocol] identifier[protocol] , identifier[String] identifier[oauthToken] , identifier[String] identifier[oauthTokenSecret] operator[SEP] Keyword[throws] identifier[IOException] , identifier[OAuthException] , identifier[URISyntaxExceptio... |
protected Timeout parseTimeout(XMLStreamReader reader, Boolean isXa) throws XMLStreamException,
ParserException, ValidateException
{
Long blockingTimeoutMillis = null;
Long allocationRetryWaitMillis = null;
Integer idleTimeoutMinutes = null;
Integer allocationRetry = null;
Integer... | class class_name[name] begin[{]
method[parseTimeout, return_type[type[Timeout]], modifier[protected], parameter[reader, isXa]] begin[{]
local_variable[type[Long], blockingTimeoutMillis]
local_variable[type[Long], allocationRetryWaitMillis]
local_variable[type[Integer], idleTimeoutMinute... | Keyword[protected] identifier[Timeout] identifier[parseTimeout] operator[SEP] identifier[XMLStreamReader] identifier[reader] , identifier[Boolean] identifier[isXa] operator[SEP] Keyword[throws] identifier[XMLStreamException] , identifier[ParserException] , identifier[ValidateException] {
identifier[Long] iden... |
private GeneralMatrix fillVMatrix( int dim, Coordinate[] controlPoints ) {
int controlPointsNum = controlPoints.length;
GeneralMatrix V = new GeneralMatrix(controlPointsNum + 3, 1);
for( int i = 0; i < controlPointsNum; i++ ) {
V.setElement(i, 0, controlPoints[i].z);
}
... | class class_name[name] begin[{]
method[fillVMatrix, return_type[type[GeneralMatrix]], modifier[private], parameter[dim, controlPoints]] begin[{]
local_variable[type[int], controlPointsNum]
local_variable[type[GeneralMatrix], V]
ForStatement(body=BlockStatement(label=None, statements=[St... | Keyword[private] identifier[GeneralMatrix] identifier[fillVMatrix] operator[SEP] Keyword[int] identifier[dim] , identifier[Coordinate] operator[SEP] operator[SEP] identifier[controlPoints] operator[SEP] {
Keyword[int] identifier[controlPointsNum] operator[=] identifier[controlPoints] operator[SEP] identifier[le... |
public static void setContextStrategy(ContextStrategy contextStrategy) {
if (ContextTrampoline.contextStrategy != null) {
throw new IllegalStateException("contextStrategy was already set");
}
if (contextStrategy == null) {
throw new NullPointerException("contextStrategy");
}
ContextTra... | class class_name[name] begin[{]
method[setContextStrategy, return_type[void], modifier[public static], parameter[contextStrategy]] begin[{]
if[binary_operation[member[ContextTrampoline.contextStrategy], !=, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[L... | Keyword[public] Keyword[static] Keyword[void] identifier[setContextStrategy] operator[SEP] identifier[ContextStrategy] identifier[contextStrategy] operator[SEP] {
Keyword[if] operator[SEP] identifier[ContextTrampoline] operator[SEP] identifier[contextStrategy] operator[!=] Other[null] operator[SEP] {
... |
private static Moment moveEventuallyToLS(Moment adjusted) {
PlainDate date = adjusted.getDateUTC();
PlainTime time = adjusted.getTimeUTC();
if (
(LeapSeconds.getInstance().getShift(date) == 1)
&& (time.getHour() == 23)
&& (time.getMinute() == 59)
... | class class_name[name] begin[{]
method[moveEventuallyToLS, return_type[type[Moment]], modifier[private static], parameter[adjusted]] begin[{]
local_variable[type[PlainDate], date]
local_variable[type[PlainTime], time]
if[binary_operation[binary_operation[binary_operation[binary_... | Keyword[private] Keyword[static] identifier[Moment] identifier[moveEventuallyToLS] operator[SEP] identifier[Moment] identifier[adjusted] operator[SEP] {
identifier[PlainDate] identifier[date] operator[=] identifier[adjusted] operator[SEP] identifier[getDateUTC] operator[SEP] operator[SEP] operator[SEP] identifie... |
public static EventType map(Event event) {
EventType eventType = new EventType();
eventType.setTimestamp(Converter.convertDate(event.getTimestamp()));
eventType.setEventType(convertEventType(event.getEventType()));
OriginatorType origType = mapOriginator(event.getOriginator());
e... | class class_name[name] begin[{]
method[map, return_type[type[EventType]], modifier[public static], parameter[event]] begin[{]
local_variable[type[EventType], eventType]
call[eventType.setTimestamp, parameter[call[Converter.convertDate, parameter[call[event.getTimestamp, parameter[]]]]]]... | Keyword[public] Keyword[static] identifier[EventType] identifier[map] operator[SEP] identifier[Event] identifier[event] operator[SEP] {
identifier[EventType] identifier[eventType] operator[=] Keyword[new] identifier[EventType] operator[SEP] operator[SEP] operator[SEP] identifier[eventType] operator[SEP] identifi... |
@Override
public CommerceCurrency findByG_P_A_First(long groupId, boolean primary,
boolean active, OrderByComparator<CommerceCurrency> orderByComparator)
throws NoSuchCurrencyException {
CommerceCurrency commerceCurrency = fetchByG_P_A_First(groupId,
primary, active, orderByComparator);
if (commerceCurren... | class class_name[name] begin[{]
method[findByG_P_A_First, return_type[type[CommerceCurrency]], modifier[public], parameter[groupId, primary, active, orderByComparator]] begin[{]
local_variable[type[CommerceCurrency], commerceCurrency]
if[binary_operation[member[.commerceCurrency], !=, l... | annotation[@] identifier[Override] Keyword[public] identifier[CommerceCurrency] identifier[findByG_P_A_First] operator[SEP] Keyword[long] identifier[groupId] , Keyword[boolean] identifier[primary] , Keyword[boolean] identifier[active] , identifier[OrderByComparator] operator[<] identifier[CommerceCurrency] operator[... |
@Override
public ItemDocument build() {
prepareBuild();
return factory.getItemDocument((ItemIdValue) this.entityIdValue,
this.labels, this.descriptions, this.aliases,
getStatementGroups(), this.siteLinks, this.revisionId);
} | class class_name[name] begin[{]
method[build, return_type[type[ItemDocument]], modifier[public], parameter[]] begin[{]
call[.prepareBuild, parameter[]]
return[call[factory.getItemDocument, parameter[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selector... | annotation[@] identifier[Override] Keyword[public] identifier[ItemDocument] identifier[build] operator[SEP] operator[SEP] {
identifier[prepareBuild] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[factory] operator[SEP] identifier[getItemDocument] operator[SEP] operator[SEP] identifier[ItemI... |
public static int getColumns(final Sheet sheet) {
ArgUtils.notNull(sheet, "sheet");
int minRowIndex = sheet.getFirstRowNum();
int maxRowIndex = sheet.getLastRowNum();
int maxColumnsIndex = 0;
for(int i = minRowIndex; i <= maxRowIndex; i++) {
final Row row = sh... | class class_name[name] begin[{]
method[getColumns, return_type[type[int]], modifier[public static], parameter[sheet]] begin[{]
call[ArgUtils.notNull, parameter[member[.sheet], literal["sheet"]]]
local_variable[type[int], minRowIndex]
local_variable[type[int], maxRowIndex]
... | Keyword[public] Keyword[static] Keyword[int] identifier[getColumns] operator[SEP] Keyword[final] identifier[Sheet] identifier[sheet] operator[SEP] {
identifier[ArgUtils] operator[SEP] identifier[notNull] operator[SEP] identifier[sheet] , literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[minRow... |
@Override
public Subject delegate(String roleName, String appName) {
Subject runAsSubject = getRunAsSubjectFromProvider(roleName, appName);
return runAsSubject;
} | class class_name[name] begin[{]
method[delegate, return_type[type[Subject]], modifier[public], parameter[roleName, appName]] begin[{]
local_variable[type[Subject], runAsSubject]
return[member[.runAsSubject]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Subject] identifier[delegate] operator[SEP] identifier[String] identifier[roleName] , identifier[String] identifier[appName] operator[SEP] {
identifier[Subject] identifier[runAsSubject] operator[=] identifier[getRunAsSubjectFromProvider] operator[SEP... |
public final void mT__14() throws RecognitionException {
try {
int _type = T__14;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalXbaseWithAnnotations.g:12:7: ( '||' )
// InternalXbaseWithAnnotations.g:12:9: '||'
{
match("||");
... | class class_name[name] begin[{]
method[mT__14, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=T__14, postfix_operators=[], prefix_operators=[]... | Keyword[public] Keyword[final] Keyword[void] identifier[mT__14] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
Keyword[int] identifier[_type] operator[=] identifier[T__14] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKE... |
public static String getKeysWhereSQL(Class<?> clazz)
throws NoKeyColumnAnnotationException {
List<Field> keyFields = DOInfoReader.getKeyColumns(clazz);
String where = joinWhere(keyFields, "AND");
return autoSetSoftDeleted("WHERE " + where, clazz);
} | class class_name[name] begin[{]
method[getKeysWhereSQL, return_type[type[String]], modifier[public static], parameter[clazz]] begin[{]
local_variable[type[List], keyFields]
local_variable[type[String], where]
return[call[.autoSetSoftDeleted, parameter[binary_operation[literal["WHERE "],... | Keyword[public] Keyword[static] identifier[String] identifier[getKeysWhereSQL] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] Keyword[throws] identifier[NoKeyColumnAnnotationException] {
identifier[List] operator[<] identifier[Field] operator[>] identifier[key... |
@Override
public final boolean write (final ITask task, final Session session, final ByteBuffer src, final int logicalBlockAddress, final long length) throws Exception {
if (src.remaining() < length) { throw new IllegalArgumentException("Source buffer is too small. Buffer size: " + src.remaining() + " Expe... | class class_name[name] begin[{]
method[write, return_type[type[boolean]], modifier[final public], parameter[task, session, src, logicalBlockAddress, length]] begin[{]
if[binary_operation[call[src.remaining, parameter[]], <, member[.length]]] begin[{]
ThrowStatement(expression=ClassC... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[boolean] identifier[write] operator[SEP] Keyword[final] identifier[ITask] identifier[task] , Keyword[final] identifier[Session] identifier[session] , Keyword[final] identifier[ByteBuffer] identifier[src] , Keyword[final] Keyword[int] identifie... |
public CmsContainerElementData getCachedElement(String clientId) {
if (m_elements.containsKey(clientId)) {
return m_elements.get(clientId);
}
return null;
} | class class_name[name] begin[{]
method[getCachedElement, return_type[type[CmsContainerElementData]], modifier[public], parameter[clientId]] begin[{]
if[call[m_elements.containsKey, parameter[member[.clientId]]]] begin[{]
return[call[m_elements.get, parameter[member[.clientId]]]]
... | Keyword[public] identifier[CmsContainerElementData] identifier[getCachedElement] operator[SEP] identifier[String] identifier[clientId] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_elements] operator[SEP] identifier[containsKey] operator[SEP] identifier[clientId] operator[SEP] operator[SEP] {
... |
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "valueComponent")
public JAXBElement<ValuePropertyType> createValueComponent(ValuePropertyType value) {
return new JAXBElement<ValuePropertyType>(_ValueComponent_QNAME, ValuePropertyType.class, null, value);
} | class class_name[name] begin[{]
method[createValueComponent, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_ValueComponent_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(pos... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[ValuePropertyType] operator[>] identifier[createValueComponent] operator[SEP] identifier[V... |
private void
findResolvConf(String file) {
InputStream in = null;
try {
in = new FileInputStream(file);
}
catch (FileNotFoundException e) {
return;
}
InputStreamReader isr = new InputStreamReader(in);
BufferedReader br = new BufferedReader(isr);
List lserver = new ArrayList(0);
List lsearch = new ArrayList... | class class_name[name] begin[{]
method[findResolvConf, return_type[void], modifier[private], parameter[file]] begin[{]
local_variable[type[InputStream], in]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=in, postfix_operators=[], prefix_operator... | Keyword[private] Keyword[void] identifier[findResolvConf] operator[SEP] identifier[String] identifier[file] operator[SEP] {
identifier[InputStream] identifier[in] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[in] operator[=] Keyword[new] identifier[FileInputStream] operator[SEP] iden... |
ExecutionResult executeSync(Supplier<ExecutionResult> supplier) {
for (PolicyExecutor<Policy<Object>> policyExecutor : policyExecutors)
supplier = policyExecutor.supply(supplier);
ExecutionResult result = supplier.get();
completed = result.isComplete();
executor.handleComplete(result, this);
... | class class_name[name] begin[{]
method[executeSync, return_type[type[ExecutionResult]], modifier[default], parameter[supplier]] begin[{]
ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=supplier, postfix_operators=[], prefix_operators=[], qualifier=, select... | identifier[ExecutionResult] identifier[executeSync] operator[SEP] identifier[Supplier] operator[<] identifier[ExecutionResult] operator[>] identifier[supplier] operator[SEP] {
Keyword[for] operator[SEP] identifier[PolicyExecutor] operator[<] identifier[Policy] operator[<] identifier[Object] operator[>] operator[... |
@Override protected void dumpData(PrintWriter pw)
{
DateFormat df = new SimpleDateFormat("HH:mm:ss");
pw.println(" [Data");
for (Object item : m_data)
{
pw.println(" " + df.format((Date) item));
}
pw.println(" ]");
} | class class_name[name] begin[{]
method[dumpData, return_type[void], modifier[protected], parameter[pw]] begin[{]
local_variable[type[DateFormat], df]
call[pw.println, parameter[literal[" [Data"]]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expr... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[dumpData] operator[SEP] identifier[PrintWriter] identifier[pw] operator[SEP] {
identifier[DateFormat] identifier[df] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] literal[String] operator[SEP] operator[SEP] ident... |
public static void runExample(
AdManagerServices adManagerServices, AdManagerSession session, long proposalId)
throws RemoteException {
// Get the WorkflowRequestService.
WorkflowRequestServiceInterface workflowRequestService =
adManagerServices.get(session, WorkflowRequestServiceInterface.c... | class class_name[name] begin[{]
method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session, proposalId]] begin[{]
local_variable[type[WorkflowRequestServiceInterface], workflowRequestService]
local_variable[type[StatementBuilder], statementBuilder]
... | Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] , Keyword[long] identifier[proposalId] operator[SEP] Keyword[throws] identifier[RemoteException] {
identifier[Workflo... |
public static BufferedImage renderDOTImage(Reader dotReader) throws IOException {
InputStream pngIs = runDOT(dotReader, "png");
BufferedImage img = ImageIO.read(pngIs);
pngIs.close();
return img;
} | class class_name[name] begin[{]
method[renderDOTImage, return_type[type[BufferedImage]], modifier[public static], parameter[dotReader]] begin[{]
local_variable[type[InputStream], pngIs]
local_variable[type[BufferedImage], img]
call[pngIs.close, parameter[]]
return[member... | Keyword[public] Keyword[static] identifier[BufferedImage] identifier[renderDOTImage] operator[SEP] identifier[Reader] identifier[dotReader] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[InputStream] identifier[pngIs] operator[=] identifier[runDOT] operator[SEP] identifier[dotReader] , liter... |
@Nonnull
public static LDblToCharFunction dblToCharFunctionFrom(Consumer<LDblToCharFunctionBuilder> buildingFunction) {
LDblToCharFunctionBuilder builder = new LDblToCharFunctionBuilder();
buildingFunction.accept(builder);
return builder.build();
} | class class_name[name] begin[{]
method[dblToCharFunctionFrom, return_type[type[LDblToCharFunction]], modifier[public static], parameter[buildingFunction]] begin[{]
local_variable[type[LDblToCharFunctionBuilder], builder]
call[buildingFunction.accept, parameter[member[.builder]]]
... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[LDblToCharFunction] identifier[dblToCharFunctionFrom] operator[SEP] identifier[Consumer] operator[<] identifier[LDblToCharFunctionBuilder] operator[>] identifier[buildingFunction] operator[SEP] {
identifier[LDblToCharFunctionBuilder] id... |
public SetPlatformApplicationAttributesRequest withAttributes(java.util.Map<String, String> attributes) {
setAttributes(attributes);
return this;
} | class class_name[name] begin[{]
method[withAttributes, return_type[type[SetPlatformApplicationAttributesRequest]], modifier[public], parameter[attributes]] begin[{]
call[.setAttributes, parameter[member[.attributes]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[SetPlatformApplicationAttributesRequest] identifier[withAttributes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[attributes] operator[SEP] {
identifier[setAttribut... |
@SuppressWarnings("unchecked")
static <T> T stringToType(String str, Class<T> clazz) {
try {
final Function<String, ?> func = supportedElementTypes.get(clazz);
if (func != null) {
return (T) func.apply(str);
}
} catch (NumberFormatException e) {
... | class class_name[name] begin[{]
method[stringToType, return_type[type[T]], modifier[static], parameter[str, clazz]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=clazz, ... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[stringToType] operator[SEP] identifier[String] identifier[str] , identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] ... |
public final WeeklyOpeningHours compress() {
final Map<HourRanges, List<DayOfTheWeek>> map = new HashMap<>();
for (final DayOpeningHours doh : weeklyOpeningHours) {
final HourRanges ranges = doh.getHourRanges().compress();
List<DayOfTheWeek> dayList = map.get(ranges);
... | class class_name[name] begin[{]
method[compress, return_type[type[WeeklyOpeningHours]], modifier[final public], parameter[]] begin[{]
local_variable[type[Map], map]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(... | Keyword[public] Keyword[final] identifier[WeeklyOpeningHours] identifier[compress] operator[SEP] operator[SEP] {
Keyword[final] identifier[Map] operator[<] identifier[HourRanges] , identifier[List] operator[<] identifier[DayOfTheWeek] operator[>] operator[>] identifier[map] operator[=] Keyword[new] identifier[H... |
private void add(CharSequence name, CharSequence value, long headerSize) {
// Clear the table if the header field size is larger than the maxHeaderTableSize.
if (headerSize > maxHeaderTableSize) {
clear();
return;
}
// Evict oldest entries until we have enough ma... | class class_name[name] begin[{]
method[add, return_type[void], modifier[private], parameter[name, value, headerSize]] begin[{]
if[binary_operation[member[.headerSize], >, member[.maxHeaderTableSize]]] begin[{]
call[.clear, parameter[]]
return[None]
el... | Keyword[private] Keyword[void] identifier[add] operator[SEP] identifier[CharSequence] identifier[name] , identifier[CharSequence] identifier[value] , Keyword[long] identifier[headerSize] operator[SEP] {
Keyword[if] operator[SEP] identifier[headerSize] operator[>] identifier[maxHeaderTableSize] operator[SEP] {... |
public void addPhoto(Photo photo) {
Photo.PhotoType type = photo.getType();
if (postType != null && !postType.equals(type)) {
throw new IllegalArgumentException("Photos must all be the same type (source or data)");
}
if (pendingPhotos == null) {
pendingPhotos = ne... | class class_name[name] begin[{]
method[addPhoto, return_type[void], modifier[public], parameter[photo]] begin[{]
local_variable[type[Photo], type]
if[binary_operation[binary_operation[member[.postType], !=, literal[null]], &&, call[postType.equals, parameter[member[.type]]]]] begin[{]
... | Keyword[public] Keyword[void] identifier[addPhoto] operator[SEP] identifier[Photo] identifier[photo] operator[SEP] {
identifier[Photo] operator[SEP] identifier[PhotoType] identifier[type] operator[=] identifier[photo] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operato... |
@SuppressWarnings("unchecked")
public <T extends IEntity> T updateAccountOnTxns(T entity) throws FMSException {
IntuitMessage intuitMessage = prepareupdateAccountOnTxns(entity);
//execute interceptors
executeInterceptors(intuitMessage);
return (T) retrieveEntity(intuitMessage);
... | class class_name[name] begin[{]
method[updateAccountOnTxns, return_type[type[T]], modifier[public], parameter[entity]] begin[{]
local_variable[type[IntuitMessage], intuitMessage]
call[.executeInterceptors, parameter[member[.intuitMessage]]]
return[Cast(expression=MethodInvocatio... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[IEntity] operator[>] identifier[T] identifier[updateAccountOnTxns] operator[SEP] identifier[T] identifier[entity] operator[SEP] Keyword[throws] identifier[FMSExcep... |
public static BegunTx<?> getBegunTxOnThread() {
final Stack<BegunTx<?>> stack = threadLocal.get();
return stack != null ? stack.peek() : null;
} | class class_name[name] begin[{]
method[getBegunTxOnThread, return_type[type[BegunTx]], modifier[public static], parameter[]] begin[{]
local_variable[type[Stack], stack]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=stack, postfix_operators=[], prefix_operato... | Keyword[public] Keyword[static] identifier[BegunTx] operator[<] operator[?] operator[>] identifier[getBegunTxOnThread] operator[SEP] operator[SEP] {
Keyword[final] identifier[Stack] operator[<] identifier[BegunTx] operator[<] operator[?] operator[>] operator[>] identifier[stack] operator[=] identifier[threadLoca... |
public void addSingularAttribute(String attributeName, SingularAttribute<X, ?> attribute)
{
if (declaredSingluarAttribs == null)
{
declaredSingluarAttribs = new HashMap<String, SingularAttribute<X, ?>>();
}
declaredSingluarAttribs.put(attributeName, attribute);
... | class class_name[name] begin[{]
method[addSingularAttribute, return_type[void], modifier[public], parameter[attributeName, attribute]] begin[{]
if[binary_operation[member[.declaredSingluarAttribs], ==, literal[null]]] begin[{]
assign[member[.declaredSingluarAttribs], Cla... | Keyword[public] Keyword[void] identifier[addSingularAttribute] operator[SEP] identifier[String] identifier[attributeName] , identifier[SingularAttribute] operator[<] identifier[X] , operator[?] operator[>] identifier[attribute] operator[SEP] {
Keyword[if] operator[SEP] identifier[declaredSingluarAttribs] opera... |
@XmlElementDecl(namespace = "http://www.immoxml.de", name = "anzahl_zimmer")
@XmlJavaTypeAdapter(Adapter7 .class)
public JAXBElement<BigDecimal> createAnzahlZimmer(BigDecimal value) {
return new JAXBElement<BigDecimal>(_AnzahlZimmer_QNAME, BigDecimal.class, null, value);
} | class class_name[name] begin[{]
method[createAnzahlZimmer, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_AnzahlZimmer_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] annotation[@] identifier[XmlJavaTypeAdapter] operator[SEP] identifier[Adapter7] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAX... |
@Override
public IMonomer getMonomer(String monName, String strandName) {
logger.debug("Getting monomer from strand: ", monName, strandName);
return super.getMonomer(monName, strandName);
} | class class_name[name] begin[{]
method[getMonomer, return_type[type[IMonomer]], modifier[public], parameter[monName, strandName]] begin[{]
call[logger.debug, parameter[literal["Getting monomer from strand: "], member[.monName], member[.strandName]]]
return[SuperMethodInvocation(argument... | annotation[@] identifier[Override] Keyword[public] identifier[IMonomer] identifier[getMonomer] operator[SEP] identifier[String] identifier[monName] , identifier[String] identifier[strandName] operator[SEP] {
identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[monName] ... |
@SuppressWarnings("unchecked")
private static List<String> getWebSphereGroups(final String securityName) {
Context ic = null;
try {
// TODO: Cache UserRegistry object
ic = new InitialContext();
Object objRef = ic.lookup(USER_REGISTRY);
Object userReg = invokeMethod(getNarrowMethod(), null , objRef, Cla... | class class_name[name] begin[{]
method[getWebSphereGroups, return_type[type[List]], modifier[private static], parameter[securityName]] begin[{]
local_variable[type[Context], ic]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ic, postfix_operator... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[getWebSphereGroups] operator[SEP] Keyword[final] identifier[String] identifier[securityName] operator[SEP] {
identifier[Co... |
public static <K> void removeAll(Region<K, ?> region, Set<K> keys) {
if (keys == null) {
throw new NullPointerException();
}
if (keys.isEmpty()) {
// Nothing to do
return;
}
Function function = new RemoveAllFunction();
FunctionService.registerFunction(function);
ResultCollector<?, ?> rc = Funct... | class class_name[name] begin[{]
method[removeAll, return_type[void], modifier[public static], parameter[region, keys]] begin[{]
if[binary_operation[member[.keys], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=... | Keyword[public] Keyword[static] operator[<] identifier[K] operator[>] Keyword[void] identifier[removeAll] operator[SEP] identifier[Region] operator[<] identifier[K] , operator[?] operator[>] identifier[region] , identifier[Set] operator[<] identifier[K] operator[>] identifier[keys] operator[SEP] {
Keyword[if] ... |
public static void changeSign( DMatrixD1 a )
{
final int size = a.getNumElements();
for( int i = 0; i < size; i++ ) {
a.data[i] = -a.data[i];
}
} | class class_name[name] begin[{]
method[changeSign, return_type[void], modifier[public static], parameter[a]] begin[{]
local_variable[type[int], size]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postf... | Keyword[public] Keyword[static] Keyword[void] identifier[changeSign] operator[SEP] identifier[DMatrixD1] identifier[a] operator[SEP] {
Keyword[final] Keyword[int] identifier[size] operator[=] identifier[a] operator[SEP] identifier[getNumElements] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SE... |
public static Class[] resolveTypeParameters(Class invocationClass, Type targetType) {
if (targetType instanceof ParameterizedType) {
Type[] actualTypes = ((ParameterizedType) targetType).getActualTypeArguments();
Class[] actualClasses = new Class[actualTypes.length];
for (in... | class class_name[name] begin[{]
method[resolveTypeParameters, return_type[type[Class]], modifier[public static], parameter[invocationClass, targetType]] begin[{]
if[binary_operation[member[.targetType], instanceof, type[ParameterizedType]]] begin[{]
local_variable[type[Type], actual... | Keyword[public] Keyword[static] identifier[Class] operator[SEP] operator[SEP] identifier[resolveTypeParameters] operator[SEP] identifier[Class] identifier[invocationClass] , identifier[Type] identifier[targetType] operator[SEP] {
Keyword[if] operator[SEP] identifier[targetType] Keyword[instanceof] identifier[Pa... |
public void init(Context context) {
if (!mNotFoundClassesMap.isEmpty()) {
buildInstalledPackagesCache(context);
}
mPackageMonitor.register(context);
} | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[context]] begin[{]
if[call[mNotFoundClassesMap.isEmpty, parameter[]]] begin[{]
call[.buildInstalledPackagesCache, parameter[member[.context]]]
else begin[{]
None
e... | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[Context] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[mNotFoundClassesMap] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
identifier[buildInstalledPackagesCach... |
private void addQueryParams(final Request request) {
if (language != null) {
request.addQueryParam("Language", language);
}
if (modelBuild != null) {
request.addQueryParam("ModelBuild", modelBuild.toString());
}
if (status != null) {
request.... | class class_name[name] begin[{]
method[addQueryParams, return_type[void], modifier[private], parameter[request]] begin[{]
if[binary_operation[member[.language], !=, literal[null]]] begin[{]
call[request.addQueryParam, parameter[literal["Language"], member[.language]]]
... | Keyword[private] Keyword[void] identifier[addQueryParams] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] {
Keyword[if] operator[SEP] identifier[language] operator[!=] Other[null] operator[SEP] {
identifier[request] operator[SEP] identifier[addQueryParam] operator[SE... |
private File findSourceFile (final String filename)
{
final Collection <File> sourceRoots = this.nonGeneratedSourceRoots;
for (final File sourceRoot : sourceRoots)
{
final File sourceFile = new File (sourceRoot, filename);
if (sourceFile.exists ())
{
return sourceFile;
}
... | class class_name[name] begin[{]
method[findSourceFile, return_type[type[File]], modifier[private], parameter[filename]] begin[{]
local_variable[type[Collection], sourceRoots]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableD... | Keyword[private] identifier[File] identifier[findSourceFile] operator[SEP] Keyword[final] identifier[String] identifier[filename] operator[SEP] {
Keyword[final] identifier[Collection] operator[<] identifier[File] operator[>] identifier[sourceRoots] operator[=] Keyword[this] operator[SEP] identifier[nonGeneratedS... |
@NonNull
public List<T> getObject() {
List<T> beans = new ArrayList<T>();
beans.addAll(getBeans());
Collections.sort(beans, COMPARATOR);
return beans;
} | class class_name[name] begin[{]
method[getObject, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], beans]
call[beans.addAll, parameter[call[.getBeans, parameter[]]]]
call[Collections.sort, parameter[member[.beans], member[.COMPA... | annotation[@] identifier[NonNull] Keyword[public] identifier[List] operator[<] identifier[T] operator[>] identifier[getObject] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[T] operator[>] identifier[beans] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[T] operator[>... |
public synchronized E pop() {
E obj;
int len = size();
obj = peek();
removeElementAt(len - 1);
return obj;
} | class class_name[name] begin[{]
method[pop, return_type[type[E]], modifier[synchronized public], parameter[]] begin[{]
local_variable[type[E], obj]
local_variable[type[int], len]
assign[member[.obj], call[.peek, parameter[]]]
call[.removeElementAt, parameter[bina... | Keyword[public] Keyword[synchronized] identifier[E] identifier[pop] operator[SEP] operator[SEP] {
identifier[E] identifier[obj] operator[SEP] Keyword[int] identifier[len] operator[=] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[=] identifier[peek] operator[SEP] operator[SEP... |
public void index(Record record) {
// FIXME: check if record is already indexed
// allocate an ID for this record
long id = store.makeNewRecordId();
store.registerRecord(id, record);
// go through ID properties and register them
for (Property p : config.getIdentityProperties())
for (... | class class_name[name] begin[{]
method[index, return_type[void], modifier[public], parameter[record]] begin[{]
local_variable[type[long], id]
call[store.registerRecord, parameter[member[.id], member[.record]]]
ForStatement(body=ForStatement(body=StatementExpression(expression=Me... | Keyword[public] Keyword[void] identifier[index] operator[SEP] identifier[Record] identifier[record] operator[SEP] {
Keyword[long] identifier[id] operator[=] identifier[store] operator[SEP] identifier[makeNewRecordId] operator[SEP] operator[SEP] operator[SEP] identifier[store] operator[SEP] identifier[registerRec... |
@Override
public List<byte[]> hMGet(byte[] key, byte[]... fields) {
try {
if (isPipelined()) {
pipeline(new JedisResult(pipeline.hmget(key, fields)));
return null;
}
return client.hmget(key, fields);
} catch (Exception ex) {
... | class class_name[name] begin[{]
method[hMGet, return_type[type[List]], modifier[public], parameter[key, fields]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isPipelined, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[hMGet] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[key] , Keyword[byte] operator[SEP] operator[SEP] operator[...] identifier[fields] operator[SEP] {
... |
static SocketChannelUDT newConnectorChannelUDT(final TypeUDT type) {
try {
return SelectorProviderUDT.from(type).openSocketChannel();
} catch (final IOException e) {
throw new ChannelException("failed to open a socket channel", e);
}
} | class class_name[name] begin[{]
method[newConnectorChannelUDT, return_type[type[SocketChannelUDT]], modifier[static], parameter[type]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, ... | Keyword[static] identifier[SocketChannelUDT] identifier[newConnectorChannelUDT] operator[SEP] Keyword[final] identifier[TypeUDT] identifier[type] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[SelectorProviderUDT] operator[SEP] identifier[from] operator[SEP] identifier[type] operator[SEP] o... |
public static void assertXMLNotEqual(Reader control, Reader test)
throws SAXException, IOException {
assertXMLNotEqual(null, control, test);
} | class class_name[name] begin[{]
method[assertXMLNotEqual, return_type[void], modifier[public static], parameter[control, test]] begin[{]
call[.assertXMLNotEqual, parameter[literal[null], member[.control], member[.test]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[assertXMLNotEqual] operator[SEP] identifier[Reader] identifier[control] , identifier[Reader] identifier[test] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] {
identifier[assertXMLNotEqual] operator[SEP] Other[null] , id... |
@Override
protected DoubleMatrix1D rPri(DoubleMatrix1D X) {
if(getMeq()==0){
return F1.make(0);
}
return ColtUtils.zMult(getA(), X, getB(), -1);
} | class class_name[name] begin[{]
method[rPri, return_type[type[DoubleMatrix1D]], modifier[protected], parameter[X]] begin[{]
if[binary_operation[call[.getMeq, parameter[]], ==, literal[0]]] begin[{]
return[call[F1.make, parameter[literal[0]]]]
else begin[{]
None
end[}... | annotation[@] identifier[Override] Keyword[protected] identifier[DoubleMatrix1D] identifier[rPri] operator[SEP] identifier[DoubleMatrix1D] identifier[X] operator[SEP] {
Keyword[if] operator[SEP] identifier[getMeq] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] {
Keyword[return] identi... |
public boolean isValid(String value) {
if (value == null) {
return false;
}
// Check the whole url address structure
Matcher urlMatcher = URL_PATTERN.matcher(value);
if (!urlMatcher.matches()) {
return false;
}
String sche... | class class_name[name] begin[{]
method[isValid, return_type[type[boolean]], modifier[public], parameter[value]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[type[Matc... | Keyword[public] Keyword[boolean] identifier[isValid] operator[SEP] identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
identifier[Matcher] identifier[url... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.