code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public Observable<ServiceResponse<RunCommandResultInner>> beginRunCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");... | class class_name[name] begin[{]
method[beginRunCommandWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, vmName, parameters]] begin[{]
if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{]
ThrowStatement(exp... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[RunCommandResultInner] operator[>] operator[>] identifier[beginRunCommandWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[vmName] , identifier[R... |
public void start(final StartContext context) throws StartException {
if(store == null) {
final ServiceRegistry serviceRegistry = context.getController().getServiceContainer();
final ServiceName serviceNameBase = context.getController().getName();
final ServiceTarget serviceT... | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[context]] begin[{]
if[binary_operation[member[.store], ==, literal[null]]] begin[{]
local_variable[type[ServiceRegistry], serviceRegistry]
local_variable[type[ServiceName], servi... | Keyword[public] Keyword[void] identifier[start] operator[SEP] Keyword[final] identifier[StartContext] identifier[context] operator[SEP] Keyword[throws] identifier[StartException] {
Keyword[if] operator[SEP] identifier[store] operator[==] Other[null] operator[SEP] {
Keyword[final] identifier[ServiceReg... |
public void commit() throws DBException
{
if (DBConstants.FALSE.equalsIgnoreCase(this.getProperty(SQLParams.AUTO_COMMIT_PARAM)))
{
if (!(this.getDatabaseOwner() instanceof RecordOwner))
throw new DatabaseException("Transactions requires DB RecordOwnership");
}
... | class class_name[name] begin[{]
method[commit, return_type[void], modifier[public], parameter[]] begin[{]
if[call[DBConstants.FALSE.equalsIgnoreCase, parameter[THIS[call[None.getProperty, parameter[member[SQLParams.AUTO_COMMIT_PARAM]]]]]]] begin[{]
if[binary_operation[TH... | Keyword[public] Keyword[void] identifier[commit] operator[SEP] operator[SEP] Keyword[throws] identifier[DBException] {
Keyword[if] operator[SEP] identifier[DBConstants] operator[SEP] identifier[FALSE] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] Keyword[this] operator[SEP] identifier[getProperty] ope... |
public int readTag() throws IOException {
if (isAtEnd()) {
lastTag = 0;
return 0;
}
lastTag = readRawVarint32();
if (WireFormat.getTagFieldNumber(lastTag) == 0) {
// If we actually read zero (or any tag number corresponding to field
// number zero), that's not a valid tag.
... | class class_name[name] begin[{]
method[readTag, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[call[.isAtEnd, parameter[]]] begin[{]
assign[member[.lastTag], literal[0]]
return[literal[0]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[int] identifier[readTag] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[isAtEnd] operator[SEP] operator[SEP] operator[SEP] {
identifier[lastTag] operator[=] Other[0] operator[SEP] Keyword[return] Other[0] operator[SEP]... |
public Node replaceChild(Node newChild, Node oldChild) throws DOMException
{
if (oldChild == null || oldChild.getParentNode() != this)
return null;
ElemTemplateElement newChildElem = ((ElemTemplateElement) newChild);
ElemTemplateElement oldChildElem = ((ElemTemplateElement) oldChild);
// Fix ... | class class_name[name] begin[{]
method[replaceChild, return_type[type[Node]], modifier[public], parameter[newChild, oldChild]] begin[{]
if[binary_operation[binary_operation[member[.oldChild], ==, literal[null]], ||, binary_operation[call[oldChild.getParentNode, parameter[]], !=, THIS[]]]] begin... | Keyword[public] identifier[Node] identifier[replaceChild] operator[SEP] identifier[Node] identifier[newChild] , identifier[Node] identifier[oldChild] operator[SEP] Keyword[throws] identifier[DOMException] {
Keyword[if] operator[SEP] identifier[oldChild] operator[==] Other[null] operator[||] identifier[oldChild]... |
@SafeVarargs
@Nonnull
public static <T> T findFirstNonNull(@Nonnull final T... objects) {
for (final T obj : ensureNonNull(objects)) {
if (obj != null) {
return obj;
}
}
throw Assertions.fail("Can't find non-null item in array");
} | class class_name[name] begin[{]
method[findFirstNonNull, return_type[type[T]], modifier[public static], parameter[objects]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=obj, postfix_operators=[], prefix_operators... | annotation[@] identifier[SafeVarargs] annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[findFirstNonNull] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[T] operator[...] identifier[objects] operator[SEP] {
K... |
public JwtTicketCipherExecutor getTokenTicketCipherExecutorForService(final RegisteredService registeredService) {
val encryptionKey = getEncryptionKey(registeredService).orElse(StringUtils.EMPTY);
val signingKey = getSigningKey(registeredService).orElse(StringUtils.EMPTY);
return new JwtTicketC... | class class_name[name] begin[{]
method[getTokenTicketCipherExecutorForService, return_type[type[JwtTicketCipherExecutor]], modifier[public], parameter[registeredService]] begin[{]
local_variable[type[val], encryptionKey]
local_variable[type[val], signingKey]
return[ClassCreator(argument... | Keyword[public] identifier[JwtTicketCipherExecutor] identifier[getTokenTicketCipherExecutorForService] operator[SEP] Keyword[final] identifier[RegisteredService] identifier[registeredService] operator[SEP] {
identifier[val] identifier[encryptionKey] operator[=] identifier[getEncryptionKey] operator[SEP] identifi... |
protected X509Certificate[] getX509CertificateObjectChain(X509Certificate[] certs)
throws GeneralSecurityException {
X509Certificate[] bcCerts = new X509Certificate[certs.length];
for (int i = 0; i < certs.length; i++) {
if (!(certs[i] instanceof X509CertificateObject)) {
... | class class_name[name] begin[{]
method[getX509CertificateObjectChain, return_type[type[X509Certificate]], modifier[protected], parameter[certs]] begin[{]
local_variable[type[X509Certificate], bcCerts]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation... | Keyword[protected] identifier[X509Certificate] operator[SEP] operator[SEP] identifier[getX509CertificateObjectChain] operator[SEP] identifier[X509Certificate] operator[SEP] operator[SEP] identifier[certs] operator[SEP] Keyword[throws] identifier[GeneralSecurityException] {
identifier[X509Certificate] operator[SE... |
public static UpdateMonitor getMonitor(File monitoredFile, MonitorType type, String filter) {
if (monitoredFile == null)
throw new NullPointerException("MonitoredFile must be non-null");
if (type == null)
throw new NullPointerException("MonitorType must be non-null");
s... | class class_name[name] begin[{]
method[getMonitor, return_type[type[UpdateMonitor]], modifier[public static], parameter[monitoredFile, type, filter]] begin[{]
if[binary_operation[member[.monitoredFile], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postf... | Keyword[public] Keyword[static] identifier[UpdateMonitor] identifier[getMonitor] operator[SEP] identifier[File] identifier[monitoredFile] , identifier[MonitorType] identifier[type] , identifier[String] identifier[filter] operator[SEP] {
Keyword[if] operator[SEP] identifier[monitoredFile] operator[==] Other[nul... |
public void setSymbolMapsDirectory(String symbolMapsDir) {
if (deobfuscator == null) {
deobfuscator = new StackTraceDeobfuscator(symbolMapsDir);
} else {
deobfuscator.setSymbolMapsDirectory(symbolMapsDir);
}
} | class class_name[name] begin[{]
method[setSymbolMapsDirectory, return_type[void], modifier[public], parameter[symbolMapsDir]] begin[{]
if[binary_operation[member[.deobfuscator], ==, literal[null]]] begin[{]
assign[member[.deobfuscator], ClassCreator(arguments=[MemberRefe... | Keyword[public] Keyword[void] identifier[setSymbolMapsDirectory] operator[SEP] identifier[String] identifier[symbolMapsDir] operator[SEP] {
Keyword[if] operator[SEP] identifier[deobfuscator] operator[==] Other[null] operator[SEP] {
identifier[deobfuscator] operator[=] Keyword[new] identifier[StackTrac... |
@Override
public synchronized boolean free(CachedData data) {
@SuppressWarnings("unchecked")
Value value = ((Data<Value>)data).value;
values.remove(value);
Key key = null;
for (Map.Entry<Key,Data<Value>> e : map.entrySet())
if (e.getValue() == data) {
key = e.getKey();
break;
}
map... | class class_name[name] begin[{]
method[free, return_type[type[boolean]], modifier[synchronized public], parameter[data]] begin[{]
local_variable[type[Value], value]
call[values.remove, parameter[member[.value]]]
local_variable[type[Key], key]
ForStatement(body=IfStatemen... | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[boolean] identifier[free] operator[SEP] identifier[CachedData] identifier[data] operator[SEP] {
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Value] identifier[value] operator[=] o... |
public final JavaParser.statement_return statement() throws RecognitionException {
JavaParser.statement_return retval = new JavaParser.statement_return();
retval.start = input.LT(1);
int statement_StartIndex = input.index();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 83) ) { return retval; ... | class class_name[name] begin[{]
method[statement, return_type[type[JavaParser]], modifier[final public], parameter[]] begin[{]
local_variable[type[JavaParser], retval]
assign[member[retval.start], call[input.LT, parameter[literal[1]]]]
local_variable[type[int], statement_StartIn... | Keyword[public] Keyword[final] identifier[JavaParser] operator[SEP] identifier[statement_return] identifier[statement] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[JavaParser] operator[SEP] identifier[statement_return] identifier[retval] operator[=] Keyword[new] ident... |
protected void appendAndPush(
StylesheetHandler handler, ElemTemplateElement elem)
throws org.xml.sax.SAXException
{
ElemTemplateElement parent = handler.getElemTemplateElement();
if(null != parent) // defensive, for better multiple error reporting. -sb
{
parent.appendChild(e... | class class_name[name] begin[{]
method[appendAndPush, return_type[void], modifier[protected], parameter[handler, elem]] begin[{]
local_variable[type[ElemTemplateElement], parent]
if[binary_operation[literal[null], !=, member[.parent]]] begin[{]
call[parent.append... | Keyword[protected] Keyword[void] identifier[appendAndPush] operator[SEP] identifier[StylesheetHandler] identifier[handler] , identifier[ElemTemplateElement] identifier[elem] operator[SEP] Keyword[throws] identifier[org] operator[SEP] identifier[xml] operator[SEP] identifier[sax] operator[SEP] identifier[SAXException] ... |
public Map<Integer, String> listProjects(InputStream is) throws MPXJException
{
try
{
m_tables = new HashMap<String, List<Row>>();
processFile(is);
Map<Integer, String> result = new HashMap<Integer, String>();
List<Row> rows = getRows("project", null, null);
... | class class_name[name] begin[{]
method[listProjects, return_type[type[Map]], modifier[public], parameter[is]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_tables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==,... | Keyword[public] identifier[Map] operator[<] identifier[Integer] , identifier[String] operator[>] identifier[listProjects] operator[SEP] identifier[InputStream] identifier[is] operator[SEP] Keyword[throws] identifier[MPXJException] {
Keyword[try] {
identifier[m_tables] operator[=] Keyword[new] identif... |
static Map<Method, Method> toFallbackMethod(Map<Method, MethodHandler> dispatch) {
Map<Method, Method> result = new LinkedHashMap<Method, Method>();
for (Method method : dispatch.keySet()) {
method.setAccessible(true);
result.put(method, method);
}
return result;
} | class class_name[name] begin[{]
method[toFallbackMethod, return_type[type[Map]], modifier[static], parameter[dispatch]] begin[{]
local_variable[type[Map], result]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_... | Keyword[static] identifier[Map] operator[<] identifier[Method] , identifier[Method] operator[>] identifier[toFallbackMethod] operator[SEP] identifier[Map] operator[<] identifier[Method] , identifier[MethodHandler] operator[>] identifier[dispatch] operator[SEP] {
identifier[Map] operator[<] identifier[Method] ,... |
@Override
public Request<DescribeSnapshotAttributeRequest> getDryRunRequest() {
Request<DescribeSnapshotAttributeRequest> request = new DescribeSnapshotAttributeRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
} | class class_name[name] begin[{]
method[getDryRunRequest, return_type[type[Request]], modifier[public], parameter[]] begin[{]
local_variable[type[Request], request]
call[request.addParameter, parameter[literal["DryRun"], call[Boolean.toString, parameter[literal[true]]]]]
return[m... | annotation[@] identifier[Override] Keyword[public] identifier[Request] operator[<] identifier[DescribeSnapshotAttributeRequest] operator[>] identifier[getDryRunRequest] operator[SEP] operator[SEP] {
identifier[Request] operator[<] identifier[DescribeSnapshotAttributeRequest] operator[>] identifier[request] opera... |
public String getLocator(Integer index) {
String relLocator = ".//";
if (getBasicLocator().contains("[")) {
relLocator += getBasicLocator().replace("]", " and position()=%d ]");
} else {
relLocator += "%s[%d]";
}
return String.format(relLocator, index);
} | class class_name[name] begin[{]
method[getLocator, return_type[type[String]], modifier[public], parameter[index]] begin[{]
local_variable[type[String], relLocator]
if[call[.getBasicLocator, parameter[]]] begin[{]
assign[member[.relLocator], call[.getBasicLocator,... | Keyword[public] identifier[String] identifier[getLocator] operator[SEP] identifier[Integer] identifier[index] operator[SEP] {
identifier[String] identifier[relLocator] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[getBasicLocator] operator[SEP] operator[SEP] operator[SEP] identif... |
private double rdist(double[] x1, double[] x2) {
double d = 0.0;
for (int i = 0; i < x1.length; i++) {
double t = x1[i] - x2[i];
d += t * t;
}
return Math.sqrt(d);
} | class class_name[name] begin[{]
method[rdist, return_type[type[double]], modifier[private], parameter[x1, x2]] begin[{]
local_variable[type[double], d]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[]... | Keyword[private] Keyword[double] identifier[rdist] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[x1] , Keyword[double] operator[SEP] operator[SEP] identifier[x2] operator[SEP] {
Keyword[double] identifier[d] operator[=] literal[Float] operator[SEP] Keyword[for] operator[SEP] Keyword[int] ... |
protected void setTimeoutTime(int time) {
int timeout = time;
if (timeout == TCPRequestContext.NO_TIMEOUT) {
this.timeoutTime = TCPRequestContext.NO_TIMEOUT;
this.timeoutInterval = 0;
} else {
if (timeout == TCPRequestContext.USE_CHANNEL_TIMEOUT) {
... | class class_name[name] begin[{]
method[setTimeoutTime, return_type[void], modifier[protected], parameter[time]] begin[{]
local_variable[type[int], timeout]
if[binary_operation[member[.timeout], ==, member[TCPRequestContext.NO_TIMEOUT]]] begin[{]
assign[THIS[membe... | Keyword[protected] Keyword[void] identifier[setTimeoutTime] operator[SEP] Keyword[int] identifier[time] operator[SEP] {
Keyword[int] identifier[timeout] operator[=] identifier[time] operator[SEP] Keyword[if] operator[SEP] identifier[timeout] operator[==] identifier[TCPRequestContext] operator[SEP] identifier[NO_... |
private void persistHistoricalDataIfNeeded() {
if (!mReadShareHistoryCalled) {
throw new IllegalStateException("No preceding call to #readHistoricalData");
}
if (!mHistoricalRecordsChanged) {
return;
}
mHistoricalRecordsChanged = false;
if (!TextUt... | class class_name[name] begin[{]
method[persistHistoricalDataIfNeeded, return_type[void], modifier[private], parameter[]] begin[{]
if[member[.mReadShareHistoryCalled]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualif... | Keyword[private] Keyword[void] identifier[persistHistoricalDataIfNeeded] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[mReadShareHistoryCalled] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] ope... |
public List<CmsResource> readProjectView(CmsRequestContext context, CmsUUID projectId, CmsResourceState state)
throws CmsException {
CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
List<CmsResource> result = null;
try {
result = m_driverManager.readProjectView(dbc, ... | class class_name[name] begin[{]
method[readProjectView, return_type[type[List]], modifier[public], parameter[context, projectId, state]] begin[{]
local_variable[type[CmsDbContext], dbc]
local_variable[type[List], result]
TryStatement(block=[StatementExpression(expression=Assignment(expr... | Keyword[public] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[readProjectView] operator[SEP] identifier[CmsRequestContext] identifier[context] , identifier[CmsUUID] identifier[projectId] , identifier[CmsResourceState] identifier[state] operator[SEP] Keyword[throws] identifier[CmsExceptio... |
protected int updateLastAccessTime(BackedSession sess, long nowTime) {
if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[UPDATE_LAST_ACCESS_TIME]);
}
... | class class_name[name] begin[{]
method[updateLastAccessTime, return_type[type[int]], modifier[protected], parameter[sess, nowTime]] begin[{]
if[binary_operation[call[com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[LoggingUtil.SESSION_LOGGER_WAS.isLoggable, param... | Keyword[protected] Keyword[int] identifier[updateLastAccessTime] operator[SEP] identifier[BackedSession] identifier[sess] , Keyword[long] identifier[nowTime] operator[SEP] {
Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[websphere] operator[SEP] identifier[ras] ... |
public static String get(String urlString, Charset customCharset) {
return HttpRequest.get(urlString).charset(customCharset).execute().body();
} | class class_name[name] begin[{]
method[get, return_type[type[String]], modifier[public static], parameter[urlString, customCharset]] begin[{]
return[call[HttpRequest.get, parameter[member[.urlString]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[get] operator[SEP] identifier[String] identifier[urlString] , identifier[Charset] identifier[customCharset] operator[SEP] {
Keyword[return] identifier[HttpRequest] operator[SEP] identifier[get] operator[SEP] identifier[urlString] operator[SEP] operat... |
public static Character convertChar(JsonNode node) {
if (node instanceof POJONode) {
return convertChar(DPathUtils.extractValue((POJONode) node));
}
return node.isNumber() ? (char) node.asInt()
: node.isTextual() ? (node.asText().length() > 0 ? node.asText().charAt(0)... | class class_name[name] begin[{]
method[convertChar, return_type[type[Character]], modifier[public static], parameter[node]] begin[{]
if[binary_operation[member[.node], instanceof, type[POJONode]]] begin[{]
return[call[.convertChar, parameter[call[DPathUtils.extractValue, parameter[C... | Keyword[public] Keyword[static] identifier[Character] identifier[convertChar] operator[SEP] identifier[JsonNode] identifier[node] operator[SEP] {
Keyword[if] operator[SEP] identifier[node] Keyword[instanceof] identifier[POJONode] operator[SEP] {
Keyword[return] identifier[convertChar] operator[SEP] id... |
public static boolean matches(TieredIdentity.LocalityTier tier,
TieredIdentity.LocalityTier otherTier, boolean resolveIpAddress) {
String otherTierName = otherTier.getTierName();
if (!tier.getTierName().equals(otherTierName)) {
return false;
}
String otherTierValue = otherTier.getValue();
... | class class_name[name] begin[{]
method[matches, return_type[type[boolean]], modifier[public static], parameter[tier, otherTier, resolveIpAddress]] begin[{]
local_variable[type[String], otherTierName]
if[call[tier.getTierName, parameter[]]] begin[{]
return[literal[false]]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[matches] operator[SEP] identifier[TieredIdentity] operator[SEP] identifier[LocalityTier] identifier[tier] , identifier[TieredIdentity] operator[SEP] identifier[LocalityTier] identifier[otherTier] , Keyword[boolean] identifier[resolveIpAddress] operator[SEP] ... |
public void setActiveSession(HttpSession activeSession) {
if (log.isInfoEnabled()) {
log.info("Setting new active session for site '" + site + "': " + activeSession);
}
if (activeSession == null) {
throw new IllegalArgumentException(
"When settting an active session, a non-null session has to be provid... | class class_name[name] begin[{]
method[setActiveSession, return_type[void], modifier[public], parameter[activeSession]] begin[{]
if[call[log.isInfoEnabled, parameter[]]] begin[{]
call[log.info, parameter[binary_operation[binary_operation[binary_operation[literal["Setting... | Keyword[public] Keyword[void] identifier[setActiveSession] operator[SEP] identifier[HttpSession] identifier[activeSession] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[log] operator[SEP] identif... |
@Override
public boolean isValid(T wert) {
int length = Objects.toString(wert, "").length();
return (length >= min) && (length <= max);
} | class class_name[name] begin[{]
method[isValid, return_type[type[boolean]], modifier[public], parameter[wert]] begin[{]
local_variable[type[int], length]
return[binary_operation[binary_operation[member[.length], >=, member[.min]], &&, binary_operation[member[.length], <=, member[.max]]]]
en... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isValid] operator[SEP] identifier[T] identifier[wert] operator[SEP] {
Keyword[int] identifier[length] operator[=] identifier[Objects] operator[SEP] identifier[toString] operator[SEP] identifier[wert] , literal[String] operator[SEP] o... |
@Override
public final void setItem(final ServiceToSale pService) {
this.item = pService;
if (this.itsId == null) {
this.itsId = new ServicePlaceId();
}
this.itsId.setItem(this.item);
} | class class_name[name] begin[{]
method[setItem, return_type[void], modifier[final public], parameter[pService]] begin[{]
assign[THIS[member[None.item]], member[.pService]]
if[binary_operation[THIS[member[None.itsId]], ==, literal[null]]] begin[{]
assign[T... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[setItem] operator[SEP] Keyword[final] identifier[ServiceToSale] identifier[pService] operator[SEP] {
Keyword[this] operator[SEP] identifier[item] operator[=] identifier[pService] operator[SEP] Keyword[if] operator[SEP] Key... |
private boolean save(Document document, boolean deletion, ConcurrencyControl concurrencyControl)
throws CouchbaseLiteException {
if (deletion && !document.exists()) {
throw new CouchbaseLiteException("Cannot delete a document that has not yet been saved.",
CBLError.Domain.CBL... | class class_name[name] begin[{]
method[save, return_type[type[boolean]], modifier[private], parameter[document, deletion, concurrencyControl]] begin[{]
if[binary_operation[member[.deletion], &&, call[document.exists, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCreator(arg... | Keyword[private] Keyword[boolean] identifier[save] operator[SEP] identifier[Document] identifier[document] , Keyword[boolean] identifier[deletion] , identifier[ConcurrencyControl] identifier[concurrencyControl] operator[SEP] Keyword[throws] identifier[CouchbaseLiteException] {
Keyword[if] operator[SEP] identif... |
public boolean setNewAuthor(DefaultIssue issue, @Nullable String newAuthorLogin, IssueChangeContext context) {
if (isNullOrEmpty(newAuthorLogin)) {
return false;
}
checkState(issue.authorLogin() == null, "It's not possible to update the author with this method, please use setAuthorLogin()");
issue... | class class_name[name] begin[{]
method[setNewAuthor, return_type[type[boolean]], modifier[public], parameter[issue, newAuthorLogin, context]] begin[{]
if[call[.isNullOrEmpty, parameter[member[.newAuthorLogin]]]] begin[{]
return[literal[false]]
else begin[{]
None
end[... | Keyword[public] Keyword[boolean] identifier[setNewAuthor] operator[SEP] identifier[DefaultIssue] identifier[issue] , annotation[@] identifier[Nullable] identifier[String] identifier[newAuthorLogin] , identifier[IssueChangeContext] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] identifier[isNullO... |
public E poll() {
lock.lock();
try {
if (open) {
if (elements.size() > 0) {
return elements.removeFirst();
} else {
return null;
}
} else {
throw new IllegalStateException("queue is closed");
}
} finally {
lock.unlock();
}
} | class class_name[name] begin[{]
method[poll, return_type[type[E]], modifier[public], parameter[]] begin[{]
call[lock.lock, parameter[]]
TryStatement(block=[IfStatement(condition=MemberReference(member=open, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_state... | Keyword[public] identifier[E] identifier[poll] operator[SEP] operator[SEP] {
identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[if] operator[SEP] identifier[open] operator[SEP] {
Keyword[if] operator[SEP] identifier[elements]... |
public static RawBsonDocument parse(final String json) {
notNull("json", json);
return new RawBsonDocumentCodec().decode(new JsonReader(json), DecoderContext.builder().build());
} | class class_name[name] begin[{]
method[parse, return_type[type[RawBsonDocument]], modifier[public static], parameter[json]] begin[{]
call[.notNull, parameter[literal["json"], member[.json]]]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=... | Keyword[public] Keyword[static] identifier[RawBsonDocument] identifier[parse] operator[SEP] Keyword[final] identifier[String] identifier[json] operator[SEP] {
identifier[notNull] operator[SEP] literal[String] , identifier[json] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[RawBsonDocumentC... |
public void cleanup() {
if (lineSource != null) {
try {
lineSource.close();
} catch (Exception e) {
// Ignore
}
}
lineSource = null;
line = null;
number = 0;
} | class class_name[name] begin[{]
method[cleanup, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.lineSource], !=, literal[null]]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_op... | Keyword[public] Keyword[void] identifier[cleanup] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[lineSource] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
identifier[lineSource] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP]
... |
public static Engine create(final Props props, final Map<String, Object> parameters) {
final Petite petite = new Petite();
petite.config(props, parameters);
petite.initComponents();
final Engine engine = petite.get(Engine.class);
engine.getLogger().info("Loaded props: {}", props... | class class_name[name] begin[{]
method[create, return_type[type[Engine]], modifier[public static], parameter[props, parameters]] begin[{]
local_variable[type[Petite], petite]
call[petite.config, parameter[member[.props], member[.parameters]]]
call[petite.initComponents, ... | Keyword[public] Keyword[static] identifier[Engine] identifier[create] operator[SEP] Keyword[final] identifier[Props] identifier[props] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameters] operator[SEP] {
Keyword[final] identifier[Petite] identi... |
@Override
public final synchronized BalanceSheet retrieveBalance(
final Map<String, Object> pAddParam,
final Date pDate) throws Exception {
getSrvBalance().recalculateAllIfNeed(pAddParam, pDate);
BalanceSheet result = new BalanceSheet();
result.setItsDate(pDate);
String query = evalQueryBala... | class class_name[name] begin[{]
method[retrieveBalance, return_type[type[BalanceSheet]], modifier[synchronized final public], parameter[pAddParam, pDate]] begin[{]
call[.getSrvBalance, parameter[]]
local_variable[type[BalanceSheet], result]
call[result.setItsDate, parame... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[synchronized] identifier[BalanceSheet] identifier[retrieveBalance] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[Date] identifier[p... |
public final void add(@NotNull final SerializedDataType type, final String contentType,
@NotNull final SerDeserializer serDeserializer) {
this.addSerializer(type, serDeserializer);
this.addDeserializer(type, contentType, serDeserializer);
} | class class_name[name] begin[{]
method[add, return_type[void], modifier[final public], parameter[type, contentType, serDeserializer]] begin[{]
THIS[call[None.addSerializer, parameter[member[.type], member[.serDeserializer]]]]
THIS[call[None.addDeserializer, parameter[member[.typ... | Keyword[public] Keyword[final] Keyword[void] identifier[add] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[SerializedDataType] identifier[type] , Keyword[final] identifier[String] identifier[contentType] , annotation[@] identifier[NotNull] Keyword[final] identifier[SerDeserializer] identif... |
List<Point> sliceRoute(LineString lineString) {
double distanceMeters = TurfMeasurement.length(lineString, TurfConstants.UNIT_METERS);
if (distanceMeters <= 0) {
return Collections.emptyList();
}
List<Point> points = new ArrayList<>();
for (double i = 0; i < distanceMeters; i += distance) {
... | class class_name[name] begin[{]
method[sliceRoute, return_type[type[List]], modifier[default], parameter[lineString]] begin[{]
local_variable[type[double], distanceMeters]
if[binary_operation[member[.distanceMeters], <=, literal[0]]] begin[{]
return[call[Collections.emptyLis... | identifier[List] operator[<] identifier[Point] operator[>] identifier[sliceRoute] operator[SEP] identifier[LineString] identifier[lineString] operator[SEP] {
Keyword[double] identifier[distanceMeters] operator[=] identifier[TurfMeasurement] operator[SEP] identifier[length] operator[SEP] identifier[lineString] , ... |
public static ArrayList<String> getKeywordDataclass(Entry entry, DataSet d)
{
Set<String> keywordDataclassSet = new HashSet<String>();
ArrayList<String> keywordDataclasses=new ArrayList<String>();
HashMap<String, String> compressedKeywordToDataclassMap = new HashMap<String, String>();
HashMap<String, String> c... | class class_name[name] begin[{]
method[getKeywordDataclass, return_type[type[ArrayList]], modifier[public static], parameter[entry, d]] begin[{]
local_variable[type[Set], keywordDataclassSet]
local_variable[type[ArrayList], keywordDataclasses]
local_variable[type[HashMap], compressedKey... | Keyword[public] Keyword[static] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[getKeywordDataclass] operator[SEP] identifier[Entry] identifier[entry] , identifier[DataSet] identifier[d] operator[SEP] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[keywordData... |
public void writeProperty(Destination dst, int objIndex, int propID, int start,
int elements, byte[] data) throws KNXTimeoutException, KNXRemoteException,
KNXDisconnectException, KNXLinkClosedException
{
if (objIndex < 0 || objIndex > 255 || propID < 0 || propID > 255 || start < 0
|| start > 0xFFF || dat... | class class_name[name] begin[{]
method[writeProperty, return_type[void], modifier[public], parameter[dst, objIndex, propID, start, elements, data]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation... | Keyword[public] Keyword[void] identifier[writeProperty] operator[SEP] identifier[Destination] identifier[dst] , Keyword[int] identifier[objIndex] , Keyword[int] identifier[propID] , Keyword[int] identifier[start] , Keyword[int] identifier[elements] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] opera... |
protected void copyDefaultCheckProperties(final Check destCheck, final Annotation annotation) {
Integer severity = (Integer) ClassUtil.readAnnotationValue(annotation, ANN_SEVERITY);
destCheck.setSeverity(severity.intValue());
String[] profiles = (String[]) ClassUtil.readAnnotationValue(annotation, ANN_PROFILES);... | class class_name[name] begin[{]
method[copyDefaultCheckProperties, return_type[void], modifier[protected], parameter[destCheck, annotation]] begin[{]
local_variable[type[Integer], severity]
call[destCheck.setSeverity, parameter[call[severity.intValue, parameter[]]]]
local_variab... | Keyword[protected] Keyword[void] identifier[copyDefaultCheckProperties] operator[SEP] Keyword[final] identifier[Check] identifier[destCheck] , Keyword[final] identifier[Annotation] identifier[annotation] operator[SEP] {
identifier[Integer] identifier[severity] operator[=] operator[SEP] identifier[Integer] opera... |
private void updateProcessedCounters(int snapshotFinishedWorkers) {
if (isInterrupted()) {
wakeUpWorkers();
return;
}
if (countStartedWorkers_.get() > snapshotFinishedWorkers) {
/*
* We are not the last worker processing the saturation state, so
* the current jobs and contexts may not be processe... | class class_name[name] begin[{]
method[updateProcessedCounters, return_type[void], modifier[private], parameter[snapshotFinishedWorkers]] begin[{]
if[call[.isInterrupted, parameter[]]] begin[{]
call[.wakeUpWorkers, parameter[]]
return[None]
else begin... | Keyword[private] Keyword[void] identifier[updateProcessedCounters] operator[SEP] Keyword[int] identifier[snapshotFinishedWorkers] operator[SEP] {
Keyword[if] operator[SEP] identifier[isInterrupted] operator[SEP] operator[SEP] operator[SEP] {
identifier[wakeUpWorkers] operator[SEP] operator[SEP] operat... |
public void setKeyPhrasesDetectionJobPropertiesList(java.util.Collection<KeyPhrasesDetectionJobProperties> keyPhrasesDetectionJobPropertiesList) {
if (keyPhrasesDetectionJobPropertiesList == null) {
this.keyPhrasesDetectionJobPropertiesList = null;
return;
}
this.keyPhra... | class class_name[name] begin[{]
method[setKeyPhrasesDetectionJobPropertiesList, return_type[void], modifier[public], parameter[keyPhrasesDetectionJobPropertiesList]] begin[{]
if[binary_operation[member[.keyPhrasesDetectionJobPropertiesList], ==, literal[null]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setKeyPhrasesDetectionJobPropertiesList] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[KeyPhrasesDetectionJobProperties] operator[>] identifier[keyPhrasesDetectionJobPropertiesList] operator[SEP] {
... |
public String serialize(List<T> list) throws IOException {
StringWriter sw = new StringWriter();
JsonGenerator jsonGenerator = LoganSquare.JSON_FACTORY.createGenerator(sw);
serialize(list, jsonGenerator);
jsonGenerator.close();
return sw.toString();
} | class class_name[name] begin[{]
method[serialize, return_type[type[String]], modifier[public], parameter[list]] begin[{]
local_variable[type[StringWriter], sw]
local_variable[type[JsonGenerator], jsonGenerator]
call[.serialize, parameter[member[.list], member[.jsonGenerator]]]
... | Keyword[public] identifier[String] identifier[serialize] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[list] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[StringWriter] identifier[sw] operator[=] Keyword[new] identifier[StringWriter] operator[SEP] operator[S... |
@GwtIncompatible("incompatible method")
public static long getFragmentInHours(final Calendar calendar, final int fragment) {
return getFragment(calendar, fragment, TimeUnit.HOURS);
} | class class_name[name] begin[{]
method[getFragmentInHours, return_type[type[long]], modifier[public static], parameter[calendar, fragment]] begin[{]
return[call[.getFragment, parameter[member[.calendar], member[.fragment], member[TimeUnit.HOURS]]]]
end[}]
END[}] | annotation[@] identifier[GwtIncompatible] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[long] identifier[getFragmentInHours] operator[SEP] Keyword[final] identifier[Calendar] identifier[calendar] , Keyword[final] Keyword[int] identifier[fragment] operator[SEP] {
Keyword[ret... |
public static void clearRedundantCaches(List<GitHubServerConfig> configs) {
Path baseCacheDir = getBaseCacheDir();
if (notExists(baseCacheDir)) {
return;
}
final Set<String> actualNames = from(configs).filter(withEnabledCache()).transform(toCacheDir())
.tran... | class class_name[name] begin[{]
method[clearRedundantCaches, return_type[void], modifier[public static], parameter[configs]] begin[{]
local_variable[type[Path], baseCacheDir]
if[call[.notExists, parameter[member[.baseCacheDir]]]] begin[{]
return[None]
else begin[{]
N... | Keyword[public] Keyword[static] Keyword[void] identifier[clearRedundantCaches] operator[SEP] identifier[List] operator[<] identifier[GitHubServerConfig] operator[>] identifier[configs] operator[SEP] {
identifier[Path] identifier[baseCacheDir] operator[=] identifier[getBaseCacheDir] operator[SEP] operator[SEP] op... |
private boolean isVisibleInBackend(AccessControllable node) {
if (isVisibleInFrontend(node)) {
return true;
}
// no node, nothing to see here..
if (node == null) {
return false;
}
// fetch user
final Principal user = getUser(false);
// anonymous users may not see any nodes in backend
if (... | class class_name[name] begin[{]
method[isVisibleInBackend, return_type[type[boolean]], modifier[private], parameter[node]] begin[{]
if[call[.isVisibleInFrontend, parameter[member[.node]]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
if[bi... | Keyword[private] Keyword[boolean] identifier[isVisibleInBackend] operator[SEP] identifier[AccessControllable] identifier[node] operator[SEP] {
Keyword[if] operator[SEP] identifier[isVisibleInFrontend] operator[SEP] identifier[node] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] operato... |
public Observable<ServiceResponse<ImageRegionProposal>> getImageRegionProposalsWithServiceResponseAsync(UUID projectId, UUID imageId) {
if (projectId == null) {
throw new IllegalArgumentException("Parameter projectId is required and cannot be null.");
}
if (imageId == null) {
... | class class_name[name] begin[{]
method[getImageRegionProposalsWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[projectId, imageId]] begin[{]
if[binary_operation[member[.projectId], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreato... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[ImageRegionProposal] operator[>] operator[>] identifier[getImageRegionProposalsWithServiceResponseAsync] operator[SEP] identifier[UUID] identifier[projectId] , identifier[UUID] identifier[imageId] operator[SEP] {
... |
public float write(PdfContentByte canvas, PdfDocument document, float documentY) throws DocumentException {
this.document = document;
columnText.setCanvas(canvas);
if (columnDefs.isEmpty()) {
throw new DocumentException("MultiColumnText has no columns");
}
overflow = ... | class class_name[name] begin[{]
method[write, return_type[type[float]], modifier[public], parameter[canvas, document, documentY]] begin[{]
assign[THIS[member[None.document]], member[.document]]
call[columnText.setCanvas, parameter[member[.canvas]]]
if[call[column... | Keyword[public] Keyword[float] identifier[write] operator[SEP] identifier[PdfContentByte] identifier[canvas] , identifier[PdfDocument] identifier[document] , Keyword[float] identifier[documentY] operator[SEP] Keyword[throws] identifier[DocumentException] {
Keyword[this] operator[SEP] identifier[document] opera... |
public String getCacheName(boolean online, String rootPath, String parameters) {
String rfsName = CmsFileUtil.getRepositoryName(m_rfsRepository, rootPath, online);
if (CmsStringUtil.isNotEmpty(parameters)) {
String extension = CmsFileUtil.getExtension(rfsName);
// build the RFS ... | class class_name[name] begin[{]
method[getCacheName, return_type[type[String]], modifier[public], parameter[online, rootPath, parameters]] begin[{]
local_variable[type[String], rfsName]
if[call[CmsStringUtil.isNotEmpty, parameter[member[.parameters]]]] begin[{]
local_variabl... | Keyword[public] identifier[String] identifier[getCacheName] operator[SEP] Keyword[boolean] identifier[online] , identifier[String] identifier[rootPath] , identifier[String] identifier[parameters] operator[SEP] {
identifier[String] identifier[rfsName] operator[=] identifier[CmsFileUtil] operator[SEP] identifier... |
public static Type getReturnType(final String methodDescriptor) {
// Skip the first character, which is always a '('.
int currentOffset = 1;
// Skip the argument types, one at a each loop iteration.
while (methodDescriptor.charAt(currentOffset) != ')') {
while (methodDescriptor.charAt(currentOffse... | class class_name[name] begin[{]
method[getReturnType, return_type[type[Type]], modifier[public static], parameter[methodDescriptor]] begin[{]
local_variable[type[int], currentOffset]
while[binary_operation[call[methodDescriptor.charAt, parameter[member[.currentOffset]]], !=, literal[')'... | Keyword[public] Keyword[static] identifier[Type] identifier[getReturnType] operator[SEP] Keyword[final] identifier[String] identifier[methodDescriptor] operator[SEP] {
Keyword[int] identifier[currentOffset] operator[=] Other[1] operator[SEP] Keyword[while] operator[SEP] identifier[methodDescriptor] operator[SEP]... |
public void updateEntry(long expiryTime, boolean trust,
byte[] retainedSecret, byte[] rs2, String number) {
if (platform.isVerboseLogging()) {
platform.getLogger().log(
"ZRTPCache: updateEntry("
+ expiryTime
+ ", "
+ trust
+ ", "
+ platform.getUtils().byteToHexString(
... | class class_name[name] begin[{]
method[updateEntry, return_type[void], modifier[public], parameter[expiryTime, trust, retainedSecret, rs2, number]] begin[{]
if[call[platform.isVerboseLogging, parameter[]]] begin[{]
call[platform.getLogger, parameter[]]
else begin... | Keyword[public] Keyword[void] identifier[updateEntry] operator[SEP] Keyword[long] identifier[expiryTime] , Keyword[boolean] identifier[trust] , Keyword[byte] operator[SEP] operator[SEP] identifier[retainedSecret] , Keyword[byte] operator[SEP] operator[SEP] identifier[rs2] , identifier[String] identifier[number] ope... |
@Override
public void onSelectLocation(SelectLocationEvent event) {
mapPresenter.getViewPort().applyBounds(event.getBbox());
geocoderWidgetView.setValue(event.getCanonicalLocation());
} | class class_name[name] begin[{]
method[onSelectLocation, return_type[void], modifier[public], parameter[event]] begin[{]
call[mapPresenter.getViewPort, parameter[]]
call[geocoderWidgetView.setValue, parameter[call[event.getCanonicalLocation, parameter[]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onSelectLocation] operator[SEP] identifier[SelectLocationEvent] identifier[event] operator[SEP] {
identifier[mapPresenter] operator[SEP] identifier[getViewPort] operator[SEP] operator[SEP] operator[SEP] identifier[applyBounds] operator[S... |
private void countCooccurringProperties(
StatementDocument statementDocument, UsageRecord usageRecord,
PropertyIdValue thisPropertyIdValue) {
for (StatementGroup sg : statementDocument.getStatementGroups()) {
if (!sg.getProperty().equals(thisPropertyIdValue)) {
Integer propertyId = getNumId(sg.getPropert... | class class_name[name] begin[{]
method[countCooccurringProperties, return_type[void], modifier[private], parameter[statementDocument, usageRecord, thisPropertyIdValue]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getPrope... | Keyword[private] Keyword[void] identifier[countCooccurringProperties] operator[SEP] identifier[StatementDocument] identifier[statementDocument] , identifier[UsageRecord] identifier[usageRecord] , identifier[PropertyIdValue] identifier[thisPropertyIdValue] operator[SEP] {
Keyword[for] operator[SEP] identifier[S... |
public void addInvalidAttributeError(final String type) throws ValidationException
{
addError(StringFormatter.format(MessageConstants.MESSAGES.attributeIsInvalidForType(), type));
} | class class_name[name] begin[{]
method[addInvalidAttributeError, return_type[void], modifier[public], parameter[type]] begin[{]
call[.addError, parameter[call[StringFormatter.format, parameter[call[MessageConstants.MESSAGES.attributeIsInvalidForType, parameter[]], member[.type]]]]]
end[}]
E... | Keyword[public] Keyword[void] identifier[addInvalidAttributeError] operator[SEP] Keyword[final] identifier[String] identifier[type] operator[SEP] Keyword[throws] identifier[ValidationException] {
identifier[addError] operator[SEP] identifier[StringFormatter] operator[SEP] identifier[format] operator[SEP] identif... |
public boolean isEqualBasedOn(BiPredicate<? super E, ? super A> compareFunc) {
return equals(expectedDef, expectedRoot, actualDef, actualRoot, compareFunc);
} | class class_name[name] begin[{]
method[isEqualBasedOn, return_type[type[boolean]], modifier[public], parameter[compareFunc]] begin[{]
return[call[.equals, parameter[member[.expectedDef], member[.expectedRoot], member[.actualDef], member[.actualRoot], member[.compareFunc]]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[isEqualBasedOn] operator[SEP] identifier[BiPredicate] operator[<] operator[?] Keyword[super] identifier[E] , operator[?] Keyword[super] identifier[A] operator[>] identifier[compareFunc] operator[SEP] {
Keyword[return] identifier[equals] operator[SEP] identifier[expect... |
public static boolean contains(Object[] arr, Object obj) {
if (arr != null) {
for (int i = 0; i < arr.length; i++) {
Object arri = arr[i];
if (arri == obj || (arri != null && arri.equals(obj))) {
return true;
}
}
... | class class_name[name] begin[{]
method[contains, return_type[type[boolean]], modifier[public static], parameter[arr, obj]] begin[{]
if[binary_operation[member[.arr], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annota... | Keyword[public] Keyword[static] Keyword[boolean] identifier[contains] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[arr] , identifier[Object] identifier[obj] operator[SEP] {
Keyword[if] operator[SEP] identifier[arr] operator[!=] Other[null] operator[SEP] {
Keyword[for] opera... |
@VisibleForTesting
protected StreamSet createStreamSet(final Terminal terminal) {
InputStream in = new FilterInputStream(terminal.input())
{
@Override
public void close() throws IOException {
// ignore
}
};
PrintStream out = new PrintStream(terminal.output(), true)
{
... | class class_name[name] begin[{]
method[createStreamSet, return_type[type[StreamSet]], modifier[protected], parameter[terminal]] begin[{]
local_variable[type[InputStream], in]
local_variable[type[PrintStream], out]
return[ClassCreator(arguments=[MemberReference(member=in, postfix_operato... | annotation[@] identifier[VisibleForTesting] Keyword[protected] identifier[StreamSet] identifier[createStreamSet] operator[SEP] Keyword[final] identifier[Terminal] identifier[terminal] operator[SEP] {
identifier[InputStream] identifier[in] operator[=] Keyword[new] identifier[FilterInputStream] operator[SEP] ident... |
public RedisDS init(String group) {
if (null == setting) {
setting = new Setting(REDIS_CONFIG_PATH, true);
}
final JedisPoolConfig config = new JedisPoolConfig();
// 共用配置
setting.toBean(config);
if (StrUtil.isNotBlank(group)) {
// 特有配置
setting.toBean(group, config);
}
this.pool =... | class class_name[name] begin[{]
method[init, return_type[type[RedisDS]], modifier[public], parameter[group]] begin[{]
if[binary_operation[literal[null], ==, member[.setting]]] begin[{]
assign[member[.setting], ClassCreator(arguments=[MemberReference(member=REDIS_CONFIG_P... | Keyword[public] identifier[RedisDS] identifier[init] operator[SEP] identifier[String] identifier[group] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[setting] operator[SEP] {
identifier[setting] operator[=] Keyword[new] identifier[Setting] operator[SEP] identifier[REDIS... |
public static List<String> split(String string, String delimiter) {
return split(string, delimiter, true);
} | class class_name[name] begin[{]
method[split, return_type[type[List]], modifier[public static], parameter[string, delimiter]] begin[{]
return[call[.split, parameter[member[.string], member[.delimiter], literal[true]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[split] operator[SEP] identifier[String] identifier[string] , identifier[String] identifier[delimiter] operator[SEP] {
Keyword[return] identifier[split] operator[SEP] identifier[string] , identifier[delimiter]... |
private static URL fixURL(URL jarURL)
{
String jarURLString = jarURL.toExternalForm();
if (StringUtils.contains(jarURLString, ' ')) {
jarURLString = jarURLString.replace(" ", "%20");
try {
return new URL(jarURLString);
} catch (MalformedURLExcepti... | class class_name[name] begin[{]
method[fixURL, return_type[type[URL]], modifier[private static], parameter[jarURL]] begin[{]
local_variable[type[String], jarURLString]
if[call[StringUtils.contains, parameter[member[.jarURLString], literal[' ']]]] begin[{]
assign[... | Keyword[private] Keyword[static] identifier[URL] identifier[fixURL] operator[SEP] identifier[URL] identifier[jarURL] operator[SEP] {
identifier[String] identifier[jarURLString] operator[=] identifier[jarURL] operator[SEP] identifier[toExternalForm] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[S... |
public String words(int count) {
StringBuilder s = new StringBuilder();
while (count-- > 0)
s.append(randomWord()).append(" ");
return s.toString().trim();
} | class class_name[name] begin[{]
method[words, return_type[type[String]], modifier[public], parameter[count]] begin[{]
local_variable[type[StringBuilder], s]
while[binary_operation[member[.count], >, literal[0]]] begin[{]
call[s.append, parameter[call[.randomWord, parameter[]... | Keyword[public] identifier[String] identifier[words] operator[SEP] Keyword[int] identifier[count] operator[SEP] {
identifier[StringBuilder] identifier[s] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[count] operator[--] operat... |
protected void writeClassToDisk(File targetDir, ClassWriter classWriter, String className) throws IOException {
if (targetDir != null) {
String fileName = className.replace('.', '/') + ".class";
File targetFile = new File(targetDir, fileName);
targetFile.getParentFile().mkdi... | class class_name[name] begin[{]
method[writeClassToDisk, return_type[void], modifier[protected], parameter[targetDir, classWriter, className]] begin[{]
if[binary_operation[member[.targetDir], !=, literal[null]]] begin[{]
local_variable[type[String], fileName]
local_varia... | Keyword[protected] Keyword[void] identifier[writeClassToDisk] operator[SEP] identifier[File] identifier[targetDir] , identifier[ClassWriter] identifier[classWriter] , identifier[String] identifier[className] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[targetDir]... |
private TranslatedTopicWrapper createDummyTranslatedTopicFromExisting(final TranslatedTopicWrapper translatedTopic,
final LocaleWrapper locale) {
// Make sure some collections are loaded, so the clone works properly
translatedTopic.getTags();
translatedTopic.getProperties();
... | class class_name[name] begin[{]
method[createDummyTranslatedTopicFromExisting, return_type[type[TranslatedTopicWrapper]], modifier[private], parameter[translatedTopic, locale]] begin[{]
call[translatedTopic.getTags, parameter[]]
call[translatedTopic.getProperties, parameter[]]
... | Keyword[private] identifier[TranslatedTopicWrapper] identifier[createDummyTranslatedTopicFromExisting] operator[SEP] Keyword[final] identifier[TranslatedTopicWrapper] identifier[translatedTopic] , Keyword[final] identifier[LocaleWrapper] identifier[locale] operator[SEP] {
identifier[translatedTopic] operator[SE... |
public synchronized static <D extends Dao<T, ?>, T> D lookupDao(ConnectionSource connectionSource,
DatabaseTableConfig<T> tableConfig) {
if (connectionSource == null) {
throw new IllegalArgumentException("connectionSource argument cannot be null");
}
TableConfigConnectionSource key = new TableConfigConnecti... | class class_name[name] begin[{]
method[lookupDao, return_type[type[D]], modifier[synchronized public static], parameter[connectionSource, tableConfig]] begin[{]
if[binary_operation[member[.connectionSource], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argumen... | Keyword[public] Keyword[synchronized] Keyword[static] operator[<] identifier[D] Keyword[extends] identifier[Dao] operator[<] identifier[T] , operator[?] operator[>] , identifier[T] operator[>] identifier[D] identifier[lookupDao] operator[SEP] identifier[ConnectionSource] identifier[connectionSource] , identifier[Dat... |
final Token previousToken() throws IllegalStateException, NoSuchElementException {
if (currentToken == null) {
if (completed) {
if (tokens.isEmpty()) {
throw new NoSuchElementException(CommonI18n.noMoreContent.text());
}
return toke... | class class_name[name] begin[{]
method[previousToken, return_type[type[Token]], modifier[final], parameter[]] begin[{]
if[binary_operation[member[.currentToken], ==, literal[null]]] begin[{]
if[member[.completed]] begin[{]
if[call[tokens.i... | Keyword[final] identifier[Token] identifier[previousToken] operator[SEP] operator[SEP] Keyword[throws] identifier[IllegalStateException] , identifier[NoSuchElementException] {
Keyword[if] operator[SEP] identifier[currentToken] operator[==] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identif... |
public static String generateAvroSchema(Map<String, HiveTypeInfo> typeInfo, String qualifiedName)
throws HiveStageCheckedException {
Utils.checkNotNull(typeInfo, "Error TypeInfo cannot be null");
// Avro doesn't allow "`" in names, so we're dropping those from qualified name
AvroHiveSchemaGenerator ge... | class class_name[name] begin[{]
method[generateAvroSchema, return_type[type[String]], modifier[public static], parameter[typeInfo, qualifiedName]] begin[{]
call[Utils.checkNotNull, parameter[member[.typeInfo], literal["Error TypeInfo cannot be null"]]]
local_variable[type[AvroHiveSchema... | Keyword[public] Keyword[static] identifier[String] identifier[generateAvroSchema] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[HiveTypeInfo] operator[>] identifier[typeInfo] , identifier[String] identifier[qualifiedName] operator[SEP] Keyword[throws] identifier[HiveStageCheckedException] ... |
private void parseTemplate() {
/*
* query string and path literals have different reserved characters and different encoding
* requirements. to ensure compliance with RFC 6570, we'll need to encode query literals
* differently from path literals. let's look at the template to see if it contains a que... | class class_name[name] begin[{]
method[parseTemplate, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[Matcher], queryStringMatcher]
if[call[queryStringMatcher.find, parameter[]]] begin[{]
local_variable[type[String], path]
local_va... | Keyword[private] Keyword[void] identifier[parseTemplate] operator[SEP] operator[SEP] {
identifier[Matcher] identifier[queryStringMatcher] operator[=] identifier[QUERY_STRING_PATTERN] operator[SEP] identifier[matcher] operator[SEP] Keyword[this] operator[SEP] identifier[template] operator[SEP] operator[SEP] Keywo... |
protected void removeExecutor(final Executor e) {
final Runnable task = new Runnable() {
@Override
public void run() {
synchronized (Computer.this) {
executors.remove(e);
addNewExecutorIfNecessary();
if (!isAlive... | class class_name[name] begin[{]
method[removeExecutor, return_type[void], modifier[protected], parameter[e]] begin[{]
local_variable[type[Runnable], task]
if[call[Queue.tryWithLock, parameter[member[.task]]]] begin[{]
call[threadPoolForRemoting.submit, parameter[... | Keyword[protected] Keyword[void] identifier[removeExecutor] operator[SEP] Keyword[final] identifier[Executor] identifier[e] operator[SEP] {
Keyword[final] identifier[Runnable] identifier[task] operator[=] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] {
annotation[@] identifier[Override... |
protected boolean canDiscardPredictions() {
switch (m_Owner.getEvaluation().getSelectedTag().getID()) {
case DefaultEvaluationMetrics.EVALUATION_AUC:
case DefaultEvaluationMetrics.EVALUATION_PRC:
return false;
default:
return true;
}
} | class class_name[name] begin[{]
method[canDiscardPredictions, return_type[type[boolean]], modifier[protected], parameter[]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=EVALUATION_AUC, postfix_operators=[], prefix_operators=[], qualifier=DefaultEvaluationMetrics, sel... | Keyword[protected] Keyword[boolean] identifier[canDiscardPredictions] operator[SEP] operator[SEP] {
Keyword[switch] operator[SEP] identifier[m_Owner] operator[SEP] identifier[getEvaluation] operator[SEP] operator[SEP] operator[SEP] identifier[getSelectedTag] operator[SEP] operator[SEP] operator[SEP] identifier[g... |
private void skipResource(CmsResource res) {
// add the file to the new sync list...
String resname = m_cms.getSitePath(res);
CmsSynchronizeList syncList = m_syncList.get(translate(resname));
m_newSyncList.put(translate(resname), syncList);
// .. and remove it from the old one
... | class class_name[name] begin[{]
method[skipResource, return_type[void], modifier[private], parameter[res]] begin[{]
local_variable[type[String], resname]
local_variable[type[CmsSynchronizeList], syncList]
call[m_newSyncList.put, parameter[call[.translate, parameter[member[.resna... | Keyword[private] Keyword[void] identifier[skipResource] operator[SEP] identifier[CmsResource] identifier[res] operator[SEP] {
identifier[String] identifier[resname] operator[=] identifier[m_cms] operator[SEP] identifier[getSitePath] operator[SEP] identifier[res] operator[SEP] operator[SEP] identifier[CmsSynchron... |
public EClass getGIMD() {
if (gimdEClass == null) {
gimdEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(453);
}
return gimdEClass;
} | class class_name[name] begin[{]
method[getGIMD, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.gimdEClass], ==, literal[null]]] begin[{]
assign[member[.gimdEClass], Cast(expression=MethodInvocation(arguments=[MemberReferenc... | Keyword[public] identifier[EClass] identifier[getGIMD] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[gimdEClass] operator[==] Other[null] operator[SEP] {
identifier[gimdEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier... |
public void addChildObject(String collection, ConfigurationObject childObject) {
childObjects.computeIfAbsent(collection, ignored -> new ArrayList<>()).add(childObject);
} | class class_name[name] begin[{]
method[addChildObject, return_type[void], modifier[public], parameter[collection, childObject]] begin[{]
call[childObjects.computeIfAbsent, parameter[member[.collection], LambdaExpression(body=ClassCreator(arguments=[], body=None, constructor_type_arguments=None,... | Keyword[public] Keyword[void] identifier[addChildObject] operator[SEP] identifier[String] identifier[collection] , identifier[ConfigurationObject] identifier[childObject] operator[SEP] {
identifier[childObjects] operator[SEP] identifier[computeIfAbsent] operator[SEP] identifier[collection] , identifier[ignored... |
public static double angularDifference (double a1, double a2) {
double ma1 = mirrorAngle(a1), ma2 = mirrorAngle(a2);
double diff = a1 - a2, mdiff = ma2 - ma1;
return (Math.abs(diff) < Math.abs(mdiff)) ? diff : mdiff;
} | class class_name[name] begin[{]
method[angularDifference, return_type[type[double]], modifier[public static], parameter[a1, a2]] begin[{]
local_variable[type[double], ma1]
local_variable[type[double], diff]
return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arg... | Keyword[public] Keyword[static] Keyword[double] identifier[angularDifference] operator[SEP] Keyword[double] identifier[a1] , Keyword[double] identifier[a2] operator[SEP] {
Keyword[double] identifier[ma1] operator[=] identifier[mirrorAngle] operator[SEP] identifier[a1] operator[SEP] , identifier[ma2] operator[=... |
private synchronized JMSContext getInternalJMSContext() {
TransactionSynchronizationRegistry tranSyncRegistry = null;
try {
boolean tranIsActive = false;
tranSyncRegistry = (TransactionSynchronizationRegistry) new InitialContext().lookup(TSR_LOOKUP_NAME);
if (tranS... | class class_name[name] begin[{]
method[getInternalJMSContext, return_type[type[JMSContext]], modifier[synchronized private], parameter[]] begin[{]
local_variable[type[TransactionSynchronizationRegistry], tranSyncRegistry]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=... | Keyword[private] Keyword[synchronized] identifier[JMSContext] identifier[getInternalJMSContext] operator[SEP] operator[SEP] {
identifier[TransactionSynchronizationRegistry] identifier[tranSyncRegistry] operator[=] Other[null] operator[SEP] Keyword[try] {
Keyword[boolean] identifier[tranIsActive] opera... |
public ChannelBuffer formatErrorV1(final BadRequestException exception) {
StringBuilder output =
new StringBuilder(exception.getMessage().length() * 2);
final String jsonp = query.getQueryStringParam("jsonp");
if (jsonp != null && !jsonp.isEmpty()) {
output.append(query.getQueryStringParam("jso... | class class_name[name] begin[{]
method[formatErrorV1, return_type[type[ChannelBuffer]], modifier[public], parameter[exception]] begin[{]
local_variable[type[StringBuilder], output]
local_variable[type[String], jsonp]
if[binary_operation[binary_operation[member[.jsonp], !=, liter... | Keyword[public] identifier[ChannelBuffer] identifier[formatErrorV1] operator[SEP] Keyword[final] identifier[BadRequestException] identifier[exception] operator[SEP] {
identifier[StringBuilder] identifier[output] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[exception] operator[SEP] ... |
private Tree<Row> here( Element token ){
current.getContent().addToken( token );
return current;
} | class class_name[name] begin[{]
method[here, return_type[type[Tree]], modifier[private], parameter[token]] begin[{]
call[current.getContent, parameter[]]
return[member[.current]]
end[}]
END[}] | Keyword[private] identifier[Tree] operator[<] identifier[Row] operator[>] identifier[here] operator[SEP] identifier[Element] identifier[token] operator[SEP] {
identifier[current] operator[SEP] identifier[getContent] operator[SEP] operator[SEP] operator[SEP] identifier[addToken] operator[SEP] identifier[token] op... |
public boolean isValidFile(RandomAccessFile raf) throws IOException {
if (!super.isValidFile(raf)) {
return false;
}
// TODO: handle other types of surface files
return gemreader.getFileSubType()
.equals(GempakSurfaceFileReader.STANDARD) || gemreader
.getFileSubType... | class class_name[name] begin[{]
method[isValidFile, return_type[type[boolean]], modifier[public], parameter[raf]] begin[{]
if[SuperMethodInvocation(arguments=[MemberReference(member=raf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isValidFile, postfix_operators... | Keyword[public] Keyword[boolean] identifier[isValidFile] operator[SEP] identifier[RandomAccessFile] identifier[raf] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] Keyword[super] operator[SEP] identifier[isValidFile] operator[SEP] identifier[raf] operator[SEP] operat... |
@CheckReturnValue
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public final ConnectableFlowable<T> replay() {
return FlowableReplay.createFrom(this);
} | class class_name[name] begin[{]
method[replay, return_type[type[ConnectableFlowable]], modifier[final public], parameter[]] begin[{]
return[call[FlowableReplay.createFrom, parameter[THIS[]]]]
end[}]
END[}] | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[FULL] operator[SEP] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[publ... |
public TreeNode<T> attach(final TreeNode<T> child) {
requireNonNull(child);
if (child._parent == this) {
insert(childCount() - 1, child);
} else {
insert(childCount(), child);
}
return this;
} | class class_name[name] begin[{]
method[attach, return_type[type[TreeNode]], modifier[public], parameter[child]] begin[{]
call[.requireNonNull, parameter[member[.child]]]
if[binary_operation[member[child._parent], ==, THIS[]]] begin[{]
call[.insert, parame... | Keyword[public] identifier[TreeNode] operator[<] identifier[T] operator[>] identifier[attach] operator[SEP] Keyword[final] identifier[TreeNode] operator[<] identifier[T] operator[>] identifier[child] operator[SEP] {
identifier[requireNonNull] operator[SEP] identifier[child] operator[SEP] operator[SEP] Keyword[if... |
public synchronized void onRequestFailed(Throwable reason) {
allRequestsTracker.onRequestFailed(reason);
recentRequestsTracker.onRequestFailed(reason);
meter.mark();
} | class class_name[name] begin[{]
method[onRequestFailed, return_type[void], modifier[synchronized public], parameter[reason]] begin[{]
call[allRequestsTracker.onRequestFailed, parameter[member[.reason]]]
call[recentRequestsTracker.onRequestFailed, parameter[member[.reason]]]
... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[onRequestFailed] operator[SEP] identifier[Throwable] identifier[reason] operator[SEP] {
identifier[allRequestsTracker] operator[SEP] identifier[onRequestFailed] operator[SEP] identifier[reason] operator[SEP] operator[SEP] identifier[recentRequestsTra... |
protected void writeTypeEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) {
sb.append("Type:");
sb.append(getStatementType(execInfo.getStatementType()));
sb.append(", ");
} | class class_name[name] begin[{]
method[writeTypeEntry, return_type[void], modifier[protected], parameter[sb, execInfo, queryInfoList]] begin[{]
call[sb.append, parameter[literal["Type:"]]]
call[sb.append, parameter[call[.getStatementType, parameter[call[execInfo.getStatementType... | Keyword[protected] Keyword[void] identifier[writeTypeEntry] operator[SEP] identifier[StringBuilder] identifier[sb] , identifier[ExecutionInfo] identifier[execInfo] , identifier[List] operator[<] identifier[QueryInfo] operator[>] identifier[queryInfoList] operator[SEP] {
identifier[sb] operator[SEP] identifier[... |
public synchronized void
addRRset(RRset rrset, int cred) {
long ttl = rrset.getTTL();
Name name = rrset.getName();
int type = rrset.getType();
Element element = findElement(name, type, 0);
if (ttl == 0) {
if (element != null && element.compareCredibility(cred) <= 0)
removeElement(name, type);
} else {
if (... | class class_name[name] begin[{]
method[addRRset, return_type[void], modifier[synchronized public], parameter[rrset, cred]] begin[{]
local_variable[type[long], ttl]
local_variable[type[Name], name]
local_variable[type[int], type]
local_variable[type[Element], element]
... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[addRRset] operator[SEP] identifier[RRset] identifier[rrset] , Keyword[int] identifier[cred] operator[SEP] {
Keyword[long] identifier[ttl] operator[=] identifier[rrset] operator[SEP] identifier[getTTL] operator[SEP] operator[SEP] operator[SEP] identi... |
@Override
public long countClusterElements(final String iClusterName) {
checkSecurity(ORule.ResourceGeneric.CLUSTER, ORole.PERMISSION_READ, iClusterName);
checkIfActive();
final int clusterId = getClusterIdByName(iClusterName);
if (clusterId < 0)
throw new IllegalArgumentException("Cluster '" +... | class class_name[name] begin[{]
method[countClusterElements, return_type[type[long]], modifier[public], parameter[iClusterName]] begin[{]
call[.checkSecurity, parameter[member[ORule.ResourceGeneric.CLUSTER], member[ORole.PERMISSION_READ], member[.iClusterName]]]
call[.checkIfAct... | annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[countClusterElements] operator[SEP] Keyword[final] identifier[String] identifier[iClusterName] operator[SEP] {
identifier[checkSecurity] operator[SEP] identifier[ORule] operator[SEP] identifier[ResourceGeneric] operator[SEP] identifier[C... |
public static FileBuffer allocate(File file, String mode, long initialCapacity, long maxCapacity) {
return new FileBuffer(new FileBytes(file, mode, Memory.Util.toPow2(initialCapacity)), 0, initialCapacity, maxCapacity);
} | class class_name[name] begin[{]
method[allocate, return_type[type[FileBuffer]], modifier[public static], parameter[file, mode, initialCapacity, maxCapacity]] begin[{]
return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier... | Keyword[public] Keyword[static] identifier[FileBuffer] identifier[allocate] operator[SEP] identifier[File] identifier[file] , identifier[String] identifier[mode] , Keyword[long] identifier[initialCapacity] , Keyword[long] identifier[maxCapacity] operator[SEP] {
Keyword[return] Keyword[new] identifier[FileBuff... |
public static JoinPoint<Exception> fromTasks(Task<?,?>... tasks) {
JoinPoint<Exception> jp = new JoinPoint<>();
for (Task<?,?> task : tasks) jp.addToJoin(task.getOutput());
jp.start();
return jp;
} | class class_name[name] begin[{]
method[fromTasks, return_type[type[JoinPoint]], modifier[public static], parameter[tasks]] begin[{]
local_variable[type[JoinPoint], jp]
ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOutput, p... | Keyword[public] Keyword[static] identifier[JoinPoint] operator[<] identifier[Exception] operator[>] identifier[fromTasks] operator[SEP] identifier[Task] operator[<] operator[?] , operator[?] operator[>] operator[...] identifier[tasks] operator[SEP] {
identifier[JoinPoint] operator[<] identifier[Exception] opera... |
public com.squareup.okhttp.Call getCorporationsCorporationIdStarbasesAsync(Integer corporationId,
String datasource, String ifNoneMatch, Integer page, String token,
final ApiCallback<List<CorporationStarbasesResponse>> callback) throws ApiException {
com.squareup.okhttp.Call call = getC... | class class_name[name] begin[{]
method[getCorporationsCorporationIdStarbasesAsync, return_type[type[com]], modifier[public], parameter[corporationId, datasource, ifNoneMatch, page, token, callback]] begin[{]
local_variable[type[com], call]
local_variable[type[Type], localVarReturnType]
... | Keyword[public] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[getCorporationsCorporationIdStarbasesAsync] operator[SEP] identifier[Integer] identifier[corporationId] , identifier[String] identifier[datasource] , identifier[String] identif... |
public List<QuickWidget> getQuickWidgetList(String windowName) {
int id = getQuickWindowID(windowName);
if (id >= 0 || windowName.isEmpty()) {
return getQuickWidgetList(id);
}
return Collections.emptyList();
} | class class_name[name] begin[{]
method[getQuickWidgetList, return_type[type[List]], modifier[public], parameter[windowName]] begin[{]
local_variable[type[int], id]
if[binary_operation[binary_operation[member[.id], >=, literal[0]], ||, call[windowName.isEmpty, parameter[]]]] begin[{]
... | Keyword[public] identifier[List] operator[<] identifier[QuickWidget] operator[>] identifier[getQuickWidgetList] operator[SEP] identifier[String] identifier[windowName] operator[SEP] {
Keyword[int] identifier[id] operator[=] identifier[getQuickWindowID] operator[SEP] identifier[windowName] operator[SEP] operator[... |
public static short convertToShort (@Nonnull final Object aSrcValue)
{
if (aSrcValue == null)
throw new TypeConverterException (short.class, EReason.NULL_SOURCE_NOT_ALLOWED);
final Short aValue = convert (aSrcValue, Short.class);
return aValue.shortValue ();
} | class class_name[name] begin[{]
method[convertToShort, return_type[type[short]], modifier[public static], parameter[aSrcValue]] begin[{]
if[binary_operation[member[.aSrcValue], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[ClassReference(postfix_operators=[], pr... | Keyword[public] Keyword[static] Keyword[short] identifier[convertToShort] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Object] identifier[aSrcValue] operator[SEP] {
Keyword[if] operator[SEP] identifier[aSrcValue] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] iden... |
protected static boolean isNewerData(@Nonnull final Data older, @Nonnull final Data newer) {
return newer.getVersion().compareTo(older.getVersion()) > 0;
} | class class_name[name] begin[{]
method[isNewerData, return_type[type[boolean]], modifier[static protected], parameter[older, newer]] begin[{]
return[binary_operation[call[newer.getVersion, parameter[]], >, literal[0]]]
end[}]
END[}] | Keyword[protected] Keyword[static] Keyword[boolean] identifier[isNewerData] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Data] identifier[older] , annotation[@] identifier[Nonnull] Keyword[final] identifier[Data] identifier[newer] operator[SEP] {
Keyword[return] identifier[newer] op... |
public static FieldMatcher create(boolean ignoreId) {
FieldMatcher fm = new FieldMatcher();
fm.ignoreId = ignoreId;
return fm;
} | class class_name[name] begin[{]
method[create, return_type[type[FieldMatcher]], modifier[public static], parameter[ignoreId]] begin[{]
local_variable[type[FieldMatcher], fm]
assign[member[fm.ignoreId], member[.ignoreId]]
return[member[.fm]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[FieldMatcher] identifier[create] operator[SEP] Keyword[boolean] identifier[ignoreId] operator[SEP] {
identifier[FieldMatcher] identifier[fm] operator[=] Keyword[new] identifier[FieldMatcher] operator[SEP] operator[SEP] operator[SEP] identifier[fm] operator[SEP] identifi... |
public LabelingJobDataAttributes withContentClassifiers(ContentClassifier... contentClassifiers) {
java.util.ArrayList<String> contentClassifiersCopy = new java.util.ArrayList<String>(contentClassifiers.length);
for (ContentClassifier value : contentClassifiers) {
contentClassifiersCopy.add(... | class class_name[name] begin[{]
method[withContentClassifiers, return_type[type[LabelingJobDataAttributes]], modifier[public], parameter[contentClassifiers]] begin[{]
local_variable[type[java], contentClassifiersCopy]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(... | Keyword[public] identifier[LabelingJobDataAttributes] identifier[withContentClassifiers] operator[SEP] identifier[ContentClassifier] operator[...] identifier[contentClassifiers] operator[SEP] {
identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] oper... |
public DiscriminatorJdbcSubBuilder when(String value, Class<? extends T> type) {
return when(value, (Type)type);
} | class class_name[name] begin[{]
method[when, return_type[type[DiscriminatorJdbcSubBuilder]], modifier[public], parameter[value, type]] begin[{]
return[call[.when, parameter[member[.value], Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]),... | Keyword[public] identifier[DiscriminatorJdbcSubBuilder] identifier[when] operator[SEP] identifier[String] identifier[value] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[type] operator[SEP] {
Keyword[return] identifier[when] operator[SEP] identifier[value] , ... |
public void onLayoutApplied(final WidgetContainer container, final Vector3Axis viewPortSize) {
mContainer = container;
mViewPort.setSize(viewPortSize);
if (mContainer != null) {
mContainer.onLayoutChanged(this);
}
} | class class_name[name] begin[{]
method[onLayoutApplied, return_type[void], modifier[public], parameter[container, viewPortSize]] begin[{]
assign[member[.mContainer], member[.container]]
call[mViewPort.setSize, parameter[member[.viewPortSize]]]
if[binary_operation... | Keyword[public] Keyword[void] identifier[onLayoutApplied] operator[SEP] Keyword[final] identifier[WidgetContainer] identifier[container] , Keyword[final] identifier[Vector3Axis] identifier[viewPortSize] operator[SEP] {
identifier[mContainer] operator[=] identifier[container] operator[SEP] identifier[mViewPort] ... |
ListIterator<RuleConditionElement> stackIterator() {
if (this.buildstack == null) {
this.buildstack = new LinkedList<>();
}
return this.buildstack.listIterator(this.buildstack.size());
} | class class_name[name] begin[{]
method[stackIterator, return_type[type[ListIterator]], modifier[default], parameter[]] begin[{]
if[binary_operation[THIS[member[None.buildstack]], ==, literal[null]]] begin[{]
assign[THIS[member[None.buildstack]], ClassCreator(arguments=[]... | identifier[ListIterator] operator[<] identifier[RuleConditionElement] operator[>] identifier[stackIterator] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[buildstack] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[buildst... |
public static <T> ListBuilder<T> to( List<T> list)
{
return new ListBuilder<T>( list);
} | class class_name[name] begin[{]
method[to, return_type[type[ListBuilder]], modifier[public static], parameter[list]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, po... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[ListBuilder] operator[<] identifier[T] operator[>] identifier[to] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[list] operator[SEP] {
Keyword[return] Keyword[new] identifier[ListBuilder] operator[<]... |
public CSVParserBuilder<T, K> usingCharset(String charsetName) {
return usingCharset(Charset.forName(charsetName));
} | class class_name[name] begin[{]
method[usingCharset, return_type[type[CSVParserBuilder]], modifier[public], parameter[charsetName]] begin[{]
return[call[.usingCharset, parameter[call[Charset.forName, parameter[member[.charsetName]]]]]]
end[}]
END[}] | Keyword[public] identifier[CSVParserBuilder] operator[<] identifier[T] , identifier[K] operator[>] identifier[usingCharset] operator[SEP] identifier[String] identifier[charsetName] operator[SEP] {
Keyword[return] identifier[usingCharset] operator[SEP] identifier[Charset] operator[SEP] identifier[forName] operat... |
private void validateReportDescription(List<ConfigIssue> issues){
if(!jsonMapper.isValidJson(this.reportDescription)) {
issues.add(
getContext().createConfigIssue(
Groups.REPORT.name(),
"reportDescription",
Errors.OMNITURE_03
));
}
} | class class_name[name] begin[{]
method[validateReportDescription, return_type[void], modifier[private], parameter[issues]] begin[{]
if[call[jsonMapper.isValidJson, parameter[THIS[member[None.reportDescription]]]]] begin[{]
call[issues.add, parameter[call[.getContext, par... | Keyword[private] Keyword[void] identifier[validateReportDescription] operator[SEP] identifier[List] operator[<] identifier[ConfigIssue] operator[>] identifier[issues] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[jsonMapper] operator[SEP] identifier[isValidJson] operator[SEP] Keyword[this] ope... |
public int handleErrorReturn(int iChangeType, int iErrorCode) // init this field override for other value
{
BaseListener nextListener = this.getNextEnabledListener();
while (nextListener != null)
{
boolean bOldState = nextListener.setEnabledListener(false); // Don't allow... | class class_name[name] begin[{]
method[handleErrorReturn, return_type[type[int]], modifier[public], parameter[iChangeType, iErrorCode]] begin[{]
local_variable[type[BaseListener], nextListener]
while[binary_operation[member[.nextListener], !=, literal[null]]] begin[{]
local_... | Keyword[public] Keyword[int] identifier[handleErrorReturn] operator[SEP] Keyword[int] identifier[iChangeType] , Keyword[int] identifier[iErrorCode] operator[SEP] {
identifier[BaseListener] identifier[nextListener] operator[=] Keyword[this] operator[SEP] identifier[getNextEnabledListener] operator[SEP] operator[... |
public int getNumGroups(int _dim) {
return (_dim == 0 ? (globalSize_0 / localSize_0) : (_dim == 1 ? (globalSize_1 / localSize_1) : (globalSize_2 / localSize_2)));
} | class class_name[name] begin[{]
method[getNumGroups, return_type[type[int]], modifier[public], parameter[_dim]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=_dim, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfi... | Keyword[public] Keyword[int] identifier[getNumGroups] operator[SEP] Keyword[int] identifier[_dim] operator[SEP] {
Keyword[return] operator[SEP] identifier[_dim] operator[==] Other[0] operator[?] operator[SEP] identifier[globalSize_0] operator[/] identifier[localSize_0] operator[SEP] operator[:] operator[SEP] id... |
public boolean decompose(DMatrixRMaj mat , int indexStart , int n ) {
double m[] = mat.data;
double el_ii;
double div_el_ii=0;
for( int i = 0; i < n; i++ ) {
for( int j = i; j < n; j++ ) {
double sum = m[indexStart+i*mat.numCols+j];
int iEl ... | class class_name[name] begin[{]
method[decompose, return_type[type[boolean]], modifier[public], parameter[mat, indexStart, n]] begin[{]
local_variable[type[double], m]
local_variable[type[double], el_ii]
local_variable[type[double], div_el_ii]
ForStatement(body=BlockStatement(la... | Keyword[public] Keyword[boolean] identifier[decompose] operator[SEP] identifier[DMatrixRMaj] identifier[mat] , Keyword[int] identifier[indexStart] , Keyword[int] identifier[n] operator[SEP] {
Keyword[double] identifier[m] operator[SEP] operator[SEP] operator[=] identifier[mat] operator[SEP] identifier[data] op... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.