code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public <T1> Mutable<T1> mapInputToObj(final Function<T1, Short> fn) {
final MutableShort host = this;
return new Mutable<T1>() {
@Override
public Mutable<T1> set(final T1 value) {
host.set(fn.apply(value));
return this;
}
};
... | class class_name[name] begin[{]
method[mapInputToObj, return_type[type[Mutable]], modifier[public], parameter[fn]] begin[{]
local_variable[type[MutableShort], host]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementEx... | Keyword[public] operator[<] identifier[T1] operator[>] identifier[Mutable] operator[<] identifier[T1] operator[>] identifier[mapInputToObj] operator[SEP] Keyword[final] identifier[Function] operator[<] identifier[T1] , identifier[Short] operator[>] identifier[fn] operator[SEP] {
Keyword[final] identifier[Mutabl... |
public static <T> T jsni(JavaScriptObject jso, String meth, Object... args) {
return runJavascriptFunction(jso, meth, args);
} | class class_name[name] begin[{]
method[jsni, return_type[type[T]], modifier[public static], parameter[jso, meth, args]] begin[{]
return[call[.runJavascriptFunction, parameter[member[.jso], member[.meth], member[.args]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[jsni] operator[SEP] identifier[JavaScriptObject] identifier[jso] , identifier[String] identifier[meth] , identifier[Object] operator[...] identifier[args] operator[SEP] {
Keyword[return] identifier[runJavascriptFunct... |
private final void copyMembers(DateFormatSymbols src, DateFormatSymbols dst)
{
dst.eras = Arrays.copyOf(src.eras, src.eras.length);
dst.months = Arrays.copyOf(src.months, src.months.length);
dst.shortMonths = Arrays.copyOf(src.shortMonths, src.shortMonths.length);
dst.weekdays = Arra... | class class_name[name] begin[{]
method[copyMembers, return_type[void], modifier[final private], parameter[src, dst]] begin[{]
assign[member[dst.eras], call[Arrays.copyOf, parameter[member[src.eras], member[src.eras.length]]]]
assign[member[dst.months], call[Arrays.copyOf, parame... | Keyword[private] Keyword[final] Keyword[void] identifier[copyMembers] operator[SEP] identifier[DateFormatSymbols] identifier[src] , identifier[DateFormatSymbols] identifier[dst] operator[SEP] {
identifier[dst] operator[SEP] identifier[eras] operator[=] identifier[Arrays] operator[SEP] identifier[copyOf] operato... |
private void validate() {
if(driverClass == null) {
throw new IllegalArgumentException("Driver class must be specified");
}
if(catalog == null || catalog.isEmpty()) {
throw new IllegalArgumentException("Schema name must be specified");
}
if(table == null |... | class class_name[name] begin[{]
method[validate, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.driverClass], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qu... | Keyword[private] Keyword[void] identifier[validate] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[driverClass] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP]
... |
public static String removeLastComplexXpathElement(String path) {
int pos = path.lastIndexOf('/');
if (pos < 0) {
return path;
}
// count ' chars
int p = pos;
int count = -1;
while (p > 0) {
count++;
p = path.indexOf("\'", p + ... | class class_name[name] begin[{]
method[removeLastComplexXpathElement, return_type[type[String]], modifier[public static], parameter[path]] begin[{]
local_variable[type[int], pos]
if[binary_operation[member[.pos], <, literal[0]]] begin[{]
return[member[.path]]
else be... | Keyword[public] Keyword[static] identifier[String] identifier[removeLastComplexXpathElement] operator[SEP] identifier[String] identifier[path] operator[SEP] {
Keyword[int] identifier[pos] operator[=] identifier[path] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] ... |
void changedSearchType() {
SearchType type = (SearchType)m_searchType.getValue();
m_property.setVisible(type.isPropertySearch());
m_searchPattern.setVisible(
(!type.equals(SearchType.resourcetype)) & (!type.equals(SearchType.renameContainer)));
m_resourceSearch.setVisible(t... | class class_name[name] begin[{]
method[changedSearchType, return_type[void], modifier[default], parameter[]] begin[{]
local_variable[type[SearchType], type]
call[m_property.setVisible, parameter[call[type.isPropertySearch, parameter[]]]]
call[m_searchPattern.setVisible, ... | Keyword[void] identifier[changedSearchType] operator[SEP] operator[SEP] {
identifier[SearchType] identifier[type] operator[=] operator[SEP] identifier[SearchType] operator[SEP] identifier[m_searchType] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[m_property] operator[SE... |
@Override
public CPDefinitionLink findByCProductId_First(long CProductId,
OrderByComparator<CPDefinitionLink> orderByComparator)
throws NoSuchCPDefinitionLinkException {
CPDefinitionLink cpDefinitionLink = fetchByCProductId_First(CProductId,
orderByComparator);
if (cpDefinitionLink != null) {
return cp... | class class_name[name] begin[{]
method[findByCProductId_First, return_type[type[CPDefinitionLink]], modifier[public], parameter[CProductId, orderByComparator]] begin[{]
local_variable[type[CPDefinitionLink], cpDefinitionLink]
if[binary_operation[member[.cpDefinitionLink], !=, literal[nu... | annotation[@] identifier[Override] Keyword[public] identifier[CPDefinitionLink] identifier[findByCProductId_First] operator[SEP] Keyword[long] identifier[CProductId] , identifier[OrderByComparator] operator[<] identifier[CPDefinitionLink] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifi... |
@Override
public void removeChildren(Element node) {
NodeList children = node.getChildNodes();
for (int i = (children.getLength() - 1); i >= 0; i--) {
node.removeChild(children.item(i));
}
} | class class_name[name] begin[{]
method[removeChildren, return_type[void], modifier[public], parameter[node]] begin[{]
local_variable[type[NodeList], children]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arg... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeChildren] operator[SEP] identifier[Element] identifier[node] operator[SEP] {
identifier[NodeList] identifier[children] operator[=] identifier[node] operator[SEP] identifier[getChildNodes] operator[SEP] operator[SEP] operator[SEP] K... |
public final void page(final Map<String, Object> pRqVs,
final IRequestData pRqDt, final OnlineBuyer pBuyr) throws Exception {
TradingSettings ts = (TradingSettings) pRqVs.get("tradSet");
//orders:
int page;
String pgSt = pRqDt.getParameter("pg");
if (pgSt != null) {
page = Integer.parseInt... | class class_name[name] begin[{]
method[page, return_type[void], modifier[final public], parameter[pRqVs, pRqDt, pBuyr]] begin[{]
local_variable[type[TradingSettings], ts]
local_variable[type[int], page]
local_variable[type[String], pgSt]
if[binary_operation[member[.pgSt]... | Keyword[public] Keyword[final] Keyword[void] identifier[page] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pRqVs] , Keyword[final] identifier[IRequestData] identifier[pRqDt] , Keyword[final] identifier[OnlineBuyer] identifier[pBuyr] operator[... |
public void handleUIEvent(String callbackKey, JSObject result) {
if (handlers.containsKey(callbackKey) && handlers.get(callbackKey) instanceof UIEventHandler) {
((UIEventHandler) handlers.get(callbackKey)).handle(result);
} else if (handlers.containsKey(callbackKey) && handlers.get(callbackK... | class class_name[name] begin[{]
method[handleUIEvent, return_type[void], modifier[public], parameter[callbackKey, result]] begin[{]
if[binary_operation[call[handlers.containsKey, parameter[member[.callbackKey]]], &&, binary_operation[call[handlers.get, parameter[member[.callbackKey]]], instance... | Keyword[public] Keyword[void] identifier[handleUIEvent] operator[SEP] identifier[String] identifier[callbackKey] , identifier[JSObject] identifier[result] operator[SEP] {
Keyword[if] operator[SEP] identifier[handlers] operator[SEP] identifier[containsKey] operator[SEP] identifier[callbackKey] operator[SEP] oper... |
public XCalValue firstValue() {
for (Element child : children()) {
String childNamespace = child.getNamespaceURI();
if (XCAL_NS.equals(childNamespace)) {
ICalDataType dataType = toDataType(child.getLocalName());
String value = child.getTextContent();
return new XCalValue(dataType, value);
}
}
... | class class_name[name] begin[{]
method[firstValue, return_type[type[XCalValue]], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argument... | Keyword[public] identifier[XCalValue] identifier[firstValue] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[Element] identifier[child] operator[:] identifier[children] operator[SEP] operator[SEP] operator[SEP] {
identifier[String] identifier[childNamespace] operator[=] identifier... |
private URI getURI(final ClientRequestInfo clientRequestInfo) throws URISyntaxException {
final StringBuilder builder = new StringBuilder("iiop:");
if (clientRequestInfo instanceof ClientRequestInfoImpl) {
ClientRequestInfoImpl infoImpl = (ClientRequestInfoImpl) clientRequestInfo;
... | class class_name[name] begin[{]
method[getURI, return_type[type[URI]], modifier[private], parameter[clientRequestInfo]] begin[{]
local_variable[type[StringBuilder], builder]
if[binary_operation[member[.clientRequestInfo], instanceof, type[ClientRequestInfoImpl]]] begin[{]
lo... | Keyword[private] identifier[URI] identifier[getURI] operator[SEP] Keyword[final] identifier[ClientRequestInfo] identifier[clientRequestInfo] operator[SEP] Keyword[throws] identifier[URISyntaxException] {
Keyword[final] identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilde... |
public Object get(String propName) {
if (propName.equals("roles")) {
return getRoles();
}
if (propName.equals("entitlements")) {
return getEntitlements();
}
return null;
} | class class_name[name] begin[{]
method[get, return_type[type[Object]], modifier[public], parameter[propName]] begin[{]
if[call[propName.equals, parameter[literal["roles"]]]] begin[{]
return[call[.getRoles, parameter[]]]
else begin[{]
None
end[}]
if[ca... | Keyword[public] identifier[Object] identifier[get] operator[SEP] identifier[String] identifier[propName] operator[SEP] {
Keyword[if] operator[SEP] identifier[propName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keyword[return] identifier[getRoles] oper... |
private void layoutAcyclicParts() throws CDKException {
logger.debug("Start of handleAliphatics");
int safetyCounter = 0;
IAtomContainer unplacedAtoms = null;
IAtomContainer placedAtoms = null;
IAtomContainer longestUnplacedChain = null;
IAtom atom = null;
Vecto... | class class_name[name] begin[{]
method[layoutAcyclicParts, return_type[void], modifier[private], parameter[]] begin[{]
call[logger.debug, parameter[literal["Start of handleAliphatics"]]]
local_variable[type[int], safetyCounter]
local_variable[type[IAtomContainer], unplacedAtoms]... | Keyword[private] Keyword[void] identifier[layoutAcyclicParts] operator[SEP] operator[SEP] Keyword[throws] identifier[CDKException] {
identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[safetyCounter] operator[=] Other[0] operator[SE... |
public static <T> boolean containsOnlyNullElements (@Nullable final T [] aArray)
{
if (isEmpty (aArray))
return false;
for (final Object aObj : aArray)
if (aObj != null)
return false;
return true;
} | class class_name[name] begin[{]
method[containsOnlyNullElements, return_type[type[boolean]], modifier[public static], parameter[aArray]] begin[{]
if[call[.isEmpty, parameter[member[.aArray]]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
ForStatement(body=If... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[boolean] identifier[containsOnlyNullElements] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[T] operator[SEP] operator[SEP] identifier[aArray] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEmpty] op... |
public List<Review> getMoviesReviews(int movieId, String reviewType, int pageLimit, int page, String country) throws RottenTomatoesException {
properties.clear();
properties.put(ApiBuilder.PROPERTY_ID, String.valueOf(movieId));
properties.put(ApiBuilder.PROPERTY_URL, URL_MOVIES_REVIEWS);
... | class class_name[name] begin[{]
method[getMoviesReviews, return_type[type[List]], modifier[public], parameter[movieId, reviewType, pageLimit, page, country]] begin[{]
call[properties.clear, parameter[]]
call[properties.put, parameter[member[ApiBuilder.PROPERTY_ID], call[String.v... | Keyword[public] identifier[List] operator[<] identifier[Review] operator[>] identifier[getMoviesReviews] operator[SEP] Keyword[int] identifier[movieId] , identifier[String] identifier[reviewType] , Keyword[int] identifier[pageLimit] , Keyword[int] identifier[page] , identifier[String] identifier[country] operator[S... |
public static void figureOutConnect(PrintStream w, Object... comps) {
// add all the components via Proxy.
List<ComponentAccess> l = new ArrayList<ComponentAccess>();
for (Object c : comps) {
l.add(new ComponentAccess(c));
}
// find all out slots
for (Compone... | class class_name[name] begin[{]
method[figureOutConnect, return_type[void], modifier[public static], parameter[w, comps]] begin[{]
local_variable[type[List], l]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(argum... | Keyword[public] Keyword[static] Keyword[void] identifier[figureOutConnect] operator[SEP] identifier[PrintStream] identifier[w] , identifier[Object] operator[...] identifier[comps] operator[SEP] {
identifier[List] operator[<] identifier[ComponentAccess] operator[>] identifier[l] operator[=] Keyword[new] identifi... |
public V get(SerializationService serializationService) {
if (!valueExists) {
// it's ok to deserialize twice in case of race
assert serializationService != null;
value = serializationService.toObject(serializedValue);
valueExists = true;
}
return ... | class class_name[name] begin[{]
method[get, return_type[type[V]], modifier[public], parameter[serializationService]] begin[{]
if[member[.valueExists]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=serializationService, postfix_operators=[], prefi... | Keyword[public] identifier[V] identifier[get] operator[SEP] identifier[SerializationService] identifier[serializationService] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[valueExists] operator[SEP] {
Keyword[assert] identifier[serializationService] operator[!=] Other[null] operator... |
@NonNull
public Expression add(@NonNull Expression expression) {
if (expression == null) {
throw new IllegalArgumentException("expression cannot be null.");
}
return new BinaryExpression(this, expression, BinaryExpression.OpType.Add);
} | class class_name[name] begin[{]
method[add, return_type[type[Expression]], modifier[public], parameter[expression]] begin[{]
if[binary_operation[member[.expression], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_o... | annotation[@] identifier[NonNull] Keyword[public] identifier[Expression] identifier[add] operator[SEP] annotation[@] identifier[NonNull] identifier[Expression] identifier[expression] operator[SEP] {
Keyword[if] operator[SEP] identifier[expression] operator[==] Other[null] operator[SEP] {
Keyword[throw... |
public static String getSKSAT(String[] soilParas) {
if (soilParas != null && soilParas.length >= 3) {
if (soilParas.length >= 4) {
return divide(calcSatBulk(soilParas[0], soilParas[1], soilParas[2], divide(soilParas[3], "100")), "10", 3);
} else {
return d... | class class_name[name] begin[{]
method[getSKSAT, return_type[type[String]], modifier[public static], parameter[soilParas]] begin[{]
if[binary_operation[binary_operation[member[.soilParas], !=, literal[null]], &&, binary_operation[member[soilParas.length], >=, literal[3]]]] begin[{]
... | Keyword[public] Keyword[static] identifier[String] identifier[getSKSAT] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[soilParas] operator[SEP] {
Keyword[if] operator[SEP] identifier[soilParas] operator[!=] Other[null] operator[&&] identifier[soilParas] operator[SEP] identifier[length] o... |
@SuppressWarnings("unchecked")
public <T> T get(Descriptor<T> descriptor) {
return (T) store.get(descriptor);
} | class class_name[name] begin[{]
method[get, return_type[type[T]], modifier[public], parameter[descriptor]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=descriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[get] operator[SEP] identifier[Descriptor] operator[<] identifier[T] operator[>] identifier[descriptor] operator[SEP] {
Keyword[return] operator[SEP... |
private static Options constructCliOptions() {
Options options = new Options();
Option packageUri = Option.builder("u")
.desc("Uri indicating from where to download the file")
.longOpt(CliArgs.TOPOLOGY_PACKAGE_URI.text)
.hasArgs()
.argName(CliArgs.TOPOLOGY_PACKAGE_URI.text)
... | class class_name[name] begin[{]
method[constructCliOptions, return_type[type[Options]], modifier[private static], parameter[]] begin[{]
local_variable[type[Options], options]
local_variable[type[Option], packageUri]
local_variable[type[Option], destination]
local_variable[type[O... | Keyword[private] Keyword[static] identifier[Options] identifier[constructCliOptions] operator[SEP] operator[SEP] {
identifier[Options] identifier[options] operator[=] Keyword[new] identifier[Options] operator[SEP] operator[SEP] operator[SEP] identifier[Option] identifier[packageUri] operator[=] identifier[Option... |
private int searchFilterIndex(List<Filter> filters, int targetId, int min, int max) {
// Basic algorithm taken from Wikipedia:
// http://en.wikipedia.org/wiki/Binary_search_algorithm#Recursive
if (max <= min) {
// set is empty, so return value showing not found
return -1;
}
// calculate midp... | class class_name[name] begin[{]
method[searchFilterIndex, return_type[type[int]], modifier[private], parameter[filters, targetId, min, max]] begin[{]
if[binary_operation[member[.max], <=, member[.min]]] begin[{]
return[literal[1]]
else begin[{]
None
end[}]
lo... | Keyword[private] Keyword[int] identifier[searchFilterIndex] operator[SEP] identifier[List] operator[<] identifier[Filter] operator[>] identifier[filters] , Keyword[int] identifier[targetId] , Keyword[int] identifier[min] , Keyword[int] identifier[max] operator[SEP] {
Keyword[if] operator[SEP] identifier[max] ... |
public BigDecimal getBigDecimal(int columnIndex) {
Object fieldValue = data[columnIndex];
if (fieldValue == null) {
return null;
}
if (fieldValue instanceof BigDecimal) {
return (BigDecimal) fieldValue;
}
throw new DBFException("Unsupported type for BigDecimal at column:" + columnIndex + " "
+ fie... | class class_name[name] begin[{]
method[getBigDecimal, return_type[type[BigDecimal]], modifier[public], parameter[columnIndex]] begin[{]
local_variable[type[Object], fieldValue]
if[binary_operation[member[.fieldValue], ==, literal[null]]] begin[{]
return[literal[null]]
... | Keyword[public] identifier[BigDecimal] identifier[getBigDecimal] operator[SEP] Keyword[int] identifier[columnIndex] operator[SEP] {
identifier[Object] identifier[fieldValue] operator[=] identifier[data] operator[SEP] identifier[columnIndex] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fieldVa... |
public Class<? extends WebDriverException> getExceptionType(int statusCode) {
if (SUCCESS == statusCode) {
return null;
}
// We know that the tuple of (status code, exception) is distinct.
Set<Class<? extends WebDriverException>> allPossibleExceptions = KNOWN_ERRORS.stream()
.filter(knownEr... | class class_name[name] begin[{]
method[getExceptionType, return_type[type[Class]], modifier[public], parameter[statusCode]] begin[{]
if[binary_operation[member[.SUCCESS], ==, member[.statusCode]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local... | Keyword[public] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[WebDriverException] operator[>] identifier[getExceptionType] operator[SEP] Keyword[int] identifier[statusCode] operator[SEP] {
Keyword[if] operator[SEP] identifier[SUCCESS] operator[==] identifier[statusCode] operator[SEP] {
... |
public XADataSource createXADataSource(Properties props) throws SQLException {
if (props == null) props = new Properties();
XADataSource dataSource = newXADataSource();
setBeanProperties(dataSource, props);
return dataSource;
} | class class_name[name] begin[{]
method[createXADataSource, return_type[type[XADataSource]], modifier[public], parameter[props]] begin[{]
if[binary_operation[member[.props], ==, literal[null]]] begin[{]
assign[member[.props], ClassCreator(arguments=[], body=None, constructor_type_arg... | Keyword[public] identifier[XADataSource] identifier[createXADataSource] operator[SEP] identifier[Properties] identifier[props] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[props] operator[==] Other[null] operator[SEP] identifier[props] operator[=] Keyword[new] ide... |
public Slot addSpecialty(CodeableConcept t) { //3
if (t == null)
return this;
if (this.specialty == null)
this.specialty = new ArrayList<CodeableConcept>();
this.specialty.add(t);
return this;
} | class class_name[name] begin[{]
method[addSpecialty, return_type[type[Slot]], modifier[public], parameter[t]] begin[{]
if[binary_operation[member[.t], ==, literal[null]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
if[binary_operation[THIS[member[None.speci... | Keyword[public] identifier[Slot] identifier[addSpecialty] operator[SEP] identifier[CodeableConcept] identifier[t] operator[SEP] {
Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] Keyword[return] Keyword[this] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identi... |
public static synchronized final IStorageModule open (final File file, final long storageLength, final boolean create, Class<? extends IStorageModule> kind) throws IOException {
long sizeInBlocks;
sizeInBlocks = storageLength / VIRTUAL_BLOCK_SIZE;
if (create && !kind.equals(JCloudsStorageModu... | class class_name[name] begin[{]
method[open, return_type[type[IStorageModule]], modifier[synchronized final public static], parameter[file, storageLength, create, kind]] begin[{]
local_variable[type[long], sizeInBlocks]
assign[member[.sizeInBlocks], binary_operation[member[.storageLengt... | Keyword[public] Keyword[static] Keyword[synchronized] Keyword[final] identifier[IStorageModule] identifier[open] operator[SEP] Keyword[final] identifier[File] identifier[file] , Keyword[final] Keyword[long] identifier[storageLength] , Keyword[final] Keyword[boolean] identifier[create] , identifier[Class] operator[<]... |
@Override
public List<List<LogTrace<LogEntry>>> parse(InputStream inputStream, ParsingMode parsingMode) throws ParameterException, ParserException {
try {
inputStream.available();
} catch (IOException e) {
throw new ParameterExcepti... | class class_name[name] begin[{]
method[parse, return_type[type[List]], modifier[public], parameter[inputStream, parsingMode]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=available, postfix_operators=[], prefix_operators=[], qualifier=inputStream, se... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[List] operator[<] identifier[LogTrace] operator[<] identifier[LogEntry] operator[>] operator[>] operator[>] identifier[parse] operator[SEP] identifier[InputStream] identifier[inputStream] , identifier[ParsingMode] identifier[par... |
public boolean equalsData(ucar.nc2.ft.fmrc.EnsCoord other) {
if (ensembles != other.ensembles)
return false;
if (pdn != other.pdn)
return false;
for (int i = 0; i < ensTypes.length; i++) {
if (ensTypes[i] != other.ensTypes[i])
return false;
}
return true;
... | class class_name[name] begin[{]
method[equalsData, return_type[type[boolean]], modifier[public], parameter[other]] begin[{]
if[binary_operation[member[.ensembles], !=, member[other.ensembles]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
if[binary_o... | Keyword[public] Keyword[boolean] identifier[equalsData] operator[SEP] identifier[ucar] operator[SEP] identifier[nc2] operator[SEP] identifier[ft] operator[SEP] identifier[fmrc] operator[SEP] identifier[EnsCoord] identifier[other] operator[SEP] {
Keyword[if] operator[SEP] identifier[ensembles] operator[!=] identi... |
void postProgress(final DownloadRequest request, final long bytesWritten, final long totalBytes) {
downloadPoster.execute(new Runnable() {
@Override public void run() {
request.downloadCallback().onProgress(request.downloadId(), bytesWritten, totalBytes);
}
});
} | class class_name[name] begin[{]
method[postProgress, return_type[void], modifier[default], parameter[request, bytesWritten, totalBytes]] begin[{]
call[downloadPoster.execute, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body... | Keyword[void] identifier[postProgress] operator[SEP] Keyword[final] identifier[DownloadRequest] identifier[request] , Keyword[final] Keyword[long] identifier[bytesWritten] , Keyword[final] Keyword[long] identifier[totalBytes] operator[SEP] {
identifier[downloadPoster] operator[SEP] identifier[execute] operator... |
private SimpleDateFormat getDateTimeFormatter() {
SimpleDateFormat formatter = new SimpleDateFormat();
formatter.applyPattern("yyyy-MM-dd'T'HH:mm:ss");
formatter.setTimeZone(TimeZone.getTimeZone("GMT"));
return formatter;
} | class class_name[name] begin[{]
method[getDateTimeFormatter, return_type[type[SimpleDateFormat]], modifier[private], parameter[]] begin[{]
local_variable[type[SimpleDateFormat], formatter]
call[formatter.applyPattern, parameter[literal["yyyy-MM-dd'T'HH:mm:ss"]]]
call[for... | Keyword[private] identifier[SimpleDateFormat] identifier[getDateTimeFormatter] operator[SEP] operator[SEP] {
identifier[SimpleDateFormat] identifier[formatter] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[applyPatte... |
public DescribeAccountLimitsResult withLimits(Limit... limits) {
if (this.limits == null) {
setLimits(new com.amazonaws.internal.SdkInternalList<Limit>(limits.length));
}
for (Limit ele : limits) {
this.limits.add(ele);
}
return this;
} | class class_name[name] begin[{]
method[withLimits, return_type[type[DescribeAccountLimitsResult]], modifier[public], parameter[limits]] begin[{]
if[binary_operation[THIS[member[None.limits]], ==, literal[null]]] begin[{]
call[.setLimits, parameter[ClassCreator(arguments=... | Keyword[public] identifier[DescribeAccountLimitsResult] identifier[withLimits] operator[SEP] identifier[Limit] operator[...] identifier[limits] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[limits] operator[==] Other[null] operator[SEP] {
identifier[setLimits] operat... |
@Override
public void write(ByteBuffer keybuff, List<Mutation> value) throws IOException
{
Range<Token> range = ringCache.getRange(keybuff);
// get the client for the given range, or create a new one
RangeClient client = clients.get(range);
if (client == null)
{
... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[keybuff, value]] begin[{]
local_variable[type[Range], range]
local_variable[type[RangeClient], client]
if[binary_operation[member[.client], ==, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[ByteBuffer] identifier[keybuff] , identifier[List] operator[<] identifier[Mutation] operator[>] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Range] operator[<] iden... |
@Override
public final void startTag(String type) throws IllegalStateException, IllegalArgumentException, IOException {
// Check state
if (_state != XMLEventListenerStates.BEFORE_XML_DECLARATION && _state != XMLEventListenerStates.BEFORE_DTD_DECLARATION && _state != XMLEventListenerStates.BEFORE_RO... | class class_name[name] begin[{]
method[startTag, return_type[void], modifier[final public], parameter[type]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[._state], !=, member[XMLEventListenerStates.BEFORE_XML_DECLARATION]], &&, binary_o... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[startTag] operator[SEP] identifier[String] identifier[type] operator[SEP] Keyword[throws] identifier[IllegalStateException] , identifier[IllegalArgumentException] , identifier[IOException] {
Keyword[if] operator[SEP] ide... |
public Object eval(Scope scope) {
if (index == null) {
return assignVariable(scope);
} else {
return assignElement(scope);
}
} | class class_name[name] begin[{]
method[eval, return_type[type[Object]], modifier[public], parameter[scope]] begin[{]
if[binary_operation[member[.index], ==, literal[null]]] begin[{]
return[call[.assignVariable, parameter[member[.scope]]]]
else begin[{]
return[cal... | Keyword[public] identifier[Object] identifier[eval] operator[SEP] identifier[Scope] identifier[scope] operator[SEP] {
Keyword[if] operator[SEP] identifier[index] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[assignVariable] operator[SEP] identifier[scope] operator[SEP] operator[S... |
@XmlElementDecl(namespace = "http://www.opengis.net/citygml/bridge/2.0", name = "_GenericApplicationPropertyOfBridge")
public JAXBElement<Object> create_GenericApplicationPropertyOfBridge(Object value) {
return new JAXBElement<Object>(__GenericApplicationPropertyOfBridge_QNAME, Object.class, null, value);
... | class class_name[name] begin[{]
method[create_GenericApplicationPropertyOfBridge, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=__GenericApplicationPropertyOfBridge_QNAME, postfix_operators=[], prefix_operators=[], qua... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[Object] operator[>] identifier[create_GenericApplicationPropertyOfBridge] operator[SEP] id... |
public Observable<Void> enableAutoScaleAsync(String poolId, PoolEnableAutoScaleParameter poolEnableAutoScaleParameter) {
return enableAutoScaleWithServiceResponseAsync(poolId, poolEnableAutoScaleParameter).map(new Func1<ServiceResponseWithHeaders<Void, PoolEnableAutoScaleHeaders>, Void>() {
@Overrid... | class class_name[name] begin[{]
method[enableAutoScaleAsync, return_type[type[Observable]], modifier[public], parameter[poolId, poolEnableAutoScaleParameter]] begin[{]
return[call[.enableAutoScaleWithServiceResponseAsync, parameter[member[.poolId], member[.poolEnableAutoScaleParameter]]]]
end[}]
EN... | Keyword[public] identifier[Observable] operator[<] identifier[Void] operator[>] identifier[enableAutoScaleAsync] operator[SEP] identifier[String] identifier[poolId] , identifier[PoolEnableAutoScaleParameter] identifier[poolEnableAutoScaleParameter] operator[SEP] {
Keyword[return] identifier[enableAutoScaleWithS... |
public static <T> int mergeDelimitedFrom(InputStream in, T message, Schema<T> schema)
throws IOException
{
final int size = in.read();
if (size == -1)
throw ProtobufException.truncatedMessage();
final int len = size < 0x80 ? size : CodedInput.readRawVarint32(in, size... | class class_name[name] begin[{]
method[mergeDelimitedFrom, return_type[type[int]], modifier[public static], parameter[in, message, schema]] begin[{]
local_variable[type[int], size]
if[binary_operation[member[.size], ==, literal[1]]] begin[{]
ThrowStatement(expression=MethodInvocation(ar... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[int] identifier[mergeDelimitedFrom] operator[SEP] identifier[InputStream] identifier[in] , identifier[T] identifier[message] , identifier[Schema] operator[<] identifier[T] operator[>] identifier[schema] operator[SEP] Keyword[throws] identif... |
public Observable<OperationStatus> updateIntentAsync(UUID appId, String versionId, UUID intentId, UpdateIntentOptionalParameter updateIntentOptionalParameter) {
return updateIntentWithServiceResponseAsync(appId, versionId, intentId, updateIntentOptionalParameter).map(new Func1<ServiceResponse<OperationStatus>, ... | class class_name[name] begin[{]
method[updateIntentAsync, return_type[type[Observable]], modifier[public], parameter[appId, versionId, intentId, updateIntentOptionalParameter]] begin[{]
return[call[.updateIntentWithServiceResponseAsync, parameter[member[.appId], member[.versionId], member[.intentId], m... | Keyword[public] identifier[Observable] operator[<] identifier[OperationStatus] operator[>] identifier[updateIntentAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[intentId] , identifier[UpdateIntentOptionalParameter] identifier[updateInt... |
public CssStyle setProperty(final String key, final String value) {
if (this.properties == null) {
this.properties = new HashMap<String, String>();
}
this.properties.put(sanitizeCssPropertyName(key), value);
return this;
} | class class_name[name] begin[{]
method[setProperty, return_type[type[CssStyle]], modifier[public], parameter[key, value]] begin[{]
if[binary_operation[THIS[member[None.properties]], ==, literal[null]]] begin[{]
assign[THIS[member[None.properties]], ClassCreator(arguments... | Keyword[public] identifier[CssStyle] identifier[setProperty] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[properties] operator[==] Other[null] operator[SEP] ... |
@SuppressWarnings("unchecked")
public static <R> FailsafeExecutor<R> with(List<? extends Policy<R>> policies) {
return new FailsafeExecutor<>((List<Policy<R>>) Assert.notNull(policies, "policies"));
} | class class_name[name] begin[{]
method[with, return_type[type[FailsafeExecutor]], modifier[public static], parameter[policies]] begin[{]
return[ClassCreator(arguments=[Cast(expression=MethodInvocation(arguments=[MemberReference(member=policies, postfix_operators=[], prefix_operators=[], qualifier=, sel... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[R] operator[>] identifier[FailsafeExecutor] operator[<] identifier[R] operator[>] identifier[with] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identif... |
@Nullable
public static XMLGregorianCalendar getXMLCalendar (@Nullable final XMLGregorianCalendar aDate,
@Nullable final XMLGregorianCalendar aTime)
{
if (aDate == null && aTime == null)
return null;
if (aTime == null)
{
// Date only
... | class class_name[name] begin[{]
method[getXMLCalendar, return_type[type[XMLGregorianCalendar]], modifier[public static], parameter[aDate, aTime]] begin[{]
if[binary_operation[binary_operation[member[.aDate], ==, literal[null]], &&, binary_operation[member[.aTime], ==, literal[null]]]] begin[{]
... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[XMLGregorianCalendar] identifier[getXMLCalendar] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[XMLGregorianCalendar] identifier[aDate] , annotation[@] identifier[Nullable] Keyword[final] identifier[XMLGregorianCa... |
public Document.Calendars.Calendar.WeekDays.WeekDay.TimePeriods createDocumentCalendarsCalendarWeekDaysWeekDayTimePeriods()
{
return new Document.Calendars.Calendar.WeekDays.WeekDay.TimePeriods();
} | class class_name[name] begin[{]
method[createDocumentCalendarsCalendarWeekDaysWeekDayTimePeriods, return_type[type[Document]], modifier[public], parameter[]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None,... | Keyword[public] identifier[Document] operator[SEP] identifier[Calendars] operator[SEP] identifier[Calendar] operator[SEP] identifier[WeekDays] operator[SEP] identifier[WeekDay] operator[SEP] identifier[TimePeriods] identifier[createDocumentCalendarsCalendarWeekDaysWeekDayTimePeriods] operator[SEP] operator[SEP] {
... |
public static OWLValueObject buildFromObject(OWLModel model, Object object) throws NotYetImplementedException, OWLTranslationException {
return buildFromClasAndObject(model, OWLURIClass.from(object), object);
} | class class_name[name] begin[{]
method[buildFromObject, return_type[type[OWLValueObject]], modifier[public static], parameter[model, object]] begin[{]
return[call[.buildFromClasAndObject, parameter[member[.model], call[OWLURIClass.from, parameter[member[.object]]], member[.object]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[OWLValueObject] identifier[buildFromObject] operator[SEP] identifier[OWLModel] identifier[model] , identifier[Object] identifier[object] operator[SEP] Keyword[throws] identifier[NotYetImplementedException] , identifier[OWLTranslationException] {
Keyword[return] identi... |
public ArrayList<OvhGeolocationEnum> serviceName_ipCountryAvailable_GET(String serviceName) throws IOException {
String qPath = "/vps/{serviceName}/ipCountryAvailable";
StringBuilder sb = path(qPath, serviceName);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, t9);
} | class class_name[name] begin[{]
method[serviceName_ipCountryAvailable_GET, return_type[type[ArrayList]], modifier[public], parameter[serviceName]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], resp]
return[call[... | Keyword[public] identifier[ArrayList] operator[<] identifier[OvhGeolocationEnum] operator[>] identifier[serviceName_ipCountryAvailable_GET] operator[SEP] identifier[String] identifier[serviceName] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[Str... |
public Service withNames(String... names) {
if (this.names == null) {
setNames(new java.util.ArrayList<String>(names.length));
}
for (String ele : names) {
this.names.add(ele);
}
return this;
} | class class_name[name] begin[{]
method[withNames, return_type[type[Service]], modifier[public], parameter[names]] begin[{]
if[binary_operation[THIS[member[None.names]], ==, literal[null]]] begin[{]
call[.setNames, parameter[ClassCreator(arguments=[MemberReference(member=... | Keyword[public] identifier[Service] identifier[withNames] operator[SEP] identifier[String] operator[...] identifier[names] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[names] operator[==] Other[null] operator[SEP] {
identifier[setNames] operator[SEP] Keyword[new] id... |
@Override
public void initialize(IAggregator aggregator,
IAggregatorExtension extension, IExtensionRegistrar registrar) {
if (initialized) {
return;
}
this.aggregator = aggregator;
Hashtable<String, String> props;
props = new Hashtable<String, String>();
props.put("name", aggregator.getName(... | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[public], parameter[aggregator, extension, registrar]] begin[{]
if[member[.initialized]] begin[{]
return[None]
else begin[{]
None
end[}]
assign[THIS[member[None.aggregator]]... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[initialize] operator[SEP] identifier[IAggregator] identifier[aggregator] , identifier[IAggregatorExtension] identifier[extension] , identifier[IExtensionRegistrar] identifier[registrar] operator[SEP] {
Keyword[if] operator[SEP] identif... |
public ReplicableCommand fromStream(byte id, byte type) {
ReplicableCommand command;
if (type == 0) {
switch (id) {
case PutKeyValueCommand.COMMAND_ID:
command = new PutKeyValueCommand();
break;
case PutMapCommand.COMMAND_ID:
comm... | class class_name[name] begin[{]
method[fromStream, return_type[type[ReplicableCommand]], modifier[public], parameter[id, type]] begin[{]
local_variable[type[ReplicableCommand], command]
if[binary_operation[member[.type], ==, literal[0]]] begin[{]
SwitchStatement(cases=[Switc... | Keyword[public] identifier[ReplicableCommand] identifier[fromStream] operator[SEP] Keyword[byte] identifier[id] , Keyword[byte] identifier[type] operator[SEP] {
identifier[ReplicableCommand] identifier[command] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[==] Other[0] operator[SEP] {
... |
protected void parseNormalComment() {
String comment = tokenizer.getToken();
SqlNode node = new SqlNode(Math.max(this.position - 2, 0), "/*" + comment + "*/");
this.position = this.tokenizer.getPosition();
peek().addChild(node);
} | class class_name[name] begin[{]
method[parseNormalComment, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[String], comment]
local_variable[type[SqlNode], node]
assign[THIS[member[None.position]], THIS[member[None.tokenizer]call[None.getPosition... | Keyword[protected] Keyword[void] identifier[parseNormalComment] operator[SEP] operator[SEP] {
identifier[String] identifier[comment] operator[=] identifier[tokenizer] operator[SEP] identifier[getToken] operator[SEP] operator[SEP] operator[SEP] identifier[SqlNode] identifier[node] operator[=] Keyword[new] identif... |
private void handleWhereBlock(Method method) {
Block block = method.getLastBlock();
if (!(block instanceof WhereBlock)) return;
new DeepBlockRewriter(this).visit(block);
WhereBlockRewriter.rewrite((WhereBlock) block, this);
} | class class_name[name] begin[{]
method[handleWhereBlock, return_type[void], modifier[private], parameter[method]] begin[{]
local_variable[type[Block], block]
if[binary_operation[member[.block], instanceof, type[WhereBlock]]] begin[{]
return[None]
else begin[{]
None
end[}... | Keyword[private] Keyword[void] identifier[handleWhereBlock] operator[SEP] identifier[Method] identifier[method] operator[SEP] {
identifier[Block] identifier[block] operator[=] identifier[method] operator[SEP] identifier[getLastBlock] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!]... |
public static Offset<Float> offset(Float value) {
checkNotNull(value);
if (value.floatValue() < 0f) {
throw valueNotPositive();
}
return new Offset<Float>(value);
} | class class_name[name] begin[{]
method[offset, return_type[type[Offset]], modifier[public static], parameter[value]] begin[{]
call[.checkNotNull, parameter[member[.value]]]
if[binary_operation[call[value.floatValue, parameter[]], <, literal[0f]]] begin[{]
ThrowStatem... | Keyword[public] Keyword[static] identifier[Offset] operator[<] identifier[Float] operator[>] identifier[offset] operator[SEP] identifier[Float] identifier[value] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operat... |
static int getNameReferenceCount(Node node, String name) {
return getCount(node, new MatchNameNode(name), Predicates.alwaysTrue());
} | class class_name[name] begin[{]
method[getNameReferenceCount, return_type[type[int]], modifier[static], parameter[node, name]] begin[{]
return[call[.getCount, parameter[member[.node], ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[... | Keyword[static] Keyword[int] identifier[getNameReferenceCount] operator[SEP] identifier[Node] identifier[node] , identifier[String] identifier[name] operator[SEP] {
Keyword[return] identifier[getCount] operator[SEP] identifier[node] , Keyword[new] identifier[MatchNameNode] operator[SEP] identifier[name] operat... |
public static String encode(final CharSequence url)
throws HttpRequestException {
URL parsed;
try {
parsed = new URL(url.toString());
} catch (IOException e) {
throw new HttpRequestException(e);
}
String host = parsed.getHost();
int port = parsed.getPort();
if (port != -1)... | class class_name[name] begin[{]
method[encode, return_type[type[String]], modifier[public static], parameter[url]] begin[{]
local_variable[type[URL], parsed]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=parsed, postfix_operators=[], prefix_ope... | Keyword[public] Keyword[static] identifier[String] identifier[encode] operator[SEP] Keyword[final] identifier[CharSequence] identifier[url] operator[SEP] Keyword[throws] identifier[HttpRequestException] {
identifier[URL] identifier[parsed] operator[SEP] Keyword[try] {
identifier[parsed] operator[=] Ke... |
public boolean isConsistent() throws IOException {
byte[] b = new byte[elementSize];
long offset = 0;
byte[] oldKey = null;
int i = 0;
while (offset < this.getFilledUpFromContentStart()) {
this.read(offset, ByteBuffer.wrap(b));
byte[] key = Arrays.copyOfRa... | class class_name[name] begin[{]
method[isConsistent, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[byte], b]
local_variable[type[long], offset]
local_variable[type[byte], oldKey]
local_variable[type[int], i]
while[binary_... | Keyword[public] Keyword[boolean] identifier[isConsistent] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[b] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[elementSize] operator[SEP] operator[SEP] Keyword[long] identifier... |
public void startSession(final InputTimeoutListener listener, final long firstInputTimeout, final long maxInputTimeout, final long nextInputTimeout) {
this.inputTimeoutListener = listener;
startWaitingForFirstInputTimestamp = INVALID_TIME;
firstInputTimestamp = INVALID_TIME;
lastInputTim... | class class_name[name] begin[{]
method[startSession, return_type[void], modifier[public], parameter[listener, firstInputTimeout, maxInputTimeout, nextInputTimeout]] begin[{]
assign[THIS[member[None.inputTimeoutListener]], member[.listener]]
assign[member[.startWaitingForFirstInp... | Keyword[public] Keyword[void] identifier[startSession] operator[SEP] Keyword[final] identifier[InputTimeoutListener] identifier[listener] , Keyword[final] Keyword[long] identifier[firstInputTimeout] , Keyword[final] Keyword[long] identifier[maxInputTimeout] , Keyword[final] Keyword[long] identifier[nextInputTimeout]... |
public void setActivate(RuleProxyField ruleProxyField,
RuleContext ruleContext)
{
if (ruleProxyField.isInActive()) // only do it if the field changes
{
m_activateFields.add(ruleProxyField.getProxyField());
ruleContext.addActivate(ruleProxyField);
}
} | class class_name[name] begin[{]
method[setActivate, return_type[void], modifier[public], parameter[ruleProxyField, ruleContext]] begin[{]
if[call[ruleProxyField.isInActive, parameter[]]] begin[{]
call[m_activateFields.add, parameter[call[ruleProxyField.getProxyField, par... | Keyword[public] Keyword[void] identifier[setActivate] operator[SEP] identifier[RuleProxyField] identifier[ruleProxyField] , identifier[RuleContext] identifier[ruleContext] operator[SEP] {
Keyword[if] operator[SEP] identifier[ruleProxyField] operator[SEP] identifier[isInActive] operator[SEP] operator[SEP] operat... |
@Override
public String getConstructor(String javascriptObjectType, Object... args) {
return getFunction("new " + javascriptObjectType, args);
} | class class_name[name] begin[{]
method[getConstructor, return_type[type[String]], modifier[public], parameter[javascriptObjectType, args]] begin[{]
return[call[.getFunction, parameter[binary_operation[literal["new "], +, member[.javascriptObjectType]], member[.args]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getConstructor] operator[SEP] identifier[String] identifier[javascriptObjectType] , identifier[Object] operator[...] identifier[args] operator[SEP] {
Keyword[return] identifier[getFunction] operator[SEP] literal[String] operator[+]... |
private void paintOriginalXML(final String originalXML, final PrintWriter writer) {
// Replace any CDATA Sections embedded in XML
String xml = originalXML.replaceAll("<!\\[CDATA\\[", "CDATASTART");
xml = xml.replaceAll("\\]\\]>", "CDATAFINISH");
// Paint Output
writer.println("<div>");
writer.println("<!--... | class class_name[name] begin[{]
method[paintOriginalXML, return_type[void], modifier[private], parameter[originalXML, writer]] begin[{]
local_variable[type[String], xml]
assign[member[.xml], call[xml.replaceAll, parameter[literal["\\]\\]>"], literal["CDATAFINISH"]]]]
cal... | Keyword[private] Keyword[void] identifier[paintOriginalXML] operator[SEP] Keyword[final] identifier[String] identifier[originalXML] , Keyword[final] identifier[PrintWriter] identifier[writer] operator[SEP] {
identifier[String] identifier[xml] operator[=] identifier[originalXML] operator[SEP] identifier[replaceA... |
public void toXML(final StringBuilder builder,
final ConfigVerification errors)
{
map.get(PanelKeys.PANEL_VALUES).toXML(builder, errors);
map.get(PanelKeys.PANEL_EXTERNALS).toXML(builder, errors);
map.get(PanelKeys.PANEL_INPUT).toXML(builder, errors);
map.get(PanelKeys.PANEL_OUTPUT).toXML(builder, errors);... | class class_name[name] begin[{]
method[toXML, return_type[void], modifier[public], parameter[builder, errors]] begin[{]
call[map.get, parameter[member[PanelKeys.PANEL_VALUES]]]
call[map.get, parameter[member[PanelKeys.PANEL_EXTERNALS]]]
call[map.get, parameter[me... | Keyword[public] Keyword[void] identifier[toXML] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[builder] , Keyword[final] identifier[ConfigVerification] identifier[errors] operator[SEP] {
identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[PanelKeys] operator[SEP] identifier... |
public static CustomSerializer getCustomSerializer(String className) {
if (!classCustomSerializer.isEmpty()) {
return classCustomSerializer.get(className);
}
return null;
} | class class_name[name] begin[{]
method[getCustomSerializer, return_type[type[CustomSerializer]], modifier[public static], parameter[className]] begin[{]
if[call[classCustomSerializer.isEmpty, parameter[]]] begin[{]
return[call[classCustomSerializer.get, parameter[member[.className]]... | Keyword[public] Keyword[static] identifier[CustomSerializer] identifier[getCustomSerializer] operator[SEP] identifier[String] identifier[className] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[classCustomSerializer] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] ... |
private void addCodeToRequireSoyNamespaces(SoyFileNode soyFile) {
String prevCalleeNamespace = null;
Set<String> calleeNamespaces = new TreeSet<>();
for (CallBasicNode node : new FindCalleesNotInFileVisitor().exec(soyFile)) {
String calleeNotInFile = node.getCalleeName();
int lastDotIndex = cal... | class class_name[name] begin[{]
method[addCodeToRequireSoyNamespaces, return_type[void], modifier[private], parameter[soyFile]] begin[{]
local_variable[type[String], prevCalleeNamespace]
local_variable[type[Set], calleeNamespaces]
ForStatement(body=BlockStatement(label=None, statements=... | Keyword[private] Keyword[void] identifier[addCodeToRequireSoyNamespaces] operator[SEP] identifier[SoyFileNode] identifier[soyFile] operator[SEP] {
identifier[String] identifier[prevCalleeNamespace] operator[=] Other[null] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[calleeN... |
public static void set(ServletRequest request, String name, Object value) {
request.setAttribute(name + REQUEST_SCOPE_SUFFIX, value);
} | class class_name[name] begin[{]
method[set, return_type[void], modifier[public static], parameter[request, name, value]] begin[{]
call[request.setAttribute, parameter[binary_operation[member[.name], +, member[.REQUEST_SCOPE_SUFFIX]], member[.value]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[set] operator[SEP] identifier[ServletRequest] identifier[request] , identifier[String] identifier[name] , identifier[Object] identifier[value] operator[SEP] {
identifier[request] operator[SEP] identifier[setAttribute] operator[SEP] identifier[name] opera... |
public Matcher region(int start, int end) {
if ((start < 0) || (start < 0))
throw new IndexOutOfBoundsException("start");
if ((end < 0) || (end > matcher.dataEnd()))
throw new IndexOutOfBoundsException("end");
if (start > end)
throw new IndexOutOfBoundsExcepti... | class class_name[name] begin[{]
method[region, return_type[type[Matcher]], modifier[public], parameter[start, end]] begin[{]
if[binary_operation[binary_operation[member[.start], <, literal[0]], ||, binary_operation[member[.start], <, literal[0]]]] begin[{]
ThrowStatement(expression=ClassCreator... | Keyword[public] identifier[Matcher] identifier[region] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[start] operator[<] Other[0] operator[SEP] operator[||] operator[SEP] identifier[start] operator[<] Other[0] operat... |
@Deprecated
public StringBuilder writeToBuilder(Bean bean, boolean rootType) {
try {
write(bean, rootType, this.builder);
} catch (IOException ex) {
throw new IllegalStateException(ex);
}
return builder;
} | class class_name[name] begin[{]
method[writeToBuilder, return_type[type[StringBuilder]], modifier[public], parameter[bean, rootType]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bean, postfix_operators=[], prefix_operators=[], qualifier... | annotation[@] identifier[Deprecated] Keyword[public] identifier[StringBuilder] identifier[writeToBuilder] operator[SEP] identifier[Bean] identifier[bean] , Keyword[boolean] identifier[rootType] operator[SEP] {
Keyword[try] {
identifier[write] operator[SEP] identifier[bean] , identifier[rootType] , ... |
@Nullable
public static String getFirstToken (@Nullable final String sStr, final char cSearch)
{
final int nIndex = getIndexOf (sStr, cSearch);
return nIndex == StringHelper.STRING_NOT_FOUND ? sStr : sStr.substring (0, nIndex);
} | class class_name[name] begin[{]
method[getFirstToken, return_type[type[String]], modifier[public static], parameter[sStr, cSearch]] begin[{]
local_variable[type[int], nIndex]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=nIndex, postfix_operators=[], prefix_... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[getFirstToken] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sStr] , Keyword[final] Keyword[char] identifier[cSearch] operator[SEP] {
Keyword[final] Keyword[int] ident... |
private void writeName(String uri, String localName, String qName,
boolean isElement) throws SAXException {
String prefix = doPrefix(uri, qName, isElement);
if (prefix != null && !"".equals(prefix)) {
write(prefix);
write(':');
}
if (loc... | class class_name[name] begin[{]
method[writeName, return_type[void], modifier[private], parameter[uri, localName, qName, isElement]] begin[{]
local_variable[type[String], prefix]
if[binary_operation[binary_operation[member[.prefix], !=, literal[null]], &&, literal[""]]] begin[{]
... | Keyword[private] Keyword[void] identifier[writeName] operator[SEP] identifier[String] identifier[uri] , identifier[String] identifier[localName] , identifier[String] identifier[qName] , Keyword[boolean] identifier[isElement] operator[SEP] Keyword[throws] identifier[SAXException] {
identifier[String] identifie... |
public static route[] get(nitro_service service, options option) throws Exception{
route obj = new route();
route[] response = (route[])obj.get_resources(service,option);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[route]], modifier[public static], parameter[service, option]] begin[{]
local_variable[type[route], obj]
local_variable[type[route], response]
return[member[.response]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[route] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[options] identifier[option] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[route] identifier[obj] operator[=] Keyword[new] iden... |
private boolean manageGoal(int agentIndex, Agent agent, Stack255 agentExecutionStack, Goal node) {
// Get the goal type for this goal
GoalType gtype = (GoalType) GlobalState.goalTypes.find(node.getClass().getName());
byte[] ptypes = gtype.getChildren();
assert (ptypes != null);
// Clear any previous... | class class_name[name] begin[{]
method[manageGoal, return_type[type[boolean]], modifier[private], parameter[agentIndex, agent, agentExecutionStack, node]] begin[{]
local_variable[type[GoalType], gtype]
local_variable[type[byte], ptypes]
AssertStatement(condition=BinaryOperation(operandl... | Keyword[private] Keyword[boolean] identifier[manageGoal] operator[SEP] Keyword[int] identifier[agentIndex] , identifier[Agent] identifier[agent] , identifier[Stack255] identifier[agentExecutionStack] , identifier[Goal] identifier[node] operator[SEP] {
identifier[GoalType] identifier[gtype] operator[=] operato... |
static int run(List<InetSocketAddress> namenodes,
Configuration conf) throws IOException, InterruptedException {
final long sleepms = 1000L * 2 * conf.getLong("dfs.heartbeat.interval", 3);
LOG.info("namenodes = " + namenodes);
Formatter formatter = new Formatter(System.out);
System.out.println("Ti... | class class_name[name] begin[{]
method[run, return_type[type[int]], modifier[static], parameter[namenodes, conf]] begin[{]
local_variable[type[long], sleepms]
call[LOG.info, parameter[binary_operation[literal["namenodes = "], +, member[.namenodes]]]]
local_variable[type[Formatte... | Keyword[static] Keyword[int] identifier[run] operator[SEP] identifier[List] operator[<] identifier[InetSocketAddress] operator[>] identifier[namenodes] , identifier[Configuration] identifier[conf] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] {
Keyword[final] Keyword[... |
public void json(String response) {
HttpHandlers.registerPredefined(setup, verb, path, jsonOpts(), response);
} | class class_name[name] begin[{]
method[json, return_type[void], modifier[public], parameter[response]] begin[{]
call[HttpHandlers.registerPredefined, parameter[member[.setup], member[.verb], member[.path], call[.jsonOpts, parameter[]], member[.response]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[json] operator[SEP] identifier[String] identifier[response] operator[SEP] {
identifier[HttpHandlers] operator[SEP] identifier[registerPredefined] operator[SEP] identifier[setup] , identifier[verb] , identifier[path] , identifier[jsonOpts] operator[SEP] operator[SEP] , ... |
Stream<String> writeGauge(Gauge gauge) {
Double value = gauge.value();
if (Double.isFinite(value)) {
return Stream.of(writeMetric(gauge.getId(), config().clock().wallTime(), value));
}
return Stream.empty();
} | class class_name[name] begin[{]
method[writeGauge, return_type[type[Stream]], modifier[default], parameter[gauge]] begin[{]
local_variable[type[Double], value]
if[call[Double.isFinite, parameter[member[.value]]]] begin[{]
return[call[Stream.of, parameter[call[.writeMetric, p... | identifier[Stream] operator[<] identifier[String] operator[>] identifier[writeGauge] operator[SEP] identifier[Gauge] identifier[gauge] operator[SEP] {
identifier[Double] identifier[value] operator[=] identifier[gauge] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[... |
protected Boolean removeExistingEntity(String localId) {
if (StringUtils.isEmpty(localId))
return false;
Team team = teamRepo.findByTeamId(localId);
if (team == null)
return false;
if (!localId.equalsIgnoreCase(team.getTeamId()))
return false;
this.setOldTeamId(team.getId());
this.setOldTeamEnable... | class class_name[name] begin[{]
method[removeExistingEntity, return_type[type[Boolean]], modifier[protected], parameter[localId]] begin[{]
if[call[StringUtils.isEmpty, parameter[member[.localId]]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[... | Keyword[protected] identifier[Boolean] identifier[removeExistingEntity] operator[SEP] identifier[String] identifier[localId] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[localId] operator[SEP] operator[SEP] Keyword[return] literal[bo... |
public void marshall(WorkGroup workGroup, ProtocolMarshaller protocolMarshaller) {
if (workGroup == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(workGroup.getName(), NAME_BINDING);
prot... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[workGroup, protocolMarshaller]] begin[{]
if[binary_operation[member[.workGroup], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[WorkGroup] identifier[workGroup] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[workGroup] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[... |
public boolean toLong(LongWrapper toLongResult) {
if (numBytes == 0) {
return false;
}
byte b = getByte(0);
final boolean negative = b == '-';
int offset = 0;
if (negative || b == '+') {
offset++;
if (numBytes == 1) {
return false;
}
}
final byte separat... | class class_name[name] begin[{]
method[toLong, return_type[type[boolean]], modifier[public], parameter[toLongResult]] begin[{]
if[binary_operation[member[.numBytes], ==, literal[0]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[typ... | Keyword[public] Keyword[boolean] identifier[toLong] operator[SEP] identifier[LongWrapper] identifier[toLongResult] operator[SEP] {
Keyword[if] operator[SEP] identifier[numBytes] operator[==] Other[0] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[byte] identifie... |
@Nonnull
public static EChange removeCookie (@Nullable final String sName)
{
if (StringHelper.hasNoText (sName))
return EChange.UNCHANGED;
return s_aRWLock.writeLocked ( () -> s_aCookies.removeObject (sName));
} | class class_name[name] begin[{]
method[removeCookie, return_type[type[EChange]], modifier[public static], parameter[sName]] begin[{]
if[call[StringHelper.hasNoText, parameter[member[.sName]]]] begin[{]
return[member[EChange.UNCHANGED]]
else begin[{]
None
end[}]
return[ca... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[EChange] identifier[removeCookie] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sName] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringHelper] operator[SEP] identifier[hasNoText... |
private static Class<?> getProxyClass0(ClassLoader loader,
Class<?>... interfaces) {
if (interfaces.length > 65535) {
throw new IllegalArgumentException("interface limit exceeded");
}
Class<?> proxyClass = null;
/* collect interfac... | class class_name[name] begin[{]
method[getProxyClass0, return_type[type[Class]], modifier[private static], parameter[loader, interfaces]] begin[{]
if[binary_operation[member[interfaces.length], >, literal[65535]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(po... | Keyword[private] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[getProxyClass0] operator[SEP] identifier[ClassLoader] identifier[loader] , identifier[Class] operator[<] operator[?] operator[>] operator[...] identifier[interfaces] operator[SEP] {
Keyword[if] operator[SEP] identi... |
public static double getStirlingError(double z) {
double ret;
if (z < 15.0) {
double z2 = 2.0 * z;
if (FastMath.floor(z2) == z2) {
ret = EXACT_STIRLING_ERRORS[(int) z2];
} else {
ret = Gamma.logGamma(z + 1.0) - (z + 0.5) * FastMath.log(... | class class_name[name] begin[{]
method[getStirlingError, return_type[type[double]], modifier[public static], parameter[z]] begin[{]
local_variable[type[double], ret]
if[binary_operation[member[.z], <, literal[15.0]]] begin[{]
local_variable[type[double], z2]
... | Keyword[public] Keyword[static] Keyword[double] identifier[getStirlingError] operator[SEP] Keyword[double] identifier[z] operator[SEP] {
Keyword[double] identifier[ret] operator[SEP] Keyword[if] operator[SEP] identifier[z] operator[<] literal[Float] operator[SEP] {
Keyword[double] identifier[z2] opera... |
@SuppressWarnings("rawtypes")
protected String extractPassword(Object credentials) {
String password = null;
if (credentials instanceof String) {
password = (String) credentials;
} else if (credentials instanceof Map) {
password = (String) ((Map) credentials).get(Message... | class class_name[name] begin[{]
method[extractPassword, return_type[type[String]], modifier[protected], parameter[credentials]] begin[{]
local_variable[type[String], password]
if[binary_operation[member[.credentials], instanceof, type[String]]] begin[{]
assign[me... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[String] identifier[extractPassword] operator[SEP] identifier[Object] identifier[credentials] operator[SEP] {
identifier[String] identifier[password] operator[=] Other[null] operator[SEP] Keyword[i... |
public SIMPRequestMessageInfo getRequestMessageInfo() throws SIMPRuntimeOperationFailedException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getRequestMessageInfo");
SIMPRequestMessageInfo requestMessageInfo = null;
try
{
if (State.REQUEST.toString(... | class class_name[name] begin[{]
method[getRequestMessageInfo, return_type[type[SIMPRequestMessageInfo]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.... | Keyword[public] identifier[SIMPRequestMessageInfo] identifier[getRequestMessageInfo] operator[SEP] operator[SEP] Keyword[throws] identifier[SIMPRuntimeOperationFailedException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operato... |
public static Class<?> childClassOf(final Class<?> parentClass, final Object instance) {
if (instance == null || instance == Object.class) {
return null;
}
if (parentClass != null) {
if (parentClass.isInterface()) {
return null;
}
}
Class<?> childClass = instance.getClass();
while (true) {
... | class class_name[name] begin[{]
method[childClassOf, return_type[type[Class]], modifier[public static], parameter[parentClass, instance]] begin[{]
if[binary_operation[binary_operation[member[.instance], ==, literal[null]], ||, binary_operation[member[.instance], ==, ClassReference(postfix_opera... | Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[childClassOf] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[parentClass] , Keyword[final] identifier[Object] identifier[instance] operator[SEP] {
Keyword[if] operator[... |
public static String replace(String str, String oldStr, String replacement) {
return str.replace(oldStr, replacement);
} | class class_name[name] begin[{]
method[replace, return_type[type[String]], modifier[public static], parameter[str, oldStr, replacement]] begin[{]
return[call[str.replace, parameter[member[.oldStr], member[.replacement]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[replace] operator[SEP] identifier[String] identifier[str] , identifier[String] identifier[oldStr] , identifier[String] identifier[replacement] operator[SEP] {
Keyword[return] identifier[str] operator[SEP] identifier[replace] operator[SEP] identifier... |
protected boolean processTableMeta(EntryPosition position) {
if (tableMetaTSDB != null) {
if (position.getTimestamp() == null || position.getTimestamp() <= 0) {
throw new CanalParseException("use gtid and TableMeta TSDB should be config timestamp > 0");
}
ret... | class class_name[name] begin[{]
method[processTableMeta, return_type[type[boolean]], modifier[protected], parameter[position]] begin[{]
if[binary_operation[member[.tableMetaTSDB], !=, literal[null]]] begin[{]
if[binary_operation[binary_operation[call[position.getTimestam... | Keyword[protected] Keyword[boolean] identifier[processTableMeta] operator[SEP] identifier[EntryPosition] identifier[position] operator[SEP] {
Keyword[if] operator[SEP] identifier[tableMetaTSDB] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[position] operator[SEP] identi... |
private ChannelHandler channelInitFix(final ChannelHandler handler)
{
ChannelHandler fixedHandler=new ShareableChannelInboundHandler() {
@Override
public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
Channel ch=ctx.channel();
setChannel(ch);
ctx.pipeline().addLast(handler);
... | class class_name[name] begin[{]
method[channelInitFix, return_type[type[ChannelHandler]], modifier[private], parameter[handler]] begin[{]
local_variable[type[ChannelHandler], fixedHandler]
return[member[.fixedHandler]]
end[}]
END[}] | Keyword[private] identifier[ChannelHandler] identifier[channelInitFix] operator[SEP] Keyword[final] identifier[ChannelHandler] identifier[handler] operator[SEP] {
identifier[ChannelHandler] identifier[fixedHandler] operator[=] Keyword[new] identifier[ShareableChannelInboundHandler] operator[SEP] operator[SEP] {... |
public static <T> Generator<PVector3D<T>> createNormal()
{
return new PVector3DGenerator<>(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[T] operator[>] identifier[Generator] operator[<] identifier[PVector3D] operator[<] identifier[T] operator[>] operator[>] identifier[createNormal] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[PVector3DGenerator] operator[<] operator[>... |
public ServiceFuture<String> getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback<String> serviceCallback) {
return ServiceFuture.fromResponse(getVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback)... | class class_name[name] begin[{]
method[getVpnProfilePackageUrlAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, virtualNetworkGatewayName, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.getVpnProfilePackageUrlWithServiceResponseA... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[String] operator[>] identifier[getVpnProfilePackageUrlAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualNetworkGatewayName] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[St... |
@Override
public void initializeUI(UIBuilder builder) throws Exception
{
super.initializeUI(builder);
getNamed().setDefaultValue("NewCrossOriginResourceSharingFilter");
accessControlAllowHeaders.setValue(Arrays.asList("Content-Type", "User-Agent", "X-Requested-With",
"X-Requested-... | class class_name[name] begin[{]
method[initializeUI, return_type[void], modifier[public], parameter[builder]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initializeUI, postfix_operators=[... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[initializeUI] operator[SEP] identifier[UIBuilder] identifier[builder] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[super] operator[SEP] identifier[initializeUI] operator[SEP] identifier[builder] operator[SEP] operator[SE... |
public void marshall(GetRepositoryRequest getRepositoryRequest, ProtocolMarshaller protocolMarshaller) {
if (getRepositoryRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(getRepositoryReques... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getRepositoryRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getRepositoryRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Liter... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetRepositoryRequest] identifier[getRepositoryRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getRepositoryRequest] operator[==] Other[null] operator[SEP] {
... |
private static String aliasAsUrlPattern(final String alias) {
String urlPattern = alias;
if (urlPattern != null && !urlPattern.equals("/")
&& !urlPattern.contains("*")) {
if (urlPattern.endsWith("/")) {
urlPattern = urlPattern + "*";
} else {
urlPattern = urlPattern + "/*";
}
}
return urlPa... | class class_name[name] begin[{]
method[aliasAsUrlPattern, return_type[type[String]], modifier[private static], parameter[alias]] begin[{]
local_variable[type[String], urlPattern]
if[binary_operation[binary_operation[binary_operation[member[.urlPattern], !=, literal[null]], &&, call[urlP... | Keyword[private] Keyword[static] identifier[String] identifier[aliasAsUrlPattern] operator[SEP] Keyword[final] identifier[String] identifier[alias] operator[SEP] {
identifier[String] identifier[urlPattern] operator[=] identifier[alias] operator[SEP] Keyword[if] operator[SEP] identifier[urlPattern] operator[!=] O... |
public Field getFormFieldValueFor(
FormFieldMapping formFieldMappingParam,
Long formContainerIdParam,
boolean includeTableFieldFormRecordInfoParam
) {
if(formFieldMappingParam == null) {
return null;
}
//First attempt to fetch from the cache...
if(this.getCacheUtil() != null) {
CacheUtil.Cached... | class class_name[name] begin[{]
method[getFormFieldValueFor, return_type[type[Field]], modifier[public], parameter[formFieldMappingParam, formContainerIdParam, includeTableFieldFormRecordInfoParam]] begin[{]
if[binary_operation[member[.formFieldMappingParam], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[Field] identifier[getFormFieldValueFor] operator[SEP] identifier[FormFieldMapping] identifier[formFieldMappingParam] , identifier[Long] identifier[formContainerIdParam] , Keyword[boolean] identifier[includeTableFieldFormRecordInfoParam] operator[SEP] {
Keyword[if] operator[SEP] ident... |
public void removeTag(Reference reference, String tag) {
getResourceFactory()
.getApiResource("/tag/" + reference.toURLFragment())
.queryParam("text", tag).delete();
} | class class_name[name] begin[{]
method[removeTag, return_type[void], modifier[public], parameter[reference, tag]] begin[{]
call[.getResourceFactory, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[removeTag] operator[SEP] identifier[Reference] identifier[reference] , identifier[String] identifier[tag] operator[SEP] {
identifier[getResourceFactory] operator[SEP] operator[SEP] operator[SEP] identifier[getApiResource] operator[SEP] literal[String] operator[+] identif... |
public static int cuMemsetD8(CUdeviceptr dstDevice, byte uc, long N)
{
return checkResult(cuMemsetD8Native(dstDevice, uc, N));
} | class class_name[name] begin[{]
method[cuMemsetD8, return_type[type[int]], modifier[public static], parameter[dstDevice, uc, N]] begin[{]
return[call[.checkResult, parameter[call[.cuMemsetD8Native, parameter[member[.dstDevice], member[.uc], member[.N]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[int] identifier[cuMemsetD8] operator[SEP] identifier[CUdeviceptr] identifier[dstDevice] , Keyword[byte] identifier[uc] , Keyword[long] identifier[N] operator[SEP] {
Keyword[return] identifier[checkResult] operator[SEP] identifier[cuMemsetD8Native] operator[SEP] identifie... |
@RequestMapping("/web/frontend")
public String webFrontend(HttpServletRequest request){
Map<String, String> receives = new HashMap<>();
// TODO 这里还是建议直接从request中获取map参数,兼容支付宝修改或增减参数
for (AlipayField f : AlipayFields.WEB_PAY_RETURN){
receives.put(f.field(), request.getParameter(... | class class_name[name] begin[{]
method[webFrontend, return_type[type[String]], modifier[public], parameter[request]] begin[{]
local_variable[type[Map], receives]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(... | annotation[@] identifier[RequestMapping] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[String] identifier[webFrontend] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identif... |
public ListReusableDelegationSetsResult withDelegationSets(DelegationSet... delegationSets) {
if (this.delegationSets == null) {
setDelegationSets(new com.amazonaws.internal.SdkInternalList<DelegationSet>(delegationSets.length));
}
for (DelegationSet ele : delegationSets) {
... | class class_name[name] begin[{]
method[withDelegationSets, return_type[type[ListReusableDelegationSetsResult]], modifier[public], parameter[delegationSets]] begin[{]
if[binary_operation[THIS[member[None.delegationSets]], ==, literal[null]]] begin[{]
call[.setDelegationSe... | Keyword[public] identifier[ListReusableDelegationSetsResult] identifier[withDelegationSets] operator[SEP] identifier[DelegationSet] operator[...] identifier[delegationSets] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[delegationSets] operator[==] Other[null] operator[SEP] {
... |
public RequestBuilder get(final String url) {
checkNotNull(url, "url may not be null");
final AsyncHttpClient.BoundRequestBuilder ningRequestBuilder = asyncHttpClient.prepareGet(url);
return createNewRequestBuilder(url, ningRequestBuilder);
} | class class_name[name] begin[{]
method[get, return_type[type[RequestBuilder]], modifier[public], parameter[url]] begin[{]
call[.checkNotNull, parameter[member[.url], literal["url may not be null"]]]
local_variable[type[AsyncHttpClient], ningRequestBuilder]
return[call[.createNew... | Keyword[public] identifier[RequestBuilder] identifier[get] operator[SEP] Keyword[final] identifier[String] identifier[url] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[url] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[AsyncHttpClient] operator[SEP] identifier[Boun... |
public List<TiffObject> getIfds() {
List<TiffObject> l = new ArrayList<TiffObject>();
if (metadata != null && metadata.contains("IFD"))
l = getMetadataList("IFD");
return l;
} | class class_name[name] begin[{]
method[getIfds, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], l]
if[binary_operation[binary_operation[member[.metadata], !=, literal[null]], &&, call[metadata.contains, parameter[literal["IFD"]]]]] begin[{]
... | Keyword[public] identifier[List] operator[<] identifier[TiffObject] operator[>] identifier[getIfds] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[TiffObject] operator[>] identifier[l] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[TiffObject] operator[>] operator[SE... |
public String convertIfcChangeActionEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
} | class class_name[name] begin[{]
method[convertIfcChangeActionEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operators=... | Keyword[public] identifier[String] identifier[convertIfcChangeActionEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] {
Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] ident... |
protected String toActionUrl(Class<?> actionType, UrlChain chain) {
assertArgumentNotNull("actionType", actionType);
assertArgumentNotNull("chain", chain);
return actionPathResolver.toActionUrl(actionType, chain);
} | class class_name[name] begin[{]
method[toActionUrl, return_type[type[String]], modifier[protected], parameter[actionType, chain]] begin[{]
call[.assertArgumentNotNull, parameter[literal["actionType"], member[.actionType]]]
call[.assertArgumentNotNull, parameter[literal["chain"],... | Keyword[protected] identifier[String] identifier[toActionUrl] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[actionType] , identifier[UrlChain] identifier[chain] operator[SEP] {
identifier[assertArgumentNotNull] operator[SEP] literal[String] , identifier[actionType] operator[SEP... |
@SuppressWarnings("unchecked")
public DynamicType.Builder<T> ignoreAlso(LatentMatcher<? super MethodDescription> ignoredMethods) {
return new DecoratingDynamicTypeBuilder<T>(instrumentedType,
typeAttributeAppender,
asmVisitorWrapper,
classFileVersion,
... | class class_name[name] begin[{]
method[ignoreAlso, return_type[type[DynamicType]], modifier[public], parameter[ignoredMethods]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=instrumentedType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[DynamicType] operator[SEP] identifier[Builder] operator[<] identifier[T] operator[>] identifier[ignoreAlso] operator[SEP] identifier[LatentMatcher] operator[<] operator[?] Keyword[super] identifier[MethodDe... |
public static ParameterDef Scaled(final int sqlType, final int scale) {
return new ParameterDef(jdbcTypeMappings.get(sqlType),
parameterModeIn,
sqlType,
jdbcTypeNames.get(sqlType),
jdb... | class class_name[name] begin[{]
method[Scaled, return_type[type[ParameterDef]], modifier[public static], parameter[sqlType, scale]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=sqlType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], ... | Keyword[public] Keyword[static] identifier[ParameterDef] identifier[Scaled] operator[SEP] Keyword[final] Keyword[int] identifier[sqlType] , Keyword[final] Keyword[int] identifier[scale] operator[SEP] {
Keyword[return] Keyword[new] identifier[ParameterDef] operator[SEP] identifier[jdbcTypeMappings] operator[SEP]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.