code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void marshall(UpdateCertificateOptionsRequest updateCertificateOptionsRequest, ProtocolMarshaller protocolMarshaller) {
if (updateCertificateOptionsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarsha... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[updateCertificateOptionsRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.updateCertificateOptionsRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCr... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UpdateCertificateOptionsRequest] identifier[updateCertificateOptionsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[updateCertificateOptionsRequest] operator[... |
private void showVersionInfo(String json) {
DefaultWindow window = new DefaultWindow("Management Model Versions");
window.setWidth(480);
window.setHeight(360);
window.addCloseHandler(new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPa... | class class_name[name] begin[{]
method[showVersionInfo, return_type[void], modifier[private], parameter[json]] begin[{]
local_variable[type[DefaultWindow], window]
call[window.setWidth, parameter[literal[480]]]
call[window.setHeight, parameter[literal[360]]]
... | Keyword[private] Keyword[void] identifier[showVersionInfo] operator[SEP] identifier[String] identifier[json] operator[SEP] {
identifier[DefaultWindow] identifier[window] operator[=] Keyword[new] identifier[DefaultWindow] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[window] operator[SEP] i... |
public void get_table( String sql, String args[], TableResult tbl ) throws jsqlite.Exception {
tbl.clear();
if (!is3()) {
try {
exec(sql, tbl, args);
} catch (jsqlite.Exception e) {
if (tbl.maxrows <= 0 || !tbl.atmaxrows) {
thro... | class class_name[name] begin[{]
method[get_table, return_type[void], modifier[public], parameter[sql, args, tbl]] begin[{]
call[tbl.clear, parameter[]]
if[call[.is3, parameter[]]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=... | Keyword[public] Keyword[void] identifier[get_table] operator[SEP] identifier[String] identifier[sql] , identifier[String] identifier[args] operator[SEP] operator[SEP] , identifier[TableResult] identifier[tbl] operator[SEP] Keyword[throws] identifier[jsqlite] operator[SEP] identifier[Exception] {
identifier[tbl... |
public static byte[] decode(final char[] arr) {
int length = arr.length;
if (length == 0) {
return new byte[0];
}
int sndx = 0, endx = length - 1;
int pad = arr[endx] == '=' ? (arr[endx - 1] == '=' ? 2 : 1) : 0;
int cnt = endx - sndx + 1;
int sepCnt = length > 76 ? (arr[76] == '\r' ? cnt / 78 : 0) << ... | class class_name[name] begin[{]
method[decode, return_type[type[byte]], modifier[public static], parameter[arr]] begin[{]
local_variable[type[int], length]
if[binary_operation[member[.length], ==, literal[0]]] begin[{]
return[ArrayCreator(dimensions=[Literal(postfix_operator... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[decode] operator[SEP] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[arr] operator[SEP] {
Keyword[int] identifier[length] operator[=] identifier[arr] operator[SEP] identifier[length] operator[SEP] Keyword[if... |
public static <T extends Number & Comparable<?>> NumberPath<T> numberPath(Class<? extends T> type,
Path<?> parent, String property) {
return new NumberPath<T>(type, PathMetadataFactory.forProperty(parent, property));
} | class class_name[name] begin[{]
method[numberPath, return_type[type[NumberPath]], modifier[public static], parameter[type, parent, property]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(argum... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Number] operator[&] identifier[Comparable] operator[<] operator[?] operator[>] operator[>] identifier[NumberPath] operator[<] identifier[T] operator[>] identifier[numberPath] operator[SEP] identifier[Class] operator[<] operator[?] Key... |
public static CmsSearchFieldMappingType valueOf(String value) {
if (CmsStringUtil.isEmptyOrWhitespaceOnly(value)) {
return null;
}
value = value.trim().toLowerCase();
if (STR_CONTENT.equals(value)) {
return CONTENT;
} else if (STR_PROPERTY.equals(value)) ... | class class_name[name] begin[{]
method[valueOf, return_type[type[CmsSearchFieldMappingType]], modifier[public static], parameter[value]] begin[{]
if[call[CmsStringUtil.isEmptyOrWhitespaceOnly, parameter[member[.value]]]] begin[{]
return[literal[null]]
else begin[{]
None
... | Keyword[public] Keyword[static] identifier[CmsSearchFieldMappingType] identifier[valueOf] operator[SEP] identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isEmptyOrWhitespaceOnly] operator[SEP] identifier[value] operator[SEP] operator... |
void index(int indexToNavigateTo) {
this.index = 0;
this.offset = 0;
this.nextSplit = StringUtil.indexOf(path, '.', 0);
this.token = null;
for (int i = 1; i <= indexToNavigateTo; i++) {
if (!advanceToNextToken()) {
throw new IndexOutOfBoundsException(... | class class_name[name] begin[{]
method[index, return_type[void], modifier[default], parameter[indexToNavigateTo]] begin[{]
assign[THIS[member[None.index]], literal[0]]
assign[THIS[member[None.offset]], literal[0]]
assign[THIS[member[None.nextSplit]], call[StringU... | Keyword[void] identifier[index] operator[SEP] Keyword[int] identifier[indexToNavigateTo] operator[SEP] {
Keyword[this] operator[SEP] identifier[index] operator[=] Other[0] operator[SEP] Keyword[this] operator[SEP] identifier[offset] operator[=] Other[0] operator[SEP] Keyword[this] operator[SEP] identifier[nextSp... |
@Override
public Date getDate(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
Timestamp ts = table.getTimestampAsSqlTimestamp(columnIndex - 1);
Date result = null;
if (ts != null) {
result = new Date(ts.getTime());
... | class class_name[name] begin[{]
method[getDate, return_type[type[Date]], modifier[public], parameter[columnIndex]] begin[{]
call[.checkColumnBounds, parameter[member[.columnIndex]]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[... | annotation[@] identifier[Override] Keyword[public] identifier[Date] identifier[getDate] operator[SEP] Keyword[int] identifier[columnIndex] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[checkColumnBounds] operator[SEP] identifier[columnIndex] operator[SEP] operator[SEP] Keyword[try] {
... |
public Pair<Assertion, WsFederationConfiguration> buildAndVerifyAssertion(final RequestedSecurityToken reqToken, final Collection<WsFederationConfiguration> config) {
val securityToken = getSecurityTokenFromRequestedToken(reqToken, config);
if (securityToken instanceof Assertion) {
LOGGER.de... | class class_name[name] begin[{]
method[buildAndVerifyAssertion, return_type[type[Pair]], modifier[public], parameter[reqToken, config]] begin[{]
local_variable[type[val], securityToken]
if[binary_operation[member[.securityToken], instanceof, type[Assertion]]] begin[{]
... | Keyword[public] identifier[Pair] operator[<] identifier[Assertion] , identifier[WsFederationConfiguration] operator[>] identifier[buildAndVerifyAssertion] operator[SEP] Keyword[final] identifier[RequestedSecurityToken] identifier[reqToken] , Keyword[final] identifier[Collection] operator[<] identifier[WsFederationCon... |
private String logIdent() {
if (alternate != null) {
return "[" + hostname.nameAndAddress() + " (" + alternate.nameAndAddress() + ")]: ";
} else {
return "[" + hostname.nameAndAddress() + "]: ";
}
} | class class_name[name] begin[{]
method[logIdent, return_type[type[String]], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.alternate], !=, literal[null]]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[literal["["], +, call[... | Keyword[private] identifier[String] identifier[logIdent] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[alternate] operator[!=] Other[null] operator[SEP] {
Keyword[return] literal[String] operator[+] identifier[hostname] operator[SEP] identifier[nameAndAddress] operator[SEP] operat... |
@Deprecated
@SuppressWarnings("unchecked")
public void addInput(List<Operator<IN>> inputs) {
this.input = Operator.createUnionCascade(this.input, inputs.toArray(new Operator[inputs.size()]));
} | class class_name[name] begin[{]
method[addInput, return_type[void], modifier[public], parameter[inputs]] begin[{]
assign[THIS[member[None.input]], call[Operator.createUnionCascade, parameter[THIS[member[None.input]], call[inputs.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(argum... | annotation[@] identifier[Deprecated] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[addInput] operator[SEP] identifier[List] operator[<] identifier[Operator] operator[<] identifier[IN] operator[>] operator[>] identifier[inputs] operator[SE... |
@Override
public int print(
ChronoDisplay formattable,
Appendable buffer,
AttributeQuery attributes,
Set<ElementPosition> positions,
boolean quickPath
) throws IOException {
if (!formattable.hasTimezone()) {
throw new IllegalArgumentException(
... | class class_name[name] begin[{]
method[print, return_type[type[int]], modifier[public], parameter[formattable, buffer, attributes, positions, quickPath]] begin[{]
if[call[formattable.hasTimezone, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperatio... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[print] operator[SEP] identifier[ChronoDisplay] identifier[formattable] , identifier[Appendable] identifier[buffer] , identifier[AttributeQuery] identifier[attributes] , identifier[Set] operator[<] identifier[ElementPosition] operator[>] ident... |
public DayPartitionBuilder addWeekdayRule(
SpanOfWeekdays spanOfWeekdays,
ClockInterval partition
) {
return this.addWeekdayRule(spanOfWeekdays.getStart(), spanOfWeekdays.getEnd(), partition);
} | class class_name[name] begin[{]
method[addWeekdayRule, return_type[type[DayPartitionBuilder]], modifier[public], parameter[spanOfWeekdays, partition]] begin[{]
return[THIS[call[None.addWeekdayRule, parameter[call[spanOfWeekdays.getStart, parameter[]], call[spanOfWeekdays.getEnd, parameter[]], member[.p... | Keyword[public] identifier[DayPartitionBuilder] identifier[addWeekdayRule] operator[SEP] identifier[SpanOfWeekdays] identifier[spanOfWeekdays] , identifier[ClockInterval] identifier[partition] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP] identifier[addWeekdayRule] operator[SEP] identifier[spanOfW... |
public static void setDefaultConfiguration(SimpleConfiguration config) {
config.setProperty(CONNECTION_ZOOKEEPERS_PROP, CONNECTION_ZOOKEEPERS_DEFAULT);
config.setProperty(CONNECTION_ZOOKEEPER_TIMEOUT_PROP, CONNECTION_ZOOKEEPER_TIMEOUT_DEFAULT);
config.setProperty(DFS_ROOT_PROP, DFS_ROOT_DEFAULT);
config... | class class_name[name] begin[{]
method[setDefaultConfiguration, return_type[void], modifier[public static], parameter[config]] begin[{]
call[config.setProperty, parameter[member[.CONNECTION_ZOOKEEPERS_PROP], member[.CONNECTION_ZOOKEEPERS_DEFAULT]]]
call[config.setProperty, param... | Keyword[public] Keyword[static] Keyword[void] identifier[setDefaultConfiguration] operator[SEP] identifier[SimpleConfiguration] identifier[config] operator[SEP] {
identifier[config] operator[SEP] identifier[setProperty] operator[SEP] identifier[CONNECTION_ZOOKEEPERS_PROP] , identifier[CONNECTION_ZOOKEEPERS_DEFA... |
public Legislator detail(String id) throws OpenStatesException {
return api.query(new MethodMap("legislators", id), null, Legislator.class);
} | class class_name[name] begin[{]
method[detail, return_type[type[Legislator]], modifier[public], parameter[id]] begin[{]
return[call[api.query, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="legislators"), MemberReference(member=... | Keyword[public] identifier[Legislator] identifier[detail] operator[SEP] identifier[String] identifier[id] operator[SEP] Keyword[throws] identifier[OpenStatesException] {
Keyword[return] identifier[api] operator[SEP] identifier[query] operator[SEP] Keyword[new] identifier[MethodMap] operator[SEP] literal[String] ... |
public boolean runIfNotCancelled() {
final AtomicInteger stateRef = this.stateRef;
int oldVal;
do {
oldVal = stateRef.get();
if (oldVal == ST_CANCELLED || oldVal == ST_CANCELLED_FLAG_SET) {
return false;
} else if (oldVal != ST_WAITING) {
... | class class_name[name] begin[{]
method[runIfNotCancelled, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[AtomicInteger], stateRef]
local_variable[type[int], oldVal]
do[call[stateRef.compareAndSet, parameter[member[.oldVal], member[.ST_STA... | Keyword[public] Keyword[boolean] identifier[runIfNotCancelled] operator[SEP] operator[SEP] {
Keyword[final] identifier[AtomicInteger] identifier[stateRef] operator[=] Keyword[this] operator[SEP] identifier[stateRef] operator[SEP] Keyword[int] identifier[oldVal] operator[SEP] Keyword[do] {
identifier[o... |
void invalidateSchemaCache() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "invalidateSchemaCache");
// If this is the master message, clear the cache....
if (isMaster()) {
schemata = null;
}
// ... otherwise call on up the tree.
else {
get... | class class_name[name] begin[{]
method[invalidateSchemaCache, return_type[void], modifier[default], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[JmfTr.entry, parameter[THIS[]... | Keyword[void] identifier[invalidateSchemaCache] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SE... |
public static synchronized CurrencyUnit registerCurrency(
String currencyCode,
int numericCurrencyCode,
int decimalPlaces,
boolean force) {
List<String> countryCodes = Collections.emptyList();
return registerCurrency(currencyCode, numericCurrency... | class class_name[name] begin[{]
method[registerCurrency, return_type[type[CurrencyUnit]], modifier[synchronized public static], parameter[currencyCode, numericCurrencyCode, decimalPlaces, force]] begin[{]
local_variable[type[List], countryCodes]
return[call[.registerCurrency, parameter[member[.... | Keyword[public] Keyword[static] Keyword[synchronized] identifier[CurrencyUnit] identifier[registerCurrency] operator[SEP] identifier[String] identifier[currencyCode] , Keyword[int] identifier[numericCurrencyCode] , Keyword[int] identifier[decimalPlaces] , Keyword[boolean] identifier[force] operator[SEP] {
ide... |
public String getMaxDateLastModified() {
if (m_searchParams.getMaxDateLastModified() == Long.MAX_VALUE) {
return "";
}
return Long.toString(m_searchParams.getMaxDateLastModified());
} | class class_name[name] begin[{]
method[getMaxDateLastModified, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[m_searchParams.getMaxDateLastModified, parameter[]], ==, member[Long.MAX_VALUE]]] begin[{]
return[literal[""]]
else begi... | Keyword[public] identifier[String] identifier[getMaxDateLastModified] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_searchParams] operator[SEP] identifier[getMaxDateLastModified] operator[SEP] operator[SEP] operator[==] identifier[Long] operator[SEP] identifier[MAX_VALUE] operator[SEP] {
... |
@Override
protected List<byte[]> mate(byte[] parent1,
byte[] parent2,
int numberOfCrossoverPoints,
Random rng)
{
if (parent1.length != parent2.length)
{
throw new IllegalArgumentException(... | class class_name[name] begin[{]
method[mate, return_type[type[List]], modifier[protected], parameter[parent1, parent2, numberOfCrossoverPoints, rng]] begin[{]
if[binary_operation[member[parent1.length], !=, member[parent2.length]]] begin[{]
ThrowStatement(expression=ClassCreator(arg... | annotation[@] identifier[Override] Keyword[protected] identifier[List] operator[<] Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[mate] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[parent1] , Keyword[byte] operator[SEP] operator[SEP] identifier[parent2] , Keyword[int] identifie... |
private static ProtobufMetadataManagerImpl getProtobufMetadataManager(EmbeddedCacheManager cacheManager) {
if (cacheManager == null) {
throw new IllegalArgumentException("cacheManager cannot be null");
}
ProtobufMetadataManagerImpl metadataManager = (ProtobufMetadataManagerImpl) cacheManager.... | class class_name[name] begin[{]
method[getProtobufMetadataManager, return_type[type[ProtobufMetadataManagerImpl]], modifier[private static], parameter[cacheManager]] begin[{]
if[binary_operation[member[.cacheManager], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreat... | Keyword[private] Keyword[static] identifier[ProtobufMetadataManagerImpl] identifier[getProtobufMetadataManager] operator[SEP] identifier[EmbeddedCacheManager] identifier[cacheManager] operator[SEP] {
Keyword[if] operator[SEP] identifier[cacheManager] operator[==] Other[null] operator[SEP] {
Keyword[th... |
private static void scaleDownTenRoundUp(Slice decimal, int tenScale, Slice result)
{
boolean round;
do {
int powerTen = Math.min(tenScale, MAX_POWER_OF_TEN_INT);
tenScale -= powerTen;
int divisor = POWERS_OF_TEN_INT[powerTen];
round = divideCheckRound... | class class_name[name] begin[{]
method[scaleDownTenRoundUp, return_type[void], modifier[private static], parameter[decimal, tenScale, result]] begin[{]
local_variable[type[boolean], round]
do[binary_operation[member[.tenScale], >, literal[0]]] begin[{]
local_variable[type[in... | Keyword[private] Keyword[static] Keyword[void] identifier[scaleDownTenRoundUp] operator[SEP] identifier[Slice] identifier[decimal] , Keyword[int] identifier[tenScale] , identifier[Slice] identifier[result] operator[SEP] {
Keyword[boolean] identifier[round] operator[SEP] Keyword[do] {
Keyword[int] id... |
public void setXOSSF(Integer newXOSSF) {
Integer oldXOSSF = xossf;
xossf = newXOSSF;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.GRLINERG__XOSSF, oldXOSSF, xossf));
} | class class_name[name] begin[{]
method[setXOSSF, return_type[void], modifier[public], parameter[newXOSSF]] begin[{]
local_variable[type[Integer], oldXOSSF]
assign[member[.xossf], member[.newXOSSF]]
if[call[.eNotificationRequired, parameter[]]] begin[{]
call[.... | Keyword[public] Keyword[void] identifier[setXOSSF] operator[SEP] identifier[Integer] identifier[newXOSSF] operator[SEP] {
identifier[Integer] identifier[oldXOSSF] operator[=] identifier[xossf] operator[SEP] identifier[xossf] operator[=] identifier[newXOSSF] operator[SEP] Keyword[if] operator[SEP] identifier[eNot... |
public final void synpred29_InternalSARL_fragment() throws RecognitionException {
// InternalSARL.g:11886:5: ( ( () '#' '[' ) )
// InternalSARL.g:11886:6: ( () '#' '[' )
{
// InternalSARL.g:11886:6: ( () '#' '[' )
// InternalSARL.g:11887:6: () '#' '['
{
// Inte... | class class_name[name] begin[{]
method[synpred29_InternalSARL_fragment, return_type[void], modifier[final public], parameter[]] begin[{]
call[.match, parameter[member[.input], literal[106], member[.FOLLOW_90]]]
if[member[state.failed]] begin[{]
return[No... | Keyword[public] Keyword[final] Keyword[void] identifier[synpred29_InternalSARL_fragment] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
{
{
{
}
identifier[match] operator[SEP] identifier[input] , Other[106... |
public static SipSessionKey parseSipSessionKey(
String sipSessionKey) throws ParseException {
if(logger.isDebugEnabled()) {
logger.debug("parseSipSessionKey - sipSessionKey=" + sipSessionKey);
}
int indexOfLeftParenthesis = sipSessionKey.indexOf("(");
// see http://code.google.com/p/sipservlets/... | class class_name[name] begin[{]
method[parseSipSessionKey, return_type[type[SipSessionKey]], modifier[public static], parameter[sipSessionKey]] begin[{]
if[call[logger.isDebugEnabled, parameter[]]] begin[{]
call[logger.debug, parameter[binary_operation[literal["parseSipS... | Keyword[public] Keyword[static] identifier[SipSessionKey] identifier[parseSipSessionKey] operator[SEP] identifier[String] identifier[sipSessionKey] operator[SEP] Keyword[throws] identifier[ParseException] {
Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operat... |
List<List<TaskId>> interleaveTasksByGroupId(final Collection<TaskId> taskIds, final int numberThreads) {
final LinkedList<TaskId> sortedTasks = new LinkedList<>(taskIds);
Collections.sort(sortedTasks);
final List<List<TaskId>> taskIdsForConsumerAssignment = new ArrayList<>(numberThreads);
for (int i = 0... | class class_name[name] begin[{]
method[interleaveTasksByGroupId, return_type[type[List]], modifier[default], parameter[taskIds, numberThreads]] begin[{]
local_variable[type[LinkedList], sortedTasks]
call[Collections.sort, parameter[member[.sortedTasks]]]
local_variable[type[List... | identifier[List] operator[<] identifier[List] operator[<] identifier[TaskId] operator[>] operator[>] identifier[interleaveTasksByGroupId] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[TaskId] operator[>] identifier[taskIds] , Keyword[final] Keyword[int] identifier[numberThreads] operator[S... |
public void clearSign(InputStream input, OutputStream output) throws IOException, PGPException, GeneralSecurityException {
PGPSignatureGenerator signatureGenerator = new PGPSignatureGenerator(new BcPGPContentSignerBuilder(privateKey.getPublicKeyPacket().getAlgorithm(), digest));
signatureGenerator.init... | class class_name[name] begin[{]
method[clearSign, return_type[void], modifier[public], parameter[input, output]] begin[{]
local_variable[type[PGPSignatureGenerator], signatureGenerator]
call[signatureGenerator.init, parameter[member[PGPSignature.CANONICAL_TEXT_DOCUMENT], member[.private... | Keyword[public] Keyword[void] identifier[clearSign] operator[SEP] identifier[InputStream] identifier[input] , identifier[OutputStream] identifier[output] operator[SEP] Keyword[throws] identifier[IOException] , identifier[PGPException] , identifier[GeneralSecurityException] {
identifier[PGPSignatureGenerator] ... |
public EncodedElement getEnd() {
EncodedElement temp = next;
EncodedElement end = this;
while(temp != null) {
end = temp;
temp = temp.next;
}
return end;
} | class class_name[name] begin[{]
method[getEnd, return_type[type[EncodedElement]], modifier[public], parameter[]] begin[{]
local_variable[type[EncodedElement], temp]
local_variable[type[EncodedElement], end]
while[binary_operation[member[.temp], !=, literal[null]]] begin[{]
... | Keyword[public] identifier[EncodedElement] identifier[getEnd] operator[SEP] operator[SEP] {
identifier[EncodedElement] identifier[temp] operator[=] identifier[next] operator[SEP] identifier[EncodedElement] identifier[end] operator[=] Keyword[this] operator[SEP] Keyword[while] operator[SEP] identifier[temp] opera... |
@Override
public CommerceAccountUserRel findByCommerceAccountUserId_First(
long commerceAccountUserId,
OrderByComparator<CommerceAccountUserRel> orderByComparator)
throws NoSuchAccountUserRelException {
CommerceAccountUserRel commerceAccountUserRel = fetchByCommerceAccountUserId_First(commerceAccountUserId,
... | class class_name[name] begin[{]
method[findByCommerceAccountUserId_First, return_type[type[CommerceAccountUserRel]], modifier[public], parameter[commerceAccountUserId, orderByComparator]] begin[{]
local_variable[type[CommerceAccountUserRel], commerceAccountUserRel]
if[binary_operation[m... | annotation[@] identifier[Override] Keyword[public] identifier[CommerceAccountUserRel] identifier[findByCommerceAccountUserId_First] operator[SEP] Keyword[long] identifier[commerceAccountUserId] , identifier[OrderByComparator] operator[<] identifier[CommerceAccountUserRel] operator[>] identifier[orderByComparator] oper... |
public String queryParam(String name) {
List<String> values = queryParams.get(name);
return (values == null) ? null : values.get(0);
} | class class_name[name] begin[{]
method[queryParam, return_type[type[String]], modifier[public], parameter[name]] begin[{]
local_variable[type[List], values]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qual... | Keyword[public] identifier[String] identifier[queryParam] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[values] operator[=] identifier[queryParams] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP]... |
@Handler
public void onClose(Close event, PlainChannel plainChannel)
throws InterruptedException, SSLException {
if (plainChannel.hub() != this) {
return;
}
plainChannel.close(event);
} | class class_name[name] begin[{]
method[onClose, return_type[void], modifier[public], parameter[event, plainChannel]] begin[{]
if[binary_operation[call[plainChannel.hub, parameter[]], !=, THIS[]]] begin[{]
return[None]
else begin[{]
None
end[}]
call[pl... | annotation[@] identifier[Handler] Keyword[public] Keyword[void] identifier[onClose] operator[SEP] identifier[Close] identifier[event] , identifier[PlainChannel] identifier[plainChannel] operator[SEP] Keyword[throws] identifier[InterruptedException] , identifier[SSLException] {
Keyword[if] operator[SEP] identif... |
private static boolean postAggregatorDirectColumnIsOk(
final RowSignature aggregateRowSignature,
final DruidExpression expression,
final RexNode rexNode
)
{
if (!expression.isDirectColumnAccess()) {
return false;
}
// Check if a cast is necessary.
final ExprType toExprType =... | class class_name[name] begin[{]
method[postAggregatorDirectColumnIsOk, return_type[type[boolean]], modifier[private static], parameter[aggregateRowSignature, expression, rexNode]] begin[{]
if[call[expression.isDirectColumnAccess, parameter[]]] begin[{]
return[literal[false]]
... | Keyword[private] Keyword[static] Keyword[boolean] identifier[postAggregatorDirectColumnIsOk] operator[SEP] Keyword[final] identifier[RowSignature] identifier[aggregateRowSignature] , Keyword[final] identifier[DruidExpression] identifier[expression] , Keyword[final] identifier[RexNode] identifier[rexNode] operator[SEP... |
public WordNetRelation getRelation(Sense from, Sense to) {
if (from == null || to == null) {
return null;
}
return db.getRelation(from, to);
} | class class_name[name] begin[{]
method[getRelation, return_type[type[WordNetRelation]], modifier[public], parameter[from, to]] begin[{]
if[binary_operation[binary_operation[member[.from], ==, literal[null]], ||, binary_operation[member[.to], ==, literal[null]]]] begin[{]
return[lite... | Keyword[public] identifier[WordNetRelation] identifier[getRelation] operator[SEP] identifier[Sense] identifier[from] , identifier[Sense] identifier[to] operator[SEP] {
Keyword[if] operator[SEP] identifier[from] operator[==] Other[null] operator[||] identifier[to] operator[==] Other[null] operator[SEP] {
... |
protected void scanRecordFields(String[] strClassNames, int iClassIndex, boolean bMarkUnused)
{
ClassInfo recClassInfo = new ClassInfo(Record.findRecordOwner(m_recClassInfo));
FieldData recFieldData = new FieldData(Record.findRecordOwner(m_recFieldData));
String strClassName = strClassNames[... | class class_name[name] begin[{]
method[scanRecordFields, return_type[void], modifier[protected], parameter[strClassNames, iClassIndex, bMarkUnused]] begin[{]
local_variable[type[ClassInfo], recClassInfo]
local_variable[type[FieldData], recFieldData]
local_variable[type[String], strClass... | Keyword[protected] Keyword[void] identifier[scanRecordFields] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[strClassNames] , Keyword[int] identifier[iClassIndex] , Keyword[boolean] identifier[bMarkUnused] operator[SEP] {
identifier[ClassInfo] identifier[recClassInfo] operator[=] Keywo... |
public static Counter counter(String name, Iterable<Tag> tags) {
return globalRegistry.counter(name, tags);
} | class class_name[name] begin[{]
method[counter, return_type[type[Counter]], modifier[public static], parameter[name, tags]] begin[{]
return[call[globalRegistry.counter, parameter[member[.name], member[.tags]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Counter] identifier[counter] operator[SEP] identifier[String] identifier[name] , identifier[Iterable] operator[<] identifier[Tag] operator[>] identifier[tags] operator[SEP] {
Keyword[return] identifier[globalRegistry] operator[SEP] identifier[counter] operator[SEP] ide... |
protected float getLayoutOffset() {
//final int offsetSign = getOffsetSign();
final float axisSize = getViewPortSize(getOrientationAxis());
float layoutOffset = - axisSize / 2;
Log.d(LAYOUT, TAG, "getLayoutOffset(): dimension: %5.2f, layoutOffset: %5.2f",
axisSize, layoutOf... | class class_name[name] begin[{]
method[getLayoutOffset, return_type[type[float]], modifier[protected], parameter[]] begin[{]
local_variable[type[float], axisSize]
local_variable[type[float], layoutOffset]
call[Log.d, parameter[member[.LAYOUT], member[.TAG], literal["getLayoutOff... | Keyword[protected] Keyword[float] identifier[getLayoutOffset] operator[SEP] operator[SEP] {
Keyword[final] Keyword[float] identifier[axisSize] operator[=] identifier[getViewPortSize] operator[SEP] identifier[getOrientationAxis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[lay... |
public ReturnCode status(boolean starting) {
// Use initialized bootstrap configuration to find the server lock file.
ServerLock serverLock = ServerLock.createTestLock(bootProps);
ReturnCode rc = ReturnCode.OK;
// The lock file may have been (erroneously) deleted: this can happen on lin... | class class_name[name] begin[{]
method[status, return_type[type[ReturnCode]], modifier[public], parameter[starting]] begin[{]
local_variable[type[ServerLock], serverLock]
local_variable[type[ReturnCode], rc]
local_variable[type[boolean], lockExists]
if[member[.lockExists... | Keyword[public] identifier[ReturnCode] identifier[status] operator[SEP] Keyword[boolean] identifier[starting] operator[SEP] {
identifier[ServerLock] identifier[serverLock] operator[=] identifier[ServerLock] operator[SEP] identifier[createTestLock] operator[SEP] identifier[bootProps] operator[SEP] operator[SEP] i... |
public ClassConstant getClass(String name)
{
for (int i = 0; i < _entries.size(); i++) {
ConstantPoolEntry entry = _entries.get(i);
if (! (entry instanceof ClassConstant))
continue;
ClassConstant classEntry = (ClassConstant) entry;
if (classEntry.getName().equals(name))
... | class class_name[name] begin[{]
method[getClass, return_type[type[ClassConstant]], modifier[public], parameter[name]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(ar... | Keyword[public] identifier[ClassConstant] identifier[getClass] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[_entries] operator[SEP] identifier[size] operator[SEP] ope... |
public static Intent newNavigationIntent(String address) {
StringBuilder sb = new StringBuilder();
sb.append("google.navigation:q=");
String addressEncoded = Uri.encode(address);
sb.append(addressEncoded);
return new Intent(Intent.ACTION_VIEW, Uri.parse(sb.toString()));
} | class class_name[name] begin[{]
method[newNavigationIntent, return_type[type[Intent]], modifier[public static], parameter[address]] begin[{]
local_variable[type[StringBuilder], sb]
call[sb.append, parameter[literal["google.navigation:q="]]]
local_variable[type[String], addressEn... | Keyword[public] Keyword[static] identifier[Intent] identifier[newNavigationIntent] operator[SEP] identifier[String] identifier[address] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP... |
private boolean tryToDispatchTokens(MessageHolderWithTokens msg) {
try {
dispatchTokensEvent.fire(msg);
return true;
} catch (MessageDeliveryException e) {
Throwable cause = e.getCause();
if (isQueueFullException(cause)) {
return false;
... | class class_name[name] begin[{]
method[tryToDispatchTokens, return_type[type[boolean]], modifier[private], parameter[msg]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors... | Keyword[private] Keyword[boolean] identifier[tryToDispatchTokens] operator[SEP] identifier[MessageHolderWithTokens] identifier[msg] operator[SEP] {
Keyword[try] {
identifier[dispatchTokensEvent] operator[SEP] identifier[fire] operator[SEP] identifier[msg] operator[SEP] operator[SEP] Keyword[return] li... |
public String reviewFile(String filePath) {
log.info("Reviewing file: " + filePath);
// use this format to make sure that ' ' are parsed properly
String[] args = new String[] {NODE_JS, tsScript, TS_LINT_OUTPUT_KEY, TS_LINT_OUTPUT_VALUE,
TS_LINT_CONFI... | class class_name[name] begin[{]
method[reviewFile, return_type[type[String]], modifier[public], parameter[filePath]] begin[{]
call[log.info, parameter[binary_operation[literal["Reviewing file: "], +, member[.filePath]]]]
local_variable[type[String], args]
return[ClassCreator(arg... | Keyword[public] identifier[String] identifier[reviewFile] operator[SEP] identifier[String] identifier[filePath] operator[SEP] {
identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[filePath] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] ... |
@Override
void archive() {
FTPArchiveClient client = new FTPArchiveClient();
try {
client.init(clientArguments);
} catch (UnknownHostException e) {
throw new Audit4jRuntimeException("Excepting in running archive client.", e);
}
} | class class_name[name] begin[{]
method[archive, return_type[void], modifier[default], parameter[]] begin[{]
local_variable[type[FTPArchiveClient], client]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=clientArguments, postfix_operators=[],... | annotation[@] identifier[Override] Keyword[void] identifier[archive] operator[SEP] operator[SEP] {
identifier[FTPArchiveClient] identifier[client] operator[=] Keyword[new] identifier[FTPArchiveClient] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[client] operator[SEP] identifier[... |
protected long loadAll( NodeSequence sequence,
QueueBuffer<BufferedRow> buffer,
AtomicLong batchSize ) {
return loadAll(sequence, buffer, batchSize, null, 0);
} | class class_name[name] begin[{]
method[loadAll, return_type[type[long]], modifier[protected], parameter[sequence, buffer, batchSize]] begin[{]
return[call[.loadAll, parameter[member[.sequence], member[.buffer], member[.batchSize], literal[null], literal[0]]]]
end[}]
END[}] | Keyword[protected] Keyword[long] identifier[loadAll] operator[SEP] identifier[NodeSequence] identifier[sequence] , identifier[QueueBuffer] operator[<] identifier[BufferedRow] operator[>] identifier[buffer] , identifier[AtomicLong] identifier[batchSize] operator[SEP] {
Keyword[return] identifier[loadAll] operat... |
public Token findVerb(Sentence sentence) {
List<SyntacticChunk> syntChunks = sentence.getSyntacticChunks();
for (int i = 0; i < syntChunks.size(); i++) {
String tag = syntChunks.get(i).getTag();
if (tag.equals("P") || tag.equals("MV") || tag.equals("PMV")
|| tag.equals("AUX") || tag.equa... | class class_name[name] begin[{]
method[findVerb, return_type[type[Token]], modifier[public], parameter[sentence]] begin[{]
local_variable[type[List], syntChunks]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dim... | Keyword[public] identifier[Token] identifier[findVerb] operator[SEP] identifier[Sentence] identifier[sentence] operator[SEP] {
identifier[List] operator[<] identifier[SyntacticChunk] operator[>] identifier[syntChunks] operator[=] identifier[sentence] operator[SEP] identifier[getSyntacticChunks] operator[SEP] ope... |
@Override
protected void doPaint(Graphics2D g, JComponent c, int width, int height, Object[] extendedCacheKeys) {
switch (state) {
case ICON_ENABLED:
case ICON_DISABLED:
case ICON_ENABLED_WINDOWNOTFOCUSED:
paintEnabled(g, c, width, height);
break;
ca... | class class_name[name] begin[{]
method[doPaint, return_type[void], modifier[protected], parameter[g, c, width, height, extendedCacheKeys]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['ICON_ENABLED', 'ICON_DISABLED', 'ICON_ENABLED_WINDOWNOTFOCUSED'], statements=[StatementExpression(express... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[doPaint] operator[SEP] identifier[Graphics2D] identifier[g] , identifier[JComponent] identifier[c] , Keyword[int] identifier[width] , Keyword[int] identifier[height] , identifier[Object] operator[SEP] operator[SEP] identifier[extendedCac... |
@Override
public Service get() {
String serviceName = this.environment.getVariable(SERVICE_NAME_KEY);
if (Strings.isNullOrEmpty(serviceName)) {
String errorMessage =
String.format("Environment variable '%s' is not set", SERVICE_NAME_KEY);
throw new IllegalArgumentException(errorMessage);... | class class_name[name] begin[{]
method[get, return_type[type[Service]], modifier[public], parameter[]] begin[{]
local_variable[type[String], serviceName]
if[call[Strings.isNullOrEmpty, parameter[member[.serviceName]]]] begin[{]
local_variable[type[String], errorMessage]
... | annotation[@] identifier[Override] Keyword[public] identifier[Service] identifier[get] operator[SEP] operator[SEP] {
identifier[String] identifier[serviceName] operator[=] Keyword[this] operator[SEP] identifier[environment] operator[SEP] identifier[getVariable] operator[SEP] identifier[SERVICE_NAME_KEY] operator... |
public static <T> List<T> getAt(ListWithDefault<T> self, Collection indices) {
List<T> answer = ListWithDefault.newInstance(new ArrayList<T>(indices.size()), self.isLazyDefaultValues(), self.getInitClosure());
for (Object value : indices) {
if (value instanceof Range || value instanceof Coll... | class class_name[name] begin[{]
method[getAt, return_type[type[List]], modifier[public static], parameter[self, indices]] begin[{]
local_variable[type[List], answer]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[getAt] operator[SEP] identifier[ListWithDefault] operator[<] identifier[T] operator[>] identifier[self] , identifier[Collection] identifier[indices] operator[SEP] {
identifier[... |
protected void dropIndexes()
{
log.info("dropping indexes");
for (String index : listIndexesOnTables(allTables()))
{
log.debug("dropping index: " + index);
getJdbcTemplate().execute("DROP INDEX " + index);
}
} | class class_name[name] begin[{]
method[dropIndexes, return_type[void], modifier[protected], parameter[]] begin[{]
call[log.info, parameter[literal["dropping indexes"]]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Bi... | Keyword[protected] Keyword[void] identifier[dropIndexes] operator[SEP] operator[SEP] {
identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[index] operator[:] identifier[listIndexesOnTables] operator[SEP... |
@Nonnull
public BugInstance addOptionalField(@CheckForNull XField xfield) {
if (xfield == null) {
return this;
}
return addField(xfield.getClassName(), xfield.getName(), xfield.getSignature(), xfield.isStatic());
} | class class_name[name] begin[{]
method[addOptionalField, return_type[type[BugInstance]], modifier[public], parameter[xfield]] begin[{]
if[binary_operation[member[.xfield], ==, literal[null]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
return[call[.addF... | annotation[@] identifier[Nonnull] Keyword[public] identifier[BugInstance] identifier[addOptionalField] operator[SEP] annotation[@] identifier[CheckForNull] identifier[XField] identifier[xfield] operator[SEP] {
Keyword[if] operator[SEP] identifier[xfield] operator[==] Other[null] operator[SEP] {
Keywor... |
private Double getRangeCostWholeDay(ProjectCalendar projectCalendar, TimescaleUnits rangeUnits, DateRange range, List<TimephasedCost> assignments, int startIndex)
{
int totalDays = 0;
double totalCost = 0;
TimephasedCost assignment = assignments.get(startIndex);
boolean done = false;
d... | class class_name[name] begin[{]
method[getRangeCostWholeDay, return_type[type[Double]], modifier[private], parameter[projectCalendar, rangeUnits, range, assignments, startIndex]] begin[{]
local_variable[type[int], totalDays]
local_variable[type[double], totalCost]
local_variable[type[Ti... | Keyword[private] identifier[Double] identifier[getRangeCostWholeDay] operator[SEP] identifier[ProjectCalendar] identifier[projectCalendar] , identifier[TimescaleUnits] identifier[rangeUnits] , identifier[DateRange] identifier[range] , identifier[List] operator[<] identifier[TimephasedCost] operator[>] identifier[ass... |
public void resolveExtendingTypes(Set<ModelElementType> allExtendingTypes) {
for(ModelElementType modelElementType : extendingTypes) {
ModelElementTypeImpl modelElementTypeImpl = (ModelElementTypeImpl) modelElementType;
if (!allExtendingTypes.contains(modelElementTypeImpl)) {
allExtendingTypes.a... | class class_name[name] begin[{]
method[resolveExtendingTypes, return_type[void], modifier[public], parameter[allExtendingTypes]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(exp... | Keyword[public] Keyword[void] identifier[resolveExtendingTypes] operator[SEP] identifier[Set] operator[<] identifier[ModelElementType] operator[>] identifier[allExtendingTypes] operator[SEP] {
Keyword[for] operator[SEP] identifier[ModelElementType] identifier[modelElementType] operator[:] identifier[extendingTy... |
@Nonnull
public static SchematronResourcePure fromString (@Nonnull final String sSchematron, @Nonnull final Charset aCharset)
{
return fromByteArray (sSchematron.getBytes (aCharset));
} | class class_name[name] begin[{]
method[fromString, return_type[type[SchematronResourcePure]], modifier[public static], parameter[sSchematron, aCharset]] begin[{]
return[call[.fromByteArray, parameter[call[sSchematron.getBytes, parameter[member[.aCharset]]]]]]
end[}]
END[}] | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[SchematronResourcePure] identifier[fromString] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[sSchematron] , annotation[@] identifier[Nonnull] Keyword[final] identifier[Charset] identifier[aCharse... |
public LdapUser synchronizeTeamMembership(final LdapUser user, final List<String> groupDNs) {
LOGGER.debug("Synchronizing team membership for " + user.getUsername());
final List<Team> removeThese = new ArrayList<>();
if (user.getTeams() != null) {
for (final Team team : user.getTeams... | class class_name[name] begin[{]
method[synchronizeTeamMembership, return_type[type[LdapUser]], modifier[public], parameter[user, groupDNs]] begin[{]
call[LOGGER.debug, parameter[binary_operation[literal["Synchronizing team membership for "], +, call[user.getUsername, parameter[]]]]]
loc... | Keyword[public] identifier[LdapUser] identifier[synchronizeTeamMembership] operator[SEP] Keyword[final] identifier[LdapUser] identifier[user] , Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[groupDNs] operator[SEP] {
identifier[LOGGER] operator[SEP] identifier[debug] opera... |
@Override
public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
double distanceToAtom;
IAtom focus = container.getAtom(focusPosition);
if (atom.getPoint3d() == null || focus.getPoint3d() == null) {
return new DescriptorValue(getSpecification(), getParameterNa... | class class_name[name] begin[{]
method[calculate, return_type[type[DescriptorValue]], modifier[public], parameter[atom, container]] begin[{]
local_variable[type[double], distanceToAtom]
local_variable[type[IAtom], focus]
if[binary_operation[binary_operation[call[atom.getPoint3d,... | annotation[@] identifier[Override] Keyword[public] identifier[DescriptorValue] identifier[calculate] operator[SEP] identifier[IAtom] identifier[atom] , identifier[IAtomContainer] identifier[container] operator[SEP] {
Keyword[double] identifier[distanceToAtom] operator[SEP] identifier[IAtom] identifier[focus] op... |
public static double mul(final double v1,final double v2){
BigDecimal b1 = new BigDecimal(Double.toString(v1));
BigDecimal b2 = new BigDecimal(Double.toString(v2));
return b1.multiply(b2).doubleValue();
} | class class_name[name] begin[{]
method[mul, return_type[type[double]], modifier[public static], parameter[v1, v2]] begin[{]
local_variable[type[BigDecimal], b1]
local_variable[type[BigDecimal], b2]
return[call[b1.multiply, parameter[member[.b2]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[double] identifier[mul] operator[SEP] Keyword[final] Keyword[double] identifier[v1] , Keyword[final] Keyword[double] identifier[v2] operator[SEP] {
identifier[BigDecimal] identifier[b1] operator[=] Keyword[new] identifier[BigDecimal] operator[SEP] identifier[Double] opera... |
public Paragraph<PS, SEG, S> concat(Paragraph<PS, SEG, S> p) {
if(p.length() == 0) {
return this;
}
if(length() == 0) {
return p;
}
List<SEG> updatedSegs;
SEG leftSeg = segments.get(segments.size() - 1);
SEG rightSeg = p.segments.get(0);
... | class class_name[name] begin[{]
method[concat, return_type[type[Paragraph]], modifier[public], parameter[p]] begin[{]
if[binary_operation[call[p.length, parameter[]], ==, literal[0]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
if[binary_operati... | Keyword[public] identifier[Paragraph] operator[<] identifier[PS] , identifier[SEG] , identifier[S] operator[>] identifier[concat] operator[SEP] identifier[Paragraph] operator[<] identifier[PS] , identifier[SEG] , identifier[S] operator[>] identifier[p] operator[SEP] {
Keyword[if] operator[SEP] identifier[p] ... |
private InterfaceMethodRefConstant parseInterfaceMethodRefConstant(int index)
throws IOException
{
int classIndex = readShort();
int nameAndTypeIndex = readShort();
return new InterfaceMethodRefConstant(_class.getConstantPool(), index,
classIndex, nameAndType... | class class_name[name] begin[{]
method[parseInterfaceMethodRefConstant, return_type[type[InterfaceMethodRefConstant]], modifier[private], parameter[index]] begin[{]
local_variable[type[int], classIndex]
local_variable[type[int], nameAndTypeIndex]
return[ClassCreator(arguments=[MethodInv... | Keyword[private] identifier[InterfaceMethodRefConstant] identifier[parseInterfaceMethodRefConstant] operator[SEP] Keyword[int] identifier[index] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[classIndex] operator[=] identifier[readShort] operator[SEP] operator[SEP] operator[SEP] ... |
public void marshall(DownloadDefaultKeyPairRequest downloadDefaultKeyPairRequest, ProtocolMarshaller protocolMarshaller) {
if (downloadDefaultKeyPairRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
} catch (Exception e) {
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[downloadDefaultKeyPairRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.downloadDefaultKeyPairRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreato... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DownloadDefaultKeyPairRequest] identifier[downloadDefaultKeyPairRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[downloadDefaultKeyPairRequest] operator[==] Ot... |
@RequestMapping(method = RequestMethod.GET, value = "/workflowInstance/search",
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.TEXT_XML_VALUE})
public ResponseEntity<List<WorkflowInstanceRestModel>> findInstances( @RequestParam(required = false) String label1,
... | class class_name[name] begin[{]
method[findInstances, return_type[type[ResponseEntity]], modifier[public], parameter[label1, label2, activeOnly]] begin[{]
if[binary_operation[member[.activeOnly], ==, literal[null]]] begin[{]
assign[member[.activeOnly], literal[true]]
... | annotation[@] identifier[RequestMapping] operator[SEP] identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[GET] , identifier[value] operator[=] literal[String] , identifier[produces] operator[=] {
identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON_VALUE] , identifier... |
public void gotConfigInfo (String[] keys, int[] oids)
{
_csubscribers = new ConfigObjectSubscriber[keys.length];
for (int ii = 0; ii < keys.length; ii++) {
_csubscribers[ii] = new ConfigObjectSubscriber();
_csubscribers[ii].subscribeConfig(keys[ii], oids[ii]);
}
} | class class_name[name] begin[{]
method[gotConfigInfo, return_type[void], modifier[public], parameter[keys, oids]] begin[{]
assign[member[._csubscribers], ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=keys, selectors=[])], initialize... | Keyword[public] Keyword[void] identifier[gotConfigInfo] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[keys] , Keyword[int] operator[SEP] operator[SEP] identifier[oids] operator[SEP] {
identifier[_csubscribers] operator[=] Keyword[new] identifier[ConfigObjectSubscriber] operator[SEP] id... |
public void setStateChanges(java.util.Collection<AssessmentRunStateChange> stateChanges) {
if (stateChanges == null) {
this.stateChanges = null;
return;
}
this.stateChanges = new java.util.ArrayList<AssessmentRunStateChange>(stateChanges);
} | class class_name[name] begin[{]
method[setStateChanges, return_type[void], modifier[public], parameter[stateChanges]] begin[{]
if[binary_operation[member[.stateChanges], ==, literal[null]]] begin[{]
assign[THIS[member[None.stateChanges]], literal[null]]
retur... | Keyword[public] Keyword[void] identifier[setStateChanges] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[AssessmentRunStateChange] operator[>] identifier[stateChanges] operator[SEP] {
Keyword[if] operator[SEP] identifier[stateChanges] ope... |
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SESSION_HANDLE:
return isSetSessionHandle();
case CATALOG_NAME:
return isSetCatalogName();
case SCHEMA_NAME:
return isSetSchemaName();
case TABLE_... | class class_name[name] begin[{]
method[isSet, return_type[type[boolean]], modifier[public], parameter[field]] begin[{]
if[binary_operation[member[.field], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, po... | Keyword[public] Keyword[boolean] identifier[isSet] operator[SEP] identifier[_Fields] identifier[field] operator[SEP] {
Keyword[if] operator[SEP] identifier[field] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] opera... |
@Override
public void sawOpcode(int seen) {
if (seen == Const.INVOKEINTERFACE) {
String clsName = getClassConstantOperand();
String methodName = getNameConstantOperand();
if (queryClasses.contains(clsName) && queryMethods.contains(methodName)) {
queryLoca... | class class_name[name] begin[{]
method[sawOpcode, return_type[void], modifier[public], parameter[seen]] begin[{]
if[binary_operation[member[.seen], ==, member[Const.INVOKEINTERFACE]]] begin[{]
local_variable[type[String], clsName]
local_variable[type[String], methodName]... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[sawOpcode] operator[SEP] Keyword[int] identifier[seen] operator[SEP] {
Keyword[if] operator[SEP] identifier[seen] operator[==] identifier[Const] operator[SEP] identifier[INVOKEINTERFACE] operator[SEP] {
identifier[String] iden... |
public final <A extends Number & Comparable<?>> BooleanExpression between(@Nullable A from, @Nullable A to) {
if (from == null) {
if (to != null) {
return loe(to);
} else {
throw new IllegalArgumentException("Either from or to needs to be non-null");
... | class class_name[name] begin[{]
method[between, return_type[type[BooleanExpression]], modifier[final public], parameter[from, to]] begin[{]
if[binary_operation[member[.from], ==, literal[null]]] begin[{]
if[binary_operation[member[.to], !=, literal[null]]] begin[{]
... | Keyword[public] Keyword[final] operator[<] identifier[A] Keyword[extends] identifier[Number] operator[&] identifier[Comparable] operator[<] operator[?] operator[>] operator[>] identifier[BooleanExpression] identifier[between] operator[SEP] annotation[@] identifier[Nullable] identifier[A] identifier[from] , annotation[... |
public void parseRequest() throws IOException {
if (ServletUtil.isMultipartRequest(request)) {
parseRequestStream(request.getInputStream(), characterEncoding);
} else {
Enumeration names = request.getParameterNames();
while (names.hasMoreElements()) {
String paramName = (String) names.nextElement();
... | class class_name[name] begin[{]
method[parseRequest, return_type[void], modifier[public], parameter[]] begin[{]
if[call[ServletUtil.isMultipartRequest, parameter[member[.request]]]] begin[{]
call[.parseRequestStream, parameter[call[request.getInputStream, parameter[]], m... | Keyword[public] Keyword[void] identifier[parseRequest] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[ServletUtil] operator[SEP] identifier[isMultipartRequest] operator[SEP] identifier[request] operator[SEP] operator[SEP] {
identifier[parseRe... |
public void setTag(String tagName, long tagValue) {
tagTable.put(tagName, Long.valueOf(tagValue));
} | class class_name[name] begin[{]
method[setTag, return_type[void], modifier[public], parameter[tagName, tagValue]] begin[{]
call[tagTable.put, parameter[member[.tagName], call[Long.valueOf, parameter[member[.tagValue]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setTag] operator[SEP] identifier[String] identifier[tagName] , Keyword[long] identifier[tagValue] operator[SEP] {
identifier[tagTable] operator[SEP] identifier[put] operator[SEP] identifier[tagName] , identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] iden... |
protected Object invokeGetter(final Object instance, final Method method) {
try {
return method.invoke(instance);
} catch (IllegalAccessException e) {
// shouldn't occur
} catch (InvocationTargetException e) {
// shouldn't occur
}
return null;
} | class class_name[name] begin[{]
method[invokeGetter, return_type[type[Object]], modifier[protected], parameter[instance, method]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, s... | Keyword[protected] identifier[Object] identifier[invokeGetter] operator[SEP] Keyword[final] identifier[Object] identifier[instance] , Keyword[final] identifier[Method] identifier[method] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[method] operator[SEP] identifier[invoke] operator[SEP] i... |
protected void copyOutAttributes(Object target, List<Attribute> jmxAttributeValues,
Map<String, Method> attributeSetters, String identifierKey, Object identifier) {
for (Attribute oneAttribute : jmxAttributeValues) {
String attributeName = oneAttribute.getName()... | class class_name[name] begin[{]
method[copyOutAttributes, return_type[void], modifier[protected], parameter[target, jmxAttributeValues, attributeSetters, identifierKey, identifier]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[V... | Keyword[protected] Keyword[void] identifier[copyOutAttributes] operator[SEP] identifier[Object] identifier[target] , identifier[List] operator[<] identifier[Attribute] operator[>] identifier[jmxAttributeValues] , identifier[Map] operator[<] identifier[String] , identifier[Method] operator[>] identifier[attributeSett... |
public static <D extends Document<?>> Observable<D> read(final ClusterFacade core, final String id,
final ReplicaMode type, final String bucket,
final Map<Class<? extends Document>, Transcoder<? extends Document, ?>> transcoders, final Class<D> target,
final CouchbaseEnvironment environment, fin... | class class_name[name] begin[{]
method[read, return_type[type[Observable]], modifier[public static], parameter[core, id, type, bucket, transcoders, target, environment, timeout, timeUnit]] begin[{]
return[call[Observable.defer, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[A... | Keyword[public] Keyword[static] operator[<] identifier[D] Keyword[extends] identifier[Document] operator[<] operator[?] operator[>] operator[>] identifier[Observable] operator[<] identifier[D] operator[>] identifier[read] operator[SEP] Keyword[final] identifier[ClusterFacade] identifier[core] , Keyword[final] identifi... |
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points, String algorithm, long assumedIntervalMillis) {
return granularityFromPointsInInterval(tenantid, from, to, points, algorithm, assumedIntervalMillis, DEFAULT_TTL_COMPARISON_SOURCE);
} | class class_name[name] begin[{]
method[granularityFromPointsInInterval, return_type[type[Granularity]], modifier[public static], parameter[tenantid, from, to, points, algorithm, assumedIntervalMillis]] begin[{]
return[call[.granularityFromPointsInInterval, parameter[member[.tenantid], member[.from], me... | Keyword[public] Keyword[static] identifier[Granularity] identifier[granularityFromPointsInInterval] operator[SEP] identifier[String] identifier[tenantid] , Keyword[long] identifier[from] , Keyword[long] identifier[to] , Keyword[int] identifier[points] , identifier[String] identifier[algorithm] , Keyword[long] iden... |
public static File substituteExtention( File file, String newExtention ) {
String path = file.getAbsolutePath();
int lastDot = path.lastIndexOf("."); //$NON-NLS-1$
if (lastDot == -1) {
path = path + "." + newExtention; //$NON-NLS-1$
} else {
path = path.substring(... | class class_name[name] begin[{]
method[substituteExtention, return_type[type[File]], modifier[public static], parameter[file, newExtention]] begin[{]
local_variable[type[String], path]
local_variable[type[int], lastDot]
if[binary_operation[member[.lastDot], ==, literal[1]]] begi... | Keyword[public] Keyword[static] identifier[File] identifier[substituteExtention] operator[SEP] identifier[File] identifier[file] , identifier[String] identifier[newExtention] operator[SEP] {
identifier[String] identifier[path] operator[=] identifier[file] operator[SEP] identifier[getAbsolutePath] operator[SEP] ... |
public IfcProfileTypeEnum createIfcProfileTypeEnumFromString(EDataType eDataType, String initialValue) {
IfcProfileTypeEnum result = IfcProfileTypeEnum.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eDataType... | class class_name[name] begin[{]
method[createIfcProfileTypeEnumFromString, return_type[type[IfcProfileTypeEnum]], modifier[public], parameter[eDataType, initialValue]] begin[{]
local_variable[type[IfcProfileTypeEnum], result]
if[binary_operation[member[.result], ==, literal[null]]] begi... | Keyword[public] identifier[IfcProfileTypeEnum] identifier[createIfcProfileTypeEnumFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] {
identifier[IfcProfileTypeEnum] identifier[result] operator[=] identifier[IfcProfileTypeEnum] opera... |
public <T, K> JacksonDBCollection<T, K> getReferenceCollection(JacksonCollectionKey collectionKey) {
JacksonDBCollection<T, K> collection = referencedCollectionCache.get(collectionKey);
if (collection == null) {
collection = new JacksonDBCollection<T, K>(getDB().getCollection(collectionKey.g... | class class_name[name] begin[{]
method[getReferenceCollection, return_type[type[JacksonDBCollection]], modifier[public], parameter[collectionKey]] begin[{]
local_variable[type[JacksonDBCollection], collection]
if[binary_operation[member[.collection], ==, literal[null]]] begin[{]
... | Keyword[public] operator[<] identifier[T] , identifier[K] operator[>] identifier[JacksonDBCollection] operator[<] identifier[T] , identifier[K] operator[>] identifier[getReferenceCollection] operator[SEP] identifier[JacksonCollectionKey] identifier[collectionKey] operator[SEP] {
identifier[JacksonDBCollection]... |
static Thread newThread(String name, Runnable runnable) {
checkNotNull(name);
checkNotNull(runnable);
Thread result = platformThreadFactory().newThread(runnable);
try {
result.setName(name);
} catch (SecurityException e) {
// OK if we can't set the name in this environment.
}
ret... | class class_name[name] begin[{]
method[newThread, return_type[type[Thread]], modifier[static], parameter[name, runnable]] begin[{]
call[.checkNotNull, parameter[member[.name]]]
call[.checkNotNull, parameter[member[.runnable]]]
local_variable[type[Thread], result]
... | Keyword[static] identifier[Thread] identifier[newThread] operator[SEP] identifier[String] identifier[name] , identifier[Runnable] identifier[runnable] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[runnable] o... |
public static int getLastIndexOfIgnoreCase (@Nullable final String sText,
@Nullable final String sSearch,
@Nonnull final Locale aSortLocale)
{
return sText != null &&
sSearch != null &&
sText.length (... | class class_name[name] begin[{]
method[getLastIndexOfIgnoreCase, return_type[type[int]], modifier[public static], parameter[sText, sSearch, aSortLocale]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=sText, ... | Keyword[public] Keyword[static] Keyword[int] identifier[getLastIndexOfIgnoreCase] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sText] , annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sSearch] , annotation[@] identifier[Nonnull] Keyword[... |
private static String sanitizeSqlServerUrl(String jdbcUrl) {
StringBuilder result = new StringBuilder();
result.append(SQLSERVER_PREFIX);
String host;
if (jdbcUrl.contains(";")) {
host = StringUtils.substringBetween(jdbcUrl, SQLSERVER_PREFIX, ";");
} else {
host = StringUtils.substringA... | class class_name[name] begin[{]
method[sanitizeSqlServerUrl, return_type[type[String]], modifier[private static], parameter[jdbcUrl]] begin[{]
local_variable[type[StringBuilder], result]
call[result.append, parameter[member[.SQLSERVER_PREFIX]]]
local_variable[type[String], host]... | Keyword[private] Keyword[static] identifier[String] identifier[sanitizeSqlServerUrl] operator[SEP] identifier[String] identifier[jdbcUrl] operator[SEP] {
identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[result] op... |
public boolean isEditable() {
if (m_request == null) {
return false;
}
CmsExplorerTypeSettings settings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(getResourceTypeName());
if (settings != null) {
String rightSite = OpenCms.getSiteManager().getSiteRoot(... | class class_name[name] begin[{]
method[isEditable, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_request], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[type[Cm... | Keyword[public] Keyword[boolean] identifier[isEditable] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_request] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
identifier[CmsExplorerTypeSettings] identifier[settings] operato... |
public CmsClientProperty getEffectivePropertyObject(CmsClientSitemapEntry entry, String name) {
Map<String, CmsClientProperty> dfProps = entry.getDefaultFileProperties();
CmsClientProperty result = safeLookup(dfProps, name);
if (!CmsClientProperty.isPropertyEmpty(result)) {
return r... | class class_name[name] begin[{]
method[getEffectivePropertyObject, return_type[type[CmsClientProperty]], modifier[public], parameter[entry, name]] begin[{]
local_variable[type[Map], dfProps]
local_variable[type[CmsClientProperty], result]
if[call[CmsClientProperty.isPropertyEmpt... | Keyword[public] identifier[CmsClientProperty] identifier[getEffectivePropertyObject] operator[SEP] identifier[CmsClientSitemapEntry] identifier[entry] , identifier[String] identifier[name] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[CmsClientProperty] operator[>] identifier[dfPr... |
public void setGranulePosition(long position) {
currentGranulePosition = position;
for(OggPage p : buffer) {
p.setGranulePosition(position);
}
} | class class_name[name] begin[{]
method[setGranulePosition, return_type[void], modifier[public], parameter[position]] begin[{]
assign[member[.currentGranulePosition], member[.position]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocati... | Keyword[public] Keyword[void] identifier[setGranulePosition] operator[SEP] Keyword[long] identifier[position] operator[SEP] {
identifier[currentGranulePosition] operator[=] identifier[position] operator[SEP] Keyword[for] operator[SEP] identifier[OggPage] identifier[p] operator[:] identifier[buffer] operator[SEP... |
@Override
public void onMenuStateChanged(@NonNull MenuState menuState) {
if (menuState == MenuState.CLOSING && popupMenu != null) {
popupMenu.dismiss();
}
} | class class_name[name] begin[{]
method[onMenuStateChanged, return_type[void], modifier[public], parameter[menuState]] begin[{]
if[binary_operation[binary_operation[member[.menuState], ==, member[MenuState.CLOSING]], &&, binary_operation[member[.popupMenu], !=, literal[null]]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onMenuStateChanged] operator[SEP] annotation[@] identifier[NonNull] identifier[MenuState] identifier[menuState] operator[SEP] {
Keyword[if] operator[SEP] identifier[menuState] operator[==] identifier[MenuState] operator[SEP] identifier[C... |
public static boolean checkPartitionBelongsToNode(int partition,
int nodeId,
Cluster cluster,
StoreDefinition storeDef) {
List<Integer> nodePartitions... | class class_name[name] begin[{]
method[checkPartitionBelongsToNode, return_type[type[boolean]], modifier[public static], parameter[partition, nodeId, cluster, storeDef]] begin[{]
local_variable[type[List], nodePartitions]
local_variable[type[List], replicatingPartitions]
call[re... | Keyword[public] Keyword[static] Keyword[boolean] identifier[checkPartitionBelongsToNode] operator[SEP] Keyword[int] identifier[partition] , Keyword[int] identifier[nodeId] , identifier[Cluster] identifier[cluster] , identifier[StoreDefinition] identifier[storeDef] operator[SEP] {
identifier[List] operator[<] ... |
@Override
@Deprecated
public T from(final String string) throws IllegalArgumentException, DescriptorImportException {
return fromString(string);
} | class class_name[name] begin[{]
method[from, return_type[type[T]], modifier[public], parameter[string]] begin[{]
return[call[.fromString, parameter[member[.string]]]]
end[}]
END[}] | annotation[@] identifier[Override] annotation[@] identifier[Deprecated] Keyword[public] identifier[T] identifier[from] operator[SEP] Keyword[final] identifier[String] identifier[string] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] , identifier[DescriptorImportException] {
Keyword[return] i... |
public String getMessage(String key, Object arg)
throws MissingResourceException {
return getMessage(key, new Object[] {arg});
} | class class_name[name] begin[{]
method[getMessage, return_type[type[String]], modifier[public], parameter[key, arg]] begin[{]
return[call[.getMessage, parameter[member[.key], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=arg, postfix_operators=[], pre... | Keyword[public] identifier[String] identifier[getMessage] operator[SEP] identifier[String] identifier[key] , identifier[Object] identifier[arg] operator[SEP] Keyword[throws] identifier[MissingResourceException] {
Keyword[return] identifier[getMessage] operator[SEP] identifier[key] , Keyword[new] identifier[Obj... |
protected FeatureListResourceFactory newFeatureListResourceFactory(URI resourceUri) {
final String methodName = "newFeatureMapJSResourceFactory"; //$NON-NLS-1$
boolean traceLogging = log.isLoggable(Level.FINER);
if (traceLogging) {
log.entering(sourceClass, methodName, new Object[]{resourceUri});
}
F... | class class_name[name] begin[{]
method[newFeatureListResourceFactory, return_type[type[FeatureListResourceFactory]], modifier[protected], parameter[resourceUri]] begin[{]
local_variable[type[String], methodName]
local_variable[type[boolean], traceLogging]
if[member[.traceLogging... | Keyword[protected] identifier[FeatureListResourceFactory] identifier[newFeatureListResourceFactory] operator[SEP] identifier[URI] identifier[resourceUri] operator[SEP] {
Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] Keyword[boolean] identifier[traceLogging] op... |
public static String getBufferTraceInfo(WsByteBuffer buffer) {
if (null == buffer) {
return "null";
}
StringBuilder sb = new StringBuilder(64);
sb.append("hc=").append(buffer.hashCode());
sb.append(" pos=").append(buffer.position());
sb.append(" lim=").append(... | class class_name[name] begin[{]
method[getBufferTraceInfo, return_type[type[String]], modifier[public static], parameter[buffer]] begin[{]
if[binary_operation[literal[null], ==, member[.buffer]]] begin[{]
return[literal["null"]]
else begin[{]
None
end[}]
loca... | Keyword[public] Keyword[static] identifier[String] identifier[getBufferTraceInfo] operator[SEP] identifier[WsByteBuffer] identifier[buffer] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[buffer] operator[SEP] {
Keyword[return] literal[String] operator[SEP]
}
... |
protected int fill(RecyclerView.Recycler recycler, LayoutState layoutState,
RecyclerView.State state, boolean stopOnFocusable) {
// max offset we should set is mFastScroll + available
final int start = layoutState.mAvailable;
if (layoutState.mScrollingOffset != LayoutState... | class class_name[name] begin[{]
method[fill, return_type[type[int]], modifier[protected], parameter[recycler, layoutState, state, stopOnFocusable]] begin[{]
local_variable[type[int], start]
if[binary_operation[member[layoutState.mScrollingOffset], !=, member[LayoutState.SCOLLING_OFFSET_... | Keyword[protected] Keyword[int] identifier[fill] operator[SEP] identifier[RecyclerView] operator[SEP] identifier[Recycler] identifier[recycler] , identifier[LayoutState] identifier[layoutState] , identifier[RecyclerView] operator[SEP] identifier[State] identifier[state] , Keyword[boolean] identifier[stopOnFocusable]... |
private boolean isIconTargetClicked() {
String targetHtml = EventHandler.getNativeMouseTarget().getString();
if (targetHtml.indexOf(ICON_EXTENSION) != -1) {
return true;
}
return false;
} | class class_name[name] begin[{]
method[isIconTargetClicked, return_type[type[boolean]], modifier[private], parameter[]] begin[{]
local_variable[type[String], targetHtml]
if[binary_operation[call[targetHtml.indexOf, parameter[member[.ICON_EXTENSION]]], !=, literal[1]]] begin[{]
... | Keyword[private] Keyword[boolean] identifier[isIconTargetClicked] operator[SEP] operator[SEP] {
identifier[String] identifier[targetHtml] operator[=] identifier[EventHandler] operator[SEP] identifier[getNativeMouseTarget] operator[SEP] operator[SEP] operator[SEP] identifier[getString] operator[SEP] operator[SEP]... |
@java.lang.Deprecated
public java.util.Map<java.lang.Integer, java.lang.String> getTasks() {
return getTasksMap();
} | class class_name[name] begin[{]
method[getTasks, return_type[type[java]], modifier[public], parameter[]] begin[{]
return[call[.getTasksMap, parameter[]]]
end[}]
END[}] | annotation[@] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Deprecated] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Integer] , identifier[java] operator[SEP]... |
public void sessionCreated(HttpSessionEvent event) {
HttpSessionCreatedEvent e = new HttpSessionCreatedEvent(event.getSession());
Log log = LogFactory.getLog(LOGGER_NAME);
if (log.isDebugEnabled()) {
log.debug("Publishing event: " + e);
}
getContext(event.getSession().getServletContext()).publishEvent(e)... | class class_name[name] begin[{]
method[sessionCreated, return_type[void], modifier[public], parameter[event]] begin[{]
local_variable[type[HttpSessionCreatedEvent], e]
local_variable[type[Log], log]
if[call[log.isDebugEnabled, parameter[]]] begin[{]
call[... | Keyword[public] Keyword[void] identifier[sessionCreated] operator[SEP] identifier[HttpSessionEvent] identifier[event] operator[SEP] {
identifier[HttpSessionCreatedEvent] identifier[e] operator[=] Keyword[new] identifier[HttpSessionCreatedEvent] operator[SEP] identifier[event] operator[SEP] identifier[getSession]... |
public void addHandlerFactory(ManagementRequestHandlerFactory factory) {
for (;;) {
final ManagementRequestHandlerFactory[] snapshot = updater.get(this);
final int length = snapshot.length;
final ManagementRequestHandlerFactory[] newVal = new ManagementRequestHandlerFactory[l... | class class_name[name] begin[{]
method[addHandlerFactory, return_type[void], modifier[public], parameter[factory]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argum... | Keyword[public] Keyword[void] identifier[addHandlerFactory] operator[SEP] identifier[ManagementRequestHandlerFactory] identifier[factory] operator[SEP] {
Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
Keyword[final] identifier[ManagementRequestHandlerFactory] operator[SEP] oper... |
void createRowElementLinkedLists( int leftmost[] , int w[]) {
for (int k = 0; k < n; k++) {
w[head+k] = -1; w[tail+k] = -1; w[nque+k] = 0;
}
// scan rows in reverse order creating a linked list of nz element indexes in each row
for (int i = m-1; i >= 0; i--) {
i... | class class_name[name] begin[{]
method[createRowElementLinkedLists, return_type[void], modifier[default], parameter[leftmost, w]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=w, postfix_operators=[], prefi... | Keyword[void] identifier[createRowElementLinkedLists] operator[SEP] Keyword[int] identifier[leftmost] operator[SEP] operator[SEP] , Keyword[int] identifier[w] operator[SEP] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operat... |
public double area() {
return (p1.x-p0.x)*(p1.y-p0.y)*(p1.z-p0.z);
} | class class_name[name] begin[{]
method[area, return_type[type[double]], modifier[public], parameter[]] begin[{]
return[binary_operation[binary_operation[binary_operation[member[p1.x], -, member[p0.x]], *, binary_operation[member[p1.y], -, member[p0.y]]], *, binary_operation[member[p1.z], -, member[p0.z... | Keyword[public] Keyword[double] identifier[area] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP] identifier[p1] operator[SEP] identifier[x] operator[-] identifier[p0] operator[SEP] identifier[x] operator[SEP] operator[*] operator[SEP] identifier[p1] operator[SEP] identifier[y] operator[-] identifier[... |
public boolean printData(PrintWriter out, int iPrintOptions)
{
if ((this.getScreenField().getConverter().getField() instanceof XmlField)
|| (this.getScreenField().getConverter().getField() instanceof HtmlField)
|| (this.getScreenField().getConverter().getField() instanceof XMLPropert... | class class_name[name] begin[{]
method[printData, return_type[type[boolean]], modifier[public], parameter[out, iPrintOptions]] begin[{]
if[binary_operation[binary_operation[binary_operation[THIS[call[None.getScreenField, parameter[]]call[None.getConverter, parameter[]]call[None.getField, parame... | Keyword[public] Keyword[boolean] identifier[printData] operator[SEP] identifier[PrintWriter] identifier[out] , Keyword[int] identifier[iPrintOptions] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] identifie... |
public static void getDefaultValues(Properties defaultValues) {
defaultValues.put(NetworkConfig.SERIALIZER_CLASSNAME, DEFAULT_EVENT_SERIALIZER.getName());
defaultValues.put(NetworkConfig.ENCRYPTER_CLASSNAME, DEFAULT_EVENT_ENCRYPTER.getName());
} | class class_name[name] begin[{]
method[getDefaultValues, return_type[void], modifier[public static], parameter[defaultValues]] begin[{]
call[defaultValues.put, parameter[member[NetworkConfig.SERIALIZER_CLASSNAME], call[DEFAULT_EVENT_SERIALIZER.getName, parameter[]]]]
call[defaul... | Keyword[public] Keyword[static] Keyword[void] identifier[getDefaultValues] operator[SEP] identifier[Properties] identifier[defaultValues] operator[SEP] {
identifier[defaultValues] operator[SEP] identifier[put] operator[SEP] identifier[NetworkConfig] operator[SEP] identifier[SERIALIZER_CLASSNAME] , identifier[DE... |
public void printRelations(ClassDoc c) {
Options opt = optionProvider.getOptionsFor(c);
if (hidden(c) || c.name().equals("")) // avoid phantom classes, they may pop up when the source uses annotations
return;
// Print generalization (through the Java superclass)
Type s = c.superclassType();
ClassDoc sc = s !=... | class class_name[name] begin[{]
method[printRelations, return_type[void], modifier[public], parameter[c]] begin[{]
local_variable[type[Options], opt]
if[binary_operation[call[.hidden, parameter[member[.c]]], ||, call[c.name, parameter[]]]] begin[{]
return[None]
else begin[{]
Non... | Keyword[public] Keyword[void] identifier[printRelations] operator[SEP] identifier[ClassDoc] identifier[c] operator[SEP] {
identifier[Options] identifier[opt] operator[=] identifier[optionProvider] operator[SEP] identifier[getOptionsFor] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[if] operator... |
public void marshall(DescribeEventsRequest describeEventsRequest, ProtocolMarshaller protocolMarshaller) {
if (describeEventsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(describeEventsRe... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[describeEventsRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.describeEventsRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Lit... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DescribeEventsRequest] identifier[describeEventsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[describeEventsRequest] operator[==] Other[null] operator[SEP] ... |
public WatchObject watch(final boolean enable, final boolean dumpData, final String device) throws IOException, JSONException {
JSONObject watch = new JSONObject();
watch.put("class", "WATCH");
watch.put("enable", enable);
watch.put("json", dumpData);
if (device != null) {
watch.put("device", device);
}
... | class class_name[name] begin[{]
method[watch, return_type[type[WatchObject]], modifier[public], parameter[enable, dumpData, device]] begin[{]
local_variable[type[JSONObject], watch]
call[watch.put, parameter[literal["class"], literal["WATCH"]]]
call[watch.put, parameter[... | Keyword[public] identifier[WatchObject] identifier[watch] operator[SEP] Keyword[final] Keyword[boolean] identifier[enable] , Keyword[final] Keyword[boolean] identifier[dumpData] , Keyword[final] identifier[String] identifier[device] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JSONException] {... |
public static void log(Level level, String message) {
Logger.getLogger("LEX4J").log(level, message);
} | class class_name[name] begin[{]
method[log, return_type[void], modifier[public static], parameter[level, message]] begin[{]
call[Logger.getLogger, parameter[literal["LEX4J"]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[log] operator[SEP] identifier[Level] identifier[level] , identifier[String] identifier[message] operator[SEP] {
identifier[Logger] operator[SEP] identifier[getLogger] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[log] operator[SEP] ... |
public B setCustomUserAgent(String customUserAgent) {
if (customUserAgent != null && !customUserAgent.isEmpty()) {
httpParams.customUserAgent = customUserAgent;
}
return self();
} | class class_name[name] begin[{]
method[setCustomUserAgent, return_type[type[B]], modifier[public], parameter[customUserAgent]] begin[{]
if[binary_operation[binary_operation[member[.customUserAgent], !=, literal[null]], &&, call[customUserAgent.isEmpty, parameter[]]]] begin[{]
... | Keyword[public] identifier[B] identifier[setCustomUserAgent] operator[SEP] identifier[String] identifier[customUserAgent] operator[SEP] {
Keyword[if] operator[SEP] identifier[customUserAgent] operator[!=] Other[null] operator[&&] operator[!] identifier[customUserAgent] operator[SEP] identifier[isEmpty] operator[... |
public final String getStartFormattedLong() {
Granularity startGran = this.interval.getStartGranularity();
return formatStart(startGran != null ? startGran.getLongFormat() : null);
} | class class_name[name] begin[{]
method[getStartFormattedLong, return_type[type[String]], modifier[final public], parameter[]] begin[{]
local_variable[type[Granularity], startGran]
return[call[.formatStart, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=sta... | Keyword[public] Keyword[final] identifier[String] identifier[getStartFormattedLong] operator[SEP] operator[SEP] {
identifier[Granularity] identifier[startGran] operator[=] Keyword[this] operator[SEP] identifier[interval] operator[SEP] identifier[getStartGranularity] operator[SEP] operator[SEP] operator[SEP] Keyw... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.