code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void addExtends(String superType) {
if (!Strings.isEmpty(superType)
&& !Capacity.class.getName().equals(superType)) {
JvmParameterizedTypeReference superTypeRef = newTypeRef(this.sarlCapacity, superType);
JvmTypeReference baseTypeRef = findType(this.sarlCapacity, Capacity.class.getCanonicalName());
... | class class_name[name] begin[{]
method[addExtends, return_type[void], modifier[public], parameter[superType]] begin[{]
if[binary_operation[call[Strings.isEmpty, parameter[member[.superType]]], &&, ClassReference(postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[MethodInvocati... | Keyword[public] Keyword[void] identifier[addExtends] operator[SEP] identifier[String] identifier[superType] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[Strings] operator[SEP] identifier[isEmpty] operator[SEP] identifier[superType] operator[SEP] operator[&&] operator[!] identifier[Capacity] o... |
@Override public void showTraces(List<Trace> traces, int removedTraces) {
if (lastScrollPosition == 0) {
lastScrollPosition = lv_traces.getFirstVisiblePosition();
}
adapter.clear();
adapter.addAll(traces);
adapter.notifyDataSetChanged();
updateScrollPosition(removedTraces);
} | class class_name[name] begin[{]
method[showTraces, return_type[void], modifier[public], parameter[traces, removedTraces]] begin[{]
if[binary_operation[member[.lastScrollPosition], ==, literal[0]]] begin[{]
assign[member[.lastScrollPosition], call[lv_traces.getFirstVisibl... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[showTraces] operator[SEP] identifier[List] operator[<] identifier[Trace] operator[>] identifier[traces] , Keyword[int] identifier[removedTraces] operator[SEP] {
Keyword[if] operator[SEP] identifier[lastScrollPosition] operator[==] Other... |
public static Locale toLocale(String localeStr) {
if ((localeStr == null) || (localeStr.trim().length() == 0) || ("_".equals(localeStr))) return Locale
.getDefault();
int index = localeStr.indexOf('_');
if (index < 0) return new Locale(localeStr);
String language = localeStr.substring(0, index... | class class_name[name] begin[{]
method[toLocale, return_type[type[Locale]], modifier[public static], parameter[localeStr]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.localeStr], ==, literal[null]], ||, binary_operation[call[localeStr.trim, parameter[]], ==, literal[0... | Keyword[public] Keyword[static] identifier[Locale] identifier[toLocale] operator[SEP] identifier[String] identifier[localeStr] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[localeStr] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[localeStr] operator[SEP] identi... |
public final void setPropositionIds(String[] propIds) {
if (propIds == null) {
this.propIds = ArrayUtils.EMPTY_STRING_ARRAY;
} else {
this.propIds = propIds.clone();
ProtempaUtil.internAll(this.propIds);
}
} | class class_name[name] begin[{]
method[setPropositionIds, return_type[void], modifier[final public], parameter[propIds]] begin[{]
if[binary_operation[member[.propIds], ==, literal[null]]] begin[{]
assign[THIS[member[None.propIds]], member[ArrayUtils.EMPTY_STRING_ARRAY]]
... | Keyword[public] Keyword[final] Keyword[void] identifier[setPropositionIds] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[propIds] operator[SEP] {
Keyword[if] operator[SEP] identifier[propIds] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[prop... |
public static String matchOrigin(HttpServerExchange exchange, Collection<String> allowedOrigins) throws Exception {
HeaderMap headers = exchange.getRequestHeaders();
String[] origins = headers.get(Headers.ORIGIN).toArray();
if (allowedOrigins != null && !allowedOrigins.isEmpty()) {
f... | class class_name[name] begin[{]
method[matchOrigin, return_type[type[String]], modifier[public static], parameter[exchange, allowedOrigins]] begin[{]
local_variable[type[HeaderMap], headers]
local_variable[type[String], origins]
if[binary_operation[binary_operation[member[.allow... | Keyword[public] Keyword[static] identifier[String] identifier[matchOrigin] operator[SEP] identifier[HttpServerExchange] identifier[exchange] , identifier[Collection] operator[<] identifier[String] operator[>] identifier[allowedOrigins] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[HeaderMap] ... |
public void open() throws DBException
{
if (m_pDatabase == null)
{
PhysicalDatabaseParent pDBParent = null;
Environment env = (Environment)this.getDatabaseOwner().getEnvironment();
if (env != null)
pDBParent = (PhysicalDatabaseParent)env.getPDataba... | class class_name[name] begin[{]
method[open, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_pDatabase], ==, literal[null]]] begin[{]
local_variable[type[PhysicalDatabaseParent], pDBParent]
local_variable[type[Environment], env]
... | Keyword[public] Keyword[void] identifier[open] operator[SEP] operator[SEP] Keyword[throws] identifier[DBException] {
Keyword[if] operator[SEP] identifier[m_pDatabase] operator[==] Other[null] operator[SEP] {
identifier[PhysicalDatabaseParent] identifier[pDBParent] operator[=] Other[null] operator[SEP]... |
@Override
public void startElement(String namespaceURI, String localName,
String qName, Attributes atts) throws SAXException {
try {
if (XHTML_NS.equals(namespaceURI)) {
if ("meta".equals(localName)
&& ((atts.getIndex("", "http-equiv") != -1) ... | class class_name[name] begin[{]
method[startElement, return_type[void], modifier[public], parameter[namespaceURI, localName, qName, atts]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=namespaceURI, postfix_operators=[], prefix_operators=[], quali... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[startElement] operator[SEP] identifier[String] identifier[namespaceURI] , identifier[String] identifier[localName] , identifier[String] identifier[qName] , identifier[Attributes] identifier[atts] operator[SEP] Keyword[throws] identifier[SAXE... |
public void updateModule(String importFile) throws Exception {
CmsModule module = CmsModuleImportExportHandler.readModuleFromImport(importFile);
String moduleName = module.getName();
String moduleVersion = module.getVersionStr();
m_shell.getOut().println("Updating module " + moduleName ... | class class_name[name] begin[{]
method[updateModule, return_type[void], modifier[public], parameter[importFile]] begin[{]
local_variable[type[CmsModule], module]
local_variable[type[String], moduleName]
local_variable[type[String], moduleVersion]
call[m_shell.getOut, par... | Keyword[public] Keyword[void] identifier[updateModule] operator[SEP] identifier[String] identifier[importFile] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[CmsModule] identifier[module] operator[=] identifier[CmsModuleImportExportHandler] operator[SEP] identifier[readModuleFromImport] operato... |
public <R> Request<T> setRequestData(R requestData, Converter<R, NetworkRequest>
converterToRequest)
throws IOException {
checkIfActive();
Utils.checkNotNull(requestData, "networkRequest cannot be null");
Utils.checkNotNull(converterToRequest, "converterToRequest cannot b... | class class_name[name] begin[{]
method[setRequestData, return_type[type[Request]], modifier[public], parameter[requestData, converterToRequest]] begin[{]
call[.checkIfActive, parameter[]]
call[Utils.checkNotNull, parameter[member[.requestData], literal["networkRequest cannot be ... | Keyword[public] operator[<] identifier[R] operator[>] identifier[Request] operator[<] identifier[T] operator[>] identifier[setRequestData] operator[SEP] identifier[R] identifier[requestData] , identifier[Converter] operator[<] identifier[R] , identifier[NetworkRequest] operator[>] identifier[converterToRequest] opera... |
public List<ENTITY> page(List<Match> matches, List<Order> order, int curPage, int pageSize) {
if (curPage < 0 || pageSize < 0) {
return find(matches, order);
}
int offset = (curPage) * pageSize;
int limit = pageSize;
return find(matches, order, offset, limit);
} | class class_name[name] begin[{]
method[page, return_type[type[List]], modifier[public], parameter[matches, order, curPage, pageSize]] begin[{]
if[binary_operation[binary_operation[member[.curPage], <, literal[0]], ||, binary_operation[member[.pageSize], <, literal[0]]]] begin[{]
ret... | Keyword[public] identifier[List] operator[<] identifier[ENTITY] operator[>] identifier[page] operator[SEP] identifier[List] operator[<] identifier[Match] operator[>] identifier[matches] , identifier[List] operator[<] identifier[Order] operator[>] identifier[order] , Keyword[int] identifier[curPage] , Keyword[int] id... |
public static String getShortRequestDump(String fromMethod, boolean includeHeaders, HttpServletRequest request) {
StringBuilder dump = new StringBuilder();
dump.append("Timestamp : ").append(ISO8601.getTimestamp()).append("\n");
dump.append("fromMethod : ").append(fromMethod).append(... | class class_name[name] begin[{]
method[getShortRequestDump, return_type[type[String]], modifier[public static], parameter[fromMethod, includeHeaders, request]] begin[{]
local_variable[type[StringBuilder], dump]
call[dump.append, parameter[literal["Timestamp : "]]]
ca... | Keyword[public] Keyword[static] identifier[String] identifier[getShortRequestDump] operator[SEP] identifier[String] identifier[fromMethod] , Keyword[boolean] identifier[includeHeaders] , identifier[HttpServletRequest] identifier[request] operator[SEP] {
identifier[StringBuilder] identifier[dump] operator[=] Ke... |
public void setPlatforms(java.util.Collection<SigningPlatform> platforms) {
if (platforms == null) {
this.platforms = null;
return;
}
this.platforms = new java.util.ArrayList<SigningPlatform>(platforms);
} | class class_name[name] begin[{]
method[setPlatforms, return_type[void], modifier[public], parameter[platforms]] begin[{]
if[binary_operation[member[.platforms], ==, literal[null]]] begin[{]
assign[THIS[member[None.platforms]], literal[null]]
return[None]
... | Keyword[public] Keyword[void] identifier[setPlatforms] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[SigningPlatform] operator[>] identifier[platforms] operator[SEP] {
Keyword[if] operator[SEP] identifier[platforms] operator[==] Other[nu... |
protected static String cleanupUrl(final String url) {
if (url == null) {
return null;
}
val jsessionPosition = url.indexOf(";jsession");
if (jsessionPosition == -1) {
return url;
}
val questionMarkPosition = url.indexOf('?');
if (questionM... | class class_name[name] begin[{]
method[cleanupUrl, return_type[type[String]], modifier[static protected], parameter[url]] begin[{]
if[binary_operation[member[.url], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[ty... | Keyword[protected] Keyword[static] identifier[String] identifier[cleanupUrl] operator[SEP] Keyword[final] identifier[String] identifier[url] operator[SEP] {
Keyword[if] operator[SEP] identifier[url] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
iden... |
@Override
public Iterator iterate()
{
return new ResultIterator((CouchDBClient) persistenceDelegeator.getClient(getEntityMetadata()),
getEntityMetadata(), persistenceDelegeator, onTranslation(getKunderaQuery().getFilterClauseQueue(),
getEntityMetadata()), getFetch... | class class_name[name] begin[{]
method[iterate, return_type[type[Iterator]], modifier[public], parameter[]] begin[{]
return[ClassCreator(arguments=[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEntityMetadata, postfix_operators=[], prefix_operators=[], qualifier=,... | annotation[@] identifier[Override] Keyword[public] identifier[Iterator] identifier[iterate] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[ResultIterator] operator[SEP] operator[SEP] identifier[CouchDBClient] operator[SEP] identifier[persistenceDelegeator] operator[SEP] identifier[getClien... |
public static <K, V, R> Optional<R> getValueAsOptIfExist(Map<K, V> map,
K key, Function<V, R> returnBuilderFunction) {
return getOptional(map, key).map(returnBuilderFunction::apply);
} | class class_name[name] begin[{]
method[getValueAsOptIfExist, return_type[type[Optional]], modifier[public static], parameter[map, key, returnBuilderFunction]] begin[{]
return[call[.getOptional, parameter[member[.map], member[.key]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] , identifier[R] operator[>] identifier[Optional] operator[<] identifier[R] operator[>] identifier[getValueAsOptIfExist] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[map] , identifier[K] identi... |
public RawComponent addExperimentalComponent(String name) {
RawComponent raw = new RawComponent(name);
addComponent(raw);
return raw;
} | class class_name[name] begin[{]
method[addExperimentalComponent, return_type[type[RawComponent]], modifier[public], parameter[name]] begin[{]
local_variable[type[RawComponent], raw]
call[.addComponent, parameter[member[.raw]]]
return[member[.raw]]
end[}]
END[}] | Keyword[public] identifier[RawComponent] identifier[addExperimentalComponent] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[RawComponent] identifier[raw] operator[=] Keyword[new] identifier[RawComponent] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[addCompo... |
@Override
protected byte[] encodeType(Byte t) {
final ByteBuffer buffer = allocate(size);
// t is guaranteed non-null by superclass
buffer.put(t);
return buffer.array();
} | class class_name[name] begin[{]
method[encodeType, return_type[type[byte]], modifier[protected], parameter[t]] begin[{]
local_variable[type[ByteBuffer], buffer]
call[buffer.put, parameter[member[.t]]]
return[call[buffer.array, parameter[]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[protected] Keyword[byte] operator[SEP] operator[SEP] identifier[encodeType] operator[SEP] identifier[Byte] identifier[t] operator[SEP] {
Keyword[final] identifier[ByteBuffer] identifier[buffer] operator[=] identifier[allocate] operator[SEP] identifier[size] operator[SEP... |
public boolean waitForCancelResponse(SipTransaction siptrans, long timeout) {
initErrorInfo();
if (siptrans == null) {
returnCode = SipSession.INVALID_OPERATION;
errorMessage = (String) SipSession.statusCodeDescription.get(new Integer(returnCode))
+ " - no RE-INVITE transaction object giv... | class class_name[name] begin[{]
method[waitForCancelResponse, return_type[type[boolean]], modifier[public], parameter[siptrans, timeout]] begin[{]
call[.initErrorInfo, parameter[]]
if[binary_operation[member[.siptrans], ==, literal[null]]] begin[{]
assign... | Keyword[public] Keyword[boolean] identifier[waitForCancelResponse] operator[SEP] identifier[SipTransaction] identifier[siptrans] , Keyword[long] identifier[timeout] operator[SEP] {
identifier[initErrorInfo] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[siptrans] operator[==] Oth... |
@Override
public EClass getIfcRepresentationItem() {
if (ifcRepresentationItemEClass == null) {
ifcRepresentationItemEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(568);
}
return ifcRepresentationItemEClass;
} | class class_name[name] begin[{]
method[getIfcRepresentationItem, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcRepresentationItemEClass], ==, literal[null]]] begin[{]
assign[member[.ifcRepresentationItemEClass], Cast(ex... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcRepresentationItem] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcRepresentationItemEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcRepresentationItemEClass] operator[=] operat... |
public void toStream(boolean skipNonOverrides, OutputStream out)
throws Exception {
PrintWriter writer = null;
try {
writer = new PrintWriter(new OutputStreamWriter(out, "UTF-8"));
write(skipNonOverrides, true, writer);
} finally {
try {
... | class class_name[name] begin[{]
method[toStream, return_type[void], modifier[public], parameter[skipNonOverrides, out]] begin[{]
local_variable[type[PrintWriter], writer]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=writer, postfix_operators=[... | Keyword[public] Keyword[void] identifier[toStream] operator[SEP] Keyword[boolean] identifier[skipNonOverrides] , identifier[OutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[PrintWriter] identifier[writer] operator[=] Other[null] operator[SEP] Keyword[try] {
... |
public static Property select(
final String name, final String title, final String description,
final boolean required, final String defaultValue, final Collection<? extends Enum<?>> selectValues,
final Map<String, String> selectLabels,
final PropertyScope scope, final Ma... | class class_name[name] begin[{]
method[select, return_type[type[Property]], modifier[public static], parameter[name, title, description, required, defaultValue, selectValues, selectLabels, scope, renderingOptions]] begin[{]
local_variable[type[ArrayList], strings]
ForStatement(body=BlockStateme... | Keyword[public] Keyword[static] identifier[Property] identifier[select] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[title] , Keyword[final] identifier[String] identifier[description] , Keyword[final] Keyword[boolean] identifier[required] , Keyword[... |
static boolean isJAXBElement(JType type) {
//noinspection RedundantIfStatement
if (type.fullName().startsWith(JAXBElement.class.getName())) {
return true;
}
return false;
} | class class_name[name] begin[{]
method[isJAXBElement, return_type[type[boolean]], modifier[static], parameter[type]] begin[{]
if[call[type.fullName, parameter[]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
return[literal[false]]
end[}]
END[}... | Keyword[static] Keyword[boolean] identifier[isJAXBElement] operator[SEP] identifier[JType] identifier[type] operator[SEP] {
Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[fullName] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[JAXBElement] operator... |
@Deprecated
public static void error(String message, Throwable error) {
logger.error(message, error);
} | class class_name[name] begin[{]
method[error, return_type[void], modifier[public static], parameter[message, error]] begin[{]
call[logger.error, parameter[member[.message], member[.error]]]
end[}]
END[}] | annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] Keyword[void] identifier[error] operator[SEP] identifier[String] identifier[message] , identifier[Throwable] identifier[error] operator[SEP] {
identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[message] , identifier[e... |
public void parseSignaturesStream(InputStream in, String name) throws IOException,ParseException {
logger.info("Reading API signatures: " + name);
final Set<String> missingClasses = new TreeSet<String>();
parseSignaturesStream(in, false, missingClasses);
reportMissingSignatureClasses(missingClasses);
... | class class_name[name] begin[{]
method[parseSignaturesStream, return_type[void], modifier[public], parameter[in, name]] begin[{]
call[logger.info, parameter[binary_operation[literal["Reading API signatures: "], +, member[.name]]]]
local_variable[type[Set], missingClasses]
... | Keyword[public] Keyword[void] identifier[parseSignaturesStream] operator[SEP] identifier[InputStream] identifier[in] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ParseException] {
identifier[logger] operator[SEP] identifier[info] operator[SEP] literal... |
public void insert(Widget widget, String tabText, int beforeIndex) {
insert(widget, tabText, false, beforeIndex);
} | class class_name[name] begin[{]
method[insert, return_type[void], modifier[public], parameter[widget, tabText, beforeIndex]] begin[{]
call[.insert, parameter[member[.widget], member[.tabText], literal[false], member[.beforeIndex]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[insert] operator[SEP] identifier[Widget] identifier[widget] , identifier[String] identifier[tabText] , Keyword[int] identifier[beforeIndex] operator[SEP] {
identifier[insert] operator[SEP] identifier[widget] , identifier[tabText] , literal[boolean] , identifier[befor... |
private boolean readln1(String strExpected, String strAlternative) {
String sX = scanner.next();
if (sX.equals(strExpected)) {
return true;
}
if (sX.equals(strAlternative)) {
return false;
}
throw new IllegalStateException("Expected: " + strAlternative + " but got: " + sX);
} | class class_name[name] begin[{]
method[readln1, return_type[type[boolean]], modifier[private], parameter[strExpected, strAlternative]] begin[{]
local_variable[type[String], sX]
if[call[sX.equals, parameter[member[.strExpected]]]] begin[{]
return[literal[true]]
else b... | Keyword[private] Keyword[boolean] identifier[readln1] operator[SEP] identifier[String] identifier[strExpected] , identifier[String] identifier[strAlternative] operator[SEP] {
identifier[String] identifier[sX] operator[=] identifier[scanner] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP... |
public static CommerceCurrency fetchByG_A_Last(long groupId,
boolean active, OrderByComparator<CommerceCurrency> orderByComparator) {
return getPersistence()
.fetchByG_A_Last(groupId, active, orderByComparator);
} | class class_name[name] begin[{]
method[fetchByG_A_Last, return_type[type[CommerceCurrency]], modifier[public static], parameter[groupId, active, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CommerceCurrency] identifier[fetchByG_A_Last] operator[SEP] Keyword[long] identifier[groupId] , Keyword[boolean] identifier[active] , identifier[OrderByComparator] operator[<] identifier[CommerceCurrency] operator[>] identifier[orderByComparator] operator[SEP] {
Keywo... |
public long readRawVarint64() throws IOException
{
// final byte[] buffer = this.buffer;
// int offset = this.offset;
int shift = 0;
long result = 0;
while (shift < 64)
{
final byte b = buffer.get();
result |= (long) (b & 0x7F) << shift;
... | class class_name[name] begin[{]
method[readRawVarint64, return_type[type[long]], modifier[public], parameter[]] begin[{]
local_variable[type[int], shift]
local_variable[type[long], result]
while[binary_operation[member[.shift], <, literal[64]]] begin[{]
local_variabl... | Keyword[public] Keyword[long] identifier[readRawVarint64] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[shift] operator[=] Other[0] operator[SEP] Keyword[long] identifier[result] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[shift] oper... |
private void executeInClassScope(Callable<Void> call) {
try {
classContext.get().activate(deploymentClass);
call.call();
} catch (Exception e) {
throw new RuntimeException("Could not invoke operation", e); // NOPMD
} finally {
classContext.get().de... | class class_name[name] begin[{]
method[executeInClassScope, return_type[void], modifier[private], parameter[call]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=classContext, selectors=[MethodI... | Keyword[private] Keyword[void] identifier[executeInClassScope] operator[SEP] identifier[Callable] operator[<] identifier[Void] operator[>] identifier[call] operator[SEP] {
Keyword[try] {
identifier[classContext] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[activat... |
@Override
public Map<String, Collection<String>> getRequireFeatureWithTolerates() {
// The feature may be an older feature which never had the tolerates information
// stored, in which case, look in the older requireFeature field and massage
// that info into the required format.
// ... | class class_name[name] begin[{]
method[getRequireFeatureWithTolerates, return_type[type[Map]], modifier[public], parameter[]] begin[{]
local_variable[type[Collection], rfwt]
if[binary_operation[member[.rfwt], !=, literal[null]]] begin[{]
local_variable[type[Map], rv]
... | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Collection] operator[<] identifier[String] operator[>] operator[>] identifier[getRequireFeatureWithTolerates] operator[SEP] operator[SEP] {
identifier[Collection] operator[<] identifier[RequireFeatureW... |
public Formula importFormula(final Formula formula) {
if (this.importer == null) {
this.importer = new FormulaFactoryImporter(this);
}
final Formula imported = formula.transform(this.importer);
adjustCounters(imported);
return imported;
} | class class_name[name] begin[{]
method[importFormula, return_type[type[Formula]], modifier[public], parameter[formula]] begin[{]
if[binary_operation[THIS[member[None.importer]], ==, literal[null]]] begin[{]
assign[THIS[member[None.importer]], ClassCreator(arguments=[This... | Keyword[public] identifier[Formula] identifier[importFormula] operator[SEP] Keyword[final] identifier[Formula] identifier[formula] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[importer] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[... |
public static void drawStringCentered (
Graphics g, String str, int x, int y, int width, int height)
{
FontMetrics fm = g.getFontMetrics(g.getFont());
int xpos = x + ((width - fm.stringWidth(str)) / 2);
int ypos = y + ((height + fm.getAscent()) / 2);
g.drawString(str, xpos, y... | class class_name[name] begin[{]
method[drawStringCentered, return_type[void], modifier[public static], parameter[g, str, x, y, width, height]] begin[{]
local_variable[type[FontMetrics], fm]
local_variable[type[int], xpos]
local_variable[type[int], ypos]
call[g.drawString... | Keyword[public] Keyword[static] Keyword[void] identifier[drawStringCentered] operator[SEP] identifier[Graphics] identifier[g] , identifier[String] identifier[str] , Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] {
iden... |
public void marshall(APNSVoipChannelRequest aPNSVoipChannelRequest, ProtocolMarshaller protocolMarshaller) {
if (aPNSVoipChannelRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(aPNSVoipChann... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[aPNSVoipChannelRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.aPNSVoipChannelRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[L... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[APNSVoipChannelRequest] identifier[aPNSVoipChannelRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[aPNSVoipChannelRequest] operator[==] Other[null] operator[SE... |
private static Segment<PrimitiveParameter> nextSegmentAfterMatch(
PatternFinderUser def, Segment<PrimitiveParameter> seg,
Algorithm algorithm, int minPatternLength, int maxPatternLength) {
if (seg == null) {
return null;
}
int arg;
int x = seg.getFirs... | class class_name[name] begin[{]
method[nextSegmentAfterMatch, return_type[type[Segment]], modifier[private static], parameter[def, seg, algorithm, minPatternLength, maxPatternLength]] begin[{]
if[binary_operation[member[.seg], ==, literal[null]]] begin[{]
return[literal[null]]
... | Keyword[private] Keyword[static] identifier[Segment] operator[<] identifier[PrimitiveParameter] operator[>] identifier[nextSegmentAfterMatch] operator[SEP] identifier[PatternFinderUser] identifier[def] , identifier[Segment] operator[<] identifier[PrimitiveParameter] operator[>] identifier[seg] , identifier[Algorithm]... |
public CollectionResult<double[]> run(Database database, Relation<O> rel) {
DistanceQuery<O> dq = rel.getDistanceQuery(getDistanceFunction());
int size = rel.size();
long pairs = (size * (long) size) >> 1;
final long ssize = sampling <= 1 ? (long) Math.ceil(sampling * pairs) : (long) sampling;
if(s... | class class_name[name] begin[{]
method[run, return_type[type[CollectionResult]], modifier[public], parameter[database, rel]] begin[{]
local_variable[type[DistanceQuery], dq]
local_variable[type[int], size]
local_variable[type[long], pairs]
local_variable[type[long], ssize]
... | Keyword[public] identifier[CollectionResult] operator[<] Keyword[double] operator[SEP] operator[SEP] operator[>] identifier[run] operator[SEP] identifier[Database] identifier[database] , identifier[Relation] operator[<] identifier[O] operator[>] identifier[rel] operator[SEP] {
identifier[DistanceQuery] operator... |
public final void setAll(IoSessionConfig config) {
if (config == null) {
throw new NullPointerException("config");
}
if (ENABLE_BUFFER_SIZE) {
System.out.println("AbstractIoSessionConfig.setAll()");
setReadBufferSize(config.getReadBufferSize());
s... | class class_name[name] begin[{]
method[setAll, return_type[void], modifier[final public], parameter[config]] begin[{]
if[binary_operation[member[.config], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[]... | Keyword[public] Keyword[final] Keyword[void] identifier[setAll] operator[SEP] identifier[IoSessionConfig] identifier[config] operator[SEP] {
Keyword[if] operator[SEP] identifier[config] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] ... |
public void addWithOverflow(PagedBitMap that, PagedBitMap overflow) {
LongArray ta = that.array;
LongArray of = overflow.array;
long n = 0;
while(true) {
n = ta.seekNext(n);
if (n < 0) {
break;
}
long o = array.get(n) & ta.g... | class class_name[name] begin[{]
method[addWithOverflow, return_type[void], modifier[public], parameter[that, overflow]] begin[{]
local_variable[type[LongArray], ta]
local_variable[type[LongArray], of]
local_variable[type[long], n]
while[literal[true]] begin[{]
... | Keyword[public] Keyword[void] identifier[addWithOverflow] operator[SEP] identifier[PagedBitMap] identifier[that] , identifier[PagedBitMap] identifier[overflow] operator[SEP] {
identifier[LongArray] identifier[ta] operator[=] identifier[that] operator[SEP] identifier[array] operator[SEP] identifier[LongArray] id... |
public FindingCriteria withCriterion(java.util.Map<String, Condition> criterion) {
setCriterion(criterion);
return this;
} | class class_name[name] begin[{]
method[withCriterion, return_type[type[FindingCriteria]], modifier[public], parameter[criterion]] begin[{]
call[.setCriterion, parameter[member[.criterion]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[FindingCriteria] identifier[withCriterion] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Condition] operator[>] identifier[criterion] operator[SEP] {
identifier[setCriterion] operator[SEP] identi... |
private void streamContent(HttpServletResponse response, InputStream is) throws IOException {
OutputStream os = response.getOutputStream();
try {
byte buffer[] = new byte[DEFAULT_BUFFER_SIZE];
int bytes;
while ((bytes = is.read(buffer)) >= 0) {
os.wri... | class class_name[name] begin[{]
method[streamContent, return_type[void], modifier[private], parameter[response, is]] begin[{]
local_variable[type[OutputStream], os]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[None], initializer=ArrayC... | Keyword[private] Keyword[void] identifier[streamContent] operator[SEP] identifier[HttpServletResponse] identifier[response] , identifier[InputStream] identifier[is] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[OutputStream] identifier[os] operator[=] identifier[response] operator[SEP] iden... |
@CheckForNull
public File getCurrentFileName()
{
if (currentFileNameMockFile != null) {
return currentFileNameMockFile;
}
// the remainder of this method is a workaround for Checkstyle issue #1205
// https://github.com/checkstyle/checkstyle/issues/1205
final ... | class class_name[name] begin[{]
method[getCurrentFileName, return_type[type[File]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.currentFileNameMockFile], !=, literal[null]]] begin[{]
return[member[.currentFileNameMockFile]]
else begin[{]
None
... | annotation[@] identifier[CheckForNull] Keyword[public] identifier[File] identifier[getCurrentFileName] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[currentFileNameMockFile] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[currentFileNameMockFile] operator[SEP] ... |
public static Rational sDivide(Rational a, Rational b) {
long cPtr = VideoJNI.Rational_sDivide(Rational.getCPtr(a), a, Rational.getCPtr(b), b);
return (cPtr == 0) ? null : new Rational(cPtr, false);
} | class class_name[name] begin[{]
method[sDivide, return_type[type[Rational]], modifier[public static], parameter[a, b]] begin[{]
local_variable[type[long], cPtr]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=cPtr, postfix_operators=[], prefix_operators=[], qu... | Keyword[public] Keyword[static] identifier[Rational] identifier[sDivide] operator[SEP] identifier[Rational] identifier[a] , identifier[Rational] identifier[b] operator[SEP] {
Keyword[long] identifier[cPtr] operator[=] identifier[VideoJNI] operator[SEP] identifier[Rational_sDivide] operator[SEP] identifier[Ratio... |
public final <R> Call<R> map(Mapper<V, R> mapper) {
return new Mapping<>(mapper, this);
} | class class_name[name] begin[{]
method[map, return_type[type[Call]], modifier[final public], parameter[mapper]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=mapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qu... | Keyword[public] Keyword[final] operator[<] identifier[R] operator[>] identifier[Call] operator[<] identifier[R] operator[>] identifier[map] operator[SEP] identifier[Mapper] operator[<] identifier[V] , identifier[R] operator[>] identifier[mapper] operator[SEP] {
Keyword[return] Keyword[new] identifier[Mapping] o... |
@Override
public void destroy() {
if (timerFilterThread != null) {
timerFilterThread.setStopped();
timerFilterThread = null;
}
Filter filter = null;
for (int i=0; i<filterFactory.getAllFilter().size(); i++) {
// ZAP: Removed unnecessary c... | class class_name[name] begin[{]
method[destroy, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.timerFilterThread], !=, literal[null]]] begin[{]
call[timerFilterThread.setStopped, parameter[]]
assign[member[.... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[timerFilterThread] operator[!=] Other[null] operator[SEP] {
identifier[timerFilterThread] operator[SEP] identifier[setStopped] operator[SEP] operator[... |
public void marshall(TapeRecoveryPointInfo tapeRecoveryPointInfo, ProtocolMarshaller protocolMarshaller) {
if (tapeRecoveryPointInfo == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(tapeRecoveryPoin... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[tapeRecoveryPointInfo, protocolMarshaller]] begin[{]
if[binary_operation[member[.tapeRecoveryPointInfo], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Lit... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[TapeRecoveryPointInfo] identifier[tapeRecoveryPointInfo] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[tapeRecoveryPointInfo] operator[==] Other[null] operator[SEP] ... |
public void addOrAlterPartition(HiveTable table, HivePartition partition) throws IOException {
if (!addPartitionIfNotExists(table, partition)) {
alterPartition(table, partition);
}
} | class class_name[name] begin[{]
method[addOrAlterPartition, return_type[void], modifier[public], parameter[table, partition]] begin[{]
if[call[.addPartitionIfNotExists, parameter[member[.table], member[.partition]]]] begin[{]
call[.alterPartition, parameter[member[.table... | Keyword[public] Keyword[void] identifier[addOrAlterPartition] operator[SEP] identifier[HiveTable] identifier[table] , identifier[HivePartition] identifier[partition] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[addPartitionIfNotExists] operator[SEP] id... |
protected void initJpa() {
if (jpaPersistenceUnitName != null) {
jpaEntityManagerFactory = JpaHelper.createEntityManagerFactory(jpaPersistenceUnitName);
}
if (jpaEntityManagerFactory != null) {
sessionFactories.put(EntityManagerSession.class, new EntityManagerSessionFactory(jpaEntityManagerFacto... | class class_name[name] begin[{]
method[initJpa, return_type[void], modifier[protected], parameter[]] begin[{]
if[binary_operation[member[.jpaPersistenceUnitName], !=, literal[null]]] begin[{]
assign[member[.jpaEntityManagerFactory], call[JpaHelper.createEntityManagerFact... | Keyword[protected] Keyword[void] identifier[initJpa] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[jpaPersistenceUnitName] operator[!=] Other[null] operator[SEP] {
identifier[jpaEntityManagerFactory] operator[=] identifier[JpaHelper] operator[SEP] identifier[createEntityManagerFac... |
public void marshall(ShareTarget shareTarget, ProtocolMarshaller protocolMarshaller) {
if (shareTarget == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(shareTarget.getId(), ID_BINDING);
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[shareTarget, protocolMarshaller]] begin[{]
if[binary_operation[member[.shareTarget], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operato... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ShareTarget] identifier[shareTarget] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[shareTarget] operator[==] Other[null] operator[SEP] {
Keyword[throw] Ke... |
public static void hessianPrewitt(GrayF32 inputDerivX , GrayF32 inputDerivY,
GrayF32 derivXX, GrayF32 derivYY, GrayF32 derivXY ,
ImageBorder_F32 border ) {
InputSanityCheck.reshapeOneIn(inputDerivX, inputDerivY, derivXX, derivYY, derivXY);
GradientPrewitt.process(inputDerivX,derivXX,derivXY,b... | class class_name[name] begin[{]
method[hessianPrewitt, return_type[void], modifier[public static], parameter[inputDerivX, inputDerivY, derivXX, derivYY, derivXY, border]] begin[{]
call[InputSanityCheck.reshapeOneIn, parameter[member[.inputDerivX], member[.inputDerivY], member[.derivXX], member[... | Keyword[public] Keyword[static] Keyword[void] identifier[hessianPrewitt] operator[SEP] identifier[GrayF32] identifier[inputDerivX] , identifier[GrayF32] identifier[inputDerivY] , identifier[GrayF32] identifier[derivXX] , identifier[GrayF32] identifier[derivYY] , identifier[GrayF32] identifier[derivXY] , identifier... |
public void setModel(File model) {
this.dirty = true;
this.model = model;
this.modelConfig.setProperty(MODEL_FILE, model.getAbsolutePath());
} | class class_name[name] begin[{]
method[setModel, return_type[void], modifier[public], parameter[model]] begin[{]
assign[THIS[member[None.dirty]], literal[true]]
assign[THIS[member[None.model]], member[.model]]
THIS[member[None.modelConfig]call[None.setProperty, p... | Keyword[public] Keyword[void] identifier[setModel] operator[SEP] identifier[File] identifier[model] operator[SEP] {
Keyword[this] operator[SEP] identifier[dirty] operator[=] literal[boolean] operator[SEP] Keyword[this] operator[SEP] identifier[model] operator[=] identifier[model] operator[SEP] Keyword[this] oper... |
public static BundleAdjustment<SceneStructureProjective> bundleSparseProjective(@Nullable ConfigBundleAdjustment config ) {
if( config == null )
config = new ConfigBundleAdjustment();
UnconstrainedLeastSquaresSchur<DMatrixSparseCSC> minimizer;
if( config.configOptimizer instanceof ConfigTrustRegion )
mini... | class class_name[name] begin[{]
method[bundleSparseProjective, return_type[type[BundleAdjustment]], modifier[public static], parameter[config]] begin[{]
if[binary_operation[member[.config], ==, literal[null]]] begin[{]
assign[member[.config], ClassCreator(arguments=[], body=None, co... | Keyword[public] Keyword[static] identifier[BundleAdjustment] operator[<] identifier[SceneStructureProjective] operator[>] identifier[bundleSparseProjective] operator[SEP] annotation[@] identifier[Nullable] identifier[ConfigBundleAdjustment] identifier[config] operator[SEP] {
Keyword[if] operator[SEP] identifier[... |
public Object writeAndRefresh(boolean bRefreshDataIfNoMods) throws DBException
{
if (!this.isModified())
{
if ((this.getEditMode() == DBConstants.EDIT_IN_PROGRESS)
|| (this.getEditMode() == DBConstants.EDIT_CURRENT))
{
boolean bLocked = (th... | class class_name[name] begin[{]
method[writeAndRefresh, return_type[type[Object]], modifier[public], parameter[bRefreshDataIfNoMods]] begin[{]
if[THIS[call[None.isModified, parameter[]]]] begin[{]
if[binary_operation[binary_operation[THIS[call[None.getEditMode, parameter... | Keyword[public] identifier[Object] identifier[writeAndRefresh] operator[SEP] Keyword[boolean] identifier[bRefreshDataIfNoMods] operator[SEP] Keyword[throws] identifier[DBException] {
Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[isModified] operator[SEP] operator[SEP] operator[SEP]... |
public synchronized void onLowMemory() {
try {
this.mCachedTiles.clear();
} catch (Exception e) {
log.log(Level.SEVERE, "onLowMemory", e);
}
} | class class_name[name] begin[{]
method[onLowMemory, return_type[void], modifier[synchronized public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=mCachedTiles, postfix_operator... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[onLowMemory] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[this] operator[SEP] identifier[mCachedTiles] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifie... |
public List<Page> getPages(List<String> titleList) throws Exception {
String rvprop = "content|ids|timestamp";
List<Page> result = this.getPages(titleList, rvprop);
return result;
} | class class_name[name] begin[{]
method[getPages, return_type[type[List]], modifier[public], parameter[titleList]] begin[{]
local_variable[type[String], rvprop]
local_variable[type[List], result]
return[member[.result]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[Page] operator[>] identifier[getPages] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[titleList] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[rvprop] operator[=] literal[String] op... |
@Override
public boolean matchesIndexValue(int v) {
if (pattern.length() == 0) {
return true;
}
int c = UTF16.charAt(pattern, 0);
UnicodeMatcher m = data.lookupMatcher(c);
return (m == null) ? ((c & 0xFF) == v) : m.matchesIndexValue(v);
} | class class_name[name] begin[{]
method[matchesIndexValue, return_type[type[boolean]], modifier[public], parameter[v]] begin[{]
if[binary_operation[call[pattern.length, parameter[]], ==, literal[0]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
loc... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[matchesIndexValue] operator[SEP] Keyword[int] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] identifier[pattern] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] {
Ke... |
protected void loadRulesFromProperties(Properties p) {
for (String key : p.stringPropertyNames()) {
Matcher m = RE_TAG_ATTR_TYPE.matcher(key);
if (m.matches()) {
String tagName = m.group(1);
String testAttrName = m.group(2);
String testAttrValue = m.group(3);
String attrNameMatch = m.group(4);
... | class class_name[name] begin[{]
method[loadRulesFromProperties, return_type[void], modifier[protected], parameter[p]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(ar... | Keyword[protected] Keyword[void] identifier[loadRulesFromProperties] operator[SEP] identifier[Properties] identifier[p] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[key] operator[:] identifier[p] operator[SEP] identifier[stringPropertyNames] operator[SEP] operator[SEP] operator[SEP] ... |
public EmbedBuilder updateFields(Predicate<EmbedField> predicate, Consumer<EditableEmbedField> updater) {
delegate.updateFields(predicate, updater);
return this;
} | class class_name[name] begin[{]
method[updateFields, return_type[type[EmbedBuilder]], modifier[public], parameter[predicate, updater]] begin[{]
call[delegate.updateFields, parameter[member[.predicate], member[.updater]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[EmbedBuilder] identifier[updateFields] operator[SEP] identifier[Predicate] operator[<] identifier[EmbedField] operator[>] identifier[predicate] , identifier[Consumer] operator[<] identifier[EditableEmbedField] operator[>] identifier[updater] operator[SEP] {
identifier[delegate] operat... |
@Override
public final void ignorableWhitespace(char[] ch, int start, int length)
throws SAXException {
characters(ch, start, length);
} | class class_name[name] begin[{]
method[ignorableWhitespace, return_type[void], modifier[final public], parameter[ch, start, length]] begin[{]
call[.characters, parameter[member[.ch], member[.start], member[.length]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[ignorableWhitespace] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[ch] , Keyword[int] identifier[start] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[SAXException] {
iden... |
public static SDVariable softmax(SameDiff SD, SDVariable x, int dimension, int rank){
int[] permutation = ArrayUtil.range(0, rank);
permutation[0] = dimension;
permutation[dimension] = 0;
return SD.nn.softmax(x.permute(permutation)).permute(ArrayUtil.invertPermutation(permutation));
... | class class_name[name] begin[{]
method[softmax, return_type[type[SDVariable]], modifier[public static], parameter[SD, x, dimension, rank]] begin[{]
local_variable[type[int], permutation]
assign[member[.permutation], member[.dimension]]
assign[member[.permutation], litera... | Keyword[public] Keyword[static] identifier[SDVariable] identifier[softmax] operator[SEP] identifier[SameDiff] identifier[SD] , identifier[SDVariable] identifier[x] , Keyword[int] identifier[dimension] , Keyword[int] identifier[rank] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[permutati... |
public long getRecordingPosition(final long recordingId)
{
lock.lock();
try
{
ensureOpen();
final long correlationId = aeron.nextCorrelationId();
if (!archiveProxy.getRecordingPosition(recordingId, correlationId, controlSessionId))
{
... | class class_name[name] begin[{]
method[getRecordingPosition, return_type[type[long]], modifier[public], parameter[recordingId]] begin[{]
call[lock.lock, parameter[]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=ensureOpen, postfix_operators=[]... | Keyword[public] Keyword[long] identifier[getRecordingPosition] operator[SEP] Keyword[final] Keyword[long] identifier[recordingId] operator[SEP] {
identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[ensureOpen] operator[SEP] operator[SEP] ... |
public Double getDouble(String key, Double defaultValue) throws SyntaxException
{
String value = getSimple(key);
if (value == null)
{
return defaultValue;
}
else
{
try
{
return Double.valueOf(value);
}
... | class class_name[name] begin[{]
method[getDouble, return_type[type[Double]], modifier[public], parameter[key, defaultValue]] begin[{]
local_variable[type[String], value]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
return[member[.defaultValue]]
el... | Keyword[public] identifier[Double] identifier[getDouble] operator[SEP] identifier[String] identifier[key] , identifier[Double] identifier[defaultValue] operator[SEP] Keyword[throws] identifier[SyntaxException] {
identifier[String] identifier[value] operator[=] identifier[getSimple] operator[SEP] identifier[key]... |
@Override
public void initPropertySources(ServletContext servletContext, PortletContext portletContext, PortletConfig portletConfig) {
PortletApplicationContextUtils.initPortletPropertySources(this.getPropertySources(), servletContext, portletContext, portletConfig);
} | class class_name[name] begin[{]
method[initPropertySources, return_type[void], modifier[public], parameter[servletContext, portletContext, portletConfig]] begin[{]
call[PortletApplicationContextUtils.initPortletPropertySources, parameter[THIS[call[None.getPropertySources, parameter[]]], member[... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[initPropertySources] operator[SEP] identifier[ServletContext] identifier[servletContext] , identifier[PortletContext] identifier[portletContext] , identifier[PortletConfig] identifier[portletConfig] operator[SEP] {
identifier[PortletAp... |
@Override
public void writeLong(long n) throws IOException {
byte[] intBytes = new byte[] { (byte) ((n >>> 56) ^ 0x80),
(byte) (n >>> 48), (byte) (n >>> 40), (byte) (n >>> 32),
(byte) (n >>> 24), (byte) (n >>> 16), (byte) (n >>> 8), (byte) n };
out.write(intBytes);
} | class class_name[name] begin[{]
method[writeLong, return_type[void], modifier[public], parameter[n]] begin[{]
local_variable[type[byte], intBytes]
call[out.write, parameter[member[.intBytes]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeLong] operator[SEP] Keyword[long] identifier[n] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[intBytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] operator[SEP... |
public String upload(InputStream content) throws RedmineException {
final URI uploadURI = getURIConfigurator().getUploadURI();
final HttpPost request = new HttpPost(uploadURI);
final AbstractHttpEntity entity = new InputStreamEntity(content, -1);
/* Content type required by a Redmine */
entity.setContentType(... | class class_name[name] begin[{]
method[upload, return_type[type[String]], modifier[public], parameter[content]] begin[{]
local_variable[type[URI], uploadURI]
local_variable[type[HttpPost], request]
local_variable[type[AbstractHttpEntity], entity]
call[entity.setContentTy... | Keyword[public] identifier[String] identifier[upload] operator[SEP] identifier[InputStream] identifier[content] operator[SEP] Keyword[throws] identifier[RedmineException] {
Keyword[final] identifier[URI] identifier[uploadURI] operator[=] identifier[getURIConfigurator] operator[SEP] operator[SEP] operator[SEP] id... |
boolean removeEmptyNode(int lookup) {
// A VoltDB extension to diagnose ArrayOutOfBounds.
voltDBhistory[voltDBhistoryDepth++ % voltDBhistoryCapacity] = 1000000 + lookup;
// End of VoltDB extension
boolean found = false;
int lastLookup = -1;
for (int i = reclaim... | class class_name[name] begin[{]
method[removeEmptyNode, return_type[type[boolean]], modifier[default], parameter[lookup]] begin[{]
assign[member[.voltDBhistory], binary_operation[literal[1000000], +, member[.lookup]]]
local_variable[type[boolean], found]
local_variable[type[int]... | Keyword[boolean] identifier[removeEmptyNode] operator[SEP] Keyword[int] identifier[lookup] operator[SEP] {
identifier[voltDBhistory] operator[SEP] identifier[voltDBhistoryDepth] operator[++] operator[%] identifier[voltDBhistoryCapacity] operator[SEP] operator[=] Other[1000000] operator[+] identifier[lookup] oper... |
public void rollback() throws GitAPIException {
try (Git git = getGit()) {
git.reset().setMode(ResetCommand.ResetType.HARD).setRef(HEAD).call();
}
} | class class_name[name] begin[{]
method[rollback, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=reset, postfix_operators=[], prefix_operators=[], qualifier=git, selectors=[MethodInvocation(arguments=[Me... | Keyword[public] Keyword[void] identifier[rollback] operator[SEP] operator[SEP] Keyword[throws] identifier[GitAPIException] {
Keyword[try] operator[SEP] identifier[Git] identifier[git] operator[=] identifier[getGit] operator[SEP] operator[SEP] operator[SEP] {
identifier[git] operator[SEP] identifier[re... |
public List<TopicRelationship> getTopicRelationships() {
ArrayList<TopicRelationship> relationships = new ArrayList<TopicRelationship>(topicRelationships);
for (final TargetRelationship relationship : topicTargetRelationships) {
relationships.add(new TopicRelationship(relationship.getPrimary... | class class_name[name] begin[{]
method[getTopicRelationships, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[ArrayList], relationships]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Class... | Keyword[public] identifier[List] operator[<] identifier[TopicRelationship] operator[>] identifier[getTopicRelationships] operator[SEP] operator[SEP] {
identifier[ArrayList] operator[<] identifier[TopicRelationship] operator[>] identifier[relationships] operator[=] Keyword[new] identifier[ArrayList] operator[<] i... |
public Organization withAvailablePolicyTypes(PolicyTypeSummary... availablePolicyTypes) {
if (this.availablePolicyTypes == null) {
setAvailablePolicyTypes(new java.util.ArrayList<PolicyTypeSummary>(availablePolicyTypes.length));
}
for (PolicyTypeSummary ele : availablePolicyTypes) {
... | class class_name[name] begin[{]
method[withAvailablePolicyTypes, return_type[type[Organization]], modifier[public], parameter[availablePolicyTypes]] begin[{]
if[binary_operation[THIS[member[None.availablePolicyTypes]], ==, literal[null]]] begin[{]
call[.setAvailablePolic... | Keyword[public] identifier[Organization] identifier[withAvailablePolicyTypes] operator[SEP] identifier[PolicyTypeSummary] operator[...] identifier[availablePolicyTypes] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[availablePolicyTypes] operator[==] Other[null] operator[SEP] {... |
private static void logResponse(StatusUpdate response) {
String text = response.getStatus();
String message = String.format(MESSAGE_RESPONSE, text);
System.out.println(message);
} | class class_name[name] begin[{]
method[logResponse, return_type[void], modifier[private static], parameter[response]] begin[{]
local_variable[type[String], text]
local_variable[type[String], message]
call[System.out.println, parameter[member[.message]]]
end[}]
END[}] | Keyword[private] Keyword[static] Keyword[void] identifier[logResponse] operator[SEP] identifier[StatusUpdate] identifier[response] operator[SEP] {
identifier[String] identifier[text] operator[=] identifier[response] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] identifier[String] ... |
private static State convertDeprecatedConfigs(State state) {
if (state.contains(EXTRACT_LIMIT_RATE_LIMIT_KEY_DEP)) {
state.setProp(EXTRACT_LIMIT_RATE_LIMIT_KEY, state.getProp(EXTRACT_LIMIT_RATE_LIMIT_KEY_DEP));
state.removeProp(EXTRACT_LIMIT_RATE_LIMIT_KEY_DEP);
}
if (state.contains(EXTRACT_LIMI... | class class_name[name] begin[{]
method[convertDeprecatedConfigs, return_type[type[State]], modifier[private static], parameter[state]] begin[{]
if[call[state.contains, parameter[member[.EXTRACT_LIMIT_RATE_LIMIT_KEY_DEP]]]] begin[{]
call[state.setProp, parameter[member[.E... | Keyword[private] Keyword[static] identifier[State] identifier[convertDeprecatedConfigs] operator[SEP] identifier[State] identifier[state] operator[SEP] {
Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[contains] operator[SEP] identifier[EXTRACT_LIMIT_RATE_LIMIT_KEY_DEP] operator[SEP] operato... |
private void handleMultiInstanceReportResponse(SerialMessage serialMessage,
int offset) {
logger.trace("Process Multi-instance Report");
int commandClassCode = serialMessage.getMessagePayloadByte(offset);
int instances = serialMessage.getMessagePayloadByte(offset + 1);
if (instances == 0) {
setIns... | class class_name[name] begin[{]
method[handleMultiInstanceReportResponse, return_type[void], modifier[private], parameter[serialMessage, offset]] begin[{]
call[logger.trace, parameter[literal["Process Multi-instance Report"]]]
local_variable[type[int], commandClassCode]
local_va... | Keyword[private] Keyword[void] identifier[handleMultiInstanceReportResponse] operator[SEP] identifier[SerialMessage] identifier[serialMessage] , Keyword[int] identifier[offset] operator[SEP] {
identifier[logger] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[in... |
@Override
public PutPlaybackConfigurationResult putPlaybackConfiguration(PutPlaybackConfigurationRequest request) {
request = beforeClientExecution(request);
return executePutPlaybackConfiguration(request);
} | class class_name[name] begin[{]
method[putPlaybackConfiguration, return_type[type[PutPlaybackConfigurationResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executePutPlaybackConfigura... | annotation[@] identifier[Override] Keyword[public] identifier[PutPlaybackConfigurationResult] identifier[putPlaybackConfiguration] operator[SEP] identifier[PutPlaybackConfigurationRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifi... |
private static <T extends Appendable> T _appendToPat(T buf, int c, boolean escapeUnprintable) {
try {
if (escapeUnprintable && Utility.isUnprintable(c)) {
// Use hex escape notation (<backslash>uxxxx or <backslash>Uxxxxxxxx) for anything
// unprintable
... | class class_name[name] begin[{]
method[_appendToPat, return_type[type[T]], modifier[private static], parameter[buf, c, escapeUnprintable]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=escapeUnprintable, postfix_operators=[], prefix_operators=[], qua... | Keyword[private] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Appendable] operator[>] identifier[T] identifier[_appendToPat] operator[SEP] identifier[T] identifier[buf] , Keyword[int] identifier[c] , Keyword[boolean] identifier[escapeUnprintable] operator[SEP] {
Keyword[try] {
... |
public Vector3f set(int index, FloatBuffer buffer) {
MemUtil.INSTANCE.get(this, index, buffer);
return this;
} | class class_name[name] begin[{]
method[set, return_type[type[Vector3f]], modifier[public], parameter[index, buffer]] begin[{]
call[MemUtil.INSTANCE.get, parameter[THIS[], member[.index], member[.buffer]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[Vector3f] identifier[set] operator[SEP] Keyword[int] identifier[index] , identifier[FloatBuffer] identifier[buffer] operator[SEP] {
identifier[MemUtil] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[get] operator[SEP] Keyword[this] , identifier[index] , identifier[buffe... |
public final Enumeration findResources(final String name)
throws IOException {
final CClassLoader loader = CClassLoader.getRootLoader();
final List URLList = new ArrayList();
try {
CClassLoader.loadResources(loader, URLList, name);
} finally {
try {
} catch (final Exception ignore) {
}
}
t... | class class_name[name] begin[{]
method[findResources, return_type[type[Enumeration]], modifier[final public], parameter[name]] begin[{]
local_variable[type[CClassLoader], loader]
local_variable[type[List], URLList]
TryStatement(block=[StatementExpression(expression=MethodInvocation(argu... | Keyword[public] Keyword[final] identifier[Enumeration] identifier[findResources] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[CClassLoader] identifier[loader] operator[=] identifier[CClassLoader] operator[SEP] i... |
public List<PrivacyItem> setPrivacyList(String listName, List<PrivacyItem> listItem) {
// Add new list to the itemLists
this.getItemLists().put(listName, listItem);
return listItem;
} | class class_name[name] begin[{]
method[setPrivacyList, return_type[type[List]], modifier[public], parameter[listName, listItem]] begin[{]
THIS[call[None.getItemLists, parameter[]]call[None.put, parameter[member[.listName], member[.listItem]]]]
return[member[.listItem]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[PrivacyItem] operator[>] identifier[setPrivacyList] operator[SEP] identifier[String] identifier[listName] , identifier[List] operator[<] identifier[PrivacyItem] operator[>] identifier[listItem] operator[SEP] {
Keyword[this] operator[SEP] identifier[getItem... |
private static String makeMessage(Throwable throwable) {
if(throwable instanceof AlgorithmException) {
return throwable.getMessage();
} else {
final String className = throwable.getClass().getName();
final String message = throwable.getMessage();
return cl... | class class_name[name] begin[{]
method[makeMessage, return_type[type[String]], modifier[private static], parameter[throwable]] begin[{]
if[binary_operation[member[.throwable], instanceof, type[AlgorithmException]]] begin[{]
return[call[throwable.getMessage, parameter[]]]
els... | Keyword[private] Keyword[static] identifier[String] identifier[makeMessage] operator[SEP] identifier[Throwable] identifier[throwable] operator[SEP] {
Keyword[if] operator[SEP] identifier[throwable] Keyword[instanceof] identifier[AlgorithmException] operator[SEP] {
Keyword[return] identifier[throwable]... |
public void marshall(UntagCertificateAuthorityRequest untagCertificateAuthorityRequest, ProtocolMarshaller protocolMarshaller) {
if (untagCertificateAuthorityRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMar... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[untagCertificateAuthorityRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.untagCertificateAuthorityRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=Class... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UntagCertificateAuthorityRequest] identifier[untagCertificateAuthorityRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[untagCertificateAuthorityRequest] operat... |
public String getBackupFilename()
{
Date now = new Date();
String strDate = Util.dateToString(now);
for (int i = 0; i < strDate.length(); i++)
{
char ch = strDate.charAt(i);
if (!Character.isLetterOrDigit(ch))
strDate = strDate.substring(0, i) + '_' + strDate.substring(i + 1, strDate.length());
}
... | class class_name[name] begin[{]
method[getBackupFilename, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[Date], now]
local_variable[type[String], strDate]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotation... | Keyword[public] identifier[String] identifier[getBackupFilename] operator[SEP] operator[SEP] {
identifier[Date] identifier[now] operator[=] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[strDate] operator[=] identifier[Util] operator[SEP] identifier[dateToSt... |
private String replaceVariables(String inString) {
if (inString == null || inString == "")
return inString;
String outString = inString;
// Replace $ENVIRONMENT with the default environment
outString = stringReplace(outString, "{ENVIRONMENT}", defaultEnvironment);
// Go through the s... | class class_name[name] begin[{]
method[replaceVariables, return_type[type[String]], modifier[private], parameter[inString]] begin[{]
if[binary_operation[binary_operation[member[.inString], ==, literal[null]], ||, binary_operation[member[.inString], ==, literal[""]]]] begin[{]
return[member[.inS... | Keyword[private] identifier[String] identifier[replaceVariables] operator[SEP] identifier[String] identifier[inString] operator[SEP] {
Keyword[if] operator[SEP] identifier[inString] operator[==] Other[null] operator[||] identifier[inString] operator[==] literal[String] operator[SEP] Keyword[return] identifier[in... |
private static boolean isJarURL(final URL rootDirResource) {
final String protocol = rootDirResource.getProtocol();
/**
* Determine whether the given URL points to a resource in a jar file, that is, has protocol "jar", "zip",
* "wsjar" or "code-source".
* <p>
* "zip... | class class_name[name] begin[{]
method[isJarURL, return_type[type[boolean]], modifier[private static], parameter[rootDirResource]] begin[{]
local_variable[type[String], protocol]
return[binary_operation[binary_operation[binary_operation[literal["jar"], ||, literal["zip"]], ||, literal["wsjar"]]... | Keyword[private] Keyword[static] Keyword[boolean] identifier[isJarURL] operator[SEP] Keyword[final] identifier[URL] identifier[rootDirResource] operator[SEP] {
Keyword[final] identifier[String] identifier[protocol] operator[=] identifier[rootDirResource] operator[SEP] identifier[getProtocol] operator[SEP] operat... |
protected void recreateFullSubjects(SecurityService securityService, AtomicServiceReference<UnauthenticatedSubjectService> unauthenticatedSubjectServiceRef) {
callerSubject = recreateFullSubject(callerPrincipal, securityService, unauthenticatedSubjectServiceRef, callerSubjectCacheKey);
if (!subjectsAreE... | class class_name[name] begin[{]
method[recreateFullSubjects, return_type[void], modifier[protected], parameter[securityService, unauthenticatedSubjectServiceRef]] begin[{]
assign[member[.callerSubject], call[.recreateFullSubject, parameter[member[.callerPrincipal], member[.securityService], mem... | Keyword[protected] Keyword[void] identifier[recreateFullSubjects] operator[SEP] identifier[SecurityService] identifier[securityService] , identifier[AtomicServiceReference] operator[<] identifier[UnauthenticatedSubjectService] operator[>] identifier[unauthenticatedSubjectServiceRef] operator[SEP] {
identifier[c... |
public static Object create(Class type, Callback callback) {
Enhancer e = new Enhancer();
e.setSuperclass(type);
e.setCallback(callback);
return e.create();
} | class class_name[name] begin[{]
method[create, return_type[type[Object]], modifier[public static], parameter[type, callback]] begin[{]
local_variable[type[Enhancer], e]
call[e.setSuperclass, parameter[member[.type]]]
call[e.setCallback, parameter[member[.callback]]]
... | Keyword[public] Keyword[static] identifier[Object] identifier[create] operator[SEP] identifier[Class] identifier[type] , identifier[Callback] identifier[callback] operator[SEP] {
identifier[Enhancer] identifier[e] operator[=] Keyword[new] identifier[Enhancer] operator[SEP] operator[SEP] operator[SEP] identifier... |
private String toSimpleClassName(final String name) {
StringBuilder builder = new StringBuilder(name.length());
for (String token : SPLIT_PATTERN.split(name)) {
if (!token.isEmpty()) {
builder.append(Character.toUpperCase(token.charAt(0)));
builder.append(token.substring(1).toLowerCase(Locale.ROOT));
... | class class_name[name] begin[{]
method[toSimpleClassName, return_type[type[String]], modifier[private], parameter[name]] begin[{]
local_variable[type[StringBuilder], builder]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isE... | Keyword[private] identifier[String] identifier[toSimpleClassName] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] {
identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[name] operator[SEP] identifier[length] opera... |
@Override
public EntityModel<Order> process(EntityModel<Order> model) {
model.add( // <2>
new Link("/payments/{orderId}").withRel(LinkRelation.of("payments")) //
.expand(model.getContent().getOrderId()));
return model; // <3>
} | class class_name[name] begin[{]
method[process, return_type[type[EntityModel]], modifier[public], parameter[model]] begin[{]
call[model.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/payments/{orderId}")], body=Non... | annotation[@] identifier[Override] Keyword[public] identifier[EntityModel] operator[<] identifier[Order] operator[>] identifier[process] operator[SEP] identifier[EntityModel] operator[<] identifier[Order] operator[>] identifier[model] operator[SEP] {
identifier[model] operator[SEP] identifier[add] operator[SEP] ... |
public java.util.List<String> getRemoveAllowedPrincipals() {
if (removeAllowedPrincipals == null) {
removeAllowedPrincipals = new com.amazonaws.internal.SdkInternalList<String>();
}
return removeAllowedPrincipals;
} | class class_name[name] begin[{]
method[getRemoveAllowedPrincipals, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.removeAllowedPrincipals], ==, literal[null]]] begin[{]
assign[member[.removeAllowedPrincipals], ClassCreator(ar... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getRemoveAllowedPrincipals] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[removeAllowedPrincipals] operator[==] Other[null] operator[SEP] {
... |
public final Tuple4<T8, T9, T10, T11> skip7() {
return new Tuple4<>(v8, v9, v10, v11);
} | class class_name[name] begin[{]
method[skip7, return_type[type[Tuple4]], modifier[final public], parameter[]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=v8, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=v9, postfix_operators=[], prefix_... | Keyword[public] Keyword[final] identifier[Tuple4] operator[<] identifier[T8] , identifier[T9] , identifier[T10] , identifier[T11] operator[>] identifier[skip7] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[Tuple4] operator[<] operator[>] operator[SEP] identifier[v8] , identifier[v9] ,... |
public static boolean toBoolean(final String str, final String trueString, final String falseString) {
if (str == trueString) {
return true;
} else if (str == falseString) {
return false;
} else if (str != null) {
if (str.equals(trueString)) {
... | class class_name[name] begin[{]
method[toBoolean, return_type[type[boolean]], modifier[public static], parameter[str, trueString, falseString]] begin[{]
if[binary_operation[member[.str], ==, member[.trueString]]] begin[{]
return[literal[true]]
else begin[{]
if[bi... | Keyword[public] Keyword[static] Keyword[boolean] identifier[toBoolean] operator[SEP] Keyword[final] identifier[String] identifier[str] , Keyword[final] identifier[String] identifier[trueString] , Keyword[final] identifier[String] identifier[falseString] operator[SEP] {
Keyword[if] operator[SEP] identifier[str]... |
void expectSuperType(Node n, ObjectType superObject, ObjectType subObject) {
FunctionType subCtor = subObject.getConstructor();
ObjectType implicitProto = subObject.getImplicitPrototype();
ObjectType declaredSuper =
implicitProto == null ? null : implicitProto.getImplicitPrototype();
if (declare... | class class_name[name] begin[{]
method[expectSuperType, return_type[void], modifier[default], parameter[n, superObject, subObject]] begin[{]
local_variable[type[FunctionType], subCtor]
local_variable[type[ObjectType], implicitProto]
local_variable[type[ObjectType], declaredSuper]
... | Keyword[void] identifier[expectSuperType] operator[SEP] identifier[Node] identifier[n] , identifier[ObjectType] identifier[superObject] , identifier[ObjectType] identifier[subObject] operator[SEP] {
identifier[FunctionType] identifier[subCtor] operator[=] identifier[subObject] operator[SEP] identifier[getConst... |
private List<Object> findUsingLucene(EntityMetadata m, Client client, Object[] primaryKeys)
{
String idField = m.getIdAttribute().getName();
String equals = "=";
MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
m.getPersistence... | class class_name[name] begin[{]
method[findUsingLucene, return_type[type[List]], modifier[private], parameter[m, client, primaryKeys]] begin[{]
local_variable[type[String], idField]
local_variable[type[String], equals]
local_variable[type[MetamodelImpl], metaModel]
local_variabl... | Keyword[private] identifier[List] operator[<] identifier[Object] operator[>] identifier[findUsingLucene] operator[SEP] identifier[EntityMetadata] identifier[m] , identifier[Client] identifier[client] , identifier[Object] operator[SEP] operator[SEP] identifier[primaryKeys] operator[SEP] {
identifier[String] ide... |
public static int getFineDirection (double theta)
{
theta = ((theta + Math.PI) * 8) / Math.PI;
return ANGLE_MAP[(int)Math.round(theta) % FINE_DIRECTION_COUNT];
} | class class_name[name] begin[{]
method[getFineDirection, return_type[type[int]], modifier[public static], parameter[theta]] begin[{]
assign[member[.theta], binary_operation[binary_operation[binary_operation[member[.theta], +, member[Math.PI]], *, literal[8]], /, member[Math.PI]]]
return... | Keyword[public] Keyword[static] Keyword[int] identifier[getFineDirection] operator[SEP] Keyword[double] identifier[theta] operator[SEP] {
identifier[theta] operator[=] operator[SEP] operator[SEP] identifier[theta] operator[+] identifier[Math] operator[SEP] identifier[PI] operator[SEP] operator[*] Other[8] operat... |
@Nullable
public static String getTableName(Path rootPath, Path path) {
path = qualified(rootPath, path);
if (rootPath.equals(path)) {
// Path is root, no table
return null;
}
Path tablePath;
Path parent = path.getParent();
if (Objects.equals(... | class class_name[name] begin[{]
method[getTableName, return_type[type[String]], modifier[public static], parameter[rootPath, path]] begin[{]
assign[member[.path], call[.qualified, parameter[member[.rootPath], member[.path]]]]
if[call[rootPath.equals, parameter[member[.path]]]] b... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[getTableName] operator[SEP] identifier[Path] identifier[rootPath] , identifier[Path] identifier[path] operator[SEP] {
identifier[path] operator[=] identifier[qualified] operator[SEP] identifier[rootPath] , identifi... |
@SuppressWarnings("unchecked")
@Override
public List<T> getAllEndpoints() {
ArrayList<T> list = new ArrayList<>(endpoints.length);
for (int i = 0; i < endpoints.length; i++) {
list.add((T) endpoints[i]);
}
return list;
} | class class_name[name] begin[{]
method[getAllEndpoints, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[ArrayList], list]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=Memb... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[T] operator[>] identifier[getAllEndpoints] operator[SEP] operator[SEP] {
identifier[ArrayList] operator[<] identifier[T] operator[>] id... |
public static Writer
createWriter(Configuration conf, FSDataOutputStream out,
Class keyClass, Class valClass, CompressionType compressionType,
CompressionCodec codec)
throws IOException {
Writer writer = createWriter(conf, out, keyClass, valClass, compressionType,
... | class class_name[name] begin[{]
method[createWriter, return_type[type[Writer]], modifier[public static], parameter[conf, out, keyClass, valClass, compressionType, codec]] begin[{]
local_variable[type[Writer], writer]
return[member[.writer]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Writer] identifier[createWriter] operator[SEP] identifier[Configuration] identifier[conf] , identifier[FSDataOutputStream] identifier[out] , identifier[Class] identifier[keyClass] , identifier[Class] identifier[valClass] , identifier[CompressionType] identifier[compression... |
public void setNamespace(String prefix, String uri) {
this.prefix2namespace.put(prefix, uri);
this.namespace2prefix.put(uri, prefix);
} | class class_name[name] begin[{]
method[setNamespace, return_type[void], modifier[public], parameter[prefix, uri]] begin[{]
THIS[member[None.prefix2namespace]call[None.put, parameter[member[.prefix], member[.uri]]]]
THIS[member[None.namespace2prefix]call[None.put, parameter[membe... | Keyword[public] Keyword[void] identifier[setNamespace] operator[SEP] identifier[String] identifier[prefix] , identifier[String] identifier[uri] operator[SEP] {
Keyword[this] operator[SEP] identifier[prefix2namespace] operator[SEP] identifier[put] operator[SEP] identifier[prefix] , identifier[uri] operator[SEP]... |
public MaterializeBuilder withFullscreen(boolean fullscreen) {
this.mFullscreen = fullscreen;
if (fullscreen) {
withTranslucentNavigationBarProgrammatically(true);
withTintedStatusBar(false);
withTintedNavigationBar(false);
}
return this;
} | class class_name[name] begin[{]
method[withFullscreen, return_type[type[MaterializeBuilder]], modifier[public], parameter[fullscreen]] begin[{]
assign[THIS[member[None.mFullscreen]], member[.fullscreen]]
if[member[.fullscreen]] begin[{]
call[.withTransluc... | Keyword[public] identifier[MaterializeBuilder] identifier[withFullscreen] operator[SEP] Keyword[boolean] identifier[fullscreen] operator[SEP] {
Keyword[this] operator[SEP] identifier[mFullscreen] operator[=] identifier[fullscreen] operator[SEP] Keyword[if] operator[SEP] identifier[fullscreen] operator[SEP] {
... |
protected void transmitPartialTask(final Task<Diff> result)
throws TimeoutException
{
this.diffedSize += result.byteSize();
this.processingTimeDiff += System.currentTimeMillis() - startTime;
super.transmitPartialTask(result);
startTime = System.currentTimeMillis();
} | class class_name[name] begin[{]
method[transmitPartialTask, return_type[void], modifier[protected], parameter[result]] begin[{]
assign[THIS[member[None.diffedSize]], call[result.byteSize, parameter[]]]
assign[THIS[member[None.processingTimeDiff]], binary_operation[call[System.cu... | Keyword[protected] Keyword[void] identifier[transmitPartialTask] operator[SEP] Keyword[final] identifier[Task] operator[<] identifier[Diff] operator[>] identifier[result] operator[SEP] Keyword[throws] identifier[TimeoutException] {
Keyword[this] operator[SEP] identifier[diffedSize] operator[+=] identifier[result... |
private ServiceReference checkService(ServiceReference serviceReference, String interfaceClassName)
{
if (serviceReference != null)
{
Object service = bundleContext.getService(serviceReference);
if (service != null)
{
try {
if (... | class class_name[name] begin[{]
method[checkService, return_type[type[ServiceReference]], modifier[private], parameter[serviceReference, interfaceClassName]] begin[{]
if[binary_operation[member[.serviceReference], !=, literal[null]]] begin[{]
local_variable[type[Object], service]
... | Keyword[private] identifier[ServiceReference] identifier[checkService] operator[SEP] identifier[ServiceReference] identifier[serviceReference] , identifier[String] identifier[interfaceClassName] operator[SEP] {
Keyword[if] operator[SEP] identifier[serviceReference] operator[!=] Other[null] operator[SEP] {
... |
public Edge edgeFromJson(final JsonNode json, final Vertex out, final Vertex in) throws IOException {
final Map<String, Object> props = OGraphSONUtility.readProperties(json, true, this.hasEmbeddedTypes);
final Object edgeId = getTypedValueFromJsonNode(json.get(GraphSONTokens._ID));
final JsonNode nodeLabel... | class class_name[name] begin[{]
method[edgeFromJson, return_type[type[Edge]], modifier[public], parameter[json, out, in]] begin[{]
local_variable[type[Map], props]
local_variable[type[Object], edgeId]
local_variable[type[JsonNode], nodeLabel]
local_variable[type[String], label]
... | Keyword[public] identifier[Edge] identifier[edgeFromJson] operator[SEP] Keyword[final] identifier[JsonNode] identifier[json] , Keyword[final] identifier[Vertex] identifier[out] , Keyword[final] identifier[Vertex] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[M... |
public static DefaultMutableTreeNode findNode(
TreeModel treeModel, Object userObject)
{
return findNode(treeModel, treeModel.getRoot(), userObject);
} | class class_name[name] begin[{]
method[findNode, return_type[type[DefaultMutableTreeNode]], modifier[public static], parameter[treeModel, userObject]] begin[{]
return[call[.findNode, parameter[member[.treeModel], call[treeModel.getRoot, parameter[]], member[.userObject]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[DefaultMutableTreeNode] identifier[findNode] operator[SEP] identifier[TreeModel] identifier[treeModel] , identifier[Object] identifier[userObject] operator[SEP] {
Keyword[return] identifier[findNode] operator[SEP] identifier[treeModel] , identifier[treeModel] operator... |
private String nextQuotedValue(char quote)
{
// Like nextNonWhitespace, this uses locals 'p' and 'l' to save inner-loop field access.
StringBuilder builder = new StringBuilder();
int p = pos;
/* the index of the first character not yet appended to the builder. */
int start = p;
while (p < limi... | class class_name[name] begin[{]
method[nextQuotedValue, return_type[type[String]], modifier[private], parameter[quote]] begin[{]
local_variable[type[StringBuilder], builder]
local_variable[type[int], p]
local_variable[type[int], start]
while[binary_operation[member[.p], ... | Keyword[private] identifier[String] identifier[nextQuotedValue] operator[SEP] Keyword[char] identifier[quote] operator[SEP] {
identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[p] operator[=] identifie... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.