code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public String getAsShortText(int fieldValue, Locale locale) {
return GJLocaleSymbols.forLocale(locale).dayOfWeekValueToShortText(fieldValue);
} | class class_name[name] begin[{]
method[getAsShortText, return_type[type[String]], modifier[public], parameter[fieldValue, locale]] begin[{]
return[call[GJLocaleSymbols.forLocale, parameter[member[.locale]]]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[getAsShortText] operator[SEP] Keyword[int] identifier[fieldValue] , identifier[Locale] identifier[locale] operator[SEP] {
Keyword[return] identifier[GJLocaleSymbols] operator[SEP] identifier[forLocale] operator[SEP] identifier[locale] operator[SEP] operator[SEP] ide... |
private int findCoordElementDiscontiguousInterval(double target, boolean bounded) {
int idx = findSingleHit(target);
if (idx >= 0) return idx;
if (idx == -1) return -1; // no hits
// multiple hits = choose closest to the midpoint
return findClosest(target);
} | class class_name[name] begin[{]
method[findCoordElementDiscontiguousInterval, return_type[type[int]], modifier[private], parameter[target, bounded]] begin[{]
local_variable[type[int], idx]
if[binary_operation[member[.idx], >=, literal[0]]] begin[{]
return[member[.idx]]
else begi... | Keyword[private] Keyword[int] identifier[findCoordElementDiscontiguousInterval] operator[SEP] Keyword[double] identifier[target] , Keyword[boolean] identifier[bounded] operator[SEP] {
Keyword[int] identifier[idx] operator[=] identifier[findSingleHit] operator[SEP] identifier[target] operator[SEP] operator[SEP] ... |
public void init(BaseDatabase database, Record record)
{
super.init(database, record);
m_gridList = new DataRecordList();
m_iEndOfFileIndex = UNKNOWN_POSITION; // Actual end of file (-1 means don't know)
m_gridBuffer = new DataRecordBuffer();
m_gridNew = new DataRecor... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[database, record]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=database, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=record, postfix_... | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[BaseDatabase] identifier[database] , identifier[Record] identifier[record] operator[SEP] {
Keyword[super] operator[SEP] identifier[init] operator[SEP] identifier[database] , identifier[record] operator[SEP] operator[SEP] identifier[m_gridL... |
private void passViolations(ConstraintValidatorContext context,
Set<ConstraintViolation<Object>> source) {
for (final ConstraintViolation<Object> violation : source) {
final Iterator<Node> nodeIter = violation.getPropertyPath()
.iterator();
... | class class_name[name] begin[{]
method[passViolations, return_type[void], modifier[private], parameter[context, source]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation... | Keyword[private] Keyword[void] identifier[passViolations] operator[SEP] identifier[ConstraintValidatorContext] identifier[context] , identifier[Set] operator[<] identifier[ConstraintViolation] operator[<] identifier[Object] operator[>] operator[>] identifier[source] operator[SEP] {
Keyword[for] operator[SEP] Ke... |
public void resetRow(int filepos, int rowsize) throws IOException {
if (out != null) {
out.reset(rowsize);
buf = out.getBuffer();
}
super.resetRow(filepos, rowsize);
} | class class_name[name] begin[{]
method[resetRow, return_type[void], modifier[public], parameter[filepos, rowsize]] begin[{]
if[binary_operation[member[.out], !=, literal[null]]] begin[{]
call[out.reset, parameter[member[.rowsize]]]
assign[member[.... | Keyword[public] Keyword[void] identifier[resetRow] operator[SEP] Keyword[int] identifier[filepos] , Keyword[int] identifier[rowsize] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[out] operator[!=] Other[null] operator[SEP] {
identifier[out] operator[SEP]... |
public void check(String action, String expectedResult, String actualResult) {
checks++;
recordStep(action, expectedResult, actualResult, true, Success.CHECK);
} | class class_name[name] begin[{]
method[check, return_type[void], modifier[public], parameter[action, expectedResult, actualResult]] begin[{]
member[.checks]
call[.recordStep, parameter[member[.action], member[.expectedResult], member[.actualResult], literal[true], member[Success... | Keyword[public] Keyword[void] identifier[check] operator[SEP] identifier[String] identifier[action] , identifier[String] identifier[expectedResult] , identifier[String] identifier[actualResult] operator[SEP] {
identifier[checks] operator[++] operator[SEP] identifier[recordStep] operator[SEP] identifier[action]... |
public OvhTrunkExternalDisplayedNumber billingAccount_trunk_serviceName_externalDisplayedNumber_number_GET(String billingAccount, String serviceName, String number) throws IOException {
String qPath = "/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number}";
StringBuilder sb = path(qPath, ... | class class_name[name] begin[{]
method[billingAccount_trunk_serviceName_externalDisplayedNumber_number_GET, return_type[type[OvhTrunkExternalDisplayedNumber]], modifier[public], parameter[billingAccount, serviceName, number]] begin[{]
local_variable[type[String], qPath]
local_variable[type[Stri... | Keyword[public] identifier[OvhTrunkExternalDisplayedNumber] identifier[billingAccount_trunk_serviceName_externalDisplayedNumber_number_GET] operator[SEP] identifier[String] identifier[billingAccount] , identifier[String] identifier[serviceName] , identifier[String] identifier[number] operator[SEP] Keyword[throws] ide... |
public AtomSymbolElement generateElement(IAtom atom, int alignment, RendererModel model) {
String text;
if (atom instanceof IPseudoAtom) {
text = ((IPseudoAtom) atom).getLabel();
} else {
text = atom.getSymbol();
}
return new AtomSymbolElement(atom.getPoin... | class class_name[name] begin[{]
method[generateElement, return_type[type[AtomSymbolElement]], modifier[public], parameter[atom, alignment, model]] begin[{]
local_variable[type[String], text]
if[binary_operation[member[.atom], instanceof, type[IPseudoAtom]]] begin[{]
... | Keyword[public] identifier[AtomSymbolElement] identifier[generateElement] operator[SEP] identifier[IAtom] identifier[atom] , Keyword[int] identifier[alignment] , identifier[RendererModel] identifier[model] operator[SEP] {
identifier[String] identifier[text] operator[SEP] Keyword[if] operator[SEP] identifier[at... |
MockMvcRequestSpecBuilder addSessionAttr(String name, Object value) {
spec.sessionAttr(name, value);
return this;
} | class class_name[name] begin[{]
method[addSessionAttr, return_type[type[MockMvcRequestSpecBuilder]], modifier[default], parameter[name, value]] begin[{]
call[spec.sessionAttr, parameter[member[.name], member[.value]]]
return[THIS[]]
end[}]
END[}] | identifier[MockMvcRequestSpecBuilder] identifier[addSessionAttr] operator[SEP] identifier[String] identifier[name] , identifier[Object] identifier[value] operator[SEP] {
identifier[spec] operator[SEP] identifier[sessionAttr] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] Keyword... |
static protected synchronized void track(HTTPSession session)
{
if(!TESTING) throw new UnsupportedOperationException();
if(sessionList == null)
sessionList = new ConcurrentSkipListSet<HTTPSession>();
sessionList.add(session);
} | class class_name[name] begin[{]
method[track, return_type[void], modifier[protected synchronized static], parameter[session]] begin[{]
if[member[.TESTING]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_oper... | Keyword[static] Keyword[protected] Keyword[synchronized] Keyword[void] identifier[track] operator[SEP] identifier[HTTPSession] identifier[session] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[TESTING] operator[SEP] Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator... |
public static Route DELETE(String uriPattern, RouteHandler routeHandler) {
return new Route(HttpConstants.Method.DELETE, uriPattern, routeHandler);
} | class class_name[name] begin[{]
method[DELETE, return_type[type[Route]], modifier[public static], parameter[uriPattern, routeHandler]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=DELETE, postfix_operators=[], prefix_operators=[], qualifier=HttpConstants.Method, selectors=[]), MemberR... | Keyword[public] Keyword[static] identifier[Route] identifier[DELETE] operator[SEP] identifier[String] identifier[uriPattern] , identifier[RouteHandler] identifier[routeHandler] operator[SEP] {
Keyword[return] Keyword[new] identifier[Route] operator[SEP] identifier[HttpConstants] operator[SEP] identifier[Method]... |
@Override
public MapDataStore getMapDataStore(String mapName, int partitionId) {
return MapDataStores.createWriteBehindStore(mapStoreContext, partitionId, writeBehindProcessor);
} | class class_name[name] begin[{]
method[getMapDataStore, return_type[type[MapDataStore]], modifier[public], parameter[mapName, partitionId]] begin[{]
return[call[MapDataStores.createWriteBehindStore, parameter[member[.mapStoreContext], member[.partitionId], member[.writeBehindProcessor]]]]
end[}]
EN... | annotation[@] identifier[Override] Keyword[public] identifier[MapDataStore] identifier[getMapDataStore] operator[SEP] identifier[String] identifier[mapName] , Keyword[int] identifier[partitionId] operator[SEP] {
Keyword[return] identifier[MapDataStores] operator[SEP] identifier[createWriteBehindStore] operator[... |
private static boolean needIncrement(MutableBigInteger mdivisor, int roundingMode,
int qsign, MutableBigInteger mq, MutableBigInteger mr) {
assert !mr.isZero();
int cmpFracHalf = mr.compareHalf(mdivisor);
return commonNeedIncrement(roundingMode, qsign, cm... | class class_name[name] begin[{]
method[needIncrement, return_type[type[boolean]], modifier[private static], parameter[mdivisor, roundingMode, qsign, mq, mr]] begin[{]
AssertStatement(condition=MethodInvocation(arguments=[], member=isZero, postfix_operators=[], prefix_operators=['!'], qualifier=mr, sele... | Keyword[private] Keyword[static] Keyword[boolean] identifier[needIncrement] operator[SEP] identifier[MutableBigInteger] identifier[mdivisor] , Keyword[int] identifier[roundingMode] , Keyword[int] identifier[qsign] , identifier[MutableBigInteger] identifier[mq] , identifier[MutableBigInteger] identifier[mr] operator... |
@Override
public AttachmentResource getMainAttachment() throws RepositoryBackendException, RepositoryResourceException {
Collection<AttachmentResource> attachments = getAttachments();
for (AttachmentResource at : attachments) {
if (isMainAttachment(at)) {
return at;
... | class class_name[name] begin[{]
method[getMainAttachment, return_type[type[AttachmentResource]], modifier[public], parameter[]] begin[{]
local_variable[type[Collection], attachments]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Membe... | annotation[@] identifier[Override] Keyword[public] identifier[AttachmentResource] identifier[getMainAttachment] operator[SEP] operator[SEP] Keyword[throws] identifier[RepositoryBackendException] , identifier[RepositoryResourceException] {
identifier[Collection] operator[<] identifier[AttachmentResource] operato... |
@SuppressWarnings("unchecked")
static <S extends Storable> Class<? extends S>
getStorableClass(Class<S> type, boolean isMaster)
throws SupportException
{
synchronized (cCache) {
Class<? extends S> storableClass;
RawStorableGenerator.Flavors<S> flavors =
... | class class_name[name] begin[{]
method[getStorableClass, return_type[type[Class]], modifier[static], parameter[type, isMaster]] begin[{]
SYNCHRONIZED[member[.cCache]] BEGIN[{]
local_variable[type[Class], storableClass]
local_variable[type[RawStorableGenerator], flavors]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[static] operator[<] identifier[S] Keyword[extends] identifier[Storable] operator[>] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[S] operator[>] identifier[getStorableClass] operator[SEP] identifier[Cl... |
Entry<K,V> removeEntryForKey(Object key) throws ConcurrentModificationException
{
Object k = maskNull(key);
int hash = hash(k);
int i = indexFor(hash, table.length);
Entry<K,V> prev = table[i];
Entry<K,V> e = prev;
while (e != null)
{
... | class class_name[name] begin[{]
method[removeEntryForKey, return_type[type[Entry]], modifier[default], parameter[key]] begin[{]
local_variable[type[Object], k]
local_variable[type[int], hash]
local_variable[type[int], i]
local_variable[type[Entry], prev]
local_variable[t... | identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] identifier[removeEntryForKey] operator[SEP] identifier[Object] identifier[key] operator[SEP] Keyword[throws] identifier[ConcurrentModificationException] {
identifier[Object] identifier[k] operator[=] identifier[maskNull] operator[SEP] ident... |
public void marshall(Target target, ProtocolMarshaller protocolMarshaller) {
if (target == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(target.getId(), ID_BINDING);
protocolMarshaller.m... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[target, protocolMarshaller]] begin[{]
if[binary_operation[member[.target], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pre... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Target] identifier[target] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[target] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] iden... |
public List<UserDto> selectByUuids(DbSession session, Collection<String> uuids) {
return executeLargeInputs(uuids, mapper(session)::selectByUuids);
} | class class_name[name] begin[{]
method[selectByUuids, return_type[type[List]], modifier[public], parameter[session, uuids]] begin[{]
return[call[.executeLargeInputs, parameter[member[.uuids], MethodReference(expression=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], pr... | Keyword[public] identifier[List] operator[<] identifier[UserDto] operator[>] identifier[selectByUuids] operator[SEP] identifier[DbSession] identifier[session] , identifier[Collection] operator[<] identifier[String] operator[>] identifier[uuids] operator[SEP] {
Keyword[return] identifier[executeLargeInputs] oper... |
public Instant truncatedTo(TemporalUnit unit) {
if (unit == ChronoUnit.NANOS) {
return this;
}
Duration unitDur = unit.getDuration();
if (unitDur.getSeconds() > LocalTime.SECONDS_PER_DAY) {
throw new UnsupportedTemporalTypeException("Unit is too large to be used f... | class class_name[name] begin[{]
method[truncatedTo, return_type[type[Instant]], modifier[public], parameter[unit]] begin[{]
if[binary_operation[member[.unit], ==, member[ChronoUnit.NANOS]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
local_variable[type... | Keyword[public] identifier[Instant] identifier[truncatedTo] operator[SEP] identifier[TemporalUnit] identifier[unit] operator[SEP] {
Keyword[if] operator[SEP] identifier[unit] operator[==] identifier[ChronoUnit] operator[SEP] identifier[NANOS] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP]... |
public byte[] toBytesSparse(int nonEmptyBuckets)
{
int size = SERDE_HEADER_SIZE + getSparseStorageSize(nonEmptyBuckets);
ByteBuffer buf = ByteBuffer.allocate(size);
writeByteBufferSparse(buf, nonEmptyBuckets);
return buf.array();
} | class class_name[name] begin[{]
method[toBytesSparse, return_type[type[byte]], modifier[public], parameter[nonEmptyBuckets]] begin[{]
local_variable[type[int], size]
local_variable[type[ByteBuffer], buf]
call[.writeByteBufferSparse, parameter[member[.buf], member[.nonEmptyBucket... | Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[toBytesSparse] operator[SEP] Keyword[int] identifier[nonEmptyBuckets] operator[SEP] {
Keyword[int] identifier[size] operator[=] identifier[SERDE_HEADER_SIZE] operator[+] identifier[getSparseStorageSize] operator[SEP] identifier[nonEmptyBuckets]... |
private static boolean isAssignableFrom(Class<?> type1, Class<?> type2) {
return boxedClass(type1).equals(boxedClass(type2));
} | class class_name[name] begin[{]
method[isAssignableFrom, return_type[type[boolean]], modifier[private static], parameter[type1, type2]] begin[{]
return[call[.boxedClass, parameter[member[.type1]]]]
end[}]
END[}] | Keyword[private] Keyword[static] Keyword[boolean] identifier[isAssignableFrom] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type1] , identifier[Class] operator[<] operator[?] operator[>] identifier[type2] operator[SEP] {
Keyword[return] identifier[boxedClass] operator[SEP] iden... |
protected void println(String line) {
if (output instanceof PrintStream) {
((PrintStream) output).println(line);
} else {
((PrintWriter) output).println(line);
}
} | class class_name[name] begin[{]
method[println, return_type[void], modifier[protected], parameter[line]] begin[{]
if[binary_operation[member[.output], instanceof, type[PrintStream]]] begin[{]
Cast(expression=MemberReference(member=output, postfix_operators=[], prefix_ope... | Keyword[protected] Keyword[void] identifier[println] operator[SEP] identifier[String] identifier[line] operator[SEP] {
Keyword[if] operator[SEP] identifier[output] Keyword[instanceof] identifier[PrintStream] operator[SEP] {
operator[SEP] operator[SEP] identifier[PrintStream] operator[SEP] identifier[o... |
public alluxio.grpc.CreateDirectoryPOptions getOptions() {
return options_ == null ? alluxio.grpc.CreateDirectoryPOptions.getDefaultInstance() : options_;
} | class class_name[name] begin[{]
method[getOptions, return_type[type[alluxio]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=options_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(post... | Keyword[public] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[CreateDirectoryPOptions] identifier[getOptions] operator[SEP] operator[SEP] {
Keyword[return] identifier[options_] operator[==] Other[null] operator[?] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] iden... |
public JSONObject put(String key, double value) throws JSONException {
put(key, Double.valueOf(value));
return this;
} | class class_name[name] begin[{]
method[put, return_type[type[JSONObject]], modifier[public], parameter[key, value]] begin[{]
call[.put, parameter[member[.key], call[Double.valueOf, parameter[member[.value]]]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[JSONObject] identifier[put] operator[SEP] identifier[String] identifier[key] , Keyword[double] identifier[value] operator[SEP] Keyword[throws] identifier[JSONException] {
identifier[put] operator[SEP] identifier[key] , identifier[Double] operator[SEP] identifier[valueOf] operator[SEP... |
private static Object findJarServiceProvider(final String factoryId) throws ConfigurationError {
final String serviceId = "META-INF/services/" + factoryId;
InputStream is = null;
// First try the Context ClassLoader
ClassLoader cl = ss.getContextClassLoader();
if (cl != null) {... | class class_name[name] begin[{]
method[findJarServiceProvider, return_type[type[Object]], modifier[private static], parameter[factoryId]] begin[{]
local_variable[type[String], serviceId]
local_variable[type[InputStream], is]
local_variable[type[ClassLoader], cl]
if[binar... | Keyword[private] Keyword[static] identifier[Object] identifier[findJarServiceProvider] operator[SEP] Keyword[final] identifier[String] identifier[factoryId] operator[SEP] Keyword[throws] identifier[ConfigurationError] {
Keyword[final] identifier[String] identifier[serviceId] operator[=] literal[String] operator[... |
public static boolean hasBody(Response response) {
// HEAD requests never yield a body regardless of the response headers.
if (response.request().method().equals("HEAD")) {
return false;
}
int responseCode = response.code();
if ((responseCode < HTTP_CONTINUE || responseCode >= 200)
&&... | class class_name[name] begin[{]
method[hasBody, return_type[type[boolean]], modifier[public static], parameter[response]] begin[{]
if[call[response.request, parameter[]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[type[int], resp... | Keyword[public] Keyword[static] Keyword[boolean] identifier[hasBody] operator[SEP] identifier[Response] identifier[response] operator[SEP] {
Keyword[if] operator[SEP] identifier[response] operator[SEP] identifier[request] operator[SEP] operator[SEP] operator[SEP] identifier[method] operator[SEP] operator[SEP] op... |
public static lucee.runtime.config.DebugEntry getDebugEntry(PageContext pc) {
String addr = pc.getHttpServletRequest().getRemoteAddr();
lucee.runtime.config.DebugEntry debugEntry = ((ConfigImpl) pc.getConfig()).getDebugEntry(addr, null);
return debugEntry;
} | class class_name[name] begin[{]
method[getDebugEntry, return_type[type[lucee]], modifier[public static], parameter[pc]] begin[{]
local_variable[type[String], addr]
local_variable[type[lucee], debugEntry]
return[member[.debugEntry]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[lucee] operator[SEP] identifier[runtime] operator[SEP] identifier[config] operator[SEP] identifier[DebugEntry] identifier[getDebugEntry] operator[SEP] identifier[PageContext] identifier[pc] operator[SEP] {
identifier[String] identifier[addr] operator[=] identifier[pc] o... |
public static List<ClassInfo> getAnnotatedClasses(List<AnnotationInstance> instances) {
List<ClassInfo> result = new ArrayList<ClassInfo>();
for (AnnotationInstance instance : instances) {
AnnotationTarget target = instance.target();
if (target instanceof ClassInfo) {
... | class class_name[name] begin[{]
method[getAnnotatedClasses, return_type[type[List]], modifier[public static], parameter[instances]] begin[{]
local_variable[type[List], result]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Variable... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[ClassInfo] operator[>] identifier[getAnnotatedClasses] operator[SEP] identifier[List] operator[<] identifier[AnnotationInstance] operator[>] identifier[instances] operator[SEP] {
identifier[List] operator[<] identifier[ClassInfo] operator[>]... |
public boolean seen(long msgId) {
boolean seen = nonContiguousMsgIds.contains(msgId) || msgId <= highestContiguousMsgId;
tryReconcile();
return seen;
} | class class_name[name] begin[{]
method[seen, return_type[type[boolean]], modifier[public], parameter[msgId]] begin[{]
local_variable[type[boolean], seen]
call[.tryReconcile, parameter[]]
return[member[.seen]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[seen] operator[SEP] Keyword[long] identifier[msgId] operator[SEP] {
Keyword[boolean] identifier[seen] operator[=] identifier[nonContiguousMsgIds] operator[SEP] identifier[contains] operator[SEP] identifier[msgId] operator[SEP] operator[||] identifier[msgId] operator[<=... |
public void setBoolean2(String parameterName, Boolean value) throws java.sql.SQLException {
if (value == null) {
setNull(parameterName, Types.BIT);
} else {
setBoolean(parameterName, value);
}
} | class class_name[name] begin[{]
method[setBoolean2, return_type[void], modifier[public], parameter[parameterName, value]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
call[.setNull, parameter[member[.parameterName], member[Types.BIT]]]
... | Keyword[public] Keyword[void] identifier[setBoolean2] operator[SEP] identifier[String] identifier[parameterName] , identifier[Boolean] identifier[value] operator[SEP] Keyword[throws] identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[valu... |
public static Argument[] args(String... nameValuePairs) {
int length = nameValuePairs.length;
if (length == 0) {
return NO_ARGUMENTS;
}
// even number of arguments ?
if ((length & 1) != 0) {
throw new IllegalArgumentException("Expecting even number of ar... | class class_name[name] begin[{]
method[args, return_type[type[Argument]], modifier[public static], parameter[nameValuePairs]] begin[{]
local_variable[type[int], length]
if[binary_operation[member[.length], ==, literal[0]]] begin[{]
return[member[.NO_ARGUMENTS]]
else ... | Keyword[public] Keyword[static] identifier[Argument] operator[SEP] operator[SEP] identifier[args] operator[SEP] identifier[String] operator[...] identifier[nameValuePairs] operator[SEP] {
Keyword[int] identifier[length] operator[=] identifier[nameValuePairs] operator[SEP] identifier[length] operator[SEP] Keyword... |
public void setCheckInterval(long checkInterval)
{
if (checkInterval < 0 || checkInterval > Long.MAX_VALUE / 2)
_checkInterval = Long.MAX_VALUE / 2;
else
_checkInterval = checkInterval;
_checkExpiresTime = 0;
} | class class_name[name] begin[{]
method[setCheckInterval, return_type[void], modifier[public], parameter[checkInterval]] begin[{]
if[binary_operation[binary_operation[member[.checkInterval], <, literal[0]], ||, binary_operation[member[.checkInterval], >, binary_operation[member[Long.MAX_VALUE], ... | Keyword[public] Keyword[void] identifier[setCheckInterval] operator[SEP] Keyword[long] identifier[checkInterval] operator[SEP] {
Keyword[if] operator[SEP] identifier[checkInterval] operator[<] Other[0] operator[||] identifier[checkInterval] operator[>] identifier[Long] operator[SEP] identifier[MAX_VALUE] operato... |
public static <T> T createInternal(Config config, Class<T> clazz) {
if (((SimpleConfig)config).root().resolveStatus() != ResolveStatus.RESOLVED)
throw new ConfigException.NotResolved(
"need to Config#resolve() a config before using it to initialize a bean, see the API docs for Co... | class class_name[name] begin[{]
method[createInternal, return_type[type[T]], modifier[public static], parameter[config, clazz]] begin[{]
if[binary_operation[Cast(expression=MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(ar... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[createInternal] operator[SEP] identifier[Config] identifier[config] , identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] operator[SEP] ide... |
public static GrayU8 invert(GrayU8 input, int max , GrayU8 output) {
output = InputSanityCheck.checkDeclare(input, output);
ImplGrayImageOps.invert(input,max,output);
return output;
} | class class_name[name] begin[{]
method[invert, return_type[type[GrayU8]], modifier[public static], parameter[input, max, output]] begin[{]
assign[member[.output], call[InputSanityCheck.checkDeclare, parameter[member[.input], member[.output]]]]
call[ImplGrayImageOps.invert, param... | Keyword[public] Keyword[static] identifier[GrayU8] identifier[invert] operator[SEP] identifier[GrayU8] identifier[input] , Keyword[int] identifier[max] , identifier[GrayU8] identifier[output] operator[SEP] {
identifier[output] operator[=] identifier[InputSanityCheck] operator[SEP] identifier[checkDeclare] oper... |
@Override
public HttpServletRequest getRequest() {
final HttpServletRequest request = LaRequestUtil.getRequest();
if (request == null) {
throw new IllegalStateException("Not found the request, not web environment?");
}
return request;
} | class class_name[name] begin[{]
method[getRequest, return_type[type[HttpServletRequest]], modifier[public], parameter[]] begin[{]
local_variable[type[HttpServletRequest], request]
if[binary_operation[member[.request], ==, literal[null]]] begin[{]
ThrowStatement(expression=Cl... | annotation[@] identifier[Override] Keyword[public] identifier[HttpServletRequest] identifier[getRequest] operator[SEP] operator[SEP] {
Keyword[final] identifier[HttpServletRequest] identifier[request] operator[=] identifier[LaRequestUtil] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[... |
public final String getOpeningTag() {
if (isRebuild() || isModified()) {
final Lock lock = sharedObject.getLock(ACCESS_OBJECT).writeLock();
try {
lock.lock();
buildOpeningTag(true);
} finally {
lock.unlock();
}
... | class class_name[name] begin[{]
method[getOpeningTag, return_type[type[String]], modifier[final public], parameter[]] begin[{]
if[binary_operation[call[.isRebuild, parameter[]], ||, call[.isModified, parameter[]]]] begin[{]
local_variable[type[Lock], lock]
TryStatement(b... | Keyword[public] Keyword[final] identifier[String] identifier[getOpeningTag] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isRebuild] operator[SEP] operator[SEP] operator[||] identifier[isModified] operator[SEP] operator[SEP] operator[SEP] {
Keyword[final] identifier[Lock] identifi... |
public static void main(final String[] args) {
if (System.getProperty("db.name") == null) {
System.out.println("Not running in multi-instance mode: no DB to connect to");
System.exit(1);
}
while (true) {
try {
Class.forName("org.postgresql.Driv... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
if[binary_operation[call[System.getProperty, parameter[literal["db.name"]]], ==, literal[null]]] begin[{]
call[System.out.println, parameter[literal["Not ru... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
Keyword[if] operator[SEP] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[==] O... |
private static void listData(final Memory mem, final long offsetBytes, final long lengthInts,
final StringBuilder sb) {
final long memCap = mem.getCapacity();
final long expectedCap = offsetBytes + (4L * lengthInts);
checkCapacity(memCap, expectedCap);
for (int i = 0; i < lengthInts; i++) {
... | class class_name[name] begin[{]
method[listData, return_type[void], modifier[private static], parameter[mem, offsetBytes, lengthInts, sb]] begin[{]
local_variable[type[long], memCap]
local_variable[type[long], expectedCap]
call[.checkCapacity, parameter[member[.memCap], member[.... | Keyword[private] Keyword[static] Keyword[void] identifier[listData] operator[SEP] Keyword[final] identifier[Memory] identifier[mem] , Keyword[final] Keyword[long] identifier[offsetBytes] , Keyword[final] Keyword[long] identifier[lengthInts] , Keyword[final] identifier[StringBuilder] identifier[sb] operator[SEP] {
... |
public static String getSchemePrefix(String spec) {
int colon = spec.indexOf(':');
if (colon < 1) {
return null;
}
for (int i = 0; i < colon; i++) {
char c = spec.charAt(i);
if (!isValidSchemeChar(i, c)) {
return null;
}
... | class class_name[name] begin[{]
method[getSchemePrefix, return_type[type[String]], modifier[public static], parameter[spec]] begin[{]
local_variable[type[int], colon]
if[binary_operation[member[.colon], <, literal[1]]] begin[{]
return[literal[null]]
else begin[{]
Non... | Keyword[public] Keyword[static] identifier[String] identifier[getSchemePrefix] operator[SEP] identifier[String] identifier[spec] operator[SEP] {
Keyword[int] identifier[colon] operator[=] identifier[spec] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] oper... |
private void addInfoElements(Element infoElement)
{
Element el = new DOMElement("name");
el.addText(this.project.getName());
infoElement.add(el);
el = new DOMElement("description");
String description = this.project.getDescription();
if (description == null) {
... | class class_name[name] begin[{]
method[addInfoElements, return_type[void], modifier[private], parameter[infoElement]] begin[{]
local_variable[type[Element], el]
call[el.addText, parameter[THIS[member[None.project]call[None.getName, parameter[]]]]]
call[infoElement.add, p... | Keyword[private] Keyword[void] identifier[addInfoElements] operator[SEP] identifier[Element] identifier[infoElement] operator[SEP] {
identifier[Element] identifier[el] operator[=] Keyword[new] identifier[DOMElement] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[el] operator[SEP] identifier... |
public void setUserName(String userName) {
SystemAssert.requireArgument(userName != null && !userName.isEmpty(), "Username cannot be null or empty.");
this.userName = userName;
} | class class_name[name] begin[{]
method[setUserName, return_type[void], modifier[public], parameter[userName]] begin[{]
call[SystemAssert.requireArgument, parameter[binary_operation[binary_operation[member[.userName], !=, literal[null]], &&, call[userName.isEmpty, parameter[]]], literal["Usernam... | Keyword[public] Keyword[void] identifier[setUserName] operator[SEP] identifier[String] identifier[userName] operator[SEP] {
identifier[SystemAssert] operator[SEP] identifier[requireArgument] operator[SEP] identifier[userName] operator[!=] Other[null] operator[&&] operator[!] identifier[userName] operator[SEP] id... |
public Collection<License> getInfo() throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_INFO);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isEr... | class class_name[name] begin[{]
method[getInfo, return_type[type[Collection]], modifier[public], parameter[]] begin[{]
local_variable[type[Map], parameters]
call[parameters.put, parameter[literal["method"], member[.METHOD_GET_INFO]]]
local_variable[type[Response], response]
... | Keyword[public] identifier[Collection] operator[<] identifier[License] operator[>] identifier[getInfo] operator[SEP] operator[SEP] Keyword[throws] identifier[FlickrException] {
identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameters] operator[=] Keyword[new] identif... |
protected void modified(String id, Map<String, Object> properties) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(this, tc, "modified " + id, properties);
}
config = properties;
myProps = null;
} | class class_name[name] begin[{]
method[modified, return_type[void], modifier[protected], parameter[id, properties]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEventEnabled, parameter[]]]] begin[{]
call[Tr.event, para... | Keyword[protected] Keyword[void] identifier[modified] operator[SEP] identifier[String] identifier[id] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[properties] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTraci... |
public void setDateTimeZone(Object dtz) throws JspTagException {
if (dtz == null || dtz instanceof String
&& ((String) dtz).length() == 0) {
this.dateTimeZone = null;
} else if (dtz instanceof DateTimeZone) {
this.dateTimeZone = (DateTimeZone) dtz;
} else ... | class class_name[name] begin[{]
method[setDateTimeZone, return_type[void], modifier[public], parameter[dtz]] begin[{]
if[binary_operation[binary_operation[member[.dtz], ==, literal[null]], ||, binary_operation[binary_operation[member[.dtz], instanceof, type[String]], &&, binary_operation[Cast(e... | Keyword[public] Keyword[void] identifier[setDateTimeZone] operator[SEP] identifier[Object] identifier[dtz] operator[SEP] Keyword[throws] identifier[JspTagException] {
Keyword[if] operator[SEP] identifier[dtz] operator[==] Other[null] operator[||] identifier[dtz] Keyword[instanceof] identifier[String] operator[&&... |
public WxCpXmlOutMessage route(final WxCpXmlMessage wxMessage) {
if (isDuplicateMessage(wxMessage)) {
// 如果是重复消息,那么就不做处理
return null;
}
final List<WxCpMessageRouterRule> matchRules = new ArrayList<WxCpMessageRouterRule>();
// 收集匹配的规则
for (final WxCpMessageRouterRule rule : rules) {
... | class class_name[name] begin[{]
method[route, return_type[type[WxCpXmlOutMessage]], modifier[public], parameter[wxMessage]] begin[{]
if[call[.isDuplicateMessage, parameter[member[.wxMessage]]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_va... | Keyword[public] identifier[WxCpXmlOutMessage] identifier[route] operator[SEP] Keyword[final] identifier[WxCpXmlMessage] identifier[wxMessage] operator[SEP] {
Keyword[if] operator[SEP] identifier[isDuplicateMessage] operator[SEP] identifier[wxMessage] operator[SEP] operator[SEP] {
Keyword[return] Other... |
public void setReadTimeout(int timeout) {
Assert.isTrue(timeout >= 0, "Timeout must be a non-negative value");
this.socketTimeout = timeout;
setLegacySocketTimeout(getHttpClient(), timeout);
} | class class_name[name] begin[{]
method[setReadTimeout, return_type[void], modifier[public], parameter[timeout]] begin[{]
call[Assert.isTrue, parameter[binary_operation[member[.timeout], >=, literal[0]], literal["Timeout must be a non-negative value"]]]
assign[THIS[member[None.so... | Keyword[public] Keyword[void] identifier[setReadTimeout] operator[SEP] Keyword[int] identifier[timeout] operator[SEP] {
identifier[Assert] operator[SEP] identifier[isTrue] operator[SEP] identifier[timeout] operator[>=] Other[0] , literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier... |
public void clazz(String unexpectedClass) {
String clazz = checkClazz(unexpectedClass, 0, 0);
assertNotNull(NO_ELEMENT_FOUND, clazz);
assertFalse("Class Mismatch: class of '" + clazz + CONTAINS + unexpectedClass + "'", clazz.contains(unexpectedClass));
} | class class_name[name] begin[{]
method[clazz, return_type[void], modifier[public], parameter[unexpectedClass]] begin[{]
local_variable[type[String], clazz]
call[.assertNotNull, parameter[member[.NO_ELEMENT_FOUND], member[.clazz]]]
call[.assertFalse, parameter[binary_oper... | Keyword[public] Keyword[void] identifier[clazz] operator[SEP] identifier[String] identifier[unexpectedClass] operator[SEP] {
identifier[String] identifier[clazz] operator[=] identifier[checkClazz] operator[SEP] identifier[unexpectedClass] , Other[0] , Other[0] operator[SEP] operator[SEP] identifier[assertNotNu... |
@Override
public OAuthToken get(String envKey) {
if (!oAuthToken.containsKey(envKey)) return null;
return oAuthToken.get(envKey);
} | class class_name[name] begin[{]
method[get, return_type[type[OAuthToken]], modifier[public], parameter[envKey]] begin[{]
if[call[oAuthToken.containsKey, parameter[member[.envKey]]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
return[call[oAuthToken.get, para... | annotation[@] identifier[Override] Keyword[public] identifier[OAuthToken] identifier[get] operator[SEP] identifier[String] identifier[envKey] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[oAuthToken] operator[SEP] identifier[containsKey] operator[SEP] identifier[envKey] operator[SEP] operator[... |
public static Validator<CharSequence> beginsWithUppercaseLetter(@NonNull final Context context,
@StringRes final int resourceId) {
return new BeginsWithUppercaseLetterValidator(context, resourceId);
} | class class_name[name] begin[{]
method[beginsWithUppercaseLetter, return_type[type[Validator]], modifier[public static], parameter[context, resourceId]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberRe... | Keyword[public] Keyword[static] identifier[Validator] operator[<] identifier[CharSequence] operator[>] identifier[beginsWithUppercaseLetter] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Context] identifier[context] , annotation[@] identifier[StringRes] Keyword[final] Keyword[int] identifie... |
public void addTrailingPairsToProperties(Properties properties)
{
if (trailingProperties != null)
{
for (Object propKey : trailingProperties.keySet())
{
String name = (String) propKey;
String value = trailingProperties.getProperty(name);
... | class class_name[name] begin[{]
method[addTrailingPairsToProperties, return_type[void], modifier[public], parameter[properties]] begin[{]
if[binary_operation[member[.trailingProperties], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVaria... | Keyword[public] Keyword[void] identifier[addTrailingPairsToProperties] operator[SEP] identifier[Properties] identifier[properties] operator[SEP] {
Keyword[if] operator[SEP] identifier[trailingProperties] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[Object] identifier[... |
public void loadBalancing_serviceName_backend_backend_PUT(String serviceName, String backend, OvhLoadBalancingBackendIp body) throws IOException {
String qPath = "/ip/loadBalancing/{serviceName}/backend/{backend}";
StringBuilder sb = path(qPath, serviceName, backend);
exec(qPath, "PUT", sb.toString(), body);
} | class class_name[name] begin[{]
method[loadBalancing_serviceName_backend_backend_PUT, return_type[void], modifier[public], parameter[serviceName, backend, body]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
call[.exec, parameter[member[.qP... | Keyword[public] Keyword[void] identifier[loadBalancing_serviceName_backend_backend_PUT] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[backend] , identifier[OvhLoadBalancingBackendIp] identifier[body] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[S... |
public static double[][] getMatrix(IAtomContainer container) {
IBond bond = null;
int indexAtom1;
int indexAtom2;
double[][] conMat = new double[container.getAtomCount()][container.getAtomCount()];
for (int f = 0; f < container.getBondCount(); f++) {
bond = container.... | class class_name[name] begin[{]
method[getMatrix, return_type[type[double]], modifier[public static], parameter[container]] begin[{]
local_variable[type[IBond], bond]
local_variable[type[int], indexAtom1]
local_variable[type[int], indexAtom2]
local_variable[type[double], conMat]... | Keyword[public] Keyword[static] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getMatrix] operator[SEP] identifier[IAtomContainer] identifier[container] operator[SEP] {
identifier[IBond] identifier[bond] operator[=] Other[null] operator[SEP] Keyword[int] identifier[indexAtom1]... |
protected void buildRevisionHistory(final BuildData buildData, final Map<String, String> overrides) throws BuildProcessingException {
final ContentSpec contentSpec = buildData.getContentSpec();
// Replace the basic injection data inside the revision history
final String revisionHistoryXml = str... | class class_name[name] begin[{]
method[buildRevisionHistory, return_type[void], modifier[protected], parameter[buildData, overrides]] begin[{]
local_variable[type[ContentSpec], contentSpec]
local_variable[type[String], revisionHistoryXml]
local_variable[type[String], fixedRevisionHistor... | Keyword[protected] Keyword[void] identifier[buildRevisionHistory] operator[SEP] Keyword[final] identifier[BuildData] identifier[buildData] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[overrides] operator[SEP] Keyword[throws] identifier[BuildProcessingExce... |
@Nonnull
public static final <T extends AbstractRequestSingleton> T getRequestSingleton (@Nonnull final Class <T> aClass)
{
return getSingleton (_getStaticScope (true), aClass);
} | class class_name[name] begin[{]
method[getRequestSingleton, return_type[type[T]], modifier[final public static], parameter[aClass]] begin[{]
return[call[.getSingleton, parameter[call[._getStaticScope, parameter[literal[true]]], member[.aClass]]]]
end[}]
END[}] | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] Keyword[final] operator[<] identifier[T] Keyword[extends] identifier[AbstractRequestSingleton] operator[>] identifier[T] identifier[getRequestSingleton] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Class] operator[<] identifi... |
public int read(byte[] b) throws IOException
{
try
{
ByteBlock block = source.read(b);
System.arraycopy(block.data, 0, b, 0, block.count);
return block.count;
}
catch (RemoteException e)
{
throw new IOException("There was a Re... | class class_name[name] begin[{]
method[read, return_type[type[int]], modifier[public], parameter[b]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[... | Keyword[public] Keyword[int] identifier[read] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
identifier[ByteBlock] identifier[block] operator[=] identifier[source] operator[SEP] identifier[read] operator[SEP]... |
public static Class<?> boxType( Class<?> primitiveType )
{
Class<?> c = wrapperMap.get( primitiveType );
if ( c != null )
return c;
throw new InterpreterError(
"Not a primitive type: "+ primitiveType );
} | class class_name[name] begin[{]
method[boxType, return_type[type[Class]], modifier[public static], parameter[primitiveType]] begin[{]
local_variable[type[Class], c]
if[binary_operation[member[.c], !=, literal[null]]] begin[{]
return[member[.c]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[boxType] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[primitiveType] operator[SEP] {
identifier[Class] operator[<] operator[?] operator[>] identifier[c] operator[=] identifier[wrappe... |
@Override
public SendBulkTemplatedEmailResult sendBulkTemplatedEmail(SendBulkTemplatedEmailRequest request) {
request = beforeClientExecution(request);
return executeSendBulkTemplatedEmail(request);
} | class class_name[name] begin[{]
method[sendBulkTemplatedEmail, return_type[type[SendBulkTemplatedEmailResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeSendBulkTemplatedEmail, ... | annotation[@] identifier[Override] Keyword[public] identifier[SendBulkTemplatedEmailResult] identifier[sendBulkTemplatedEmail] operator[SEP] identifier[SendBulkTemplatedEmailRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[req... |
public AttributeInfo[] get_attribute_info(final DeviceProxy deviceProxy,
final String[] attributeNames) throws DevFailed {
build_connection(deviceProxy);
final int retries = deviceProxy.transparent_reconnection ? 2 : 1;
for (int oneTry=1 ; oneTry<=... | class class_name[name] begin[{]
method[get_attribute_info, return_type[type[AttributeInfo]], modifier[public], parameter[deviceProxy, attributeNames]] begin[{]
call[.build_connection, parameter[member[.deviceProxy]]]
local_variable[type[int], retries]
ForStatement(body=BlockStat... | Keyword[public] identifier[AttributeInfo] operator[SEP] operator[SEP] identifier[get_attribute_info] operator[SEP] Keyword[final] identifier[DeviceProxy] identifier[deviceProxy] , Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[attributeNames] operator[SEP] Keyword[throws] identifier[DevFailed... |
@Override
public ManifestDescriptor fromFile(File file) throws IllegalArgumentException, DescriptorImportException {
if (file == null)
throw new IllegalArgumentException("File cannot be null");
try {
return new ManifestDescriptorImpl(descriptorName, new ManifestModel(file));... | class class_name[name] begin[{]
method[fromFile, return_type[type[ManifestDescriptor]], modifier[public], parameter[file]] begin[{]
if[binary_operation[member[.file], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[]... | annotation[@] identifier[Override] Keyword[public] identifier[ManifestDescriptor] identifier[fromFile] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] , identifier[DescriptorImportException] {
Keyword[if] operator[SEP] identifier[file] operator[... |
public void marshall(DnsProperties dnsProperties, ProtocolMarshaller protocolMarshaller) {
if (dnsProperties == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(dnsProperties.getHostedZoneId(), HOSTEDZ... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[dnsProperties, protocolMarshaller]] begin[{]
if[binary_operation[member[.dnsProperties], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_ope... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DnsProperties] identifier[dnsProperties] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[dnsProperties] operator[==] Other[null] operator[SEP] {
Keyword[thr... |
@Override
public Description matchClass(ClassTree tree, VisitorState state) {
// TODO(b/36395371): filter here to exclude some classes (e.g. not immutable)
if (TEST_CLASS.matches(tree, state)) {
return NO_MATCH;
}
for (Tree member : tree.getMembers()) {
if (isSuppressed(member)) {
... | class class_name[name] begin[{]
method[matchClass, return_type[type[Description]], modifier[public], parameter[tree, state]] begin[{]
if[call[TEST_CLASS.matches, parameter[member[.tree], member[.state]]]] begin[{]
return[member[.NO_MATCH]]
else begin[{]
None
end[}]
... | annotation[@] identifier[Override] Keyword[public] identifier[Description] identifier[matchClass] operator[SEP] identifier[ClassTree] identifier[tree] , identifier[VisitorState] identifier[state] operator[SEP] {
Keyword[if] operator[SEP] identifier[TEST_CLASS] operator[SEP] identifier[matches] operator[SEP] ide... |
@Override
protected Options getOptions() {
final Options options = super.getOptions();
final Option filenameOption =
new Option("f", "the name of the output file, default name is " + DEFAULT_FILENAME
+ " [optional]");
filenameOption.setArgName("FILENAME");
filenameOption.setLongOp... | class class_name[name] begin[{]
method[getOptions, return_type[type[Options]], modifier[protected], parameter[]] begin[{]
local_variable[type[Options], options]
local_variable[type[Option], filenameOption]
call[filenameOption.setArgName, parameter[literal["FILENAME"]]]
... | annotation[@] identifier[Override] Keyword[protected] identifier[Options] identifier[getOptions] operator[SEP] operator[SEP] {
Keyword[final] identifier[Options] identifier[options] operator[=] Keyword[super] operator[SEP] identifier[getOptions] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier... |
@Override
public final int getInt(final String key) {
Integer result = optInt(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | class class_name[name] begin[{]
method[getInt, return_type[type[int]], modifier[final public], parameter[key]] begin[{]
local_variable[type[Integer], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[T... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[int] identifier[getInt] operator[SEP] Keyword[final] identifier[String] identifier[key] operator[SEP] {
identifier[Integer] identifier[result] operator[=] identifier[optInt] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword... |
public static void applyToHierarchy (Component comp, ComponentOp op)
{
applyToHierarchy(comp, Integer.MAX_VALUE, op);
} | class class_name[name] begin[{]
method[applyToHierarchy, return_type[void], modifier[public static], parameter[comp, op]] begin[{]
call[.applyToHierarchy, parameter[member[.comp], member[Integer.MAX_VALUE], member[.op]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[applyToHierarchy] operator[SEP] identifier[Component] identifier[comp] , identifier[ComponentOp] identifier[op] operator[SEP] {
identifier[applyToHierarchy] operator[SEP] identifier[comp] , identifier[Integer] operator[SEP] identifier[MAX_VALUE] , ident... |
private void addClassInfoAndIncrementCount(Class<?> type, ClassInfo classInfo) {
classes.putIfAbsent(type, classInfo);
classSerializationCount.compute(type, BeanReferences::incrementOrOne);
} | class class_name[name] begin[{]
method[addClassInfoAndIncrementCount, return_type[void], modifier[private], parameter[type, classInfo]] begin[{]
call[classes.putIfAbsent, parameter[member[.type], member[.classInfo]]]
call[classSerializationCount.compute, parameter[member[.type],... | Keyword[private] Keyword[void] identifier[addClassInfoAndIncrementCount] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , identifier[ClassInfo] identifier[classInfo] operator[SEP] {
identifier[classes] operator[SEP] identifier[putIfAbsent] operator[SEP] identifier[type] , ... |
public static <E extends Comparable<E>> E maximum(Iterator<E> iterator, E init) {
return Reductions.reduce(iterator, BinaryOperator.maxBy(new ComparableComparator<E>()), init);
} | class class_name[name] begin[{]
method[maximum, return_type[type[E]], modifier[public static], parameter[iterator, init]] begin[{]
return[call[Reductions.reduce, parameter[member[.iterator], call[BinaryOperator.maxBy, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, post... | Keyword[public] Keyword[static] operator[<] identifier[E] Keyword[extends] identifier[Comparable] operator[<] identifier[E] operator[>] operator[>] identifier[E] identifier[maximum] operator[SEP] identifier[Iterator] operator[<] identifier[E] operator[>] identifier[iterator] , identifier[E] identifier[init] operator[S... |
public void enableJob(String jobId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException {
JobEnableOptions options = new JobEnableOptions();
BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors);
bhMgr.applyRequestBehavior... | class class_name[name] begin[{]
method[enableJob, return_type[void], modifier[public], parameter[jobId, additionalBehaviors]] begin[{]
local_variable[type[JobEnableOptions], options]
local_variable[type[BehaviorManager], bhMgr]
call[bhMgr.applyRequestBehaviors, parameter[member[... | Keyword[public] Keyword[void] identifier[enableJob] operator[SEP] identifier[String] identifier[jobId] , identifier[Iterable] operator[<] identifier[BatchClientBehavior] operator[>] identifier[additionalBehaviors] operator[SEP] Keyword[throws] identifier[BatchErrorException] , identifier[IOException] {
identif... |
private StringBuilder formatNumeric(Number[] hms, StringBuilder appendable) {
// find the start and end of non-nil values in hms array. We have to know if we
// have hour-minute; minute-second; or hour-minute-second.
int startIndex = -1;
int endIndex = -1;
for (int i = 0; i < hm... | class class_name[name] begin[{]
method[formatNumeric, return_type[type[StringBuilder]], modifier[private], parameter[hms, appendable]] begin[{]
local_variable[type[int], startIndex]
local_variable[type[int], endIndex]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(... | Keyword[private] identifier[StringBuilder] identifier[formatNumeric] operator[SEP] identifier[Number] operator[SEP] operator[SEP] identifier[hms] , identifier[StringBuilder] identifier[appendable] operator[SEP] {
Keyword[int] identifier[startIndex] operator[=] operator[-] Other[1] operator[SEP] Keyword[int] ide... |
public static String getHttpMethod(Span span) {
if (isHttp(span)) {
BinaryAnnotation ba = span.getBinaryAnnotation("http.method");
String httpMethod = null;
if (ba != null) {
httpMethod = ba.getValue().toUpperCase();
} else if (span.getName() != nu... | class class_name[name] begin[{]
method[getHttpMethod, return_type[type[String]], modifier[public static], parameter[span]] begin[{]
if[call[.isHttp, parameter[member[.span]]]] begin[{]
local_variable[type[BinaryAnnotation], ba]
local_variable[type[String], httpMethod]
... | Keyword[public] Keyword[static] identifier[String] identifier[getHttpMethod] operator[SEP] identifier[Span] identifier[span] operator[SEP] {
Keyword[if] operator[SEP] identifier[isHttp] operator[SEP] identifier[span] operator[SEP] operator[SEP] {
identifier[BinaryAnnotation] identifier[ba] operator[=]... |
public static FileStatus[] listStatus(FileSystem fs, Path f, int depth)
throws IOException {
if (null == f) {
throw new IllegalArgumentException("Path cannot be null.");
}
if (null == fs) {
throw new IllegalArgumentException("File system cannot be null.");
}
if (depth < 0) {
... | class class_name[name] begin[{]
method[listStatus, return_type[type[FileStatus]], modifier[public static], parameter[fs, f, depth]] begin[{]
if[binary_operation[literal[null], ==, member[.f]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], p... | Keyword[public] Keyword[static] identifier[FileStatus] operator[SEP] operator[SEP] identifier[listStatus] operator[SEP] identifier[FileSystem] identifier[fs] , identifier[Path] identifier[f] , Keyword[int] identifier[depth] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] Other... |
public static boolean rewritePointObsDataset(String fileIn, String fileOut, boolean inMemory) throws IOException {
System.out.println("Rewrite2 .nc files from " + fileIn + " to " + fileOut + " inMemory= " + inMemory);
long start = System.currentTimeMillis();
// do it in memory for speed
NetcdfFile ncf... | class class_name[name] begin[{]
method[rewritePointObsDataset, return_type[type[boolean]], modifier[public static], parameter[fileIn, fileOut, inMemory]] begin[{]
call[System.out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["Rew... | Keyword[public] Keyword[static] Keyword[boolean] identifier[rewritePointObsDataset] operator[SEP] identifier[String] identifier[fileIn] , identifier[String] identifier[fileOut] , Keyword[boolean] identifier[inMemory] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[System] operator[SEP] ident... |
public static GJChronology getInstance(
DateTimeZone zone,
ReadableInstant gregorianCutover,
int minDaysInFirstWeek) {
zone = DateTimeUtils.getZone(zone);
Instant cutoverInstant;
if (gregorianCutover == null) {
cutoverInstant = DEFAULT_CUT... | class class_name[name] begin[{]
method[getInstance, return_type[type[GJChronology]], modifier[public static], parameter[zone, gregorianCutover, minDaysInFirstWeek]] begin[{]
assign[member[.zone], call[DateTimeUtils.getZone, parameter[member[.zone]]]]
local_variable[type[Instant], cutove... | Keyword[public] Keyword[static] identifier[GJChronology] identifier[getInstance] operator[SEP] identifier[DateTimeZone] identifier[zone] , identifier[ReadableInstant] identifier[gregorianCutover] , Keyword[int] identifier[minDaysInFirstWeek] operator[SEP] {
identifier[zone] operator[=] identifier[DateTimeUtils... |
public com.google.api.Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder(
int index) {
return producerDestinations_.get(index);
} | class class_name[name] begin[{]
method[getProducerDestinationsOrBuilder, return_type[type[com]], modifier[public], parameter[index]] begin[{]
return[call[producerDestinations_.get, parameter[member[.index]]]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[Logging] operator[SEP] identifier[LoggingDestinationOrBuilder] identifier[getProducerDestinationsOrBuilder] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[return] identifi... |
private void disconnect(final Handler<AsyncResult<Void>> doneHandler) {
eventBus.sendWithTimeout(inAddress, new JsonObject().putString("action", "disconnect"), 5000, new Handler<AsyncResult<Message<Boolean>>>() {
@Override
public void handle(AsyncResult<Message<Boolean>> result) {
if (result.fai... | class class_name[name] begin[{]
method[disconnect, return_type[void], modifier[private], parameter[doneHandler]] begin[{]
call[eventBus.sendWithTimeout, parameter[member[.inAddress], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[]... | Keyword[private] Keyword[void] identifier[disconnect] operator[SEP] Keyword[final] identifier[Handler] operator[<] identifier[AsyncResult] operator[<] identifier[Void] operator[>] operator[>] identifier[doneHandler] operator[SEP] {
identifier[eventBus] operator[SEP] identifier[sendWithTimeout] operator[SEP] iden... |
public void setInput(long seed, final double[] data) {
// Log.info("Data: " + ArrayUtils.toString(data));
assert(_dinfo != null);
double [] nums = MemoryManager.malloc8d(_dinfo._nums); // a bit wasteful - reallocated each time
int [] cats = MemoryManager.malloc4(_dinfo._cats); // a bit wastefu... | class class_name[name] begin[{]
method[setInput, return_type[void], modifier[public], parameter[seed, data]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=_dinfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operator... | Keyword[public] Keyword[void] identifier[setInput] operator[SEP] Keyword[long] identifier[seed] , Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[data] operator[SEP] {
Keyword[assert] operator[SEP] identifier[_dinfo] operator[!=] Other[null] operator[SEP] operator[SEP] Keyword[double] oper... |
public boolean waitForCondition(Condition condition, final int timeout){
if(config.commandLogging){
Log.d(config.commandLoggingTag, "waitForCondition("+condition+","+timeout+")");
}
return waiter.waitForCondition(condition, timeout);
} | class class_name[name] begin[{]
method[waitForCondition, return_type[type[boolean]], modifier[public], parameter[condition, timeout]] begin[{]
if[member[config.commandLogging]] begin[{]
call[Log.d, parameter[member[config.commandLoggingTag], binary_operation[binary_opera... | Keyword[public] Keyword[boolean] identifier[waitForCondition] operator[SEP] identifier[Condition] identifier[condition] , Keyword[final] Keyword[int] identifier[timeout] operator[SEP] {
Keyword[if] operator[SEP] identifier[config] operator[SEP] identifier[commandLogging] operator[SEP] {
identifier[Lo... |
@Override
protected Widget createChild(final GVRContext context,
GVRSceneObject sceneObjectChild) throws InstantiationException {
return super.createChild(context, sceneObjectChild);
} | class class_name[name] begin[{]
method[createChild, return_type[type[Widget]], modifier[protected], parameter[context, sceneObjectChild]] begin[{]
return[SuperMethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReferenc... | annotation[@] identifier[Override] Keyword[protected] identifier[Widget] identifier[createChild] operator[SEP] Keyword[final] identifier[GVRContext] identifier[context] , identifier[GVRSceneObject] identifier[sceneObjectChild] operator[SEP] Keyword[throws] identifier[InstantiationException] {
Keyword[return] Ke... |
private void initialize(final Reader xmlFileStream) {
// Build a DOM model.
final Document parsedDocument = XsdGeneratorHelper.parseXmlStream(xmlFileStream);
// Process the DOM model.
XsdGeneratorHelper.process(parsedDocument.getFirstChild(), true, new NamespaceAttributeNodeProce... | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[private], parameter[xmlFileStream]] begin[{]
local_variable[type[Document], parsedDocument]
call[XsdGeneratorHelper.process, parameter[call[parsedDocument.getFirstChild, parameter[]], literal[true], ClassCrea... | Keyword[private] Keyword[void] identifier[initialize] operator[SEP] Keyword[final] identifier[Reader] identifier[xmlFileStream] operator[SEP] {
Keyword[final] identifier[Document] identifier[parsedDocument] operator[=] identifier[XsdGeneratorHelper] operator[SEP] identifier[parseXmlStream] operator[SEP] identifi... |
public static void copyFromFileToFile(File source, File dest) throws IOException{
try {
FileInputStream in = new FileInputStream(source);
FileOutputStream out = new FileOutputStream(dest);
try {
FileChannel canalFuente = in.getChannel();
FileChannel canalDestino = out.getChannel();
canalFu... | class class_name[name] begin[{]
method[copyFromFileToFile, return_type[void], modifier[public static], parameter[source, dest]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member... | Keyword[public] Keyword[static] Keyword[void] identifier[copyFromFileToFile] operator[SEP] identifier[File] identifier[source] , identifier[File] identifier[dest] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
identifier[FileInputStream] identifier[in] operator[=] Keyword[new]... |
public Object getAttribute(String key, Object defaultValue)
{
Object attributeValue = getUserAttribute(key, null);
if (attributeValue != null)
return attributeValue;
attributeValue = getSessionAttribute(key, null);
if (attributeValue != null)
return attributeV... | class class_name[name] begin[{]
method[getAttribute, return_type[type[Object]], modifier[public], parameter[key, defaultValue]] begin[{]
local_variable[type[Object], attributeValue]
if[binary_operation[member[.attributeValue], !=, literal[null]]] begin[{]
return[member[.attributeValue]]... | Keyword[public] identifier[Object] identifier[getAttribute] operator[SEP] identifier[String] identifier[key] , identifier[Object] identifier[defaultValue] operator[SEP] {
identifier[Object] identifier[attributeValue] operator[=] identifier[getUserAttribute] operator[SEP] identifier[key] , Other[null] operator[... |
public ProviderEndPoint getEndPoint()
{
if (mode != PropertiesType.HOST_PORT)
{
throw new SIErrorException(
nls.getFormattedMessage("INVALID_METHOD_FOR_OBJECT_TYPE_SICO0006", null, "INVALID_METHOD_FOR_OBJECT_TYPE_SICO0006") // D270373
);
}
return endPoint... | class class_name[name] begin[{]
method[getEndPoint, return_type[type[ProviderEndPoint]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.mode], !=, member[PropertiesType.HOST_PORT]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(argu... | Keyword[public] identifier[ProviderEndPoint] identifier[getEndPoint] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[mode] operator[!=] identifier[PropertiesType] operator[SEP] identifier[HOST_PORT] operator[SEP] {
Keyword[throw] Keyword[new] identifier[SIErrorException] operator[SE... |
private void addTileCollisions(MapTileCollision mapCollision, TileCollision tileCollision, Tile tile)
{
final TileRef ref = new TileRef(tile);
for (final CollisionGroup collision : mapCollision.getCollisionGroups())
{
final Collection<TileRef> group = mapGroup.getGroup(colli... | class class_name[name] begin[{]
method[addTileCollisions, return_type[void], modifier[private], parameter[mapCollision, tileCollision, tile]] begin[{]
local_variable[type[TileRef], ref]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators... | Keyword[private] Keyword[void] identifier[addTileCollisions] operator[SEP] identifier[MapTileCollision] identifier[mapCollision] , identifier[TileCollision] identifier[tileCollision] , identifier[Tile] identifier[tile] operator[SEP] {
Keyword[final] identifier[TileRef] identifier[ref] operator[=] Keyword[new] ... |
public DescribeMatchmakingConfigurationsResult withConfigurations(MatchmakingConfiguration... configurations) {
if (this.configurations == null) {
setConfigurations(new java.util.ArrayList<MatchmakingConfiguration>(configurations.length));
}
for (MatchmakingConfiguration ele : config... | class class_name[name] begin[{]
method[withConfigurations, return_type[type[DescribeMatchmakingConfigurationsResult]], modifier[public], parameter[configurations]] begin[{]
if[binary_operation[THIS[member[None.configurations]], ==, literal[null]]] begin[{]
call[.setConfi... | Keyword[public] identifier[DescribeMatchmakingConfigurationsResult] identifier[withConfigurations] operator[SEP] identifier[MatchmakingConfiguration] operator[...] identifier[configurations] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[configurations] operator[==] Other[null] ... |
private boolean doVisitChildren(VisitContext context, boolean visitRows) {
// Just need to check whether there are any ids under this
// subtree. Make sure row index is cleared out since
// getSubtreeIdsToVisit() needs our row-less client id.
if (visitRows) {
setRowIndex(-... | class class_name[name] begin[{]
method[doVisitChildren, return_type[type[boolean]], modifier[private], parameter[context, visitRows]] begin[{]
if[member[.visitRows]] begin[{]
call[.setRowIndex, parameter[literal[1]]]
else begin[{]
None
end[}]
loca... | Keyword[private] Keyword[boolean] identifier[doVisitChildren] operator[SEP] identifier[VisitContext] identifier[context] , Keyword[boolean] identifier[visitRows] operator[SEP] {
Keyword[if] operator[SEP] identifier[visitRows] operator[SEP] {
identifier[setRowIndex] operator[SEP] operator[-] Other[1] ... |
protected E getSelectedEnumFromRadioButtons()
{
for (final E enumValue : this.radioButtonMap.keySet())
{
final JRadioButton btn = this.radioButtonMap.get(enumValue);
if (btn.isSelected())
{
return enumValue;
}
}
return null;
} | class class_name[name] begin[{]
method[getSelectedEnumFromRadioButtons, return_type[type[E]], modifier[protected], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(post... | Keyword[protected] identifier[E] identifier[getSelectedEnumFromRadioButtons] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[final] identifier[E] identifier[enumValue] operator[:] Keyword[this] operator[SEP] identifier[radioButtonMap] operator[SEP] identifier[keySet] operator[SEP] operator[SEP]... |
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "SphericalCS", substitutionHeadNamespace = "http://www.opengis.net/gml", substitutionHeadName = "_CoordinateSystem")
public JAXBElement<SphericalCSType> createSphericalCS(SphericalCSType value) {
return new JAXBElement<SphericalCSType>(_Spheri... | class class_name[name] begin[{]
method[createSphericalCS, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_SphericalCS_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_o... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] iden... |
@Override
public void renewToken() {
CreateTokenRequest createTokenRequest = new CreateTokenRequest();
createTokenRequest.setUser(credentials.getUserName());
createTokenRequest.setPassword(credentials.getPassword());
CreateTokenResponse createTokenResponse;
try {
createTokenResponse = send(createTokenReq... | class class_name[name] begin[{]
method[renewToken, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[CreateTokenRequest], createTokenRequest]
call[createTokenRequest.setUser, parameter[call[credentials.getUserName, parameter[]]]]
call[createT... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[renewToken] operator[SEP] operator[SEP] {
identifier[CreateTokenRequest] identifier[createTokenRequest] operator[=] Keyword[new] identifier[CreateTokenRequest] operator[SEP] operator[SEP] operator[SEP] identifier[createTokenRequest] oper... |
void writeBootstrapMethods() {
int alenIdx = writeAttr(names.BootstrapMethods);
databuf.appendChar(bootstrapMethods.size());
for (Map.Entry<DynamicMethod, MethodHandle> entry : bootstrapMethods.entrySet()) {
DynamicMethod dmeth = entry.getKey();
DynamicMethodSymbol dsym =... | class class_name[name] begin[{]
method[writeBootstrapMethods, return_type[void], modifier[default], parameter[]] begin[{]
local_variable[type[int], alenIdx]
call[databuf.appendChar, parameter[call[bootstrapMethods.size, parameter[]]]]
ForStatement(body=BlockStatement(label=None,... | Keyword[void] identifier[writeBootstrapMethods] operator[SEP] operator[SEP] {
Keyword[int] identifier[alenIdx] operator[=] identifier[writeAttr] operator[SEP] identifier[names] operator[SEP] identifier[BootstrapMethods] operator[SEP] operator[SEP] identifier[databuf] operator[SEP] identifier[appendChar] operator... |
int grabFlowControlBytes(int bytesToGrab) {
if(bytesToGrab <= 0) {
return 0;
}
int min;
synchronized (flowControlLock) {
min = (int) Math.min(bytesToGrab, sendWindowSize);
if (bytesToGrab > FLOW_CONTROL_MIN_WINDOW && min <= FLOW_CONTROL_MIN_WINDOW) {
... | class class_name[name] begin[{]
method[grabFlowControlBytes, return_type[type[int]], modifier[default], parameter[bytesToGrab]] begin[{]
if[binary_operation[member[.bytesToGrab], <=, literal[0]]] begin[{]
return[literal[0]]
else begin[{]
None
end[}]
local_var... | Keyword[int] identifier[grabFlowControlBytes] operator[SEP] Keyword[int] identifier[bytesToGrab] operator[SEP] {
Keyword[if] operator[SEP] identifier[bytesToGrab] operator[<=] Other[0] operator[SEP] {
Keyword[return] Other[0] operator[SEP]
}
Keyword[int] identifier[min] operator[SEP] Key... |
private int computeMaxRows(Method method) {
Class returnType = method.getReturnType();
final boolean isArray = returnType.isArray();
final boolean isRowSet = returnType.equals(RowSet.class);
int maxSet = _maxRows;
if (isArray && _maxArray != JdbcControl.MAXROWS_ALL) {
... | class class_name[name] begin[{]
method[computeMaxRows, return_type[type[int]], modifier[private], parameter[method]] begin[{]
local_variable[type[Class], returnType]
local_variable[type[boolean], isArray]
local_variable[type[boolean], isRowSet]
local_variable[type[int], maxSet]
... | Keyword[private] Keyword[int] identifier[computeMaxRows] operator[SEP] identifier[Method] identifier[method] operator[SEP] {
identifier[Class] identifier[returnType] operator[=] identifier[method] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] id... |
public void deleteSeen(SITransaction transaction)
throws SISessionUnavailableException, SISessionDroppedException,
SIConnectionUnavailableException, SIConnectionDroppedException,
SIResourceException, SIConnectionLostException, SILimitExceededException,
SIIncorrectCallExcepti... | class class_name[name] begin[{]
method[deleteSeen, return_type[void], modifier[public], parameter[transaction]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[THIS[],... | Keyword[public] Keyword[void] identifier[deleteSeen] operator[SEP] identifier[SITransaction] identifier[transaction] operator[SEP] Keyword[throws] identifier[SISessionUnavailableException] , identifier[SISessionDroppedException] , identifier[SIConnectionUnavailableException] , identifier[SIConnectionDroppedException... |
@Deprecated
public static List<StringToNodeCollection> getTranslatableStringsV1(final Document xml, final boolean allowDuplicates) {
if (xml == null) return null;
final List<StringToNodeCollection> retValue = new ArrayList<StringToNodeCollection>();
final NodeList nodes = xml.getDocumentEl... | class class_name[name] begin[{]
method[getTranslatableStringsV1, return_type[type[List]], modifier[public static], parameter[xml, allowDuplicates]] begin[{]
if[binary_operation[member[.xml], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
loc... | annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[List] operator[<] identifier[StringToNodeCollection] operator[>] identifier[getTranslatableStringsV1] operator[SEP] Keyword[final] identifier[Document] identifier[xml] , Keyword[final] Keyword[boolean] identifier[allowDuplicates] operator[... |
public IfcChangeActionEnum createIfcChangeActionEnumFromString(EDataType eDataType, String initialValue) {
IfcChangeActionEnum result = IfcChangeActionEnum.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eData... | class class_name[name] begin[{]
method[createIfcChangeActionEnumFromString, return_type[type[IfcChangeActionEnum]], modifier[public], parameter[eDataType, initialValue]] begin[{]
local_variable[type[IfcChangeActionEnum], result]
if[binary_operation[member[.result], ==, literal[null]]] b... | Keyword[public] identifier[IfcChangeActionEnum] identifier[createIfcChangeActionEnumFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] {
identifier[IfcChangeActionEnum] identifier[result] operator[=] identifier[IfcChangeActionEnum] o... |
@Override
public double distance(NumberVector v1, NumberVector v2) {
return 1 - Math.abs(PearsonCorrelation.coefficient(v1, v2));
} | class class_name[name] begin[{]
method[distance, return_type[type[double]], modifier[public], parameter[v1, v2]] begin[{]
return[binary_operation[literal[1], -, call[Math.abs, parameter[call[PearsonCorrelation.coefficient, parameter[member[.v1], member[.v2]]]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[double] identifier[distance] operator[SEP] identifier[NumberVector] identifier[v1] , identifier[NumberVector] identifier[v2] operator[SEP] {
Keyword[return] Other[1] operator[-] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[Pea... |
public void setFeature(String name, boolean state) throws IllegalArgumentException, IllegalStateException {
if (name == null) {
throw new IllegalArgumentException("feature name can not be null");
}
if (FEATURE_NAMES_INTERNED.equals(name)) {
namesInterned = state;
} else if (FEATURE_SERIALIZER_ATTVALUE_USE... | class class_name[name] begin[{]
method[setFeature, return_type[void], modifier[public], parameter[name, state]] begin[{]
if[binary_operation[member[.name], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[... | Keyword[public] Keyword[void] identifier[setFeature] operator[SEP] identifier[String] identifier[name] , Keyword[boolean] identifier[state] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] , identifier[IllegalStateException] {
Keyword[if] operator[SEP] identifier[name] operator[==] Other[null... |
private void sendContinuousReplicationChanges(Map<String, Object> activity) {
try {
String jsonString = Manager.getObjectMapper().writeValueAsString(activity);
if (callbackBlock != null) {
byte[] json = (jsonString + '\n').getBytes();
OutputStream os = con... | class class_name[name] begin[{]
method[sendContinuousReplicationChanges, return_type[void], modifier[private], parameter[activity]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getO... | Keyword[private] Keyword[void] identifier[sendContinuousReplicationChanges] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[activity] operator[SEP] {
Keyword[try] {
identifier[String] identifier[jsonString] operator[=] identifier[Manager] opera... |
@Override
public void removeHandler(Handler handler)
{
synchronized (this) {
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (loader == null) {
loader = _systemClassLoader;
}
for (int i = _loaders.size() - 1; i >= 0; i--) {
WeakReference<Cl... | class class_name[name] begin[{]
method[removeHandler, return_type[void], modifier[public], parameter[handler]] begin[{]
SYNCHRONIZED[THIS[]] BEGIN[{]
local_variable[type[ClassLoader], loader]
if[binary_operation[member[.loader], ==, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeHandler] operator[SEP] identifier[Handler] identifier[handler] operator[SEP] {
Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] {
identifier[ClassLoader] identifier[loader] operator[=] identifier[Thread] o... |
public int disconnect(int v) {
Set<T> types = edges.remove(v);
if (types != null) {
int edges = types.size();
size -= edges;
return edges;
}
return 0;
} | class class_name[name] begin[{]
method[disconnect, return_type[type[int]], modifier[public], parameter[v]] begin[{]
local_variable[type[Set], types]
if[binary_operation[member[.types], !=, literal[null]]] begin[{]
local_variable[type[int], edges]
assi... | Keyword[public] Keyword[int] identifier[disconnect] operator[SEP] Keyword[int] identifier[v] operator[SEP] {
identifier[Set] operator[<] identifier[T] operator[>] identifier[types] operator[=] identifier[edges] operator[SEP] identifier[remove] operator[SEP] identifier[v] operator[SEP] operator[SEP] Keyword[if] o... |
public static <A, B> Generator<PMatrix3x3D<A, B>> createNormal()
{
return new PMatrix3x3DGenerator<>(PrimitiveGenerators.doubles(
GeneratorConstants.BOUND_NORMAL_DOUBLE_LOWER,
GeneratorConstants.BOUND_NORMAL_DOUBLE_UPPER
));
} | class class_name[name] begin[{]
method[createNormal, return_type[type[Generator]], modifier[public static], parameter[]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=BOUND_NORMAL_DOUBLE_LOWER, postfix_operators=[], prefix_operators=[], qualifier=GeneratorCo... | Keyword[public] Keyword[static] operator[<] identifier[A] , identifier[B] operator[>] identifier[Generator] operator[<] identifier[PMatrix3x3D] operator[<] identifier[A] , identifier[B] operator[>] operator[>] identifier[createNormal] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[PMatri... |
@Override
public void setRollbackOnly() {
Optional<LocalTransactionContext> txContext = currentTxContext();
if (txContext.isPresent()) {
txContext.get().setRollbackOnly();
} else {
this.unmanagedTransaction.ifPresent(LocalTransactionContext::setRollbackOnly);
}
} | class class_name[name] begin[{]
method[setRollbackOnly, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[Optional], txContext]
if[call[txContext.isPresent, parameter[]]] begin[{]
call[txContext.get, parameter[]]
else begin[{]... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setRollbackOnly] operator[SEP] operator[SEP] {
identifier[Optional] operator[<] identifier[LocalTransactionContext] operator[>] identifier[txContext] operator[=] identifier[currentTxContext] operator[SEP] operator[SEP] operator[SEP] Keyw... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.