code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
@Override
public final T fromString(final Map<String, Object> pAddParam,
final String pStrVal) throws Exception {
if (pStrVal == null || "".equals(pStrVal)) {
return null;
}
T object = this.objectClass.newInstance();
for (String fldValStr : pStrVal.split(",")) {
int eqIdx = fldValStr.i... | class class_name[name] begin[{]
method[fromString, return_type[type[T]], modifier[final public], parameter[pAddParam, pStrVal]] begin[{]
if[binary_operation[binary_operation[member[.pStrVal], ==, literal[null]], ||, literal[""]]] begin[{]
return[literal[null]]
else begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[T] identifier[fromString] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[String] identifier[pStrVal] operator[SEP] Keyword[throws... |
public static String getIfCacheNotNull(EntityColumn column, String contents) {
StringBuilder sql = new StringBuilder();
sql.append("<if test=\"").append(column.getProperty()).append("_cache != null\">");
sql.append(contents);
sql.append("</if>");
return sql.toString();
} | class class_name[name] begin[{]
method[getIfCacheNotNull, return_type[type[String]], modifier[public static], parameter[column, contents]] begin[{]
local_variable[type[StringBuilder], sql]
call[sql.append, parameter[literal["<if test=\""]]]
call[sql.append, parameter[mem... | Keyword[public] Keyword[static] identifier[String] identifier[getIfCacheNotNull] operator[SEP] identifier[EntityColumn] identifier[column] , identifier[String] identifier[contents] operator[SEP] {
identifier[StringBuilder] identifier[sql] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator... |
@Override
public void resolve(final ValueStack values) throws Exception
{
if (values.size() < 2)
throw new Exception("missing operands for " + toString());
try
{
final double multiplier = Math.pow(10, values.popDouble());
values.push(new Double(Math.ro... | class class_name[name] begin[{]
method[resolve, return_type[void], modifier[public], parameter[values]] begin[{]
if[binary_operation[call[values.size, parameter[]], <, literal[2]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], ... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[resolve] operator[SEP] Keyword[final] identifier[ValueStack] identifier[values] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP]... |
public Config setProperty(String name, String value) {
properties.put(name, value);
return this;
} | class class_name[name] begin[{]
method[setProperty, return_type[type[Config]], modifier[public], parameter[name, value]] begin[{]
call[properties.put, parameter[member[.name], member[.value]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[Config] identifier[setProperty] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] {
identifier[properties] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] Keyword[return]... |
public boolean isAllowedCachedLeft(final ContextEntry[] context,
final InternalFactHandle handle) {
return (indexed[0] || constraints[0].isAllowedCachedLeft(context[0], handle)) &&
(indexed[1] || constraints[1].isAllowedCachedLeft(context[1], handle)) &&
... | class class_name[name] begin[{]
method[isAllowedCachedLeft, return_type[type[boolean]], modifier[public], parameter[context, handle]] begin[{]
return[binary_operation[binary_operation[binary_operation[member[.indexed], ||, member[.constraints]], &&, binary_operation[member[.indexed], ||, member[.constr... | Keyword[public] Keyword[boolean] identifier[isAllowedCachedLeft] operator[SEP] Keyword[final] identifier[ContextEntry] operator[SEP] operator[SEP] identifier[context] , Keyword[final] identifier[InternalFactHandle] identifier[handle] operator[SEP] {
Keyword[return] operator[SEP] identifier[indexed] operator[SEP... |
void changeBackgroundAlpha() {
Drawable background = getBackground();
if (background != null) {
int newAlpha = (int) (ONE_HUNDRED * (1 - getVerticalDragOffset()));
background.setAlpha(newAlpha);
}
} | class class_name[name] begin[{]
method[changeBackgroundAlpha, return_type[void], modifier[default], parameter[]] begin[{]
local_variable[type[Drawable], background]
if[binary_operation[member[.background], !=, literal[null]]] begin[{]
local_variable[type[int], newAlpha]
... | Keyword[void] identifier[changeBackgroundAlpha] operator[SEP] operator[SEP] {
identifier[Drawable] identifier[background] operator[=] identifier[getBackground] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[background] operator[!=] Other[null] operator[SEP] {
Keyword[in... |
public static int damerauLevenshteinDistanceCaseInsensitive(String str1, String str2) {
return damerauLevenshteinDistance(str1.toLowerCase(), str2.toLowerCase());
} | class class_name[name] begin[{]
method[damerauLevenshteinDistanceCaseInsensitive, return_type[type[int]], modifier[public static], parameter[str1, str2]] begin[{]
return[call[.damerauLevenshteinDistance, parameter[call[str1.toLowerCase, parameter[]], call[str2.toLowerCase, parameter[]]]]]
end[}]
EN... | Keyword[public] Keyword[static] Keyword[int] identifier[damerauLevenshteinDistanceCaseInsensitive] operator[SEP] identifier[String] identifier[str1] , identifier[String] identifier[str2] operator[SEP] {
Keyword[return] identifier[damerauLevenshteinDistance] operator[SEP] identifier[str1] operator[SEP] identifie... |
@Contract(pure = true)
@NotNull
public static Promise<Void> all(@NotNull List<? extends Promise<?>> promises) {
int size = promises.size();
if (size == 0) return Promise.complete();
if (size == 1) return promises.get(0).toVoid();
if (size == 2) return promises.get(0).both(promises.get(1));
return all(promis... | class class_name[name] begin[{]
method[all, return_type[type[Promise]], modifier[public static], parameter[promises]] begin[{]
local_variable[type[int], size]
if[binary_operation[member[.size], ==, literal[0]]] begin[{]
return[call[Promise.complete, parameter[]]]
else begin[{]
N... | annotation[@] identifier[Contract] operator[SEP] identifier[pure] operator[=] literal[boolean] operator[SEP] annotation[@] identifier[NotNull] Keyword[public] Keyword[static] identifier[Promise] operator[<] identifier[Void] operator[>] identifier[all] operator[SEP] annotation[@] identifier[NotNull] identifier[List] ope... |
public Workflow getWorkflow(String workflowId, boolean includeTasks) {
Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank");
Workflow workflow = getForEntity("workflow/{workflowId}", new Object[]{"includeTasks", includeTasks}, Workflow.class, workflowId);
... | class class_name[name] begin[{]
method[getWorkflow, return_type[type[Workflow]], modifier[public], parameter[workflowId, includeTasks]] begin[{]
call[Preconditions.checkArgument, parameter[call[StringUtils.isNotBlank, parameter[member[.workflowId]]], literal["workflow id cannot be blank"]]]
... | Keyword[public] identifier[Workflow] identifier[getWorkflow] operator[SEP] identifier[String] identifier[workflowId] , Keyword[boolean] identifier[includeTasks] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotB... |
public static Resource createResource(String resourcePath) throws IOException {
if (resourcePath.startsWith(ResourceUtils.CLASSPATH_URL_PREFIX)) {
return Resource.newClassPathResource(resourcePath.substring(ResourceUtils.CLASSPATH_URL_PREFIX.length()));
} else if (resourcePath.startsWith(ResourceUtils.FIL... | class class_name[name] begin[{]
method[createResource, return_type[type[Resource]], modifier[public static], parameter[resourcePath]] begin[{]
if[call[resourcePath.startsWith, parameter[member[ResourceUtils.CLASSPATH_URL_PREFIX]]]] begin[{]
return[call[Resource.newClassPathResource,... | Keyword[public] Keyword[static] identifier[Resource] identifier[createResource] operator[SEP] identifier[String] identifier[resourcePath] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[resourcePath] operator[SEP] identifier[startsWith] operator[SEP] identifier[Resour... |
ByteBuffer readView(int position)
{
ByteBuffer bb = content.duplicate().asReadOnlyBuffer();
bb.position(position);
return bb;
} | class class_name[name] begin[{]
method[readView, return_type[type[ByteBuffer]], modifier[default], parameter[position]] begin[{]
local_variable[type[ByteBuffer], bb]
call[bb.position, parameter[member[.position]]]
return[member[.bb]]
end[}]
END[}] | identifier[ByteBuffer] identifier[readView] operator[SEP] Keyword[int] identifier[position] operator[SEP] {
identifier[ByteBuffer] identifier[bb] operator[=] identifier[content] operator[SEP] identifier[duplicate] operator[SEP] operator[SEP] operator[SEP] identifier[asReadOnlyBuffer] operator[SEP] operator[SEP] ... |
synchronized public void set(Element value) {
int bind = ((int)value.getIndex() & Integer.MAX_VALUE) % buckets.length;
Element[] bucket = buckets[bind];
int count = counts[bind];
if (bucket == null)
buckets[bind] = bucket = new Element[initBucketSize];
else if (bucket.length == count) {
... | class class_name[name] begin[{]
method[set, return_type[void], modifier[synchronized public], parameter[value]] begin[{]
local_variable[type[int], bind]
local_variable[type[Element], bucket]
local_variable[type[int], count]
if[binary_operation[member[.bucket], ==, litera... | Keyword[synchronized] Keyword[public] Keyword[void] identifier[set] operator[SEP] identifier[Element] identifier[value] operator[SEP] {
Keyword[int] identifier[bind] operator[=] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[value] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP]... |
public List<Double> getOffsetsInTimeUnits() {
double start = firstDate.getMillis();
List<Double> result = new ArrayList<>(runtimes.length);
for (int idx=0; idx<runtimes.length; idx++) {
double runtime = (double) getRuntime(idx);
double msecs = (runtime - start);
result.add(msecs / timeUni... | class class_name[name] begin[{]
method[getOffsetsInTimeUnits, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[double], start]
local_variable[type[List], result]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotat... | Keyword[public] identifier[List] operator[<] identifier[Double] operator[>] identifier[getOffsetsInTimeUnits] operator[SEP] operator[SEP] {
Keyword[double] identifier[start] operator[=] identifier[firstDate] operator[SEP] identifier[getMillis] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<... |
private int expandCompositChar(char[] dest,
int start,
int length,
int lacount,
int shapingMode) throws ArabicShapingException {
int lenOptionsLamAlef = options & LAMALEF_MASK;
int le... | class class_name[name] begin[{]
method[expandCompositChar, return_type[type[int]], modifier[private], parameter[dest, start, length, lacount, shapingMode]] begin[{]
local_variable[type[int], lenOptionsLamAlef]
local_variable[type[int], lenOptionsSeen]
local_variable[type[int], lenOption... | Keyword[private] Keyword[int] identifier[expandCompositChar] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[dest] , Keyword[int] identifier[start] , Keyword[int] identifier[length] , Keyword[int] identifier[lacount] , Keyword[int] identifier[shapingMode] operator[SEP] Keyword[throws] identifier[... |
public void setSupportedEndpointTypes(java.util.Collection<SupportedEndpointType> supportedEndpointTypes) {
if (supportedEndpointTypes == null) {
this.supportedEndpointTypes = null;
return;
}
this.supportedEndpointTypes = new java.util.ArrayList<SupportedEndpointType>(su... | class class_name[name] begin[{]
method[setSupportedEndpointTypes, return_type[void], modifier[public], parameter[supportedEndpointTypes]] begin[{]
if[binary_operation[member[.supportedEndpointTypes], ==, literal[null]]] begin[{]
assign[THIS[member[None.supportedEndpointT... | Keyword[public] Keyword[void] identifier[setSupportedEndpointTypes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[SupportedEndpointType] operator[>] identifier[supportedEndpointTypes] operator[SEP] {
Keyword[if] operator[SEP] identifier[... |
public static IndexChangeAdapter forEnumeratedProperty( ExecutionContext context,
NodeTypePredicate matcher,
String workspaceName,
Name prop... | class class_name[name] begin[{]
method[forEnumeratedProperty, return_type[type[IndexChangeAdapter]], modifier[public static], parameter[context, matcher, workspaceName, propertyName, index]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[... | Keyword[public] Keyword[static] identifier[IndexChangeAdapter] identifier[forEnumeratedProperty] operator[SEP] identifier[ExecutionContext] identifier[context] , identifier[NodeTypePredicate] identifier[matcher] , identifier[String] identifier[workspaceName] , identifier[Name] identifier[propertyName] , identifier[... |
@Nonnull
public static <T> EbInterfaceReader <T> create (@Nonnull final Class <T> aClass)
{
return new EbInterfaceReader <> (aClass);
} | class class_name[name] begin[{]
method[create, return_type[type[EbInterfaceReader]], modifier[public static], parameter[aClass]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=aClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_argu... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[EbInterfaceReader] operator[<] identifier[T] operator[>] identifier[create] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier... |
public JobExecutionResult execute(String job_name) throws Exception {
distributeFiles();
JobExecutionResult result = this.env.execute(job_name);
return result;
} | class class_name[name] begin[{]
method[execute, return_type[type[JobExecutionResult]], modifier[public], parameter[job_name]] begin[{]
call[.distributeFiles, parameter[]]
local_variable[type[JobExecutionResult], result]
return[member[.result]]
end[}]
END[}] | Keyword[public] identifier[JobExecutionResult] identifier[execute] operator[SEP] identifier[String] identifier[job_name] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[distributeFiles] operator[SEP] operator[SEP] operator[SEP] identifier[JobExecutionResult] identifier[result] operator[=] Keywor... |
public GeocoderAddressComponent getAddressComponent(AddressComponentType addressComponentType) {
for (GeocoderAddressComponent component : getPlace().getAddressComponents()) {
for (String type : component.getTypes()) {
if (addressComponentType.getName().equals(type)) {
... | class class_name[name] begin[{]
method[getAddressComponent, return_type[type[GeocoderAddressComponent]], modifier[public], parameter[addressComponentType]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Me... | Keyword[public] identifier[GeocoderAddressComponent] identifier[getAddressComponent] operator[SEP] identifier[AddressComponentType] identifier[addressComponentType] operator[SEP] {
Keyword[for] operator[SEP] identifier[GeocoderAddressComponent] identifier[component] operator[:] identifier[getPlace] operator[SEP... |
public static java.util.Date getDateTime(Object value) {
try {
return toDateTime(value);
} catch (ParseException pe) {
pe.printStackTrace();
return null;
}
} | class class_name[name] begin[{]
method[getDateTime, return_type[type[java]], modifier[public static], parameter[value]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]... | Keyword[public] Keyword[static] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Date] identifier[getDateTime] operator[SEP] identifier[Object] identifier[value] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[toDateTime] operator[SEP] identifier[value] operator[SEP] ... |
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();
if (null != params) {
this.serializer = params.getDefaultSerializer();
}
} | class class_name[name] begin[{]
method[readObject, return_type[void], modifier[private], parameter[in]] begin[{]
call[in.defaultReadObject, parameter[]]
if[binary_operation[literal[null], !=, member[.params]]] begin[{]
assign[THIS[member[None.serializer]]... | Keyword[private] Keyword[void] identifier[readObject] operator[SEP] identifier[ObjectInputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] {
identifier[in] operator[SEP] identifier[defaultReadObject] operator[SEP] operator[SEP] operator[SEP] Keywo... |
@Deprecated
protected int handleGetExtendedYear() {
// Ethiopic calendar uses EXTENDED_YEAR aligned to
// Amelete Mihret year always.
int eyear;
if (newerField(EXTENDED_YEAR, YEAR) == EXTENDED_YEAR) {
eyear = internalGet(EXTENDED_YEAR, 1); // Default to year 1
} e... | class class_name[name] begin[{]
method[handleGetExtendedYear, return_type[type[int]], modifier[protected], parameter[]] begin[{]
local_variable[type[int], eyear]
if[binary_operation[call[.newerField, parameter[member[.EXTENDED_YEAR], member[.YEAR]]], ==, member[.EXTENDED_YEAR]]] begin[{... | annotation[@] identifier[Deprecated] Keyword[protected] Keyword[int] identifier[handleGetExtendedYear] operator[SEP] operator[SEP] {
Keyword[int] identifier[eyear] operator[SEP] Keyword[if] operator[SEP] identifier[newerField] operator[SEP] identifier[EXTENDED_YEAR] , identifier[YEAR] operator[SEP] operator[==]... |
static String extractSimpleName(String fqcn, String separator) {
if (fqcn.contains(separator)) {
return fqcn.substring(fqcn.lastIndexOf(separator) + 1, fqcn.length());
} else {
return fqcn;
}
} | class class_name[name] begin[{]
method[extractSimpleName, return_type[type[String]], modifier[static], parameter[fqcn, separator]] begin[{]
if[call[fqcn.contains, parameter[member[.separator]]]] begin[{]
return[call[fqcn.substring, parameter[binary_operation[call[fqcn.lastIndexOf, p... | Keyword[static] identifier[String] identifier[extractSimpleName] operator[SEP] identifier[String] identifier[fqcn] , identifier[String] identifier[separator] operator[SEP] {
Keyword[if] operator[SEP] identifier[fqcn] operator[SEP] identifier[contains] operator[SEP] identifier[separator] operator[SEP] operator[S... |
private static ColumnCapabilities getEffectiveCapabilities(
DimensionSpec dimSpec,
@Nullable ColumnCapabilities capabilities
)
{
if (capabilities == null) {
capabilities = DEFAULT_STRING_CAPABILITIES;
}
// Complex dimension type is not supported
if (capabilities.getType() == Value... | class class_name[name] begin[{]
method[getEffectiveCapabilities, return_type[type[ColumnCapabilities]], modifier[private static], parameter[dimSpec, capabilities]] begin[{]
if[binary_operation[member[.capabilities], ==, literal[null]]] begin[{]
assign[member[.capabilitie... | Keyword[private] Keyword[static] identifier[ColumnCapabilities] identifier[getEffectiveCapabilities] operator[SEP] identifier[DimensionSpec] identifier[dimSpec] , annotation[@] identifier[Nullable] identifier[ColumnCapabilities] identifier[capabilities] operator[SEP] {
Keyword[if] operator[SEP] identifier[capab... |
public static List<CPOptionCategory> findByGroupId(long groupId, int start,
int end) {
return getPersistence().findByGroupId(groupId, start, end);
} | class class_name[name] begin[{]
method[findByGroupId, return_type[type[List]], modifier[public static], parameter[groupId, start, end]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CPOptionCategory] operator[>] identifier[findByGroupId] operator[SEP] Keyword[long] identifier[groupId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
Keyword[return] identifier[getPersistence] operator[SEP... |
public static void deleteIfExists(File file) throws IOException {
if (file.exists()) {
if (file.isFile()) {
if (!file.delete()) {
throw new IOException("Delete file failure,path:" + file.getAbsolutePath());
}
} else {
File[] files = file.listFiles();
if (files !... | class class_name[name] begin[{]
method[deleteIfExists, return_type[void], modifier[public static], parameter[file]] begin[{]
if[call[file.exists, parameter[]]] begin[{]
if[call[file.isFile, parameter[]]] begin[{]
if[call[file.delete, param... | Keyword[public] Keyword[static] Keyword[void] identifier[deleteIfExists] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] {
Keywo... |
public int compareTo(Version that) {
if (that == null) {
return 1;
}
if (major != that.major) {
return major - that.major;
}
if (minor != that.minor) {
return minor - that.minor;
}
if (bugfix != that.bugfix) {
return bugfix - that.bugfix;
}
if (build != t... | class class_name[name] begin[{]
method[compareTo, return_type[type[int]], modifier[public], parameter[that]] begin[{]
if[binary_operation[member[.that], ==, literal[null]]] begin[{]
return[literal[1]]
else begin[{]
None
end[}]
if[binary_operation[memb... | Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Version] identifier[that] operator[SEP] {
Keyword[if] operator[SEP] identifier[that] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[1] operator[SEP]
}
Keyword[if] operator[SEP] identifier[major] o... |
public void writeDefinition(final OutputStream result) throws IOException
{
result.write(OPEN_GROUP);
result.write(LIST_TABLE);
this.document.outputDebugLinebreak(result);
for(int i = 0; i < picturelists.size(); i++) {
RtfPictureList l = (RtfPictureList)picturelists... | class class_name[name] begin[{]
method[writeDefinition, return_type[void], modifier[public], parameter[result]] begin[{]
call[result.write, parameter[member[.OPEN_GROUP]]]
call[result.write, parameter[member[.LIST_TABLE]]]
THIS[member[None.document]call[None.outp... | Keyword[public] Keyword[void] identifier[writeDefinition] operator[SEP] Keyword[final] identifier[OutputStream] identifier[result] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[OPEN_GROUP] operator[SEP] operator[SEP] identifier... |
private static String getEncodedInstance(String encodedResponse) {
if (isReturnValue(encodedResponse) || isThrownException(encodedResponse)) {
return encodedResponse.substring(4);
}
return encodedResponse;
} | class class_name[name] begin[{]
method[getEncodedInstance, return_type[type[String]], modifier[private static], parameter[encodedResponse]] begin[{]
if[binary_operation[call[.isReturnValue, parameter[member[.encodedResponse]]], ||, call[.isThrownException, parameter[member[.encodedResponse]]]]]... | Keyword[private] Keyword[static] identifier[String] identifier[getEncodedInstance] operator[SEP] identifier[String] identifier[encodedResponse] operator[SEP] {
Keyword[if] operator[SEP] identifier[isReturnValue] operator[SEP] identifier[encodedResponse] operator[SEP] operator[||] identifier[isThrownException] op... |
@SuppressWarnings("unchecked")
protected Flash getFlashCookie(HttpServerExchange exchange) {
Flash flash = Flash.create();
final String cookieValue = getCookieValue(exchange, this.config.getFlashCookieName());
if (StringUtils.isNotBlank(cookieValue)) {
try {
... | class class_name[name] begin[{]
method[getFlashCookie, return_type[type[Flash]], modifier[protected], parameter[exchange]] begin[{]
local_variable[type[Flash], flash]
local_variable[type[String], cookieValue]
if[call[StringUtils.isNotBlank, parameter[member[.cookieValue]]]] begi... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[Flash] identifier[getFlashCookie] operator[SEP] identifier[HttpServerExchange] identifier[exchange] operator[SEP] {
identifier[Flash] identifier[flash] operator[=] identifier[Flash] operator[SEP] ... |
public static <T extends TypeDescription> ElementMatcher.Junction<T> isAnnotation() {
return new ModifierMatcher<T>(ModifierMatcher.Mode.ANNOTATION);
} | class class_name[name] begin[{]
method[isAnnotation, return_type[type[ElementMatcher]], modifier[public static], parameter[]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=ANNOTATION, postfix_operators=[], prefix_operators=[], qualifier=ModifierMatcher.Mode, selectors=[])], body=None, ... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[TypeDescription] operator[>] identifier[ElementMatcher] operator[SEP] identifier[Junction] operator[<] identifier[T] operator[>] identifier[isAnnotation] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[Mod... |
public void updateMode(ConnectionMode connectionMode) {
switch (connectionMode) {
case SEND_ONLY:
this.rtpHandler.setReceivable(false);
this.rtpHandler.setLoopable(false);
audioComponent.updateMode(false, true);
oobComponent.updateMode(... | class class_name[name] begin[{]
method[updateMode, return_type[void], modifier[public], parameter[connectionMode]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['SEND_ONLY'], statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors... | Keyword[public] Keyword[void] identifier[updateMode] operator[SEP] identifier[ConnectionMode] identifier[connectionMode] operator[SEP] {
Keyword[switch] operator[SEP] identifier[connectionMode] operator[SEP] {
Keyword[case] identifier[SEND_ONLY] operator[:] Keyword[this] operator[SEP] identifier[rtpH... |
public static String UUID( long lo, long hi ) {
long lo0 = (lo>>32)&0xFFFFFFFFL;
long lo1 = (lo>>16)&0xFFFFL;
long lo2 = (lo>> 0)&0xFFFFL;
long hi0 = (hi>>48)&0xFFFFL;
long hi1 = (hi>> 0)&0xFFFFFFFFFFFFL;
return String.format("%08X-%04X-%04X-%04X-%012X",lo0,lo1,lo2,hi0,hi1);
} | class class_name[name] begin[{]
method[UUID, return_type[type[String]], modifier[public static], parameter[lo, hi]] begin[{]
local_variable[type[long], lo0]
local_variable[type[long], lo1]
local_variable[type[long], lo2]
local_variable[type[long], hi0]
local_variable[typ... | Keyword[public] Keyword[static] identifier[String] identifier[UUID] operator[SEP] Keyword[long] identifier[lo] , Keyword[long] identifier[hi] operator[SEP] {
Keyword[long] identifier[lo0] operator[=] operator[SEP] identifier[lo] operator[>] operator[>] Other[32] operator[SEP] operator[&] literal[Integer] operat... |
public static boolean isPortAvailable(final int port) {
try (ServerSocket tcp = new ServerSocket(port);
DatagramSocket udp = new DatagramSocket(port)) {
return tcp.isBound() && udp.isBound();
} catch (Exception e) { //NOSONAR
return false;
}
} | class class_name[name] begin[{]
method[isPortAvailable, return_type[type[boolean]], modifier[public static], parameter[port]] begin[{]
TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isBound, postfix_operators=[], prefix_operators=[], qualif... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isPortAvailable] operator[SEP] Keyword[final] Keyword[int] identifier[port] operator[SEP] {
Keyword[try] operator[SEP] identifier[ServerSocket] identifier[tcp] operator[=] Keyword[new] identifier[ServerSocket] operator[SEP] identifier[port] operator[SEP... |
@Override
public DescribeSMBSettingsResult describeSMBSettings(DescribeSMBSettingsRequest request) {
request = beforeClientExecution(request);
return executeDescribeSMBSettings(request);
} | class class_name[name] begin[{]
method[describeSMBSettings, return_type[type[DescribeSMBSettingsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDescribeSMBSettings, parameter... | annotation[@] identifier[Override] Keyword[public] identifier[DescribeSMBSettingsResult] identifier[describeSMBSettings] operator[SEP] identifier[DescribeSMBSettingsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ope... |
static boolean
memequal(byte[] b1, byte[] b2, int len)
{
if(b1 == b2) return true;
if(b1 == null || b2 == null) return false;
if(b1.length < len || b2.length < len) return false;
for(int i = 0; i < len; i++) {
if(b1[i] != b2[i]) return false;
}
return ... | class class_name[name] begin[{]
method[memequal, return_type[type[boolean]], modifier[static], parameter[b1, b2, len]] begin[{]
if[binary_operation[member[.b1], ==, member[.b2]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
if[binary_operation[binary_... | Keyword[static] Keyword[boolean] identifier[memequal] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b1] , Keyword[byte] operator[SEP] operator[SEP] identifier[b2] , Keyword[int] identifier[len] operator[SEP] {
Keyword[if] operator[SEP] identifier[b1] operator[==] identifier[b2] operator[SE... |
public static void saveBmp(Bitmap src, String fileName) throws ImageSaveException {
try {
BitmapUtil.save(src, fileName);
} catch (IOException e) {
throw new ImageSaveException(e);
}
} | class class_name[name] begin[{]
method[saveBmp, return_type[void], modifier[public static], parameter[src, fileName]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]),... | Keyword[public] Keyword[static] Keyword[void] identifier[saveBmp] operator[SEP] identifier[Bitmap] identifier[src] , identifier[String] identifier[fileName] operator[SEP] Keyword[throws] identifier[ImageSaveException] {
Keyword[try] {
identifier[BitmapUtil] operator[SEP] identifier[save] operator[SEP... |
public boolean containsKey(Object key)
{
if (key==null)
return _nullEntry!=null;
return
getEntry(key.toString(),0,key==null?0:key.toString().length())!=null;
} | class class_name[name] begin[{]
method[containsKey, return_type[type[boolean]], modifier[public], parameter[key]] begin[{]
if[binary_operation[member[.key], ==, literal[null]]] begin[{]
return[binary_operation[member[._nullEntry], !=, literal[null]]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[boolean] identifier[containsKey] operator[SEP] identifier[Object] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] Keyword[return] identifier[_nullEntry] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[getEn... |
public void setController(@Nullable DraweeController draweeController) {
boolean wasAttached = mIsControllerAttached;
if (wasAttached) {
detachController();
}
// Clear the old controller
if (isControllerValid()) {
mEventTracker.recordEvent(Event.ON_CLEAR_OLD_CONTROLLER);
mControll... | class class_name[name] begin[{]
method[setController, return_type[void], modifier[public], parameter[draweeController]] begin[{]
local_variable[type[boolean], wasAttached]
if[member[.wasAttached]] begin[{]
call[.detachController, parameter[]]
else begin[{... | Keyword[public] Keyword[void] identifier[setController] operator[SEP] annotation[@] identifier[Nullable] identifier[DraweeController] identifier[draweeController] operator[SEP] {
Keyword[boolean] identifier[wasAttached] operator[=] identifier[mIsControllerAttached] operator[SEP] Keyword[if] operator[SEP] identif... |
@Override
protected Conduit getInbuiltBackChannel(Message inMessage)
{
if (inMessage.getExchange().isOneWay())
{
return null;
}
final UDPConnectionInfo info = inMessage.get(UDPConnectionInfo.class);
return new AbstractBackChannelConduit()
{
public void prepare... | class class_name[name] begin[{]
method[getInbuiltBackChannel, return_type[type[Conduit]], modifier[protected], parameter[inMessage]] begin[{]
if[call[inMessage.getExchange, parameter[]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[... | annotation[@] identifier[Override] Keyword[protected] identifier[Conduit] identifier[getInbuiltBackChannel] operator[SEP] identifier[Message] identifier[inMessage] operator[SEP] {
Keyword[if] operator[SEP] identifier[inMessage] operator[SEP] identifier[getExchange] operator[SEP] operator[SEP] operator[SEP] ident... |
public void setFfdcAlready(boolean ffdcAlready) {
this.ffdcAlready = ffdcAlready;
if (tc.isDebugEnabled()) {
Tr.debug(tc, "ffdc already handled? " + ffdcAlready);
}
} | class class_name[name] begin[{]
method[setFfdcAlready, return_type[void], modifier[public], parameter[ffdcAlready]] begin[{]
assign[THIS[member[None.ffdcAlready]], member[.ffdcAlready]]
if[call[tc.isDebugEnabled, parameter[]]] begin[{]
call[Tr.debug, para... | Keyword[public] Keyword[void] identifier[setFfdcAlready] operator[SEP] Keyword[boolean] identifier[ffdcAlready] operator[SEP] {
Keyword[this] operator[SEP] identifier[ffdcAlready] operator[=] identifier[ffdcAlready] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] o... |
End of preview. Expand in Data Studio
- Downloads last month
- 41