code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void decode(AsnInputStream ais) throws ParseException {
try {
AsnInputStream localAis = ais.readSequenceStream();
int tag = localAis.readTag();
if (tag != Tag.OBJECT_IDENTIFIER || localAis.getTagClass() != Tag.CLASS_UNIVERSAL)
throw new ParseException(P... | class class_name[name] begin[{]
method[decode, return_type[void], modifier[public], parameter[ais]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readSequenceStream, postfix_operator... | Keyword[public] Keyword[void] identifier[decode] operator[SEP] identifier[AsnInputStream] identifier[ais] operator[SEP] Keyword[throws] identifier[ParseException] {
Keyword[try] {
identifier[AsnInputStream] identifier[localAis] operator[=] identifier[ais] operator[SEP] identifier[readSequenceStream] o... |
private String[] stringVect2StringArray(final Vector v) {
final String[] array = new String[v.size()];
for (int i = 0; i < v.size(); i++) {
array[i] = (String) v.elementAt(i);
}
return array;
} | class class_name[name] begin[{]
method[stringVect2StringArray, return_type[type[String]], modifier[private], parameter[v]] begin[{]
local_variable[type[String], array]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(... | Keyword[private] identifier[String] operator[SEP] operator[SEP] identifier[stringVect2StringArray] operator[SEP] Keyword[final] identifier[Vector] identifier[v] operator[SEP] {
Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[array] operator[=] Keyword[new] identifier[String] operator[SEP... |
private TransactionContext getOrCreateTransactionContext()
{
TransactionContext ctx = contexts.get();
if (ctx == null)
{
// No transaction context exists so we create a new one
ctx = new TransactionContext();
contexts.set(ctx);
}
return ctx;
} | class class_name[name] begin[{]
method[getOrCreateTransactionContext, return_type[type[TransactionContext]], modifier[private], parameter[]] begin[{]
local_variable[type[TransactionContext], ctx]
if[binary_operation[member[.ctx], ==, literal[null]]] begin[{]
assi... | Keyword[private] identifier[TransactionContext] identifier[getOrCreateTransactionContext] operator[SEP] operator[SEP] {
identifier[TransactionContext] identifier[ctx] operator[=] identifier[contexts] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ctx]... |
public void timestamp(String name, ZonedDateTime value) {
Counter counter = get(name, CounterType.Timestamp);
counter.setTime(value != null ? value : ZonedDateTime.now(ZoneId.of("Z")));
update();
} | class class_name[name] begin[{]
method[timestamp, return_type[void], modifier[public], parameter[name, value]] begin[{]
local_variable[type[Counter], counter]
call[counter.setTime, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_opera... | Keyword[public] Keyword[void] identifier[timestamp] operator[SEP] identifier[String] identifier[name] , identifier[ZonedDateTime] identifier[value] operator[SEP] {
identifier[Counter] identifier[counter] operator[=] identifier[get] operator[SEP] identifier[name] , identifier[CounterType] operator[SEP] identifi... |
@SuppressWarnings("unchecked")
public static boolean load(GLImplementation implementation) {
try {
final Constructor<?> constructor = Class.forName(implementation.getContextName()).getDeclaredConstructor();
constructor.setAccessible(true);
implementations.put(implementati... | class class_name[name] begin[{]
method[load, return_type[type[boolean]], modifier[public static], parameter[implementation]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(argu... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[boolean] identifier[load] operator[SEP] identifier[GLImplementation] identifier[implementation] operator[SEP] {
Keyword[try] {
Keyword[final] identifier[Constructor] operator[... |
@Override
public String remoteIP(){
String remoteAddr = request.ip();
// This could be a list of proxy IPs, which the developer could
// provide via some configuration
if ("127.0.0.1".equals(remoteAddr) || "0:0:0:0:0:0:0:1".equals(remoteAddr))
remoteAddr = Optio... | class class_name[name] begin[{]
method[remoteIP, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], remoteAddr]
if[binary_operation[literal["127.0.0.1"], ||, literal["0:0:0:0:0:0:0:1"]]] begin[{]
assign[member[.remoteAddr], call[O... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[remoteIP] operator[SEP] operator[SEP] {
identifier[String] identifier[remoteAddr] operator[=] identifier[request] operator[SEP] identifier[ip] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] opera... |
@Override
public void commitTask(TaskAttemptContext context) throws IOException {
Path workPath = getWorkPath();
FileSystem fs = workPath.getFileSystem(context.getConfiguration());
if (fs.exists(workPath)) {
long recordCount = getRecordCountFromCounter(context, RecordKeyDedupReducerBase.EVENT_COUNT... | class class_name[name] begin[{]
method[commitTask, return_type[void], modifier[public], parameter[context]] begin[{]
local_variable[type[Path], workPath]
local_variable[type[FileSystem], fs]
if[call[fs.exists, parameter[member[.workPath]]]] begin[{]
local_variable[ty... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[commitTask] operator[SEP] identifier[TaskAttemptContext] identifier[context] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Path] identifier[workPath] operator[=] identifier[getWorkPath] operator[SEP] operator[SEP] op... |
private String getPrefixNameByPercent() {
StringBuilder buffer = new StringBuilder();
buffer.append("_").append(Math.round(100 * percent)).append("p_");
return new String(buffer);
} | class class_name[name] begin[{]
method[getPrefixNameByPercent, return_type[type[String]], modifier[private], parameter[]] begin[{]
local_variable[type[StringBuilder], buffer]
call[buffer.append, parameter[literal["_"]]]
return[ClassCreator(arguments=[MemberReference(member=buffe... | Keyword[private] identifier[String] identifier[getPrefixNameByPercent] operator[SEP] operator[SEP] {
identifier[StringBuilder] identifier[buffer] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[append] operator[SEP] literal[... |
public Observable<ServiceResponse<Page<ApplicationGatewayInner>>> listAllNextWithServiceResponseAsync(final String nextPageLink) {
return listAllNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<ApplicationGatewayInner>>, Observable<ServiceResponse<Page<ApplicationGatewayIn... | class class_name[name] begin[{]
method[listAllNextWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{]
return[call[.listAllNextSinglePageAsync, parameter[member[.nextPageLink]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ApplicationGatewayInner] operator[>] operator[>] operator[>] identifier[listAllNextWithServiceResponseAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operato... |
private String getAuthMethod(final Deployment dep) {
for (final Endpoint ejbEndpoint : dep.getService().getEndpoints()) {
final String beanAuthMethod = ejb3SecurityAccessor.getAuthMethod(ejbEndpoint);
final boolean hasBeanAuthMethod = beanAuthMethod != null;
if (hasBeanAuthM... | class class_name[name] begin[{]
method[getAuthMethod, return_type[type[String]], modifier[private], parameter[dep]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argu... | Keyword[private] identifier[String] identifier[getAuthMethod] operator[SEP] Keyword[final] identifier[Deployment] identifier[dep] operator[SEP] {
Keyword[for] operator[SEP] Keyword[final] identifier[Endpoint] identifier[ejbEndpoint] operator[:] identifier[dep] operator[SEP] identifier[getService] operator[SEP] ... |
public static double dot(DoubleTuple t0, DoubleTuple t1)
{
Utils.checkForEqualSize(t0, t1);
double result = 0;
for (int i=0; i<t0.getSize(); i++)
{
result += t0.get(i) * t1.get(i);
}
return result;
} | class class_name[name] begin[{]
method[dot, return_type[type[double]], modifier[public static], parameter[t0, t1]] begin[{]
call[Utils.checkForEqualSize, parameter[member[.t0], member[.t1]]]
local_variable[type[double], result]
ForStatement(body=BlockStatement(label=None, statem... | Keyword[public] Keyword[static] Keyword[double] identifier[dot] operator[SEP] identifier[DoubleTuple] identifier[t0] , identifier[DoubleTuple] identifier[t1] operator[SEP] {
identifier[Utils] operator[SEP] identifier[checkForEqualSize] operator[SEP] identifier[t0] , identifier[t1] operator[SEP] operator[SEP] K... |
@GwtIncompatible("com.google.io.Files")
public void save(String filename) throws IOException {
Files.write(toBytes(), new File(filename));
} | class class_name[name] begin[{]
method[save, return_type[void], modifier[public], parameter[filename]] begin[{]
call[Files.write, parameter[call[.toBytes, parameter[]], ClassCreator(arguments=[MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]... | annotation[@] identifier[GwtIncompatible] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[save] operator[SEP] identifier[String] identifier[filename] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Files] operator[SEP] identifier[write] operator[SEP] identi... |
ListenableFuture<Void> closeAsync() {
ListenableFuture<Void> retFuture = null;
synchronized (lock) {
if (closureFuture != null) {
throw new IllegalStateException("Close has already been invoked");
}
// Fail all pending waiters.
Waiter waiter = readWaiters.poll();
while (wai... | class class_name[name] begin[{]
method[closeAsync, return_type[type[ListenableFuture]], modifier[default], parameter[]] begin[{]
local_variable[type[ListenableFuture], retFuture]
SYNCHRONIZED[member[.lock]] BEGIN[{]
if[binary_operation[member[.closureFuture], !=,... | identifier[ListenableFuture] operator[<] identifier[Void] operator[>] identifier[closeAsync] operator[SEP] operator[SEP] {
identifier[ListenableFuture] operator[<] identifier[Void] operator[>] identifier[retFuture] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] identifier[lock] operato... |
public void shutdown() {
if (shutdownFlag.compareAndSet(false, true)) {
try {
if (LogManager.getLogManager() instanceof ShutdownLogManager)
((ShutdownLogManager) LogManager.getLogManager()).shutdown();
} catch (NoClassDefFoundError ignore) {
// Om nom nom. Some custom class loa... | class class_name[name] begin[{]
method[shutdown, return_type[void], modifier[public], parameter[]] begin[{]
if[call[shutdownFlag.compareAndSet, parameter[literal[false], literal[true]]]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arg... | Keyword[public] Keyword[void] identifier[shutdown] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[shutdownFlag] operator[SEP] identifier[compareAndSet] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[if] operato... |
public CmsUUID addForbiddenParentFolder(String parentFolder, String reason) {
CmsUUID id = new CmsUUID();
m_forbiddenParentFolders.put(id, new ForbiddenFolderEntry(parentFolder, reason));
return id;
} | class class_name[name] begin[{]
method[addForbiddenParentFolder, return_type[type[CmsUUID]], modifier[public], parameter[parentFolder, reason]] begin[{]
local_variable[type[CmsUUID], id]
call[m_forbiddenParentFolders.put, parameter[member[.id], ClassCreator(arguments=[MemberReference(me... | Keyword[public] identifier[CmsUUID] identifier[addForbiddenParentFolder] operator[SEP] identifier[String] identifier[parentFolder] , identifier[String] identifier[reason] operator[SEP] {
identifier[CmsUUID] identifier[id] operator[=] Keyword[new] identifier[CmsUUID] operator[SEP] operator[SEP] operator[SEP] ide... |
public Request createGetRequest(String url, Map<String, Object> params, String apiKey, String accessToken) {
HttpUrl.Builder httpBuilder = HttpUrl.parse(url).newBuilder();
for(Map.Entry<String, Object> entry: params.entrySet()){
httpBuilder.addQueryParameter(entry.getKey(), entry.getValue().... | class class_name[name] begin[{]
method[createGetRequest, return_type[type[Request]], modifier[public], parameter[url, params, apiKey, accessToken]] begin[{]
local_variable[type[HttpUrl], httpBuilder]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodI... | Keyword[public] identifier[Request] identifier[createGetRequest] operator[SEP] identifier[String] identifier[url] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[params] , identifier[String] identifier[apiKey] , identifier[String] identifier[accessToken] operator[SEP] {... |
public void writingState()
{
if (!this.writtenState)
{
this.writtenState = true;
this.writtenStateWithoutWrapper = false;
this.fast = new FastWriter(this.initialSize);
this.out = this.fast;
}
} | class class_name[name] begin[{]
method[writingState, return_type[void], modifier[public], parameter[]] begin[{]
if[THIS[member[None.writtenState]]] begin[{]
assign[THIS[member[None.writtenState]], literal[true]]
assign[THIS[member[None.writtenStat... | Keyword[public] Keyword[void] identifier[writingState] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[writtenState] operator[SEP] {
Keyword[this] operator[SEP] identifier[writtenState] operator[=] literal[boolean] operator[SEP] Keyword[this] ... |
private ClassicCounter<Pair<F, L>> convertWeights(ClassicCounter<Integer> weights, Index<F> featureIndex, Index<L> labelIndex, boolean multiclass) {
return multiclass ? convertSVMStructWeights(weights, featureIndex, labelIndex) : convertSVMLightWeights(weights, featureIndex, labelIndex);
} | class class_name[name] begin[{]
method[convertWeights, return_type[type[ClassicCounter]], modifier[private], parameter[weights, featureIndex, labelIndex, multiclass]] begin[{]
return[TernaryExpression(condition=MemberReference(member=multiclass, postfix_operators=[], prefix_operators=[], qualifier=, se... | Keyword[private] identifier[ClassicCounter] operator[<] identifier[Pair] operator[<] identifier[F] , identifier[L] operator[>] operator[>] identifier[convertWeights] operator[SEP] identifier[ClassicCounter] operator[<] identifier[Integer] operator[>] identifier[weights] , identifier[Index] operator[<] identifier[F] o... |
@Pure
static boolean contains(int region, double cutX, double cutY, double pointX, double pointY) {
switch (IcosepQuadTreeZone.values()[region]) {
case SOUTH_WEST:
return pointX <= cutX && pointY <= cutY;
case SOUTH_EAST:
return pointX >= cutX && pointY <= cutY;
case NORTH_WEST:
return pointX <= cutX ... | class class_name[name] begin[{]
method[contains, return_type[type[boolean]], modifier[static], parameter[region, cutX, cutY, pointX, pointY]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['SOUTH_WEST'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl... | annotation[@] identifier[Pure] Keyword[static] Keyword[boolean] identifier[contains] operator[SEP] Keyword[int] identifier[region] , Keyword[double] identifier[cutX] , Keyword[double] identifier[cutY] , Keyword[double] identifier[pointX] , Keyword[double] identifier[pointY] operator[SEP] {
Keyword[switch] op... |
private HttpHandler configureUndertow(Configuration configuration, Undertow.Builder builder, HttpHandler rootHandler, URL undertowResource) {
try {
if (jaxb == null) {
// we don't want static references here
jaxb = JAXBContext.newInstance("org.ops4j.pax.web.service.un... | class class_name[name] begin[{]
method[configureUndertow, return_type[type[HttpHandler]], modifier[private], parameter[configuration, builder, rootHandler, undertowResource]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=jaxb, postfix_operators=[], p... | Keyword[private] identifier[HttpHandler] identifier[configureUndertow] operator[SEP] identifier[Configuration] identifier[configuration] , identifier[Undertow] operator[SEP] identifier[Builder] identifier[builder] , identifier[HttpHandler] identifier[rootHandler] , identifier[URL] identifier[undertowResource] operat... |
private boolean isCRDTReplica(int configuredReplicaCount) {
final Collection<Member> dataMembers = getNodeEngine().getClusterService()
.getMembers(MemberSelectors.DATA_MEMBER_SELECTOR);
final Iterator<Member> dataMemberIterator = dataMembers.... | class class_name[name] begin[{]
method[isCRDTReplica, return_type[type[boolean]], modifier[private], parameter[configuredReplicaCount]] begin[{]
local_variable[type[Collection], dataMembers]
local_variable[type[Iterator], dataMemberIterator]
local_variable[type[Address], thisAddress]
... | Keyword[private] Keyword[boolean] identifier[isCRDTReplica] operator[SEP] Keyword[int] identifier[configuredReplicaCount] operator[SEP] {
Keyword[final] identifier[Collection] operator[<] identifier[Member] operator[>] identifier[dataMembers] operator[=] identifier[getNodeEngine] operator[SEP] operator[SEP] oper... |
boolean isPreferredAddress(InetAddress address) {
if (this.properties.isUseOnlySiteLocalInterfaces()) {
final boolean siteLocalAddress = address.isSiteLocalAddress();
if (!siteLocalAddress) {
this.log.trace("Ignoring address: " + address.getHostAddress());
}
return siteLocalAddress;
}
final List<... | class class_name[name] begin[{]
method[isPreferredAddress, return_type[type[boolean]], modifier[default], parameter[address]] begin[{]
if[THIS[member[None.properties]call[None.isUseOnlySiteLocalInterfaces, parameter[]]]] begin[{]
local_variable[type[boolean], siteLocalAddress]
... | Keyword[boolean] identifier[isPreferredAddress] operator[SEP] identifier[InetAddress] identifier[address] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[properties] operator[SEP] identifier[isUseOnlySiteLocalInterfaces] operator[SEP] operator[SEP] operator[SEP] {
Keyw... |
public AnalysisEngineDescription buildComponent(int stageId, int phase, AnyObject aeDescription)
throws Exception {
Map<String, Object> tuples = Maps.newLinkedHashMap();
tuples.put(BasePhase.QA_INTERNAL_PHASEID, new Integer(phase));
tuples.put(EXPERIMENT_UUID_PROPERTY, experimentUuid);
tuples.... | class class_name[name] begin[{]
method[buildComponent, return_type[type[AnalysisEngineDescription]], modifier[public], parameter[stageId, phase, aeDescription]] begin[{]
local_variable[type[Map], tuples]
call[tuples.put, parameter[member[BasePhase.QA_INTERNAL_PHASEID], ClassCreator(argu... | Keyword[public] identifier[AnalysisEngineDescription] identifier[buildComponent] operator[SEP] Keyword[int] identifier[stageId] , Keyword[int] identifier[phase] , identifier[AnyObject] identifier[aeDescription] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Map] operator[<] identifier[String]... |
private void processEvent(NFAState nfaState, IN event, long timestamp) throws Exception {
try (SharedBufferAccessor<IN> sharedBufferAccessor = partialMatches.getAccessor()) {
Collection<Map<String, List<IN>>> patterns =
nfa.process(sharedBufferAccessor, nfaState, event, timestamp, afterMatchSkipStrategy, cepTi... | class class_name[name] begin[{]
method[processEvent, return_type[void], modifier[private], parameter[nfaState, event, timestamp]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(... | Keyword[private] Keyword[void] identifier[processEvent] operator[SEP] identifier[NFAState] identifier[nfaState] , identifier[IN] identifier[event] , Keyword[long] identifier[timestamp] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[try] operator[SEP] identifier[SharedBufferAccessor] operator[<] ... |
public static InetAddress InetAddressByIPv6(String address) {
StringTokenizer addressTokens = new StringTokenizer(address, ":");
byte[] bytes = new byte[16];
if (addressTokens.countTokens() == 8) {
int count = 0;
while (addressTokens.hasMoreTokens()) {
int word = Integer.parseInt(a... | class class_name[name] begin[{]
method[InetAddressByIPv6, return_type[type[InetAddress]], modifier[public static], parameter[address]] begin[{]
local_variable[type[StringTokenizer], addressTokens]
local_variable[type[byte], bytes]
if[binary_operation[call[addressTokens.countToke... | Keyword[public] Keyword[static] identifier[InetAddress] identifier[InetAddressByIPv6] operator[SEP] identifier[String] identifier[address] operator[SEP] {
identifier[StringTokenizer] identifier[addressTokens] operator[=] Keyword[new] identifier[StringTokenizer] operator[SEP] identifier[address] , literal[String... |
@Override
public boolean add(T elem) {
/* First, check if we're completely out of space. If so, do a resize
* to ensure we do indeed have room.
*/
if (size() == mArrays.length * mArrays.length)
grow();
/* Compute the (arr, index) pair for the next posi... | class class_name[name] begin[{]
method[add, return_type[type[boolean]], modifier[public], parameter[elem]] begin[{]
if[binary_operation[call[.size, parameter[]], ==, binary_operation[member[mArrays.length], *, member[mArrays.length]]]] begin[{]
call[.grow, parameter[]]
else ... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[add] operator[SEP] identifier[T] identifier[elem] operator[SEP] {
Keyword[if] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] identifier[mArrays] operator[SEP] identifier[length] operator[*] identifier[mArrays]... |
@Deprecated
public String generateSecuredApiKey(String privateApiKey, String tagFilters, String userToken) throws NoSuchAlgorithmException, InvalidKeyException, AlgoliaException {
if (!tagFilters.contains("="))
return generateSecuredApiKey(privateApiKey, new Query().setTagFilters(tagFilters), userToken);
... | class class_name[name] begin[{]
method[generateSecuredApiKey, return_type[type[String]], modifier[public], parameter[privateApiKey, tagFilters, userToken]] begin[{]
if[call[tagFilters.contains, parameter[literal["="]]]] begin[{]
return[call[.generateSecuredApiKey, parameter[member[.privateApiKe... | annotation[@] identifier[Deprecated] Keyword[public] identifier[String] identifier[generateSecuredApiKey] operator[SEP] identifier[String] identifier[privateApiKey] , identifier[String] identifier[tagFilters] , identifier[String] identifier[userToken] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException]... |
protected URL getResourceURLOrSystemId() throws Exception {
URL url = getResourceURL();
if (url != null) return url;
return new URL(getResolvedSystemId());
} | class class_name[name] begin[{]
method[getResourceURLOrSystemId, return_type[type[URL]], modifier[protected], parameter[]] begin[{]
local_variable[type[URL], url]
if[binary_operation[member[.url], !=, literal[null]]] begin[{]
return[member[.url]]
else begin[{]
None
end[}... | Keyword[protected] identifier[URL] identifier[getResourceURLOrSystemId] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[URL] identifier[url] operator[=] identifier[getResourceURL] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[url] operator[!=] Other... |
public OGraphMLReader defineVertexAttributeStrategy(final String iAttributeName, final OGraphMLImportStrategy iStrategy) {
vertexPropsStrategy.put(iAttributeName, iStrategy);
return this;
} | class class_name[name] begin[{]
method[defineVertexAttributeStrategy, return_type[type[OGraphMLReader]], modifier[public], parameter[iAttributeName, iStrategy]] begin[{]
call[vertexPropsStrategy.put, parameter[member[.iAttributeName], member[.iStrategy]]]
return[THIS[]]
end[}]
END[}... | Keyword[public] identifier[OGraphMLReader] identifier[defineVertexAttributeStrategy] operator[SEP] Keyword[final] identifier[String] identifier[iAttributeName] , Keyword[final] identifier[OGraphMLImportStrategy] identifier[iStrategy] operator[SEP] {
identifier[vertexPropsStrategy] operator[SEP] identifier[put] ... |
public static BigInteger readBigInteger(DataInputStream dis)
throws IOException {
short i = dis.readShort();
if (i < 0)
throw new IOException("Invalid BigInteger length: " + i);
byte[] buf = new byte[i];
dis.readFully(buf);
return new BigInteger(1, buf);
... | class class_name[name] begin[{]
method[readBigInteger, return_type[type[BigInteger]], modifier[public static], parameter[dis]] begin[{]
local_variable[type[short], i]
if[binary_operation[member[.i], <, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperati... | Keyword[public] Keyword[static] identifier[BigInteger] identifier[readBigInteger] operator[SEP] identifier[DataInputStream] identifier[dis] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[short] identifier[i] operator[=] identifier[dis] operator[SEP] identifier[readShort] operator[SEP] operator[S... |
static Property parse(final String line) throws IOException {
if (!line.startsWith("property ")) {
throw new IOException("not a property: '"
+ line + "'");
}
String definition = line.substring("property ".length());
definition = definition.trim();
... | class class_name[name] begin[{]
method[parse, return_type[type[Property]], modifier[static], parameter[line]] begin[{]
if[call[line.startsWith, parameter[literal["property "]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(opera... | Keyword[static] identifier[Property] identifier[parse] operator[SEP] Keyword[final] identifier[String] identifier[line] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[line] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] o... |
private static String getReferenceName(Page configPage,
Map<String, ConfigurationMetadata> configurationMetadatas, Set<String> configurationBuckets) {
List<String> pathParts = Arrays.asList(StringUtils.split(configPage.getPath(), "/"));
return pathParts.stream()
.filter(name -> !configurationBucke... | class class_name[name] begin[{]
method[getReferenceName, return_type[type[String]], modifier[private static], parameter[configPage, configurationMetadatas, configurationBuckets]] begin[{]
local_variable[type[List], pathParts]
return[call[pathParts.stream, parameter[]]]
end[}]
END[}] | Keyword[private] Keyword[static] identifier[String] identifier[getReferenceName] operator[SEP] identifier[Page] identifier[configPage] , identifier[Map] operator[<] identifier[String] , identifier[ConfigurationMetadata] operator[>] identifier[configurationMetadatas] , identifier[Set] operator[<] identifier[String] o... |
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case TypesPackage.JVM_DECLARED_TYPE__ARRAY_TYPE:
return basicSetArrayType(null, msgs);
case TypesPackage.JVM_DECLARED_TYPE__SUPER_TYPES:
return ((InternalEList<?>... | class class_name[name] begin[{]
method[eInverseRemove, return_type[type[NotificationChain]], modifier[public], parameter[otherEnd, featureID, msgs]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=JVM_DECLARED_TYPE__ARRAY_TYPE, postfix_operators=[], prefix_operators=[],... | annotation[@] identifier[Override] Keyword[public] identifier[NotificationChain] identifier[eInverseRemove] operator[SEP] identifier[InternalEObject] identifier[otherEnd] , Keyword[int] identifier[featureID] , identifier[NotificationChain] identifier[msgs] operator[SEP] {
Keyword[switch] operator[SEP] identifi... |
public RestAssuredMockMvcConfig matcherConfig(MatcherConfig matcherConfig) {
notNull(matcherConfig, MatcherConfig.class);
return new RestAssuredMockMvcConfig(logConfig, encoderConfig, decoderConfig, sessionConfig,
objectMapperConfig, jsonConfig, xmlConfig, headerConfig, asyncConfig, mult... | class class_name[name] begin[{]
method[matcherConfig, return_type[type[RestAssuredMockMvcConfig]], modifier[public], parameter[matcherConfig]] begin[{]
call[.notNull, parameter[member[.matcherConfig], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=Refer... | Keyword[public] identifier[RestAssuredMockMvcConfig] identifier[matcherConfig] operator[SEP] identifier[MatcherConfig] identifier[matcherConfig] operator[SEP] {
identifier[notNull] operator[SEP] identifier[matcherConfig] , identifier[MatcherConfig] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keywor... |
public static UserPreferences load(final FileObject userPreferencesFile, final boolean loadDatabaseDrivers) {
try {
if (userPreferencesFile == null || !userPreferencesFile.exists()) {
logger.info("User preferences file does not exist");
return new UserPreferencesImpl(... | class class_name[name] begin[{]
method[load, return_type[type[UserPreferences]], modifier[public static], parameter[userPreferencesFile, loadDatabaseDrivers]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=userPreferencesFile,... | Keyword[public] Keyword[static] identifier[UserPreferences] identifier[load] operator[SEP] Keyword[final] identifier[FileObject] identifier[userPreferencesFile] , Keyword[final] Keyword[boolean] identifier[loadDatabaseDrivers] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[userPr... |
public void waitForBuffer(long timeoutMilli) {
//assert(callerProcessing.booleanValue() == false);
synchronized(buffer) {
if( dirtyBuffer )
return;
if( !foundEOF() ) {
logger.trace("Waiting for things to come in, or until timeout");
... | class class_name[name] begin[{]
method[waitForBuffer, return_type[void], modifier[public], parameter[timeoutMilli]] begin[{]
SYNCHRONIZED[member[.buffer]] BEGIN[{]
if[member[.dirtyBuffer]] begin[{]
return[None]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[void] identifier[waitForBuffer] operator[SEP] Keyword[long] identifier[timeoutMilli] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[buffer] operator[SEP] {
Keyword[if] operator[SEP] identifier[dirtyBuffer] operator[SEP] Keyword[return] operator[SEP] Keyword[if] ... |
public static int calculateFixLengthPartSize(InternalType type) {
if (type.equals(InternalTypes.BOOLEAN)) {
return 1;
} else if (type.equals(InternalTypes.BYTE)) {
return 1;
} else if (type.equals(InternalTypes.SHORT)) {
return 2;
} else if (type.equals(InternalTypes.INT)) {
return 4;
} else if (t... | class class_name[name] begin[{]
method[calculateFixLengthPartSize, return_type[type[int]], modifier[public static], parameter[type]] begin[{]
if[call[type.equals, parameter[member[InternalTypes.BOOLEAN]]]] begin[{]
return[literal[1]]
else begin[{]
if[call[type.eq... | Keyword[public] Keyword[static] Keyword[int] identifier[calculateFixLengthPartSize] operator[SEP] identifier[InternalType] identifier[type] operator[SEP] {
Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[InternalTypes] operator[SEP] identifier[BOOLEAN] operato... |
public static DataSourceBackendId getInstance(String id) {
DataSourceBackendId result = cache.get(id);
if (result == null) {
id = id.intern();
result = new DataSourceBackendId(id);
cache.put(id, result);
}
return result;
} | class class_name[name] begin[{]
method[getInstance, return_type[type[DataSourceBackendId]], modifier[public static], parameter[id]] begin[{]
local_variable[type[DataSourceBackendId], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
assign... | Keyword[public] Keyword[static] identifier[DataSourceBackendId] identifier[getInstance] operator[SEP] identifier[String] identifier[id] operator[SEP] {
identifier[DataSourceBackendId] identifier[result] operator[=] identifier[cache] operator[SEP] identifier[get] operator[SEP] identifier[id] operator[SEP] operato... |
public List<MappedSuperclass<EntityMappings<T>>> getAllMappedSuperclass()
{
List<MappedSuperclass<EntityMappings<T>>> list = new ArrayList<MappedSuperclass<EntityMappings<T>>>();
List<Node> nodeList = childNode.get("mapped-superclass");
for(Node node: nodeList)
{
MappedSuperclass<Ent... | class class_name[name] begin[{]
method[getAllMappedSuperclass, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], list]
local_variable[type[List], nodeList]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotat... | Keyword[public] identifier[List] operator[<] identifier[MappedSuperclass] operator[<] identifier[EntityMappings] operator[<] identifier[T] operator[>] operator[>] operator[>] identifier[getAllMappedSuperclass] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[MappedSuperclass] operator[<] ide... |
public static Date getDateParam(String name, Date defaultValue) {
String param = getParam(name);
return StrUtil.isBlank(param) ? defaultValue : DateUtil.parse(param);
} | class class_name[name] begin[{]
method[getDateParam, return_type[type[Date]], modifier[public static], parameter[name, defaultValue]] begin[{]
local_variable[type[String], param]
return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=param, postfix_operators=[], p... | Keyword[public] Keyword[static] identifier[Date] identifier[getDateParam] operator[SEP] identifier[String] identifier[name] , identifier[Date] identifier[defaultValue] operator[SEP] {
identifier[String] identifier[param] operator[=] identifier[getParam] operator[SEP] identifier[name] operator[SEP] operator[SEP]... |
@Override
public CapabilityRegistration<?> removePossibleCapability(Capability capability, PathAddress registrationPoint) {
CapabilityId capabilityId = new CapabilityId(capability.getName(), CapabilityScope.GLOBAL);
CapabilityRegistration<?> removed = null;
writeLock.lock();
try {
... | class class_name[name] begin[{]
method[removePossibleCapability, return_type[type[CapabilityRegistration]], modifier[public], parameter[capability, registrationPoint]] begin[{]
local_variable[type[CapabilityId], capabilityId]
local_variable[type[CapabilityRegistration], removed]
... | annotation[@] identifier[Override] Keyword[public] identifier[CapabilityRegistration] operator[<] operator[?] operator[>] identifier[removePossibleCapability] operator[SEP] identifier[Capability] identifier[capability] , identifier[PathAddress] identifier[registrationPoint] operator[SEP] {
identifier[Capability... |
@Override
public final void withdrawalFrom(final Map<String, Object> pAddParam,
final IMakingWarehouseEntry pEntity, final IDrawItemSource pSource,
final BigDecimal pQuantityToDraw) throws Exception {
if (!pEntity.getIdDatabaseBirth()
.equals(getSrvOrm().getIdDatabase())) {
throw new Excep... | class class_name[name] begin[{]
method[withdrawalFrom, return_type[void], modifier[final public], parameter[pAddParam, pEntity, pSource, pQuantityToDraw]] begin[{]
if[call[pEntity.getIdDatabaseBirth, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberRefe... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[withdrawalFrom] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[IMakingWarehouseEntry] identifier[pEntity] , Keywor... |
@Override
public DescribeVirtualGatewaysResult describeVirtualGateways(DescribeVirtualGatewaysRequest request) {
request = beforeClientExecution(request);
return executeDescribeVirtualGateways(request);
} | class class_name[name] begin[{]
method[describeVirtualGateways, return_type[type[DescribeVirtualGatewaysResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDescribeVirtualGateway... | annotation[@] identifier[Override] Keyword[public] identifier[DescribeVirtualGatewaysResult] identifier[describeVirtualGateways] operator[SEP] identifier[DescribeVirtualGatewaysRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[... |
FormatInformation readFormatInformation() throws FormatException {
if (parsedFormatInfo != null) {
return parsedFormatInfo;
}
// Read top-left format info bits
int formatInfoBits1 = 0;
for (int i = 0; i < 6; i++) {
formatInfoBits1 = copyBit(i, 8, formatInfoBits1);
}
// .. and s... | class class_name[name] begin[{]
method[readFormatInformation, return_type[type[FormatInformation]], modifier[default], parameter[]] begin[{]
if[binary_operation[member[.parsedFormatInfo], !=, literal[null]]] begin[{]
return[member[.parsedFormatInfo]]
else begin[{]
None
... | identifier[FormatInformation] identifier[readFormatInformation] operator[SEP] operator[SEP] Keyword[throws] identifier[FormatException] {
Keyword[if] operator[SEP] identifier[parsedFormatInfo] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[parsedFormatInfo] operator[SEP]
} ... |
void sortPrefixes() {
if (whitelistPrefixesSet != null) {
whitelistPrefixes = new ArrayList<>(whitelistPrefixesSet);
}
if (whitelistPrefixes != null) {
CollectionUtils.sortIfNotEmpty(whitelistPrefixes);
}
if (blacklistPrefixes != null) {
Collec... | class class_name[name] begin[{]
method[sortPrefixes, return_type[void], modifier[default], parameter[]] begin[{]
if[binary_operation[member[.whitelistPrefixesSet], !=, literal[null]]] begin[{]
assign[member[.whitelistPrefixes], ClassCreator(arguments=[MemberReference(mem... | Keyword[void] identifier[sortPrefixes] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[whitelistPrefixesSet] operator[!=] Other[null] operator[SEP] {
identifier[whitelistPrefixes] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[whiteli... |
@Override
public AbstractQPart appendSQL(final SQLSelect _sql)
throws EFapsException
{
getAttribute().appendSQL(_sql);
_sql.addPart(SQLPart.ASC);
return this;
} | class class_name[name] begin[{]
method[appendSQL, return_type[type[AbstractQPart]], modifier[public], parameter[_sql]] begin[{]
call[.getAttribute, parameter[]]
call[_sql.addPart, parameter[member[SQLPart.ASC]]]
return[THIS[]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[AbstractQPart] identifier[appendSQL] operator[SEP] Keyword[final] identifier[SQLSelect] identifier[_sql] operator[SEP] Keyword[throws] identifier[EFapsException] {
identifier[getAttribute] operator[SEP] operator[SEP] operator[SEP] identifier[appendSQL... |
private Object checkValueEL(Object value) {
// is a 1 > Array
if (dimension > 1) {
if (value instanceof Array) {
if (((Array) value).getDimension() != dimension - 1) return null;
}
else return null;
}
return value;
} | class class_name[name] begin[{]
method[checkValueEL, return_type[type[Object]], modifier[private], parameter[value]] begin[{]
if[binary_operation[member[.dimension], >, literal[1]]] begin[{]
if[binary_operation[member[.value], instanceof, type[Array]]] begin[{]
... | Keyword[private] identifier[Object] identifier[checkValueEL] operator[SEP] identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[dimension] operator[>] Other[1] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Array] operato... |
public CommandLine parse(Options options, String[] arguments, Properties properties, boolean stopAtNonOption)
throws ParseException
{
this.options = options;
this.stopAtNonOption = stopAtNonOption;
skipParsing = false;
currentOption = null;
expectedOpts = new Arra... | class class_name[name] begin[{]
method[parse, return_type[type[CommandLine]], modifier[public], parameter[options, arguments, properties, stopAtNonOption]] begin[{]
assign[THIS[member[None.options]], member[.options]]
assign[THIS[member[None.stopAtNonOption]], member[.stopAtNonO... | Keyword[public] identifier[CommandLine] identifier[parse] operator[SEP] identifier[Options] identifier[options] , identifier[String] operator[SEP] operator[SEP] identifier[arguments] , identifier[Properties] identifier[properties] , Keyword[boolean] identifier[stopAtNonOption] operator[SEP] Keyword[throws] identifie... |
public void validState(final boolean expression, final String message, final Object... values) {
if (!expression) {
failIllegalState(String.format(message, values));
}
} | class class_name[name] begin[{]
method[validState, return_type[void], modifier[public], parameter[expression, message, values]] begin[{]
if[member[.expression]] begin[{]
call[.failIllegalState, parameter[call[String.format, parameter[member[.message], member[.values]]]]]... | Keyword[public] Keyword[void] identifier[validState] operator[SEP] Keyword[final] Keyword[boolean] identifier[expression] , Keyword[final] identifier[String] identifier[message] , Keyword[final] identifier[Object] operator[...] identifier[values] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier... |
public static String getTypeString(XAttribute attribute) {
if (attribute instanceof XAttributeList) {
return "LIST";
} else if (attribute instanceof XAttributeContainer) {
return "CONTAINER";
} else if (attribute instanceof XAttributeLiteral) {
return "LITERAL";
} else if (attribute instanceof XAttribu... | class class_name[name] begin[{]
method[getTypeString, return_type[type[String]], modifier[public static], parameter[attribute]] begin[{]
if[binary_operation[member[.attribute], instanceof, type[XAttributeList]]] begin[{]
return[literal["LIST"]]
else begin[{]
if[b... | Keyword[public] Keyword[static] identifier[String] identifier[getTypeString] operator[SEP] identifier[XAttribute] identifier[attribute] operator[SEP] {
Keyword[if] operator[SEP] identifier[attribute] Keyword[instanceof] identifier[XAttributeList] operator[SEP] {
Keyword[return] literal[String] operato... |
@Override
public UpdateGatewayGroupResult updateGatewayGroup(UpdateGatewayGroupRequest request) {
request = beforeClientExecution(request);
return executeUpdateGatewayGroup(request);
} | class class_name[name] begin[{]
method[updateGatewayGroup, return_type[type[UpdateGatewayGroupResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeUpdateGatewayGroup, parameter[me... | annotation[@] identifier[Override] Keyword[public] identifier[UpdateGatewayGroupResult] identifier[updateGatewayGroup] operator[SEP] identifier[UpdateGatewayGroupRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operat... |
@PutMapping("/employees/{id}")
public ResponseEntity<?> updateEmployee( //
@RequestBody EntityModel<Employee> employee, @PathVariable Integer id)
// end::put[]
{
EMPLOYEES.put(id, employee.getContent());
Link link = linkTo(methodOn(getClass()).findOne(id)).withSelfRel().expand();
return ResponseEntity.no... | class class_name[name] begin[{]
method[updateEmployee, return_type[type[ResponseEntity]], modifier[public], parameter[employee, id]] begin[{]
call[EMPLOYEES.put, parameter[member[.id], call[employee.getContent, parameter[]]]]
local_variable[type[Link], link]
return[call[Response... | annotation[@] identifier[PutMapping] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[ResponseEntity] operator[<] operator[?] operator[>] identifier[updateEmployee] operator[SEP] annotation[@] identifier[RequestBody] identifier[EntityModel] operator[<] identifier[Employee] operator[>] identifier[e... |
public static File startSystemCaseManager(String package_path,
String dest_dir) throws BeastException {
Logger logger = Logger
.getLogger("CreateSystemCaseManager.startSystemCaseManager");
File folder = SystemReader.createFolder(package_path, dest_dir);
File caseMan... | class class_name[name] begin[{]
method[startSystemCaseManager, return_type[type[File]], modifier[public static], parameter[package_path, dest_dir]] begin[{]
local_variable[type[Logger], logger]
local_variable[type[File], folder]
local_variable[type[File], caseManager]
local_vari... | Keyword[public] Keyword[static] identifier[File] identifier[startSystemCaseManager] operator[SEP] identifier[String] identifier[package_path] , identifier[String] identifier[dest_dir] operator[SEP] Keyword[throws] identifier[BeastException] {
identifier[Logger] identifier[logger] operator[=] identifier[Logger] ... |
@Override
public CommercePriceList[] findByCommerceCurrencyId_PrevAndNext(
long commercePriceListId, long commerceCurrencyId,
OrderByComparator<CommercePriceList> orderByComparator)
throws NoSuchPriceListException {
CommercePriceList commercePriceList = findByPrimaryKey(commercePriceListId);
Session session... | class class_name[name] begin[{]
method[findByCommerceCurrencyId_PrevAndNext, return_type[type[CommercePriceList]], modifier[public], parameter[commercePriceListId, commerceCurrencyId, orderByComparator]] begin[{]
local_variable[type[CommercePriceList], commercePriceList]
local_variable[type[Ses... | annotation[@] identifier[Override] Keyword[public] identifier[CommercePriceList] operator[SEP] operator[SEP] identifier[findByCommerceCurrencyId_PrevAndNext] operator[SEP] Keyword[long] identifier[commercePriceListId] , Keyword[long] identifier[commerceCurrencyId] , identifier[OrderByComparator] operator[<] identifie... |
@Override
public boolean shouldRetryRequest(int responseCode, int retryAttempt) {
if (responseCode >= 400 && responseCode < 500) {
return false; // don't retry if request was rejected permanently
}
if (maxRetryCount == RETRY_COUNT_INFINITE) {
return true; // keep retrying indefinitely
}
return retryA... | class class_name[name] begin[{]
method[shouldRetryRequest, return_type[type[boolean]], modifier[public], parameter[responseCode, retryAttempt]] begin[{]
if[binary_operation[binary_operation[member[.responseCode], >=, literal[400]], &&, binary_operation[member[.responseCode], <, literal[500]]]] ... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[shouldRetryRequest] operator[SEP] Keyword[int] identifier[responseCode] , Keyword[int] identifier[retryAttempt] operator[SEP] {
Keyword[if] operator[SEP] identifier[responseCode] operator[>=] Other[400] operator[&&] identifier[respon... |
private void configureToolRoot(CmsObject cms, CmsToolRootHandler toolRoot) throws CmsException {
List<I_CmsToolHandler> handlers = new ArrayList<I_CmsToolHandler>();
// add tool root handler
handlers.add(toolRoot);
// look in every file under the root uri for valid
// admin to... | class class_name[name] begin[{]
method[configureToolRoot, return_type[void], modifier[private], parameter[cms, toolRoot]] begin[{]
local_variable[type[List], handlers]
call[handlers.add, parameter[member[.toolRoot]]]
local_variable[type[List], resources]
local_variable[t... | Keyword[private] Keyword[void] identifier[configureToolRoot] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[CmsToolRootHandler] identifier[toolRoot] operator[SEP] Keyword[throws] identifier[CmsException] {
identifier[List] operator[<] identifier[I_CmsToolHandler] operator[>] identifier[handler... |
public Subscription get( Subscription subscription ) {
return RestfulUtils.show( SubscriptionService.PATH, subscription, Subscription.class, super.httpClient );
} | class class_name[name] begin[{]
method[get, return_type[type[Subscription]], modifier[public], parameter[subscription]] begin[{]
return[call[RestfulUtils.show, parameter[member[SubscriptionService.PATH], member[.subscription], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, select... | Keyword[public] identifier[Subscription] identifier[get] operator[SEP] identifier[Subscription] identifier[subscription] operator[SEP] {
Keyword[return] identifier[RestfulUtils] operator[SEP] identifier[show] operator[SEP] identifier[SubscriptionService] operator[SEP] identifier[PATH] , identifier[subscription]... |
void processMessage(byte type, int message_len)
throws IOException {
//
// In SSLv3 and TLS, messages follow strictly increasing
// numerical order _except_ for one annoying special case.
//
if ((state >= type)
&& (state != HandshakeMessage.ht_client_k... | class class_name[name] begin[{]
method[processMessage, return_type[void], modifier[default], parameter[type, message_len]] begin[{]
if[binary_operation[binary_operation[member[.state], >=, member[.type]], &&, binary_operation[binary_operation[member[.state], !=, member[HandshakeMessage.ht_clien... | Keyword[void] identifier[processMessage] operator[SEP] Keyword[byte] identifier[type] , Keyword[int] identifier[message_len] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[SEP] identifier[state] operator[>=] identifier[type] operator[SEP] operator[&&] operator[SEP] id... |
void setLanguage(final Locale locale) {
if (!m_languageSelect.getValue().equals(locale)) {
m_languageSelect.setValue(locale);
}
} | class class_name[name] begin[{]
method[setLanguage, return_type[void], modifier[default], parameter[locale]] begin[{]
if[call[m_languageSelect.getValue, parameter[]]] begin[{]
call[m_languageSelect.setValue, parameter[member[.locale]]]
else begin[{]
None
... | Keyword[void] identifier[setLanguage] operator[SEP] Keyword[final] identifier[Locale] identifier[locale] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[m_languageSelect] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[loca... |
private void writeLinkOptions(final Writer writer, final boolean isDebug, final List<DependencyDef> dependencies,
final String basePath, final TargetInfo linkTarget, final Map<String, TargetInfo> targets) throws IOException {
final StringBuffer baseOptions = new StringBuffer(100);
final StringBuffer opti... | class class_name[name] begin[{]
method[writeLinkOptions, return_type[void], modifier[private], parameter[writer, isDebug, dependencies, basePath, linkTarget, targets]] begin[{]
local_variable[type[StringBuffer], baseOptions]
local_variable[type[StringBuffer], options]
call[baseO... | Keyword[private] Keyword[void] identifier[writeLinkOptions] operator[SEP] Keyword[final] identifier[Writer] identifier[writer] , Keyword[final] Keyword[boolean] identifier[isDebug] , Keyword[final] identifier[List] operator[<] identifier[DependencyDef] operator[>] identifier[dependencies] , Keyword[final] identifier... |
@Override public Object getCurrentValue(FieldType field)
{
Object result = null;
if (field != null)
{
int fieldValue = field.getValue();
result = m_array[fieldValue];
}
return (result);
} | class class_name[name] begin[{]
method[getCurrentValue, return_type[type[Object]], modifier[public], parameter[field]] begin[{]
local_variable[type[Object], result]
if[binary_operation[member[.field], !=, literal[null]]] begin[{]
local_variable[type[int], fieldValue]
... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[getCurrentValue] operator[SEP] identifier[FieldType] identifier[field] operator[SEP] {
identifier[Object] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[field] operator[!=] Other[null] ... |
private void inflateWidgetLayout(Context context, int layoutId) {
inflate(context, layoutId, this);
floatingLabel = (TextView) findViewById(R.id.flw_floating_label);
if (floatingLabel == null) {
throw new RuntimeException("Your layout must have a TextView whose ID is @id/flw_floatin... | class class_name[name] begin[{]
method[inflateWidgetLayout, return_type[void], modifier[private], parameter[context, layoutId]] begin[{]
call[.inflate, parameter[member[.context], member[.layoutId], THIS[]]]
assign[member[.floatingLabel], Cast(expression=MethodInvocation(argumen... | Keyword[private] Keyword[void] identifier[inflateWidgetLayout] operator[SEP] identifier[Context] identifier[context] , Keyword[int] identifier[layoutId] operator[SEP] {
identifier[inflate] operator[SEP] identifier[context] , identifier[layoutId] , Keyword[this] operator[SEP] operator[SEP] identifier[floatingL... |
public static <T> Level0ArrayOperator<String[],String> onArrayFor(final String... elements) {
return onArrayOf(Types.STRING, VarArgsUtil.asRequiredObjectArray(elements));
} | class class_name[name] begin[{]
method[onArrayFor, return_type[type[Level0ArrayOperator]], modifier[public static], parameter[elements]] begin[{]
return[call[.onArrayOf, parameter[member[Types.STRING], call[VarArgsUtil.asRequiredObjectArray, parameter[member[.elements]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Level0ArrayOperator] operator[<] identifier[String] operator[SEP] operator[SEP] , identifier[String] operator[>] identifier[onArrayFor] operator[SEP] Keyword[final] identifier[String] operator[...] identifier[elements] operator[SEP] {
... |
public HyperlinkListener createHyperLinkListener()
{
return new HyperlinkListener()
{
public void hyperlinkUpdate(HyperlinkEvent e)
{
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
{
if (e instanceof HTMLFrameHy... | class class_name[name] begin[{]
method[createHyperLinkListener, return_type[type[HyperlinkListener]], modifier[public], parameter[]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], mem... | Keyword[public] identifier[HyperlinkListener] identifier[createHyperLinkListener] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[HyperlinkListener] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[hyperlinkUpdate] operator[SEP] identifier[HyperlinkEvent] id... |
public static Text toText(Document doc, Object o) throws PageException {
if (o instanceof Text) return (Text) o;
else if (o instanceof CharacterData) return doc.createTextNode(((CharacterData) o).getData());
return doc.createTextNode(Caster.toString(o));
} | class class_name[name] begin[{]
method[toText, return_type[type[Text]], modifier[public static], parameter[doc, o]] begin[{]
if[binary_operation[member[.o], instanceof, type[Text]]] begin[{]
return[Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, ... | Keyword[public] Keyword[static] identifier[Text] identifier[toText] operator[SEP] identifier[Document] identifier[doc] , identifier[Object] identifier[o] operator[SEP] Keyword[throws] identifier[PageException] {
Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[Text] operator[SEP] Keyword[r... |
private TypeRef resultType()
{
Type[] parameters = _method.getGenericParameterTypes();
for (Type parameter : parameters) {
TypeRef type = TypeRef.of(parameter);
if (Result.class.equals(type.rawClass())) {
TypeRef resultTypeRef = type.param(0);
return resultTypeRef;
}
}... | class class_name[name] begin[{]
method[resultType, return_type[type[TypeRef]], modifier[private], parameter[]] begin[{]
local_variable[type[Type], parameters]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimens... | Keyword[private] identifier[TypeRef] identifier[resultType] operator[SEP] operator[SEP] {
identifier[Type] operator[SEP] operator[SEP] identifier[parameters] operator[=] identifier[_method] operator[SEP] identifier[getGenericParameterTypes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] ide... |
private void writeObject(ObjectOutputStream s) throws IOException {
ObjectOutputStream.PutField putField = s.putFields();
putField.put("version", version);
putField.put("resourceAdapterKey", resourceAdapterKey);
s.writeFields();
} | class class_name[name] begin[{]
method[writeObject, return_type[void], modifier[private], parameter[s]] begin[{]
local_variable[type[ObjectOutputStream], putField]
call[putField.put, parameter[literal["version"], member[.version]]]
call[putField.put, parameter[literal["r... | Keyword[private] Keyword[void] identifier[writeObject] operator[SEP] identifier[ObjectOutputStream] identifier[s] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[ObjectOutputStream] operator[SEP] identifier[PutField] identifier[putField] operator[=] identifier[s] operator[SEP] identifier[putFi... |
public HandlerRegistration addChangedHandler(final ChangedHandler handler) {
return enabledForm.addItemChangedHandler(new ItemChangedHandler() {
public void onItemChanged(ItemChangedEvent event) {
handler.onChanged(new ChangedEvent(EnableToggleFormItem.this.getJsObj()));
}
});
} | class class_name[name] begin[{]
method[addChangedHandler, return_type[type[HandlerRegistration]], modifier[public], parameter[handler]] begin[{]
return[call[enabledForm.addItemChangedHandler, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expressi... | Keyword[public] identifier[HandlerRegistration] identifier[addChangedHandler] operator[SEP] Keyword[final] identifier[ChangedHandler] identifier[handler] operator[SEP] {
Keyword[return] identifier[enabledForm] operator[SEP] identifier[addItemChangedHandler] operator[SEP] Keyword[new] identifier[ItemChangedHandle... |
@SuppressWarnings({ "unchecked", "rawtypes" })
public static Optional<Number> createNumber(final String str) {
if (N.isNullOrEmptyOrBlank(str)) {
return Optional.empty();
}
// Need to deal with all possible hex prefixes here
final String[] hex_prefixes = { "0x", "... | class class_name[name] begin[{]
method[createNumber, return_type[type[Optional]], modifier[public static], parameter[str]] begin[{]
if[call[N.isNullOrEmptyOrBlank, parameter[member[.str]]]] begin[{]
return[call[Optional.empty, parameter[]]]
else begin[{]
None
end[}]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String]
} operator[SEP] Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[Number] operator[>] identifier[createNumber] operator[SEP] Keyword[final] identifier[String] identifier[str] operator[SEP] ... |
public void setImportPackages(String[] importPackages) {
this.importPackages = importPackages;
this.importPackageSet = new HashSet<String>(Arrays.asList(importPackages));
} | class class_name[name] begin[{]
method[setImportPackages, return_type[void], modifier[public], parameter[importPackages]] begin[{]
assign[THIS[member[None.importPackages]], member[.importPackages]]
assign[THIS[member[None.importPackageSet]], ClassCreator(arguments=[MethodInvocat... | Keyword[public] Keyword[void] identifier[setImportPackages] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[importPackages] operator[SEP] {
Keyword[this] operator[SEP] identifier[importPackages] operator[=] identifier[importPackages] operator[SEP] Keyword[this] operator[SEP] identifier[im... |
public float determinant () throws MatrixException
{
decompose ();
// Each row exchange during forward elimination flips the sign
// of the determinant, so check for an odd number of exchanges.
float determinant = ((m_nExchangeCount & 1) == 0) ? 1 : -1;
// Form the product of the diagonal elemen... | class class_name[name] begin[{]
method[determinant, return_type[type[float]], modifier[public], parameter[]] begin[{]
call[.decompose, parameter[]]
local_variable[type[float], determinant]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotati... | Keyword[public] Keyword[float] identifier[determinant] operator[SEP] operator[SEP] Keyword[throws] identifier[MatrixException] {
identifier[decompose] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[determinant] operator[=] operator[SEP] operator[SEP] identifier[m_nExchangeCount] operator[&] ... |
final void parseRange(String range) {
if (range == null) {
throw new IllegalArgumentException("Invalid IP range");
}
int index = range.indexOf('/');
String subnetStr = null;
if (index == -1) {
ipAddress = new IPAddress(range);
} else {
ipAddress = new IPAddress(range.substring(0, index));
sub... | class class_name[name] begin[{]
method[parseRange, return_type[void], modifier[final], parameter[range]] begin[{]
if[binary_operation[member[.range], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qua... | Keyword[final] Keyword[void] identifier[parseRange] operator[SEP] identifier[String] identifier[range] operator[SEP] {
Keyword[if] operator[SEP] identifier[range] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] ope... |
@XmlElementDecl(namespace = "", name = "score", scope = LocationType.class)
public JAXBElement<Score> createLocationTypeScore(Score value) {
return new JAXBElement<Score>(_LocationTypeScore_QNAME, Score.class, LocationType.class, value);
} | class class_name[name] begin[{]
method[createLocationTypeScore, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_LocationTypeScore_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReferen... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[LocationType] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[Sco... |
@Nonnull
public static String getAsCompleteDisplayName (@Nonnull final IPersonName aName)
{
if (isFirstNameFirst ())
return getAsCompleteDisplayNameFirstNameFirst (aName);
return getAsCompleteDisplayNameLastNameFirst (aName);
} | class class_name[name] begin[{]
method[getAsCompleteDisplayName, return_type[type[String]], modifier[public static], parameter[aName]] begin[{]
if[call[.isFirstNameFirst, parameter[]]] begin[{]
return[call[.getAsCompleteDisplayNameFirstNameFirst, parameter[member[.aName]]]]
else begin[{... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[String] identifier[getAsCompleteDisplayName] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IPersonName] identifier[aName] operator[SEP] {
Keyword[if] operator[SEP] identifier[isFirstNameFirst] operator[SEP] o... |
public Variable findVariableOrInParent(String varShortName) {
if (varShortName == null) return null;
Variable v = findVariable(varShortName);
Group parent = getParentGroup();
if ((v == null) && (parent != null))
v = parent.findVariableOrInParent(varShortName);
return v;
} | class class_name[name] begin[{]
method[findVariableOrInParent, return_type[type[Variable]], modifier[public], parameter[varShortName]] begin[{]
if[binary_operation[member[.varShortName], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_v... | Keyword[public] identifier[Variable] identifier[findVariableOrInParent] operator[SEP] identifier[String] identifier[varShortName] operator[SEP] {
Keyword[if] operator[SEP] identifier[varShortName] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[Variable] identifier[v] ... |
static AttrRequests createFromString(final String str)
throws BOSHException {
if (str == null) {
return null;
} else {
return new AttrRequests(str);
}
} | class class_name[name] begin[{]
method[createFromString, return_type[type[AttrRequests]], modifier[static], parameter[str]] begin[{]
if[binary_operation[member[.str], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
return[ClassCreator(arguments=[... | Keyword[static] identifier[AttrRequests] identifier[createFromString] operator[SEP] Keyword[final] identifier[String] identifier[str] operator[SEP] Keyword[throws] identifier[BOSHException] {
Keyword[if] operator[SEP] identifier[str] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null]... |
public static double bound(double x, double min, double max) {
if (x > max) {
return max;
}
if (x < min) {
return min;
}
return x;
} | class class_name[name] begin[{]
method[bound, return_type[type[double]], modifier[public static], parameter[x, min, max]] begin[{]
if[binary_operation[member[.x], >, member[.max]]] begin[{]
return[member[.max]]
else begin[{]
None
end[}]
if[binary_oper... | Keyword[public] Keyword[static] Keyword[double] identifier[bound] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[min] , Keyword[double] identifier[max] operator[SEP] {
Keyword[if] operator[SEP] identifier[x] operator[>] identifier[max] operator[SEP] {
Keyword[return] identi... |
@Override
public boolean isValid(TagData data) {
boolean hasFile = isSpecified(data, ATTR_FILE) || isSpecified(data, ATTR_PAGE);
boolean hasSuffix = isSpecified(data, ATTR_SUFFIX);
boolean hasProperty = isSpecified(data, ATTR_PROPERTY);
boolean hasAttribute = isSpecified(data, ATTR_... | class class_name[name] begin[{]
method[isValid, return_type[type[boolean]], modifier[public], parameter[data]] begin[{]
local_variable[type[boolean], hasFile]
local_variable[type[boolean], hasSuffix]
local_variable[type[boolean], hasProperty]
local_variable[type[boolean], hasAtt... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isValid] operator[SEP] identifier[TagData] identifier[data] operator[SEP] {
Keyword[boolean] identifier[hasFile] operator[=] identifier[isSpecified] operator[SEP] identifier[data] , identifier[ATTR_FILE] operator[SEP] operator[||] id... |
public static Iterable<MutableIntTuple> wrappingIterable(
IntTuple bounds, final Iterable<? extends MutableIntTuple> delegate)
{
Objects.requireNonNull(delegate, "The delegate is null");
IntTuple localBounds = IntTuples.copy(bounds);
return () -> IntTupleIterators.wrappingIterat... | class class_name[name] begin[{]
method[wrappingIterable, return_type[type[Iterable]], modifier[public static], parameter[bounds, delegate]] begin[{]
call[Objects.requireNonNull, parameter[member[.delegate], literal["The delegate is null"]]]
local_variable[type[IntTuple], localBounds]
... | Keyword[public] Keyword[static] identifier[Iterable] operator[<] identifier[MutableIntTuple] operator[>] identifier[wrappingIterable] operator[SEP] identifier[IntTuple] identifier[bounds] , Keyword[final] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[MutableIntTuple] operator[>] identifier[d... |
public Observable<Page<PremierAddOnOfferInner>> listPremierAddOnOffersAsync() {
return listPremierAddOnOffersWithServiceResponseAsync()
.map(new Func1<ServiceResponse<Page<PremierAddOnOfferInner>>, Page<PremierAddOnOfferInner>>() {
@Override
public Page<PremierAddOnOf... | class class_name[name] begin[{]
method[listPremierAddOnOffersAsync, return_type[type[Observable]], modifier[public], parameter[]] begin[{]
return[call[.listPremierAddOnOffersWithServiceResponseAsync, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[PremierAddOnOfferInner] operator[>] operator[>] identifier[listPremierAddOnOffersAsync] operator[SEP] operator[SEP] {
Keyword[return] identifier[listPremierAddOnOffersWithServiceResponseAsync] operator[SEP] operator[SEP] o... |
public Area findBasicAreas()
{
AreaImpl rootarea = new AreaImpl(0, 0, 0, 0);
setRoot(rootarea);
rootarea.setAreaTree(this);
rootarea.setPage(page);
for (int i = 0; i < page.getRoot().getChildCount(); i++)
{
Box cbox = page.getRoot().getChildAt(i);
... | class class_name[name] begin[{]
method[findBasicAreas, return_type[type[Area]], modifier[public], parameter[]] begin[{]
local_variable[type[AreaImpl], rootarea]
call[.setRoot, parameter[member[.rootarea]]]
call[rootarea.setAreaTree, parameter[THIS[]]]
cal... | Keyword[public] identifier[Area] identifier[findBasicAreas] operator[SEP] operator[SEP] {
identifier[AreaImpl] identifier[rootarea] operator[=] Keyword[new] identifier[AreaImpl] operator[SEP] Other[0] , Other[0] , Other[0] , Other[0] operator[SEP] operator[SEP] identifier[setRoot] operator[SEP] identifier[roo... |
@Override
public EClass getIfcMaterialLayer() {
if (ifcMaterialLayerEClass == null) {
ifcMaterialLayerEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(362);
}
return ifcMaterialLayerEClass;
} | class class_name[name] begin[{]
method[getIfcMaterialLayer, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcMaterialLayerEClass], ==, literal[null]]] begin[{]
assign[member[.ifcMaterialLayerEClass], Cast(expression=Method... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcMaterialLayer] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcMaterialLayerEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcMaterialLayerEClass] operator[=] operator[SEP] identif... |
@SuppressWarnings("unchecked")
public static <T> void forceUpdateAllProperties(SpiEbeanServer server, T model) {
forceUpdateAllProperties(server.getBeanDescriptor((Class<T>) model.getClass()), model);
} | class class_name[name] begin[{]
method[forceUpdateAllProperties, return_type[void], modifier[public static], parameter[server, model]] begin[{]
call[.forceUpdateAllProperties, parameter[call[server.getBeanDescriptor, parameter[Cast(expression=MethodInvocation(arguments=[], member=getClass, post... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[void] identifier[forceUpdateAllProperties] operator[SEP] identifier[SpiEbeanServer] identifier[server] , identifier[T] identifier[model] operator[SEP] {
... |
public final BaseDescr singleRestriction() throws RecognitionException {
BaseDescr result = null;
ParserRuleReturnScope op =null;
java.util.List<String> sa =null;
ParserRuleReturnScope value =null;
BaseDescr or =null;
try {
// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:436:3: (op= o... | class class_name[name] begin[{]
method[singleRestriction, return_type[type[BaseDescr]], modifier[final public], parameter[]] begin[{]
local_variable[type[BaseDescr], result]
local_variable[type[ParserRuleReturnScope], op]
local_variable[type[java], sa]
local_variable[type[Parser... | Keyword[public] Keyword[final] identifier[BaseDescr] identifier[singleRestriction] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[BaseDescr] identifier[result] operator[=] Other[null] operator[SEP] identifier[ParserRuleReturnScope] identifier[op] operator[=] Other[null]... |
public static Polygon getMultiTilePolygon (MisoSceneMetrics metrics,
Point sp1, Point sp2)
{
int x = Math.min(sp1.x, sp2.x), y = Math.min(sp1.y, sp2.y);
int width = Math.abs(sp1.x-sp2.x)+1, height = Math.abs(sp1.y-sp2.y)+1;
return getFootprintPo... | class class_name[name] begin[{]
method[getMultiTilePolygon, return_type[type[Polygon]], modifier[public static], parameter[metrics, sp1, sp2]] begin[{]
local_variable[type[int], x]
local_variable[type[int], width]
return[call[.getFootprintPolygon, parameter[member[.metrics], member[.x],... | Keyword[public] Keyword[static] identifier[Polygon] identifier[getMultiTilePolygon] operator[SEP] identifier[MisoSceneMetrics] identifier[metrics] , identifier[Point] identifier[sp1] , identifier[Point] identifier[sp2] operator[SEP] {
Keyword[int] identifier[x] operator[=] identifier[Math] operator[SEP] identi... |
public static com.liferay.commerce.product.model.CPRuleAssetCategoryRel addCPRuleAssetCategoryRel(
long cpRuleId, long assetCategoryId,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {
return getService()
.addCPRuleAssetCategory... | class class_name[name] begin[{]
method[addCPRuleAssetCategoryRel, return_type[type[com]], modifier[public static], parameter[cpRuleId, assetCategoryId, serviceContext]] begin[{]
return[call[.getService, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[model] operator[SEP] identifier[CPRuleAssetCategoryRel] identifier[addCPRuleAssetCategoryRel] operator[SEP] Keyword[long] identifier[cpRuleId] ,... |
@Override
public synchronized void destroy(boolean force) {
if(force) {
if(AsyncTaskManager.isManaged()) {
AsyncTaskManager.terminateAll(10, TimeUnit.SECONDS);
}
if(container != null) {
if(logger != null && logger.isDebugEnabled()) {
logger.debug("Destroying IOC container");
}
c... | class class_name[name] begin[{]
method[destroy, return_type[void], modifier[synchronized public], parameter[force]] begin[{]
if[member[.force]] begin[{]
if[call[AsyncTaskManager.isManaged, parameter[]]] begin[{]
call[AsyncTaskManager.termi... | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[destroy] operator[SEP] Keyword[boolean] identifier[force] operator[SEP] {
Keyword[if] operator[SEP] identifier[force] operator[SEP] {
Keyword[if] operator[SEP] identifier[AsyncTaskManager] operator[SEP] i... |
private static void readDictionary(
@Nullable ByteArrayInputStream dictionaryDataStream,
int dictionarySize,
int[] dictionaryLengthVector,
int offsetVectorOffset,
byte[] data,
int[] offsetVector,
Type type)
throws IOExceptio... | class class_name[name] begin[{]
method[readDictionary, return_type[void], modifier[private static], parameter[dictionaryDataStream, dictionarySize, dictionaryLengthVector, offsetVectorOffset, data, offsetVector, type]] begin[{]
local_variable[type[Slice], slice]
if[binary_operation[memb... | Keyword[private] Keyword[static] Keyword[void] identifier[readDictionary] operator[SEP] annotation[@] identifier[Nullable] identifier[ByteArrayInputStream] identifier[dictionaryDataStream] , Keyword[int] identifier[dictionarySize] , Keyword[int] operator[SEP] operator[SEP] identifier[dictionaryLengthVector] , Keywor... |
public void setOnItemClickedListener(RecyclerView.OnItemClickedListener<Type> listener) {
this.onItemClickedListener = listener;
getAdapter().setOnItemClickedListener(listener);
} | class class_name[name] begin[{]
method[setOnItemClickedListener, return_type[void], modifier[public], parameter[listener]] begin[{]
assign[THIS[member[None.onItemClickedListener]], member[.listener]]
call[.getAdapter, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setOnItemClickedListener] operator[SEP] identifier[RecyclerView] operator[SEP] identifier[OnItemClickedListener] operator[<] identifier[Type] operator[>] identifier[listener] operator[SEP] {
Keyword[this] operator[SEP] identifier[onItemClickedListener] operator[=] identif... |
@Override
public ListJobsByPipelineResult listJobsByPipeline(ListJobsByPipelineRequest request) {
request = beforeClientExecution(request);
return executeListJobsByPipeline(request);
} | class class_name[name] begin[{]
method[listJobsByPipeline, return_type[type[ListJobsByPipelineResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListJobsByPipeline, parameter[me... | annotation[@] identifier[Override] Keyword[public] identifier[ListJobsByPipelineResult] identifier[listJobsByPipeline] operator[SEP] identifier[ListJobsByPipelineRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operat... |
@Override
public EClass getIfcBurner() {
if (ifcBurnerEClass == null) {
ifcBurnerEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI).getEClassifiers()
.get(66);
}
return ifcBurnerEClass;
} | class class_name[name] begin[{]
method[getIfcBurner, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcBurnerEClass], ==, literal[null]]] begin[{]
assign[member[.ifcBurnerEClass], Cast(expression=MethodInvocation(arguments=... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcBurner] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcBurnerEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcBurnerEClass] operator[=] operator[SEP] identifier[EClass] operator[... |
private boolean forceSettleCapturedViewAt(int finalLeft, int finalTop, int xvel, int yvel) {
final int startLeft = mCapturedView.getLeft();
final int startTop = mCapturedView.getTop();
final int dx = finalLeft - startLeft;
final int dy = finalTop - startTop;
if (dx == 0 && dy ==... | class class_name[name] begin[{]
method[forceSettleCapturedViewAt, return_type[type[boolean]], modifier[private], parameter[finalLeft, finalTop, xvel, yvel]] begin[{]
local_variable[type[int], startLeft]
local_variable[type[int], startTop]
local_variable[type[int], dx]
local_vari... | Keyword[private] Keyword[boolean] identifier[forceSettleCapturedViewAt] operator[SEP] Keyword[int] identifier[finalLeft] , Keyword[int] identifier[finalTop] , Keyword[int] identifier[xvel] , Keyword[int] identifier[yvel] operator[SEP] {
Keyword[final] Keyword[int] identifier[startLeft] operator[=] identifier[... |
public String retrieveData(String token) {
try {
RetrievedContent data = this.s3StorageProvider.getContent(this.hiddenSpaceName, token);
return IOUtil.readStringFromStream(data.getContentStream());
} catch (NotFoundException ex) {
return null;
} catch (E... | class class_name[name] begin[{]
method[retrieveData, return_type[type[String]], modifier[public], parameter[token]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=... | Keyword[public] identifier[String] identifier[retrieveData] operator[SEP] identifier[String] identifier[token] operator[SEP] {
Keyword[try] {
identifier[RetrievedContent] identifier[data] operator[=] Keyword[this] operator[SEP] identifier[s3StorageProvider] operator[SEP] identifier[getContent] operato... |
public void setComplianceResourceTypes(java.util.Collection<String> complianceResourceTypes) {
if (complianceResourceTypes == null) {
this.complianceResourceTypes = null;
return;
}
this.complianceResourceTypes = new com.amazonaws.internal.SdkInternalList<String>(complian... | class class_name[name] begin[{]
method[setComplianceResourceTypes, return_type[void], modifier[public], parameter[complianceResourceTypes]] begin[{]
if[binary_operation[member[.complianceResourceTypes], ==, literal[null]]] begin[{]
assign[THIS[member[None.complianceResou... | Keyword[public] Keyword[void] identifier[setComplianceResourceTypes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[complianceResourceTypes] operator[SEP] {
Keyword[if] operator[SEP] identifier[complianceRes... |
@Nonnull
public PLTable addRow (@Nonnull final Iterable <? extends PLTableCell> aCells, @Nonnull final HeightSpec aHeight)
{
addAndReturnRow (aCells, aHeight);
return this;
} | class class_name[name] begin[{]
method[addRow, return_type[type[PLTable]], modifier[public], parameter[aCells, aHeight]] begin[{]
call[.addAndReturnRow, parameter[member[.aCells], member[.aHeight]]]
return[THIS[]]
end[}]
END[}] | annotation[@] identifier[Nonnull] Keyword[public] identifier[PLTable] identifier[addRow] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[PLTableCell] operator[>] identifier[aCells] , annotation[@] identifier[Nonnull] Keyword[final]... |
public Observable<Boolean> deleteConversations(List<ChatConversationBase> conversationsToDelete) {
return asObservable(new Executor<Boolean>() {
@Override
void execute(ChatStore store, Emitter<Boolean> emitter) {
store.beginTransaction();
boolean isSuccess... | class class_name[name] begin[{]
method[deleteConversations, return_type[type[Observable]], modifier[public], parameter[conversationsToDelete]] begin[{]
return[call[.asObservable, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[St... | Keyword[public] identifier[Observable] operator[<] identifier[Boolean] operator[>] identifier[deleteConversations] operator[SEP] identifier[List] operator[<] identifier[ChatConversationBase] operator[>] identifier[conversationsToDelete] operator[SEP] {
Keyword[return] identifier[asObservable] operator[SEP] Keywo... |
public void onFailure() throws InterruptedException {
int val = currentFailureCount.incrementAndGet();
if (val > 50) {
currentFailureCount.compareAndSet(val, MAX_FAILURE_COUNT);
val = MAX_FAILURE_COUNT;
}
int delay = MIN_DELAY + ((MAX_DELAY - MIN_DELAY) / MAX_FAI... | class class_name[name] begin[{]
method[onFailure, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[int], val]
if[binary_operation[member[.val], >, literal[50]]] begin[{]
call[currentFailureCount.compareAndSet, parameter[member[.val],... | Keyword[public] Keyword[void] identifier[onFailure] operator[SEP] operator[SEP] Keyword[throws] identifier[InterruptedException] {
Keyword[int] identifier[val] operator[=] identifier[currentFailureCount] operator[SEP] identifier[incrementAndGet] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP]... |
private ModelNode createCPUNode() throws OperationFailedException {
ModelNode cpu = new ModelNode().setEmptyObject();
cpu.get(ARCH).set(getProperty("os.arch"));
cpu.get(AVAILABLE_PROCESSORS).set(ProcessorInfo.availableProcessors());
return cpu;
} | class class_name[name] begin[{]
method[createCPUNode, return_type[type[ModelNode]], modifier[private], parameter[]] begin[{]
local_variable[type[ModelNode], cpu]
call[cpu.get, parameter[member[.ARCH]]]
call[cpu.get, parameter[member[.AVAILABLE_PROCESSORS]]]
retur... | Keyword[private] identifier[ModelNode] identifier[createCPUNode] operator[SEP] operator[SEP] Keyword[throws] identifier[OperationFailedException] {
identifier[ModelNode] identifier[cpu] operator[=] Keyword[new] identifier[ModelNode] operator[SEP] operator[SEP] operator[SEP] identifier[setEmptyObject] operator[SE... |
private void persistAndMerge(final long truncatedTime, final Sink sink)
{
final String threadName = StringUtils.format(
"%s-%s-persist-n-merge", schema.getDataSource(), DateTimes.utc(truncatedTime)
);
mergeExecutor.execute(
new ThreadRenamingRunnable(threadName)
{
final I... | class class_name[name] begin[{]
method[persistAndMerge, return_type[void], modifier[private], parameter[truncatedTime, sink]] begin[{]
local_variable[type[String], threadName]
call[mergeExecutor.execute, parameter[ClassCreator(arguments=[MemberReference(member=threadName, postfix_operat... | Keyword[private] Keyword[void] identifier[persistAndMerge] operator[SEP] Keyword[final] Keyword[long] identifier[truncatedTime] , Keyword[final] identifier[Sink] identifier[sink] operator[SEP] {
Keyword[final] identifier[String] identifier[threadName] operator[=] identifier[StringUtils] operator[SEP] identifier... |
private String getHash() {
try {
Node contentNode = getContextNode();
Property data = contentNode.getProperty(Property.JCR_DATA);
Binary bin = (Binary) data.getBinary();
return String.format("{%s}%s", HASH_ALGORITHM, bin.getHexHash());
} catch (RepositoryE... | class class_name[name] begin[{]
method[getHash, return_type[type[String]], modifier[private], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContextNode, postfix_opera... | Keyword[private] identifier[String] identifier[getHash] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[Node] identifier[contentNode] operator[=] identifier[getContextNode] operator[SEP] operator[SEP] operator[SEP] identifier[Property] identifier[data] operator[=] identifier[contentNode] opera... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.