code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void setUserName(final String userName) {
if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
SibTr.debug(this, TRACE, "UserName", userName);
}
_userName = userName;
} | class class_name[name] begin[{]
method[setUserName, return_type[void], modifier[public], parameter[userName]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[TRACE.isDebugEnabled, parameter[]]]] begin[{]
call[SibTr.debug, para... | Keyword[public] Keyword[void] identifier[setUserName] operator[SEP] Keyword[final] identifier[String] identifier[userName] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[TRACE] operator[SEP] id... |
public void setAgentReady(KeyValueCollection reasons, KeyValueCollection extensions) throws WorkspaceApiException {
try {
VoicereadyData readyData = new VoicereadyData();
readyData.setReasons(Util.toKVList(reasons));
readyData.setExtensions(Util.toKVList(extensions));
... | class class_name[name] begin[{]
method[setAgentReady, return_type[void], modifier[public], parameter[reasons, extensions]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_t... | Keyword[public] Keyword[void] identifier[setAgentReady] operator[SEP] identifier[KeyValueCollection] identifier[reasons] , identifier[KeyValueCollection] identifier[extensions] operator[SEP] Keyword[throws] identifier[WorkspaceApiException] {
Keyword[try] {
identifier[VoicereadyData] identifier[ready... |
public static AlipayTradeRefundResponse tradeRefundToResponse(AlipayTradeRefundModel model)
throws AlipayApiException {
AlipayTradeRefundRequest request = new AlipayTradeRefundRequest();
request.setBizModel(model);
return AliPayApiConfigKit.getAliPayApiConfig().getAlipayClient().execute(request);
} | class class_name[name] begin[{]
method[tradeRefundToResponse, return_type[type[AlipayTradeRefundResponse]], modifier[public static], parameter[model]] begin[{]
local_variable[type[AlipayTradeRefundRequest], request]
call[request.setBizModel, parameter[member[.model]]]
return[cal... | Keyword[public] Keyword[static] identifier[AlipayTradeRefundResponse] identifier[tradeRefundToResponse] operator[SEP] identifier[AlipayTradeRefundModel] identifier[model] operator[SEP] Keyword[throws] identifier[AlipayApiException] {
identifier[AlipayTradeRefundRequest] identifier[request] operator[=] Keyword[ne... |
@Override protected void initGraphics() {
super.initGraphics();
imageListener = (o, ov, nv) -> { if (nv != null) { imgView.setImage(tile.getImage()); }};
titleText = new Text();
titleText.setFill(tile.getTitleColor());
Helper.enableNode(titleText, !tile.getTitle().isEmpty());
... | class class_name[name] begin[{]
method[initGraphics, return_type[void], modifier[protected], parameter[]] begin[{]
SuperMethodInvocation(arguments=[], member=initGraphics, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
assign[member... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[initGraphics] operator[SEP] operator[SEP] {
Keyword[super] operator[SEP] identifier[initGraphics] operator[SEP] operator[SEP] operator[SEP] identifier[imageListener] operator[=] operator[SEP] identifier[o] , identifier[ov] , identif... |
@Override
public Factory<?> getValueFactory(Parameter parameter) {
if (type.equals(parameter.getRawType()) && parameter.isAnnotationPresent(Auth.class)) {
return this;
}
return null;
} | class class_name[name] begin[{]
method[getValueFactory, return_type[type[Factory]], modifier[public], parameter[parameter]] begin[{]
if[binary_operation[call[type.equals, parameter[call[parameter.getRawType, parameter[]]]], &&, call[parameter.isAnnotationPresent, parameter[ClassReference(postfi... | annotation[@] identifier[Override] Keyword[public] identifier[Factory] operator[<] operator[?] operator[>] identifier[getValueFactory] operator[SEP] identifier[Parameter] identifier[parameter] operator[SEP] {
Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[par... |
public String getRemoteClassName()
{
String strClassName = this.getClass().getName().toString();
int iThinPos = strClassName.indexOf(Constants.THIN_SUBPACKAGE);
return strClassName.substring(0, iThinPos) + strClassName.substring(iThinPos + Constants.THIN_SUBPACKAGE.length());
} | class class_name[name] begin[{]
method[getRemoteClassName, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], strClassName]
local_variable[type[int], iThinPos]
return[binary_operation[call[strClassName.substring, parameter[literal[0], member[... | Keyword[public] identifier[String] identifier[getRemoteClassName] operator[SEP] operator[SEP] {
identifier[String] identifier[strClassName] operator[=] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifi... |
public static Mixin createBean(ClassLoader loader,Object[] beans) {
Generator gen = new Generator();
gen.setStyle(STYLE_BEANS);
gen.setDelegates(beans);
gen.setClassLoader(loader);
return gen.create();
} | class class_name[name] begin[{]
method[createBean, return_type[type[Mixin]], modifier[public static], parameter[loader, beans]] begin[{]
local_variable[type[Generator], gen]
call[gen.setStyle, parameter[member[.STYLE_BEANS]]]
call[gen.setDelegates, parameter[member[.bean... | Keyword[public] Keyword[static] identifier[Mixin] identifier[createBean] operator[SEP] identifier[ClassLoader] identifier[loader] , identifier[Object] operator[SEP] operator[SEP] identifier[beans] operator[SEP] {
identifier[Generator] identifier[gen] operator[=] Keyword[new] identifier[Generator] operator[SEP] ... |
private static TaskCompletionEvent getTceFromStore(TaskCompletionEvent t) {
// Use the store so that we can save memory in simulations where there
// are multiple task trackers in memory
synchronized(taskCompletionEventsStore) {
WeakReference<TaskCompletionEvent> e =
taskCompletionEventsStor... | class class_name[name] begin[{]
method[getTceFromStore, return_type[type[TaskCompletionEvent]], modifier[private static], parameter[t]] begin[{]
SYNCHRONIZED[member[.taskCompletionEventsStore]] BEGIN[{]
local_variable[type[WeakReference], e]
if[binary_operati... | Keyword[private] Keyword[static] identifier[TaskCompletionEvent] identifier[getTceFromStore] operator[SEP] identifier[TaskCompletionEvent] identifier[t] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[taskCompletionEventsStore] operator[SEP] {
identifier[WeakReference] operator[<] ident... |
public void read(ByteCodeParser in)
throws IOException
{
int length = in.readInt();
if (length != 2)
throw new IOException("expected length of 2 at " + length);
int code = in.readShort();
_signature = in.getUTF8(code);
} | class class_name[name] begin[{]
method[read, return_type[void], modifier[public], parameter[in]] begin[{]
local_variable[type[int], length]
if[binary_operation[member[.length], !=, literal[2]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(p... | Keyword[public] Keyword[void] identifier[read] operator[SEP] identifier[ByteCodeParser] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[length] operator[=] identifier[in] operator[SEP] identifier[readInt] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operato... |
public WarningPropertySet<T> addProperty(T prop) {
map.put(prop, Boolean.TRUE);
return this;
} | class class_name[name] begin[{]
method[addProperty, return_type[type[WarningPropertySet]], modifier[public], parameter[prop]] begin[{]
call[map.put, parameter[member[.prop], member[Boolean.TRUE]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[WarningPropertySet] operator[<] identifier[T] operator[>] identifier[addProperty] operator[SEP] identifier[T] identifier[prop] operator[SEP] {
identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[prop] , identifier[Boolean] operator[SEP] identifier[TRUE] operator[SEP... |
public static <T, S extends BaseStream<T, S>> Stream<T> wrap(S stream, ProgressBarBuilder pbb) {
Spliterator<T> sp = wrap(stream.spliterator(), pbb);
return StreamSupport.stream(sp, stream.isParallel());
} | class class_name[name] begin[{]
method[wrap, return_type[type[Stream]], modifier[public static], parameter[stream, pbb]] begin[{]
local_variable[type[Spliterator], sp]
return[call[StreamSupport.stream, parameter[member[.sp], call[stream.isParallel, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[S] Keyword[extends] identifier[BaseStream] operator[<] identifier[T] , identifier[S] operator[>] operator[>] identifier[Stream] operator[<] identifier[T] operator[>] identifier[wrap] operator[SEP] identifier[S] identifier[stream] , identifier[Pro... |
public static HttpRequestBase post(String path,
Map<String, String> headers,
Map<String, String> parameters,
HttpEntity entity,
Integer timeOutInSeconds) {
HttpPost post = ... | class class_name[name] begin[{]
method[post, return_type[type[HttpRequestBase]], modifier[public static], parameter[path, headers, parameters, entity, timeOutInSeconds]] begin[{]
local_variable[type[HttpPost], post]
call[.addHeaders, parameter[member[.post], member[.headers]]]
... | Keyword[public] Keyword[static] identifier[HttpRequestBase] identifier[post] operator[SEP] identifier[String] identifier[path] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[headers] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] ident... |
static EthiopicDate ofYearDay(int prolepticYear, int dayOfYear) {
EthiopicChronology.YEAR_RANGE.checkValidValue(prolepticYear, YEAR);
DAY_OF_YEAR.range().checkValidValue(dayOfYear, DAY_OF_YEAR);
if (dayOfYear == 366 && EthiopicChronology.INSTANCE.isLeapYear(prolepticYear) == false) {
... | class class_name[name] begin[{]
method[ofYearDay, return_type[type[EthiopicDate]], modifier[static], parameter[prolepticYear, dayOfYear]] begin[{]
call[EthiopicChronology.YEAR_RANGE.checkValidValue, parameter[member[.prolepticYear], member[.YEAR]]]
call[DAY_OF_YEAR.range, parame... | Keyword[static] identifier[EthiopicDate] identifier[ofYearDay] operator[SEP] Keyword[int] identifier[prolepticYear] , Keyword[int] identifier[dayOfYear] operator[SEP] {
identifier[EthiopicChronology] operator[SEP] identifier[YEAR_RANGE] operator[SEP] identifier[checkValidValue] operator[SEP] identifier[prolepti... |
private void collectGroupValues(Entity obj, PathEntry entry, GroupSetEntry groupSetEntry, Set<String>[] groupKeys) {
if(entry.query != null) {
timers.start("Where", entry.queryText);
boolean result = entry.checkCondition(obj);
timers.stop("Where", entry.queryText, result ? 1 : 0);
if (!result) return... | class class_name[name] begin[{]
method[collectGroupValues, return_type[void], modifier[private], parameter[obj, entry, groupSetEntry, groupKeys]] begin[{]
if[binary_operation[member[entry.query], !=, literal[null]]] begin[{]
call[timers.start, parameter[literal["Where"],... | Keyword[private] Keyword[void] identifier[collectGroupValues] operator[SEP] identifier[Entity] identifier[obj] , identifier[PathEntry] identifier[entry] , identifier[GroupSetEntry] identifier[groupSetEntry] , identifier[Set] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] identifier[groupKeys]... |
public void marshall(AssociateMemberToGroupRequest associateMemberToGroupRequest, ProtocolMarshaller protocolMarshaller) {
if (associateMemberToGroupRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.m... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[associateMemberToGroupRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.associateMemberToGroupRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreato... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[AssociateMemberToGroupRequest] identifier[associateMemberToGroupRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[associateMemberToGroupRequest] operator[==] Ot... |
@SuppressWarnings("unchecked")
public <C extends T> C build() {
if(p == null) {
throw new AbortException("build() may be called only once.");
}
final T obj = ClassGenericsUtil.parameterizeOrAbort(clazz, p);
if(p.hasUnusedParameters()) {
LOG.warning("Unused parameters: " + p.getRemainingPar... | class class_name[name] begin[{]
method[build, return_type[type[C]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.p], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=Non... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[C] Keyword[extends] identifier[T] operator[>] identifier[C] identifier[build] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[p] operator[==] Other[null] operator[SEP] ... |
@Override
public IScan getScanByNum(int scanNum) {
IScan scan = getNum2scan().get(scanNum);
if (scan != null) {
return scan;
}
return null;
} | class class_name[name] begin[{]
method[getScanByNum, return_type[type[IScan]], modifier[public], parameter[scanNum]] begin[{]
local_variable[type[IScan], scan]
if[binary_operation[member[.scan], !=, literal[null]]] begin[{]
return[member[.scan]]
else begin[{]
None
... | annotation[@] identifier[Override] Keyword[public] identifier[IScan] identifier[getScanByNum] operator[SEP] Keyword[int] identifier[scanNum] operator[SEP] {
identifier[IScan] identifier[scan] operator[=] identifier[getNum2scan] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[sc... |
public static void recursiveDelete(final ServiceBundler services, final Session session, final IRI identifier,
final String baseUrl) {
final List<IRI> resources = services.getResourceService().get(identifier)
.thenApply(res -> res.stream(LDP.PreferContainment).map(Quad::getObject).filter... | class class_name[name] begin[{]
method[recursiveDelete, return_type[void], modifier[public static], parameter[services, session, identifier, baseUrl]] begin[{]
local_variable[type[List], resources]
call[resources.forEach, parameter[LambdaExpression(body=MethodInvocation(arguments=[Membe... | Keyword[public] Keyword[static] Keyword[void] identifier[recursiveDelete] operator[SEP] Keyword[final] identifier[ServiceBundler] identifier[services] , Keyword[final] identifier[Session] identifier[session] , Keyword[final] identifier[IRI] identifier[identifier] , Keyword[final] identifier[String] identifier[baseUr... |
@Override
public ITag readTag() {
ITag tag = null;
try {
lock.lockInterruptibly();
long oldPos = getCurrentPosition();
tag = readTagHeader();
if (tag != null) {
boolean isMetaData = tag.getDataType() == TYPE_METADATA;
lo... | class class_name[name] begin[{]
method[readTag, return_type[type[ITag]], modifier[public], parameter[]] begin[{]
local_variable[type[ITag], tag]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=lockInterruptibly, postfix_operators=[], prefix_operators=[],... | annotation[@] identifier[Override] Keyword[public] identifier[ITag] identifier[readTag] operator[SEP] operator[SEP] {
identifier[ITag] identifier[tag] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[lock] operator[SEP] identifier[lockInterruptibly] operator[SEP] operator[SEP] operator[... |
public boolean startsWithinMinBorders(Interval interval){
return interval.getStart() >= minBorders.getStart() &&
interval.getStart() <= minBorders.getEnd();
} | class class_name[name] begin[{]
method[startsWithinMinBorders, return_type[type[boolean]], modifier[public], parameter[interval]] begin[{]
return[binary_operation[binary_operation[call[interval.getStart, parameter[]], >=, call[minBorders.getStart, parameter[]]], &&, binary_operation[call[interval.getSt... | Keyword[public] Keyword[boolean] identifier[startsWithinMinBorders] operator[SEP] identifier[Interval] identifier[interval] operator[SEP] {
Keyword[return] identifier[interval] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[>=] identifier[minBorders] operator[SEP] identifier[getStart] op... |
public void draw(GraphicContext graphicContext) {
/*
* Swap bitmaps here (and only here).
* Swapping is done when layer manager has finished. Else draw old bitmap again.
* This draw() is always called when layer manager has finished. This ensures that the
* last generated fra... | class class_name[name] begin[{]
method[draw, return_type[void], modifier[public], parameter[graphicContext]] begin[{]
call[graphicContext.fillColor, parameter[THIS[member[None.displayModel]call[None.getBackgroundColor, parameter[]]]]]
call[.swapBitmaps, parameter[]]
... | Keyword[public] Keyword[void] identifier[draw] operator[SEP] identifier[GraphicContext] identifier[graphicContext] operator[SEP] {
identifier[graphicContext] operator[SEP] identifier[fillColor] operator[SEP] Keyword[this] operator[SEP] identifier[displayModel] operator[SEP] identifier[getBackgroundColor] operato... |
public static Statement makeStatement(Claim claim,
List<Reference> references, StatementRank rank,
String statementId) {
return factory.getStatement(claim, references, rank, statementId);
} | class class_name[name] begin[{]
method[makeStatement, return_type[type[Statement]], modifier[public static], parameter[claim, references, rank, statementId]] begin[{]
return[call[factory.getStatement, parameter[member[.claim], member[.references], member[.rank], member[.statementId]]]]
end[}]
END[}... | Keyword[public] Keyword[static] identifier[Statement] identifier[makeStatement] operator[SEP] identifier[Claim] identifier[claim] , identifier[List] operator[<] identifier[Reference] operator[>] identifier[references] , identifier[StatementRank] identifier[rank] , identifier[String] identifier[statementId] operator[... |
public static BufferedImage flipHorizontal(Object srcIm, File tarIm) {
BufferedImage flipImage = flipHorizontal(srcIm);
Images.write(flipImage, tarIm);
return flipImage;
} | class class_name[name] begin[{]
method[flipHorizontal, return_type[type[BufferedImage]], modifier[public static], parameter[srcIm, tarIm]] begin[{]
local_variable[type[BufferedImage], flipImage]
call[Images.write, parameter[member[.flipImage], member[.tarIm]]]
return[member[.fli... | Keyword[public] Keyword[static] identifier[BufferedImage] identifier[flipHorizontal] operator[SEP] identifier[Object] identifier[srcIm] , identifier[File] identifier[tarIm] operator[SEP] {
identifier[BufferedImage] identifier[flipImage] operator[=] identifier[flipHorizontal] operator[SEP] identifier[srcIm] oper... |
protected void exceptionCaught(IoSession session, Throwable cause) {
log.error("Exception while communicating with " + this + ".", cause);
// Nothing to do if we have no memory
if (cause instanceof OutOfMemoryError) {
System.exit(1);
}
if (this.disconnectOnException) {
this._disconnect()... | class class_name[name] begin[{]
method[exceptionCaught, return_type[void], modifier[protected], parameter[session, cause]] begin[{]
call[log.error, parameter[binary_operation[binary_operation[literal["Exception while communicating with "], +, THIS[]], +, literal["."]], member[.cause]]]
... | Keyword[protected] Keyword[void] identifier[exceptionCaught] operator[SEP] identifier[IoSession] identifier[session] , identifier[Throwable] identifier[cause] operator[SEP] {
identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] Keyword[this] operator[+] literal[String] , id... |
public <A> A createAliasForProperty(Class<A> cl, Expression<?> path) {
return createProxy(cl, path);
} | class class_name[name] begin[{]
method[createAliasForProperty, return_type[type[A]], modifier[public], parameter[cl, path]] begin[{]
return[call[.createProxy, parameter[member[.cl], member[.path]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[A] operator[>] identifier[A] identifier[createAliasForProperty] operator[SEP] identifier[Class] operator[<] identifier[A] operator[>] identifier[cl] , identifier[Expression] operator[<] operator[?] operator[>] identifier[path] operator[SEP] {
Keyword[return] identifier[cre... |
protected Sid createSid(boolean isPrincipal, String sid) {
if (isPrincipal) {
return new PrincipalSid(sid);
}
else {
return new GrantedAuthoritySid(sid);
}
} | class class_name[name] begin[{]
method[createSid, return_type[type[Sid]], modifier[protected], parameter[isPrincipal, sid]] begin[{]
if[member[.isPrincipal]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=sid, postfix_operators=[], prefix_operators=[], qualifier=, se... | Keyword[protected] identifier[Sid] identifier[createSid] operator[SEP] Keyword[boolean] identifier[isPrincipal] , identifier[String] identifier[sid] operator[SEP] {
Keyword[if] operator[SEP] identifier[isPrincipal] operator[SEP] {
Keyword[return] Keyword[new] identifier[PrincipalSid] operator[SEP] id... |
public void finalizeDisc(File isoPath) {
ISOImageFileHandler handler = null;
try {
handler = new ISOImageFileHandler(isoPath);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
try {
CreateISO iso = new CreateISO(handler, root);
... | class class_name[name] begin[{]
method[finalizeDisc, return_type[void], modifier[public], parameter[isoPath]] begin[{]
local_variable[type[ISOImageFileHandler], handler]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=handler, postfix_operators=[... | Keyword[public] Keyword[void] identifier[finalizeDisc] operator[SEP] identifier[File] identifier[isoPath] operator[SEP] {
identifier[ISOImageFileHandler] identifier[handler] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[handler] operator[=] Keyword[new] identifier[ISOImageFileHandler... |
public void usage(PrintStream out, Help.ColorScheme colorScheme) {
out.print(usage(new StringBuilder(), getHelpFactory().create(getCommandSpec(), colorScheme)));
out.flush();
} | class class_name[name] begin[{]
method[usage, return_type[void], modifier[public], parameter[out, colorScheme]] begin[{]
call[out.print, parameter[call[.usage, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=N... | Keyword[public] Keyword[void] identifier[usage] operator[SEP] identifier[PrintStream] identifier[out] , identifier[Help] operator[SEP] identifier[ColorScheme] identifier[colorScheme] operator[SEP] {
identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[usage] operator[SEP] Keyword[new] identi... |
public static <S extends Sequence<S>> int calculateScore(S seq1, Range seq1Range, Mutations<S> mutations,
AffineGapAlignmentScoring<S> scoring) {
if (!mutations.isEmpty() && mutations.getPositionByIndex(0) < seq1Range.getFrom() - 1)
throw ... | class class_name[name] begin[{]
method[calculateScore, return_type[type[int]], modifier[public static], parameter[seq1, seq1Range, mutations, scoring]] begin[{]
if[binary_operation[call[mutations.isEmpty, parameter[]], &&, binary_operation[call[mutations.getPositionByIndex, parameter[literal[0]... | Keyword[public] Keyword[static] operator[<] identifier[S] Keyword[extends] identifier[Sequence] operator[<] identifier[S] operator[>] operator[>] Keyword[int] identifier[calculateScore] operator[SEP] identifier[S] identifier[seq1] , identifier[Range] identifier[seq1Range] , identifier[Mutations] operator[<] identifie... |
public static void addHttpResponseRule(RequestMatcher requestMatcher, List<? extends HttpResponse> responses) {
getFakeHttpLayer().addHttpResponseRule(requestMatcher, responses);
} | class class_name[name] begin[{]
method[addHttpResponseRule, return_type[void], modifier[public static], parameter[requestMatcher, responses]] begin[{]
call[.getFakeHttpLayer, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[addHttpResponseRule] operator[SEP] identifier[RequestMatcher] identifier[requestMatcher] , identifier[List] operator[<] operator[?] Keyword[extends] identifier[HttpResponse] operator[>] identifier[responses] operator[SEP] {
identifier[getFakeHttpLayer] op... |
public static String digest(String algorithm, String data, String enc) throws NoSuchAlgorithmException,
UnsupportedEncodingException
{
return digest(algorithm, data.getBytes(enc));
} | class class_name[name] begin[{]
method[digest, return_type[type[String]], modifier[public static], parameter[algorithm, data, enc]] begin[{]
return[call[.digest, parameter[member[.algorithm], call[data.getBytes, parameter[member[.enc]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[digest] operator[SEP] identifier[String] identifier[algorithm] , identifier[String] identifier[data] , identifier[String] identifier[enc] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] , identifier[UnsupportedEncodingException] {
... |
public static void assertResponseNotReceived(String msg, int statusCode, String method,
long sequenceNumber, MessageListener obj) {
assertNotNull("Null assert object passed in", obj);
assertFalse(msg, responseReceived(statusCode, method, sequenceNumber, obj));
} | class class_name[name] begin[{]
method[assertResponseNotReceived, return_type[void], modifier[public static], parameter[msg, statusCode, method, sequenceNumber, obj]] begin[{]
call[.assertNotNull, parameter[literal["Null assert object passed in"], member[.obj]]]
call[.assertFals... | Keyword[public] Keyword[static] Keyword[void] identifier[assertResponseNotReceived] operator[SEP] identifier[String] identifier[msg] , Keyword[int] identifier[statusCode] , identifier[String] identifier[method] , Keyword[long] identifier[sequenceNumber] , identifier[MessageListener] identifier[obj] operator[SEP] {... |
@SuppressWarnings("unchecked")
void remove(CacheDisposable<T> consumer) {
for (;;) {
CacheDisposable<T>[] current = observers.get();
int n = current.length;
if (n == 0) {
return;
}
int j = -1;
for (int i = 0; i < n; i++... | class class_name[name] begin[{]
method[remove, return_type[void], modifier[default], parameter[consumer]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], ... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[void] identifier[remove] operator[SEP] identifier[CacheDisposable] operator[<] identifier[T] operator[>] identifier[consumer] operator[SEP] {
Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
... |
public boolean hasValidationStamp(String name, String status) {
return (StringUtils.equals(name, getValidationStamp().getName()))
&& isRun()
&& (
StringUtils.isBlank(status)
|| StringUtils.equals(status, getLastStatus().getStatusID().getId(... | class class_name[name] begin[{]
method[hasValidationStamp, return_type[type[boolean]], modifier[public], parameter[name, status]] begin[{]
return[binary_operation[binary_operation[call[StringUtils.equals, parameter[member[.name], call[.getValidationStamp, parameter[]]]], &&, call[.isRun, parameter[]]],... | Keyword[public] Keyword[boolean] identifier[hasValidationStamp] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[status] operator[SEP] {
Keyword[return] operator[SEP] identifier[StringUtils] operator[SEP] identifier[equals] operator[SEP] identifier[name] , identifier[getValidat... |
private List<Object> _jdoExecuteQuery(
final String oql,
final Object[] params
)
{
List<Object> results = null;
try {
results = getExtendedCastorTemplate().findByQuery( oql, params );
} catch (DataAccessException ex) {
... | class class_name[name] begin[{]
method[_jdoExecuteQuery, return_type[type[List]], modifier[private], parameter[oql, params]] begin[{]
local_variable[type[List], results]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=results, postfix_operators=[... | Keyword[private] identifier[List] operator[<] identifier[Object] operator[>] identifier[_jdoExecuteQuery] operator[SEP] Keyword[final] identifier[String] identifier[oql] , Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[params] operator[SEP] {
identifier[List] operator[<] identifier[Obj... |
@SuppressWarnings("squid:S134")
private void createHtmlReport(FilePath reportFolder,
String testFolderPath,
File artifactsDir,
List<String> reportNames,
TestResult testResult) thro... | class class_name[name] begin[{]
method[createHtmlReport, return_type[void], modifier[private], parameter[reportFolder, testFolderPath, artifactsDir, reportNames, testResult]] begin[{]
local_variable[type[String], archiveTestResultMode]
local_variable[type[boolean], createReport]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[createHtmlReport] operator[SEP] identifier[FilePath] identifier[reportFolder] , identifier[String] identifier[testFolderPath] , identifier[File] identifier[artifactsDir] , identifier[List]... |
@Override
public void writeDefaultNamespace(String nsURI)
throws XMLStreamException
{
if (!mStartElementOpen) {
throwOutputError(ERR_NSDECL_WRONG_STATE);
}
// 27-Mar-2007, TSa: Apparently TCK expects a binding to be added
setDefaultNamespace(nsURI);
do... | class class_name[name] begin[{]
method[writeDefaultNamespace, return_type[void], modifier[public], parameter[nsURI]] begin[{]
if[member[.mStartElementOpen]] begin[{]
call[.throwOutputError, parameter[member[.ERR_NSDECL_WRONG_STATE]]]
else begin[{]
None
en... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeDefaultNamespace] operator[SEP] identifier[String] identifier[nsURI] operator[SEP] Keyword[throws] identifier[XMLStreamException] {
Keyword[if] operator[SEP] operator[!] identifier[mStartElementOpen] operator[SEP] {
ident... |
public static synchronized File extractTessResources(String resourceName) {
File targetPath = null;
try {
targetPath = new File(TESS4J_TEMP_DIR, resourceName);
Enumeration<URL> resources = LoadLibs.class.getClassLoader().getResources(resourceName);
while (resources.... | class class_name[name] begin[{]
method[extractTessResources, return_type[type[File]], modifier[synchronized public static], parameter[resourceName]] begin[{]
local_variable[type[File], targetPath]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=t... | Keyword[public] Keyword[static] Keyword[synchronized] identifier[File] identifier[extractTessResources] operator[SEP] identifier[String] identifier[resourceName] operator[SEP] {
identifier[File] identifier[targetPath] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[targetPath] operator... |
public char[] toCharArray()
{
// check if there is a cached single charbuffer
if (firstChunk == lastChunk && firstChunk instanceof CharBufferChunk
&& allocBuffer.charsUsed() == 0
&& ((CharBufferChunk) firstChunk).isSingleBuffer())
{
return ((CharBu... | class class_name[name] begin[{]
method[toCharArray, return_type[type[char]], modifier[public], parameter[]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[member[.firstChunk], ==, member[.lastChunk]], &&, binary_operation[member[.firstChunk], instanceof, type[Ch... | Keyword[public] Keyword[char] operator[SEP] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[firstChunk] operator[==] identifier[lastChunk] operator[&&] identifier[firstChunk] Keyword[instanceof] identifier[CharBufferChunk] operator[&&] identifier[allocBuff... |
@Override
public Class[] getParameterTypes() {
Class[] a, b, result;
a = base.getParameterTypes();
b = para.getParameterTypes();
result = new Class[a.length - 1 + b.length];
System.arraycopy(a, 0, result, 0, idx);
System.arraycopy(b, 0, result, idx, b.length);
... | class class_name[name] begin[{]
method[getParameterTypes, return_type[type[Class]], modifier[public], parameter[]] begin[{]
local_variable[type[Class], a]
assign[member[.a], call[base.getParameterTypes, parameter[]]]
assign[member[.b], call[para.getParameterTypes, parame... | annotation[@] identifier[Override] Keyword[public] identifier[Class] operator[SEP] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] {
identifier[Class] operator[SEP] operator[SEP] identifier[a] , identifier[b] , identifier[result] operator[SEP] identifier[a] operator[=] identifier[base] ... |
public static Cell getCell(final Sheet sheet, final CellPosition address) {
ArgUtils.notNull(sheet, "sheet");
ArgUtils.notNull(address, "address");
return getCell(sheet, address.getColumn(), address.getRow());
} | class class_name[name] begin[{]
method[getCell, return_type[type[Cell]], modifier[public static], parameter[sheet, address]] begin[{]
call[ArgUtils.notNull, parameter[member[.sheet], literal["sheet"]]]
call[ArgUtils.notNull, parameter[member[.address], literal["address"]]]
... | Keyword[public] Keyword[static] identifier[Cell] identifier[getCell] operator[SEP] Keyword[final] identifier[Sheet] identifier[sheet] , Keyword[final] identifier[CellPosition] identifier[address] operator[SEP] {
identifier[ArgUtils] operator[SEP] identifier[notNull] operator[SEP] identifier[sheet] , literal[St... |
public Observable<ServiceResponse<ConnectionSharedKeyInner>> beginSetSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceG... | class class_name[name] begin[{]
method[beginSetSharedKeyWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, virtualNetworkGatewayConnectionName, parameters]] begin[{]
if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{]... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[ConnectionSharedKeyInner] operator[>] operator[>] identifier[beginSetSharedKeyWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualNetworkGate... |
public Token getFirst(Transaction transaction)
throws ObjectManagerException
{
if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
trace.entry(this, cclass,
"getFirst",
new Object[] { transaction });
Link first... | class class_name[name] begin[{]
method[getFirst, return_type[type[Token]], modifier[public], parameter[transaction]] begin[{]
if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{]
call[trace.entry, parameter[THIS[]... | Keyword[public] identifier[Token] identifier[getFirst] operator[SEP] identifier[Transaction] identifier[transaction] operator[SEP] Keyword[throws] identifier[ObjectManagerException] {
Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[... |
private void processLessFile(DynamicSkinInstanceData data) throws IOException, LessException {
// Prepare the LESS sources for compilation
final LessSource lessSource = new LessSource(new File(getSkinLessPath(data)));
if (logger.isDebugEnabled()) {
final String result = lessSource.... | class class_name[name] begin[{]
method[processLessFile, return_type[void], modifier[private], parameter[data]] begin[{]
local_variable[type[LessSource], lessSource]
if[call[logger.isDebugEnabled, parameter[]]] begin[{]
local_variable[type[String], result]
local_v... | Keyword[private] Keyword[void] identifier[processLessFile] operator[SEP] identifier[DynamicSkinInstanceData] identifier[data] operator[SEP] Keyword[throws] identifier[IOException] , identifier[LessException] {
Keyword[final] identifier[LessSource] identifier[lessSource] operator[=] Keyword[new] identifier[LessS... |
public static Attributes getAttributesForClass(final Class<?> clazz) throws IOException {
// thanks to
// http://stackoverflow.com/questions/1272648/need-to-read-own-jars-manifest-and-not-root-classloaders-manifest/1273432#1273432
final String className = clazz.getSimpleName() + ".class";
... | class class_name[name] begin[{]
method[getAttributesForClass, return_type[type[Attributes]], modifier[public static], parameter[clazz]] begin[{]
local_variable[type[String], className]
local_variable[type[String], classPath]
local_variable[type[String], type]
local_variable[type... | Keyword[public] Keyword[static] identifier[Attributes] identifier[getAttributesForClass] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[String] identifier[className] operator[=]... |
public byte[] getSignerContents() {
if (PdfName.ADBE_X509_RSA_SHA1.equals(get(PdfName.SUBFILTER)))
return pkcs.getEncodedPKCS1();
else
return pkcs.getEncodedPKCS7();
} | class class_name[name] begin[{]
method[getSignerContents, return_type[type[byte]], modifier[public], parameter[]] begin[{]
if[call[PdfName.ADBE_X509_RSA_SHA1.equals, parameter[call[.get, parameter[member[PdfName.SUBFILTER]]]]]] begin[{]
return[call[pkcs.getEncodedPKCS1, parameter[]]]
el... | Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[getSignerContents] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[PdfName] operator[SEP] identifier[ADBE_X509_RSA_SHA1] operator[SEP] identifier[equals] operator[SEP] identifier[get] operator[SEP] identifier[PdfName] operato... |
private void initRecordBuilderFactories() {
for (FieldMapping fieldMapping : avroSchema.getColumnMappingDescriptor().getFieldMappings()) {
if (fieldMapping.getMappingType() == MappingType.KEY_AS_COLUMN) {
String fieldName = fieldMapping.getFieldName();
Schema fieldSchema = avroSchema.getAvroSc... | class class_name[name] begin[{]
method[initRecordBuilderFactories, return_type[void], modifier[private], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getMappingType, postfix_operators=... | Keyword[private] Keyword[void] identifier[initRecordBuilderFactories] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[FieldMapping] identifier[fieldMapping] operator[:] identifier[avroSchema] operator[SEP] identifier[getColumnMappingDescriptor] operator[SEP] operator[SEP] operator[SEP] ident... |
public void switchDataSource(BoneCPConfig newConfig) throws SQLException {
logger.info("Switch to new datasource requested. New Config: "+newConfig);
DataSource oldDS = getTargetDataSource();
if (!(oldDS instanceof BoneCPDataSource)){
throw new SQLException("Unknown datasource type! Was expecting BoneCPDataS... | class class_name[name] begin[{]
method[switchDataSource, return_type[void], modifier[public], parameter[newConfig]] begin[{]
call[logger.info, parameter[binary_operation[literal["Switch to new datasource requested. New Config: "], +, member[.newConfig]]]]
local_variable[type[DataSource]... | Keyword[public] Keyword[void] identifier[switchDataSource] operator[SEP] identifier[BoneCPConfig] identifier[newConfig] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[newConfig] operator[SEP] operator... |
protected Camera openCamera() throws CameraAccessException, IOException
{
Camera camera = Camera.open();
if (camera == null)
{
throw new CameraAccessException(CameraAccessException.CAMERA_ERROR);
}
Camera.Parameters params = camera.getParameters();
param... | class class_name[name] begin[{]
method[openCamera, return_type[type[Camera]], modifier[protected], parameter[]] begin[{]
local_variable[type[Camera], camera]
if[binary_operation[member[.camera], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[M... | Keyword[protected] identifier[Camera] identifier[openCamera] operator[SEP] operator[SEP] Keyword[throws] identifier[CameraAccessException] , identifier[IOException] {
identifier[Camera] identifier[camera] operator[=] identifier[Camera] operator[SEP] identifier[open] operator[SEP] operator[SEP] operator[SEP] Key... |
@SuppressWarnings("unchecked")
public static CoordinateList orderLineGeometries( List<Geometry> geometryList, double thresHold ) {
/*
* first search the feature that is one of the two external points
*/
Geometry firstFeature = null;
boolean foundFirst = true;
boolea... | class class_name[name] begin[{]
method[orderLineGeometries, return_type[type[CoordinateList]], modifier[public static], parameter[geometryList, thresHold]] begin[{]
local_variable[type[Geometry], firstFeature]
local_variable[type[boolean], foundFirst]
local_variable[type[boolean], found... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[CoordinateList] identifier[orderLineGeometries] operator[SEP] identifier[List] operator[<] identifier[Geometry] operator[>] identifier[geometryList] , Keyword[double] identifier[thresHold] ... |
protected void initAttributes(TypedArray attrArray) {
mCircleXRadius = attrArray.getDimension(R.styleable.CircularSeekBar_circle_x_radius, DEFAULT_CIRCLE_X_RADIUS * DPTOPX_SCALE);
mCircleYRadius = attrArray.getDimension(R.styleable.CircularSeekBar_circle_y_radius, DEFAULT_CIRCLE_Y_RADIUS * DPTOPX_SCALE)... | class class_name[name] begin[{]
method[initAttributes, return_type[void], modifier[protected], parameter[attrArray]] begin[{]
assign[member[.mCircleXRadius], call[attrArray.getDimension, parameter[member[R.styleable.CircularSeekBar_circle_x_radius], binary_operation[member[.DEFAULT_CIRCLE_X_RAD... | Keyword[protected] Keyword[void] identifier[initAttributes] operator[SEP] identifier[TypedArray] identifier[attrArray] operator[SEP] {
identifier[mCircleXRadius] operator[=] identifier[attrArray] operator[SEP] identifier[getDimension] operator[SEP] identifier[R] operator[SEP] identifier[styleable] operator[SEP] ... |
private String makeSqlName(final StringBuilder packageName, final String filePath) {
if (packageName.length() == 0) {
return trimSqlExtension(filePath);
} else {
return new StringBuilder(packageName).append(PATH_SEPARATOR).append(trimSqlExtension(filePath)).toString();
}
} | class class_name[name] begin[{]
method[makeSqlName, return_type[type[String]], modifier[private], parameter[packageName, filePath]] begin[{]
if[binary_operation[call[packageName.length, parameter[]], ==, literal[0]]] begin[{]
return[call[.trimSqlExtension, parameter[member[.filePath... | Keyword[private] identifier[String] identifier[makeSqlName] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[packageName] , Keyword[final] identifier[String] identifier[filePath] operator[SEP] {
Keyword[if] operator[SEP] identifier[packageName] operator[SEP] identifier[length] operator[SEP] ope... |
public double[] getDoubleList(final String propertyName) {
if (propertyName == null) {
throw new NullPointerException("propertyName must not be null.");
}
Integer index = propertyMap.get(propertyName);
if (index == null) {
throw new IllegalArgumentException("non e... | class class_name[name] begin[{]
method[getDoubleList, return_type[type[double]], modifier[public], parameter[propertyName]] begin[{]
if[binary_operation[member[.propertyName], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[]... | Keyword[public] Keyword[double] operator[SEP] operator[SEP] identifier[getDoubleList] operator[SEP] Keyword[final] identifier[String] identifier[propertyName] operator[SEP] {
Keyword[if] operator[SEP] identifier[propertyName] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identif... |
public Integer optInt(String name, Integer fallback) {
return optInt(name, fallback, true);
} | class class_name[name] begin[{]
method[optInt, return_type[type[Integer]], modifier[public], parameter[name, fallback]] begin[{]
return[call[.optInt, parameter[member[.name], member[.fallback], literal[true]]]]
end[}]
END[}] | Keyword[public] identifier[Integer] identifier[optInt] operator[SEP] identifier[String] identifier[name] , identifier[Integer] identifier[fallback] operator[SEP] {
Keyword[return] identifier[optInt] operator[SEP] identifier[name] , identifier[fallback] , literal[boolean] operator[SEP] operator[SEP]
}
|
public void launchWorker(Map conf, IContext sharedContext, String topologyId,
String supervisorId, Integer port, String workerId,
ConcurrentHashMap<String, String> workerThreadPidsAtom) throws Exception {
String pid = UUID.randomUUID().toString();
... | class class_name[name] begin[{]
method[launchWorker, return_type[void], modifier[public], parameter[conf, sharedContext, topologyId, supervisorId, port, workerId, workerThreadPidsAtom]] begin[{]
local_variable[type[String], pid]
local_variable[type[WorkerShutdown], worker]
call[... | Keyword[public] Keyword[void] identifier[launchWorker] operator[SEP] identifier[Map] identifier[conf] , identifier[IContext] identifier[sharedContext] , identifier[String] identifier[topologyId] , identifier[String] identifier[supervisorId] , identifier[Integer] identifier[port] , identifier[String] identifier[wor... |
public BigDecimal getAvailable() {
if (available == null) {
return total
.subtract(frozen)
.subtract(loaned)
.add(borrowed)
.subtract(withdrawing)
.subtract(depositing);
} else {
return available;
}
} | class class_name[name] begin[{]
method[getAvailable, return_type[type[BigDecimal]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.available], ==, literal[null]]] begin[{]
return[call[total.subtract, parameter[member[.frozen]]]]
else begin[{]
... | Keyword[public] identifier[BigDecimal] identifier[getAvailable] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[available] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[total] operator[SEP] identifier[subtract] operator[SEP] identifier[frozen] operator[SEP] ope... |
public static CPDAvailabilityEstimate findByCProductId(long CProductId)
throws com.liferay.commerce.exception.NoSuchCPDAvailabilityEstimateException {
return getPersistence().findByCProductId(CProductId);
} | class class_name[name] begin[{]
method[findByCProductId, return_type[type[CPDAvailabilityEstimate]], modifier[public static], parameter[CProductId]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CPDAvailabilityEstimate] identifier[findByCProductId] operator[SEP] Keyword[long] identifier[CProductId] operator[SEP] Keyword[throws] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[exception] operator[SEP] identif... |
public int getQueryCacheCount(String mapName) {
Map<String, InternalQueryCache<K, V>> queryCacheRegistry = queryCacheRegistryPerMap.get(mapName);
if (queryCacheRegistry == null) {
return 0;
}
return queryCacheRegistry.size();
} | class class_name[name] begin[{]
method[getQueryCacheCount, return_type[type[int]], modifier[public], parameter[mapName]] begin[{]
local_variable[type[Map], queryCacheRegistry]
if[binary_operation[member[.queryCacheRegistry], ==, literal[null]]] begin[{]
return[literal[0]]
... | Keyword[public] Keyword[int] identifier[getQueryCacheCount] operator[SEP] identifier[String] identifier[mapName] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[InternalQueryCache] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[queryCacheRegistry] opera... |
public void setSecurityContext(final SecurityContext sc) {
if (securityContext == null) {
if (sc.isSuperUserSecurityContext() == Boolean.FALSE) {
securityContext = sc;
}
}
} | class class_name[name] begin[{]
method[setSecurityContext, return_type[void], modifier[public], parameter[sc]] begin[{]
if[binary_operation[member[.securityContext], ==, literal[null]]] begin[{]
if[binary_operation[call[sc.isSuperUserSecurityContext, parameter[]], ==, me... | Keyword[public] Keyword[void] identifier[setSecurityContext] operator[SEP] Keyword[final] identifier[SecurityContext] identifier[sc] operator[SEP] {
Keyword[if] operator[SEP] identifier[securityContext] operator[==] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[sc] operator[SEP] ide... |
public static Builder builder(ServiceMetadata serviceMetadata) {
checkNotNull(serviceMetadata, "serviceMetadata: null");
ServerDto server = ServerDto.builder()
.setHostName(serviceMetadata.getHostName())
.setStartupDateTime(serviceMetadata.getStartupTime())
.build();
BuildDto build =... | class class_name[name] begin[{]
method[builder, return_type[type[Builder]], modifier[public static], parameter[serviceMetadata]] begin[{]
call[.checkNotNull, parameter[member[.serviceMetadata], literal["serviceMetadata: null"]]]
local_variable[type[ServerDto], server]
local_vari... | Keyword[public] Keyword[static] identifier[Builder] identifier[builder] operator[SEP] identifier[ServiceMetadata] identifier[serviceMetadata] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[serviceMetadata] , literal[String] operator[SEP] operator[SEP] identifier[ServerDto] identifier[server] ... |
public ChainedProperty<S> append(StorableProperty<?> property, boolean outerJoin) {
if (property == null) {
throw new IllegalArgumentException();
}
StorableProperty<?>[] newChain = new StorableProperty[getChainCount() + 1];
if (newChain.length > 1) {
Syste... | class class_name[name] begin[{]
method[append, return_type[type[ChainedProperty]], modifier[public], parameter[property, outerJoin]] begin[{]
if[binary_operation[member[.property], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, construct... | Keyword[public] identifier[ChainedProperty] operator[<] identifier[S] operator[>] identifier[append] operator[SEP] identifier[StorableProperty] operator[<] operator[?] operator[>] identifier[property] , Keyword[boolean] identifier[outerJoin] operator[SEP] {
Keyword[if] operator[SEP] identifier[property] operato... |
static byte[] sha1(InputStream in) {
try {
MessageDigest md = MessageDigest.getInstance(SHA1_DIGEST);
byte[] buffer = new byte[4096];
int bytes;
while ( (bytes = in.read(buffer)) > 0) {
md.update(buffer, 0, bytes);
}
return md.digest();
}
catch(NoSuchAlgorithmExc... | class class_name[name] begin[{]
method[sha1, return_type[type[byte]], modifier[static], parameter[in]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=SHA1_DIGEST, postfix... | Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[sha1] operator[SEP] identifier[InputStream] identifier[in] operator[SEP] {
Keyword[try] {
identifier[MessageDigest] identifier[md] operator[=] identifier[MessageDigest] operator[SEP] identifier[getInstance] operator[SEP] identifier[S... |
void updateFromResponseOnPutPatch(Response<ResponseBody> response) throws CloudException, IOException {
String responseContent = null;
if (response.body() != null) {
responseContent = response.body().string();
response.body().close();
}
if (responseContent == nul... | class class_name[name] begin[{]
method[updateFromResponseOnPutPatch, return_type[void], modifier[default], parameter[response]] begin[{]
local_variable[type[String], responseContent]
if[binary_operation[call[response.body, parameter[]], !=, literal[null]]] begin[{]
... | Keyword[void] identifier[updateFromResponseOnPutPatch] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] Keyword[throws] identifier[CloudException] , identifier[IOException] {
identifier[String] identifier[responseContent] operator[=] Other[nu... |
static void sendResponse(final ManagementRequestContext<ExecuteRequestContext> context, final byte responseType, final ModelNode response) throws IOException {
// WFLY-3090 Protect the communication channel from getting closed due to administrative
// cancellation of the management op by using a separa... | class class_name[name] begin[{]
method[sendResponse, return_type[void], modifier[static], parameter[context, responseType, response]] begin[{]
local_variable[type[CountDownLatch], latch]
local_variable[type[IOExceptionHolder], exceptionHolder]
local_variable[type[boolean], accepted]
... | Keyword[static] Keyword[void] identifier[sendResponse] operator[SEP] Keyword[final] identifier[ManagementRequestContext] operator[<] identifier[ExecuteRequestContext] operator[>] identifier[context] , Keyword[final] Keyword[byte] identifier[responseType] , Keyword[final] identifier[ModelNode] identifier[response] ope... |
protected void updatePreviewContent(CmsPreviewInfo previewInfo) {
setCaption(generateCaption(previewInfo));
initContent(previewInfo);
initLocales(previewInfo);
center();
} | class class_name[name] begin[{]
method[updatePreviewContent, return_type[void], modifier[protected], parameter[previewInfo]] begin[{]
call[.setCaption, parameter[call[.generateCaption, parameter[member[.previewInfo]]]]]
call[.initContent, parameter[member[.previewInfo]]]
... | Keyword[protected] Keyword[void] identifier[updatePreviewContent] operator[SEP] identifier[CmsPreviewInfo] identifier[previewInfo] operator[SEP] {
identifier[setCaption] operator[SEP] identifier[generateCaption] operator[SEP] identifier[previewInfo] operator[SEP] operator[SEP] operator[SEP] identifier[initConten... |
public ArrayList<Long> ip_game_ipOnGame_rule_GET(String ip, String ipOnGame) throws IOException {
String qPath = "/ip/{ip}/game/{ipOnGame}/rule";
StringBuilder sb = path(qPath, ip, ipOnGame);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, t1);
} | class class_name[name] begin[{]
method[ip_game_ipOnGame_rule_GET, return_type[type[ArrayList]], modifier[public], parameter[ip, ipOnGame]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], resp]
return[call[.convert... | Keyword[public] identifier[ArrayList] operator[<] identifier[Long] operator[>] identifier[ip_game_ipOnGame_rule_GET] operator[SEP] identifier[String] identifier[ip] , identifier[String] identifier[ipOnGame] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] ... |
public ListObjectParentPathsResult withPathToObjectIdentifiersList(PathToObjectIdentifiers... pathToObjectIdentifiersList) {
if (this.pathToObjectIdentifiersList == null) {
setPathToObjectIdentifiersList(new java.util.ArrayList<PathToObjectIdentifiers>(pathToObjectIdentifiersList.length));
}... | class class_name[name] begin[{]
method[withPathToObjectIdentifiersList, return_type[type[ListObjectParentPathsResult]], modifier[public], parameter[pathToObjectIdentifiersList]] begin[{]
if[binary_operation[THIS[member[None.pathToObjectIdentifiersList]], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[ListObjectParentPathsResult] identifier[withPathToObjectIdentifiersList] operator[SEP] identifier[PathToObjectIdentifiers] operator[...] identifier[pathToObjectIdentifiersList] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[pathToObjectIdentifiersList]... |
public Integer delete(CMAUiExtension extension) {
assertNotNull(extension, "extension");
final Integer version = getVersionOrThrow(extension, "update");
final String spaceId = getSpaceIdOrThrow(extension, "extension");
assertNotNull(extension.getEnvironmentId(), "environmentId");
final String enviro... | class class_name[name] begin[{]
method[delete, return_type[type[Integer]], modifier[public], parameter[extension]] begin[{]
call[.assertNotNull, parameter[member[.extension], literal["extension"]]]
local_variable[type[Integer], version]
local_variable[type[String], spaceId]
... | Keyword[public] identifier[Integer] identifier[delete] operator[SEP] identifier[CMAUiExtension] identifier[extension] operator[SEP] {
identifier[assertNotNull] operator[SEP] identifier[extension] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[Integer] identifier[version] operator[=] ide... |
public List<DynamoDBMapper.FailedBatch> batchSave(Iterable<T> objectsToSave) {
return mapper.batchWrite(objectsToSave, (Iterable<T>)Collections.<T>emptyList());
} | class class_name[name] begin[{]
method[batchSave, return_type[type[List]], modifier[public], parameter[objectsToSave]] begin[{]
return[call[mapper.batchWrite, parameter[member[.objectsToSave], Cast(expression=MethodInvocation(arguments=[], member=Collections, postfix_operators=[], prefix_operators=[], ... | Keyword[public] identifier[List] operator[<] identifier[DynamoDBMapper] operator[SEP] identifier[FailedBatch] operator[>] identifier[batchSave] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[objectsToSave] operator[SEP] {
Keyword[return] identifier[mapper] operator[SEP] ident... |
@Override
public boolean hasNext() {
resetToLastKey();
// Fail if there is no node anymore.
if (mNextKey == NULL_NODE) {
resetToStartKey();
return false;
}
// First move to next key.
moveTo(mNextKey);
// Follow right sibling if there... | class class_name[name] begin[{]
method[hasNext, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
call[.resetToLastKey, parameter[]]
if[binary_operation[member[.mNextKey], ==, member[.NULL_NODE]]] begin[{]
call[.resetToStartKey, paramete... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasNext] operator[SEP] operator[SEP] {
identifier[resetToLastKey] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mNextKey] operator[==] identifier[NULL_NODE] operator[SEP] {
identifier[resetT... |
public static String asString(Object o) {
if (o == null) {
return NULL;
} else if (o instanceof Stringable) {
return ((Stringable) o).asString();
} else if (o instanceof Numeric) {
return String.format("%d", ((Numeric) o).asInteger());
} else if (o ins... | class class_name[name] begin[{]
method[asString, return_type[type[String]], modifier[public static], parameter[o]] begin[{]
if[binary_operation[member[.o], ==, literal[null]]] begin[{]
return[member[.NULL]]
else begin[{]
if[binary_operation[member[.o], instanceof... | Keyword[public] Keyword[static] identifier[String] identifier[asString] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
Keyword[if] operator[SEP] identifier[o] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[NULL] operator[SEP]
}
Keyword[else] Keyword[i... |
public static BigInteger modPowInsecure(BigInteger base, BigInteger exponent,
BigInteger modulus) {
if (modulus.signum() <= 0) {
throw new ArithmeticException("modulus must be positive");
}
return INSTANCE.get().modPowInsecureImpl(base, exponent, modulus);
} | class class_name[name] begin[{]
method[modPowInsecure, return_type[type[BigInteger]], modifier[public static], parameter[base, exponent, modulus]] begin[{]
if[binary_operation[call[modulus.signum, parameter[]], <=, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(argumen... | Keyword[public] Keyword[static] identifier[BigInteger] identifier[modPowInsecure] operator[SEP] identifier[BigInteger] identifier[base] , identifier[BigInteger] identifier[exponent] , identifier[BigInteger] identifier[modulus] operator[SEP] {
Keyword[if] operator[SEP] identifier[modulus] operator[SEP] identifi... |
private void initUpdateClause() {
for (UpdateClause updateClause : updateClauseQueue) {
onTypedParameter(updateClause.getValue(), updateClause, updateClause.getProperty().trim());
}
} | class class_name[name] begin[{]
method[initUpdateClause, return_type[void], modifier[private], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], ... | Keyword[private] Keyword[void] identifier[initUpdateClause] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[UpdateClause] identifier[updateClause] operator[:] identifier[updateClauseQueue] operator[SEP] {
identifier[onTypedParameter] operator[SEP] identifier[updateClause] operator... |
public static LazyReact parallelBuilder(final int parallelism) {
return LazyReact.builder()
.executor(Executors.newFixedThreadPool(parallelism))
.build();
} | class class_name[name] begin[{]
method[parallelBuilder, return_type[type[LazyReact]], modifier[public static], parameter[parallelism]] begin[{]
return[call[LazyReact.builder, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[LazyReact] identifier[parallelBuilder] operator[SEP] Keyword[final] Keyword[int] identifier[parallelism] operator[SEP] {
Keyword[return] identifier[LazyReact] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[executor] operator[SEP] ... |
public com.squareup.okhttp.Call getVerifyAsync(String userAgent, String xUserAgent, String datasource,
String token, String authorization, final ApiCallback<EsiVerifyResponse> callback) throws ApiException {
com.squareup.okhttp.Call call = getVerifyValidateBeforeCall(userAgent, xUserAgent, datasour... | class class_name[name] begin[{]
method[getVerifyAsync, return_type[type[com]], modifier[public], parameter[userAgent, xUserAgent, datasource, token, authorization, callback]] begin[{]
local_variable[type[com], call]
local_variable[type[Type], localVarReturnType]
call[apiClient.e... | Keyword[public] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[getVerifyAsync] operator[SEP] identifier[String] identifier[userAgent] , identifier[String] identifier[xUserAgent] , identifier[String] identifier[datasource] , identifier[Str... |
public void calc()
{
double x = Math.cos(relativeAngle)*relativeSpeed - Math.cos(driftAngle)*boatSpeed;
double y = Math.sin(relativeAngle)*relativeSpeed - Math.sin(driftAngle)*boatSpeed;
trueSpeed = Math.hypot(x, y);
trueAngle = Math.toDegrees(Math.atan2(y, x));
if (tru... | class class_name[name] begin[{]
method[calc, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[double], x]
local_variable[type[double], y]
assign[member[.trueSpeed], call[Math.hypot, parameter[member[.x], member[.y]]]]
assign[member[.... | Keyword[public] Keyword[void] identifier[calc] operator[SEP] operator[SEP] {
Keyword[double] identifier[x] operator[=] identifier[Math] operator[SEP] identifier[cos] operator[SEP] identifier[relativeAngle] operator[SEP] operator[*] identifier[relativeSpeed] operator[-] identifier[Math] operator[SEP] identifier[c... |
public long skip (long count) throws KryoException {
long remaining = count;
while (remaining > 0) {
int skip = (int)Math.min(Util.maxArraySize, remaining);
skip(skip);
remaining -= skip;
}
return count;
} | class class_name[name] begin[{]
method[skip, return_type[type[long]], modifier[public], parameter[count]] begin[{]
local_variable[type[long], remaining]
while[binary_operation[member[.remaining], >, literal[0]]] begin[{]
local_variable[type[int], skip]
... | Keyword[public] Keyword[long] identifier[skip] operator[SEP] Keyword[long] identifier[count] operator[SEP] Keyword[throws] identifier[KryoException] {
Keyword[long] identifier[remaining] operator[=] identifier[count] operator[SEP] Keyword[while] operator[SEP] identifier[remaining] operator[>] Other[0] operator[S... |
private Map<String, I_CmsAppCategory> loadCategories() {
Map<String, I_CmsAppCategory> appCategories = new HashMap<String, I_CmsAppCategory>();
CmsAppCategory main = new CmsAppCategory(MAIN_CATEGORY_ID, null, 0, 0);
appCategories.put(main.getId(), main);
CmsAppCategory admin = new CmsAp... | class class_name[name] begin[{]
method[loadCategories, return_type[type[Map]], modifier[private], parameter[]] begin[{]
local_variable[type[Map], appCategories]
local_variable[type[CmsAppCategory], main]
call[appCategories.put, parameter[call[main.getId, parameter[]], member[.ma... | Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[I_CmsAppCategory] operator[>] identifier[loadCategories] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[I_CmsAppCategory] operator[>] identifier[appCategories] operator[=] Keyword[new] identi... |
private static void applyOverrides() {
// Get the appropriate InputStream to read overrides from, if any.
InputStream stream = getContentTypesPropertiesStream();
if (stream == null) {
return;
}
try {
try {
// Read the properties file...
... | class class_name[name] begin[{]
method[applyOverrides, return_type[void], modifier[private static], parameter[]] begin[{]
local_variable[type[InputStream], stream]
if[binary_operation[member[.stream], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
... | Keyword[private] Keyword[static] Keyword[void] identifier[applyOverrides] operator[SEP] operator[SEP] {
identifier[InputStream] identifier[stream] operator[=] identifier[getContentTypesPropertiesStream] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[stream] operator[==] Other[null... |
private JSONObject getCachedGUIDs() {
JSONObject cache = null;
String json = getStringFromPrefs(Constants.CACHED_GUIDS_KEY, null);
if (json != null) {
try {
cache = new JSONObject(json);
} catch (Throwable t) {
// no-op
getC... | class class_name[name] begin[{]
method[getCachedGUIDs, return_type[type[JSONObject]], modifier[private], parameter[]] begin[{]
local_variable[type[JSONObject], cache]
local_variable[type[String], json]
if[binary_operation[member[.json], !=, literal[null]]] begin[{]
T... | Keyword[private] identifier[JSONObject] identifier[getCachedGUIDs] operator[SEP] operator[SEP] {
identifier[JSONObject] identifier[cache] operator[=] Other[null] operator[SEP] identifier[String] identifier[json] operator[=] identifier[getStringFromPrefs] operator[SEP] identifier[Constants] operator[SEP] identifi... |
public void setAveragingPeriod(final int PERIOD) {
if (null == averagingPeriod) {
_averagingPeriod = Helper.clamp(0, MAX_PERIOD, PERIOD);
getMovingAverage().setPeriod(_averagingPeriod); // MAX 1000 values
if (null == showing) return;
fireTileEvent(AVERAGING_EVENT)... | class class_name[name] begin[{]
method[setAveragingPeriod, return_type[void], modifier[public], parameter[PERIOD]] begin[{]
if[binary_operation[literal[null], ==, member[.averagingPeriod]]] begin[{]
assign[member[._averagingPeriod], call[Helper.clamp, parameter[literal[0... | Keyword[public] Keyword[void] identifier[setAveragingPeriod] operator[SEP] Keyword[final] Keyword[int] identifier[PERIOD] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[averagingPeriod] operator[SEP] {
identifier[_averagingPeriod] operator[=] identifier[Helper] operator[... |
public <T> T withTransaction(@NotNull Propagation propagation,
@NotNull Isolation isolation,
@NotNull TransactionCallback<T> callback) {
TransactionSettings settings = new TransactionSettings();
settings.setPropagation(propagation);
... | class class_name[name] begin[{]
method[withTransaction, return_type[type[T]], modifier[public], parameter[propagation, isolation, callback]] begin[{]
local_variable[type[TransactionSettings], settings]
call[settings.setPropagation, parameter[member[.propagation]]]
call[s... | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[withTransaction] operator[SEP] annotation[@] identifier[NotNull] identifier[Propagation] identifier[propagation] , annotation[@] identifier[NotNull] identifier[Isolation] identifier[isolation] , annotation[@] identifier[NotNull] identifier... |
private void shutdown(final Map<String, Object> respMap) {
try {
logger.warn("Shutting down executor...");
// Set the executor to inactive. Will receive no new flows.
setActiveInternal(false);
this.application.shutdown();
respMap.put(ConnectorParams.STATUS_PARAM, ConnectorParams.RESPO... | class class_name[name] begin[{]
method[shutdown, return_type[void], modifier[private], parameter[respMap]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Shutting down execut... | Keyword[private] Keyword[void] identifier[shutdown] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[respMap] operator[SEP] {
Keyword[try] {
identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[... |
public SeleniumActionBuilder navigate(String page) {
NavigateAction action = new NavigateAction();
action.setPage(page);
action(action);
return this;
} | class class_name[name] begin[{]
method[navigate, return_type[type[SeleniumActionBuilder]], modifier[public], parameter[page]] begin[{]
local_variable[type[NavigateAction], action]
call[action.setPage, parameter[member[.page]]]
call[.action, parameter[member[.action]]]
... | Keyword[public] identifier[SeleniumActionBuilder] identifier[navigate] operator[SEP] identifier[String] identifier[page] operator[SEP] {
identifier[NavigateAction] identifier[action] operator[=] Keyword[new] identifier[NavigateAction] operator[SEP] operator[SEP] operator[SEP] identifier[action] operator[SEP] ide... |
@Override
public Quaternionf wrapQuaternion(ByteBuffer buffer, int offset) {
float w = buffer.getFloat(offset);
float x = buffer.getFloat(offset + 4);
float y = buffer.getFloat(offset + 8);
float z = buffer.getFloat(offset + 12);
return new Quaternionf(x, y, z, w);
} | class class_name[name] begin[{]
method[wrapQuaternion, return_type[type[Quaternionf]], modifier[public], parameter[buffer, offset]] begin[{]
local_variable[type[float], w]
local_variable[type[float], x]
local_variable[type[float], y]
local_variable[type[float], z]
return... | annotation[@] identifier[Override] Keyword[public] identifier[Quaternionf] identifier[wrapQuaternion] operator[SEP] identifier[ByteBuffer] identifier[buffer] , Keyword[int] identifier[offset] operator[SEP] {
Keyword[float] identifier[w] operator[=] identifier[buffer] operator[SEP] identifier[getFloat] operator[... |
static void setJobManagerAddressInConfig(Configuration config, InetSocketAddress address) {
config.setString(JobManagerOptions.ADDRESS, address.getHostString());
config.setInteger(JobManagerOptions.PORT, address.getPort());
config.setString(RestOptions.ADDRESS, address.getHostString());
config.setInteger(RestOp... | class class_name[name] begin[{]
method[setJobManagerAddressInConfig, return_type[void], modifier[static], parameter[config, address]] begin[{]
call[config.setString, parameter[member[JobManagerOptions.ADDRESS], call[address.getHostString, parameter[]]]]
call[config.setInteger, p... | Keyword[static] Keyword[void] identifier[setJobManagerAddressInConfig] operator[SEP] identifier[Configuration] identifier[config] , identifier[InetSocketAddress] identifier[address] operator[SEP] {
identifier[config] operator[SEP] identifier[setString] operator[SEP] identifier[JobManagerOptions] operator[SEP] i... |
public static QName valueOf(String s) {
if ((s == null) || s.equals("")) {
throw new IllegalArgumentException("invalid QName literal");
}
if (s.charAt(0) == '{') {
int i = s.indexOf('}');
if (i == -1) {
throw new IllegalArgumentException("in... | class class_name[name] begin[{]
method[valueOf, return_type[type[QName]], modifier[public static], parameter[s]] begin[{]
if[binary_operation[binary_operation[member[.s], ==, literal[null]], ||, call[s.equals, parameter[literal[""]]]]] begin[{]
ThrowStatement(expression=ClassCreator... | Keyword[public] Keyword[static] identifier[QName] identifier[valueOf] operator[SEP] identifier[String] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[s] operator[==] Other[null] operator[SEP] operator[||] identifier[s] operator[SEP] identifier[equals] operator[SEP] literal[Strin... |
private void fireFrameType(final CEMI frame, final int type)
{
final FrameEvent e = new FrameEvent(this, frame);
final Consumer<? super TransportListener> c;
if (type == 0)
c = l -> l.broadcast(e);
else if (type == 1)
c = l -> l.group(e);
else if (type == 2)
c = l -> l.dataIndividual(e);
else if (... | class class_name[name] begin[{]
method[fireFrameType, return_type[void], modifier[private], parameter[frame, type]] begin[{]
local_variable[type[FrameEvent], e]
local_variable[type[Consumer], c]
if[binary_operation[member[.type], ==, literal[0]]] begin[{]
assign[memb... | Keyword[private] Keyword[void] identifier[fireFrameType] operator[SEP] Keyword[final] identifier[CEMI] identifier[frame] , Keyword[final] Keyword[int] identifier[type] operator[SEP] {
Keyword[final] identifier[FrameEvent] identifier[e] operator[=] Keyword[new] identifier[FrameEvent] operator[SEP] Keyword[this] ... |
public static <T extends ImageGray<T>>
Planar<T> bitmapToPlanar(Bitmap input , Planar<T> output , Class<T> type , byte[] storage ) {
if( output == null ) {
output = new Planar<>(type, input.getWidth(), input.getHeight(), 3);
} else {
int numBands = Math.min(4,Math.max(3,output.getNumBands()));
output.resh... | class class_name[name] begin[{]
method[bitmapToPlanar, return_type[type[Planar]], modifier[public static], parameter[input, output, type, storage]] begin[{]
if[binary_operation[member[.output], ==, literal[null]]] begin[{]
assign[member[.output], ClassCreator(arguments=[... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[ImageGray] operator[<] identifier[T] operator[>] operator[>] identifier[Planar] operator[<] identifier[T] operator[>] identifier[bitmapToPlanar] operator[SEP] identifier[Bitmap] identifier[input] , identifier[Planar] operator[<] iden... |
@Override
protected void logCumulativeSessionStats(Map<String, RunStats> runstats,
RunStats cumulativeTotals) {
log.info("session stats (global cumulative): domains={} tasksAdded={}",
runstats.keySet().size(), ((StorageStatsRunStats) cumulativeTo... | class class_name[name] begin[{]
method[logCumulativeSessionStats, return_type[void], modifier[protected], parameter[runstats, cumulativeTotals]] begin[{]
call[log.info, parameter[literal["session stats (global cumulative): domains={} tasksAdded={}"], call[runstats.keySet, parameter[]], Cast(exp... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[logCumulativeSessionStats] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[RunStats] operator[>] identifier[runstats] , identifier[RunStats] identifier[cumulativeTotals] operator[SEP] {
identifier[log] oper... |
private void forLoop(Env env, Scope scope, Writer writer) {
Ctrl ctrl = scope.getCtrl();
Object outer = scope.get("for");
ForLoopStatus forLoopStatus = new ForLoopStatus(outer);
scope.setLocal("for", forLoopStatus);
Expr init = forCtrl.getInit();
Expr cond = forCtrl.getCond();
Expr update = for... | class class_name[name] begin[{]
method[forLoop, return_type[void], modifier[private], parameter[env, scope, writer]] begin[{]
local_variable[type[Ctrl], ctrl]
local_variable[type[Object], outer]
local_variable[type[ForLoopStatus], forLoopStatus]
call[scope.setLocal, para... | Keyword[private] Keyword[void] identifier[forLoop] operator[SEP] identifier[Env] identifier[env] , identifier[Scope] identifier[scope] , identifier[Writer] identifier[writer] operator[SEP] {
identifier[Ctrl] identifier[ctrl] operator[=] identifier[scope] operator[SEP] identifier[getCtrl] operator[SEP] operator... |
public void printDisplayControl(PrintWriter out)
{
Convert converter = this.getScreenField().getConverter();
if (m_vDisplays == null)
{
String strField = null;
if (converter != null) if (converter.getField() != null)
strField = converter.getField().get... | class class_name[name] begin[{]
method[printDisplayControl, return_type[void], modifier[public], parameter[out]] begin[{]
local_variable[type[Convert], converter]
if[binary_operation[member[.m_vDisplays], ==, literal[null]]] begin[{]
local_variable[type[String], strField]
... | Keyword[public] Keyword[void] identifier[printDisplayControl] operator[SEP] identifier[PrintWriter] identifier[out] operator[SEP] {
identifier[Convert] identifier[converter] operator[=] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] identifier[getConverter] opera... |
public void put(Class cls, String property, TypeConverter.MultiTypeData value)
{
/*log.fine("public void put(String property, TypeConverter.MultiTypeData value): called");*/
/*log.fine("property = " + property);*/
/*log.fine("value = " + value);*/
// Store the multi typed data unde... | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[cls, property, value]] begin[{]
call[values.put, parameter[member[.property], member[.value]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[Class] identifier[cls] , identifier[String] identifier[property] , identifier[TypeConverter] operator[SEP] identifier[MultiTypeData] identifier[value] operator[SEP] {
identifier[values] operator[SEP] identifier[put] operator[SEP] identifier... |
public void deleteUser (final User user)
throws PersistenceException
{
if (user.isDeleted()) {
return;
}
executeUpdate(new Operation<Object>() {
public Object invoke (Connection conn, DatabaseLiaison liaison)
throws PersistenceException, SQLEx... | class class_name[name] begin[{]
method[deleteUser, return_type[void], modifier[public], parameter[user]] begin[{]
if[call[user.isDeleted, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
call[.executeUpdate, parameter[ClassCreator(argumen... | Keyword[public] Keyword[void] identifier[deleteUser] operator[SEP] Keyword[final] identifier[User] identifier[user] operator[SEP] Keyword[throws] identifier[PersistenceException] {
Keyword[if] operator[SEP] identifier[user] operator[SEP] identifier[isDeleted] operator[SEP] operator[SEP] operator[SEP] {
... |
public static <E> List<E> subtractList(List<E> minuend, Collection<?> subtrahendList) {
return subtractList(minuend, null, subtrahendList, null);
} | class class_name[name] begin[{]
method[subtractList, return_type[type[List]], modifier[public static], parameter[minuend, subtrahendList]] begin[{]
return[call[.subtractList, parameter[member[.minuend], literal[null], member[.subtrahendList], literal[null]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[List] operator[<] identifier[E] operator[>] identifier[subtractList] operator[SEP] identifier[List] operator[<] identifier[E] operator[>] identifier[minuend] , identifier[Collection] operator[<] operator[?] operator[>] identifier[subtrahe... |
public List<TopicRelationship> getPrevTopicRelationships() {
ArrayList<TopicRelationship> relationships = new ArrayList<TopicRelationship>();
for (TopicRelationship relationship : topicRelationships) {
if (relationship.getType() == RelationshipType.PREVIOUS) {
relationships.a... | class class_name[name] begin[{]
method[getPrevTopicRelationships, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[ArrayList], relationships]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocat... | Keyword[public] identifier[List] operator[<] identifier[TopicRelationship] operator[>] identifier[getPrevTopicRelationships] operator[SEP] operator[SEP] {
identifier[ArrayList] operator[<] identifier[TopicRelationship] operator[>] identifier[relationships] operator[=] Keyword[new] identifier[ArrayList] operator[... |
public String generate(HTMLLinkPolicy links, List<StructureDefinition> structures) {
ST shex_def = tmplt(SHEX_TEMPLATE);
String start_cmd;
if(completeModel || structures.get(0).getKind().equals(StructureDefinition.StructureDefinitionKind.RESOURCE))
// || structures.get(0).getKind().equals(S... | class class_name[name] begin[{]
method[generate, return_type[type[String]], modifier[public], parameter[links, structures]] begin[{]
local_variable[type[ST], shex_def]
local_variable[type[String], start_cmd]
if[binary_operation[member[.completeModel], ||, call[structures.get, pa... | Keyword[public] identifier[String] identifier[generate] operator[SEP] identifier[HTMLLinkPolicy] identifier[links] , identifier[List] operator[<] identifier[StructureDefinition] operator[>] identifier[structures] operator[SEP] {
identifier[ST] identifier[shex_def] operator[=] identifier[tmplt] operator[SEP] ide... |
public void eachRow(String sql, @ClosureParams(value=SimpleType.class, options="java.sql.ResultSetMetaData") Closure metaClosure,
@ClosureParams(value=SimpleType.class, options="groovy.sql.GroovyResultSet") Closure rowClosure) throws SQLException {
eachRow(sql, metaClosure, 0, 0, rowClos... | class class_name[name] begin[{]
method[eachRow, return_type[void], modifier[public], parameter[sql, metaClosure, rowClosure]] begin[{]
call[.eachRow, parameter[member[.sql], member[.metaClosure], literal[0], literal[0], member[.rowClosure]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[eachRow] operator[SEP] identifier[String] identifier[sql] , annotation[@] identifier[ClosureParams] operator[SEP] identifier[value] operator[=] identifier[SimpleType] operator[SEP] Keyword[class] , identifier[options] operator[=] literal[String] operator[SEP] identifier[Closur... |
@SuppressWarnings("unchecked")
public T embed(HalRelation relation, ProcessEngine processEngine) {
List<HalResource<?>> resolvedLinks = linker.resolve(relation, processEngine);
if(resolvedLinks != null && resolvedLinks.size() > 0) {
addEmbedded(relation.relName, resolvedLinks);
}
return (T) this... | class class_name[name] begin[{]
method[embed, return_type[type[T]], modifier[public], parameter[relation, processEngine]] begin[{]
local_variable[type[List], resolvedLinks]
if[binary_operation[binary_operation[member[.resolvedLinks], !=, literal[null]], &&, binary_operation[call[resolve... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[T] identifier[embed] operator[SEP] identifier[HalRelation] identifier[relation] , identifier[ProcessEngine] identifier[processEngine] operator[SEP] {
identifier[List] operator[<] identifier[HalResou... |
@SuppressWarnings("unchecked")
public static List<Character> getAt(char[] array, Range range) {
return primitiveArrayGet(array, range);
} | class class_name[name] begin[{]
method[getAt, return_type[type[List]], modifier[public static], parameter[array, range]] begin[{]
return[call[.primitiveArrayGet, parameter[member[.array], member[.range]]]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Character] operator[>] identifier[getAt] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[array] , identifier[Range] identifier[range] operato... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.