code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public Observable<ServiceResponse<DomainInner>> updateWithServiceResponseAsync(String resourceGroupName, String domainName, Map<String, String> tags) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be nul... | class class_name[name] begin[{]
method[updateWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, domainName, tags]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[DomainInner] operator[>] operator[>] identifier[updateWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[domainName] , identifier[Map] operator[<]... |
public static String resolveHome(final String path) {
if (path.length() == 1) {
if (path.charAt(0) == '~') {
return SystemUtil.info().getHomeDir();
}
return path;
}
if (path.length() >= 2) {
if ((path.charAt(0) == '~') && (path.charAt(1) == File.separatorChar)) {
return SystemUtil.info().getHo... | class class_name[name] begin[{]
method[resolveHome, return_type[type[String]], modifier[public static], parameter[path]] begin[{]
if[binary_operation[call[path.length, parameter[]], ==, literal[1]]] begin[{]
if[binary_operation[call[path.charAt, parameter[literal[0]]], =... | Keyword[public] Keyword[static] identifier[String] identifier[resolveHome] operator[SEP] Keyword[final] identifier[String] identifier[path] operator[SEP] {
Keyword[if] operator[SEP] identifier[path] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] {
Keyw... |
public void close() throws IOException {
if (raf != null) {
// gibt Lock auf datei frei
try {
if (this.fileLock != null) {
if( !fileLock.release()) {
LOG.error("Filelock not release properly");
}
} ... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.raf], !=, literal[null]]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], ... | Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[raf] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[fileLo... |
public void setChangeLog(ChangeLog log){
mChangeLog = log;
// Clear out any existing entries
clear();
//sort all the changes
Collections.sort(mChangeLog.versions, new VersionComparator());
// Iterate and add all the 'Change' objects in the adapter
for(Version v... | class class_name[name] begin[{]
method[setChangeLog, return_type[void], modifier[public], parameter[log]] begin[{]
assign[member[.mChangeLog], member[.log]]
call[.clear, parameter[]]
call[Collections.sort, parameter[member[mChangeLog.versions], ClassCreator(argum... | Keyword[public] Keyword[void] identifier[setChangeLog] operator[SEP] identifier[ChangeLog] identifier[log] operator[SEP] {
identifier[mChangeLog] operator[=] identifier[log] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[S... |
public void releaseFrameGrabber() {
synchronized(this){
if(fg!=null){
try {fg.release();}
catch (Throwable t){
t.printStackTrace();
throw new StateException("Cant release resources used by "
+"framegrabber", t);
}
fg = null;
state.put();
}
}
} | class class_name[name] begin[{]
method[releaseFrameGrabber, return_type[void], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[THIS[]] BEGIN[{]
if[binary_operation[member[.fg], !=, literal[null]]] begin[{]
TryStatement(block=[StatementExpression(expr... | Keyword[public] Keyword[void] identifier[releaseFrameGrabber] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] {
Keyword[if] operator[SEP] identifier[fg] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
identifier[fg... |
@Override
public void checkLoginRequired(LoginHandlingResource resource) throws LoginRequiredException {
if (isLoginRequiredAction(resource)) {
asLoginRequired(resource);
} else {
asNonLoginRequired(resource);
}
} | class class_name[name] begin[{]
method[checkLoginRequired, return_type[void], modifier[public], parameter[resource]] begin[{]
if[call[.isLoginRequiredAction, parameter[member[.resource]]]] begin[{]
call[.asLoginRequired, parameter[member[.resource]]]
else begin[{... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[checkLoginRequired] operator[SEP] identifier[LoginHandlingResource] identifier[resource] operator[SEP] Keyword[throws] identifier[LoginRequiredException] {
Keyword[if] operator[SEP] identifier[isLoginRequiredAction] operator[SEP] identif... |
public static ResolvedType replaceIfMoreSpecific(ResolvedType replacement, ResolvedType defaultValue) {
ResolvedType toReturn = defaultIfAbsent(replacement, defaultValue);
if (isObject(replacement) && isNotObject(defaultValue)) {
return defaultValue;
}
return toReturn;
} | class class_name[name] begin[{]
method[replaceIfMoreSpecific, return_type[type[ResolvedType]], modifier[public static], parameter[replacement, defaultValue]] begin[{]
local_variable[type[ResolvedType], toReturn]
if[binary_operation[call[.isObject, parameter[member[.replacement]]], &&, c... | Keyword[public] Keyword[static] identifier[ResolvedType] identifier[replaceIfMoreSpecific] operator[SEP] identifier[ResolvedType] identifier[replacement] , identifier[ResolvedType] identifier[defaultValue] operator[SEP] {
identifier[ResolvedType] identifier[toReturn] operator[=] identifier[defaultIfAbsent] oper... |
public boolean isEquivalent(final Plugin testPlugin) {
if ((testPlugin != null) && testPlugin instanceof SocketReceiver) {
SocketReceiver sReceiver = (SocketReceiver) testPlugin;
return (port == sReceiver.getPort() && super.isEquivalent(testPlugin));
}
return false;
} | class class_name[name] begin[{]
method[isEquivalent, return_type[type[boolean]], modifier[public], parameter[testPlugin]] begin[{]
if[binary_operation[binary_operation[member[.testPlugin], !=, literal[null]], &&, binary_operation[member[.testPlugin], instanceof, type[SocketReceiver]]]] begin[{]... | Keyword[public] Keyword[boolean] identifier[isEquivalent] operator[SEP] Keyword[final] identifier[Plugin] identifier[testPlugin] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[testPlugin] operator[!=] Other[null] operator[SEP] operator[&&] identifier[testPlugin] Keyword[instanceof] identifier... |
public JSONObject putValue(String key, int value) {
put(key, JSONInteger.valueOf(value));
return this;
} | class class_name[name] begin[{]
method[putValue, return_type[type[JSONObject]], modifier[public], parameter[key, value]] begin[{]
call[.put, parameter[member[.key], call[JSONInteger.valueOf, parameter[member[.value]]]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[JSONObject] identifier[putValue] operator[SEP] identifier[String] identifier[key] , Keyword[int] identifier[value] operator[SEP] {
identifier[put] operator[SEP] identifier[key] , identifier[JSONInteger] operator[SEP] identifier[valueOf] operator[SEP] identifier[value] operator[SEP] o... |
@InterfaceAudience.Public
public String getDocumentRevisionId() {
// Get the revision id from either the embedded document contents,
// or the '_rev' or 'rev' value key:
String rev = null;
if (documentRevision != null)
rev = documentRevision.getRevID();
if (rev ==... | class class_name[name] begin[{]
method[getDocumentRevisionId, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], rev]
if[binary_operation[member[.documentRevision], !=, literal[null]]] begin[{]
assign[member[.rev], call[documentRe... | annotation[@] identifier[InterfaceAudience] operator[SEP] identifier[Public] Keyword[public] identifier[String] identifier[getDocumentRevisionId] operator[SEP] operator[SEP] {
identifier[String] identifier[rev] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[documentRevision] operator[... |
protected void closeResources(Connection connection) {
if (cacheConnection) return;
if (connection != null && dataSource != null) {
try {
connection.close();
} catch (SQLException e) {
LOG.finest("Caught exception closing connection: " + e.getMessa... | class class_name[name] begin[{]
method[closeResources, return_type[void], modifier[protected], parameter[connection]] begin[{]
if[member[.cacheConnection]] begin[{]
return[None]
else begin[{]
None
end[}]
if[binary_operation[binary_operation[member[.connection], !... | Keyword[protected] Keyword[void] identifier[closeResources] operator[SEP] identifier[Connection] identifier[connection] operator[SEP] {
Keyword[if] operator[SEP] identifier[cacheConnection] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[connection] operator[!=] Other[null] opera... |
protected static boolean checkMax(ImageBorder_F32 inten, float bestScore, int c_x, int c_y) {
for( int y = c_y -1; y <= c_y+1; y++ ) {
for( int x = c_x-1; x <= c_x+1; x++ ) {
if( inten.get(x,y) >= bestScore ) {
return false;
}
}
}
return true;
} | class class_name[name] begin[{]
method[checkMax, return_type[type[boolean]], modifier[static protected], parameter[inten, bestScore, c_x, c_y]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperatio... | Keyword[protected] Keyword[static] Keyword[boolean] identifier[checkMax] operator[SEP] identifier[ImageBorder_F32] identifier[inten] , Keyword[float] identifier[bestScore] , Keyword[int] identifier[c_x] , Keyword[int] identifier[c_y] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[y] operat... |
public Map<LocaleID, ClassName> generate(Path outputDir, DataReader reader) throws IOException {
Map<LocaleID, ClassName> numberClasses = new TreeMap<>();
Map<LocaleID, UnitData> unitMap = reader.units();
for (Map.Entry<LocaleID, NumberData> entry : reader.numbers().entrySet()) {
NumberData dat... | class class_name[name] begin[{]
method[generate, return_type[type[Map]], modifier[public], parameter[outputDir, reader]] begin[{]
local_variable[type[Map], numberClasses]
local_variable[type[Map], unitMap]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration... | Keyword[public] identifier[Map] operator[<] identifier[LocaleID] , identifier[ClassName] operator[>] identifier[generate] operator[SEP] identifier[Path] identifier[outputDir] , identifier[DataReader] identifier[reader] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Map] operator[<] identifi... |
public static String toJson(Map<String, Object> map) {
requireNonNull(map, "map is null");
return JSON.toJSONString(map, DEFAULT_FORMAT);
} | class class_name[name] begin[{]
method[toJson, return_type[type[String]], modifier[public static], parameter[map]] begin[{]
call[.requireNonNull, parameter[member[.map], literal["map is null"]]]
return[call[JSON.toJSONString, parameter[member[.map], member[.DEFAULT_FORMAT]]]]
end[}]... | Keyword[public] Keyword[static] identifier[String] identifier[toJson] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[map] operator[SEP] {
identifier[requireNonNull] operator[SEP] identifier[map] , literal[String] operator[SEP] operator[SEP] Keyword[retu... |
public static BasicGalleryWrapper<GalleryWrapper, String, String, String> gallery(Activity activity) {
return new GalleryWrapper(activity);
} | class class_name[name] begin[{]
method[gallery, return_type[type[BasicGalleryWrapper]], modifier[public static], parameter[activity]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=activity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_ty... | Keyword[public] Keyword[static] identifier[BasicGalleryWrapper] operator[<] identifier[GalleryWrapper] , identifier[String] , identifier[String] , identifier[String] operator[>] identifier[gallery] operator[SEP] identifier[Activity] identifier[activity] operator[SEP] {
Keyword[return] Keyword[new] identifier[... |
@Override
public void write(TextWriterStream out, String label, Object object) {
String res = (label != null) ? label + "=" : "";
if(object != null) {
if(label != null) {
res += object.toString().replace(" ", "");
}
else {
res += object.toString();
}
}
out.inlin... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[out, label, object]] begin[{]
local_variable[type[String], res]
if[binary_operation[member[.object], !=, literal[null]]] begin[{]
if[binary_operation[member[.label], !=, ... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[TextWriterStream] identifier[out] , identifier[String] identifier[label] , identifier[Object] identifier[object] operator[SEP] {
identifier[String] identifier[res] operator[=] operator[SEP] identifier[la... |
public OvhTemplateCaps serviceName_install_templateCapabilities_GET(String serviceName, String templateName) throws IOException {
String qPath = "/dedicated/server/{serviceName}/install/templateCapabilities";
StringBuilder sb = path(qPath, serviceName);
query(sb, "templateName", templateName);
String resp = exe... | class class_name[name] begin[{]
method[serviceName_install_templateCapabilities_GET, return_type[type[OvhTemplateCaps]], modifier[public], parameter[serviceName, templateName]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
call[.query, para... | Keyword[public] identifier[OvhTemplateCaps] identifier[serviceName_install_templateCapabilities_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[templateName] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] lit... |
public static void setCookieValue(HttpServletResponse response, String cookieName,
String cookieValue, int expireInHour) {
Cookie cookie = new Cookie(cookieName, cookieValue);
if (expireInHour > 0) {
cookie.setMaxAge(60 * 60 * 24 * expireInHour);
} else {
cook... | class class_name[name] begin[{]
method[setCookieValue, return_type[void], modifier[public static], parameter[response, cookieName, cookieValue, expireInHour]] begin[{]
local_variable[type[Cookie], cookie]
if[binary_operation[member[.expireInHour], >, literal[0]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[void] identifier[setCookieValue] operator[SEP] identifier[HttpServletResponse] identifier[response] , identifier[String] identifier[cookieName] , identifier[String] identifier[cookieValue] , Keyword[int] identifier[expireInHour] operator[SEP] {
identifier[Cookie] identi... |
@Override
public INDArray randn(int[] shape, org.nd4j.linalg.api.rng.Random r) {
return r.nextGaussian(shape);
} | class class_name[name] begin[{]
method[randn, return_type[type[INDArray]], modifier[public], parameter[shape, r]] begin[{]
return[call[r.nextGaussian, parameter[member[.shape]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[INDArray] identifier[randn] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[shape] , identifier[org] operator[SEP] identifier[nd4j] operator[SEP] identifier[linalg] operator[SEP] identifier[api] operator[SEP] identifier[rng] operator[SEP] ... |
List<Dimension> constructDimensions(Group group, opendap.dap.DArray dodsArray) {
if (group == null) group = rootGroup;
List<Dimension> dims = new ArrayList<Dimension>();
Enumeration enumerate = dodsArray.getDimensions();
while (enumerate.hasMoreElements()) {
opendap.dap.DArrayDimension dad = (ope... | class class_name[name] begin[{]
method[constructDimensions, return_type[type[List]], modifier[default], parameter[group, dodsArray]] begin[{]
if[binary_operation[member[.group], ==, literal[null]]] begin[{]
assign[member[.group], member[.rootGroup]]
else begin[{]
None
... | identifier[List] operator[<] identifier[Dimension] operator[>] identifier[constructDimensions] operator[SEP] identifier[Group] identifier[group] , identifier[opendap] operator[SEP] identifier[dap] operator[SEP] identifier[DArray] identifier[dodsArray] operator[SEP] {
Keyword[if] operator[SEP] identifier[group] ... |
private SAXParserFactory newSAXParserFactory( ValidationSet pValidationSet )
{
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setValidating( pValidationSet.isValidating() );
if ( pValidationSet.isValidating() )
{
try
{
spf.setFeatur... | class class_name[name] begin[{]
method[newSAXParserFactory, return_type[type[SAXParserFactory]], modifier[private], parameter[pValidationSet]] begin[{]
local_variable[type[SAXParserFactory], spf]
call[spf.setValidating, parameter[call[pValidationSet.isValidating, parameter[]]]]
... | Keyword[private] identifier[SAXParserFactory] identifier[newSAXParserFactory] operator[SEP] identifier[ValidationSet] identifier[pValidationSet] operator[SEP] {
identifier[SAXParserFactory] identifier[spf] operator[=] identifier[SAXParserFactory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] ... |
public Iterator<E> iterator() {
final Iterator<E> it = new Iterator<E>() {
@Override
public boolean hasNext() {
return (index < size());
}
@Override
public E next() {
final E elem = get(index++);
if (index >= size() && nextLink != null) {
getNextPage();
}
r... | class class_name[name] begin[{]
method[iterator, return_type[type[Iterator]], modifier[public], parameter[]] begin[{]
local_variable[type[Iterator], it]
return[member[.it]]
end[}]
END[}] | Keyword[public] identifier[Iterator] operator[<] identifier[E] operator[>] identifier[iterator] operator[SEP] operator[SEP] {
Keyword[final] identifier[Iterator] operator[<] identifier[E] operator[>] identifier[it] operator[=] Keyword[new] identifier[Iterator] operator[<] identifier[E] operator[>] operator[SEP] ... |
public void setCdataSectionElements(java.util.Vector newValue)
{
m_outputProperties.setQNameProperties(OutputKeys.CDATA_SECTION_ELEMENTS, newValue);
} | class class_name[name] begin[{]
method[setCdataSectionElements, return_type[void], modifier[public], parameter[newValue]] begin[{]
call[m_outputProperties.setQNameProperties, parameter[member[OutputKeys.CDATA_SECTION_ELEMENTS], member[.newValue]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setCdataSectionElements] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Vector] identifier[newValue] operator[SEP] {
identifier[m_outputProperties] operator[SEP] identifier[setQNameProperties] operator[SEP] identifier[OutputKeys] op... |
protected void associateBatched(Collection owners, Collection children)
{
CollectionDescriptor cds = getCollectionDescriptor();
PersistentField field = cds.getPersistentField();
PersistenceBroker pb = getBroker();
Class ownerTopLevelClass = pb.getTopLevelClass(getOwnerClassDescr... | class class_name[name] begin[{]
method[associateBatched, return_type[void], modifier[protected], parameter[owners, children]] begin[{]
local_variable[type[CollectionDescriptor], cds]
local_variable[type[PersistentField], field]
local_variable[type[PersistenceBroker], pb]
local_v... | Keyword[protected] Keyword[void] identifier[associateBatched] operator[SEP] identifier[Collection] identifier[owners] , identifier[Collection] identifier[children] operator[SEP] {
identifier[CollectionDescriptor] identifier[cds] operator[=] identifier[getCollectionDescriptor] operator[SEP] operator[SEP] operato... |
public int doAfterBody() throws JspException
{
String text = bodyContent.getString();
if (text != null) {
bodyContent.clearBody();
text = text.trim();
if (text.length() > 0)
_text = text;
}
return SKIP_BODY;
} | class class_name[name] begin[{]
method[doAfterBody, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[String], text]
if[binary_operation[member[.text], !=, literal[null]]] begin[{]
call[bodyContent.clearBody, parameter[]]
... | Keyword[public] Keyword[int] identifier[doAfterBody] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] {
identifier[String] identifier[text] operator[=] identifier[bodyContent] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[te... |
@Override
public Resource getErrorpage(SlingHttpServletRequest request, int status) {
Resource errorpage = null;
ResourceResolver resolver = request.getResourceResolver();
if (StringUtils.isNotBlank(errorpagesPath)) {
if (errorpagesPath.startsWith("/")) {
// if t... | class class_name[name] begin[{]
method[getErrorpage, return_type[type[Resource]], modifier[public], parameter[request, status]] begin[{]
local_variable[type[Resource], errorpage]
local_variable[type[ResourceResolver], resolver]
if[call[StringUtils.isNotBlank, parameter[member[.e... | annotation[@] identifier[Override] Keyword[public] identifier[Resource] identifier[getErrorpage] operator[SEP] identifier[SlingHttpServletRequest] identifier[request] , Keyword[int] identifier[status] operator[SEP] {
identifier[Resource] identifier[errorpage] operator[=] Other[null] operator[SEP] identifier[Res... |
public static Long[] valuesOf(long[] array) {
Long[] dest = new Long[array.length];
for (int i = 0; i < array.length; i++) {
dest[i] = Long.valueOf(array[i]);
}
return dest;
} | class class_name[name] begin[{]
method[valuesOf, return_type[type[Long]], modifier[public static], parameter[array]] begin[{]
local_variable[type[Long], dest]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=de... | Keyword[public] Keyword[static] identifier[Long] operator[SEP] operator[SEP] identifier[valuesOf] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[array] operator[SEP] {
identifier[Long] operator[SEP] operator[SEP] identifier[dest] operator[=] Keyword[new] identifier[Long] operator[SEP] identif... |
public static <T> T findFirst(Iterable<T> iterable, Function1<? super T, Boolean> predicate) {
return IteratorExtensions.findFirst(iterable.iterator(), predicate);
} | class class_name[name] begin[{]
method[findFirst, return_type[type[T]], modifier[public static], parameter[iterable, predicate]] begin[{]
return[call[IteratorExtensions.findFirst, parameter[call[iterable.iterator, parameter[]], member[.predicate]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[findFirst] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[iterable] , identifier[Function1] operator[<] operator[?] Keyword[super] identifier[T] , identifier[Boolean] operator[>] identif... |
public void remove(final Long pipelineId) {
Assert.assertNotNull(pipelineId);
transactionTemplate.execute(new TransactionCallbackWithoutResult() {
@Override
protected void doInTransactionWithoutResult(TransactionStatus status) {
try {
Pipeline... | class class_name[name] begin[{]
method[remove, return_type[void], modifier[public], parameter[pipelineId]] begin[{]
call[Assert.assertNotNull, parameter[member[.pipelineId]]]
call[transactionTemplate.execute, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotatio... | Keyword[public] Keyword[void] identifier[remove] operator[SEP] Keyword[final] identifier[Long] identifier[pipelineId] operator[SEP] {
identifier[Assert] operator[SEP] identifier[assertNotNull] operator[SEP] identifier[pipelineId] operator[SEP] operator[SEP] identifier[transactionTemplate] operator[SEP] identifie... |
public static <T extends Closure<?>> T instantiateClosure(Class<T> closureType, Object owner, Object thisObject) {
try {
Constructor<T> constructor = closureType.getConstructor(Object.class, Object.class);
return constructor.newInstance(owner, thisObject);
} catch (Exception e) {
ExceptionUtil... | class class_name[name] begin[{]
method[instantiateClosure, return_type[type[T]], modifier[public static], parameter[closureType, owner, thisObject]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argument... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Closure] operator[<] operator[?] operator[>] operator[>] identifier[T] identifier[instantiateClosure] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[closureType] , identifier[Object] identifier[owner... |
public static String messageOrDefaultFormat(String key, String defaultValue, Object... params) {
return MessageFormat.format(messageOrDefault(key, defaultValue), params);
} | class class_name[name] begin[{]
method[messageOrDefaultFormat, return_type[type[String]], modifier[public static], parameter[key, defaultValue, params]] begin[{]
return[call[MessageFormat.format, parameter[call[.messageOrDefault, parameter[member[.key], member[.defaultValue]]], member[.params]]]]
e... | Keyword[public] Keyword[static] identifier[String] identifier[messageOrDefaultFormat] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[defaultValue] , identifier[Object] operator[...] identifier[params] operator[SEP] {
Keyword[return] identifier[MessageFormat] operator[SEP] iden... |
public static int[] unboxIntegers(Object src, int srcPos, int len) {
return unboxIntegers(array(src), srcPos, len);
} | class class_name[name] begin[{]
method[unboxIntegers, return_type[type[int]], modifier[public static], parameter[src, srcPos, len]] begin[{]
return[call[.unboxIntegers, parameter[call[.array, parameter[member[.src]]], member[.srcPos], member[.len]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[unboxIntegers] operator[SEP] identifier[Object] identifier[src] , Keyword[int] identifier[srcPos] , Keyword[int] identifier[len] operator[SEP] {
Keyword[return] identifier[unboxIntegers] operator[SEP] identifier[array] operator... |
public JsonLdOptions copy() {
final JsonLdOptions copy = new JsonLdOptions(base);
copy.setCompactArrays(compactArrays);
copy.setExpandContext(expandContext);
copy.setProcessingMode(processingMode);
copy.setDocumentLoader(documentLoader);
copy.setEmbed(embed);
cop... | class class_name[name] begin[{]
method[copy, return_type[type[JsonLdOptions]], modifier[public], parameter[]] begin[{]
local_variable[type[JsonLdOptions], copy]
call[copy.setCompactArrays, parameter[member[.compactArrays]]]
call[copy.setExpandContext, parameter[member[.e... | Keyword[public] identifier[JsonLdOptions] identifier[copy] operator[SEP] operator[SEP] {
Keyword[final] identifier[JsonLdOptions] identifier[copy] operator[=] Keyword[new] identifier[JsonLdOptions] operator[SEP] identifier[base] operator[SEP] operator[SEP] identifier[copy] operator[SEP] identifier[setCompactArra... |
public static Double probability(String value) {
Double doubleValue = notNegativeDouble(value);
Validate.inclusiveBetween(0.0, 1.0, doubleValue);
return doubleValue;
} | class class_name[name] begin[{]
method[probability, return_type[type[Double]], modifier[public static], parameter[value]] begin[{]
local_variable[type[Double], doubleValue]
call[Validate.inclusiveBetween, parameter[literal[0.0], literal[1.0], member[.doubleValue]]]
return[member... | Keyword[public] Keyword[static] identifier[Double] identifier[probability] operator[SEP] identifier[String] identifier[value] operator[SEP] {
identifier[Double] identifier[doubleValue] operator[=] identifier[notNegativeDouble] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[Validate] opera... |
@Override
public final <R2> Either<L, R2> fmap(Function<? super R, ? extends R2> fn) {
return Monad.super.<R2>fmap(fn).coerce();
} | class class_name[name] begin[{]
method[fmap, return_type[type[Either]], modifier[final public], parameter[fn]] begin[{]
return[member[.Monad]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[final] operator[<] identifier[R2] operator[>] identifier[Either] operator[<] identifier[L] , identifier[R2] operator[>] identifier[fmap] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[R] , operator[?] Keyword[extends] ide... |
public @CheckForNull Computer toComputer() {
Jenkins j = Jenkins.getInstanceOrNull();
if (j != null) {
for (Computer c : j.getComputers()) {
if (getChannel()==c.getChannel()) {
return c;
}
}
}
return null;
} | class class_name[name] begin[{]
method[toComputer, return_type[type[Computer]], modifier[public], parameter[]] begin[{]
local_variable[type[Jenkins], j]
if[binary_operation[member[.j], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfSt... | Keyword[public] annotation[@] identifier[CheckForNull] identifier[Computer] identifier[toComputer] operator[SEP] operator[SEP] {
identifier[Jenkins] identifier[j] operator[=] identifier[Jenkins] operator[SEP] identifier[getInstanceOrNull] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identi... |
public void executeAsync(FutureCallback<ResultSet> callback, Statement stm)
throws ExceedMaxAsyncJobsException {
executeAsync(callback, stm, null);
} | class class_name[name] begin[{]
method[executeAsync, return_type[void], modifier[public], parameter[callback, stm]] begin[{]
call[.executeAsync, parameter[member[.callback], member[.stm], literal[null]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[executeAsync] operator[SEP] identifier[FutureCallback] operator[<] identifier[ResultSet] operator[>] identifier[callback] , identifier[Statement] identifier[stm] operator[SEP] Keyword[throws] identifier[ExceedMaxAsyncJobsException] {
identifier[executeAsync] operator[SEP... |
public static GrayU8 loadPGM_U8(String fileName , GrayU8 storage )
throws IOException
{
return loadPGM_U8(new FileInputStream(fileName),storage);
} | class class_name[name] begin[{]
method[loadPGM_U8, return_type[type[GrayU8]], modifier[public static], parameter[fileName, storage]] begin[{]
return[call[.loadPGM_U8, parameter[ClassCreator(arguments=[MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]... | Keyword[public] Keyword[static] identifier[GrayU8] identifier[loadPGM_U8] operator[SEP] identifier[String] identifier[fileName] , identifier[GrayU8] identifier[storage] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[loadPGM_U8] operator[SEP] Keyword[new] identifier[FileInputS... |
private void buildSheetConfigMapFromFormCommand(final Sheet sheet,
final Map<String, SheetConfiguration> sheetConfigMap, final List<ConfigCommand> commandList,
final List<String> formList, final int sheetRightCol) {
boolean foundForm = false;
int minRowNum = sheet.getLastRowNum();
int maxRowNum = sheet... | class class_name[name] begin[{]
method[buildSheetConfigMapFromFormCommand, return_type[void], modifier[private], parameter[sheet, sheetConfigMap, commandList, formList, sheetRightCol]] begin[{]
local_variable[type[boolean], foundForm]
local_variable[type[int], minRowNum]
local_variable[... | Keyword[private] Keyword[void] identifier[buildSheetConfigMapFromFormCommand] operator[SEP] Keyword[final] identifier[Sheet] identifier[sheet] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[SheetConfiguration] operator[>] identifier[sheetConfigMap] , Keyword[final] identifier[List] oper... |
public ServerInner beginCreate(String resourceGroupName, String serverName, ServerForCreate parameters) {
return beginCreateWithServiceResponseAsync(resourceGroupName, serverName, parameters).toBlocking().single().body();
} | class class_name[name] begin[{]
method[beginCreate, return_type[type[ServerInner]], modifier[public], parameter[resourceGroupName, serverName, parameters]] begin[{]
return[call[.beginCreateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.serverName], member[.parameters]]]]
en... | Keyword[public] identifier[ServerInner] identifier[beginCreate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , identifier[ServerForCreate] identifier[parameters] operator[SEP] {
Keyword[return] identifier[beginCreateWithServiceResponseAsync] operato... |
@Override
protected void preparePaintComponent(final Request request) {
StringBuffer text = new StringBuffer("Options: ");
for (Object option : shuffler.getOptions()) {
text.append(option).append(", ");
}
order.setText(text.toString());
} | class class_name[name] begin[{]
method[preparePaintComponent, return_type[void], modifier[protected], parameter[request]] begin[{]
local_variable[type[StringBuffer], text]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberR... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[preparePaintComponent] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] {
identifier[StringBuffer] identifier[text] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] oper... |
public Matrix getWorldToPanTransformation() {
if (viewState.getScale() > 0) {
double dX = -(viewState.getPanX() * viewState.getScale());
double dY = viewState.getPanY() * viewState.getScale();
return new Matrix(viewState.getScale(), 0, 0, -viewState.getScale(), dX, dY);
}
return new Matrix(1, 0, 0, 1, 0,... | class class_name[name] begin[{]
method[getWorldToPanTransformation, return_type[type[Matrix]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[viewState.getScale, parameter[]], >, literal[0]]] begin[{]
local_variable[type[double], dX]
local_variable[type... | Keyword[public] identifier[Matrix] identifier[getWorldToPanTransformation] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[viewState] operator[SEP] identifier[getScale] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] {
Keyword[double] identifier[dX] operator[=] operat... |
public void marshall(SyncDeploymentJobRequest syncDeploymentJobRequest, ProtocolMarshaller protocolMarshaller) {
if (syncDeploymentJobRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(syncDep... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[syncDeploymentJobRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.syncDeploymentJobRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argument... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[SyncDeploymentJobRequest] identifier[syncDeploymentJobRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[syncDeploymentJobRequest] operator[==] Other[null] opera... |
public void setAttribute(final String name, final Attribute attribute) {
if (name.equals("datasource")) {
this.allAttributes.putAll(((DataSourceAttribute) attribute).getAttributes());
} else if (this.copyAttributes.contains(name)) {
this.allAttributes.put(name, attribute);
... | class class_name[name] begin[{]
method[setAttribute, return_type[void], modifier[public], parameter[name, attribute]] begin[{]
if[call[name.equals, parameter[literal["datasource"]]]] begin[{]
THIS[member[None.allAttributes]call[None.putAll, parameter[Cast(expression=Memb... | Keyword[public] Keyword[void] identifier[setAttribute] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[Attribute] identifier[attribute] operator[SEP] {
Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[... |
public static boolean isMappedIPv4Address(String ipString) {
byte[] bytes = ipStringToBytes(ipString);
if (bytes != null && bytes.length == 16) {
for (int i = 0; i < 10; i++) {
if (bytes[i] != 0) {
return false;
}
}
for (int i = 10; i < 12; i++) {
if (bytes[i]... | class class_name[name] begin[{]
method[isMappedIPv4Address, return_type[type[boolean]], modifier[public static], parameter[ipString]] begin[{]
local_variable[type[byte], bytes]
if[binary_operation[binary_operation[member[.bytes], !=, literal[null]], &&, binary_operation[member[bytes.len... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isMappedIPv4Address] operator[SEP] identifier[String] identifier[ipString] operator[SEP] {
Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[ipStringToBytes] operator[SEP] identifier[ipString] operator[SEP] operator[SEP]... |
protected double computeNNForRealData(final KNNQuery<NumberVector> knnQuery, Relation<NumberVector> relation, final int dim) {
double w = 0.;
ModifiableDBIDs dataSampleIds = DBIDUtil.randomSample(relation.getDBIDs(), sampleSize, random);
for(DBIDIter iter = dataSampleIds.iter(); iter.valid(); iter.advance()... | class class_name[name] begin[{]
method[computeNNForRealData, return_type[type[double]], modifier[protected], parameter[knnQuery, relation, dim]] begin[{]
local_variable[type[double], w]
local_variable[type[ModifiableDBIDs], dataSampleIds]
ForStatement(body=BlockStatement(label=None, sta... | Keyword[protected] Keyword[double] identifier[computeNNForRealData] operator[SEP] Keyword[final] identifier[KNNQuery] operator[<] identifier[NumberVector] operator[>] identifier[knnQuery] , identifier[Relation] operator[<] identifier[NumberVector] operator[>] identifier[relation] , Keyword[final] Keyword[int] identif... |
public int clearAutoValues() {
int count = 0;
Iterator<Map.Entry<String, String>> it = entrySet().iterator();
while (it.hasNext()) {
String key = it.next().getKey();
if (key.charAt(0) == '#' && key.charAt(key.length()-1) == '#') {
it.remove();
... | class class_name[name] begin[{]
method[clearAutoValues, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], count]
local_variable[type[Iterator], it]
while[call[it.hasNext, parameter[]]] begin[{]
local_variable[type[String], key]... | Keyword[public] Keyword[int] identifier[clearAutoValues] operator[SEP] operator[SEP] {
Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] identifier[Iterator] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[String] operator[>] operator[>] id... |
private void validateNoCollapse(Node n, JSDocInfo info) {
if (n.isFromExterns()) {
if (info != null && info.isNoCollapse()) {
// @nocollapse has no effect in externs
reportMisplaced(n, "nocollapse", "This JSDoc has no effect in externs.");
}
return;
}
if (!NodeUtil.isProtot... | class class_name[name] begin[{]
method[validateNoCollapse, return_type[void], modifier[private], parameter[n, info]] begin[{]
if[call[n.isFromExterns, parameter[]]] begin[{]
if[binary_operation[binary_operation[member[.info], !=, literal[null]], &&, call[info.isNoCollaps... | Keyword[private] Keyword[void] identifier[validateNoCollapse] operator[SEP] identifier[Node] identifier[n] , identifier[JSDocInfo] identifier[info] operator[SEP] {
Keyword[if] operator[SEP] identifier[n] operator[SEP] identifier[isFromExterns] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] o... |
static ArrayObject factory(DataType dtype, Class elemType, boolean isVlen, Index index, Object[] storage) {
if (index instanceof Index0D) {
return new ArrayObject.D0(dtype, elemType, isVlen, index, storage);
} else if (index instanceof Index1D) {
return new ArrayObject.D1(dtype, elemType... | class class_name[name] begin[{]
method[factory, return_type[type[ArrayObject]], modifier[static], parameter[dtype, elemType, isVlen, index, storage]] begin[{]
if[binary_operation[member[.index], instanceof, type[Index0D]]] begin[{]
return[ClassCreator(arguments=[MemberReference(memb... | Keyword[static] identifier[ArrayObject] identifier[factory] operator[SEP] identifier[DataType] identifier[dtype] , identifier[Class] identifier[elemType] , Keyword[boolean] identifier[isVlen] , identifier[Index] identifier[index] , identifier[Object] operator[SEP] operator[SEP] identifier[storage] operator[SEP] {
... |
public com.squareup.okhttp.Call getFwLeaderboardsCorporationsAsync(String datasource, String ifNoneMatch,
final ApiCallback<FactionWarfareLeaderboardCorporationsResponse> callback) throws ApiException {
com.squareup.okhttp.Call call = getFwLeaderboardsCorporationsValidateBeforeCall(datasource, ifNo... | class class_name[name] begin[{]
method[getFwLeaderboardsCorporationsAsync, return_type[type[com]], modifier[public], parameter[datasource, ifNoneMatch, callback]] begin[{]
local_variable[type[com], call]
local_variable[type[Type], localVarReturnType]
call[apiClient.executeAsync,... | Keyword[public] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[getFwLeaderboardsCorporationsAsync] operator[SEP] identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] , Keyword[final] identifier[ApiCallback... |
public static void setNonCachingHeaders(@NotNull HttpServletResponse response) {
response.setHeader(HEADER_PRAGMA, "no-cache");
response.setHeader(HEADER_CACHE_CONTROL, "no-cache");
response.setHeader(HEADER_EXPIRES, "0");
response.setHeader(HEADER_DISPATCHER, "no-cache");
} | class class_name[name] begin[{]
method[setNonCachingHeaders, return_type[void], modifier[public static], parameter[response]] begin[{]
call[response.setHeader, parameter[member[.HEADER_PRAGMA], literal["no-cache"]]]
call[response.setHeader, parameter[member[.HEADER_CACHE_CONTROL... | Keyword[public] Keyword[static] Keyword[void] identifier[setNonCachingHeaders] operator[SEP] annotation[@] identifier[NotNull] identifier[HttpServletResponse] identifier[response] operator[SEP] {
identifier[response] operator[SEP] identifier[setHeader] operator[SEP] identifier[HEADER_PRAGMA] , literal[String] o... |
public static void assertAccessibility(HtmlPage htmlPage, Testable testable) {
assertThat(htmlPage, is(compliantTo(testable)));
} | class class_name[name] begin[{]
method[assertAccessibility, return_type[void], modifier[public static], parameter[htmlPage, testable]] begin[{]
call[.assertThat, parameter[member[.htmlPage], call[.is, parameter[call[.compliantTo, parameter[member[.testable]]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[assertAccessibility] operator[SEP] identifier[HtmlPage] identifier[htmlPage] , identifier[Testable] identifier[testable] operator[SEP] {
identifier[assertThat] operator[SEP] identifier[htmlPage] , identifier[is] operator[SEP] identifier[compliantTo] oper... |
public void zone_zoneName_dynHost_login_login_PUT(String zoneName, String login, OvhDynHostLogin body) throws IOException {
String qPath = "/domain/zone/{zoneName}/dynHost/login/{login}";
StringBuilder sb = path(qPath, zoneName, login);
exec(qPath, "PUT", sb.toString(), body);
} | class class_name[name] begin[{]
method[zone_zoneName_dynHost_login_login_PUT, return_type[void], modifier[public], parameter[zoneName, login, body]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
call[.exec, parameter[member[.qPath], literal... | Keyword[public] Keyword[void] identifier[zone_zoneName_dynHost_login_login_PUT] operator[SEP] identifier[String] identifier[zoneName] , identifier[String] identifier[login] , identifier[OvhDynHostLogin] identifier[body] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath... |
public AwsSecurityFindingFilters withProductName(StringFilter... productName) {
if (this.productName == null) {
setProductName(new java.util.ArrayList<StringFilter>(productName.length));
}
for (StringFilter ele : productName) {
this.productName.add(ele);
}
... | class class_name[name] begin[{]
method[withProductName, return_type[type[AwsSecurityFindingFilters]], modifier[public], parameter[productName]] begin[{]
if[binary_operation[THIS[member[None.productName]], ==, literal[null]]] begin[{]
call[.setProductName, parameter[Class... | Keyword[public] identifier[AwsSecurityFindingFilters] identifier[withProductName] operator[SEP] identifier[StringFilter] operator[...] identifier[productName] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[productName] operator[==] Other[null] operator[SEP] {
identifi... |
public static URL getURL(String confName, ClassLoader classLoader, Class cls) {
URL url = null;
// User home
String userHome = System.getProperty( "user.home" );
if ( userHome.endsWith( "\\" ) || userHome.endsWith( "/" ) ) {
url = getURLForFile( userHome + confName ... | class class_name[name] begin[{]
method[getURL, return_type[type[URL]], modifier[public static], parameter[confName, classLoader, cls]] begin[{]
local_variable[type[URL], url]
local_variable[type[String], userHome]
if[binary_operation[call[userHome.endsWith, parameter[literal["\\... | Keyword[public] Keyword[static] identifier[URL] identifier[getURL] operator[SEP] identifier[String] identifier[confName] , identifier[ClassLoader] identifier[classLoader] , identifier[Class] identifier[cls] operator[SEP] {
identifier[URL] identifier[url] operator[=] Other[null] operator[SEP] identifier[String]... |
public static void printStackTrace(StackTraceElement[] trace, java.io.PrintStream out) {
Strand.printStackTrace(trace, out);
} | class class_name[name] begin[{]
method[printStackTrace, return_type[void], modifier[public static], parameter[trace, out]] begin[{]
call[Strand.printStackTrace, parameter[member[.trace], member[.out]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[printStackTrace] operator[SEP] identifier[StackTraceElement] operator[SEP] operator[SEP] identifier[trace] , identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[PrintStream] identifier[out] operator[SEP] {
identifier[Strand] operator[SE... |
private Format getFormat() {
char ch;
while (index < format.length()) {
if ((ch = format.charAt(index)) != '%') {
buffer.append(ch);
index++;
continue;
}
Format fmt = new Format();
// Process flags.
... | class class_name[name] begin[{]
method[getFormat, return_type[type[Format]], modifier[private], parameter[]] begin[{]
local_variable[type[char], ch]
while[binary_operation[member[.index], <, call[format.length, parameter[]]]] begin[{]
if[binary_operation[assign[m... | Keyword[private] identifier[Format] identifier[getFormat] operator[SEP] operator[SEP] {
Keyword[char] identifier[ch] operator[SEP] Keyword[while] operator[SEP] identifier[index] operator[<] identifier[format] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] oper... |
public <T> ByteArrayOutputStream toAmf(final T source) throws IOException
{
// Create and instance of the byte array output stream to write the AMF3
// object to.
final ByteArrayOutputStream bout = new ByteArrayOutputStream();
// Create the AMF3Output object and set its output stream.
final Amf3Output ... | class class_name[name] begin[{]
method[toAmf, return_type[type[ByteArrayOutputStream]], modifier[public], parameter[source]] begin[{]
local_variable[type[ByteArrayOutputStream], bout]
local_variable[type[Amf3Output], amf3Output]
call[amf3Output.setOutputStream, parameter[member[... | Keyword[public] operator[<] identifier[T] operator[>] identifier[ByteArrayOutputStream] identifier[toAmf] operator[SEP] Keyword[final] identifier[T] identifier[source] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[ByteArrayOutputStream] identifier[bout] operator[=] Keyword[new... |
public void readDwgPolyline2DV15(int[] data, int offset) throws Exception {
//System.out.println("readDwgPolyline2D executing ...");
int bitPos = offset;
bitPos = readObjectHeaderV15(data, bitPos);
Vector v = DwgUtil.getBitShort(data, bitPos);
bitPos = ((Integer)v.get(0)).intValue();
int flags = ((Integer)v... | class class_name[name] begin[{]
method[readDwgPolyline2DV15, return_type[void], modifier[public], parameter[data, offset]] begin[{]
local_variable[type[int], bitPos]
assign[member[.bitPos], call[.readObjectHeaderV15, parameter[member[.data], member[.bitPos]]]]
local_variable[typ... | Keyword[public] Keyword[void] identifier[readDwgPolyline2DV15] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[offset] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[int] identifier[bitPos] operator[=] identifier[offset] operator[SEP] identifier[b... |
public <T extends Annotation> T
getControlAnnotation(Class<T> annotationClass)
{
Class controlInterface = getControlType();
return (T)controlInterface.getAnnotation(annotationClass);
} | class class_name[name] begin[{]
method[getControlAnnotation, return_type[type[T]], modifier[public], parameter[annotationClass]] begin[{]
local_variable[type[Class], controlInterface]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=annotationClass, postfix_operators=[]... | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Annotation] operator[>] identifier[T] identifier[getControlAnnotation] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[annotationClass] operator[SEP] {
identifier[Class] identifier[controlInterface] operator[=]... |
public static void runExample(
AdWordsServicesInterface adWordsServices,
AdWordsSession session,
String callerId,
String callStartTime,
String conversionName,
String conversionTime,
double conversionValue)
throws RemoteException {
// Get the OfflineCallConversionFeed... | class class_name[name] begin[{]
method[runExample, return_type[void], modifier[public static], parameter[adWordsServices, session, callerId, callStartTime, conversionName, conversionTime, conversionValue]] begin[{]
local_variable[type[OfflineCallConversionFeedServiceInterface], offlineCallConversionFee... | Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdWordsServicesInterface] identifier[adWordsServices] , identifier[AdWordsSession] identifier[session] , identifier[String] identifier[callerId] , identifier[String] identifier[callStartTime] , identifier[String] identifie... |
public String removeRequirement(Vector<Object> requirementParams)
{
try
{
Requirement requirement = XmlRpcDataMarshaller.toRequirement( requirementParams );
service.removeRequirement(requirement);
log.debug( "Removed Requirement: " + requirement.getName() );
... | class class_name[name] begin[{]
method[removeRequirement, return_type[type[String]], modifier[public], parameter[requirementParams]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReferen... | Keyword[public] identifier[String] identifier[removeRequirement] operator[SEP] identifier[Vector] operator[<] identifier[Object] operator[>] identifier[requirementParams] operator[SEP] {
Keyword[try] {
identifier[Requirement] identifier[requirement] operator[=] identifier[XmlRpcDataMarshaller] operato... |
public java.util.List<String> getFpgaImageIds() {
if (fpgaImageIds == null) {
fpgaImageIds = new com.amazonaws.internal.SdkInternalList<String>();
}
return fpgaImageIds;
} | class class_name[name] begin[{]
method[getFpgaImageIds, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.fpgaImageIds], ==, literal[null]]] begin[{]
assign[member[.fpgaImageIds], ClassCreator(arguments=[], body=None, constructo... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getFpgaImageIds] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[fpgaImageIds] operator[==] Other[null] operator[SEP] {
identifier[fpg... |
@Override
public Set<String> mergePossibleUserAttributeNames(final Set<String> toModify, final Set<String> toConsider) {
toModify.addAll(toConsider);
return toModify;
} | class class_name[name] begin[{]
method[mergePossibleUserAttributeNames, return_type[type[Set]], modifier[public], parameter[toModify, toConsider]] begin[{]
call[toModify.addAll, parameter[member[.toConsider]]]
return[member[.toModify]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Set] operator[<] identifier[String] operator[>] identifier[mergePossibleUserAttributeNames] operator[SEP] Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[toModify] , Keyword[final] identifier[Set] operator[<] identifier[... |
private boolean isTransformableRule(QueryRule nestedRule, String expandAttribute) {
return nestedRule != null
&& nestedRule.getField() != null
&& nestedRule.getField().equals(expandAttribute)
&& (nestedRule.getOperator() == QueryRule.Operator.IN
|| nestedRule.getOperator() == Que... | class class_name[name] begin[{]
method[isTransformableRule, return_type[type[boolean]], modifier[private], parameter[nestedRule, expandAttribute]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[member[.nestedRule], !=, literal[null]], &&, binary_operation[call[neste... | Keyword[private] Keyword[boolean] identifier[isTransformableRule] operator[SEP] identifier[QueryRule] identifier[nestedRule] , identifier[String] identifier[expandAttribute] operator[SEP] {
Keyword[return] identifier[nestedRule] operator[!=] Other[null] operator[&&] identifier[nestedRule] operator[SEP] identifi... |
public boolean add(JobStatus jobStatus) {
boolean replaced = mJobSet.remove(jobStatus);
mJobSet.add(jobStatus);
if (!jobStatus.isPersisted()) {
markForBootSession(jobStatus);
}
maybeWriteStatusToDiskAsync();
return replaced;
} | class class_name[name] begin[{]
method[add, return_type[type[boolean]], modifier[public], parameter[jobStatus]] begin[{]
local_variable[type[boolean], replaced]
call[mJobSet.add, parameter[member[.jobStatus]]]
if[call[jobStatus.isPersisted, parameter[]]] begin[{]
... | Keyword[public] Keyword[boolean] identifier[add] operator[SEP] identifier[JobStatus] identifier[jobStatus] operator[SEP] {
Keyword[boolean] identifier[replaced] operator[=] identifier[mJobSet] operator[SEP] identifier[remove] operator[SEP] identifier[jobStatus] operator[SEP] operator[SEP] identifier[mJobSet] ope... |
private static int maxLiteralLengthModulus(int n)
{
int m = (n & 0xC1F07C1F) + ((n >>> 5) & 0xC1F07C1F);
m = (m >>> 15) + (m & 0x00007FFF);
if (m <= 31) {
return m == 31 ? 0 : m;
}
m = (m >>> 5) + (m & 0x0000001F);
if (m <= 31) {
return m == 31 ? 0 : m;
}
m = (m ... | class class_name[name] begin[{]
method[maxLiteralLengthModulus, return_type[type[int]], modifier[private static], parameter[n]] begin[{]
local_variable[type[int], m]
assign[member[.m], binary_operation[binary_operation[member[.m], >>>, literal[15]], +, binary_operation[member[.m], &, li... | Keyword[private] Keyword[static] Keyword[int] identifier[maxLiteralLengthModulus] operator[SEP] Keyword[int] identifier[n] operator[SEP] {
Keyword[int] identifier[m] operator[=] operator[SEP] identifier[n] operator[&] literal[Integer] operator[SEP] operator[+] operator[SEP] operator[SEP] identifier[n] operator[>... |
public void setBrowsers(com.google.api.ads.admanager.axis.v201805.Technology[] browsers) {
this.browsers = browsers;
} | class class_name[name] begin[{]
method[setBrowsers, return_type[void], modifier[public], parameter[browsers]] begin[{]
assign[THIS[member[None.browsers]], member[.browsers]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setBrowsers] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201805] operator[SEP] identifier[Technology] opera... |
@NonNull
public Map<String, Object> toParamMap() {
final AbstractMap<String, Object> networkReadyMap = new HashMap<>();
networkReadyMap.put(API_PARAM_TYPE, mTypeRaw);
networkReadyMap.put(mTypeRaw, mApiParameterMap);
networkReadyMap.put(API_PARAM_AMOUNT, mAmount);
networkRead... | class class_name[name] begin[{]
method[toParamMap, return_type[type[Map]], modifier[public], parameter[]] begin[{]
local_variable[type[AbstractMap], networkReadyMap]
call[networkReadyMap.put, parameter[member[.API_PARAM_TYPE], member[.mTypeRaw]]]
call[networkReadyMap.put... | annotation[@] identifier[NonNull] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[toParamMap] operator[SEP] operator[SEP] {
Keyword[final] identifier[AbstractMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[networkReadyMa... |
public static <S, L> Collection<S> getStatesInBlock(Block<S, L> block) {
return new OriginalStateCollection<>(block.getStates());
} | class class_name[name] begin[{]
method[getStatesInBlock, return_type[type[Collection]], modifier[public static], parameter[block]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getStates, postfix_operators=[], prefix_operators=[], qualifier=block, selectors=[], type_argu... | Keyword[public] Keyword[static] operator[<] identifier[S] , identifier[L] operator[>] identifier[Collection] operator[<] identifier[S] operator[>] identifier[getStatesInBlock] operator[SEP] identifier[Block] operator[<] identifier[S] , identifier[L] operator[>] identifier[block] operator[SEP] {
Keyword[return]... |
private List<RuleSource> readRulesDirectory(File rulesDirectory) throws MojoExecutionException {
if (rulesDirectory.exists() && !rulesDirectory.isDirectory()) {
throw new MojoExecutionException(rulesDirectory.getAbsolutePath() + " does not exist or is not a directory.");
}
getLog().i... | class class_name[name] begin[{]
method[readRulesDirectory, return_type[type[List]], modifier[private], parameter[rulesDirectory]] begin[{]
if[binary_operation[call[rulesDirectory.exists, parameter[]], &&, call[rulesDirectory.isDirectory, parameter[]]]] begin[{]
ThrowStatement(expres... | Keyword[private] identifier[List] operator[<] identifier[RuleSource] operator[>] identifier[readRulesDirectory] operator[SEP] identifier[File] identifier[rulesDirectory] operator[SEP] Keyword[throws] identifier[MojoExecutionException] {
Keyword[if] operator[SEP] identifier[rulesDirectory] operator[SEP] identifie... |
@Override
public int compare(T server1, T server2) {
LoadBalancerStats lbStats = getLoadBalancerStats();
ServerStats stats1 = lbStats.getSingleServerStat(server1);
ServerStats stats2 = lbStats.getSingleServerStat(server2);
int failuresDiff = (int) (stats2.getFailureCount() - stats1.g... | class class_name[name] begin[{]
method[compare, return_type[type[int]], modifier[public], parameter[server1, server2]] begin[{]
local_variable[type[LoadBalancerStats], lbStats]
local_variable[type[ServerStats], stats1]
local_variable[type[ServerStats], stats2]
local_variable[typ... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compare] operator[SEP] identifier[T] identifier[server1] , identifier[T] identifier[server2] operator[SEP] {
identifier[LoadBalancerStats] identifier[lbStats] operator[=] identifier[getLoadBalancerStats] operator[SEP] operator[SEP] opera... |
protected void fireAgentSpawnedInAgent(UUID spawningAgent, AgentContext context, Agent agent, Object... initializationParameters) {
// Notify the listeners on the lifecycle events inside
// the just spawned agent.
// Usually, only BICs and the AgentLifeCycleSupport in
// io.janusproject.kernel.bic.StandardBuilt... | class class_name[name] begin[{]
method[fireAgentSpawnedInAgent, return_type[void], modifier[protected], parameter[spawningAgent, context, agent, initializationParameters]] begin[{]
local_variable[type[ListenerCollection], list]
SYNCHRONIZED[THIS[member[None.agentLifecycleListeners]]] BE... | Keyword[protected] Keyword[void] identifier[fireAgentSpawnedInAgent] operator[SEP] identifier[UUID] identifier[spawningAgent] , identifier[AgentContext] identifier[context] , identifier[Agent] identifier[agent] , identifier[Object] operator[...] identifier[initializationParameters] operator[SEP] {
Keyword[fin... |
public static Distance compare(final String s1, final String s2) {
if (s1 == null) {
throw new NullPointerException("s1 must not be null");
}
if (s2 == null) {
throw new NullPointerException("s2 must not be null");
}
if (s1.equals(s2)) {
return new Distance();
}
// INFi... | class class_name[name] begin[{]
method[compare, return_type[type[Distance]], modifier[public static], parameter[s1, s2]] begin[{]
if[binary_operation[member[.s1], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_oper... | Keyword[public] Keyword[static] identifier[Distance] identifier[compare] operator[SEP] Keyword[final] identifier[String] identifier[s1] , Keyword[final] identifier[String] identifier[s2] operator[SEP] {
Keyword[if] operator[SEP] identifier[s1] operator[==] Other[null] operator[SEP] {
Keyword[throw] K... |
@PostConstruct
@SuppressWarnings("unused")
protected void postConstruct() throws GeomajasException {
crs = geoService.getCrs2(getLayerInfo().getCrs());
srid = geoService.getSridFromCrs(crs);
filterService.registerFeatureModel(featureModel);
if (null == featureModel) {
HibernateFeatureModel hibernateFeature... | class class_name[name] begin[{]
method[postConstruct, return_type[void], modifier[protected], parameter[]] begin[{]
assign[member[.crs], call[geoService.getCrs2, parameter[call[.getLayerInfo, parameter[]]]]]
assign[member[.srid], call[geoService.getSridFromCrs, parameter[member[... | annotation[@] identifier[PostConstruct] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[void] identifier[postConstruct] operator[SEP] operator[SEP] Keyword[throws] identifier[GeomajasException] {
identifier[crs] operator[=] identifier[geoService] ... |
public Observable<Page<ManagementLockObjectInner>> listNextAsync(final String nextPageLink) {
return listNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<ManagementLockObjectInner>>, Page<ManagementLockObjectInner>>() {
@Override
public P... | class class_name[name] begin[{]
method[listNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{]
return[call[.listNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[ManagementLockObjectInner] operator[>] operator[>] identifier[listNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] {
Keyword[return] identifier[listNextWithServiceResponseAs... |
static public String getManifestVersionNumber(File file) throws IOException {
JarFile jar = new JarFile(file);
Manifest manifest = jar.getManifest();
String versionNumber = null;
java.util.jar.Attributes attributes = manifest.getMainAttributes();
if (attributes!=null) {
... | class class_name[name] begin[{]
method[getManifestVersionNumber, return_type[type[String]], modifier[public static], parameter[file]] begin[{]
local_variable[type[JarFile], jar]
local_variable[type[Manifest], manifest]
local_variable[type[String], versionNumber]
local_variable[t... | Keyword[static] Keyword[public] identifier[String] identifier[getManifestVersionNumber] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[JarFile] identifier[jar] operator[=] Keyword[new] identifier[JarFile] operator[SEP] identifier[file] operator[... |
private void merge(int[] vs, int lo, int split, int len, long[] curr, long[] prev) {
System.arraycopy(vs, lo, aux, lo, len);
int i = lo, j = lo + split;
int iMax = lo + split, jMax = lo + len;
for (int k = lo, end = lo + len; k < end; k++) {
if (i == iMax)
vs... | class class_name[name] begin[{]
method[merge, return_type[void], modifier[private], parameter[vs, lo, split, len, curr, prev]] begin[{]
call[System.arraycopy, parameter[member[.vs], member[.lo], member[.aux], member[.lo], member[.len]]]
local_variable[type[int], i]
local_variabl... | Keyword[private] Keyword[void] identifier[merge] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[vs] , Keyword[int] identifier[lo] , Keyword[int] identifier[split] , Keyword[int] identifier[len] , Keyword[long] operator[SEP] operator[SEP] identifier[curr] , Keyword[long] operator[SEP] operator[SE... |
protected void populateResponseHeaders(Set<String> requestHeaderKeys, Map<String,String> metaInfo, HttpServletResponse response) {
for (String key : metaInfo.keySet()) {
if (!Listener.AUTHENTICATED_USER_HEADER.equals(key)
&& !Listener.AUTHENTICATED_JWT.equals(key)
... | class class_name[name] begin[{]
method[populateResponseHeaders, return_type[void], modifier[protected], parameter[requestHeaderKeys, metaInfo, response]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOpera... | Keyword[protected] Keyword[void] identifier[populateResponseHeaders] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[requestHeaderKeys] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[metaInfo] , identifier[HttpServletResponse] identifi... |
public void replot() {
width = co.size();
height = (int) Math.ceil(width * .2);
ratio = width / (double) height;
height = height < MIN_HEIGHT ? MIN_HEIGHT : height > MAX_HEIGHT ? MAX_HEIGHT : height;
if(scale == null) {
scale = computeScale(co);
}
BufferedImage img = new BufferedImage... | class class_name[name] begin[{]
method[replot, return_type[void], modifier[public], parameter[]] begin[{]
assign[member[.width], call[co.size, parameter[]]]
assign[member[.height], Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=width,... | Keyword[public] Keyword[void] identifier[replot] operator[SEP] operator[SEP] {
identifier[width] operator[=] identifier[co] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[height] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[ce... |
public static <T> List<T> reverse(List<T> self, boolean mutate) {
if (mutate) {
Collections.reverse(self);
return self;
}
int size = self.size();
List<T> answer = new ArrayList<T>(size);
ListIterator<T> iter = self.listIterator(size);
while (iter.h... | class class_name[name] begin[{]
method[reverse, return_type[type[List]], modifier[public static], parameter[self, mutate]] begin[{]
if[member[.mutate]] begin[{]
call[Collections.reverse, parameter[member[.self]]]
return[member[.self]]
else begin[{]
No... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[reverse] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[self] , Keyword[boolean] identifier[mutate] operator[SEP] {
Keyword[if] operator[SEP] i... |
public static String getFullDataCollectNameFromFullName(
final String fullName) {
if (fullName == null) {
return "";
}
int lastEachCommandPos = fullName
.lastIndexOf(TieConstants.EACH_COMMAND_FULL_NAME_PREFIX);
if (lastEachCommandPos < 0) {
return "";
}
int lastEachCommandIndexPos =... | class class_name[name] begin[{]
method[getFullDataCollectNameFromFullName, return_type[type[String]], modifier[public static], parameter[fullName]] begin[{]
if[binary_operation[member[.fullName], ==, literal[null]]] begin[{]
return[literal[""]]
else begin[{]
None
end... | Keyword[public] Keyword[static] identifier[String] identifier[getFullDataCollectNameFromFullName] operator[SEP] Keyword[final] identifier[String] identifier[fullName] operator[SEP] {
Keyword[if] operator[SEP] identifier[fullName] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[String]... |
public List<MFile> readFilesFromIndex(IndexReader indexReader) throws IOException {
List<MFile> result = new ArrayList<>(100);
if (index == null) return result;
indexReader.readMFiles(index, result);
return result;
} | class class_name[name] begin[{]
method[readFilesFromIndex, return_type[type[List]], modifier[public], parameter[indexReader]] begin[{]
local_variable[type[List], result]
if[binary_operation[member[.index], ==, literal[null]]] begin[{]
return[member[.result]]
else begin[{]
None
... | Keyword[public] identifier[List] operator[<] identifier[MFile] operator[>] identifier[readFilesFromIndex] operator[SEP] identifier[IndexReader] identifier[indexReader] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[List] operator[<] identifier[MFile] operator[>] identifier[result] operator[=]... |
public void forEachIndexed(int from, int step,
@NotNull IndexedLongConsumer action) {
int index = from;
while (iterator.hasNext()) {
action.accept(index, iterator.nextLong());
index += step;
}
} | class class_name[name] begin[{]
method[forEachIndexed, return_type[void], modifier[public], parameter[from, step, action]] begin[{]
local_variable[type[int], index]
while[call[iterator.hasNext, parameter[]]] begin[{]
call[action.accept, parameter[member[.index], ... | Keyword[public] Keyword[void] identifier[forEachIndexed] operator[SEP] Keyword[int] identifier[from] , Keyword[int] identifier[step] , annotation[@] identifier[NotNull] identifier[IndexedLongConsumer] identifier[action] operator[SEP] {
Keyword[int] identifier[index] operator[=] identifier[from] operator[SEP] K... |
private boolean estimateMotion() {
modelFitData.reset();
Point2D_F64 normLeft = new Point2D_F64();
Point2D_F64 normRight = new Point2D_F64();
// use 0 -> 1 stereo associations to estimate each feature's 3D position
for( int i = 0; i < quadViews.size; i++ ) {
QuadView obs = quadViews.get(i);
// conver... | class class_name[name] begin[{]
method[estimateMotion, return_type[type[boolean]], modifier[private], parameter[]] begin[{]
call[modelFitData.reset, parameter[]]
local_variable[type[Point2D_F64], normLeft]
local_variable[type[Point2D_F64], normRight]
ForStatement(body=Bl... | Keyword[private] Keyword[boolean] identifier[estimateMotion] operator[SEP] operator[SEP] {
identifier[modelFitData] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[Point2D_F64] identifier[normLeft] operator[=] Keyword[new] identifier[Point2D_F64] operator[SEP] operator[SEP] o... |
public static boolean isAuthenticed(String host, int port, String userName, String password) throws NamingException {
log.info("isAuthenticed");
// Set up the environment for creating the initial context
Hashtable<String, String> env = new Hashtable<String, String>();
env.put(Context.INITIAL_CONTEXT_FACTORY, "c... | class class_name[name] begin[{]
method[isAuthenticed, return_type[type[boolean]], modifier[public static], parameter[host, port, userName, password]] begin[{]
call[log.info, parameter[literal["isAuthenticed"]]]
local_variable[type[Hashtable], env]
call[env.put, parameter... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isAuthenticed] operator[SEP] identifier[String] identifier[host] , Keyword[int] identifier[port] , identifier[String] identifier[userName] , identifier[String] identifier[password] operator[SEP] Keyword[throws] identifier[NamingException] {
identifie... |
public void enableCircuit(int circuitNumber) throws IllegalArgumentException {
if (circuitNumber < 1 || circuitNumber > 31) {
throw new IllegalArgumentException("Cicruit number is out of range[" + circuitNumber + "] <1,31>");
}
this.mapFormat |= _CIRCUIT_ENABLED << (circuitNumber - ... | class class_name[name] begin[{]
method[enableCircuit, return_type[void], modifier[public], parameter[circuitNumber]] begin[{]
if[binary_operation[binary_operation[member[.circuitNumber], <, literal[1]], ||, binary_operation[member[.circuitNumber], >, literal[31]]]] begin[{]
ThrowSta... | Keyword[public] Keyword[void] identifier[enableCircuit] operator[SEP] Keyword[int] identifier[circuitNumber] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
Keyword[if] operator[SEP] identifier[circuitNumber] operator[<] Other[1] operator[||] identifier[circuitNumber] operator[>] Other[31] o... |
public static ByteBuffer toSerializedEvent(AbstractEvent event) throws IOException {
final Class<?> eventClass = event.getClass();
if (eventClass == EndOfPartitionEvent.class) {
return ByteBuffer.wrap(new byte[] { 0, 0, 0, END_OF_PARTITION_EVENT });
}
else if (eventClass == CheckpointBarrier.class) {
retu... | class class_name[name] begin[{]
method[toSerializedEvent, return_type[type[ByteBuffer]], modifier[public static], parameter[event]] begin[{]
local_variable[type[Class], eventClass]
if[binary_operation[member[.eventClass], ==, ClassReference(postfix_operators=[], prefix_operators=[], qua... | Keyword[public] Keyword[static] identifier[ByteBuffer] identifier[toSerializedEvent] operator[SEP] identifier[AbstractEvent] identifier[event] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[eventClass] operator[=] identifier... |
public OAuthFlow build() {
if(httpClient == null){
httpClient = new DefaultHttpClient();
}
if(tokenURL == null){
tokenURL = DEFAULT_TOKEN_URL;
}
if(authorizationURL == null){
authorizationURL = DEFAULT_AUTHORIZATION_URL;
}
if... | class class_name[name] begin[{]
method[build, return_type[type[OAuthFlow]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.httpClient], ==, literal[null]]] begin[{]
assign[member[.httpClient], ClassCreator(arguments=[], body=None, constructor_type_ar... | Keyword[public] identifier[OAuthFlow] identifier[build] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[httpClient] operator[==] Other[null] operator[SEP] {
identifier[httpClient] operator[=] Keyword[new] identifier[DefaultHttpClient] operator[SEP] operator[SEP] operator[SEP]
... |
public static int findWordEnd(String line, int pos, String noWordSep) {
return findWordEnd(line, pos, noWordSep, true);
} | class class_name[name] begin[{]
method[findWordEnd, return_type[type[int]], modifier[public static], parameter[line, pos, noWordSep]] begin[{]
return[call[.findWordEnd, parameter[member[.line], member[.pos], member[.noWordSep], literal[true]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[int] identifier[findWordEnd] operator[SEP] identifier[String] identifier[line] , Keyword[int] identifier[pos] , identifier[String] identifier[noWordSep] operator[SEP] {
Keyword[return] identifier[findWordEnd] operator[SEP] identifier[line] , identifier[pos] , identifie... |
protected Parser getSyntaxParser(Syntax syntax) throws MacroExecutionException
{
if (this.componentManager.hasComponent(Parser.class, syntax.toIdString())) {
try {
return this.componentManager.getInstance(Parser.class, syntax.toIdString());
} catch (ComponentLookupExc... | class class_name[name] begin[{]
method[getSyntaxParser, return_type[type[Parser]], modifier[protected], parameter[syntax]] begin[{]
if[THIS[member[None.componentManager]call[None.hasComponent, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=Ref... | Keyword[protected] identifier[Parser] identifier[getSyntaxParser] operator[SEP] identifier[Syntax] identifier[syntax] operator[SEP] Keyword[throws] identifier[MacroExecutionException] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[componentManager] operator[SEP] identifier[hasComponent] opera... |
public UploadObjectObserver init(UploadObjectRequest req,
S3DirectSpi s3direct, AmazonS3 s3, ExecutorService es) {
this.req = req;
this.s3direct = s3direct;
this.s3 = s3;
this.es = es;
return this;
} | class class_name[name] begin[{]
method[init, return_type[type[UploadObjectObserver]], modifier[public], parameter[req, s3direct, s3, es]] begin[{]
assign[THIS[member[None.req]], member[.req]]
assign[THIS[member[None.s3direct]], member[.s3direct]]
assign[THIS[memb... | Keyword[public] identifier[UploadObjectObserver] identifier[init] operator[SEP] identifier[UploadObjectRequest] identifier[req] , identifier[S3DirectSpi] identifier[s3direct] , identifier[AmazonS3] identifier[s3] , identifier[ExecutorService] identifier[es] operator[SEP] {
Keyword[this] operator[SEP] identifi... |
@Check
public void checkDefaultValueTypeCompatibleWithParameterType(SarlFormalParameter param) {
final XExpression defaultValue = param.getDefaultValue();
if (defaultValue != null) {
final JvmTypeReference rawType = param.getParameterType();
assert rawType != null;
final LightweightTypeReference toType = ... | class class_name[name] begin[{]
method[checkDefaultValueTypeCompatibleWithParameterType, return_type[void], modifier[public], parameter[param]] begin[{]
local_variable[type[XExpression], defaultValue]
if[binary_operation[member[.defaultValue], !=, literal[null]]] begin[{]
lo... | annotation[@] identifier[Check] Keyword[public] Keyword[void] identifier[checkDefaultValueTypeCompatibleWithParameterType] operator[SEP] identifier[SarlFormalParameter] identifier[param] operator[SEP] {
Keyword[final] identifier[XExpression] identifier[defaultValue] operator[=] identifier[param] operator[SEP] id... |
public static int copyStreamCount(final InputStream in, final OutputStream out) throws IOException {
final byte[] buffer = new byte[10240];
int tot=0;
int c;
c = in.read(buffer);
while (c >= 0) {
if (c > 0) {
out.write(buffer, 0, c);
to... | class class_name[name] begin[{]
method[copyStreamCount, return_type[type[int]], modifier[public static], parameter[in, out]] begin[{]
local_variable[type[byte], buffer]
local_variable[type[int], tot]
local_variable[type[int], c]
assign[member[.c], call[in.read, parameter... | Keyword[public] Keyword[static] Keyword[int] identifier[copyStreamCount] operator[SEP] Keyword[final] identifier[InputStream] identifier[in] , Keyword[final] identifier[OutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] Keyword[byte] operator[SEP] operator[SEP] ... |
public static boolean isAddressReachable(String hostname, int port) {
try (Socket socket = new Socket(hostname, port)) {
return true;
} catch (IOException e) {
return false;
}
} | class class_name[name] begin[{]
method[isAddressReachable, return_type[type[boolean]], modifier[public static], parameter[hostname, port]] begin[{]
TryStatement(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], ... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isAddressReachable] operator[SEP] identifier[String] identifier[hostname] , Keyword[int] identifier[port] operator[SEP] {
Keyword[try] operator[SEP] identifier[Socket] identifier[socket] operator[=] Keyword[new] identifier[Socket] operator[SEP] identif... |
public Element createNode(String nodeNamespace, String nodeName, String nodeContent) {
Element element = currentChangeLogFileDOM.createElementNS(nodeNamespace, nodeName);
element.setTextContent(nodeContent);
return element;
} | class class_name[name] begin[{]
method[createNode, return_type[type[Element]], modifier[public], parameter[nodeNamespace, nodeName, nodeContent]] begin[{]
local_variable[type[Element], element]
call[element.setTextContent, parameter[member[.nodeContent]]]
return[member[.element]... | Keyword[public] identifier[Element] identifier[createNode] operator[SEP] identifier[String] identifier[nodeNamespace] , identifier[String] identifier[nodeName] , identifier[String] identifier[nodeContent] operator[SEP] {
identifier[Element] identifier[element] operator[=] identifier[currentChangeLogFileDOM] op... |
public void download(Context context, ProgressListener progressListener, ResponseListener responseListener) {
setContext(context);
super.download(progressListener, responseListener);
} | class class_name[name] begin[{]
method[download, return_type[void], modifier[public], parameter[context, progressListener, responseListener]] begin[{]
call[.setContext, parameter[member[.context]]]
SuperMethodInvocation(arguments=[MemberReference(member=progressListener, postfix... | Keyword[public] Keyword[void] identifier[download] operator[SEP] identifier[Context] identifier[context] , identifier[ProgressListener] identifier[progressListener] , identifier[ResponseListener] identifier[responseListener] operator[SEP] {
identifier[setContext] operator[SEP] identifier[context] operator[SEP]... |
private void computeGenKill(Node n, BitSet gen, BitSet kill, boolean conditional) {
switch (n.getToken()) {
case SCRIPT:
case ROOT:
case FUNCTION:
case BLOCK:
return;
case WHILE:
case DO:
case IF:
case FOR:
computeGenKill(NodeUtil.getConditionExpress... | class class_name[name] begin[{]
method[computeGenKill, return_type[void], modifier[private], parameter[n, gen, kill, conditional]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['SCRIPT', 'ROOT', 'FUNCTION', 'BLOCK'], statements=[ReturnStatement(expression=None, label=None)]), SwitchStatemen... | Keyword[private] Keyword[void] identifier[computeGenKill] operator[SEP] identifier[Node] identifier[n] , identifier[BitSet] identifier[gen] , identifier[BitSet] identifier[kill] , Keyword[boolean] identifier[conditional] operator[SEP] {
Keyword[switch] operator[SEP] identifier[n] operator[SEP] identifier[getT... |
protected byte[] jsonSerialize(Object o) {
byte[] res = null;
try {
res = JsonUtils.toJson(o).getBytes("utf-8");
} catch (UnsupportedEncodingException e) {
logger.error("JsonSerialize object fail ", e);
}
return res;
} | class class_name[name] begin[{]
method[jsonSerialize, return_type[type[byte]], modifier[protected], parameter[o]] begin[{]
local_variable[type[byte], res]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=res, postfix_operators=[], prefix_operators... | Keyword[protected] Keyword[byte] operator[SEP] operator[SEP] identifier[jsonSerialize] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
Keyword[byte] operator[SEP] operator[SEP] identifier[res] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[res] operator[=] identifier[Js... |
@Override
public <K, V> Map<K, V> toMap(FloatFunction<? extends K> keyMapper, FloatFunction<? extends V> valueMapper) {
return toMap(keyMapper, valueMapper, Suppliers.<K, V> ofMap());
} | class class_name[name] begin[{]
method[toMap, return_type[type[Map]], modifier[public], parameter[keyMapper, valueMapper]] begin[{]
return[call[.toMap, parameter[member[.keyMapper], member[.valueMapper], call[.Suppliers, parameter[]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[K] , identifier[V] operator[>] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[toMap] operator[SEP] identifier[FloatFunction] operator[<] operator[?] Keyword[extends] identifier[K] operator[>] identifier[keyMapp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.