code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
private boolean isSymbolAQuotedObjectKey(Symbol symbol) {
Node node = symbol.getDeclarationNode();
return node != null && node.isStringKey() && node.isQuotedString();
} | class class_name[name] begin[{]
method[isSymbolAQuotedObjectKey, return_type[type[boolean]], modifier[private], parameter[symbol]] begin[{]
local_variable[type[Node], node]
return[binary_operation[binary_operation[binary_operation[member[.node], !=, literal[null]], &&, call[node.isStringKey, pa... | Keyword[private] Keyword[boolean] identifier[isSymbolAQuotedObjectKey] operator[SEP] identifier[Symbol] identifier[symbol] operator[SEP] {
identifier[Node] identifier[node] operator[=] identifier[symbol] operator[SEP] identifier[getDeclarationNode] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identi... |
public EClass getIfcRampFlightType() {
if (ifcRampFlightTypeEClass == null) {
ifcRampFlightTypeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(424);
}
return ifcRampFlightTypeEClass;
} | class class_name[name] begin[{]
method[getIfcRampFlightType, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcRampFlightTypeEClass], ==, literal[null]]] begin[{]
assign[member[.ifcRampFlightTypeEClass], Cast(expression=Met... | Keyword[public] identifier[EClass] identifier[getIfcRampFlightType] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcRampFlightTypeEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcRampFlightTypeEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identi... |
@SuppressWarnings("unchecked")
public static int compare(Object o1, Object o2) {
if (o1 == null && o2 == null) {
return 0;
} else if (o1 == null) {
return 1;
} else if (o2 == null) {
return -1;
}
return Cast.<Comparable>as(o1).compareTo(o2);
} | class class_name[name] begin[{]
method[compare, return_type[type[int]], modifier[public static], parameter[o1, o2]] begin[{]
if[binary_operation[binary_operation[member[.o1], ==, literal[null]], &&, binary_operation[member[.o2], ==, literal[null]]]] begin[{]
return[literal[0]]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[int] identifier[compare] operator[SEP] identifier[Object] identifier[o1] , identifier[Object] identifier[o2] operator[SEP] {
Keyword[if] operator[SEP] identifier[o1] operator[==] Other[... |
public static GribCollectionProto.GribAxisType convertAxisType(Coordinate.Type type) {
switch (type) {
case runtime:
return GribCollectionProto.GribAxisType.runtime;
case time:
return GribCollectionProto.GribAxisType.time;
case time2D:
return GribCollectionProto.GribAxisTyp... | class class_name[name] begin[{]
method[convertAxisType, return_type[type[GribCollectionProto]], modifier[public static], parameter[type]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['runtime'], statements=[ReturnStatement(expression=MemberReference(member=runtime, postfix_operators=[], pr... | Keyword[public] Keyword[static] identifier[GribCollectionProto] operator[SEP] identifier[GribAxisType] identifier[convertAxisType] operator[SEP] identifier[Coordinate] operator[SEP] identifier[Type] identifier[type] operator[SEP] {
Keyword[switch] operator[SEP] identifier[type] operator[SEP] {
Keyword... |
static synchronized public void setGlobalConnectionTimeout(int timeout)
{
if(timeout >= 0) {
globalsettings.put(Prop.CONN_TIMEOUT, (Integer) timeout);
globalsettings.put(Prop.CONN_REQ_TIMEOUT, (Integer) timeout);
}
} | class class_name[name] begin[{]
method[setGlobalConnectionTimeout, return_type[void], modifier[synchronized public static], parameter[timeout]] begin[{]
if[binary_operation[member[.timeout], >=, literal[0]]] begin[{]
call[globalsettings.put, parameter[member[Prop.CONN_TI... | Keyword[static] Keyword[synchronized] Keyword[public] Keyword[void] identifier[setGlobalConnectionTimeout] operator[SEP] Keyword[int] identifier[timeout] operator[SEP] {
Keyword[if] operator[SEP] identifier[timeout] operator[>=] Other[0] operator[SEP] {
identifier[globalsettings] operator[SEP] identif... |
public static Optional<Element> getChildElement(final Element elem, final String ns, final String name) {
final NodeList children = elem.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
final Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_... | class class_name[name] begin[{]
method[getChildElement, return_type[type[Optional]], modifier[public static], parameter[elem, ns, name]] begin[{]
local_variable[type[NodeList], children]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarator... | Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[Element] operator[>] identifier[getChildElement] operator[SEP] Keyword[final] identifier[Element] identifier[elem] , Keyword[final] identifier[String] identifier[ns] , Keyword[final] identifier[String] identifier[name] operator[SEP] {
... |
public static RowRanges calculateRowRanges(FilterCompat.Filter filter, ColumnIndexStore columnIndexStore,
Set<ColumnPath> paths, long rowCount) {
return filter.accept(new FilterCompat.Visitor<RowRanges>() {
@Override
public RowRanges visit(FilterPredicateCompat filterPredicateCompat) {
try... | class class_name[name] begin[{]
method[calculateRowRanges, return_type[type[RowRanges]], modifier[public static], parameter[filter, columnIndexStore, paths, rowCount]] begin[{]
return[call[filter.accept, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, ... | Keyword[public] Keyword[static] identifier[RowRanges] identifier[calculateRowRanges] operator[SEP] identifier[FilterCompat] operator[SEP] identifier[Filter] identifier[filter] , identifier[ColumnIndexStore] identifier[columnIndexStore] , identifier[Set] operator[<] identifier[ColumnPath] operator[>] identifier[paths]... |
public void displayDialog() throws Exception {
Map<String, String[]> params = initAdminTool();
// explorer view dialogs
if (CmsExplorerDialog.EXPLORER_TOOLS.contains(getCurrentToolPath())) {
if (getAction() == CmsDialog.ACTION_CANCEL) {
actionCloseDialog();
... | class class_name[name] begin[{]
method[displayDialog, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[Map], params]
if[call[CmsExplorerDialog.EXPLORER_TOOLS.contains, parameter[call[.getCurrentToolPath, parameter[]]]]] begin[{]
if[b... | Keyword[public] Keyword[void] identifier[displayDialog] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Map] operator[<] identifier[String] , identifier[String] operator[SEP] operator[SEP] operator[>] identifier[params] operator[=] identifier[initAdminTool] operator[SEP] operator[... |
@Override
public Message toMessage(final Throwable throwable) {
LOG.error("The system is currently unavailable", throwable);
return new Message(Message.ERROR_MESSAGE, InternalMessages.DEFAULT_SYSTEM_ERROR);
} | class class_name[name] begin[{]
method[toMessage, return_type[type[Message]], modifier[public], parameter[throwable]] begin[{]
call[LOG.error, parameter[literal["The system is currently unavailable"], member[.throwable]]]
return[ClassCreator(arguments=[MemberReference(member=ERROR_MESSA... | annotation[@] identifier[Override] Keyword[public] identifier[Message] identifier[toMessage] operator[SEP] Keyword[final] identifier[Throwable] identifier[throwable] operator[SEP] {
identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[throwable] operator[SEP] operator[SEP] ... |
@Implementation(minSdk = P)
protected static void nativeThemeClear(long themePtr) {
Registries.NATIVE_THEME9_REGISTRY.getNativeObject(themePtr).Clear();
} | class class_name[name] begin[{]
method[nativeThemeClear, return_type[void], modifier[static protected], parameter[themePtr]] begin[{]
call[Registries.NATIVE_THEME9_REGISTRY.getNativeObject, parameter[member[.themePtr]]]
end[}]
END[}] | annotation[@] identifier[Implementation] operator[SEP] identifier[minSdk] operator[=] identifier[P] operator[SEP] Keyword[protected] Keyword[static] Keyword[void] identifier[nativeThemeClear] operator[SEP] Keyword[long] identifier[themePtr] operator[SEP] {
identifier[Registries] operator[SEP] identifier[NATIVE_T... |
public Mono<ServiceMessage> requestOne(
ServiceMessage request, Class<?> responseType, Address address) {
return Mono.defer(
() -> {
requireNonNull(address, "requestOne address parameter is required and must not be null");
requireNonNull(transport, "transport is required and must n... | class class_name[name] begin[{]
method[requestOne, return_type[type[Mono]], modifier[public], parameter[request, responseType, address]] begin[{]
return[call[Mono.defer, parameter[LambdaExpression(body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=address, postfix_o... | Keyword[public] identifier[Mono] operator[<] identifier[ServiceMessage] operator[>] identifier[requestOne] operator[SEP] identifier[ServiceMessage] identifier[request] , identifier[Class] operator[<] operator[?] operator[>] identifier[responseType] , identifier[Address] identifier[address] operator[SEP] {
Keyw... |
public String getParentId() {
return mBodyMap.containsKey(BoxItem.FIELD_PARENT) ?
((BoxFolder) mBodyMap.get(BoxItem.FIELD_PARENT)).getId() :
null;
} | class class_name[name] begin[{]
method[getParentId, return_type[type[String]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=FIELD_PARENT, postfix_operators=[], prefix_operators=[], qualifier=BoxItem, selectors=[])], member... | Keyword[public] identifier[String] identifier[getParentId] operator[SEP] operator[SEP] {
Keyword[return] identifier[mBodyMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[BoxItem] operator[SEP] identifier[FIELD_PARENT] operator[SEP] operator[?] operator[SEP] operator[SEP] identifier[BoxFolder] ... |
public static systemuser get(nitro_service service, String username) throws Exception{
systemuser obj = new systemuser();
obj.set_username(username);
systemuser response = (systemuser) obj.get_resource(service);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[systemuser]], modifier[public static], parameter[service, username]] begin[{]
local_variable[type[systemuser], obj]
call[obj.set_username, parameter[member[.username]]]
local_variable[type[systemuser], response]
... | Keyword[public] Keyword[static] identifier[systemuser] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[username] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[systemuser] identifier[obj] operator[=] Keyword[new] identifier[systemuser... |
public static void applyTransform(GrayU8 input , int transform[] , GrayU8 output ) {
output.reshape(input.width,input.height);
if( BoofConcurrency.USE_CONCURRENT ) {
ImplEnhanceHistogram_MT.applyTransform(input, transform, output);
} else {
ImplEnhanceHistogram.applyTransform(input, transform, output);
}... | class class_name[name] begin[{]
method[applyTransform, return_type[void], modifier[public static], parameter[input, transform, output]] begin[{]
call[output.reshape, parameter[member[input.width], member[input.height]]]
if[member[BoofConcurrency.USE_CONCURRENT]] begin[{]
... | Keyword[public] Keyword[static] Keyword[void] identifier[applyTransform] operator[SEP] identifier[GrayU8] identifier[input] , Keyword[int] identifier[transform] operator[SEP] operator[SEP] , identifier[GrayU8] identifier[output] operator[SEP] {
identifier[output] operator[SEP] identifier[reshape] operator[SEP]... |
private static final boolean isCurrentUOW(Object uow) {
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(TRACE, "isCurrentUOW", uow);
}
boolean isSameUOW = false;
if (isRunningInWAS()) {
Object currentUOW = getCurrentUOWCoord();
... | class class_name[name] begin[{]
method[isCurrentUOW, return_type[type[boolean]], modifier[final private static], parameter[uow]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[TRACE.isEntryEnabled, parameter[]]]] begin[{]
cal... | Keyword[private] Keyword[static] Keyword[final] Keyword[boolean] identifier[isCurrentUOW] operator[SEP] identifier[Object] identifier[uow] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[TRACE] ... |
private void reset() {
size = 0;
qualifier_index = 0;
value_index = 0;
base_time = Long.MIN_VALUE;
last_timestamp = Long.MIN_VALUE;
} | class class_name[name] begin[{]
method[reset, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.size], literal[0]]
assign[member[.qualifier_index], literal[0]]
assign[member[.value_index], literal[0]]
assign[member[.base_t... | Keyword[private] Keyword[void] identifier[reset] operator[SEP] operator[SEP] {
identifier[size] operator[=] Other[0] operator[SEP] identifier[qualifier_index] operator[=] Other[0] operator[SEP] identifier[value_index] operator[=] Other[0] operator[SEP] identifier[base_time] operator[=] identifier[Long] operator[... |
public static Type[] getSuperClassGenricTypes(final Class<?> clazz) {
Type[] temp = { Object.class };
// eg: ClassA<T>
if (clazz == null)
return null;
Type type = clazz.getGenericSuperclass();
if (type instanceof ParameterizedType) {
return ((ParameterizedType) type).getActualTypeArguments();
} el... | class class_name[name] begin[{]
method[getSuperClassGenricTypes, return_type[type[Type]], modifier[public static], parameter[clazz]] begin[{]
local_variable[type[Type], temp]
if[binary_operation[member[.clazz], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
Non... | Keyword[public] Keyword[static] identifier[Type] operator[SEP] operator[SEP] identifier[getSuperClassGenricTypes] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] {
identifier[Type] operator[SEP] operator[SEP] identifier[temp] operator[=] {
... |
@XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "category", scope = SourceType.class)
public JAXBElement<CategoryType> createSourceTypeCategory(CategoryType value) {
return new JAXBElement<CategoryType>(ENTRY_TYPE_CATEGORY_QNAME,
CategoryType.class, SourceType.class, value)... | class class_name[name] begin[{]
method[createSourceTypeCategory, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=ENTRY_TYPE_CATEGORY_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassRefer... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[SourceType] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[Categ... |
public void reconstituteGDTargetStreams()
throws MessageStoreException, SIException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "reconstituteGDTargetStreams");
_targetProtocolItemStream.reconstitute(_baseDestinationHandler,
... | class class_name[name] begin[{]
method[reconstituteGDTargetStreams, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[m... | Keyword[public] Keyword[void] identifier[reconstituteGDTargetStreams] operator[SEP] operator[SEP] Keyword[throws] identifier[MessageStoreException] , identifier[SIException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[... |
@Override
public void addEvent(Event event) {
logger.warn("Security event " + event.getDetectionPoint().getLabel() + " triggered by user: " + event.getUser().getUsername());
String json = gson.toJson(event);
events.insertOne(Document.parse(String.valueOf(JSON.parse(json))));
super.notifyListeners(even... | class class_name[name] begin[{]
method[addEvent, return_type[void], modifier[public], parameter[event]] begin[{]
call[logger.warn, parameter[binary_operation[binary_operation[binary_operation[literal["Security event "], +, call[event.getDetectionPoint, parameter[]]], +, literal[" triggered by u... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[addEvent] operator[SEP] identifier[Event] identifier[event] operator[SEP] {
identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[event] operator[SEP] identifier[getDetectionPoint] operato... |
public static DMatrixRMaj convert( Homography2D_F64 m , DMatrixRMaj ret ) {
if( ret == null ) {
ret = new DMatrixRMaj(3,3);
} else if( ret.numCols != 3 || ret.numRows != 3)
throw new IllegalArgumentException("Expected a 3 by 3 matrix.");
ret.unsafe_set(0,0,m.a11);
ret.unsafe_set(0,1,m.a12);
ret.unsafe... | class class_name[name] begin[{]
method[convert, return_type[type[DMatrixRMaj]], modifier[public static], parameter[m, ret]] begin[{]
if[binary_operation[member[.ret], ==, literal[null]]] begin[{]
assign[member[.ret], ClassCreator(arguments=[Literal(postfix_operators=[], ... | Keyword[public] Keyword[static] identifier[DMatrixRMaj] identifier[convert] operator[SEP] identifier[Homography2D_F64] identifier[m] , identifier[DMatrixRMaj] identifier[ret] operator[SEP] {
Keyword[if] operator[SEP] identifier[ret] operator[==] Other[null] operator[SEP] {
identifier[ret] operator[=]... |
public static void createDebugBorder(JComponent c, Color color) {
if (color == null) {
color = Color.BLACK;
}
c.setBorder(BorderFactory.createLineBorder(color));
} | class class_name[name] begin[{]
method[createDebugBorder, return_type[void], modifier[public static], parameter[c, color]] begin[{]
if[binary_operation[member[.color], ==, literal[null]]] begin[{]
assign[member[.color], member[Color.BLACK]]
else begin[{]
None
... | Keyword[public] Keyword[static] Keyword[void] identifier[createDebugBorder] operator[SEP] identifier[JComponent] identifier[c] , identifier[Color] identifier[color] operator[SEP] {
Keyword[if] operator[SEP] identifier[color] operator[==] Other[null] operator[SEP] {
identifier[color] operator[=] ident... |
public Observable<ExpressRouteCircuitStatsInner> getPeeringStatsAsync(String resourceGroupName, String circuitName, String peeringName) {
return getPeeringStatsWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).map(new Func1<ServiceResponse<ExpressRouteCircuitStatsInner>, ExpressRouteCircuitS... | class class_name[name] begin[{]
method[getPeeringStatsAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, circuitName, peeringName]] begin[{]
return[call[.getPeeringStatsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.circuitName], member[.peerin... | Keyword[public] identifier[Observable] operator[<] identifier[ExpressRouteCircuitStatsInner] operator[>] identifier[getPeeringStatsAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[circuitName] , identifier[String] identifier[peeringName] operator[SEP] {
Keyw... |
public static String join(final Object array, final String separator) {
return isArray(array) ? join(toArray(array, ClassUtils.getComponentClass(array)), separator)
: Objects.toString(array);
} | class class_name[name] begin[{]
method[join, return_type[type[String]], modifier[public static], parameter[array, separator]] begin[{]
return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], memb... | Keyword[public] Keyword[static] identifier[String] identifier[join] operator[SEP] Keyword[final] identifier[Object] identifier[array] , Keyword[final] identifier[String] identifier[separator] operator[SEP] {
Keyword[return] identifier[isArray] operator[SEP] identifier[array] operator[SEP] operator[?] identifier... |
public final String buildAuthority() {
// scheme, [user info], host, [port]
StringBuilder buf = new StringBuilder();
buf.append(Preconditions.checkNotNull(scheme));
buf.append("://");
if (userInfo != null) {
buf.append(CharEscapers.escapeUriUserInfo(userInfo)).append('@');
}
buf.append... | class class_name[name] begin[{]
method[buildAuthority, return_type[type[String]], modifier[final public], parameter[]] begin[{]
local_variable[type[StringBuilder], buf]
call[buf.append, parameter[call[Preconditions.checkNotNull, parameter[member[.scheme]]]]]
call[buf.app... | Keyword[public] Keyword[final] identifier[String] identifier[buildAuthority] operator[SEP] operator[SEP] {
identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] identifi... |
public void writeExternal(ObjectOutput out) throws IOException
{
byte[] buf = entry.getNamespace().getBytes(Constants.DEFAULT_ENCODING);
out.writeInt(buf.length);
out.write(buf);
buf = entry.getName().getBytes(Constants.DEFAULT_ENCODING);
out.writeInt(buf.length);
out.wri... | class class_name[name] begin[{]
method[writeExternal, return_type[void], modifier[public], parameter[out]] begin[{]
local_variable[type[byte], buf]
call[out.writeInt, parameter[member[buf.length]]]
call[out.write, parameter[member[.buf]]]
assign[member[.b... | Keyword[public] Keyword[void] identifier[writeExternal] operator[SEP] identifier[ObjectOutput] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[buf] operator[=] identifier[entry] operator[SEP] identifier[getNamespace] operator[SEP] opera... |
public final boolean doInRedis(List<RedisClient> clients, boolean isRead, Object key) {
List<Integer> randomIndexs = RandomUtil.randomizeWithinLimit(clients.size());
boolean success = false;
for (Integer index : randomIndexs) {
RedisClient client = clients.get(index);
lon... | class class_name[name] begin[{]
method[doInRedis, return_type[type[boolean]], modifier[final public], parameter[clients, isRead, key]] begin[{]
local_variable[type[List], randomIndexs]
local_variable[type[boolean], success]
ForStatement(body=BlockStatement(label=None, statements=[LocalV... | Keyword[public] Keyword[final] Keyword[boolean] identifier[doInRedis] operator[SEP] identifier[List] operator[<] identifier[RedisClient] operator[>] identifier[clients] , Keyword[boolean] identifier[isRead] , identifier[Object] identifier[key] operator[SEP] {
identifier[List] operator[<] identifier[Integer] op... |
public static WebcamInterface loadManager( String pathToManager ) {
try {
Class c = Class.forName(pathToManager);
return (WebcamInterface) c.newInstance();
} catch (ClassNotFoundException e) {
throw new RuntimeException("Class not found. Is it included in the class path?");
} catch (InstantiationExcepti... | class class_name[name] begin[{]
method[loadManager, return_type[type[WebcamInterface]], modifier[public static], parameter[pathToManager]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberR... | Keyword[public] Keyword[static] identifier[WebcamInterface] identifier[loadManager] operator[SEP] identifier[String] identifier[pathToManager] operator[SEP] {
Keyword[try] {
identifier[Class] identifier[c] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[pathToM... |
@Override
public int read(byte []buf, int offset, int length)
throws IOException
{
if (buf == null)
throw new NullPointerException();
else if (offset < 0 || buf.length < offset + length)
throw new ArrayIndexOutOfBoundsException();
int result = nativeRead(_fd, buf, offset, length);
... | class class_name[name] begin[{]
method[read, return_type[type[int]], modifier[public], parameter[buf, offset, length]] begin[{]
if[binary_operation[member[.buf], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[read] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buf] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifi... |
public DateTime toDateTime(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
if (getZone() == zone) {
return this;
}
return super.toDateTime(zone);
} | class class_name[name] begin[{]
method[toDateTime, return_type[type[DateTime]], modifier[public], parameter[zone]] begin[{]
assign[member[.zone], call[DateTimeUtils.getZone, parameter[member[.zone]]]]
if[binary_operation[call[.getZone, parameter[]], ==, member[.zone]]] begin[{]
... | Keyword[public] identifier[DateTime] identifier[toDateTime] operator[SEP] identifier[DateTimeZone] identifier[zone] operator[SEP] {
identifier[zone] operator[=] identifier[DateTimeUtils] operator[SEP] identifier[getZone] operator[SEP] identifier[zone] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identif... |
private void createJaasApiFilter() {
final String ATT_JAAS_API_PROVISION = "jaas-api-provision";
final String DEF_JAAS_API_PROVISION = "false";
String provideJaasApi = httpElt.getAttribute(ATT_JAAS_API_PROVISION);
if (!StringUtils.hasText(provideJaasApi)) {
provideJaasApi = DEF_JAAS_API_PROVISION;
}
if... | class class_name[name] begin[{]
method[createJaasApiFilter, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[String], ATT_JAAS_API_PROVISION]
local_variable[type[String], DEF_JAAS_API_PROVISION]
local_variable[type[String], provideJaasApi]
... | Keyword[private] Keyword[void] identifier[createJaasApiFilter] operator[SEP] operator[SEP] {
Keyword[final] identifier[String] identifier[ATT_JAAS_API_PROVISION] operator[=] literal[String] operator[SEP] Keyword[final] identifier[String] identifier[DEF_JAAS_API_PROVISION] operator[=] literal[String] operator[SEP... |
public static CmsXmlPage unmarshal(CmsObject cms, CmsFile file) throws CmsXmlException {
return CmsXmlPageFactory.unmarshal(cms, file, true);
} | class class_name[name] begin[{]
method[unmarshal, return_type[type[CmsXmlPage]], modifier[public static], parameter[cms, file]] begin[{]
return[call[CmsXmlPageFactory.unmarshal, parameter[member[.cms], member[.file], literal[true]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CmsXmlPage] identifier[unmarshal] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[CmsFile] identifier[file] operator[SEP] Keyword[throws] identifier[CmsXmlException] {
Keyword[return] identifier[CmsXmlPageFactory] operator[SEP] identifier[unmarshal] op... |
public void marshall(PutRecordBatchRequest putRecordBatchRequest, ProtocolMarshaller protocolMarshaller) {
if (putRecordBatchRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(putRecordBatchRe... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[putRecordBatchRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.putRecordBatchRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Lit... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[PutRecordBatchRequest] identifier[putRecordBatchRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[putRecordBatchRequest] operator[==] Other[null] operator[SEP] ... |
public synchronized long getByteLimit(final String metric) {
if (metric == null || metric.isEmpty()) {
return default_byte_limit;
}
for (final QueryLimitOverrideItem item : overrides.values()) {
if (item.matches(metric)) {
return item.getByteLimit();
}
}
return default_byte... | class class_name[name] begin[{]
method[getByteLimit, return_type[type[long]], modifier[synchronized public], parameter[metric]] begin[{]
if[binary_operation[binary_operation[member[.metric], ==, literal[null]], ||, call[metric.isEmpty, parameter[]]]] begin[{]
return[member[.default_... | Keyword[public] Keyword[synchronized] Keyword[long] identifier[getByteLimit] operator[SEP] Keyword[final] identifier[String] identifier[metric] operator[SEP] {
Keyword[if] operator[SEP] identifier[metric] operator[==] Other[null] operator[||] identifier[metric] operator[SEP] identifier[isEmpty] operator[SEP] ope... |
@Nonnull
protected static EValidity validateMessage (@Nonnull final String sMsg)
{
ValueEnforcer.notNull (sMsg, "Msg");
return validateMessage (sMsg.toCharArray ());
} | class class_name[name] begin[{]
method[validateMessage, return_type[type[EValidity]], modifier[static protected], parameter[sMsg]] begin[{]
call[ValueEnforcer.notNull, parameter[member[.sMsg], literal["Msg"]]]
return[call[.validateMessage, parameter[call[sMsg.toCharArray, parameter[]]]]... | annotation[@] identifier[Nonnull] Keyword[protected] Keyword[static] identifier[EValidity] identifier[validateMessage] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[sMsg] operator[SEP] {
identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] ident... |
public void marshall(Lexicon lexicon, ProtocolMarshaller protocolMarshaller) {
if (lexicon == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(lexicon.getContent(), CONTENT_BINDING);
protoc... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[lexicon, protocolMarshaller]] begin[{]
if[binary_operation[member[.lexicon], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], p... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Lexicon] identifier[lexicon] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[lexicon] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] i... |
public static <T> Single<T> toSingle(ListenableFuture<T> listenableFuture) {
return RxJava2FutureUtils.createSingle(SpringFutureUtils.createValueSource(listenableFuture));
} | class class_name[name] begin[{]
method[toSingle, return_type[type[Single]], modifier[public static], parameter[listenableFuture]] begin[{]
return[call[RxJava2FutureUtils.createSingle, parameter[call[SpringFutureUtils.createValueSource, parameter[member[.listenableFuture]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Single] operator[<] identifier[T] operator[>] identifier[toSingle] operator[SEP] identifier[ListenableFuture] operator[<] identifier[T] operator[>] identifier[listenableFuture] operator[SEP] {
Keyword[return] identifier[RxJava2Futur... |
private FileOutputStream fos() throws IOException {
if (closed)
throw new IOException("Output stream is already closed");
if (os == null || currFileBytesWritten >= partSize) {
if (os != null) {
os.close();
// notify about the new file ready for pro... | class class_name[name] begin[{]
method[fos, return_type[type[FileOutputStream]], modifier[private], parameter[]] begin[{]
if[member[.closed]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Output... | Keyword[private] identifier[FileOutputStream] identifier[fos] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[closed] operator[SEP] Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] ... |
@Override
public int doEndTag() throws JspException {
if (!scopeSpecified) {
pageContext.removeAttribute(var);
} else {
pageContext.removeAttribute(var, scope);
}
return EVAL_PAGE;
} | class class_name[name] begin[{]
method[doEndTag, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[member[.scopeSpecified]] begin[{]
call[pageContext.removeAttribute, parameter[member[.var]]]
else begin[{]
call[pageContext... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[doEndTag] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] {
Keyword[if] operator[SEP] operator[!] identifier[scopeSpecified] operator[SEP] {
identifier[pageContext] operator[SEP] identifier[removeAttribute]... |
public void setAdditionalLanguageCodes(java.util.Collection<String> additionalLanguageCodes) {
if (additionalLanguageCodes == null) {
this.additionalLanguageCodes = null;
return;
}
this.additionalLanguageCodes = new java.util.ArrayList<String>(additionalLanguageCodes);
... | class class_name[name] begin[{]
method[setAdditionalLanguageCodes, return_type[void], modifier[public], parameter[additionalLanguageCodes]] begin[{]
if[binary_operation[member[.additionalLanguageCodes], ==, literal[null]]] begin[{]
assign[THIS[member[None.additionalLangu... | Keyword[public] Keyword[void] identifier[setAdditionalLanguageCodes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[additionalLanguageCodes] operator[SEP] {
Keyword[if] operator[SEP] identifier[additionalLan... |
public Object getAt(final int index) {
if (index < 0) {
// calculate whole list in this case
// recommend avoiding -ve's as this is obviously not as efficient
List list = list();
int adjustedIndex = index + list.size();
if (adjustedIndex >= 0 && adjust... | class class_name[name] begin[{]
method[getAt, return_type[type[Object]], modifier[public], parameter[index]] begin[{]
if[binary_operation[member[.index], <, literal[0]]] begin[{]
local_variable[type[List], list]
local_variable[type[int], adjustedIndex]
... | Keyword[public] identifier[Object] identifier[getAt] operator[SEP] Keyword[final] Keyword[int] identifier[index] operator[SEP] {
Keyword[if] operator[SEP] identifier[index] operator[<] Other[0] operator[SEP] {
identifier[List] identifier[list] operator[=] identifier[list] operator[SEP] operator[SEP] o... |
public WebElement waitForWebElement(final By by, int minimumNumberOfMatches, int timeout, boolean scroll){
final long endTime = SystemClock.uptimeMillis() + timeout;
while (true) {
final boolean timedOut = SystemClock.uptimeMillis() > endTime;
if (timedOut){
searcher.logMatchesFound(by.getValue());
... | class class_name[name] begin[{]
method[waitForWebElement, return_type[type[WebElement]], modifier[public], parameter[by, minimumNumberOfMatches, timeout, scroll]] begin[{]
local_variable[type[long], endTime]
while[literal[true]] begin[{]
local_variable[type[boolean], timedOu... | Keyword[public] identifier[WebElement] identifier[waitForWebElement] operator[SEP] Keyword[final] identifier[By] identifier[by] , Keyword[int] identifier[minimumNumberOfMatches] , Keyword[int] identifier[timeout] , Keyword[boolean] identifier[scroll] operator[SEP] {
Keyword[final] Keyword[long] identifier[end... |
public void init(FgExampleList data) {
if (data == null && prm.featCountCutoff > 0) {
throw new IllegalArgumentException("Data can only be null if there is no feature count cutoff.");
}
// Ensure the FactorTemplateList is initialized, and maybe count features along the way.
... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[data]] begin[{]
if[binary_operation[binary_operation[member[.data], ==, literal[null]], &&, binary_operation[member[prm.featCountCutoff], >, literal[0]]]] begin[{]
ThrowStatement(expression=C... | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[FgExampleList] identifier[data] operator[SEP] {
Keyword[if] operator[SEP] identifier[data] operator[==] Other[null] operator[&&] identifier[prm] operator[SEP] identifier[featCountCutoff] operator[>] Other[0] operator[SEP] {
Keywor... |
@Override
public void put(String key, String val) {
if (key == null) {
throw new IllegalArgumentException("key cannot be null");
}
Map<String, String> map = inheritableThreadLocal.get();
if (map == null) {
map = new HashMap<>();
inheritableThreadLo... | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[key, val]] begin[{]
if[binary_operation[member[.key], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifie... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[val] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identif... |
protected void add(ManagedObject managedObject,
Transaction transaction,
long logSpaceReservedDelta)
throws ObjectManagerException {
final String methodName = "add";
if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
... | class class_name[name] begin[{]
method[add, return_type[void], modifier[protected], parameter[managedObject, transaction, logSpaceReservedDelta]] begin[{]
local_variable[type[String], methodName]
if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryE... | Keyword[protected] Keyword[void] identifier[add] operator[SEP] identifier[ManagedObject] identifier[managedObject] , identifier[Transaction] identifier[transaction] , Keyword[long] identifier[logSpaceReservedDelta] operator[SEP] Keyword[throws] identifier[ObjectManagerException] {
Keyword[final] identifier[Str... |
@Override
public int read() throws IOException, StreamIntegrityException {
if (trailerIn == null) {
initializeStream();
}
int result = pushbackInputStream.read();
return completeRead(result);
} | class class_name[name] begin[{]
method[read, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.trailerIn], ==, literal[null]]] begin[{]
call[.initializeStream, parameter[]]
else begin[{]
None
end[}]
local_... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[read] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[StreamIntegrityException] {
Keyword[if] operator[SEP] identifier[trailerIn] operator[==] Other[null] operator[SEP] {
identifier[initializeS... |
@Override
public DescribeStackSetResult describeStackSet(DescribeStackSetRequest request) {
request = beforeClientExecution(request);
return executeDescribeStackSet(request);
} | class class_name[name] begin[{]
method[describeStackSet, return_type[type[DescribeStackSetResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDescribeStackSet, parameter[member[.... | annotation[@] identifier[Override] Keyword[public] identifier[DescribeStackSetResult] identifier[describeStackSet] operator[SEP] identifier[DescribeStackSetRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP... |
public static void assertThrows(String message, Class<? extends Exception> exceptionClass, Runnable runnable) {
try {
runnable.run();
fail(message, "No exception was thrown (expected " + exceptionClass.getSimpleName() + ")");
} catch (Exception e) {
if (!e.getClass().... | class class_name[name] begin[{]
method[assertThrows, return_type[void], modifier[public static], parameter[message, exceptionClass, runnable]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=run, postfix_operators=[], prefix_operators=[], qualifier=runn... | Keyword[public] Keyword[static] Keyword[void] identifier[assertThrows] operator[SEP] identifier[String] identifier[message] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Exception] operator[>] identifier[exceptionClass] , identifier[Runnable] identifier[runnable] operator[SEP] {
Keywo... |
public static boolean isSegmentFile(String journalName, String fileName) {
checkNotNull(journalName, "journalName cannot be null");
checkNotNull(fileName, "fileName cannot be null");
int partSeparator = fileName.lastIndexOf(PART_SEPARATOR);
int extensionSeparator = fileName.lastIndexOf(EXTENSION_SEPARA... | class class_name[name] begin[{]
method[isSegmentFile, return_type[type[boolean]], modifier[public static], parameter[journalName, fileName]] begin[{]
call[.checkNotNull, parameter[member[.journalName], literal["journalName cannot be null"]]]
call[.checkNotNull, parameter[member[... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isSegmentFile] operator[SEP] identifier[String] identifier[journalName] , identifier[String] identifier[fileName] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[journalName] , literal[String] operator[SEP] operator[SEP] identifier[c... |
public Element getById(Element id, String childName) throws Exception {
return getById(doc.getDocumentElement(), id, childName);
} | class class_name[name] begin[{]
method[getById, return_type[type[Element]], modifier[public], parameter[id, childName]] begin[{]
return[call[.getById, parameter[call[doc.getDocumentElement, parameter[]], member[.id], member[.childName]]]]
end[}]
END[}] | Keyword[public] identifier[Element] identifier[getById] operator[SEP] identifier[Element] identifier[id] , identifier[String] identifier[childName] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[return] identifier[getById] operator[SEP] identifier[doc] operator[SEP] identifier[getDocumentElement]... |
private JPanel getUrlPanel()
{
if (urlPanel == null)
{
GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints1.gridy = 0;
gridBagConstraints1.weightx = 1.... | class class_name[name] begin[{]
method[getUrlPanel, return_type[type[JPanel]], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.urlPanel], ==, literal[null]]] begin[{]
local_variable[type[GridBagConstraints], gridBagConstraints1]
assign[me... | Keyword[private] identifier[JPanel] identifier[getUrlPanel] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[urlPanel] operator[==] Other[null] operator[SEP] {
identifier[GridBagConstraints] identifier[gridBagConstraints1] operator[=] Keyword[new] identifier[GridBagConstraints] opera... |
@Override
public final void replicate(
final Map<String, Object> pAddParams) throws Exception {
Writer htmlWriter = (Writer) pAddParams.get("htmlWriter");
try {
//URL must be
String urlSourceStr = "https://" + (String) pAddParams.get("urlSource");
if (urlSourceStr == null || urlSourceStr... | class class_name[name] begin[{]
method[replicate, return_type[void], modifier[final public], parameter[pAddParams]] begin[{]
local_variable[type[Writer], htmlWriter]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOpe... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[replicate] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParams] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Writer] ident... |
private static void serializeString(StringBuilder builder, String str) {
builder.append('"');
int last = 0;
int length = str.length();
for (int i = 0; i < length; i++) {
char c = str.charAt(i);
String replacement;
if (c < 128) {
replacement = REPLACEMENT_CHARS[c];
if (r... | class class_name[name] begin[{]
method[serializeString, return_type[void], modifier[private static], parameter[builder, str]] begin[{]
call[builder.append, parameter[literal['"']]]
local_variable[type[int], last]
local_variable[type[int], length]
ForStatement(body=BlockS... | Keyword[private] Keyword[static] Keyword[void] identifier[serializeString] operator[SEP] identifier[StringBuilder] identifier[builder] , identifier[String] identifier[str] operator[SEP] {
identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] ... |
public static final Function<String,Integer> toInteger(final RoundingMode roundingMode, final DecimalPoint decimalPoint) {
return new ToInteger(roundingMode, decimalPoint);
} | class class_name[name] begin[{]
method[toInteger, return_type[type[Function]], modifier[final public static], parameter[roundingMode, decimalPoint]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=roundingMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberR... | Keyword[public] Keyword[static] Keyword[final] identifier[Function] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[toInteger] operator[SEP] Keyword[final] identifier[RoundingMode] identifier[roundingMode] , Keyword[final] identifier[DecimalPoint] identifier[decimalPoint] operator[SEP] {
... |
public boolean isLoggable(final Level level) {
if (logger.isTraceEnabled()) {
return level.intValue() >= Level.FINEST.intValue();
} else if (logger.isDebugEnabled()) {
return level.intValue() >= Level.FINE.intValue();
} else if (logger.isInfoEnabled()) {
return level.intValue() >= Level.INFO.intValue();
... | class class_name[name] begin[{]
method[isLoggable, return_type[type[boolean]], modifier[public], parameter[level]] begin[{]
if[call[logger.isTraceEnabled, parameter[]]] begin[{]
return[binary_operation[call[level.intValue, parameter[]], >=, call[Level.FINEST.intValue, parameter[]]]]... | Keyword[public] Keyword[boolean] identifier[isLoggable] operator[SEP] Keyword[final] identifier[Level] identifier[level] operator[SEP] {
Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[level] o... |
public synchronized Boolean isChecked(int index) {
if(index < 0 || index >= itemStatus.size())
return null;
return itemStatus.get(index);
} | class class_name[name] begin[{]
method[isChecked, return_type[type[Boolean]], modifier[synchronized public], parameter[index]] begin[{]
if[binary_operation[binary_operation[member[.index], <, literal[0]], ||, binary_operation[member[.index], >=, call[itemStatus.size, parameter[]]]]] begin[{]
re... | Keyword[public] Keyword[synchronized] identifier[Boolean] identifier[isChecked] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[if] operator[SEP] identifier[index] operator[<] Other[0] operator[||] identifier[index] operator[>=] identifier[itemStatus] operator[SEP] identifier[size] operator[... |
public static List<Long> asList(final MutableLongTuple t)
{
if (t == null)
{
throw new NullPointerException("The tuple may not be null");
}
return new AbstractList<Long>()
{
@Override
public Long get(int index)
{
... | class class_name[name] begin[{]
method[asList, return_type[type[List]], modifier[public static], parameter[t]] begin[{]
if[binary_operation[member[.t], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], q... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Long] operator[>] identifier[asList] operator[SEP] Keyword[final] identifier[MutableLongTuple] identifier[t] operator[SEP] {
Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[n... |
public Retryer<R> fixedWait(long sleepTime, TimeUnit timeUnit) {
withWaitStrategy(fixedWaitStrategy(checkNotNull(timeUnit, "TimeUnit cannot be null").toMillis(sleepTime)));
return this;
} | class class_name[name] begin[{]
method[fixedWait, return_type[type[Retryer]], modifier[public], parameter[sleepTime, timeUnit]] begin[{]
call[.withWaitStrategy, parameter[call[.fixedWaitStrategy, parameter[call[.checkNotNull, parameter[member[.timeUnit], literal["TimeUnit cannot be null"]]]]]]]... | Keyword[public] identifier[Retryer] operator[<] identifier[R] operator[>] identifier[fixedWait] operator[SEP] Keyword[long] identifier[sleepTime] , identifier[TimeUnit] identifier[timeUnit] operator[SEP] {
identifier[withWaitStrategy] operator[SEP] identifier[fixedWaitStrategy] operator[SEP] identifier[checkNot... |
public static ZMatrixRMaj pivotMatrix(ZMatrixRMaj ret, int pivots[], int numPivots, boolean transposed ) {
if( ret == null ) {
ret = new ZMatrixRMaj(numPivots, numPivots);
} else {
if( ret.numCols != numPivots || ret.numRows != numPivots )
throw new IllegalArgume... | class class_name[name] begin[{]
method[pivotMatrix, return_type[type[ZMatrixRMaj]], modifier[public static], parameter[ret, pivots, numPivots, transposed]] begin[{]
if[binary_operation[member[.ret], ==, literal[null]]] begin[{]
assign[member[.ret], ClassCreator(arguments... | Keyword[public] Keyword[static] identifier[ZMatrixRMaj] identifier[pivotMatrix] operator[SEP] identifier[ZMatrixRMaj] identifier[ret] , Keyword[int] identifier[pivots] operator[SEP] operator[SEP] , Keyword[int] identifier[numPivots] , Keyword[boolean] identifier[transposed] operator[SEP] {
Keyword[if] operato... |
private static long getTime(int year, int month, int day, int hour,
int minute, int second, int millisecond) {
Calendar cal = Calendar.getInstance(Util.TIME_ZONE_UTC);
cal.set(year, month - 1, day, hour, minute, second);
cal.set(Calendar.MILLISECOND, millisecond);
return cal.getTimeInMillis();
} | class class_name[name] begin[{]
method[getTime, return_type[type[long]], modifier[private static], parameter[year, month, day, hour, minute, second, millisecond]] begin[{]
local_variable[type[Calendar], cal]
call[cal.set, parameter[member[.year], binary_operation[member[.month], -, lite... | Keyword[private] Keyword[static] Keyword[long] identifier[getTime] operator[SEP] Keyword[int] identifier[year] , Keyword[int] identifier[month] , Keyword[int] identifier[day] , Keyword[int] identifier[hour] , Keyword[int] identifier[minute] , Keyword[int] identifier[second] , Keyword[int] identifier[millisecond] ... |
private boolean initializeExtensionPointSCIs(List<ServletContainerInitializer> myScis, DeployedModule module, HashMap<ServletContainerInitializer, Class[]> handleTypesHashMap, HashMap<ServletContainerInitializer, HashSet<Class<?>>> onStartupHashMap){
Iterator<ServletContainerInitializer> servletContai... | class class_name[name] begin[{]
method[initializeExtensionPointSCIs, return_type[type[boolean]], modifier[private], parameter[myScis, module, handleTypesHashMap, onStartupHashMap]] begin[{]
local_variable[type[Iterator], servletContainerInitializersIterator]
if[binary_operation[member[.... | Keyword[private] Keyword[boolean] identifier[initializeExtensionPointSCIs] operator[SEP] identifier[List] operator[<] identifier[ServletContainerInitializer] operator[>] identifier[myScis] , identifier[DeployedModule] identifier[module] , identifier[HashMap] operator[<] identifier[ServletContainerInitializer] , iden... |
public BigComplex add(BigComplex value) {
return valueOf(
re.add(value.re),
im.add(value.im));
} | class class_name[name] begin[{]
method[add, return_type[type[BigComplex]], modifier[public], parameter[value]] begin[{]
return[call[.valueOf, parameter[call[re.add, parameter[member[value.re]]], call[im.add, parameter[member[value.im]]]]]]
end[}]
END[}] | Keyword[public] identifier[BigComplex] identifier[add] operator[SEP] identifier[BigComplex] identifier[value] operator[SEP] {
Keyword[return] identifier[valueOf] operator[SEP] identifier[re] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] identifier[re] operator[SEP] , identifier[im]... |
@Nonnull
public static <K, V> Map<K, V> putAllAndMakeImmutable(@Nonnull Map<K, V> original, @Nullable Object... a) {
return asImmutableMap(CollectionUtils.putAll(original, a));
} | class class_name[name] begin[{]
method[putAllAndMakeImmutable, return_type[type[Map]], modifier[public static], parameter[original, a]] begin[{]
return[call[.asImmutableMap, parameter[call[CollectionUtils.putAll, parameter[member[.original], member[.a]]]]]]
end[}]
END[}] | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[putAllAndMakeImmutable] operator[SEP] annotation[@] identifier[Nonnull] identifier[Map] operator[<] identifier[K] , ... |
public static List<Element> getElements(Iterable<? extends Module> modules) {
return getElements(Stage.DEVELOPMENT, modules);
} | class class_name[name] begin[{]
method[getElements, return_type[type[List]], modifier[public static], parameter[modules]] begin[{]
return[call[.getElements, parameter[member[Stage.DEVELOPMENT], member[.modules]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Element] operator[>] identifier[getElements] operator[SEP] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[Module] operator[>] identifier[modules] operator[SEP] {
Keyword[return] identifier[getElements] operator[SEP]... |
public BaseField getField(String strTableName, int iFieldSeq) // Lookup this field
{
Record record = this.getRecord(strTableName);
if (record != null)
return record.getField(iFieldSeq);
return null; // Not found
} | class class_name[name] begin[{]
method[getField, return_type[type[BaseField]], modifier[public], parameter[strTableName, iFieldSeq]] begin[{]
local_variable[type[Record], record]
if[binary_operation[member[.record], !=, literal[null]]] begin[{]
return[call[record.getField, parameter[mem... | Keyword[public] identifier[BaseField] identifier[getField] operator[SEP] identifier[String] identifier[strTableName] , Keyword[int] identifier[iFieldSeq] operator[SEP] {
identifier[Record] identifier[record] operator[=] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[strTableName] ope... |
public OvhOrder license_plesk_serviceName_upgrade_duration_POST(String serviceName, String duration, OvhOrderableAntispamEnum antispam, OvhOrderableAntivirusEnum antivirus, OvhPleskApplicationSetEnum applicationSet, OvhOrderablePleskDomainNumberEnum domainNumber, OvhOrderablePleskLanguagePackEnum languagePackNumber, Bo... | class class_name[name] begin[{]
method[license_plesk_serviceName_upgrade_duration_POST, return_type[type[OvhOrder]], modifier[public], parameter[serviceName, duration, antispam, antivirus, applicationSet, domainNumber, languagePackNumber, powerpack, resellerManagement, version, wordpressToolkit]] begin[{]
... | Keyword[public] identifier[OvhOrder] identifier[license_plesk_serviceName_upgrade_duration_POST] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[duration] , identifier[OvhOrderableAntispamEnum] identifier[antispam] , identifier[OvhOrderableAntivirusEnum] identifier[antivirus]... |
public double[] getPaulingElectronegativities(IAtomContainer ac, boolean modified) throws CDKException {
double[] paulingElectronegativities = new double[ac.getAtomCount()];
IElement element = null;
String symbol = null;
int atomicNumber = 0;
try {
ifac = Isotopes.get... | class class_name[name] begin[{]
method[getPaulingElectronegativities, return_type[type[double]], modifier[public], parameter[ac, modified]] begin[{]
local_variable[type[double], paulingElectronegativities]
local_variable[type[IElement], element]
local_variable[type[String], symbol]
... | Keyword[public] Keyword[double] operator[SEP] operator[SEP] identifier[getPaulingElectronegativities] operator[SEP] identifier[IAtomContainer] identifier[ac] , Keyword[boolean] identifier[modified] operator[SEP] Keyword[throws] identifier[CDKException] {
Keyword[double] operator[SEP] operator[SEP] identifier[pa... |
public static <R> Observable<R> fromRunnable(final Runnable run, final R result) {
return fromRunnable(run, result, Schedulers.computation());
} | class class_name[name] begin[{]
method[fromRunnable, return_type[type[Observable]], modifier[public static], parameter[run, result]] begin[{]
return[call[.fromRunnable, parameter[member[.run], member[.result], call[Schedulers.computation, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[R] operator[>] identifier[Observable] operator[<] identifier[R] operator[>] identifier[fromRunnable] operator[SEP] Keyword[final] identifier[Runnable] identifier[run] , Keyword[final] identifier[R] identifier[result] operator[SEP] {
Keyword[return] identifi... |
public Matrix4f setFrustumLH(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) {
if ((properties & PROPERTY_IDENTITY) == 0)
MemUtil.INSTANCE.identity(this);
this._m00((zNear + zNear) / (right - left));
this._m11((zNear + zNear) / (top - bo... | class class_name[name] begin[{]
method[setFrustumLH, return_type[type[Matrix4f]], modifier[public], parameter[left, right, bottom, top, zNear, zFar, zZeroToOne]] begin[{]
if[binary_operation[binary_operation[member[.properties], &, member[.PROPERTY_IDENTITY]], ==, literal[0]]] begin[{]
... | Keyword[public] identifier[Matrix4f] identifier[setFrustumLH] operator[SEP] Keyword[float] identifier[left] , Keyword[float] identifier[right] , Keyword[float] identifier[bottom] , Keyword[float] identifier[top] , Keyword[float] identifier[zNear] , Keyword[float] identifier[zFar] , Keyword[boolean] identifier[zZe... |
protected Object processFetchedHistoryModelList(final List<Version<MODEL>> list,
final MODEL_ID id) throws Exception {
return list;
} | class class_name[name] begin[{]
method[processFetchedHistoryModelList, return_type[type[Object]], modifier[protected], parameter[list, id]] begin[{]
return[member[.list]]
end[}]
END[}] | Keyword[protected] identifier[Object] identifier[processFetchedHistoryModelList] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Version] operator[<] identifier[MODEL] operator[>] operator[>] identifier[list] , Keyword[final] identifier[MODEL_ID] identifier[id] operator[SEP] Keyword[throws] identi... |
public static ExecutorService getSingleThreadExecutor(String name) {
ExecutorService ste =
new ThreadPoolExecutor(1, 1,
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>(),
CoreUtils.getThreadFactory(null, name, S... | class class_name[name] begin[{]
method[getSingleThreadExecutor, return_type[type[ExecutorService]], modifier[public static], parameter[name]] begin[{]
local_variable[type[ExecutorService], ste]
return[member[.ste]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[ExecutorService] identifier[getSingleThreadExecutor] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[ExecutorService] identifier[ste] operator[=] Keyword[new] identifier[ThreadPoolExecutor] operator[SEP] Other[1] , Other[1] , Other[0L] , ... |
protected <T> T getInstanceByType(BeanManager manager, Class<T> type, Annotation... bindings) {
final Bean<?> bean = manager.resolve(manager.getBeans(type, bindings));
if (bean == null) {
throw CommonLogger.LOG.unableToResolveBean(type, Arrays.asList(bindings));
}
CreationalC... | class class_name[name] begin[{]
method[getInstanceByType, return_type[type[T]], modifier[protected], parameter[manager, type, bindings]] begin[{]
local_variable[type[Bean], bean]
if[binary_operation[member[.bean], ==, literal[null]]] begin[{]
ThrowStatement(expression=Method... | Keyword[protected] operator[<] identifier[T] operator[>] identifier[T] identifier[getInstanceByType] operator[SEP] identifier[BeanManager] identifier[manager] , identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , identifier[Annotation] operator[...] identifier[bindings] operator[SEP] {
K... |
public DescribeReplicationGroupsResult withReplicationGroups(ReplicationGroup... replicationGroups) {
if (this.replicationGroups == null) {
setReplicationGroups(new com.amazonaws.internal.SdkInternalList<ReplicationGroup>(replicationGroups.length));
}
for (ReplicationGroup ele : repl... | class class_name[name] begin[{]
method[withReplicationGroups, return_type[type[DescribeReplicationGroupsResult]], modifier[public], parameter[replicationGroups]] begin[{]
if[binary_operation[THIS[member[None.replicationGroups]], ==, literal[null]]] begin[{]
call[.setRepl... | Keyword[public] identifier[DescribeReplicationGroupsResult] identifier[withReplicationGroups] operator[SEP] identifier[ReplicationGroup] operator[...] identifier[replicationGroups] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[replicationGroups] operator[==] Other[null] operato... |
public XmlPathConfig defaultObjectDeserializer(XmlPathObjectDeserializer defaultObjectDeserializer) {
return new XmlPathConfig(jaxbObjectMapperFactory, defaultParserType, defaultObjectDeserializer, charset, features, declaredNamespaces,
properties, validating, namespaceAware, allowDocTypeDeclara... | class class_name[name] begin[{]
method[defaultObjectDeserializer, return_type[type[XmlPathConfig]], modifier[public], parameter[defaultObjectDeserializer]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=jaxbObjectMapperFactory, postfix_operators=[], prefix_operators=[], qualifier=, sele... | Keyword[public] identifier[XmlPathConfig] identifier[defaultObjectDeserializer] operator[SEP] identifier[XmlPathObjectDeserializer] identifier[defaultObjectDeserializer] operator[SEP] {
Keyword[return] Keyword[new] identifier[XmlPathConfig] operator[SEP] identifier[jaxbObjectMapperFactory] , identifier[defaultP... |
protected void setParameter( PreparedStatement pPreparedStatement ) throws SQLException
{
if( _parameters != null )
{
for( int i = 0; i < _parameters.size(); i++ )
{
pPreparedStatement.setObject( i + 1, _parameters.get( i ) );
}
}
} | class class_name[name] begin[{]
method[setParameter, return_type[void], modifier[protected], parameter[pPreparedStatement]] begin[{]
if[binary_operation[member[._parameters], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(ex... | Keyword[protected] Keyword[void] identifier[setParameter] operator[SEP] identifier[PreparedStatement] identifier[pPreparedStatement] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[_parameters] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator... |
public void write(ObjectOutput output) throws IOException {
output.writeObject(this.moment);
output.writeObject(this.zone);
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[output]] begin[{]
call[output.writeObject, parameter[THIS[member[None.moment]]]]
call[output.writeObject, parameter[THIS[member[None.zone]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[ObjectOutput] identifier[output] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[output] operator[SEP] identifier[writeObject] operator[SEP] Keyword[this] operator[SEP] identifier[moment] operator[SEP] operator[SEP] ident... |
public static void ensureNotError(ObjectMapper mapper, JsonNode resourceNode) {
if (resourceNode != null && resourceNode.hasNonNull(JSONAPISpecConstants.ERRORS)) {
try {
throw new ResourceParseException(ErrorUtils.parseError(mapper, resourceNode, Errors.class));
} catch (JsonProcessingException e) {
thr... | class class_name[name] begin[{]
method[ensureNotError, return_type[void], modifier[public static], parameter[mapper, resourceNode]] begin[{]
if[binary_operation[binary_operation[member[.resourceNode], !=, literal[null]], &&, call[resourceNode.hasNonNull, parameter[member[JSONAPISpecConstants.ER... | Keyword[public] Keyword[static] Keyword[void] identifier[ensureNotError] operator[SEP] identifier[ObjectMapper] identifier[mapper] , identifier[JsonNode] identifier[resourceNode] operator[SEP] {
Keyword[if] operator[SEP] identifier[resourceNode] operator[!=] Other[null] operator[&&] identifier[resourceNode] ope... |
private void constraint(PatternDescrBuilder<?> pattern,
boolean positional,
String prefix) throws RecognitionException {
if (speculateNestedConstraint()) {
nestedConstraint(pattern, prefix);
return;
}
if (state.backtracking == 0) {
hel... | class class_name[name] begin[{]
method[constraint, return_type[void], modifier[private], parameter[pattern, positional, prefix]] begin[{]
if[call[.speculateNestedConstraint, parameter[]]] begin[{]
call[.nestedConstraint, parameter[member[.pattern], member[.prefix]]]
... | Keyword[private] Keyword[void] identifier[constraint] operator[SEP] identifier[PatternDescrBuilder] operator[<] operator[?] operator[>] identifier[pattern] , Keyword[boolean] identifier[positional] , identifier[String] identifier[prefix] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[... |
private boolean visitInPostOrder(StateVisitor v, int node, BitSet visited) {
if (visited.get(node))
return true;
visited.set(node);
for (int arc = getFirstArc(node); arc != 0; arc = getNextArc(arc)) {
if (!isArcTerminal(arc)) {
if (!visitInPostOrder(v, getEndNode(arc), visited))
... | class class_name[name] begin[{]
method[visitInPostOrder, return_type[type[boolean]], modifier[private], parameter[v, node, visited]] begin[{]
if[call[visited.get, parameter[member[.node]]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
call[visited.set... | Keyword[private] Keyword[boolean] identifier[visitInPostOrder] operator[SEP] identifier[StateVisitor] identifier[v] , Keyword[int] identifier[node] , identifier[BitSet] identifier[visited] operator[SEP] {
Keyword[if] operator[SEP] identifier[visited] operator[SEP] identifier[get] operator[SEP] identifier[node]... |
protected Collection<BioPAXElement> generate(Interaction inter, Set<Entity> taboo)
{
Set<BioPAXElement> simples = new HashSet<BioPAXElement>();
for (Entity part : inter.getParticipant())
{
if (part instanceof PhysicalEntity && !taboo.contains(part))
{
simples.addAll(linker.getLinkedElements((PhysicalE... | class class_name[name] begin[{]
method[generate, return_type[type[Collection]], modifier[protected], parameter[inter, taboo]] begin[{]
local_variable[type[Set], simples]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(opera... | Keyword[protected] identifier[Collection] operator[<] identifier[BioPAXElement] operator[>] identifier[generate] operator[SEP] identifier[Interaction] identifier[inter] , identifier[Set] operator[<] identifier[Entity] operator[>] identifier[taboo] operator[SEP] {
identifier[Set] operator[<] identifier[BioPAXEle... |
public static String applyFromXml(String text) throws ConverterException {
String xml = converters.get(0).convertFromXml(text, false);
xml = applyFromSecond(xml);
if (conversionDone()) {
return converters.get(converters.size()-1).changeVersion(xml);
} else {
return xml;
}
} | class class_name[name] begin[{]
method[applyFromXml, return_type[type[String]], modifier[public static], parameter[text]] begin[{]
local_variable[type[String], xml]
assign[member[.xml], call[.applyFromSecond, parameter[member[.xml]]]]
if[call[.conversionDone, parameter[]... | Keyword[public] Keyword[static] identifier[String] identifier[applyFromXml] operator[SEP] identifier[String] identifier[text] operator[SEP] Keyword[throws] identifier[ConverterException] {
identifier[String] identifier[xml] operator[=] identifier[converters] operator[SEP] identifier[get] operator[SEP] Other[0] o... |
public void addActionMapping( ActionModel mapping )
{
String mappingPath = mapping.getPath();
ActionModel conflictingActionMapping = ( ActionModel ) _actionMappings.get( mappingPath );
if ( conflictingActionMapping != null )
{
ActionModel defaultMappingForThisPat... | class class_name[name] begin[{]
method[addActionMapping, return_type[void], modifier[public], parameter[mapping]] begin[{]
local_variable[type[String], mappingPath]
local_variable[type[ActionModel], conflictingActionMapping]
if[binary_operation[member[.conflictingActionMapping],... | Keyword[public] Keyword[void] identifier[addActionMapping] operator[SEP] identifier[ActionModel] identifier[mapping] operator[SEP] {
identifier[String] identifier[mappingPath] operator[=] identifier[mapping] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[ActionModel] ident... |
public <T0, T1, T2, T3> SingleOutputStreamOperator<Tuple4<T0, T1, T2, T3>> projectTuple4() {
TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes, dataStream.getType());
TupleTypeInfo<Tuple4<T0, T1, T2, T3>> tType = new TupleTypeInfo<Tuple4<T0, T1, T2, T3>>(fTypes);
return dataStream.transform("Projectio... | class class_name[name] begin[{]
method[projectTuple4, return_type[type[SingleOutputStreamOperator]], modifier[public], parameter[]] begin[{]
local_variable[type[TypeInformation], fTypes]
local_variable[type[TupleTypeInfo], tType]
return[call[dataStream.transform, parameter[literal["Proj... | Keyword[public] operator[<] identifier[T0] , identifier[T1] , identifier[T2] , identifier[T3] operator[>] identifier[SingleOutputStreamOperator] operator[<] identifier[Tuple4] operator[<] identifier[T0] , identifier[T1] , identifier[T2] , identifier[T3] operator[>] operator[>] identifier[projectTuple4] operator[S... |
public void addExpression(final String _expression)
{
this.tokens.add(new Token(ValueList.TokenType.EXPRESSION, _expression));
getExpressions().add(_expression);
} | class class_name[name] begin[{]
method[addExpression, return_type[void], modifier[public], parameter[_expression]] begin[{]
THIS[member[None.tokens]call[None.add, parameter[ClassCreator(arguments=[MemberReference(member=EXPRESSION, postfix_operators=[], prefix_operators=[], qualifier=ValueList.... | Keyword[public] Keyword[void] identifier[addExpression] operator[SEP] Keyword[final] identifier[String] identifier[_expression] operator[SEP] {
Keyword[this] operator[SEP] identifier[tokens] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Token] operator[SEP] identifier[ValueList] operator[SE... |
@Override
public GetFunctionConfigurationResult getFunctionConfiguration(GetFunctionConfigurationRequest request) {
request = beforeClientExecution(request);
return executeGetFunctionConfiguration(request);
} | class class_name[name] begin[{]
method[getFunctionConfiguration, return_type[type[GetFunctionConfigurationResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeGetFunctionConfigura... | annotation[@] identifier[Override] Keyword[public] identifier[GetFunctionConfigurationResult] identifier[getFunctionConfiguration] operator[SEP] identifier[GetFunctionConfigurationRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifi... |
public <S> S getService(final ServiceReference<S> reference, final BundleContext context) {
if (System.getSecurityManager() == null)
return context.getService(reference);
return AccessController.doPrivileged(new PrivilegedAction<S>() {
@Override
public S run() {
... | class class_name[name] begin[{]
method[getService, return_type[type[S]], modifier[public], parameter[reference, context]] begin[{]
if[binary_operation[call[System.getSecurityManager, parameter[]], ==, literal[null]]] begin[{]
return[call[context.getService, parameter[member[.reference]]]]
... | Keyword[public] operator[<] identifier[S] operator[>] identifier[S] identifier[getService] operator[SEP] Keyword[final] identifier[ServiceReference] operator[<] identifier[S] operator[>] identifier[reference] , Keyword[final] identifier[BundleContext] identifier[context] operator[SEP] {
Keyword[if] operator[SEP... |
@Override
public GetTerminologyResult getTerminology(GetTerminologyRequest request) {
request = beforeClientExecution(request);
return executeGetTerminology(request);
} | class class_name[name] begin[{]
method[getTerminology, return_type[type[GetTerminologyResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeGetTerminology, parameter[member[.reques... | annotation[@] identifier[Override] Keyword[public] identifier[GetTerminologyResult] identifier[getTerminology] operator[SEP] identifier[GetTerminologyRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] oper... |
public static com.liferay.commerce.product.model.CPRuleAssetCategoryRel createCPRuleAssetCategoryRel(
long CPRuleAssetCategoryRelId) {
return getService()
.createCPRuleAssetCategoryRel(CPRuleAssetCategoryRelId);
} | class class_name[name] begin[{]
method[createCPRuleAssetCategoryRel, return_type[type[com]], modifier[public static], parameter[CPRuleAssetCategoryRelId]] begin[{]
return[call[.getService, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[model] operator[SEP] identifier[CPRuleAssetCategoryRel] identifier[createCPRuleAssetCategoryRel] operator[SEP] Keyword[long] identifier[CPRuleAs... |
private static ServletHolder createHuluServletHolder(){
ServletHolder servletHolder = new ServletHolder(ActionServlet.class);
servletHolder.setAsyncSupported(false);
servletHolder.setInitOrder(1);
return servletHolder;
} | class class_name[name] begin[{]
method[createHuluServletHolder, return_type[type[ServletHolder]], modifier[private static], parameter[]] begin[{]
local_variable[type[ServletHolder], servletHolder]
call[servletHolder.setAsyncSupported, parameter[literal[false]]]
call[serv... | Keyword[private] Keyword[static] identifier[ServletHolder] identifier[createHuluServletHolder] operator[SEP] operator[SEP] {
identifier[ServletHolder] identifier[servletHolder] operator[=] Keyword[new] identifier[ServletHolder] operator[SEP] identifier[ActionServlet] operator[SEP] Keyword[class] operator[SEP] op... |
public PhotoList<Photo> getPhotos(String photosetId, Set<String> extras, int privacy_filter, int perPage, int page) throws FlickrException {
PhotoList<Photo> photos = new PhotoList<Photo>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_PH... | class class_name[name] begin[{]
method[getPhotos, return_type[type[PhotoList]], modifier[public], parameter[photosetId, extras, privacy_filter, perPage, page]] begin[{]
local_variable[type[PhotoList], photos]
local_variable[type[Map], parameters]
call[parameters.put, parameter[l... | Keyword[public] identifier[PhotoList] operator[<] identifier[Photo] operator[>] identifier[getPhotos] operator[SEP] identifier[String] identifier[photosetId] , identifier[Set] operator[<] identifier[String] operator[>] identifier[extras] , Keyword[int] identifier[privacy_filter] , Keyword[int] identifier[perPage] , ... |
final void _setAsHead(LinkedList parent, Link tail)
{
_nextLink = tail;
_parent = parent;
_state = LinkState.HEAD;
} | class class_name[name] begin[{]
method[_setAsHead, return_type[void], modifier[final], parameter[parent, tail]] begin[{]
assign[member[._nextLink], member[.tail]]
assign[member[._parent], member[.parent]]
assign[member[._state], member[LinkState.HEAD]]
end[}]... | Keyword[final] Keyword[void] identifier[_setAsHead] operator[SEP] identifier[LinkedList] identifier[parent] , identifier[Link] identifier[tail] operator[SEP] {
identifier[_nextLink] operator[=] identifier[tail] operator[SEP] identifier[_parent] operator[=] identifier[parent] operator[SEP] identifier[_state] ope... |
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) {
final SuperTypeRemoveModification modification = new SuperTypeRemoveModification();
modification.setIssue(issue);
modification.setTools(provider);
acceptor.accept(issue,
Messages.SARLQuickfixProvider_0,... | class class_name[name] begin[{]
method[accept, return_type[void], modifier[public static], parameter[provider, issue, acceptor]] begin[{]
local_variable[type[SuperTypeRemoveModification], modification]
call[modification.setIssue, parameter[member[.issue]]]
call[modificat... | Keyword[public] Keyword[static] Keyword[void] identifier[accept] operator[SEP] identifier[SARLQuickfixProvider] identifier[provider] , identifier[Issue] identifier[issue] , identifier[IssueResolutionAcceptor] identifier[acceptor] operator[SEP] {
Keyword[final] identifier[SuperTypeRemoveModification] identifier... |
@Override
public boolean accept( final AuditLogEntry entry ) {
if ( !acceptedTypes.containsKey( entry.getGenericType() ) ) {
return false;
}
return acceptedTypes.get( entry.getGenericType() );
} | class class_name[name] begin[{]
method[accept, return_type[type[boolean]], modifier[public], parameter[entry]] begin[{]
if[call[acceptedTypes.containsKey, parameter[call[entry.getGenericType, parameter[]]]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] Keyword[final] identifier[AuditLogEntry] identifier[entry] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[acceptedTypes] operator[SEP] identifier[containsKey] operator[SEP] identifier[entry] ope... |
public static EqualityException newEqualityException(String message, Object... args) {
return newEqualityException(null, message, args);
} | class class_name[name] begin[{]
method[newEqualityException, return_type[type[EqualityException]], modifier[public static], parameter[message, args]] begin[{]
return[call[.newEqualityException, parameter[literal[null], member[.message], member[.args]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[EqualityException] identifier[newEqualityException] operator[SEP] identifier[String] identifier[message] , identifier[Object] operator[...] identifier[args] operator[SEP] {
Keyword[return] identifier[newEqualityException] operator[SEP] Other[null] , identifier[message... |
public void matchListeners(BaseField field, boolean bCloneListeners, boolean bMatchEnabledState, boolean bSyncReferenceFields, boolean bMatchSelectedState)
{
FieldListener listener = this.getListener();
// Don't add the listeners that already exist in the target record (from the record's addListener... | class class_name[name] begin[{]
method[matchListeners, return_type[void], modifier[public], parameter[field, bCloneListeners, bMatchEnabledState, bSyncReferenceFields, bMatchSelectedState]] begin[{]
local_variable[type[FieldListener], listener]
local_variable[type[FieldListener], fieldListener]... | Keyword[public] Keyword[void] identifier[matchListeners] operator[SEP] identifier[BaseField] identifier[field] , Keyword[boolean] identifier[bCloneListeners] , Keyword[boolean] identifier[bMatchEnabledState] , Keyword[boolean] identifier[bSyncReferenceFields] , Keyword[boolean] identifier[bMatchSelectedState] opera... |
@Override
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int rowIndex, int vColIndex) {
// 'value' is value contained in the cell located at
// (rowIndex, vColIndex)
if (isSelected) {
// c... | class class_name[name] begin[{]
method[getTableCellRendererComponent, return_type[type[Component]], modifier[public], parameter[table, value, isSelected, hasFocus, rowIndex, vColIndex]] begin[{]
if[member[.isSelected]] begin[{]
else begin[{]
None
end[}]
if[membe... | annotation[@] identifier[Override] Keyword[public] identifier[Component] identifier[getTableCellRendererComponent] operator[SEP] identifier[JTable] identifier[table] , identifier[Object] identifier[value] , Keyword[boolean] identifier[isSelected] , Keyword[boolean] identifier[hasFocus] , Keyword[int] identifier[row... |
Stream<WavefrontMetricLineData> writeMeter(Meter meter) {
long wallTime = clock.wallTime();
Stream.Builder<WavefrontMetricLineData> metrics = Stream.builder();
stream(meter.measure().spliterator(), false)
.forEach(measurement -> {
Meter.Id id = meter.getId().withTag(... | class class_name[name] begin[{]
method[writeMeter, return_type[type[Stream]], modifier[default], parameter[meter]] begin[{]
local_variable[type[long], wallTime]
local_variable[type[Stream], metrics]
call[.stream, parameter[call[meter.measure, parameter[]], literal[false]]]
... | identifier[Stream] operator[<] identifier[WavefrontMetricLineData] operator[>] identifier[writeMeter] operator[SEP] identifier[Meter] identifier[meter] operator[SEP] {
Keyword[long] identifier[wallTime] operator[=] identifier[clock] operator[SEP] identifier[wallTime] operator[SEP] operator[SEP] operator[SEP] ide... |
private void addPostParams(final Request request) {
if (includeCredentials != null) {
request.addPostParam("IncludeCredentials", includeCredentials.toString());
}
if (friendlyName != null) {
request.addPostParam("FriendlyName", friendlyName);
}
} | class class_name[name] begin[{]
method[addPostParams, return_type[void], modifier[private], parameter[request]] begin[{]
if[binary_operation[member[.includeCredentials], !=, literal[null]]] begin[{]
call[request.addPostParam, parameter[literal["IncludeCredentials"], call... | Keyword[private] Keyword[void] identifier[addPostParams] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] {
Keyword[if] operator[SEP] identifier[includeCredentials] operator[!=] Other[null] operator[SEP] {
identifier[request] operator[SEP] identifier[addPostParam] ope... |
protected boolean isOneShotQuery(CachedQuery cachedQuery) {
if (cachedQuery == null) {
return true;
}
cachedQuery.increaseExecuteCount();
if ((mPrepareThreshold == 0 || cachedQuery.getExecuteCount() < mPrepareThreshold)
&& !getForceBinaryTransfer()) {
return true;
}
return fa... | class class_name[name] begin[{]
method[isOneShotQuery, return_type[type[boolean]], modifier[protected], parameter[cachedQuery]] begin[{]
if[binary_operation[member[.cachedQuery], ==, literal[null]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
... | Keyword[protected] Keyword[boolean] identifier[isOneShotQuery] operator[SEP] identifier[CachedQuery] identifier[cachedQuery] operator[SEP] {
Keyword[if] operator[SEP] identifier[cachedQuery] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
identif... |
public PatternAnyEntityExtractor getPatternAnyEntityInfo(UUID appId, String versionId, UUID entityId) {
return getPatternAnyEntityInfoWithServiceResponseAsync(appId, versionId, entityId).toBlocking().single().body();
} | class class_name[name] begin[{]
method[getPatternAnyEntityInfo, return_type[type[PatternAnyEntityExtractor]], modifier[public], parameter[appId, versionId, entityId]] begin[{]
return[call[.getPatternAnyEntityInfoWithServiceResponseAsync, parameter[member[.appId], member[.versionId], member[.entityId]]]... | Keyword[public] identifier[PatternAnyEntityExtractor] identifier[getPatternAnyEntityInfo] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[entityId] operator[SEP] {
Keyword[return] identifier[getPatternAnyEntityInfoWithServiceResponseAsyn... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.