code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static String escapeForXML(String inString) {
if (inString == null)
return null;
String outString = inString;
outString = replace(outString, "&", "&");
outString = replace(outString, "<", "<");
outString = replace(outString, ">", ">");
outString = replace(outString,... | class class_name[name] begin[{]
method[escapeForXML, return_type[type[String]], modifier[public static], parameter[inString]] begin[{]
if[binary_operation[member[.inString], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[... | Keyword[public] Keyword[static] identifier[String] identifier[escapeForXML] operator[SEP] identifier[String] identifier[inString] operator[SEP] {
Keyword[if] operator[SEP] identifier[inString] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[String] identifier[outString... |
public GitlabBuildVariable updateBuildVariable(Integer projectId,
String key,
String newValue) throws IOException {
String tailUrl = GitlabProject.URL + "/" +
projectId +
GitlabB... | class class_name[name] begin[{]
method[updateBuildVariable, return_type[type[GitlabBuildVariable]], modifier[public], parameter[projectId, key, newValue]] begin[{]
local_variable[type[String], tailUrl]
local_variable[type[GitlabHTTPRequestor], requestor]
if[binary_operation[memb... | Keyword[public] identifier[GitlabBuildVariable] identifier[updateBuildVariable] operator[SEP] identifier[Integer] identifier[projectId] , identifier[String] identifier[key] , identifier[String] identifier[newValue] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[tailUrl] o... |
private InputSplitAssigner loadInputSplitAssigner(final Class<? extends InputSplit> inputSplitType) {
final String className = inputSplitType.getName();
final String assignerKey = INPUT_SPLIT_CONFIG_KEY_PREFIX + className;
LOG.info("Trying to load input split assigner for type " + className);
String assign... | class class_name[name] begin[{]
method[loadInputSplitAssigner, return_type[type[InputSplitAssigner]], modifier[private], parameter[inputSplitType]] begin[{]
local_variable[type[String], className]
local_variable[type[String], assignerKey]
call[LOG.info, parameter[binary_operatio... | Keyword[private] identifier[InputSplitAssigner] identifier[loadInputSplitAssigner] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[InputSplit] operator[>] identifier[inputSplitType] operator[SEP] {
Keyword[final] identifier[String] identifier[className] operator... |
protected String addCommonContextVars(ModelMap model, HttpServletRequest request, String overrideName, String overrideTarget)
{
LOGGER.debug(String.format("receiving request: ctxPath: %s, uri: %s", request.getContextPath(), request.getRequestURI()));
final String name = menuUtils.getMenuName(request, overrideName... | class class_name[name] begin[{]
method[addCommonContextVars, return_type[type[String]], modifier[protected], parameter[model, request, overrideName, overrideTarget]] begin[{]
call[LOGGER.debug, parameter[call[String.format, parameter[literal["receiving request: ctxPath: %s, uri: %s"], call[requ... | Keyword[protected] identifier[String] identifier[addCommonContextVars] operator[SEP] identifier[ModelMap] identifier[model] , identifier[HttpServletRequest] identifier[request] , identifier[String] identifier[overrideName] , identifier[String] identifier[overrideTarget] operator[SEP] {
identifier[LOGGER] oper... |
public AT_Row setPaddingBottom(int paddingBottom) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setPaddingBottom(paddingBottom);
}
}
return this;
} | class class_name[name] begin[{]
method[setPaddingBottom, return_type[type[AT_Row]], modifier[public], parameter[paddingBottom]] begin[{]
if[THIS[call[None.hasCells, parameter[]]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Method... | Keyword[public] identifier[AT_Row] identifier[setPaddingBottom] operator[SEP] Keyword[int] identifier[paddingBottom] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[hasCells] operator[SEP] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[AT_Cell] ide... |
public <T> BufferOutput<?> writeObject(T object, BufferOutput<?> buffer) {
if (object == null) {
return buffer.writeByte(Identifier.NULL.code());
}
Class<?> type = object.getClass();
// get the enclosing class from a cache.
Class<?> enclosingClass = enclosingClasses.computeIfAbsent(type, claz... | class class_name[name] begin[{]
method[writeObject, return_type[type[BufferOutput]], modifier[public], parameter[object, buffer]] begin[{]
if[binary_operation[member[.object], ==, literal[null]]] begin[{]
return[call[buffer.writeByte, parameter[call[Identifier.NULL.code, parameter[]... | Keyword[public] operator[<] identifier[T] operator[>] identifier[BufferOutput] operator[<] operator[?] operator[>] identifier[writeObject] operator[SEP] identifier[T] identifier[object] , identifier[BufferOutput] operator[<] operator[?] operator[>] identifier[buffer] operator[SEP] {
Keyword[if] operator[SEP] id... |
public static int getGCD(int... arg) throws Exception {
if (arg == null || arg.length == 0) {
throw new Exception("parameters must more than one.");
}
if (arg.length == 1) {
return Math.abs(arg[0]);
}
int tmp = gcd(arg[0], arg[1]);
for (int i = 2... | class class_name[name] begin[{]
method[getGCD, return_type[type[int]], modifier[public static], parameter[arg]] begin[{]
if[binary_operation[binary_operation[member[.arg], ==, literal[null]], ||, binary_operation[member[arg.length], ==, literal[0]]]] begin[{]
ThrowStatement(expressi... | Keyword[public] Keyword[static] Keyword[int] identifier[getGCD] operator[SEP] Keyword[int] operator[...] identifier[arg] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[arg] operator[==] Other[null] operator[||] identifier[arg] operator[SEP] identifier[length] operator[... |
protected final void assertContains(@NotNull Object... objects) {
isNotNull();
checkNotNull(objects);
Collection<Object> notFound = notFoundInActual(objects);
if (notFound.isEmpty()) {
return;
}
throw failureIfExpectedElementsNotFound(notFound);
} | class class_name[name] begin[{]
method[assertContains, return_type[void], modifier[final protected], parameter[objects]] begin[{]
call[.isNotNull, parameter[]]
call[.checkNotNull, parameter[member[.objects]]]
local_variable[type[Collection], notFound]
if[... | Keyword[protected] Keyword[final] Keyword[void] identifier[assertContains] operator[SEP] annotation[@] identifier[NotNull] identifier[Object] operator[...] identifier[objects] operator[SEP] {
identifier[isNotNull] operator[SEP] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[objects... |
boolean next() {
index_++;
while (index_ < maxEntries_) {
if (couponsArr_[offset_ + index_] != 0) { return true; }
index_++;
}
return false;
} | class class_name[name] begin[{]
method[next, return_type[type[boolean]], modifier[default], parameter[]] begin[{]
member[.index_]
while[binary_operation[member[.index_], <, member[.maxEntries_]]] begin[{]
if[binary_operation[member[.couponsArr_], !=, lite... | Keyword[boolean] identifier[next] operator[SEP] operator[SEP] {
identifier[index_] operator[++] operator[SEP] Keyword[while] operator[SEP] identifier[index_] operator[<] identifier[maxEntries_] operator[SEP] {
Keyword[if] operator[SEP] identifier[couponsArr_] operator[SEP] identifier[offset_] operator... |
public void write(byte b[], int off, int len)
throws IOException
{
len=prepareOutput(len);
if (!_nulled)
_out.write(b,off,len);
if (_bytes==_contentLength)
flush();
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[b, off, len]] begin[{]
assign[member[.len], call[.prepareOutput, parameter[member[.len]]]]
if[member[._nulled]] begin[{]
call[_out.write, parameter[member[.b], member[.off], ... | Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[byte] identifier[b] operator[SEP] operator[SEP] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[len] operator[=] identifier[prepareOutput] operator[SEP] identif... |
private Set<ConnectionKey> getStaleConnectionKeys() {
Map<ConnectionKey, StatefulRedisConnection<K, V>> map = new ConcurrentHashMap<>();
connectionProvider.forEach(map::put);
Set<ConnectionKey> stale = new HashSet<>();
for (ConnectionKey connectionKey : map.keySet()) {
if... | class class_name[name] begin[{]
method[getStaleConnectionKeys, return_type[type[Set]], modifier[private], parameter[]] begin[{]
local_variable[type[Map], map]
call[connectionProvider.forEach, parameter[MethodReference(expression=MemberReference(member=map, postfix_operators=[], prefix_o... | Keyword[private] identifier[Set] operator[<] identifier[ConnectionKey] operator[>] identifier[getStaleConnectionKeys] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[ConnectionKey] , identifier[StatefulRedisConnection] operator[<] identifier[K] , identifier[V] operator[>] operator[>] ident... |
@Override
public Object fromByteBuffer(ByteBuffer bytes) {
if (bytes == null || !bytes.hasRemaining()) {
return null;
}
ByteBuffer dup = bytes.duplicate();
ByteArrayInputStream bais = new ByteArrayInputStream(dup.array());
try {
XMLStreamReader reader ... | class class_name[name] begin[{]
method[fromByteBuffer, return_type[type[Object]], modifier[public], parameter[bytes]] begin[{]
if[binary_operation[binary_operation[member[.bytes], ==, literal[null]], ||, call[bytes.hasRemaining, parameter[]]]] begin[{]
return[literal[null]]
... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[fromByteBuffer] operator[SEP] identifier[ByteBuffer] identifier[bytes] operator[SEP] {
Keyword[if] operator[SEP] identifier[bytes] operator[==] Other[null] operator[||] operator[!] identifier[bytes] operator[SEP] identifier[hasRemai... |
public MachineTime<SI> getRealDuration() {
Moment tsp = this.getTemporalOfOpenEnd();
boolean max = (tsp == null);
if (max) { // max reached
tsp = this.getEnd().getTemporal();
}
MachineTime<SI> result =
MachineTime.ON_UTC_SCALE.between(
t... | class class_name[name] begin[{]
method[getRealDuration, return_type[type[MachineTime]], modifier[public], parameter[]] begin[{]
local_variable[type[Moment], tsp]
local_variable[type[boolean], max]
if[member[.max]] begin[{]
assign[member[.tsp], THIS[call[N... | Keyword[public] identifier[MachineTime] operator[<] identifier[SI] operator[>] identifier[getRealDuration] operator[SEP] operator[SEP] {
identifier[Moment] identifier[tsp] operator[=] Keyword[this] operator[SEP] identifier[getTemporalOfOpenEnd] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifie... |
protected void enableApiKeyInternal(final ObjectId id) {
final StitchAuthRequest.Builder reqBuilder = new StitchAuthRequest.Builder();
reqBuilder
.withMethod(Method.PUT)
.withPath(routes.getApiKeyEnableRouteForId(id.toHexString()))
.withRefreshToken();
getRequestClient().... | class class_name[name] begin[{]
method[enableApiKeyInternal, return_type[void], modifier[protected], parameter[id]] begin[{]
local_variable[type[StitchAuthRequest], reqBuilder]
call[reqBuilder.withMethod, parameter[member[Method.PUT]]]
call[.getRequestClient, parameter[]... | Keyword[protected] Keyword[void] identifier[enableApiKeyInternal] operator[SEP] Keyword[final] identifier[ObjectId] identifier[id] operator[SEP] {
Keyword[final] identifier[StitchAuthRequest] operator[SEP] identifier[Builder] identifier[reqBuilder] operator[=] Keyword[new] identifier[StitchAuthRequest] operator[... |
public void removeRemedyIndex(RemedyIndexEventData data) {
String path = StagePathUtils.getRemedyRoot(data.getPipelineId());
try {
zookeeper.delete(path + "/" + RemedyIndexEventData.formatNodeName(data));
} catch (ZkNoNodeException e) {
// ignore
} catch (ZkExcept... | class class_name[name] begin[{]
method[removeRemedyIndex, return_type[void], modifier[public], parameter[data]] begin[{]
local_variable[type[String], path]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberRefe... | Keyword[public] Keyword[void] identifier[removeRemedyIndex] operator[SEP] identifier[RemedyIndexEventData] identifier[data] operator[SEP] {
identifier[String] identifier[path] operator[=] identifier[StagePathUtils] operator[SEP] identifier[getRemedyRoot] operator[SEP] identifier[data] operator[SEP] identifier[ge... |
private int addContentHash(final PropertyKey key, final int contentHash) {
final Object value = getProperty(key);
if (value != null) {
return contentHash ^ value.hashCode();
}
return contentHash;
} | class class_name[name] begin[{]
method[addContentHash, return_type[type[int]], modifier[private], parameter[key, contentHash]] begin[{]
local_variable[type[Object], value]
if[binary_operation[member[.value], !=, literal[null]]] begin[{]
return[binary_operation[member[.conten... | Keyword[private] Keyword[int] identifier[addContentHash] operator[SEP] Keyword[final] identifier[PropertyKey] identifier[key] , Keyword[final] Keyword[int] identifier[contentHash] operator[SEP] {
Keyword[final] identifier[Object] identifier[value] operator[=] identifier[getProperty] operator[SEP] identifier[key... |
@Override
public void setPropertyValue(PropertyInfo propInfo, Object value) {
setPropertyValue(propInfo.getId(), value);
} | class class_name[name] begin[{]
method[setPropertyValue, return_type[void], modifier[public], parameter[propInfo, value]] begin[{]
call[.setPropertyValue, parameter[call[propInfo.getId, parameter[]], member[.value]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setPropertyValue] operator[SEP] identifier[PropertyInfo] identifier[propInfo] , identifier[Object] identifier[value] operator[SEP] {
identifier[setPropertyValue] operator[SEP] identifier[propInfo] operator[SEP] identifier[getId] operato... |
void genCode() throws IOException {
if (!outputDirectory.exists()) {
if (!outputDirectory.mkdirs()) {
throw new IOException("unable to create output directory "
+ outputDirectory);
}
}
FileWriter cc = new FileWriter(new File(outputD... | class class_name[name] begin[{]
method[genCode, return_type[void], modifier[default], parameter[]] begin[{]
if[call[outputDirectory.exists, parameter[]]] begin[{]
if[call[outputDirectory.mkdirs, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreato... | Keyword[void] identifier[genCode] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[outputDirectory] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[output... |
static <K, V> void populateMap(Map<K, V> map, ObjectInputStream stream, int size)
throws IOException, ClassNotFoundException {
for (int i = 0; i < size; i++) {
@SuppressWarnings("unchecked") // reading data stored by writeMap
K key = (K) stream.readObject();
@SuppressWarnings("unchecked") //... | class class_name[name] begin[{]
method[populateMap, return_type[void], modifier[static], parameter[map, stream, size]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=... | Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] Keyword[void] identifier[populateMap] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[map] , identifier[ObjectInputStream] identifier[stream] , Keyword[int] identifier[size] operator[SEP] Keyword[thr... |
public SortedMap subMap(Object startKey, Object endKey) {
if (comparator == null) {
if (((Comparable) startKey).compareTo(endKey) <= 0)
return makeSubMap(startKey, endKey);
} else {
if (comparator.compare(startKey, endKey) <= 0)
return makeSubMap(s... | class class_name[name] begin[{]
method[subMap, return_type[type[SortedMap]], modifier[public], parameter[startKey, endKey]] begin[{]
if[binary_operation[member[.comparator], ==, literal[null]]] begin[{]
if[binary_operation[Cast(expression=MemberReference(member=startKey,... | Keyword[public] identifier[SortedMap] identifier[subMap] operator[SEP] identifier[Object] identifier[startKey] , identifier[Object] identifier[endKey] operator[SEP] {
Keyword[if] operator[SEP] identifier[comparator] operator[==] Other[null] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] oper... |
@SneakyThrows
public DocumentDbMappingContext createDocumentDbMappingContext() {
val documentDbMappingContext = new DocumentDbMappingContext();
documentDbMappingContext.setInitialEntitySet(new EntityScanner(applicationContext).scan(Persistent.class));
return documentDbMappingContext;
} | class class_name[name] begin[{]
method[createDocumentDbMappingContext, return_type[type[DocumentDbMappingContext]], modifier[public], parameter[]] begin[{]
local_variable[type[val], documentDbMappingContext]
call[documentDbMappingContext.setInitialEntitySet, parameter[ClassCreator(argum... | annotation[@] identifier[SneakyThrows] Keyword[public] identifier[DocumentDbMappingContext] identifier[createDocumentDbMappingContext] operator[SEP] operator[SEP] {
identifier[val] identifier[documentDbMappingContext] operator[=] Keyword[new] identifier[DocumentDbMappingContext] operator[SEP] operator[SEP] opera... |
@Nullable
public static String getAllBytesAsString (@Nullable @WillClose final InputStream aIS,
@Nonnull @Nonempty final Charset aCharset)
{
ValueEnforcer.notNull (aCharset, "Charset");
if (aIS == null)
return null;
return getCopy (aIS).getAsString (aC... | class class_name[name] begin[{]
method[getAllBytesAsString, return_type[type[String]], modifier[public static], parameter[aIS, aCharset]] begin[{]
call[ValueEnforcer.notNull, parameter[member[.aCharset], literal["Charset"]]]
if[binary_operation[member[.aIS], ==, literal[null]]] ... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[getAllBytesAsString] operator[SEP] annotation[@] identifier[Nullable] annotation[@] identifier[WillClose] Keyword[final] identifier[InputStream] identifier[aIS] , annotation[@] identifier[Nonnull] annotation[@] identifier[... |
public final EObject ruleTypeReferenceWithTypeArgs() throws RecognitionException {
EObject current = null;
EObject this_ParameterizedTypeReferenceWithTypeArgs_0 = null;
EObject this_TypeReferenceNoTypeArgs_3 = null;
EObject this_XFunctionTypeRef_6 = null;
enterRule();
... | class class_name[name] begin[{]
method[ruleTypeReferenceWithTypeArgs, return_type[type[EObject]], modifier[final public], parameter[]] begin[{]
local_variable[type[EObject], current]
local_variable[type[EObject], this_ParameterizedTypeReferenceWithTypeArgs_0]
local_variable[type[EObject... | Keyword[public] Keyword[final] identifier[EObject] identifier[ruleTypeReferenceWithTypeArgs] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[this_ParameterizedTypeReferenceW... |
public String getDomains() {
StringWriter sw = new StringWriter();
JsonGenerator generator;
if (this.prettyFormat != Format.NONE) {
JsonGeneratorFactory gf = JSONWriter.getPrettyGeneratorFactory();
generator = gf.createGenerator(sw);
} else
generator = Json.createGenerator(sw);
generator.writeStar... | class class_name[name] begin[{]
method[getDomains, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[StringWriter], sw]
local_variable[type[JsonGenerator], generator]
if[binary_operation[THIS[member[None.prettyFormat]], !=, member[Format.NONE... | Keyword[public] identifier[String] identifier[getDomains] operator[SEP] operator[SEP] {
identifier[StringWriter] identifier[sw] operator[=] Keyword[new] identifier[StringWriter] operator[SEP] operator[SEP] operator[SEP] identifier[JsonGenerator] identifier[generator] operator[SEP] Keyword[if] operator[SEP] Keywo... |
public final Flux<T> expandDeep(Function<? super T, ? extends Publisher<? extends T>> expander) {
return expandDeep(expander, Queues.SMALL_BUFFER_SIZE);
} | class class_name[name] begin[{]
method[expandDeep, return_type[type[Flux]], modifier[final public], parameter[expander]] begin[{]
return[call[.expandDeep, parameter[member[.expander], member[Queues.SMALL_BUFFER_SIZE]]]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[Flux] operator[<] identifier[T] operator[>] identifier[expandDeep] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[Publisher] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] op... |
@Override
public void setMessageListener(MessageListener messageListener) throws JMSException
{
externalAccessLock.readLock().lock();
try
{
checkNotClosed();
this.messageListener = messageListener;
}
finally
{
externalAccessLock.readLock().unlock();
}
} | class class_name[name] begin[{]
method[setMessageListener, return_type[void], modifier[public], parameter[messageListener]] begin[{]
call[externalAccessLock.readLock, parameter[]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=checkNotClosed, po... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setMessageListener] operator[SEP] identifier[MessageListener] identifier[messageListener] operator[SEP] Keyword[throws] identifier[JMSException] {
identifier[externalAccessLock] operator[SEP] identifier[readLock] operator[SEP] operator[S... |
<R extends Request<T>> R setRequestQueue(RequestQueue requestQueue) {
checkIfActive();
java.lang.reflect.Method m = null;
if (!(this.getClass().equals(Request.class))) {
try {
m = this.getClass().getDeclaredMethod("parseNetworkResponse", NetworkResponse
... | class class_name[name] begin[{]
method[setRequestQueue, return_type[type[R]], modifier[default], parameter[requestQueue]] begin[{]
call[.checkIfActive, parameter[]]
local_variable[type[java], m]
if[THIS[]] begin[{]
TryStatement(block=[StatementExpression(expr... | operator[<] identifier[R] Keyword[extends] identifier[Request] operator[<] identifier[T] operator[>] operator[>] identifier[R] identifier[setRequestQueue] operator[SEP] identifier[RequestQueue] identifier[requestQueue] operator[SEP] {
identifier[checkIfActive] operator[SEP] operator[SEP] operator[SEP] identifier... |
protected void createActions() {
super.createActions();
IAction a = new TextOperationAction(RuleEditorMessages
.getResourceBundle(), "ContentAssistProposal.", this,
ISourceViewer.CONTENTASSIST_PROPOSALS);
a
.setActionDefinitionId(ITextEditorAction... | class class_name[name] begin[{]
method[createActions, return_type[void], modifier[protected], parameter[]] begin[{]
SuperMethodInvocation(arguments=[], member=createActions, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
local_variable[type... | Keyword[protected] Keyword[void] identifier[createActions] operator[SEP] operator[SEP] {
Keyword[super] operator[SEP] identifier[createActions] operator[SEP] operator[SEP] operator[SEP] identifier[IAction] identifier[a] operator[=] Keyword[new] identifier[TextOperationAction] operator[SEP] identifier[RuleEditorM... |
private static void addDataItem(final DataSeries dataSeries, final SimpleDateFormat simpleDateFormat,
final SimpleDateFormat parseIncomingDateFormat, final ViewRiksdagenOrgDocumentDailySummary item) {
if (item != null && item.getEmbeddedId().getPublicDate().length() > 0) {
try {
dataSeries.add(
simpl... | class class_name[name] begin[{]
method[addDataItem, return_type[void], modifier[private static], parameter[dataSeries, simpleDateFormat, parseIncomingDateFormat, item]] begin[{]
if[binary_operation[binary_operation[member[.item], !=, literal[null]], &&, binary_operation[call[item.getEmbeddedId,... | Keyword[private] Keyword[static] Keyword[void] identifier[addDataItem] operator[SEP] Keyword[final] identifier[DataSeries] identifier[dataSeries] , Keyword[final] identifier[SimpleDateFormat] identifier[simpleDateFormat] , Keyword[final] identifier[SimpleDateFormat] identifier[parseIncomingDateFormat] , Keyword[fina... |
private String determineQualifiedName(String name, CompilationUnit from) {
if (from != null) {
// Determine qualified name as being relative to "from"
String fromName = from.getName();
int index = fromName.lastIndexOf('.');
if (index >= 0) {
Strin... | class class_name[name] begin[{]
method[determineQualifiedName, return_type[type[String]], modifier[private], parameter[name, from]] begin[{]
if[binary_operation[member[.from], !=, literal[null]]] begin[{]
local_variable[type[String], fromName]
local_variable[type[int], i... | Keyword[private] identifier[String] identifier[determineQualifiedName] operator[SEP] identifier[String] identifier[name] , identifier[CompilationUnit] identifier[from] operator[SEP] {
Keyword[if] operator[SEP] identifier[from] operator[!=] Other[null] operator[SEP] {
identifier[String] identifier[fro... |
Symbol resolveQualifiedMethod(DiagnosticPosition pos, Env<AttrContext> env,
Type site, Name name, List<Type> argtypes,
List<Type> typeargtypes) {
return resolveQualifiedMethod(pos, env, site.tsym, site, name, argtypes, typeargtypes);
} | class class_name[name] begin[{]
method[resolveQualifiedMethod, return_type[type[Symbol]], modifier[default], parameter[pos, env, site, name, argtypes, typeargtypes]] begin[{]
return[call[.resolveQualifiedMethod, parameter[member[.pos], member[.env], member[site.tsym], member[.site], member[.name], memb... | identifier[Symbol] identifier[resolveQualifiedMethod] operator[SEP] identifier[DiagnosticPosition] identifier[pos] , identifier[Env] operator[<] identifier[AttrContext] operator[>] identifier[env] , identifier[Type] identifier[site] , identifier[Name] identifier[name] , identifier[List] operator[<] identifier[Type]... |
public ResolvableType[] getInterfaces() {
Class<?> resolved = resolve();
if (resolved == null || ObjectUtils.isEmpty(resolved.getGenericInterfaces())) {
return EMPTY_TYPES_ARRAY;
}
if (this.interfaces == null) {
this.interfaces = forTypes(SerializableTypeWrapper.forGenericInterfaces(resolved),
asVari... | class class_name[name] begin[{]
method[getInterfaces, return_type[type[ResolvableType]], modifier[public], parameter[]] begin[{]
local_variable[type[Class], resolved]
if[binary_operation[binary_operation[member[.resolved], ==, literal[null]], ||, call[ObjectUtils.isEmpty, parameter[call... | Keyword[public] identifier[ResolvableType] operator[SEP] operator[SEP] identifier[getInterfaces] operator[SEP] operator[SEP] {
identifier[Class] operator[<] operator[?] operator[>] identifier[resolved] operator[=] identifier[resolve] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[... |
public static String getExceptionMessageString(ELContext context, String messageId) {
return getExceptionMessageString(context, messageId, null);
} | class class_name[name] begin[{]
method[getExceptionMessageString, return_type[type[String]], modifier[public static], parameter[context, messageId]] begin[{]
return[call[.getExceptionMessageString, parameter[member[.context], member[.messageId], literal[null]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[getExceptionMessageString] operator[SEP] identifier[ELContext] identifier[context] , identifier[String] identifier[messageId] operator[SEP] {
Keyword[return] identifier[getExceptionMessageString] operator[SEP] identifier[context] , identifier[messag... |
private void beforeName() throws IOException {
int context = peekScope();
if (context == NONEMPTY_OBJECT) { // first in object
sink.writeByte(',');
} else if (context != EMPTY_OBJECT) { // not in an object!
throw new IllegalStateException("Nesting problem.");
}
newline();
replaceTop(... | class class_name[name] begin[{]
method[beforeName, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[int], context]
if[binary_operation[member[.context], ==, member[.NONEMPTY_OBJECT]]] begin[{]
call[sink.writeByte, parameter[literal[... | Keyword[private] Keyword[void] identifier[beforeName] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[context] operator[=] identifier[peekScope] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[==] identifier[NONEMPTY_O... |
@Override
public void rename(final Name oldDn, final Name newDn) {
executeReadWrite(new ContextExecutor() {
public Object executeWithContext(DirContext ctx) throws javax.naming.NamingException {
ctx.rename(oldDn, newDn);
return null;
}
});
} | class class_name[name] begin[{]
method[rename, return_type[void], modifier[public], parameter[oldDn, newDn]] begin[{]
call[.executeReadWrite, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberRefer... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[rename] operator[SEP] Keyword[final] identifier[Name] identifier[oldDn] , Keyword[final] identifier[Name] identifier[newDn] operator[SEP] {
identifier[executeReadWrite] operator[SEP] Keyword[new] identifier[ContextExecutor] operator[SEP... |
public static hostcpu get(nitro_service client, hostcpu resource) throws Exception
{
resource.validate("get");
return ((hostcpu[]) resource.get_resources(client))[0];
} | class class_name[name] begin[{]
method[get, return_type[type[hostcpu]], modifier[public static], parameter[client, resource]] begin[{]
call[resource.validate, parameter[literal["get"]]]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=client, postfix_operators=[... | Keyword[public] Keyword[static] identifier[hostcpu] identifier[get] operator[SEP] identifier[nitro_service] identifier[client] , identifier[hostcpu] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[resource] operator[SEP] identifier[validate] operator[SEP] literal[String] op... |
private void doBatchMessage(final JsonObject message) {
String batchID = message.getString("batch");
if (currentBatch != null && currentBatch.id().equals(batchID)) {
Object value = deserializer.deserialize(message);
if (value != null) {
if (log.isDebugEnabled()) {
log.debug(String.... | class class_name[name] begin[{]
method[doBatchMessage, return_type[void], modifier[private], parameter[message]] begin[{]
local_variable[type[String], batchID]
if[binary_operation[binary_operation[member[.currentBatch], !=, literal[null]], &&, call[currentBatch.id, parameter[]]]] begin[... | Keyword[private] Keyword[void] identifier[doBatchMessage] operator[SEP] Keyword[final] identifier[JsonObject] identifier[message] operator[SEP] {
identifier[String] identifier[batchID] operator[=] identifier[message] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] Ke... |
public Project createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled,
Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel, String importUrl) throws GitLabApiException {
if (isApiVersion(ApiVer... | class class_name[name] begin[{]
method[createProject, return_type[type[Project]], modifier[public], parameter[name, namespaceId, description, issuesEnabled, mergeRequestsEnabled, wikiEnabled, snippetsEnabled, visibility, visibilityLevel, importUrl]] begin[{]
if[call[.isApiVersion, parameter[mem... | Keyword[public] identifier[Project] identifier[createProject] operator[SEP] identifier[String] identifier[name] , identifier[Integer] identifier[namespaceId] , identifier[String] identifier[description] , identifier[Boolean] identifier[issuesEnabled] , identifier[Boolean] identifier[mergeRequestsEnabled] , identif... |
public WritableByteChannel asWritableByteChannel() {
// Bufferless/direct output
if (packetSize < 2) {
return new WritableByteChannel() {
@Override
public final boolean isOpen() {
return !closed.get();
}
@Override
public final void close() {
sendClose();
}
... | class class_name[name] begin[{]
method[asWritableByteChannel, return_type[type[WritableByteChannel]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.packetSize], <, literal[2]]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Anno... | Keyword[public] identifier[WritableByteChannel] identifier[asWritableByteChannel] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[packetSize] operator[<] Other[2] operator[SEP] {
Keyword[return] Keyword[new] identifier[WritableByteChannel] operator[SEP] operator[SEP] {
... |
protected static Properties loadConfig(URL url) {
InputStream is = null;
try {
URLConnection connection = url.openConnection();
if(connection instanceof HttpURLConnection) {
((HttpURLConnection)connection).setConnectTimeout(2000);
}
is = connection.getInputStream();
return ... | class class_name[name] begin[{]
method[loadConfig, return_type[type[Properties]], modifier[static protected], parameter[url]] begin[{]
local_variable[type[InputStream], is]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Me... | Keyword[protected] Keyword[static] identifier[Properties] identifier[loadConfig] operator[SEP] identifier[URL] identifier[url] operator[SEP] {
identifier[InputStream] identifier[is] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[URLConnection] identifier[connection] operator[=] identi... |
public ListConstraintsForPortfolioResult withConstraintDetails(ConstraintDetail... constraintDetails) {
if (this.constraintDetails == null) {
setConstraintDetails(new java.util.ArrayList<ConstraintDetail>(constraintDetails.length));
}
for (ConstraintDetail ele : constraintDetails) {
... | class class_name[name] begin[{]
method[withConstraintDetails, return_type[type[ListConstraintsForPortfolioResult]], modifier[public], parameter[constraintDetails]] begin[{]
if[binary_operation[THIS[member[None.constraintDetails]], ==, literal[null]]] begin[{]
call[.setCo... | Keyword[public] identifier[ListConstraintsForPortfolioResult] identifier[withConstraintDetails] operator[SEP] identifier[ConstraintDetail] operator[...] identifier[constraintDetails] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[constraintDetails] operator[==] Other[null] opera... |
public boolean isAuditorEnabledForTransaction(AuditEventMessage msg)
{
CodedValueType transactionCode = EventUtils.getIHETransactionCodeFromMessage(msg);
return isAuditorEnabledForTransaction(transactionCode);
} | class class_name[name] begin[{]
method[isAuditorEnabledForTransaction, return_type[type[boolean]], modifier[public], parameter[msg]] begin[{]
local_variable[type[CodedValueType], transactionCode]
return[call[.isAuditorEnabledForTransaction, parameter[member[.transactionCode]]]]
end[}]
END[}... | Keyword[public] Keyword[boolean] identifier[isAuditorEnabledForTransaction] operator[SEP] identifier[AuditEventMessage] identifier[msg] operator[SEP] {
identifier[CodedValueType] identifier[transactionCode] operator[=] identifier[EventUtils] operator[SEP] identifier[getIHETransactionCodeFromMessage] operator[SEP... |
public void warning(LintCategory lc, Warning warningKey) {
report(diags.warning(lc, null, null, warningKey));
} | class class_name[name] begin[{]
method[warning, return_type[void], modifier[public], parameter[lc, warningKey]] begin[{]
call[.report, parameter[call[diags.warning, parameter[member[.lc], literal[null], literal[null], member[.warningKey]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[warning] operator[SEP] identifier[LintCategory] identifier[lc] , identifier[Warning] identifier[warningKey] operator[SEP] {
identifier[report] operator[SEP] identifier[diags] operator[SEP] identifier[warning] operator[SEP] identifier[lc] , Other[null] , Other[null] , ... |
public Set<String> getChannelNames() {
Set<String> ret = Collections.EMPTY_SET;
JsonObject channels = getJsonObject(jsonConfig, "channels");
if (channels != null) {
final Set<String> channelNames = channels.keySet();
if (channelNames != null && !channelNames.isEmpty()) {... | class class_name[name] begin[{]
method[getChannelNames, return_type[type[Set]], modifier[public], parameter[]] begin[{]
local_variable[type[Set], ret]
local_variable[type[JsonObject], channels]
if[binary_operation[member[.channels], !=, literal[null]]] begin[{]
local... | Keyword[public] identifier[Set] operator[<] identifier[String] operator[>] identifier[getChannelNames] operator[SEP] operator[SEP] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[ret] operator[=] identifier[Collections] operator[SEP] identifier[EMPTY_SET] operator[SEP] identifier[JsonObje... |
public <T> void removeListener(final Listener<T> listener, final Object instance) {
final ListenerInstancePair<T> pair = new ListenerInstancePair<T>(listener, instance);
this.listeners.remove(pair);
for (final List<ListenerInstancePair<?>> entry : this.cachedListeners.values()) {
entry.remove(pair);
}
} | class class_name[name] begin[{]
method[removeListener, return_type[void], modifier[public], parameter[listener, instance]] begin[{]
local_variable[type[ListenerInstancePair], pair]
THIS[member[None.listeners]call[None.remove, parameter[member[.pair]]]]
ForStatement(body=BlockSta... | Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[removeListener] operator[SEP] Keyword[final] identifier[Listener] operator[<] identifier[T] operator[>] identifier[listener] , Keyword[final] identifier[Object] identifier[instance] operator[SEP] {
Keyword[final] identifier[ListenerI... |
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case TypesPackage.JVM_MEMBER__DECLARING_TYPE:
setDeclaringType((JvmDeclaredType)null);
return;
case TypesPackage.JVM_MEMBER__VISIBILITY:
setVisibility(VISIBILITY_EDEFAULT);
return;
case TypesPackage.JVM_MEMBER__SIMPLE_NAME... | class class_name[name] begin[{]
method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=JVM_MEMBER__DECLARING_TYPE, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, selectors=[])], state... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[TypesPackage] operator[SEP] identifier[JVM_MEMBER__DECLARING... |
public void marshall(Eac3Settings eac3Settings, ProtocolMarshaller protocolMarshaller) {
if (eac3Settings == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(eac3Settings.getAttenuationControl(), ATTEN... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[eac3Settings, protocolMarshaller]] begin[{]
if[binary_operation[member[.eac3Settings], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_opera... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Eac3Settings] identifier[eac3Settings] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[eac3Settings] operator[==] Other[null] operator[SEP] {
Keyword[throw]... |
static public URI
parseToURI(final String u)
throws URISyntaxException
{
StringBuilder buf = new StringBuilder();
int i = 0;
while(i < u.length()) {
char c = u.charAt(i);
if(c == '\\') {
if(i + 1 == u.length())
throw... | class class_name[name] begin[{]
method[parseToURI, return_type[type[URI]], modifier[public static], parameter[u]] begin[{]
local_variable[type[StringBuilder], buf]
local_variable[type[int], i]
while[binary_operation[member[.i], <, call[u.length, parameter[]]]] begin[{]
... | Keyword[static] Keyword[public] identifier[URI] identifier[parseToURI] operator[SEP] Keyword[final] identifier[String] identifier[u] operator[SEP] Keyword[throws] identifier[URISyntaxException] {
identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[S... |
static Point2d intersection(final Tuple2d p1, final Tuple2d d1, final Tuple2d p2, final Tuple2d d2) {
final Vector2d p1End = sum(p1, d1);
final Vector2d p2End = sum(p2, d2);
return intersection(p1.x, p1.y, p1End.x, p1End.y, p2.x, p2.y, p2End.x, p2End.y);
} | class class_name[name] begin[{]
method[intersection, return_type[type[Point2d]], modifier[static], parameter[p1, d1, p2, d2]] begin[{]
local_variable[type[Vector2d], p1End]
local_variable[type[Vector2d], p2End]
return[call[.intersection, parameter[member[p1.x], member[p1.y], member[p1En... | Keyword[static] identifier[Point2d] identifier[intersection] operator[SEP] Keyword[final] identifier[Tuple2d] identifier[p1] , Keyword[final] identifier[Tuple2d] identifier[d1] , Keyword[final] identifier[Tuple2d] identifier[p2] , Keyword[final] identifier[Tuple2d] identifier[d2] operator[SEP] {
Keyword[final... |
@Override
public int removeProperties(String pattern, Character escape) throws Exception {
if (pattern == null)
throw new NullPointerException("pattern");
int count = 0;
TransactionController tranController = new TransactionController();
try {
tranController.... | class class_name[name] begin[{]
method[removeProperties, return_type[type[int]], modifier[public], parameter[pattern, escape]] begin[{]
if[binary_operation[member[.pattern], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_opera... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[removeProperties] operator[SEP] identifier[String] identifier[pattern] , identifier[Character] identifier[escape] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[pattern] operator[==] Other[null... |
public Nodejs overwrite(final boolean overwrite) {
if (overwrite) {
this.coptions = EnumSet.of(StandardCopyOption.REPLACE_EXISTING);
} else {
this.coptions = Collections.emptySet();
}
return this;
} | class class_name[name] begin[{]
method[overwrite, return_type[type[Nodejs]], modifier[public], parameter[overwrite]] begin[{]
if[member[.overwrite]] begin[{]
assign[THIS[member[None.coptions]], call[EnumSet.of, parameter[member[StandardCopyOption.REPLACE_EXISTING]]]]
... | Keyword[public] identifier[Nodejs] identifier[overwrite] operator[SEP] Keyword[final] Keyword[boolean] identifier[overwrite] operator[SEP] {
Keyword[if] operator[SEP] identifier[overwrite] operator[SEP] {
Keyword[this] operator[SEP] identifier[coptions] operator[=] identifier[EnumSet] operator[SEP] id... |
@Beta
public <R, E extends Exception, E2 extends Exception> void flatMapThenForEach(final Try.Function<? super T, ? extends Collection<? extends R>, E> mapper,
final Try.Consumer<? super R, E2> action) throws E, E2 {
N.checkArgNotNull(mapper);
N.checkArgNotNull(action);
Co... | class class_name[name] begin[{]
method[flatMapThenForEach, return_type[void], modifier[public], parameter[mapper, action]] begin[{]
call[N.checkArgNotNull, parameter[member[.mapper]]]
call[N.checkArgNotNull, parameter[member[.action]]]
local_variable[type[Collection], c]... | annotation[@] identifier[Beta] Keyword[public] operator[<] identifier[R] , identifier[E] Keyword[extends] identifier[Exception] , identifier[E2] Keyword[extends] identifier[Exception] operator[>] Keyword[void] identifier[flatMapThenForEach] operator[SEP] Keyword[final] identifier[Try] operator[SEP] identifier[Functio... |
public static AtomixConfig config(ClassLoader classLoader, String... files) {
return config(classLoader, Stream.of(files).map(File::new).collect(Collectors.toList()), AtomixRegistry.registry(classLoader));
} | class class_name[name] begin[{]
method[config, return_type[type[AtomixConfig]], modifier[public static], parameter[classLoader, files]] begin[{]
return[call[.config, parameter[member[.classLoader], call[Stream.of, parameter[member[.files]]], call[AtomixRegistry.registry, parameter[member[.classLoader]]... | Keyword[public] Keyword[static] identifier[AtomixConfig] identifier[config] operator[SEP] identifier[ClassLoader] identifier[classLoader] , identifier[String] operator[...] identifier[files] operator[SEP] {
Keyword[return] identifier[config] operator[SEP] identifier[classLoader] , identifier[Stream] operator[S... |
@SuppressWarnings({ "unchecked" })
protected final <D> D nullSafeValue(JsonNode jsonNode, Class<D> type) {
Assert.notNull(type, "Type must not be null");
if (jsonNode == null) {
return null;
}
if (type == String.class) {
return (D) jsonNode.textValue();
}
if (type == Boolean.class) {
return (D) Bo... | class class_name[name] begin[{]
method[nullSafeValue, return_type[type[D]], modifier[final protected], parameter[jsonNode, type]] begin[{]
call[Assert.notNull, parameter[member[.type], literal["Type must not be null"]]]
if[binary_operation[member[.jsonNode], ==, literal[null]]] ... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String]
} operator[SEP] Keyword[protected] Keyword[final] operator[<] identifier[D] operator[>] identifier[D] identifier[nullSafeValue] operator[SEP] identifier[JsonNode] identifier[jsonNode] , identifier[Class] operator[<] identifier[D] oper... |
public AnnotationValueImpl addAnnotationValue(String name, String enumClassName, String enumName) {
AnnotationValueImpl annotationValue = new AnnotationValueImpl(enumClassName, enumName);
addAnnotationValue(name, annotationValue);
return annotationValue;
} | class class_name[name] begin[{]
method[addAnnotationValue, return_type[type[AnnotationValueImpl]], modifier[public], parameter[name, enumClassName, enumName]] begin[{]
local_variable[type[AnnotationValueImpl], annotationValue]
call[.addAnnotationValue, parameter[member[.name], member[.a... | Keyword[public] identifier[AnnotationValueImpl] identifier[addAnnotationValue] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[enumClassName] , identifier[String] identifier[enumName] operator[SEP] {
identifier[AnnotationValueImpl] identifier[annotationValue] operator[=] Keywo... |
@BetaApi
public final Operation resetInstance(String instance) {
ResetInstanceHttpRequest request =
ResetInstanceHttpRequest.newBuilder().setInstance(instance).build();
return resetInstance(request);
} | class class_name[name] begin[{]
method[resetInstance, return_type[type[Operation]], modifier[final public], parameter[instance]] begin[{]
local_variable[type[ResetInstanceHttpRequest], request]
return[call[.resetInstance, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[resetInstance] operator[SEP] identifier[String] identifier[instance] operator[SEP] {
identifier[ResetInstanceHttpRequest] identifier[request] operator[=] identifier[ResetInstanceHttpRequest] operator[SEP] identifier... |
@SafeVarargs
public static <T> T[] append(T[] buffer, T... newElements) {
if(isEmpty(buffer)) {
return newElements;
}
return insert(buffer, buffer.length, newElements);
} | class class_name[name] begin[{]
method[append, return_type[type[T]], modifier[public static], parameter[buffer, newElements]] begin[{]
if[call[.isEmpty, parameter[member[.buffer]]]] begin[{]
return[member[.newElements]]
else begin[{]
None
end[}]
return[call[.... | annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[T] operator[SEP] operator[SEP] identifier[buffer] , identifier[T] operator[...] identifier[newElements] operator[SEP] {
... |
public static void collectPayPalDeviceData(final BraintreeFragment fragment, final BraintreeResponseListener<String> listener) {
final JSONObject deviceData = new JSONObject();
try {
String clientMetadataId = getPayPalClientMetadataId(fragment.getApplicationContext());
if (!Text... | class class_name[name] begin[{]
method[collectPayPalDeviceData, return_type[void], modifier[public static], parameter[fragment, listener]] begin[{]
local_variable[type[JSONObject], deviceData]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimension... | Keyword[public] Keyword[static] Keyword[void] identifier[collectPayPalDeviceData] operator[SEP] Keyword[final] identifier[BraintreeFragment] identifier[fragment] , Keyword[final] identifier[BraintreeResponseListener] operator[<] identifier[String] operator[>] identifier[listener] operator[SEP] {
Keyword[final] ... |
private NamingEnumeration<SearchResult> checkSearchCache(String name, String filterExpr, Object[] filterArgs, SearchControls cons) throws WIMException {
final String METHODNAME = "checkSearchCache";
NamingEnumeration<SearchResult> neu = null;
if (getSearchResultsCache() != null) {
St... | class class_name[name] begin[{]
method[checkSearchCache, return_type[type[NamingEnumeration]], modifier[private], parameter[name, filterExpr, filterArgs, cons]] begin[{]
local_variable[type[String], METHODNAME]
local_variable[type[NamingEnumeration], neu]
if[binary_operation[cal... | Keyword[private] identifier[NamingEnumeration] operator[<] identifier[SearchResult] operator[>] identifier[checkSearchCache] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[filterExpr] , identifier[Object] operator[SEP] operator[SEP] identifier[filterArgs] , identifier[SearchControl... |
public void restore(String state) {
JsonObject json = JsonObject.readFrom(state);
String accessToken = json.get("accessToken").asString();
String refreshToken = json.get("refreshToken").asString();
long lastRefresh = json.get("lastRefresh").asLong();
long expires = json.get("expi... | class class_name[name] begin[{]
method[restore, return_type[void], modifier[public], parameter[state]] begin[{]
local_variable[type[JsonObject], json]
local_variable[type[String], accessToken]
local_variable[type[String], refreshToken]
local_variable[type[long], lastRefresh]
... | Keyword[public] Keyword[void] identifier[restore] operator[SEP] identifier[String] identifier[state] operator[SEP] {
identifier[JsonObject] identifier[json] operator[=] identifier[JsonObject] operator[SEP] identifier[readFrom] operator[SEP] identifier[state] operator[SEP] operator[SEP] identifier[String] identif... |
public int compareTo(Version v) {
if (this == v)
return 0;
int diff = major - v.major;
if (diff != 0)
return diff;
diff = minor - v.minor;
if (diff != 0)
return diff;
diff = micro - v.micro;
if (diff != 0)
return dif... | class class_name[name] begin[{]
method[compareTo, return_type[type[int]], modifier[public], parameter[v]] begin[{]
if[binary_operation[THIS[], ==, member[.v]]] begin[{]
return[literal[0]]
else begin[{]
None
end[}]
local_variable[type[int], diff]
if[binary... | Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Version] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[==] identifier[v] operator[SEP] Keyword[return] Other[0] operator[SEP] Keyword[int] identifier[diff] operator[=] identifier[major] operator[-] identi... |
public final String rewriteXml(
Node xmlDoc,
String aloneTags[],
boolean outputXmlHeader
) {
try {
StringWriter sOut = new StringWriter();
rewriteXml(
sOut,
xmlDoc,
aloneTags,
outputXmlHeader
... | class class_name[name] begin[{]
method[rewriteXml, return_type[type[String]], modifier[final public], parameter[xmlDoc, aloneTags, outputXmlHeader]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[]... | Keyword[public] Keyword[final] identifier[String] identifier[rewriteXml] operator[SEP] identifier[Node] identifier[xmlDoc] , identifier[String] identifier[aloneTags] operator[SEP] operator[SEP] , Keyword[boolean] identifier[outputXmlHeader] operator[SEP] {
Keyword[try] {
identifier[StringWriter] ide... |
@Override
public void invoke() throws Exception {
if (LOG.isDebugEnabled()) {
LOG.debug(formatLogString("Start task code."));
}
// whatever happens in this scope, make sure that the local strategies are cleaned up!
// note that the initialization of the local strategies is in the try-finally block as well... | class class_name[name] begin[{]
method[invoke, return_type[void], modifier[public], parameter[]] begin[{]
if[call[LOG.isDebugEnabled, parameter[]]] begin[{]
call[LOG.debug, parameter[call[.formatLogString, parameter[literal["Start task code."]]]]]
else begin[{]
N... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[invoke] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[LOG] operato... |
public static byte[] md2Hash(String data, Charset charset) throws NoSuchAlgorithmException {
return md2Hash(data.getBytes(charset));
} | class class_name[name] begin[{]
method[md2Hash, return_type[type[byte]], modifier[public static], parameter[data, charset]] begin[{]
return[call[.md2Hash, parameter[call[data.getBytes, parameter[member[.charset]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[md2Hash] operator[SEP] identifier[String] identifier[data] , identifier[Charset] identifier[charset] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] {
Keyword[return] identifier[md2Hash] operator[SEP] identif... |
void trimLabels() {
for (Iterator<Label> itr = labels.values().iterator(); itr.hasNext();) {
Label l = itr.next();
resetLabel(l);
if(l.isEmpty())
itr.remove();
}
} | class class_name[name] begin[{]
method[trimLabels, return_type[void], modifier[default], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], memb... | Keyword[void] identifier[trimLabels] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[Label] operator[>] identifier[itr] operator[=] identifier[labels] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP]... |
public static <K, V> OMVRBTreeEntry<K, V> predecessor(final OMVRBTreeEntry<K, V> t) {
if (t == null)
return null;
else if (t.getLeft() != null) {
OMVRBTreeEntry<K, V> p = t.getLeft();
while (p.getRight() != null)
p = p.getRight();
return p;
} else {
OMVRBTreeEn... | class class_name[name] begin[{]
method[predecessor, return_type[type[OMVRBTreeEntry]], modifier[public static], parameter[t]] begin[{]
if[binary_operation[member[.t], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
if[binary_operation[call[t.getLeft, paramet... | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[OMVRBTreeEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[predecessor] operator[SEP] Keyword[final] identifier[OMVRBTreeEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[t] op... |
@SafeVarargs
public final synchronized JaxRsClientFactory addFeatureToGroup(JaxRsFeatureGroup group, Class<? extends Feature>... features) {
Preconditions.checkState(!started, "Already started building clients");
classFeatureMap.putAll(group, Arrays.asList(features));
LOG.trace("Group {} reg... | class class_name[name] begin[{]
method[addFeatureToGroup, return_type[type[JaxRsClientFactory]], modifier[synchronized final public], parameter[group, features]] begin[{]
call[Preconditions.checkState, parameter[member[.started], literal["Already started building clients"]]]
cal... | annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[final] Keyword[synchronized] identifier[JaxRsClientFactory] identifier[addFeatureToGroup] operator[SEP] identifier[JaxRsFeatureGroup] identifier[group] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Feature] operator[>] operator[...... |
public static <E> Set<E> decorate(Set<E> set) {
return new SynchronizedSet<E>(set);
} | class class_name[name] begin[{]
method[decorate, return_type[type[Set]], modifier[public static], parameter[set]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfi... | Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Set] operator[<] identifier[E] operator[>] identifier[decorate] operator[SEP] identifier[Set] operator[<] identifier[E] operator[>] identifier[set] operator[SEP] {
Keyword[return] Keyword[new] identifier[SynchronizedSet] operator[<]... |
public <T> QueryResultPage<T> queryPage(Class<T> clazz, DynamoDBQueryExpression queryExpression, DynamoDBMapperConfig config) {
config = mergeConfig(config);
QueryRequest queryRequest = createQueryRequestFromExpression(clazz, queryExpression, config);
QueryResult scanResult = db.query(applyUse... | class class_name[name] begin[{]
method[queryPage, return_type[type[QueryResultPage]], modifier[public], parameter[clazz, queryExpression, config]] begin[{]
assign[member[.config], call[.mergeConfig, parameter[member[.config]]]]
local_variable[type[QueryRequest], queryRequest]
lo... | Keyword[public] operator[<] identifier[T] operator[>] identifier[QueryResultPage] operator[<] identifier[T] operator[>] identifier[queryPage] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , identifier[DynamoDBQueryExpression] identifier[queryExpression] , identifier[DynamoDBM... |
public static Account retrieve(RequestOptions options) throws StripeException {
return retrieve((Map<String, Object>) null, options);
} | class class_name[name] begin[{]
method[retrieve, return_type[type[Account]], modifier[public static], parameter[options]] begin[{]
return[call[.retrieve, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=... | Keyword[public] Keyword[static] identifier[Account] identifier[retrieve] operator[SEP] identifier[RequestOptions] identifier[options] operator[SEP] Keyword[throws] identifier[StripeException] {
Keyword[return] identifier[retrieve] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , iden... |
protected synchronized void handleCompleted() {
latch.countDown();
for (final ShutdownListener listener : listeners) {
listener.handleCompleted();
}
listeners.clear();
} | class class_name[name] begin[{]
method[handleCompleted, return_type[void], modifier[synchronized protected], parameter[]] begin[{]
call[latch.countDown, parameter[]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], me... | Keyword[protected] Keyword[synchronized] Keyword[void] identifier[handleCompleted] operator[SEP] operator[SEP] {
identifier[latch] operator[SEP] identifier[countDown] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[ShutdownListener] identifier[listener] operator[:] ... |
public static void installSecureRandomProvider() {
CoGProperties props = CoGProperties.getDefault();
String providerName = props.getSecureRandomProvider();
try {
Class providerClass = Class.forName(providerName);
Security.insertProviderAt( (Provider)providerClass.newInsta... | class class_name[name] begin[{]
method[installSecureRandomProvider, return_type[void], modifier[public static], parameter[]] begin[{]
local_variable[type[CoGProperties], props]
local_variable[type[String], providerName]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declar... | Keyword[public] Keyword[static] Keyword[void] identifier[installSecureRandomProvider] operator[SEP] operator[SEP] {
identifier[CoGProperties] identifier[props] operator[=] identifier[CoGProperties] operator[SEP] identifier[getDefault] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[provid... |
public static double getUpperBoundForBoverA(final long a, final long b, final double f) {
checkInputs(a, b, f);
if (a == 0) { return 1.0; }
if (f == 1.0) { return (double) b / a; }
return approximateUpperBoundOnP(a, b, NUM_STD_DEVS * hackyAdjuster(f));
} | class class_name[name] begin[{]
method[getUpperBoundForBoverA, return_type[type[double]], modifier[public static], parameter[a, b, f]] begin[{]
call[.checkInputs, parameter[member[.a], member[.b], member[.f]]]
if[binary_operation[member[.a], ==, literal[0]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[double] identifier[getUpperBoundForBoverA] operator[SEP] Keyword[final] Keyword[long] identifier[a] , Keyword[final] Keyword[long] identifier[b] , Keyword[final] Keyword[double] identifier[f] operator[SEP] {
identifier[checkInputs] operator[SEP] identifier[a] , identifi... |
@Override
public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {
ChargingStationId csId = new ChargingStationId(chargingStationId);
if (!commandAuthorizationService.isAuthorized(csId, identityContext.getUser... | class class_name[name] begin[{]
method[handle, return_type[void], modifier[public], parameter[chargingStationId, commandObject, identityContext]] begin[{]
local_variable[type[ChargingStationId], csId]
if[call[commandAuthorizationService.isAuthorized, parameter[member[.csId], call[identi... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handle] operator[SEP] identifier[String] identifier[chargingStationId] , identifier[JsonObject] identifier[commandObject] , identifier[IdentityContext] identifier[identityContext] operator[SEP] Keyword[throws] identifier[UserIdentityUnauthori... |
public ClassInfoList getAllInterfacesAndAnnotations() {
if (closed.get()) {
throw new IllegalArgumentException("Cannot use a ScanResult after it has been closed");
}
if (!scanSpec.enableClassInfo || !scanSpec.enableAnnotationInfo) {
throw new IllegalArgumentException(
... | class class_name[name] begin[{]
method[getAllInterfacesAndAnnotations, return_type[type[ClassInfoList]], modifier[public], parameter[]] begin[{]
if[call[closed.get, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operator... | Keyword[public] identifier[ClassInfoList] identifier[getAllInterfacesAndAnnotations] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[closed] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] ope... |
protected Class[] getInterfaces(TargetMetaDef targetMetaDef) {
Class[] interfaces = targetMetaDef.getInterfaces();
if (interfaces != null)
return interfaces;
try {
interfaces = getPOJOInterfaces(targetMetaDef);
} catch (Exception ex) {
Debug.logError("[JdonFramework] getInterfaces error:" + ex, ... | class class_name[name] begin[{]
method[getInterfaces, return_type[type[Class]], modifier[protected], parameter[targetMetaDef]] begin[{]
local_variable[type[Class], interfaces]
if[binary_operation[member[.interfaces], !=, literal[null]]] begin[{]
return[member[.interfaces]]
else ... | Keyword[protected] identifier[Class] operator[SEP] operator[SEP] identifier[getInterfaces] operator[SEP] identifier[TargetMetaDef] identifier[targetMetaDef] operator[SEP] {
identifier[Class] operator[SEP] operator[SEP] identifier[interfaces] operator[=] identifier[targetMetaDef] operator[SEP] identifier[getInter... |
public static ObjectName calculateObjectName(String cacheManagerName, String name, boolean stats) {
String cacheManagerNameSafe = mbeanSafe(cacheManagerName);
String cacheName = mbeanSafe(name);
try {
String objectNameType = stats ? "Statistics" : "Configuration";
return... | class class_name[name] begin[{]
method[calculateObjectName, return_type[type[ObjectName]], modifier[public static], parameter[cacheManagerName, name, stats]] begin[{]
local_variable[type[String], cacheManagerNameSafe]
local_variable[type[String], cacheName]
TryStatement(block=[LocalVari... | Keyword[public] Keyword[static] identifier[ObjectName] identifier[calculateObjectName] operator[SEP] identifier[String] identifier[cacheManagerName] , identifier[String] identifier[name] , Keyword[boolean] identifier[stats] operator[SEP] {
identifier[String] identifier[cacheManagerNameSafe] operator[=] identif... |
public static DataReader get() throws IOException {
if (!instance.initialized) {
long start = System.currentTimeMillis();
instance.init();
long elapsed = System.currentTimeMillis() - start;
System.out.printf("Loaded CLDR data in %d ms.\n", elapsed);
}
return instance;
} | class class_name[name] begin[{]
method[get, return_type[type[DataReader]], modifier[public static], parameter[]] begin[{]
if[member[instance.initialized]] begin[{]
local_variable[type[long], start]
call[instance.init, parameter[]]
local_variable[t... | Keyword[public] Keyword[static] identifier[DataReader] identifier[get] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[instance] operator[SEP] identifier[initialized] operator[SEP] {
Keyword[long] identifier[start] operator[=] iden... |
protected int findIntersection( SquareNode target , SquareNode node ) {
lineCenters.a = target.center;
lineCenters.b = node.center;
for (int i = 0; i < 4; i++) {
int j = (i+1)%4;
lineSide.a = target.square.get(i);
lineSide.b = target.square.get(j);
if(Intersection2D_F64.intersection(lineCenters,lin... | class class_name[name] begin[{]
method[findIntersection, return_type[type[int]], modifier[protected], parameter[target, node]] begin[{]
assign[member[lineCenters.a], member[target.center]]
assign[member[lineCenters.b], member[node.center]]
ForStatement(body=BlockStatemen... | Keyword[protected] Keyword[int] identifier[findIntersection] operator[SEP] identifier[SquareNode] identifier[target] , identifier[SquareNode] identifier[node] operator[SEP] {
identifier[lineCenters] operator[SEP] identifier[a] operator[=] identifier[target] operator[SEP] identifier[center] operator[SEP] identif... |
byte[] JOSEToDER(byte[] joseSignature) throws SignatureException {
if (joseSignature.length != ecNumberSize * 2) {
throw new SignatureException("Invalid JOSE signature format.");
}
// Retrieve R and S number's length and padding.
int rPadding = countPadding(joseSignature, 0,... | class class_name[name] begin[{]
method[JOSEToDER, return_type[type[byte]], modifier[default], parameter[joseSignature]] begin[{]
if[binary_operation[member[joseSignature.length], !=, binary_operation[member[.ecNumberSize], *, literal[2]]]] begin[{]
ThrowStatement(expression=ClassCre... | Keyword[byte] operator[SEP] operator[SEP] identifier[JOSEToDER] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[joseSignature] operator[SEP] Keyword[throws] identifier[SignatureException] {
Keyword[if] operator[SEP] identifier[joseSignature] operator[SEP] identifier[length] operator[!=] identi... |
public void open(boolean readonly) {
try {
dataFile = ScaledRAFile.newScaledRAFile(database, fileName, false,
ScaledRAFile.DATA_FILE_RAF, null, null);
fileFreePosition = INITIAL_FREE_POS;
initBuffers();
freeBlocks = new DataFileBlockManager(... | class class_name[name] begin[{]
method[open, return_type[void], modifier[public], parameter[readonly]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dataFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=... | Keyword[public] Keyword[void] identifier[open] operator[SEP] Keyword[boolean] identifier[readonly] operator[SEP] {
Keyword[try] {
identifier[dataFile] operator[=] identifier[ScaledRAFile] operator[SEP] identifier[newScaledRAFile] operator[SEP] identifier[database] , identifier[fileName] , literal[bo... |
public Response recv_async(final byte[] trans_id)
throws InvalidInputException,
MessageDecodingException,
TerminateException
{
return recv_async(this.timeout_sync, trans_id, true);
} | class class_name[name] begin[{]
method[recv_async, return_type[type[Response]], modifier[public], parameter[trans_id]] begin[{]
return[call[.recv_async, parameter[THIS[member[None.timeout_sync]], member[.trans_id], literal[true]]]]
end[}]
END[}] | Keyword[public] identifier[Response] identifier[recv_async] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[trans_id] operator[SEP] Keyword[throws] identifier[InvalidInputException] , identifier[MessageDecodingException] , identifier[TerminateException] {
Keyword[return] ident... |
public <V> Optional<V> map(final Function<T, V> function) {
checkNotNull(function, "Must provide non null function to map");
if (isPresent()) {
final V applied = function.apply(get());
return applied == null ? Optional.<V>empty() : Optional.of(function.apply(get()));
} el... | class class_name[name] begin[{]
method[map, return_type[type[Optional]], modifier[public], parameter[function]] begin[{]
call[.checkNotNull, parameter[member[.function], literal["Must provide non null function to map"]]]
if[call[.isPresent, parameter[]]] begin[{]
loc... | Keyword[public] operator[<] identifier[V] operator[>] identifier[Optional] operator[<] identifier[V] operator[>] identifier[map] operator[SEP] Keyword[final] identifier[Function] operator[<] identifier[T] , identifier[V] operator[>] identifier[function] operator[SEP] {
identifier[checkNotNull] operator[SEP] ide... |
public void scan() {
WebcamDiscoveryListener[] listeners = Webcam.getDiscoveryListeners();
List<WebcamDevice> tmpnew = driver.getDevices();
List<WebcamDevice> tmpold = null;
try {
tmpold = getDevices(getWebcams(Long.MAX_VALUE, TimeUnit.MILLISECONDS));
} catch (TimeoutException e) {
throw new WebcamEx... | class class_name[name] begin[{]
method[scan, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[WebcamDiscoveryListener], listeners]
local_variable[type[List], tmpnew]
local_variable[type[List], tmpold]
TryStatement(block=[StatementExpression(expressi... | Keyword[public] Keyword[void] identifier[scan] operator[SEP] operator[SEP] {
identifier[WebcamDiscoveryListener] operator[SEP] operator[SEP] identifier[listeners] operator[=] identifier[Webcam] operator[SEP] identifier[getDiscoveryListeners] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] ... |
public List<INDArray> feedForwardToLayer(int layerNum, INDArray input) {
try{
return ffToLayerActivationsDetached(false, FwdPassType.STANDARD, false, layerNum, input, mask, null, true);
} catch (OutOfMemoryError e) {
CrashReportingUtil.writeMemoryCrashDump(this, e);
t... | class class_name[name] begin[{]
method[feedForwardToLayer, return_type[type[List]], modifier[public], parameter[layerNum, input]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=fa... | Keyword[public] identifier[List] operator[<] identifier[INDArray] operator[>] identifier[feedForwardToLayer] operator[SEP] Keyword[int] identifier[layerNum] , identifier[INDArray] identifier[input] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[ffToLayerActivationsDetached] operator[SEP] l... |
public String stateName(
int state)
{
String name = "Unknown state = " + state;
switch(state)
{
case NodeStack.VISIT_LEFT:
name = "VISIT_LEFT";
break;
case NodeStack.PROCESS_CURRENT:
name = "PROCESS_CURRENT";
break;
case NodeStack.VISIT_RIGHT:
... | class class_name[name] begin[{]
method[stateName, return_type[type[String]], modifier[public], parameter[state]] begin[{]
local_variable[type[String], name]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=VISIT_LEFT, postfix_operators=[], prefix_operators=[], qualifier=N... | Keyword[public] identifier[String] identifier[stateName] operator[SEP] Keyword[int] identifier[state] operator[SEP] {
identifier[String] identifier[name] operator[=] literal[String] operator[+] identifier[state] operator[SEP] Keyword[switch] operator[SEP] identifier[state] operator[SEP] {
Keyword[case... |
public void marshall(ListMailboxPermissionsRequest listMailboxPermissionsRequest, ProtocolMarshaller protocolMarshaller) {
if (listMailboxPermissionsRequest == 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[listMailboxPermissionsRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.listMailboxPermissionsRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreato... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ListMailboxPermissionsRequest] identifier[listMailboxPermissionsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[listMailboxPermissionsRequest] operator[==] Ot... |
public static <K, V> Map<K, V> sortNumberMapByKeyAscending(Map<K, V> map) {
return sortNumberMapByKeyAscending(map.entrySet());
} | class class_name[name] begin[{]
method[sortNumberMapByKeyAscending, return_type[type[Map]], modifier[public static], parameter[map]] begin[{]
return[call[.sortNumberMapByKeyAscending, parameter[call[map.entrySet, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[sortNumberMapByKeyAscending] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[map] operator[SEP] {
... |
static public MFileOS getExistingFile(String filename) {
if (filename == null) return null;
File file = new File(filename);
if (file.exists()) return new MFileOS(file);
return null;
} | class class_name[name] begin[{]
method[getExistingFile, return_type[type[MFileOS]], modifier[public static], parameter[filename]] begin[{]
if[binary_operation[member[.filename], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[t... | Keyword[static] Keyword[public] identifier[MFileOS] identifier[getExistingFile] operator[SEP] identifier[String] identifier[filename] operator[SEP] {
Keyword[if] operator[SEP] identifier[filename] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[File] identifier[file] o... |
@RequestMapping(value="/{providerId}", method=RequestMethod.GET, params="oauth_token")
public RedirectView oauth1Callback(@PathVariable String providerId, NativeWebRequest request) {
try {
OAuth1ConnectionFactory<?> connectionFactory = (OAuth1ConnectionFactory<?>) connectionFactoryLocator.getConnectionFactory(pro... | class class_name[name] begin[{]
method[oauth1Callback, return_type[type[RedirectView]], modifier[public], parameter[providerId, request]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arg... | annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[GET] , identifier[params] operator[=] literal[String] operator[SEP] Keyword[public] identifier[RedirectView] identifier[oauth1Callbac... |
@RequestMapping(value = "changeLog/fileFilter/{projectId}/create", method = RequestMethod.POST)
public Resource<SCMFileChangeFilter> createChangeLogFileFilter(@PathVariable ID projectId, @RequestBody SCMFileChangeFilter filter) {
securityService.checkProjectFunction(projectId.get(), ProjectConfig.class);
... | class class_name[name] begin[{]
method[createChangeLogFileFilter, return_type[type[Resource]], modifier[public], parameter[projectId, filter]] begin[{]
call[securityService.checkProjectFunction, parameter[call[projectId.get, parameter[]], ClassReference(postfix_operators=[], prefix_operators=[]... | annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[POST] operator[SEP] Keyword[public] identifier[Resource] operator[<] identifier[SCMFileChangeFilter] operator[>] identifier[createChan... |
@SuppressWarnings("unchecked")
public static <V extends NumberVector> NumberVector.Factory<V> guessFactory(SimpleTypeInformation<V> in) {
NumberVector.Factory<V> factory = null;
if(in instanceof VectorTypeInformation) {
factory = (NumberVector.Factory<V>) ((VectorTypeInformation<V>) in).getFactory();
... | class class_name[name] begin[{]
method[guessFactory, return_type[type[NumberVector]], modifier[public static], parameter[in]] begin[{]
local_variable[type[NumberVector], factory]
if[binary_operation[member[.in], instanceof, type[VectorTypeInformation]]] begin[{]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[V] Keyword[extends] identifier[NumberVector] operator[>] identifier[NumberVector] operator[SEP] identifier[Factory] operator[<] identifier[V] operator[>] identifier[guessFactory]... |
@SuppressWarnings("unchecked")
public <T> WeakReference<T> track(T obj, Runnable runnable){
return (WeakReference<T>)track(obj, WeakReference.class, runnable);
} | class class_name[name] begin[{]
method[track, return_type[type[WeakReference]], modifier[public], parameter[obj, runnable]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfi... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[WeakReference] operator[<] identifier[T] operator[>] identifier[track] operator[SEP] identifier[T] identifier[obj] , identifier[Runnable] identifier[runnable] operator... |
@XmlElementDecl(namespace = "http://sashimi.sourceforge.net/schema_revision/mzXML_3.2", name = "separationTechnique")
public JAXBElement<SeparationTechniqueType> createSeparationTechnique(
SeparationTechniqueType value) {
return new JAXBElement<SeparationTechniqueType>(_SeparationTechnique_QNAME,
Se... | class class_name[name] begin[{]
method[createSeparationTechnique, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_SeparationTechnique_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassRef... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[SeparationTechniqueType] operator[>] identifier[createSeparationTechnique] operator[SEP] i... |
public ServiceFactory getServiceFactory(AppContextWrapper sc) {
ContainerWrapper containerWrapper = containerFinder.findContainer(sc);
ServiceFactory serviceFactory = (ServiceFactory) containerWrapper.lookup(ComponentKeys.WEBSERVICE_FACTORY);
return serviceFactory;
} | class class_name[name] begin[{]
method[getServiceFactory, return_type[type[ServiceFactory]], modifier[public], parameter[sc]] begin[{]
local_variable[type[ContainerWrapper], containerWrapper]
local_variable[type[ServiceFactory], serviceFactory]
return[member[.serviceFactory]]
end[}]... | Keyword[public] identifier[ServiceFactory] identifier[getServiceFactory] operator[SEP] identifier[AppContextWrapper] identifier[sc] operator[SEP] {
identifier[ContainerWrapper] identifier[containerWrapper] operator[=] identifier[containerFinder] operator[SEP] identifier[findContainer] operator[SEP] identifier[sc... |
@Override
public AuditService getAuditService() {
InvocationHandler ih = new TransactionInvocationHandler(_wrapped.getAuditService(), _persistent);
return (AuditService)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {AuditLogService.class}, ih);
} | class class_name[name] begin[{]
method[getAuditService, return_type[type[AuditService]], modifier[public], parameter[]] begin[{]
local_variable[type[InvocationHandler], ih]
return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], p... | annotation[@] identifier[Override] Keyword[public] identifier[AuditService] identifier[getAuditService] operator[SEP] operator[SEP] {
identifier[InvocationHandler] identifier[ih] operator[=] Keyword[new] identifier[TransactionInvocationHandler] operator[SEP] identifier[_wrapped] operator[SEP] identifier[getAudit... |
public static RelationType getInstance(Locale locale, String type)
{
int index = -1;
String[] relationTypes = LocaleData.getStringArray(locale, LocaleData.RELATION_TYPES);
for (int loop = 0; loop < relationTypes.length; loop++)
{
if (relationTypes[loop].equalsIgnoreCase(type) == tru... | class class_name[name] begin[{]
method[getInstance, return_type[type[RelationType]], modifier[public static], parameter[locale, type]] begin[{]
local_variable[type[int], index]
local_variable[type[String], relationTypes]
ForStatement(body=BlockStatement(label=None, statements=[IfStateme... | Keyword[public] Keyword[static] identifier[RelationType] identifier[getInstance] operator[SEP] identifier[Locale] identifier[locale] , identifier[String] identifier[type] operator[SEP] {
Keyword[int] identifier[index] operator[=] operator[-] Other[1] operator[SEP] identifier[String] operator[SEP] operator[SEP] ... |
void setPlayingTrack(int playingTrackPosition) {
if (playingTrackPosition < 0 || playingTrackPosition >= mSoundCloudPlaylist.getTracks().size()) {
throw new IllegalArgumentException("No tracks a the position " + playingTrackPosition);
}
mCurrentTrackIndex = playingTrackPosition;
... | class class_name[name] begin[{]
method[setPlayingTrack, return_type[void], modifier[default], parameter[playingTrackPosition]] begin[{]
if[binary_operation[binary_operation[member[.playingTrackPosition], <, literal[0]], ||, binary_operation[member[.playingTrackPosition], >=, call[mSoundCloudPla... | Keyword[void] identifier[setPlayingTrack] operator[SEP] Keyword[int] identifier[playingTrackPosition] operator[SEP] {
Keyword[if] operator[SEP] identifier[playingTrackPosition] operator[<] Other[0] operator[||] identifier[playingTrackPosition] operator[>=] identifier[mSoundCloudPlaylist] operator[SEP] identifier... |
@Override
public DescribeNetworkInterfacePermissionsResult describeNetworkInterfacePermissions(DescribeNetworkInterfacePermissionsRequest request) {
request = beforeClientExecution(request);
return executeDescribeNetworkInterfacePermissions(request);
} | class class_name[name] begin[{]
method[describeNetworkInterfacePermissions, return_type[type[DescribeNetworkInterfacePermissionsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.execu... | annotation[@] identifier[Override] Keyword[public] identifier[DescribeNetworkInterfacePermissionsResult] identifier[describeNetworkInterfacePermissions] operator[SEP] identifier[DescribeNetworkInterfacePermissionsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClient... |
public Object evaluate(File file) throws CompilationFailedException, IOException {
GroovyShell shell = new GroovyShell(getClass().getClassLoader(), binding);
return shell.evaluate(file);
} | class class_name[name] begin[{]
method[evaluate, return_type[type[Object]], modifier[public], parameter[file]] begin[{]
local_variable[type[GroovyShell], shell]
return[call[shell.evaluate, parameter[member[.file]]]]
end[}]
END[}] | Keyword[public] identifier[Object] identifier[evaluate] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[CompilationFailedException] , identifier[IOException] {
identifier[GroovyShell] identifier[shell] operator[=] Keyword[new] identifier[GroovyShell] operator[SEP] identi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.