code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
private void denyAccess(HttpServletResponse response, String message)
throws IOException {
StringBuilder sb = new StringBuilder();
sb.append("Fedora: 403 ").append(message.toUpperCase());
response.reset();
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
respons... | class class_name[name] begin[{]
method[denyAccess, return_type[void], modifier[private], parameter[response, message]] begin[{]
local_variable[type[StringBuilder], sb]
call[sb.append, parameter[literal["Fedora: 403 "]]]
call[response.reset, parameter[]]
c... | Keyword[private] Keyword[void] identifier[denyAccess] operator[SEP] identifier[HttpServletResponse] identifier[response] , identifier[String] identifier[message] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] op... |
public Observable<ServiceResponse<SpellCheck>> spellCheckerWithServiceResponseAsync(String text, SpellCheckerOptionalParameter spellCheckerOptionalParameter) {
if (text == null) {
throw new IllegalArgumentException("Parameter text is required and cannot be null.");
}
final String acc... | class class_name[name] begin[{]
method[spellCheckerWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[text, spellCheckerOptionalParameter]] begin[{]
if[binary_operation[member[.text], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreat... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[SpellCheck] operator[>] operator[>] identifier[spellCheckerWithServiceResponseAsync] operator[SEP] identifier[String] identifier[text] , identifier[SpellCheckerOptionalParameter] identifier[spellCheckerOptionalParamet... |
public static Expression distinct(Val<Expression>[] args) {
boolean dis = true;
if (args.length > 1) {
Object o = args[0].object();
if (o instanceof Boolean || o instanceof BigDecimal) {
dis = args[0].bool();
}
}
return new DistinctExpr... | class class_name[name] begin[{]
method[distinct, return_type[type[Expression]], modifier[public static], parameter[args]] begin[{]
local_variable[type[boolean], dis]
if[binary_operation[member[args.length], >, literal[1]]] begin[{]
local_variable[type[Object], o]
... | Keyword[public] Keyword[static] identifier[Expression] identifier[distinct] operator[SEP] identifier[Val] operator[<] identifier[Expression] operator[>] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
Keyword[boolean] identifier[dis] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SE... |
@EventListener
public void handleCasTicketGrantingTicketCreatedEvent(final CasTicketGrantingTicketCreatedEvent event) {
if (this.casEventRepository != null) {
val dto = prepareCasEvent(event);
dto.setCreationTime(event.getTicketGrantingTicket().getCreationTime().toString());
... | class class_name[name] begin[{]
method[handleCasTicketGrantingTicketCreatedEvent, return_type[void], modifier[public], parameter[event]] begin[{]
if[binary_operation[THIS[member[None.casEventRepository]], !=, literal[null]]] begin[{]
local_variable[type[val], dto]
... | annotation[@] identifier[EventListener] Keyword[public] Keyword[void] identifier[handleCasTicketGrantingTicketCreatedEvent] operator[SEP] Keyword[final] identifier[CasTicketGrantingTicketCreatedEvent] identifier[event] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[casEventRepos... |
public <E> List<E> findByQuery(Class<E> entityClass, EntityMetadata metadata, Filter f, Queue filterClausequeue,
String... columns)
{
EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClass);
List<String> relationNames = entityMetadata.getRel... | class class_name[name] begin[{]
method[findByQuery, return_type[type[List]], modifier[public], parameter[entityClass, metadata, f, filterClausequeue, columns]] begin[{]
local_variable[type[EntityMetadata], entityMetadata]
local_variable[type[List], relationNames]
local_variable[type[Str... | Keyword[public] operator[<] identifier[E] operator[>] identifier[List] operator[<] identifier[E] operator[>] identifier[findByQuery] operator[SEP] identifier[Class] operator[<] identifier[E] operator[>] identifier[entityClass] , identifier[EntityMetadata] identifier[metadata] , identifier[Filter] identifier[f] , ide... |
@Override
public void start() {
initLogger();
final String resourceName = StringUtil.replaceChar(JoyPaths.class.getName(), '.', '/') + ".class";
URL url = ClassLoaderUtil.getResourceUrl(resourceName);
if (url == null) {
throw new JoyException("Failed to resolve app dir, missing: " + resourceName);
}
... | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[]] begin[{]
call[.initLogger, parameter[]]
local_variable[type[String], resourceName]
local_variable[type[URL], url]
if[binary_operation[member[.url], ==, literal[null]]]... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[start] operator[SEP] operator[SEP] {
identifier[initLogger] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[resourceName] operator[=] identifier[StringUtil] operator[SEP] identifier[replaceChar] ope... |
public static boolean isEmpty(List<? extends IBase> theElements) {
if (theElements == null) {
return true;
}
for (int i = 0; i < theElements.size(); i++) {
IBase next;
try {
next = theElements.get(i);
} catch (ClassCastException e) {
List<?> elements = theElements;
String s = "Found instan... | class class_name[name] begin[{]
method[isEmpty, return_type[type[boolean]], modifier[public static], parameter[theElements]] begin[{]
if[binary_operation[member[.theElements], ==, literal[null]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
ForSta... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isEmpty] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[IBase] operator[>] identifier[theElements] operator[SEP] {
Keyword[if] operator[SEP] identifier[theElements] operator[==] Other[null] operator[SEP] {
... |
@Override
public UpdateApplicationResourceLifecycleResult updateApplicationResourceLifecycle(UpdateApplicationResourceLifecycleRequest request) {
request = beforeClientExecution(request);
return executeUpdateApplicationResourceLifecycle(request);
} | class class_name[name] begin[{]
method[updateApplicationResourceLifecycle, return_type[type[UpdateApplicationResourceLifecycleResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.execute... | annotation[@] identifier[Override] Keyword[public] identifier[UpdateApplicationResourceLifecycleResult] identifier[updateApplicationResourceLifecycle] operator[SEP] identifier[UpdateApplicationResourceLifecycleRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExe... |
public boolean isAllowed(File path, boolean write, boolean configReadOnly) throws IOException {
try {
if (configReadOnly && write) return false;
if (config.isRestrictedBrowsing()) {
if (null != config.getRestrictedPaths() && null != path) {
for (String restricedPath : config.getRestrictedPaths()) ... | class class_name[name] begin[{]
method[isAllowed, return_type[type[boolean]], modifier[public], parameter[path, write, configReadOnly]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=configReadOnly, postfix_operators=[], prefix_operators=[], qualifier... | Keyword[public] Keyword[boolean] identifier[isAllowed] operator[SEP] identifier[File] identifier[path] , Keyword[boolean] identifier[write] , Keyword[boolean] identifier[configReadOnly] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[config... |
public static void premain(String options, Instrumentation instrumentation) {
// Load options.
Config.loadConfig(options, false);
if (Config.X_ENABLED_V) {
// Initialize instrumentation instance according to the
// given mode.
initializeMode(instrumentation);... | class class_name[name] begin[{]
method[premain, return_type[void], modifier[public static], parameter[options, instrumentation]] begin[{]
call[Config.loadConfig, parameter[member[.options], literal[false]]]
if[member[Config.X_ENABLED_V]] begin[{]
call[.in... | Keyword[public] Keyword[static] Keyword[void] identifier[premain] operator[SEP] identifier[String] identifier[options] , identifier[Instrumentation] identifier[instrumentation] operator[SEP] {
identifier[Config] operator[SEP] identifier[loadConfig] operator[SEP] identifier[options] , literal[boolean] operator[... |
public OvhMailingList domain_mailingList_name_GET(String domain, String name) throws IOException {
String qPath = "/email/domain/{domain}/mailingList/{name}";
StringBuilder sb = path(qPath, domain, name);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhMailingList.class);
} | class class_name[name] begin[{]
method[domain_mailingList_name_GET, return_type[type[OvhMailingList]], modifier[public], parameter[domain, name]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], resp]
return[call[.... | Keyword[public] identifier[OvhMailingList] identifier[domain_mailingList_name_GET] operator[SEP] identifier[String] identifier[domain] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] iden... |
public static boolean areBeansEqual( Object bean1, Object bean2 )
{
if( bean1 == bean2 )
{
return true;
}
if( bean1 == null || bean2 == null )
{
return false;
}
IType class1 = TypeLoaderAccess.instance().getIntrinsicTypeFromObject( bean1 );
IType class2 = TypeLoaderAccess... | class class_name[name] begin[{]
method[areBeansEqual, return_type[type[boolean]], modifier[public static], parameter[bean1, bean2]] begin[{]
if[binary_operation[member[.bean1], ==, member[.bean2]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[areBeansEqual] operator[SEP] identifier[Object] identifier[bean1] , identifier[Object] identifier[bean2] operator[SEP] {
Keyword[if] operator[SEP] identifier[bean1] operator[==] identifier[bean2] operator[SEP] {
Keyword[return] literal[boole... |
public static Object growArrayToAtLeast(Object arr, int minLen)
{
if (arr == null) {
throw new IllegalArgumentException(NO_TYPE);
}
Object old = arr;
int oldLen = Array.getLength(arr);
int newLen = oldLen + ((oldLen + 1) >> 1);
if (newLen < minLen) {
... | class class_name[name] begin[{]
method[growArrayToAtLeast, return_type[type[Object]], modifier[public static], parameter[arr, minLen]] begin[{]
if[binary_operation[member[.arr], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=NO_... | Keyword[public] Keyword[static] identifier[Object] identifier[growArrayToAtLeast] operator[SEP] identifier[Object] identifier[arr] , Keyword[int] identifier[minLen] operator[SEP] {
Keyword[if] operator[SEP] identifier[arr] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifie... |
protected static boolean addMatchResult(int limit,
List results,
String pattern,
Object value,
int[] positions,
... | class class_name[name] begin[{]
method[addMatchResult, return_type[type[boolean]], modifier[static protected], parameter[limit, results, pattern, value, positions, len]] begin[{]
local_variable[type[int], size]
if[binary_operation[member[.size], <, member[.limit]]] begin[{]
... | Keyword[protected] Keyword[static] Keyword[boolean] identifier[addMatchResult] operator[SEP] Keyword[int] identifier[limit] , identifier[List] identifier[results] , identifier[String] identifier[pattern] , identifier[Object] identifier[value] , Keyword[int] operator[SEP] operator[SEP] identifier[positions] , Keywo... |
public ServiceFuture<SharedAccessAuthorizationRuleResourceInner> createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, SharedAccessAuthorizationRuleProperties properties, final ServiceCallback<SharedAccessAuthorizationRuleResourceI... | class class_name[name] begin[{]
method[createOrUpdateAuthorizationRuleAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, properties, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, paramet... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[SharedAccessAuthorizationRuleResourceInner] operator[>] identifier[createOrUpdateAuthorizationRuleAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[namespaceName] , identifier[String] identifier[notifi... |
public Cursor<MultiDataPoint> readMultiDataPoints(Filter filter, Interval interval, DateTimeZone timezone, Rollup rollup, Interpolation interpolation) {
checkNotNull(filter);
checkNotNull(interval);
checkNotNull(timezone);
URI uri = null;
try {
URIBuilder builder = new URIBuilder(String.forma... | class class_name[name] begin[{]
method[readMultiDataPoints, return_type[type[Cursor]], modifier[public], parameter[filter, interval, timezone, rollup, interpolation]] begin[{]
call[.checkNotNull, parameter[member[.filter]]]
call[.checkNotNull, parameter[member[.interval]]]
... | Keyword[public] identifier[Cursor] operator[<] identifier[MultiDataPoint] operator[>] identifier[readMultiDataPoints] operator[SEP] identifier[Filter] identifier[filter] , identifier[Interval] identifier[interval] , identifier[DateTimeZone] identifier[timezone] , identifier[Rollup] identifier[rollup] , identifier[I... |
public IntTrie compactToTrieWithRowIndexes() {
PVecToTrieCompactHandler compactor = new PVecToTrieCompactHandler();
compact(compactor);
return compactor.builder.serialize(new DefaultGetFoldedValue(
compactor.builder), new DefaultGetFoldingOffset());
} | class class_name[name] begin[{]
method[compactToTrieWithRowIndexes, return_type[type[IntTrie]], modifier[public], parameter[]] begin[{]
local_variable[type[PVecToTrieCompactHandler], compactor]
call[.compact, parameter[member[.compactor]]]
return[call[compactor.builder.serialize... | Keyword[public] identifier[IntTrie] identifier[compactToTrieWithRowIndexes] operator[SEP] operator[SEP] {
identifier[PVecToTrieCompactHandler] identifier[compactor] operator[=] Keyword[new] identifier[PVecToTrieCompactHandler] operator[SEP] operator[SEP] operator[SEP] identifier[compact] operator[SEP] identifier... |
public I_CmsPrincipal lookupPrincipal(CmsRequestContext context, String principalName) {
CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
I_CmsPrincipal result = null;
try {
result = m_driverManager.lookupPrincipal(dbc, CmsOrganizationalUnit.removeLeadingSeparator(princi... | class class_name[name] begin[{]
method[lookupPrincipal, return_type[type[I_CmsPrincipal]], modifier[public], parameter[context, principalName]] begin[{]
local_variable[type[CmsDbContext], dbc]
local_variable[type[I_CmsPrincipal], result]
TryStatement(block=[StatementExpression(expressio... | Keyword[public] identifier[I_CmsPrincipal] identifier[lookupPrincipal] operator[SEP] identifier[CmsRequestContext] identifier[context] , identifier[String] identifier[principalName] operator[SEP] {
identifier[CmsDbContext] identifier[dbc] operator[=] identifier[m_dbContextFactory] operator[SEP] identifier[getDb... |
protected Boolean _hasPermission(@Nonnull Authentication a, Permission permission) {
// ACL entries for this principal takes precedence
Boolean b = hasPermission(new PrincipalSid(a),permission);
if(LOGGER.isLoggable(FINER))
LOGGER.finer("hasPermission(PrincipalSID:"+a.getPrincipal()+... | class class_name[name] begin[{]
method[_hasPermission, return_type[type[Boolean]], modifier[protected], parameter[a, permission]] begin[{]
local_variable[type[Boolean], b]
if[call[LOGGER.isLoggable, parameter[member[.FINER]]]] begin[{]
call[LOGGER.finer, parameter[binary_ope... | Keyword[protected] identifier[Boolean] identifier[_hasPermission] operator[SEP] annotation[@] identifier[Nonnull] identifier[Authentication] identifier[a] , identifier[Permission] identifier[permission] operator[SEP] {
identifier[Boolean] identifier[b] operator[=] identifier[hasPermission] operator[SEP] Keyword... |
@Fix(SyntaxIssueCodes.USED_RESERVED_KEYWORD)
public void fixNoViableAlternativeAtKeyword(final Issue issue, IssueResolutionAcceptor acceptor) {
ProtectKeywordModification.accept(this, issue, acceptor);
} | class class_name[name] begin[{]
method[fixNoViableAlternativeAtKeyword, return_type[void], modifier[public], parameter[issue, acceptor]] begin[{]
call[ProtectKeywordModification.accept, parameter[THIS[], member[.issue], member[.acceptor]]]
end[}]
END[}] | annotation[@] identifier[Fix] operator[SEP] identifier[SyntaxIssueCodes] operator[SEP] identifier[USED_RESERVED_KEYWORD] operator[SEP] Keyword[public] Keyword[void] identifier[fixNoViableAlternativeAtKeyword] operator[SEP] Keyword[final] identifier[Issue] identifier[issue] , identifier[IssueResolutionAcceptor] identif... |
public void marshall(AutoScalingThresholds autoScalingThresholds, ProtocolMarshaller protocolMarshaller) {
if (autoScalingThresholds == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(autoScalingThres... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[autoScalingThresholds, protocolMarshaller]] begin[{]
if[binary_operation[member[.autoScalingThresholds], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Lit... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[AutoScalingThresholds] identifier[autoScalingThresholds] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[autoScalingThresholds] operator[==] Other[null] operator[SEP] ... |
public static CopyState getCopyState(final HttpURLConnection request) throws URISyntaxException, ParseException {
String copyStatusString = request.getHeaderField(Constants.HeaderConstants.COPY_STATUS);
if (!Utility.isNullOrEmpty(copyStatusString)) {
final CopyState copyState = new CopyState... | class class_name[name] begin[{]
method[getCopyState, return_type[type[CopyState]], modifier[public static], parameter[request]] begin[{]
local_variable[type[String], copyStatusString]
if[call[Utility.isNullOrEmpty, parameter[member[.copyStatusString]]]] begin[{]
local_variab... | Keyword[public] Keyword[static] identifier[CopyState] identifier[getCopyState] operator[SEP] Keyword[final] identifier[HttpURLConnection] identifier[request] operator[SEP] Keyword[throws] identifier[URISyntaxException] , identifier[ParseException] {
identifier[String] identifier[copyStatusString] operator[=] id... |
public static JsonToken peekToken(JsonParser par) throws IOException {
JsonToken token = par.getCurrentToken();
if (token == null || token == JsonToken.FIELD_NAME) {
token = par.nextToken();
}
return token;
} | class class_name[name] begin[{]
method[peekToken, return_type[type[JsonToken]], modifier[public static], parameter[par]] begin[{]
local_variable[type[JsonToken], token]
if[binary_operation[binary_operation[member[.token], ==, literal[null]], ||, binary_operation[member[.token], ==, memb... | Keyword[public] Keyword[static] identifier[JsonToken] identifier[peekToken] operator[SEP] identifier[JsonParser] identifier[par] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[JsonToken] identifier[token] operator[=] identifier[par] operator[SEP] identifier[getCurrentToken] operator[SEP] oper... |
public void setItems(java.util.Collection<Item> items) {
if (items == null) {
this.items = null;
return;
}
this.items = new java.util.ArrayList<Item>(items);
} | class class_name[name] begin[{]
method[setItems, return_type[void], modifier[public], parameter[items]] begin[{]
if[binary_operation[member[.items], ==, literal[null]]] begin[{]
assign[THIS[member[None.items]], literal[null]]
return[None]
else begin[{... | Keyword[public] Keyword[void] identifier[setItems] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[Item] operator[>] identifier[items] operator[SEP] {
Keyword[if] operator[SEP] identifier[items] operator[==] Other[null] operator[SEP] {
... |
public B setTitle(String title) {
if(title == null) {
title = "";
}
this.title = title;
return self();
} | class class_name[name] begin[{]
method[setTitle, return_type[type[B]], modifier[public], parameter[title]] begin[{]
if[binary_operation[member[.title], ==, literal[null]]] begin[{]
assign[member[.title], literal[""]]
else begin[{]
None
end[}]
... | Keyword[public] identifier[B] identifier[setTitle] operator[SEP] identifier[String] identifier[title] operator[SEP] {
Keyword[if] operator[SEP] identifier[title] operator[==] Other[null] operator[SEP] {
identifier[title] operator[=] literal[String] operator[SEP]
}
Keyword[this] operator[... |
public void destroy()
{
for (Socket socket : sockets) {
destroySocket(socket);
}
sockets.clear();
for (Selector selector : selectors) {
context.close(selector);
}
selectors.clear();
// Only terminate context if we are on the main thre... | class class_name[name] begin[{]
method[destroy, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=socket, postfix_operators=[], prefix_operators=[], qualif... | Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[Socket] identifier[socket] operator[:] identifier[sockets] operator[SEP] {
identifier[destroySocket] operator[SEP] identifier[socket] operator[SEP] operator[SEP]
}
ident... |
@Override
protected int handleGetYearLength(int extendedYear) {
int length =0;
if (cType == CalculationType.ISLAMIC_CIVIL
|| cType == CalculationType.ISLAMIC_TBLA
|| (cType == CalculationType.ISLAMIC_UMALQURA && (extendedYear < UMALQURA_YEAR_START || extendedYear > U... | class class_name[name] begin[{]
method[handleGetYearLength, return_type[type[int]], modifier[protected], parameter[extendedYear]] begin[{]
local_variable[type[int], length]
if[binary_operation[binary_operation[binary_operation[member[.cType], ==, member[CalculationType.ISLAMIC_CIVIL]], ... | annotation[@] identifier[Override] Keyword[protected] Keyword[int] identifier[handleGetYearLength] operator[SEP] Keyword[int] identifier[extendedYear] operator[SEP] {
Keyword[int] identifier[length] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[cType] operator[==] identifier[Calculation... |
public String convertIfcThermalLoadTypeEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
} | class class_name[name] begin[{]
method[convertIfcThermalLoadTypeEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operato... | Keyword[public] identifier[String] identifier[convertIfcThermalLoadTypeEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] {
Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] id... |
private int guessTransactionsLength() {
if (transactionBytesValid)
return payload.length - HEADER_SIZE;
if (transactions == null)
return 0;
int len = VarInt.sizeOf(transactions.size());
for (Transaction tx : transactions) {
// 255 is just a guess at an... | class class_name[name] begin[{]
method[guessTransactionsLength, return_type[type[int]], modifier[private], parameter[]] begin[{]
if[member[.transactionBytesValid]] begin[{]
return[binary_operation[member[payload.length], -, member[.HEADER_SIZE]]]
else begin[{]
None
end[}]
... | Keyword[private] Keyword[int] identifier[guessTransactionsLength] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[transactionBytesValid] operator[SEP] Keyword[return] identifier[payload] operator[SEP] identifier[length] operator[-] identifier[HEADER_SIZE] operator[SEP] Keyword[if] operator[SEP... |
public Symbol resolveBinaryNameOrIdent(String name) {
try {
Name flatname = names.fromString(name.replace("/", "."));
return reader.loadClass(flatname);
} catch (CompletionFailure ignore) {
return resolveIdent(name);
}
} | class class_name[name] begin[{]
method[resolveBinaryNameOrIdent, return_type[type[Symbol]], modifier[public], parameter[name]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(ar... | Keyword[public] identifier[Symbol] identifier[resolveBinaryNameOrIdent] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[try] {
identifier[Name] identifier[flatname] operator[=] identifier[names] operator[SEP] identifier[fromString] operator[SEP] identifier[name] operator[SEP]... |
public Hash deleteUser(int userId) throws AuthyException {
final Response response = this.post(DELETE_USER_PATH + Integer.toString(userId), null);
return instanceFromJson(response.getStatus(), response.getBody());
} | class class_name[name] begin[{]
method[deleteUser, return_type[type[Hash]], modifier[public], parameter[userId]] begin[{]
local_variable[type[Response], response]
return[call[.instanceFromJson, parameter[call[response.getStatus, parameter[]], call[response.getBody, parameter[]]]]]
end[}]
EN... | Keyword[public] identifier[Hash] identifier[deleteUser] operator[SEP] Keyword[int] identifier[userId] operator[SEP] Keyword[throws] identifier[AuthyException] {
Keyword[final] identifier[Response] identifier[response] operator[=] Keyword[this] operator[SEP] identifier[post] operator[SEP] identifier[DELETE_USER_P... |
@Override
public EClass getServerSettings() {
if (serverSettingsEClass == null) {
serverSettingsEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI).getEClassifiers().get(9);
}
return serverSettingsEClass;
} | class class_name[name] begin[{]
method[getServerSettings, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.serverSettingsEClass], ==, literal[null]]] begin[{]
assign[member[.serverSettingsEClass], Cast(expression=MethodInvoca... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getServerSettings] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[serverSettingsEClass] operator[==] Other[null] operator[SEP] {
identifier[serverSettingsEClass] operator[=] operator[SEP] identifier[EC... |
public void checkPropertyValueOrTransition(String propertyValueOrTransition, double maxTime)
throws QTasteDataException, QTasteTestFailException {
long beginTime_ms = System.currentTimeMillis();
long maxTime_ms = Math.round(maxTime * 1000);
propertyValueOrTransition = propertyValueOrTr... | class class_name[name] begin[{]
method[checkPropertyValueOrTransition, return_type[void], modifier[public], parameter[propertyValueOrTransition, maxTime]] begin[{]
local_variable[type[long], beginTime_ms]
local_variable[type[long], maxTime_ms]
assign[member[.propertyValueOrTrans... | Keyword[public] Keyword[void] identifier[checkPropertyValueOrTransition] operator[SEP] identifier[String] identifier[propertyValueOrTransition] , Keyword[double] identifier[maxTime] operator[SEP] Keyword[throws] identifier[QTasteDataException] , identifier[QTasteTestFailException] {
Keyword[long] identifier[be... |
@Override
protected View createOverlayView() {
LinearLayout ll = new LinearLayout(getContext());
ll.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,FrameLayout.LayoutParams.MATCH_PARENT));
ll.setGravity(Gravity.CENTER);
View progressBar = createProg... | class class_name[name] begin[{]
method[createOverlayView, return_type[type[View]], modifier[protected], parameter[]] begin[{]
local_variable[type[LinearLayout], ll]
call[ll.setLayoutParams, parameter[ClassCreator(arguments=[MemberReference(member=MATCH_PARENT, postfix_operators=[], pref... | annotation[@] identifier[Override] Keyword[protected] identifier[View] identifier[createOverlayView] operator[SEP] operator[SEP] {
identifier[LinearLayout] identifier[ll] operator[=] Keyword[new] identifier[LinearLayout] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP]... |
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "quantityType")
public JAXBElement<StringOrRefType> createQuantityType(StringOrRefType value) {
return new JAXBElement<StringOrRefType>(_QuantityType_QNAME, StringOrRefType.class, null, value);
} | class class_name[name] begin[{]
method[createQuantityType, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_QuantityType_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[StringOrRefType] operator[>] identifier[createQuantityType] operator[SEP] identifier[Strin... |
@Override
public void restoreState(final FacesContext context, final Object state) {
if (state == null) {
return;
}
final Object values[] = (Object[]) state;
super.restoreState(context, values[0]);
final Object restoredSubmittedValues = values[1];
final O... | class class_name[name] begin[{]
method[restoreState, return_type[void], modifier[public], parameter[context, state]] begin[{]
if[binary_operation[member[.state], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[Object], ... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[restoreState] operator[SEP] Keyword[final] identifier[FacesContext] identifier[context] , Keyword[final] identifier[Object] identifier[state] operator[SEP] {
Keyword[if] operator[SEP] identifier[state] operator[==] Other[null] operator[... |
public void setFNMCnt(Integer newFNMCnt) {
Integer oldFNMCnt = fnmCnt;
fnmCnt = newFNMCnt;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNIRG__FNM_CNT, oldFNMCnt, fnmCnt));
} | class class_name[name] begin[{]
method[setFNMCnt, return_type[void], modifier[public], parameter[newFNMCnt]] begin[{]
local_variable[type[Integer], oldFNMCnt]
assign[member[.fnmCnt], member[.newFNMCnt]]
if[call[.eNotificationRequired, parameter[]]] begin[{]
c... | Keyword[public] Keyword[void] identifier[setFNMCnt] operator[SEP] identifier[Integer] identifier[newFNMCnt] operator[SEP] {
identifier[Integer] identifier[oldFNMCnt] operator[=] identifier[fnmCnt] operator[SEP] identifier[fnmCnt] operator[=] identifier[newFNMCnt] operator[SEP] Keyword[if] operator[SEP] identifie... |
public static ContentMatcher getInstance(String xmlFileName) {
ContentMatcher cm = new ContentMatcher();
// Load the pattern definitions from an XML file
try {
cm.loadXMLPatternDefinitions(cm.getClass().getResourceAsStream(xmlFileName));
} catch (JDOMExce... | class class_name[name] begin[{]
method[getInstance, return_type[type[ContentMatcher]], modifier[public static], parameter[xmlFileName]] begin[{]
local_variable[type[ContentMatcher], cm]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[],... | Keyword[public] Keyword[static] identifier[ContentMatcher] identifier[getInstance] operator[SEP] identifier[String] identifier[xmlFileName] operator[SEP] {
identifier[ContentMatcher] identifier[cm] operator[=] Keyword[new] identifier[ContentMatcher] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
... |
public ADDRESST unregisterParticipant(ADDRESST address, EventListener entity) {
synchronized (mutex()) {
removeListener(address);
this.participants.remove(entity.getID(), address);
}
return address;
} | class class_name[name] begin[{]
method[unregisterParticipant, return_type[type[ADDRESST]], modifier[public], parameter[address, entity]] begin[{]
SYNCHRONIZED[call[.mutex, parameter[]]] BEGIN[{]
call[.removeListener, parameter[member[.address]]]
T... | Keyword[public] identifier[ADDRESST] identifier[unregisterParticipant] operator[SEP] identifier[ADDRESST] identifier[address] , identifier[EventListener] identifier[entity] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[mutex] operator[SEP] operator[SEP] operator[SEP] {
identifier[rem... |
@Override
public ArrayList<String> calcTypeaheadMatches(String filter, int limit) {
// Get HDFS configuration
Configuration conf = PersistHdfs.CONF;
// Hack around s3://
// filter = convertS3toS3N(filter);
// Handle S3N bare buckets - s3n://bucketname should be suffixed by '/'
// or underlyin... | class class_name[name] begin[{]
method[calcTypeaheadMatches, return_type[type[ArrayList]], modifier[public], parameter[filter, limit]] begin[{]
local_variable[type[Configuration], conf]
if[call[.isBareS3NBucketWithoutTrailingSlash, parameter[member[.filter]]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[calcTypeaheadMatches] operator[SEP] identifier[String] identifier[filter] , Keyword[int] identifier[limit] operator[SEP] {
identifier[Configuration] identifier[conf] operator[=] identif... |
public static byte[] readResourceBytes(String resourceName) {
InputStream is = Util.class.getResourceAsStream(resourceName);
try {
return bytes(is);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
closeQuietly(is);
}
} | class class_name[name] begin[{]
method[readResourceBytes, return_type[type[byte]], modifier[public static], parameter[resourceName]] begin[{]
local_variable[type[InputStream], is]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=is, postfix_opera... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[readResourceBytes] operator[SEP] identifier[String] identifier[resourceName] operator[SEP] {
identifier[InputStream] identifier[is] operator[=] identifier[Util] operator[SEP] Keyword[class] operator[SEP] identifier[getResourceAs... |
public List<VirtualMachineImageResourceInner> listSkus(String location, String publisherName, String offer) {
return listSkusWithServiceResponseAsync(location, publisherName, offer).toBlocking().single().body();
} | class class_name[name] begin[{]
method[listSkus, return_type[type[List]], modifier[public], parameter[location, publisherName, offer]] begin[{]
return[call[.listSkusWithServiceResponseAsync, parameter[member[.location], member[.publisherName], member[.offer]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[VirtualMachineImageResourceInner] operator[>] identifier[listSkus] operator[SEP] identifier[String] identifier[location] , identifier[String] identifier[publisherName] , identifier[String] identifier[offer] operator[SEP] {
Keyword[return] identifier[listS... |
public void addBadValueError(final String type, final JSONValue val) throws ValidationException
{
addError(StringFormatter.format(MessageConstants.MESSAGES.invalidValueForType(), type, val));
} | class class_name[name] begin[{]
method[addBadValueError, return_type[void], modifier[public], parameter[type, val]] begin[{]
call[.addError, parameter[call[StringFormatter.format, parameter[call[MessageConstants.MESSAGES.invalidValueForType, parameter[]], member[.type], member[.val]]]]]
end... | Keyword[public] Keyword[void] identifier[addBadValueError] operator[SEP] Keyword[final] identifier[String] identifier[type] , Keyword[final] identifier[JSONValue] identifier[val] operator[SEP] Keyword[throws] identifier[ValidationException] {
identifier[addError] operator[SEP] identifier[StringFormatter] operat... |
private void addNamespace(String prefix, String uri) {
prefixToURI.put(prefix, uri);
uriToPrefix.put(uri, prefix);
} | class class_name[name] begin[{]
method[addNamespace, return_type[void], modifier[private], parameter[prefix, uri]] begin[{]
call[prefixToURI.put, parameter[member[.prefix], member[.uri]]]
call[uriToPrefix.put, parameter[member[.uri], member[.prefix]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[addNamespace] operator[SEP] identifier[String] identifier[prefix] , identifier[String] identifier[uri] operator[SEP] {
identifier[prefixToURI] operator[SEP] identifier[put] operator[SEP] identifier[prefix] , identifier[uri] operator[SEP] operator[SEP] identifier[uriToP... |
public void setNonStrokingColor (final int c, final int m, final int y, final int k) throws IOException
{
if (_isOutside255Interval (c) ||
_isOutside255Interval (m) ||
_isOutside255Interval (y) ||
_isOutside255Interval (k))
{
throw new IllegalArgumentException ("Parameters must b... | class class_name[name] begin[{]
method[setNonStrokingColor, return_type[void], modifier[public], parameter[c, m, y, k]] begin[{]
if[binary_operation[binary_operation[binary_operation[call[._isOutside255Interval, parameter[member[.c]]], ||, call[._isOutside255Interval, parameter[member[.m]]]], |... | Keyword[public] Keyword[void] identifier[setNonStrokingColor] operator[SEP] Keyword[final] Keyword[int] identifier[c] , Keyword[final] Keyword[int] identifier[m] , Keyword[final] Keyword[int] identifier[y] , Keyword[final] Keyword[int] identifier[k] operator[SEP] Keyword[throws] identifier[IOException] {
Keyw... |
@Override
public void visitCode(Code obj) {
stack.resetForMethodEntry(this);
changedAttributes.clear();
savedAttributes.clear();
super.visitCode(obj);
for (Integer pc : changedAttributes.values()) {
bugReporter.reportBug(new BugInstance(this, BugType.SCSS_SUSPICIO... | class class_name[name] begin[{]
method[visitCode, return_type[void], modifier[public], parameter[obj]] begin[{]
call[stack.resetForMethodEntry, parameter[THIS[]]]
call[changedAttributes.clear, parameter[]]
call[savedAttributes.clear, parameter[]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visitCode] operator[SEP] identifier[Code] identifier[obj] operator[SEP] {
identifier[stack] operator[SEP] identifier[resetForMethodEntry] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[changedAttributes] operator[SEP]... |
public static Set<Long> gatherLongPropertyFromJsonNodes(Iterable<JsonNode> jsonNodes, String propertyName) {
Set<Long> result = new HashSet<Long>(); // Using a Set to filter out doubles
for (JsonNode node : jsonNodes) {
if (node.has(propertyName)) {
Long propertyValue = node.get(propertyName).asLo... | class class_name[name] begin[{]
method[gatherLongPropertyFromJsonNodes, return_type[type[Set]], modifier[public static], parameter[jsonNodes, propertyName]] begin[{]
local_variable[type[Set], result]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation... | Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Long] operator[>] identifier[gatherLongPropertyFromJsonNodes] operator[SEP] identifier[Iterable] operator[<] identifier[JsonNode] operator[>] identifier[jsonNodes] , identifier[String] identifier[propertyName] operator[SEP] {
identifier[Set]... |
private void validateServiceInstanceMetadataQuery(ServiceInstanceQuery query) throws ServiceException{
if (query == null) {
throw new ServiceException(ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR,
ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR.getMessageTemplate(),
... | class class_name[name] begin[{]
method[validateServiceInstanceMetadataQuery, return_type[void], modifier[private], parameter[query]] begin[{]
if[binary_operation[member[.query], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=SER... | Keyword[private] Keyword[void] identifier[validateServiceInstanceMetadataQuery] operator[SEP] identifier[ServiceInstanceQuery] identifier[query] operator[SEP] Keyword[throws] identifier[ServiceException] {
Keyword[if] operator[SEP] identifier[query] operator[==] Other[null] operator[SEP] {
Keyword[thr... |
public Formula implication(final Formula left, final Formula right) {
if (left.type() == FALSE || right.type() == TRUE)
return this.verum();
if (left.type() == TRUE)
return right;
if (right.type() == FALSE)
return this.not(left);
if (left.equals(right))
return this.verum();
f... | class class_name[name] begin[{]
method[implication, return_type[type[Formula]], modifier[public], parameter[left, right]] begin[{]
if[binary_operation[binary_operation[call[left.type, parameter[]], ==, member[.FALSE]], ||, binary_operation[call[right.type, parameter[]], ==, member[.TRUE]]]] beg... | Keyword[public] identifier[Formula] identifier[implication] operator[SEP] Keyword[final] identifier[Formula] identifier[left] , Keyword[final] identifier[Formula] identifier[right] operator[SEP] {
Keyword[if] operator[SEP] identifier[left] operator[SEP] identifier[type] operator[SEP] operator[SEP] operator[==] ... |
public void setup(Matrix m, int[] initialAssignments, int numClusters) {
// Save the meta data we need to maintain.
assignments = initialAssignments;
matrix = new ArrayList<DoubleVector>(m.rows());
for (int i = 0; i < m.rows(); ++i)
matrix.add(m.getRowVector(i));
// ... | class class_name[name] begin[{]
method[setup, return_type[void], modifier[public], parameter[m, initialAssignments, numClusters]] begin[{]
assign[member[.assignments], member[.initialAssignments]]
assign[member[.matrix], ClassCreator(arguments=[MethodInvocation(arguments=[], mem... | Keyword[public] Keyword[void] identifier[setup] operator[SEP] identifier[Matrix] identifier[m] , Keyword[int] operator[SEP] operator[SEP] identifier[initialAssignments] , Keyword[int] identifier[numClusters] operator[SEP] {
identifier[assignments] operator[=] identifier[initialAssignments] operator[SEP] identi... |
public <TKey, TValue> LinkedHashMap<TKey, TValue> toMap(Function<? super Cursor, TKey> keyTransform, Function<? super Cursor, TValue> valueTransform) {
try {
LinkedHashMap<TKey, TValue> result = new LinkedHashMap<>(getCount(), 1);
for (moveToFirst(); !isAfterLast(); moveToNext()) {
final TKey k... | class class_name[name] begin[{]
method[toMap, return_type[type[LinkedHashMap]], modifier[public], parameter[keyTransform, valueTransform]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvoc... | Keyword[public] operator[<] identifier[TKey] , identifier[TValue] operator[>] identifier[LinkedHashMap] operator[<] identifier[TKey] , identifier[TValue] operator[>] identifier[toMap] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[Cursor] , identifier[TKey] operator[>] identifie... |
public boolean functionAvailable(String ns, String funcName)
throws javax.xml.transform.TransformerException
{
boolean isAvailable = false;
if (null != ns)
{
ExtensionHandler extNS =
(ExtensionHandler) m_extensionFunctionNamespaces.get(ns);
if (extNS != null)
... | class class_name[name] begin[{]
method[functionAvailable, return_type[type[boolean]], modifier[public], parameter[ns, funcName]] begin[{]
local_variable[type[boolean], isAvailable]
if[binary_operation[literal[null], !=, member[.ns]]] begin[{]
local_variable[type[ExtensionHan... | Keyword[public] Keyword[boolean] identifier[functionAvailable] operator[SEP] identifier[String] identifier[ns] , identifier[String] identifier[funcName] operator[SEP] Keyword[throws] identifier[javax] operator[SEP] identifier[xml] operator[SEP] identifier[transform] operator[SEP] identifier[TransformerException] {
... |
public @Nullable ScriptType getScriptType() {
if (ScriptPattern.isP2PKH(this))
return ScriptType.P2PKH;
if (ScriptPattern.isP2PK(this))
return ScriptType.P2PK;
if (ScriptPattern.isP2SH(this))
return ScriptType.P2SH;
if (ScriptPattern.isP2WPKH(this))
... | class class_name[name] begin[{]
method[getScriptType, return_type[type[ScriptType]], modifier[public], parameter[]] begin[{]
if[call[ScriptPattern.isP2PKH, parameter[THIS[]]]] begin[{]
return[member[ScriptType.P2PKH]]
else begin[{]
None
end[}]
if[call[ScriptPatte... | Keyword[public] annotation[@] identifier[Nullable] identifier[ScriptType] identifier[getScriptType] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ScriptPattern] operator[SEP] identifier[isP2PKH] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[return] identifier[ScriptType] op... |
@Override
public FilterSupportStatus isFilterSupported(
FilterAdapterContext context,
FamilyFilter filter) {
ByteArrayComparable comparator = filter.getComparator();
if (!(comparator instanceof RegexStringComparator) && !(comparator instanceof BinaryComparator)) {
return FilterSupportStatus.... | class class_name[name] begin[{]
method[isFilterSupported, return_type[type[FilterSupportStatus]], modifier[public], parameter[context, filter]] begin[{]
local_variable[type[ByteArrayComparable], comparator]
if[binary_operation[binary_operation[member[.comparator], instanceof, type[Regex... | annotation[@] identifier[Override] Keyword[public] identifier[FilterSupportStatus] identifier[isFilterSupported] operator[SEP] identifier[FilterAdapterContext] identifier[context] , identifier[FamilyFilter] identifier[filter] operator[SEP] {
identifier[ByteArrayComparable] identifier[comparator] operator[=] ide... |
@Override
public Map<String, AbstractPolicy> getPolicies(EvaluationCtx eval, PolicyFinder policyFinder)
throws PolicyIndexException {
long a = 0;
long b = 0;
long total = 0;
Map<String, AbstractPolicy> documents = new HashMap<String, AbstractPolicy>();
XmlQueryE... | class class_name[name] begin[{]
method[getPolicies, return_type[type[Map]], modifier[public], parameter[eval, policyFinder]] begin[{]
local_variable[type[long], a]
local_variable[type[long], b]
local_variable[type[long], total]
local_variable[type[Map], documents]
local_... | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[AbstractPolicy] operator[>] identifier[getPolicies] operator[SEP] identifier[EvaluationCtx] identifier[eval] , identifier[PolicyFinder] identifier[policyFinder] operator[SEP] Keyword[throws] identifier[Polic... |
private static int js_lastIndexOf(String target, Object[] args) {
String search = ScriptRuntime.toString(args, 0);
double end = ScriptRuntime.toNumber(args, 1);
if (end != end || end > target.length())
end = target.length();
else if (end < 0)
end = 0;
re... | class class_name[name] begin[{]
method[js_lastIndexOf, return_type[type[int]], modifier[private static], parameter[target, args]] begin[{]
local_variable[type[String], search]
local_variable[type[double], end]
if[binary_operation[binary_operation[member[.end], !=, member[.end]],... | Keyword[private] Keyword[static] Keyword[int] identifier[js_lastIndexOf] operator[SEP] identifier[String] identifier[target] , identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
identifier[String] identifier[search] operator[=] identifier[ScriptRuntime] operator[SEP] identifier[toSt... |
public static Set<Collection<Node>> requiredNodePart(Model mo, JSONObject o, String id) throws JSONConverterException {
Set<Collection<Node>> nodes = new HashSet<>();
Object x = o.get(id);
if (!(x instanceof JSONArray)) {
throw new JSONConverterException("Set of identifiers sets expe... | class class_name[name] begin[{]
method[requiredNodePart, return_type[type[Set]], modifier[public static], parameter[mo, o, id]] begin[{]
local_variable[type[Set], nodes]
local_variable[type[Object], x]
if[binary_operation[member[.x], instanceof, type[JSONArray]]] begin[{]
... | Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Collection] operator[<] identifier[Node] operator[>] operator[>] identifier[requiredNodePart] operator[SEP] identifier[Model] identifier[mo] , identifier[JSONObject] identifier[o] , identifier[String] identifier[id] operator[SEP] Keyword[throws] i... |
private String installPhp() {
log.debug("Installing PHP v", new Object[]{getEntity().getPhpVersion()});
if (getEntity().getPhpVersion().equals("5.4")) {
return instalPhp54v();
} else {
return installPhpSuggestedVersionByDefault();
}
} | class class_name[name] begin[{]
method[installPhp, return_type[type[String]], modifier[private], parameter[]] begin[{]
call[log.debug, parameter[literal["Installing PHP v"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getEntit... | Keyword[private] identifier[String] identifier[installPhp] operator[SEP] operator[SEP] {
identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] {
identifier[getEntity] operator[SEP] operator[SEP] operator[SEP] identi... |
public Response post(Object object) {
assertNotEmpty(object, "object");
HttpResponse response = null;
try {
URI uri = buildUri(getDBUri()).build();
response = post(uri, getGson().toJson(object));
return getResponse(response);
} finally {
close(response);
}
} | class class_name[name] begin[{]
method[post, return_type[type[Response]], modifier[public], parameter[object]] begin[{]
call[.assertNotEmpty, parameter[member[.object], literal["object"]]]
local_variable[type[HttpResponse], response]
TryStatement(block=[LocalVariableDeclaration(... | Keyword[public] identifier[Response] identifier[post] operator[SEP] identifier[Object] identifier[object] operator[SEP] {
identifier[assertNotEmpty] operator[SEP] identifier[object] , literal[String] operator[SEP] operator[SEP] identifier[HttpResponse] identifier[response] operator[=] Other[null] operator[SEP] ... |
public List<String> getHelp() {
List<String> out = new ArrayList<>();
if (helpAppVersion != null) {
out.add(helpAppVersion);
}
if (helpAppExample != null) {
out.add(helpAppExample);
}
if (helpAppVersion != null || helpAppExample != null) {
out.add(""); // new line
}
// find longest optio... | class class_name[name] begin[{]
method[getHelp, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], out]
if[binary_operation[member[.helpAppVersion], !=, literal[null]]] begin[{]
call[out.add, parameter[member[.helpAppVersi... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getHelp] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[out] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP... |
private void stop(Attributes attributes) throws SVGParseException
{
debug("<stop>");
if (currentElement == null)
throw new SVGParseException("Invalid document. Root element must be <svg>");
if (!(currentElement instanceof SVG.GradientElement))
throw new SVGParseException(... | class class_name[name] begin[{]
method[stop, return_type[void], modifier[private], parameter[attributes]] begin[{]
call[.debug, parameter[literal["<stop>"]]]
if[binary_operation[member[.currentElement], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argument... | Keyword[private] Keyword[void] identifier[stop] operator[SEP] identifier[Attributes] identifier[attributes] operator[SEP] Keyword[throws] identifier[SVGParseException] {
identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentElement] operator[==] O... |
protected void adoptSubWidgets(Element root) {
GQuery children = $(root).children();
for (Element child : children.elements()) {
Widget w = $(child).widget();
if (w != null) {
doAdopt(w);
} else {
adoptSubWidgets(child);
}
}
} | class class_name[name] begin[{]
method[adoptSubWidgets, return_type[void], modifier[protected], parameter[root]] begin[{]
local_variable[type[GQuery], children]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dime... | Keyword[protected] Keyword[void] identifier[adoptSubWidgets] operator[SEP] identifier[Element] identifier[root] operator[SEP] {
identifier[GQuery] identifier[children] operator[=] identifier[$] operator[SEP] identifier[root] operator[SEP] operator[SEP] identifier[children] operator[SEP] operator[SEP] operator[SE... |
public void setImageService(
com.liferay.portal.kernel.service.ImageService imageService) {
this.imageService = imageService;
} | class class_name[name] begin[{]
method[setImageService, return_type[void], modifier[public], parameter[imageService]] begin[{]
assign[THIS[member[None.imageService]], member[.imageService]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setImageService] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[portal] operator[SEP] identifier[kernel] operator[SEP] identifier[service] operator[SEP] identifier[ImageService] identifier[imageService] operator[SEP] {
Keyword[thi... |
@XmlElementDecl(namespace = "http://www.w3.org/1998/Math/MathML", name = "exp")
public JAXBElement<ElementaryFunctionsType> createExp(ElementaryFunctionsType value) {
return new JAXBElement<ElementaryFunctionsType>(_Exp_QNAME, ElementaryFunctionsType.class, null, value);
} | class class_name[name] begin[{]
method[createExp, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_Exp_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], pre... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[ElementaryFunctionsType] operator[>] identifier[createExp] operator[SEP] identifier[Elemen... |
@Deprecated
@Override
public GenericQueueMessage<ID, DATA> qOriginalTimestamp(Date timestamp) {
setTimestamp(timestamp);
return this;
} | class class_name[name] begin[{]
method[qOriginalTimestamp, return_type[type[GenericQueueMessage]], modifier[public], parameter[timestamp]] begin[{]
call[.setTimestamp, parameter[member[.timestamp]]]
return[THIS[]]
end[}]
END[}] | annotation[@] identifier[Deprecated] annotation[@] identifier[Override] Keyword[public] identifier[GenericQueueMessage] operator[<] identifier[ID] , identifier[DATA] operator[>] identifier[qOriginalTimestamp] operator[SEP] identifier[Date] identifier[timestamp] operator[SEP] {
identifier[setTimestamp] operator[... |
@Close
public void close() {
DatastoreConnection con = getDatastoreConnections().poll();
if (con != null) {
logger.info("Closing dictionary: {}", this);
con.close();
}
} | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[DatastoreConnection], con]
if[binary_operation[member[.con], !=, literal[null]]] begin[{]
call[logger.info, parameter[literal["Closing dic... | annotation[@] identifier[Close] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] {
identifier[DatastoreConnection] identifier[con] operator[=] identifier[getDatastoreConnections] operator[SEP] operator[SEP] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] Keywor... |
void formatWeekday(StringBuilder b, ZonedDateTime d, int width, FieldVariants weekdays) {
int weekday = d.getDayOfWeek().getValue() % 7;
switch (width) {
case 6:
b.append(weekdays.short_[weekday]);
break;
case 5:
b.append(weekdays.narrow[weekday]);
break;
case... | class class_name[name] begin[{]
method[formatWeekday, return_type[void], modifier[default], parameter[b, d, width, weekdays]] begin[{]
local_variable[type[int], weekday]
SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors... | Keyword[void] identifier[formatWeekday] operator[SEP] identifier[StringBuilder] identifier[b] , identifier[ZonedDateTime] identifier[d] , Keyword[int] identifier[width] , identifier[FieldVariants] identifier[weekdays] operator[SEP] {
Keyword[int] identifier[weekday] operator[=] identifier[d] operator[SEP] ide... |
public boolean addSubPanels(Container parent, int options)
{
if (parent == null)
parent = m_parent;
String strScreen = this.getProperty(Params.SCREEN);
JBasePanel baseScreen = (JBasePanel)ClassServiceUtility.getClassService().makeObjectFromClassName(strScreen);
if (baseSc... | class class_name[name] begin[{]
method[addSubPanels, return_type[type[boolean]], modifier[public], parameter[parent, options]] begin[{]
if[binary_operation[member[.parent], ==, literal[null]]] begin[{]
assign[member[.parent], member[.m_parent]]
else begin[{]
None
end... | Keyword[public] Keyword[boolean] identifier[addSubPanels] operator[SEP] identifier[Container] identifier[parent] , Keyword[int] identifier[options] operator[SEP] {
Keyword[if] operator[SEP] identifier[parent] operator[==] Other[null] operator[SEP] identifier[parent] operator[=] identifier[m_parent] operator[SEP... |
private <T> Provider<T> createProvider(Key<T> key)
{
Class<T> type = (Class<T>) key.rawClass();
if (Provider.class.equals(type)) {
TypeRef subType = TypeRef.of(key.type()).to(Provider.class).param(0);
Key<Object> subkey = Key.of(subType.type(), key.annotationTypes());
return (Provider) ne... | class class_name[name] begin[{]
method[createProvider, return_type[type[Provider]], modifier[private], parameter[key]] begin[{]
local_variable[type[Class], type]
if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReferen... | Keyword[private] operator[<] identifier[T] operator[>] identifier[Provider] operator[<] identifier[T] operator[>] identifier[createProvider] operator[SEP] identifier[Key] operator[<] identifier[T] operator[>] identifier[key] operator[SEP] {
identifier[Class] operator[<] identifier[T] operator[>] identifier[type]... |
private Path getOrGenerateSchemaFile(Schema schema) throws IOException {
Preconditions.checkNotNull(schema, "Avro Schema should not be null");
String hashedSchema = Hashing.sha256().hashString(schema.toString(), StandardCharsets.UTF_8).toString();
if (!this.schemaPaths.containsKey(hashedSchema)) {
... | class class_name[name] begin[{]
method[getOrGenerateSchemaFile, return_type[type[Path]], modifier[private], parameter[schema]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.schema], literal["Avro Schema should not be null"]]]
local_variable[type[String], hashedSchema]
... | Keyword[private] identifier[Path] identifier[getOrGenerateSchemaFile] operator[SEP] identifier[Schema] identifier[schema] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[schema] , literal[String] operator[SEP] oper... |
boolean saveOptions() {
//Enable history?
boolean enabled = ((ComboBoxVersionsBean)m_numberVersions.getValue()).getValue() != CmsFileHistoryApp.NUMBER_VERSIONS_DISABLED;
//Maximal count of versions for current resources.
int versions = ((ComboBoxVersionsBean)m_numberVersions.getValue()... | class class_name[name] begin[{]
method[saveOptions, return_type[type[boolean]], modifier[default], parameter[]] begin[{]
local_variable[type[boolean], enabled]
local_variable[type[int], versions]
local_variable[type[int], versionsDeleted]
if[call[m_mode.getValue, paramet... | Keyword[boolean] identifier[saveOptions] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[enabled] operator[=] operator[SEP] operator[SEP] identifier[ComboBoxVersionsBean] operator[SEP] identifier[m_numberVersions] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP... |
public long getLong() {
long v = 0;
v |= ((getByte() & 0xFFL) << 56);
v |= ((getByte() & 0xFFL) << 48);
v |= ((getByte() & 0xFFL) << 40);
v |= ((getByte() & 0xFFL) << 32);
v |= ((getByte() & 0xFFL) << 24);
v |= ((getByte() & 0xFFL) << 16);
v |= ((getByte() & 0xFFL) << 8);
v |= (getByte() & 0xFFL);
r... | class class_name[name] begin[{]
method[getLong, return_type[type[long]], modifier[public], parameter[]] begin[{]
local_variable[type[long], v]
assign[member[.v], binary_operation[binary_operation[call[.getByte, parameter[]], &, literal[0xFFL]], <<, literal[56]]]
assign[m... | Keyword[public] Keyword[long] identifier[getLong] operator[SEP] operator[SEP] {
Keyword[long] identifier[v] operator[=] Other[0] operator[SEP] identifier[v] operator[|=] operator[SEP] operator[SEP] identifier[getByte] operator[SEP] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[56] o... |
public static <T, U extends Comparable<? super U>> Collector<T, ?, Seq<T>> maxAllBy(Function<? super T, ? extends U> function) {
return maxAllBy(function, naturalOrder());
} | class class_name[name] begin[{]
method[maxAllBy, return_type[type[Collector]], modifier[public static], parameter[function]] begin[{]
return[call[.maxAllBy, parameter[member[.function], call[.naturalOrder, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[U] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[U] operator[>] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[Seq] operator[<] identifier[T] operator[>] operator... |
public void setOVLname(String newOVLname) {
String oldOVLname = ovLname;
ovLname = newOVLname;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.MMORG__OV_LNAME, oldOVLname, ovLname));
} | class class_name[name] begin[{]
method[setOVLname, return_type[void], modifier[public], parameter[newOVLname]] begin[{]
local_variable[type[String], oldOVLname]
assign[member[.ovLname], member[.newOVLname]]
if[call[.eNotificationRequired, parameter[]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setOVLname] operator[SEP] identifier[String] identifier[newOVLname] operator[SEP] {
identifier[String] identifier[oldOVLname] operator[=] identifier[ovLname] operator[SEP] identifier[ovLname] operator[=] identifier[newOVLname] operator[SEP] Keyword[if] operator[SEP] ident... |
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:50:55+02:00", comments = "JAXB RI v2.2.11")
public void setGebiete(LageGebiet.Gebiete value) {
this.gebiete = value;
} | class class_name[name] begin[{]
method[setGebiete, return_type[void], modifier[public], parameter[value]] begin[{]
assign[THIS[member[None.gebiete]], member[.value]]
end[}]
END[}] | annotation[@] identifier[Generated] operator[SEP] identifier[value] operator[=] literal[String] , identifier[date] operator[=] literal[String] , identifier[comments] operator[=] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setGebiete] operator[SEP] identifier[LageGebiet] operator[SEP] identi... |
@Override
public Map<URI, MatchResult> findOperationsClassifiedBySome(Set<URI> modelReferences) {
return findServicesClassifiedBySome(modelReferences, LogicConceptMatchType.Subsume);
} | class class_name[name] begin[{]
method[findOperationsClassifiedBySome, return_type[type[Map]], modifier[public], parameter[modelReferences]] begin[{]
return[call[.findServicesClassifiedBySome, parameter[member[.modelReferences], member[LogicConceptMatchType.Subsume]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[URI] , identifier[MatchResult] operator[>] identifier[findOperationsClassifiedBySome] operator[SEP] identifier[Set] operator[<] identifier[URI] operator[>] identifier[modelReferences] operator[SEP] {
Keyword[return] identi... |
public static ServiceName moduleSpecServiceName(ModuleIdentifier identifier) {
if (!isDynamicModule(identifier)) {
throw ServerLogger.ROOT_LOGGER.missingModulePrefix(identifier, MODULE_PREFIX);
}
return MODULE_SPEC_SERVICE_PREFIX.append(identifier.getName()).append(identifier.getSlot... | class class_name[name] begin[{]
method[moduleSpecServiceName, return_type[type[ServiceName]], modifier[public static], parameter[identifier]] begin[{]
if[call[.isDynamicModule, parameter[member[.identifier]]]] begin[{]
ThrowStatement(expression=MethodInvocation(arguments=[MemberRefe... | Keyword[public] Keyword[static] identifier[ServiceName] identifier[moduleSpecServiceName] operator[SEP] identifier[ModuleIdentifier] identifier[identifier] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[isDynamicModule] operator[SEP] identifier[identifier] operator[SEP] operator[SEP] {
... |
public OvhTask billingAccount_fax_serviceName_settings_sendFax_POST(String billingAccount, String serviceName, Date dateSchedule, String pdfUrl, String[] recipients) throws IOException {
String qPath = "/telephony/{billingAccount}/fax/{serviceName}/settings/sendFax";
StringBuilder sb = path(qPath, billingAccount, s... | class class_name[name] begin[{]
method[billingAccount_fax_serviceName_settings_sendFax_POST, return_type[type[OvhTask]], modifier[public], parameter[billingAccount, serviceName, dateSchedule, pdfUrl, recipients]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], s... | Keyword[public] identifier[OvhTask] identifier[billingAccount_fax_serviceName_settings_sendFax_POST] operator[SEP] identifier[String] identifier[billingAccount] , identifier[String] identifier[serviceName] , identifier[Date] identifier[dateSchedule] , identifier[String] identifier[pdfUrl] , identifier[String] opera... |
public MonetaryAmountFactory getAmountFactory(MonetaryAmountFactoryQuery query) {
Collection<MonetaryAmountFactory<?>> factories = getAmountFactories(query);
if (factories.isEmpty()) {
return null;
}
return factories.iterator().next();
} | class class_name[name] begin[{]
method[getAmountFactory, return_type[type[MonetaryAmountFactory]], modifier[public], parameter[query]] begin[{]
local_variable[type[Collection], factories]
if[call[factories.isEmpty, parameter[]]] begin[{]
return[literal[null]]
else be... | Keyword[public] identifier[MonetaryAmountFactory] identifier[getAmountFactory] operator[SEP] identifier[MonetaryAmountFactoryQuery] identifier[query] operator[SEP] {
identifier[Collection] operator[<] identifier[MonetaryAmountFactory] operator[<] operator[?] operator[>] operator[>] identifier[factories] operator... |
@SuppressWarnings("deprecation")
private void addLocalFiles(Path jobFileDir, String jobFileList, Configuration conf) throws IOException {
DistributedCache.createSymlink(conf);
for (String jobFile : SPLITTER.split(jobFileList)) {
Path srcJobFile = new Path(jobFile);
// DistributedCache requires abs... | class class_name[name] begin[{]
method[addLocalFiles, return_type[void], modifier[private], parameter[jobFileDir, jobFileList, conf]] begin[{]
call[DistributedCache.createSymlink, parameter[member[.conf]]]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[addLocalFiles] operator[SEP] identifier[Path] identifier[jobFileDir] , identifier[String] identifier[jobFileList] , identifier[Configuration] identifier[conf] operator[SEP] Keyword[throws] ... |
public void commit() {
for (Iterator i = listeners.iterator(); i.hasNext();) {
((CommitTriggerListener) i.next()).commit();
}
} | class class_name[name] begin[{]
method[commit, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualif... | Keyword[public] Keyword[void] identifier[commit] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[Iterator] identifier[i] operator[=] identifier[listeners] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP]... |
public V get(Map<?, V> map){
for (Object k : keys){
V v = map.get(k);
if (v != null){
return v;
}
}
return null;
} | class class_name[name] begin[{]
method[get, return_type[type[V]], modifier[public], parameter[map]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberRef... | Keyword[public] identifier[V] identifier[get] operator[SEP] identifier[Map] operator[<] operator[?] , identifier[V] operator[>] identifier[map] operator[SEP] {
Keyword[for] operator[SEP] identifier[Object] identifier[k] operator[:] identifier[keys] operator[SEP] {
identifier[V] identifier[v] operato... |
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
sessionTracker.getSession().onActivityResult(this.getActivity(), requestCode, resultCode, data);
} | class class_name[name] begin[{]
method[onActivityResult, return_type[void], modifier[public], parameter[requestCode, resultCode, data]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=requestCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberRefer... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onActivityResult] operator[SEP] Keyword[int] identifier[requestCode] , Keyword[int] identifier[resultCode] , identifier[Intent] identifier[data] operator[SEP] {
Keyword[super] operator[SEP] identifier[onActivityResult] operator[SEP] id... |
public static void transferFile(File src, File dest) throws Exception {
// 删除文件
// LOGGER.info("start to remove download file: " + ""
// + dest.getAbsolutePath());
if (dest.exists()) {
dest.delete();
}
// 转移临时下载文件至下载文件夹
FileUtils.copyFile(src, dest);... | class class_name[name] begin[{]
method[transferFile, return_type[void], modifier[public static], parameter[src, dest]] begin[{]
if[call[dest.exists, parameter[]]] begin[{]
call[dest.delete, parameter[]]
else begin[{]
None
end[}]
call[FileU... | Keyword[public] Keyword[static] Keyword[void] identifier[transferFile] operator[SEP] identifier[File] identifier[src] , identifier[File] identifier[dest] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[dest] operator[SEP] identifier[exists] operator[SEP] operator[SEP] ... |
private int maptype1_quantvals() {
int vals = (int) (Math.floor(Math.pow(entries, 1. / dim)));
// the above *should* be reliable, but we'll not assume that FP is
// ever reliable when bitstream sync is at stake; verify via integer
// means that vals really is the greatest value of dim f... | class class_name[name] begin[{]
method[maptype1_quantvals, return_type[type[int]], modifier[private], parameter[]] begin[{]
local_variable[type[int], vals]
while[literal[true]] begin[{]
local_variable[type[int], acc]
local_variable[type[int], acc1]
Fo... | Keyword[private] Keyword[int] identifier[maptype1_quantvals] operator[SEP] operator[SEP] {
Keyword[int] identifier[vals] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[Math] operator[SEP] identifier[floor] operator[SEP] identifier[Math] operator[SEP] identifier[pow] operator[SEP] i... |
public synchronized String[] getExcludedDirectories() {
slowScan();
String[] directories = new String[dirsExcluded.size()];
dirsExcluded.copyInto(directories);
return directories;
} | class class_name[name] begin[{]
method[getExcludedDirectories, return_type[type[String]], modifier[synchronized public], parameter[]] begin[{]
call[.slowScan, parameter[]]
local_variable[type[String], directories]
call[dirsExcluded.copyInto, parameter[member[.directories... | Keyword[public] Keyword[synchronized] identifier[String] operator[SEP] operator[SEP] identifier[getExcludedDirectories] operator[SEP] operator[SEP] {
identifier[slowScan] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[directories] operator[=] Keyword[new] iden... |
public static short[] unshuffleShortArray(byte[] input) throws IOException {
short[] output = new short[input.length / 2];
int numProcessed = impl.unshuffle(input, 0, 2, input.length, output, 0);
assert(numProcessed == input.length);
return output;
} | class class_name[name] begin[{]
method[unshuffleShortArray, return_type[type[short]], modifier[public static], parameter[input]] begin[{]
local_variable[type[short], output]
local_variable[type[int], numProcessed]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member... | Keyword[public] Keyword[static] Keyword[short] operator[SEP] operator[SEP] identifier[unshuffleShortArray] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[input] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[short] operator[SEP] operator[SEP] identifier[output] operator[=] Ke... |
public static <T> ArgumentProcessor<T> forType(Class<? extends T> beanType) {
return newInstance(beanType, new GnuParser());
} | class class_name[name] begin[{]
method[forType, return_type[type[ArgumentProcessor]], modifier[public static], parameter[beanType]] begin[{]
return[call[.newInstance, parameter[member[.beanType], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operato... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[ArgumentProcessor] operator[<] identifier[T] operator[>] identifier[forType] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[beanType] operator[SEP] {
Keyword[return] ide... |
public HtmlElementWriter attribute(String name, String value) {
attributes.put(name, value);
return this;
} | class class_name[name] begin[{]
method[attribute, return_type[type[HtmlElementWriter]], modifier[public], parameter[name, value]] begin[{]
call[attributes.put, parameter[member[.name], member[.value]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[HtmlElementWriter] identifier[attribute] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] {
identifier[attributes] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] Keywor... |
public Launcher decorateLauncher(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException, RunnerAbortedException {
return launcher;
} | class class_name[name] begin[{]
method[decorateLauncher, return_type[type[Launcher]], modifier[public], parameter[build, launcher, listener]] begin[{]
return[member[.launcher]]
end[}]
END[}] | Keyword[public] identifier[Launcher] identifier[decorateLauncher] operator[SEP] identifier[AbstractBuild] identifier[build] , identifier[Launcher] identifier[launcher] , identifier[BuildListener] identifier[listener] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] , identifi... |
@SuppressWarnings("rawtypes")
private void doPostConstruct(Class clazz, List<LifecycleCallback> postConstructs, Object instance) throws InjectionException {
if (!metadataComplete && clazz.getSuperclass() != null) {
doPostConstruct(clazz.getSuperclass(), postConstructs, instance);
}
... | class class_name[name] begin[{]
method[doPostConstruct, return_type[void], modifier[private], parameter[clazz, postConstructs, instance]] begin[{]
if[binary_operation[member[.metadataComplete], &&, binary_operation[call[clazz.getSuperclass, parameter[]], !=, literal[null]]]] begin[{]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[doPostConstruct] operator[SEP] identifier[Class] identifier[clazz] , identifier[List] operator[<] identifier[LifecycleCallback] operator[>] identifier[postConstructs] , identifier[Object] i... |
public static CPDefinitionLink findByCP_T_Last(long CProductId,
String type, OrderByComparator<CPDefinitionLink> orderByComparator)
throws com.liferay.commerce.product.exception.NoSuchCPDefinitionLinkException {
return getPersistence()
.findByCP_T_Last(CProductId, type, orderByComparator);
} | class class_name[name] begin[{]
method[findByCP_T_Last, return_type[type[CPDefinitionLink]], modifier[public static], parameter[CProductId, type, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CPDefinitionLink] identifier[findByCP_T_Last] operator[SEP] Keyword[long] identifier[CProductId] , identifier[String] identifier[type] , identifier[OrderByComparator] operator[<] identifier[CPDefinitionLink] operator[>] identifier[orderByComparator] operator[SEP] Keyword[thr... |
public static Object create(Class superclass, Class interfaces[], Callback callback) {
Enhancer e = new Enhancer();
e.setSuperclass(superclass);
e.setInterfaces(interfaces);
e.setCallback(callback);
return e.create();
} | class class_name[name] begin[{]
method[create, return_type[type[Object]], modifier[public static], parameter[superclass, interfaces, callback]] begin[{]
local_variable[type[Enhancer], e]
call[e.setSuperclass, parameter[member[.superclass]]]
call[e.setInterfaces, paramete... | Keyword[public] Keyword[static] identifier[Object] identifier[create] operator[SEP] identifier[Class] identifier[superclass] , identifier[Class] identifier[interfaces] operator[SEP] operator[SEP] , identifier[Callback] identifier[callback] operator[SEP] {
identifier[Enhancer] identifier[e] operator[=] Keyword[... |
Object readResolve() {
if (favorites != null) {
data = Maps.newConcurrentMap();
for (String job : favorites) {
data.put(job, true);
}
favorites = null;
}
return this;
} | class class_name[name] begin[{]
method[readResolve, return_type[type[Object]], modifier[default], parameter[]] begin[{]
if[binary_operation[member[.favorites], !=, literal[null]]] begin[{]
assign[member[.data], call[Maps.newConcurrentMap, parameter[]]]
ForSta... | identifier[Object] identifier[readResolve] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[favorites] operator[!=] Other[null] operator[SEP] {
identifier[data] operator[=] identifier[Maps] operator[SEP] identifier[newConcurrentMap] operator[SEP] operator[SEP] operator[SEP] Keyword[f... |
public <T> ServerBuilder channelOption(ChannelOption<T> option, T value) {
requireNonNull(option, "option");
checkArgument(!PROHIBITED_SOCKET_OPTIONS.contains(option),
"prohibited socket option: %s", option);
option.validate(value);
channelOptions.put(option, value... | class class_name[name] begin[{]
method[channelOption, return_type[type[ServerBuilder]], modifier[public], parameter[option, value]] begin[{]
call[.requireNonNull, parameter[member[.option], literal["option"]]]
call[.checkArgument, parameter[call[PROHIBITED_SOCKET_OPTIONS.contain... | Keyword[public] operator[<] identifier[T] operator[>] identifier[ServerBuilder] identifier[channelOption] operator[SEP] identifier[ChannelOption] operator[<] identifier[T] operator[>] identifier[option] , identifier[T] identifier[value] operator[SEP] {
identifier[requireNonNull] operator[SEP] identifier[option]... |
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "DICTIONARY__DICTIONARYMEMBER_0")
public org.openprovenance.prov.model.QualifiedName getDictionary() {
return dictionary;
} | class class_name[name] begin[{]
method[getDictionary, return_type[type[org]], modifier[public], parameter[]] begin[{]
return[member[.dictionary]]
end[}]
END[}] | annotation[@] identifier[ManyToOne] operator[SEP] identifier[targetEntity] operator[=] identifier[org] operator[SEP] identifier[openprovenance] operator[SEP] identifier[prov] operator[SEP] identifier[sql] operator[SEP] identifier[QualifiedName] operator[SEP] Keyword[class] , identifier[cascade] operator[=] {
id... |
private static void subscribeIfNotDone(EventCallBackStruct eventCallBackStruct,
String callbackKey) throws DevFailed{
eventCallBackStruct.consumer.subscribe_event(
eventCallBackStruct.device,
eventCallBackStruct.attr_name,
... | class class_name[name] begin[{]
method[subscribeIfNotDone, return_type[void], modifier[private static], parameter[eventCallBackStruct, callbackKey]] begin[{]
call[eventCallBackStruct.consumer.subscribe_event, parameter[member[eventCallBackStruct.device], member[eventCallBackStruct.attr_name], m... | Keyword[private] Keyword[static] Keyword[void] identifier[subscribeIfNotDone] operator[SEP] identifier[EventCallBackStruct] identifier[eventCallBackStruct] , identifier[String] identifier[callbackKey] operator[SEP] Keyword[throws] identifier[DevFailed] {
identifier[eventCallBackStruct] operator[SEP] identifier[... |
public void setValues() {
for (Map.Entry<String, ArrayValueMap.ArrayValue> entry : keyMap.entrySet()) {
@SuppressWarnings("unchecked")
Map<String, Object> destinationMap = (Map<String, Object>) destination;
destinationMap.put(entry.getKey(), entry.getValue().toArray());
}
for (Map.Entry<Fi... | class class_name[name] begin[{]
method[setValues, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[],... | Keyword[public] Keyword[void] identifier[setValues] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[ArrayValueMap] operator[SEP] identifier[ArrayValue] operator[>] identifier[entry] operator[:] identifier[keyMa... |
public final String readLine() throws IOException {
StringBuilder line = new StringBuilder(80); // Typical line length
boolean foundTerminator = false;
int unreadPosition = 0;
while (true) {
int nextByte = read();
switch (nextByte) {
case -1:
... | class class_name[name] begin[{]
method[readLine, return_type[type[String]], modifier[final public], parameter[]] begin[{]
local_variable[type[StringBuilder], line]
local_variable[type[boolean], foundTerminator]
local_variable[type[int], unreadPosition]
while[literal[true... | Keyword[public] Keyword[final] identifier[String] identifier[readLine] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[StringBuilder] identifier[line] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[80] operator[SEP] operator[SEP] Keyword[boolean] identifie... |
public String[] getAsStringArray(byte b) {
String s = get(b);
if (s == null)
return null;
else
return s.split(lineSeparator+"");
} | class class_name[name] begin[{]
method[getAsStringArray, return_type[type[String]], modifier[public], parameter[b]] begin[{]
local_variable[type[String], s]
if[binary_operation[member[.s], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
return[call[s.split, para... | Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[getAsStringArray] operator[SEP] Keyword[byte] identifier[b] operator[SEP] {
identifier[String] identifier[s] operator[=] identifier[get] operator[SEP] identifier[b] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.