code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static String getC10NKey(String keyPrefix, Method method) {
String key = getKeyAnnotationBasedKey(method);
if (null == key) {
//fallback to default key based on class FQDN and method name
key = ReflectionUtils.getDefaultKey(method);
}
if (keyPrefix.length()... | class class_name[name] begin[{]
method[getC10NKey, return_type[type[String]], modifier[public static], parameter[keyPrefix, method]] begin[{]
local_variable[type[String], key]
if[binary_operation[literal[null], ==, member[.key]]] begin[{]
assign[member[.key], cal... | Keyword[public] Keyword[static] identifier[String] identifier[getC10NKey] operator[SEP] identifier[String] identifier[keyPrefix] , identifier[Method] identifier[method] operator[SEP] {
identifier[String] identifier[key] operator[=] identifier[getKeyAnnotationBasedKey] operator[SEP] identifier[method] operator[S... |
public static final <T,U extends Range<T>> U best(Iterator<U> iterator, Comparator<U> comp)
{
List<U> list = new ArrayList<>();
ListIterator<U> li = list.listIterator();
if (!iterator.hasNext())
{
throw new IllegalArgumentException("empty");
}
U pr... | class class_name[name] begin[{]
method[best, return_type[type[U]], modifier[final public static], parameter[iterator, comp]] begin[{]
local_variable[type[List], list]
local_variable[type[ListIterator], li]
if[call[iterator.hasNext, parameter[]]] begin[{]
ThrowStateme... | Keyword[public] Keyword[static] Keyword[final] operator[<] identifier[T] , identifier[U] Keyword[extends] identifier[Range] operator[<] identifier[T] operator[>] operator[>] identifier[U] identifier[best] operator[SEP] identifier[Iterator] operator[<] identifier[U] operator[>] identifier[iterator] , identifier[Compar... |
public static Object invokeReadMethodOptional(
Object bean, String propertyName)
{
Class<?> c = bean.getClass();
Method method = getReadMethodOptional(c, propertyName);
if (method == null)
{
return null;
}
return Methods.invokeOptional(met... | class class_name[name] begin[{]
method[invokeReadMethodOptional, return_type[type[Object]], modifier[public static], parameter[bean, propertyName]] begin[{]
local_variable[type[Class], c]
local_variable[type[Method], method]
if[binary_operation[member[.method], ==, literal[null]... | Keyword[public] Keyword[static] identifier[Object] identifier[invokeReadMethodOptional] operator[SEP] identifier[Object] identifier[bean] , identifier[String] identifier[propertyName] operator[SEP] {
identifier[Class] operator[<] operator[?] operator[>] identifier[c] operator[=] identifier[bean] operator[SEP] i... |
public void marshall(UpdateMeshRequest updateMeshRequest, ProtocolMarshaller protocolMarshaller) {
if (updateMeshRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(updateMeshRequest.getClientT... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[updateMeshRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.updateMeshRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(pos... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UpdateMeshRequest] identifier[updateMeshRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[updateMeshRequest] operator[==] Other[null] operator[SEP] {
... |
private void handleClusterEvent(ClusterMembershipEvent event) {
raft.getThreadContext().execute(() -> {
if (event.type() == ClusterMembershipEvent.Type.MEMBER_REMOVED) {
log.debug("Node {} deactivated", event.subject().id());
raft.getSessions().getSessions().stream()
.filter(sessio... | class class_name[name] begin[{]
method[handleClusterEvent, return_type[void], modifier[private], parameter[event]] begin[{]
call[raft.getThreadContext, parameter[]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[handleClusterEvent] operator[SEP] identifier[ClusterMembershipEvent] identifier[event] operator[SEP] {
identifier[raft] operator[SEP] identifier[getThreadContext] operator[SEP] operator[SEP] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] oper... |
public static xen_health_monitor_temp[] get(nitro_service client) throws Exception
{
xen_health_monitor_temp resource = new xen_health_monitor_temp();
resource.validate("get");
return (xen_health_monitor_temp[]) resource.get_resources(client);
} | class class_name[name] begin[{]
method[get, return_type[type[xen_health_monitor_temp]], modifier[public static], parameter[client]] begin[{]
local_variable[type[xen_health_monitor_temp], resource]
call[resource.validate, parameter[literal["get"]]]
return[Cast(expression=MethodIn... | Keyword[public] Keyword[static] identifier[xen_health_monitor_temp] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[client] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[xen_health_monitor_temp] identifier[resource] operator[=] Keyword[new] identi... |
public static LogEntry of(String logName, MonitoredResource resource, Payload<?> payload) {
return newBuilder(payload).setLogName(logName).setResource(resource).build();
} | class class_name[name] begin[{]
method[of, return_type[type[LogEntry]], modifier[public static], parameter[logName, resource, payload]] begin[{]
return[call[.newBuilder, parameter[member[.payload]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[LogEntry] identifier[of] operator[SEP] identifier[String] identifier[logName] , identifier[MonitoredResource] identifier[resource] , identifier[Payload] operator[<] operator[?] operator[>] identifier[payload] operator[SEP] {
Keyword[return] identifier[newBuilder] oper... |
public void write4LE(final long n) {
write((byte) (n & 0xff));
write((byte) ((n & 0xff00) >> 8));
write((byte) ((n & 0xff0000) >> 16));
write((byte) ((n & 0xff000000) >> 24));
} | class class_name[name] begin[{]
method[write4LE, return_type[void], modifier[public], parameter[n]] begin[{]
call[.write, parameter[Cast(expression=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_o... | Keyword[public] Keyword[void] identifier[write4LE] operator[SEP] Keyword[final] Keyword[long] identifier[n] operator[SEP] {
identifier[write] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[n] operator[&] literal[Integer] operator[SEP] operator[SEP] operator[SEP] identifier[write... |
public static SObject of(String key, File file, String... attrs) {
SObject sobj = of(key, $.requireNotNull(file));
Map<String, String> map = C.Map(attrs);
sobj.setAttributes(map);
return sobj;
} | class class_name[name] begin[{]
method[of, return_type[type[SObject]], modifier[public static], parameter[key, file, attrs]] begin[{]
local_variable[type[SObject], sobj]
local_variable[type[Map], map]
call[sobj.setAttributes, parameter[member[.map]]]
return[member[.sobj]... | Keyword[public] Keyword[static] identifier[SObject] identifier[of] operator[SEP] identifier[String] identifier[key] , identifier[File] identifier[file] , identifier[String] operator[...] identifier[attrs] operator[SEP] {
identifier[SObject] identifier[sobj] operator[=] identifier[of] operator[SEP] identifier[k... |
ColumnOrSuperColumn getColumn(ByteBuffer key, ColumnPath colPath) {
m_logger.debug("Fetching {}.{}", new Object[]{Utils.toString(key), toString(colPath)});
ColumnOrSuperColumn column = null;
boolean bSuccess = false;
for (int attempts = 1; !bSuccess; attempts++) {
try {
... | class class_name[name] begin[{]
method[getColumn, return_type[type[ColumnOrSuperColumn]], modifier[default], parameter[key, colPath]] begin[{]
call[m_logger.debug, parameter[literal["Fetching {}.{}"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(ar... | identifier[ColumnOrSuperColumn] identifier[getColumn] operator[SEP] identifier[ByteBuffer] identifier[key] , identifier[ColumnPath] identifier[colPath] operator[SEP] {
identifier[m_logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP... |
public static int cublasDrotg(
cublasHandle handle,
Pointer a, /** host or device pointer */
Pointer b, /** host or device pointer */
Pointer c, /** host or device pointer */
Pointer s)/** host or device pointer */
{
return checkResult(cublasDrotgNative(handle... | class class_name[name] begin[{]
method[cublasDrotg, return_type[type[int]], modifier[public static], parameter[handle, a, b, c, s]] begin[{]
return[call[.checkResult, parameter[call[.cublasDrotgNative, parameter[member[.handle], member[.a], member[.b], member[.c], member[.s]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[int] identifier[cublasDrotg] operator[SEP] identifier[cublasHandle] identifier[handle] , identifier[Pointer] identifier[a] , identifier[Pointer] identifier[b] , identifier[Pointer] identifier[c] , identifier[Pointer] identifier[s] operator[SEP] {
Keyword[return] identi... |
public static void shiftCA2(AFPChain afpChain, Atom[] ca2, Matrix m, Atom shift, Group[] twistedGroups) {
int i = -1;
for (Atom a: ca2){
i++;
Group g = a.getGroup();
Calc.rotate(g,m);
Calc.shift(g, shift);
if (g.hasAltLoc()){
for (Group alt: g.getAltLocs()){
for (Atom alta : alt.getAtoms... | class class_name[name] begin[{]
method[shiftCA2, return_type[void], modifier[public static], parameter[afpChain, ca2, m, shift, twistedGroups]] begin[{]
local_variable[type[int], i]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=i,... | Keyword[public] Keyword[static] Keyword[void] identifier[shiftCA2] operator[SEP] identifier[AFPChain] identifier[afpChain] , identifier[Atom] operator[SEP] operator[SEP] identifier[ca2] , identifier[Matrix] identifier[m] , identifier[Atom] identifier[shift] , identifier[Group] operator[SEP] operator[SEP] identifier... |
public static boolean needToUpdateResourceFields(CmsResource existingRes, CmsResource newRes, boolean reduced) {
boolean result = false;
result |= existingRes.getTypeId() != newRes.getTypeId();
result |= differentDates(existingRes.getDateCreated(), newRes.getDateCreated()); // Export format dat... | class class_name[name] begin[{]
method[needToUpdateResourceFields, return_type[type[boolean]], modifier[public static], parameter[existingRes, newRes, reduced]] begin[{]
local_variable[type[boolean], result]
assign[member[.result], binary_operation[call[existingRes.getTypeId, parameter[... | Keyword[public] Keyword[static] Keyword[boolean] identifier[needToUpdateResourceFields] operator[SEP] identifier[CmsResource] identifier[existingRes] , identifier[CmsResource] identifier[newRes] , Keyword[boolean] identifier[reduced] operator[SEP] {
Keyword[boolean] identifier[result] operator[=] literal[boole... |
public void print(final PrintStream out, final ICodingAnnotationStudy study) {
//TODO: measure length of cats. maybe cut them.
Map<Object, Integer> categories = new LinkedHashMap<Object, Integer>();
for (Object cat : study.getCategories())
categories.put(cat, categories.size());
final String DIVIDER... | class class_name[name] begin[{]
method[print, return_type[void], modifier[public], parameter[out, study]] begin[{]
local_variable[type[Map], categories]
ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cat, postfix_operators=[], prefix_operator... | Keyword[public] Keyword[void] identifier[print] operator[SEP] Keyword[final] identifier[PrintStream] identifier[out] , Keyword[final] identifier[ICodingAnnotationStudy] identifier[study] operator[SEP] {
identifier[Map] operator[<] identifier[Object] , identifier[Integer] operator[>] identifier[categories] oper... |
public void addDynamicServlet(
String servletName,
String servletClass,
String mappingURI,
Properties initParameters)
throws ServletException, SecurityException
{
context.addDynamicServlet(servletName, servletClass, mappingURI, initParameters);
} | class class_name[name] begin[{]
method[addDynamicServlet, return_type[void], modifier[public], parameter[servletName, servletClass, mappingURI, initParameters]] begin[{]
call[context.addDynamicServlet, parameter[member[.servletName], member[.servletClass], member[.mappingURI], member[.initParam... | Keyword[public] Keyword[void] identifier[addDynamicServlet] operator[SEP] identifier[String] identifier[servletName] , identifier[String] identifier[servletClass] , identifier[String] identifier[mappingURI] , identifier[Properties] identifier[initParameters] operator[SEP] Keyword[throws] identifier[ServletException]... |
private Geometry makePolygonComponentsValid(Polygon polygon) {
GeometryFactory factory = polygon.getFactory();
CoordinateSequence outerRingSeq = makeSequenceValid(polygon.getExteriorRing().getCoordinateSequence(), false, true);
// The validated sequence of the outerRing does not form a valid Lin... | class class_name[name] begin[{]
method[makePolygonComponentsValid, return_type[type[Geometry]], modifier[private], parameter[polygon]] begin[{]
local_variable[type[GeometryFactory], factory]
local_variable[type[CoordinateSequence], outerRingSeq]
if[binary_operation[binary_operat... | Keyword[private] identifier[Geometry] identifier[makePolygonComponentsValid] operator[SEP] identifier[Polygon] identifier[polygon] operator[SEP] {
identifier[GeometryFactory] identifier[factory] operator[=] identifier[polygon] operator[SEP] identifier[getFactory] operator[SEP] operator[SEP] operator[SEP] identif... |
private boolean doRepeaterAfterBody()
throws JspException
{
switch (_repCurStage.getValue()) {
case RepeatingStages.INT_BEFORE:
if (!moveNext())
return false;
return doRepeaterAfterBody();
case RepeatingStages.INT_OPTION... | class class_name[name] begin[{]
method[doRepeaterAfterBody, return_type[type[boolean]], modifier[private], parameter[]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=INT_BEFORE, postfix_operators=[], prefix_operators=[], qualifier=RepeatingStages, selectors=[])], stat... | Keyword[private] Keyword[boolean] identifier[doRepeaterAfterBody] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] {
Keyword[switch] operator[SEP] identifier[_repCurStage] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] {
Keyword[case] identifier[Repeat... |
public static boolean isInstaneOf(Class src, Class trg) {
if (src.isArray() && trg.isArray()) {
return isInstaneOf(src.getComponentType(), trg.getComponentType());
}
if (src == trg) return true;
// Interface
if (trg.isInterface()) {
return _checkInterfaces(src, trg);
}
// Extends
while (src != null... | class class_name[name] begin[{]
method[isInstaneOf, return_type[type[boolean]], modifier[public static], parameter[src, trg]] begin[{]
if[binary_operation[call[src.isArray, parameter[]], &&, call[trg.isArray, parameter[]]]] begin[{]
return[call[.isInstaneOf, parameter[call[src.getCo... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isInstaneOf] operator[SEP] identifier[Class] identifier[src] , identifier[Class] identifier[trg] operator[SEP] {
Keyword[if] operator[SEP] identifier[src] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[&&] identifier[trg] operat... |
public int encodedTypeLength() {
int ans = 3; // kind code for TUPLE plus the length
if (fields != null)
for (int i = 0; i < fields.length; i++)
ans += fields[i].encodedTypeLength();
return ans;
} | class class_name[name] begin[{]
method[encodedTypeLength, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], ans]
if[binary_operation[member[.fields], !=, literal[null]]] begin[{]
ForStatement(body=StatementExpression(expression=Assignment(expressi... | Keyword[public] Keyword[int] identifier[encodedTypeLength] operator[SEP] operator[SEP] {
Keyword[int] identifier[ans] operator[=] Other[3] operator[SEP] Keyword[if] operator[SEP] identifier[fields] operator[!=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] o... |
protected static final void setRSAKey(byte[][] key) {
BigInteger[] k = new BigInteger[8];
for (int i = 0; i < 8; i++) {
if (key[i] != null) {
k[i] = new BigInteger(1, key[i]);
}
}
if (k[3].compareTo(k[4]) < 0) {
BigInteger tmp;
... | class class_name[name] begin[{]
method[setRSAKey, return_type[void], modifier[final static protected], parameter[key]] begin[{]
local_variable[type[BigInteger], k]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=key,... | Keyword[protected] Keyword[static] Keyword[final] Keyword[void] identifier[setRSAKey] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] {
identifier[BigInteger] operator[SEP] operator[SEP] identifier[k] operator[=] Keyword[new] identifier[BigInteger... |
public synchronized Configuration loadConfiguration() {
if (configurationBuffer.position(0).readByte() == 1) {
return new Configuration(
configurationBuffer.readLong(),
configurationBuffer.readLong(),
configurationBuffer.readLong(),
serializer.readObject(configurationBu... | class class_name[name] begin[{]
method[loadConfiguration, return_type[type[Configuration]], modifier[synchronized public], parameter[]] begin[{]
if[binary_operation[call[configurationBuffer.position, parameter[literal[0]]], ==, literal[1]]] begin[{]
return[ClassCreator(arguments=[Me... | Keyword[public] Keyword[synchronized] identifier[Configuration] identifier[loadConfiguration] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[configurationBuffer] operator[SEP] identifier[position] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[readByte] operator[SEP] operator[S... |
@Override
public List<CPDefinition> findByCompanyId(long companyId, int start, int end) {
return findByCompanyId(companyId, start, end, null);
} | class class_name[name] begin[{]
method[findByCompanyId, return_type[type[List]], modifier[public], parameter[companyId, start, end]] begin[{]
return[call[.findByCompanyId, parameter[member[.companyId], member[.start], member[.end], literal[null]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CPDefinition] operator[>] identifier[findByCompanyId] operator[SEP] Keyword[long] identifier[companyId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
Keyword[return] identifier[findByCom... |
public static List<String> getInstances(String propertyName, boolean asGlobal) {
return getPropertyService().getInstances(propertyName, asGlobal);
} | class class_name[name] begin[{]
method[getInstances, return_type[type[List]], modifier[public static], parameter[propertyName, asGlobal]] begin[{]
return[call[.getPropertyService, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[getInstances] operator[SEP] identifier[String] identifier[propertyName] , Keyword[boolean] identifier[asGlobal] operator[SEP] {
Keyword[return] identifier[getPropertyService] operator[SEP] operator[SEP] operat... |
@Nonnull
public static String getCompressedCSS (@Nonnull final String sOriginalCSS,
@Nonnull final ECSSVersion eCSSVersion,
final boolean bRemoveUnnecessaryCode)
{
final CSSWriterSettings aSettings = new CSSWriterSettings (eCSSVer... | class class_name[name] begin[{]
method[getCompressedCSS, return_type[type[String]], modifier[public static], parameter[sOriginalCSS, eCSSVersion, bRemoveUnnecessaryCode]] begin[{]
local_variable[type[CSSWriterSettings], aSettings]
call[aSettings.setRemoveUnnecessaryCode, parameter[membe... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[String] identifier[getCompressedCSS] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[sOriginalCSS] , annotation[@] identifier[Nonnull] Keyword[final] identifier[ECSSVersion] identifier[eCSSVersion]... |
private static CharBuffer decodeString(byte[] bytes, Charset charset, int referenceLength) {
try {
final Charset autodetectedCharset;
final CharsetDecoder decoder = charset.newDecoder();
final CharBuffer buffer = decoder.decode(ByteBuffer.wrap(bytes));
if ((decoder.isAutoDetecting())
&& (decoder.isCh... | class class_name[name] begin[{]
method[decodeString, return_type[type[CharBuffer]], modifier[private static], parameter[bytes, charset, referenceLength]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=autodetec... | Keyword[private] Keyword[static] identifier[CharBuffer] identifier[decodeString] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] , identifier[Charset] identifier[charset] , Keyword[int] identifier[referenceLength] operator[SEP] {
Keyword[try] {
Keyword[final] identifier[Cha... |
@Override
public <V> Iterator<VertexProperty<V>> properties(String... propertyKeys) {
ArrayList<VertexProperty<V>> ans = new ArrayList<VertexProperty<V>>();
if (propertyKeys.length == 0) {
if (this.properties == null) return Collections.emptyIterator();
propertyKeys = this.properties... | class class_name[name] begin[{]
method[properties, return_type[type[Iterator]], modifier[public], parameter[propertyKeys]] begin[{]
local_variable[type[ArrayList], ans]
if[binary_operation[member[propertyKeys.length], ==, literal[0]]] begin[{]
if[binary_operation... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[V] operator[>] identifier[Iterator] operator[<] identifier[VertexProperty] operator[<] identifier[V] operator[>] operator[>] identifier[properties] operator[SEP] identifier[String] operator[...] identifier[propertyKeys] operator[SEP] {
ide... |
private void onFacebookBtnClicked() {
// defaults found in: com.socialize.networks.facebook.BaseFacebookFacade
String[] permissions = {"email"};
FacebookUtils.linkForRead(this, new SocializeAuthListener() {
@Override
public void onCancel() {
Toast.makeText(GetEmailActivity.this, "Facebook login cancel... | class class_name[name] begin[{]
method[onFacebookBtnClicked, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[String], permissions]
call[FacebookUtils.linkForRead, parameter[THIS[], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation... | Keyword[private] Keyword[void] identifier[onFacebookBtnClicked] operator[SEP] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[permissions] operator[=] {
literal[String]
} operator[SEP] identifier[FacebookUtils] operator[SEP] identifier[linkForRead] operator[SEP] Keywor... |
public int agendaSize() {
int size = 0;
for ( InternalAgendaGroup internalAgendaGroup : this.agendaGroups.values() ) {
size += internalAgendaGroup.size();
}
return size;
} | class class_name[name] begin[{]
method[agendaSize, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], size]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=size, postfix_... | Keyword[public] Keyword[int] identifier[agendaSize] operator[SEP] operator[SEP] {
Keyword[int] identifier[size] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[InternalAgendaGroup] identifier[internalAgendaGroup] operator[:] Keyword[this] operator[SEP] identifier[agendaGroups] operator[... |
protected void writeTimedOut(ChannelHandlerContext ctx) throws Exception {
if (!closed) {
ctx.fireExceptionCaught(WriteTimeoutException.INSTANCE);
ctx.close();
closed = true;
}
} | class class_name[name] begin[{]
method[writeTimedOut, return_type[void], modifier[protected], parameter[ctx]] begin[{]
if[member[.closed]] begin[{]
call[ctx.fireExceptionCaught, parameter[member[WriteTimeoutException.INSTANCE]]]
call[ctx.close, pa... | Keyword[protected] Keyword[void] identifier[writeTimedOut] operator[SEP] identifier[ChannelHandlerContext] identifier[ctx] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] operator[!] identifier[closed] operator[SEP] {
identifier[ctx] operator[SEP] identifier[fireExcepti... |
public void setFacility(String facilityStr) {
if (facilityStr != null) {
facilityStr = facilityStr.trim();
}
this.facilityStr = facilityStr;
} | class class_name[name] begin[{]
method[setFacility, return_type[void], modifier[public], parameter[facilityStr]] begin[{]
if[binary_operation[member[.facilityStr], !=, literal[null]]] begin[{]
assign[member[.facilityStr], call[facilityStr.trim, parameter[]]]
else... | Keyword[public] Keyword[void] identifier[setFacility] operator[SEP] identifier[String] identifier[facilityStr] operator[SEP] {
Keyword[if] operator[SEP] identifier[facilityStr] operator[!=] Other[null] operator[SEP] {
identifier[facilityStr] operator[=] identifier[facilityStr] operator[SEP] identifier... |
public Object get(Class cls, String attr)
{
HashMap map;
// See if the class exists in the cache.
if (!values.containsKey(cls))
{
// Class not in cache so return null.
return null;
}
// Get the cache of field values for the class.
map... | class class_name[name] begin[{]
method[get, return_type[type[Object]], modifier[public], parameter[cls, attr]] begin[{]
local_variable[type[HashMap], map]
if[call[values.containsKey, parameter[member[.cls]]]] begin[{]
return[literal[null]]
else begin[{]
None
... | Keyword[public] identifier[Object] identifier[get] operator[SEP] identifier[Class] identifier[cls] , identifier[String] identifier[attr] operator[SEP] {
identifier[HashMap] identifier[map] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[values] operator[SEP] identifier[containsKey] operator[SEP] ... |
@Override
public T next(T target) throws IOException {
// check for the left over element
if (this.readPhase) {
return getNextRecord(target);
} else {
// writing phase. check for leftover first
if (this.leftOverReturned) {
// get next record
if ((target = this.input.next(target)) != null) {
... | class class_name[name] begin[{]
method[next, return_type[type[T]], modifier[public], parameter[target]] begin[{]
if[THIS[member[None.readPhase]]] begin[{]
return[call[.getNextRecord, parameter[member[.target]]]]
else begin[{]
if[THIS[member[None.leftO... | annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[next] operator[SEP] identifier[T] identifier[target] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[readPhase] operator[SEP] {
Keyword[return] identifie... |
@Override
public void mouseClicked(MouseEvent e) {
mouseEvents.add(MouseInputEvent.fromMouseEvent(MouseAction.CLICKED, e));
} | class class_name[name] begin[{]
method[mouseClicked, return_type[void], modifier[public], parameter[e]] begin[{]
call[mouseEvents.add, parameter[call[MouseInputEvent.fromMouseEvent, parameter[member[MouseAction.CLICKED], member[.e]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[mouseClicked] operator[SEP] identifier[MouseEvent] identifier[e] operator[SEP] {
identifier[mouseEvents] operator[SEP] identifier[add] operator[SEP] identifier[MouseInputEvent] operator[SEP] identifier[fromMouseEvent] operator[SEP] ident... |
public static dnssrvrec[] get_filtered(nitro_service service, String filter) throws Exception{
dnssrvrec obj = new dnssrvrec();
options option = new options();
option.set_filter(filter);
dnssrvrec[] response = (dnssrvrec[]) obj.getfiltered(service, option);
return response;
} | class class_name[name] begin[{]
method[get_filtered, return_type[type[dnssrvrec]], modifier[public static], parameter[service, filter]] begin[{]
local_variable[type[dnssrvrec], obj]
local_variable[type[options], option]
call[option.set_filter, parameter[member[.filter]]]
... | Keyword[public] Keyword[static] identifier[dnssrvrec] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[dnssrvrec] identifier[obj] operator[=] K... |
@Override
public void setExtensions(List<ExtensionConfig> extensions) {
this.extensions.clear();
if (extensions != null) {
this.extensions.addAll(extensions);
}
} | class class_name[name] begin[{]
method[setExtensions, return_type[void], modifier[public], parameter[extensions]] begin[{]
THIS[member[None.extensions]call[None.clear, parameter[]]]
if[binary_operation[member[.extensions], !=, literal[null]]] begin[{]
THI... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setExtensions] operator[SEP] identifier[List] operator[<] identifier[ExtensionConfig] operator[>] identifier[extensions] operator[SEP] {
Keyword[this] operator[SEP] identifier[extensions] operator[SEP] identifier[clear] operator[SEP] ope... |
public static void main(String[] args) throws IOException{
if (args.length < 1) {
System.err.println("usage: DocumentPreprocessor filename [OPTS]");
return;
}
DocumentPreprocessor docPreprocessor = new DocumentPreprocessor(args[0]);
String encoding = "utf-8";
boolean printSenten... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
if[binary_operation[member[args.length], <, literal[1]]] begin[{]
call[System.err.println, parameter[literal["usage: DocumentPreprocessor filename [OPTS]"]]... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[<] Other[1] operator[SEP] {
... |
public static vpnvserver_staserver_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_staserver_binding obj = new vpnvserver_staserver_binding();
obj.set_name(name);
vpnvserver_staserver_binding response[] = (vpnvserver_staserver_binding[]) obj.get_resources(service);
return response... | class class_name[name] begin[{]
method[get, return_type[type[vpnvserver_staserver_binding]], modifier[public static], parameter[service, name]] begin[{]
local_variable[type[vpnvserver_staserver_binding], obj]
call[obj.set_name, parameter[member[.name]]]
local_variable[type[vpnvs... | Keyword[public] Keyword[static] identifier[vpnvserver_staserver_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[vpnvserver_staserver_binding] id... |
public CollectionInfo getCollectionInfo(int collectionId, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, collectionId);
parameters.add(Param.LANGUAGE, language);
URL url = new ApiUrl(apiKey, MethodBase.COLLECTION).bu... | class class_name[name] begin[{]
method[getCollectionInfo, return_type[type[CollectionInfo]], modifier[public], parameter[collectionId, language]] begin[{]
local_variable[type[TmdbParameters], parameters]
call[parameters.add, parameter[member[Param.ID], member[.collectionId]]]
... | Keyword[public] identifier[CollectionInfo] identifier[getCollectionInfo] operator[SEP] Keyword[int] identifier[collectionId] , identifier[String] identifier[language] operator[SEP] Keyword[throws] identifier[MovieDbException] {
identifier[TmdbParameters] identifier[parameters] operator[=] Keyword[new] identifie... |
public static void createFullReportLog(String sessionLogDir)
throws Exception {
File xml_logs_report_file = new File(sessionLogDir + File.separator
+ "report_logs.xml");
if (xml_logs_report_file.exists()) {
xml_logs_report_file.delete();
xml_logs... | class class_name[name] begin[{]
method[createFullReportLog, return_type[void], modifier[public static], parameter[sessionLogDir]] begin[{]
local_variable[type[File], xml_logs_report_file]
if[call[xml_logs_report_file.exists, parameter[]]] begin[{]
call[xml_logs_r... | Keyword[public] Keyword[static] Keyword[void] identifier[createFullReportLog] operator[SEP] identifier[String] identifier[sessionLogDir] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[File] identifier[xml_logs_report_file] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[sessi... |
public void keys(final IntArrayList list) {
list.clear();
forEachKey(
new IntProcedure() {
public boolean apply(int key) {
list.add(key);
return true;
}
}
);
} | class class_name[name] begin[{]
method[keys, return_type[void], modifier[public], parameter[list]] begin[{]
call[list.clear, parameter[]]
call[.forEachKey, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInv... | Keyword[public] Keyword[void] identifier[keys] operator[SEP] Keyword[final] identifier[IntArrayList] identifier[list] operator[SEP] {
identifier[list] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[forEachKey] operator[SEP] Keyword[new] identifier[IntProcedure] operator[SEP]... |
@Override
public void setValue(final double VALUE) {
if (isEnabled()) {
this.value100 = (VALUE % 1000) / 100;
this.value1000 = (VALUE % 10000) / 100;
this.value10000 = (VALUE % 100000) / 100;
if (isValueCoupled()) {
setLcdValue(VALUE);
... | class class_name[name] begin[{]
method[setValue, return_type[void], modifier[public], parameter[VALUE]] begin[{]
if[call[.isEnabled, parameter[]]] begin[{]
assign[THIS[member[None.value100]], binary_operation[binary_operation[member[.VALUE], %, literal[1000]], /, literal... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setValue] operator[SEP] Keyword[final] Keyword[double] identifier[VALUE] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEnabled] operator[SEP] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[value1... |
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case XbasePackage.XBINARY_OPERATION__LEFT_OPERAND:
return leftOperand != null;
case XbasePackage.XBINARY_OPERATION__RIGHT_OPERAND:
return rightOperand != null;
case XbasePackage.XBINARY_OPERATION__REASSIGN_FIRST_ARGUMENT:
r... | class class_name[name] begin[{]
method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=XBINARY_OPERATION__LEFT_OPERAND, postfix_operators=[], prefix_operators=[], qualifier=XbasePackage, selecto... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[XbasePackage] operator[SEP] identifier[XBINARY_OPERATION_... |
public MediaState getEpisodeAccountState(int tvID, int seasonNumber, int episodeNumber, String sessionID) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
parameters.add(Param.SESSION_ID, sessionID);
parameters.add(Param.SEASON_N... | class class_name[name] begin[{]
method[getEpisodeAccountState, return_type[type[MediaState]], modifier[public], parameter[tvID, seasonNumber, episodeNumber, sessionID]] begin[{]
local_variable[type[TmdbParameters], parameters]
call[parameters.add, parameter[member[Param.ID], member[.tvI... | Keyword[public] identifier[MediaState] identifier[getEpisodeAccountState] operator[SEP] Keyword[int] identifier[tvID] , Keyword[int] identifier[seasonNumber] , Keyword[int] identifier[episodeNumber] , identifier[String] identifier[sessionID] operator[SEP] Keyword[throws] identifier[MovieDbException] {
identif... |
private ParseTree parseArrayPattern(PatternKind kind) {
SourcePosition start = getTreeStartLocation();
ImmutableList.Builder<ParseTree> elements = ImmutableList.builder();
eat(TokenType.OPEN_SQUARE);
while (peek(TokenType.COMMA) || peekArrayPatternElement()) {
if (peek(TokenType.COMMA)) {
... | class class_name[name] begin[{]
method[parseArrayPattern, return_type[type[ParseTree]], modifier[private], parameter[kind]] begin[{]
local_variable[type[SourcePosition], start]
local_variable[type[ImmutableList], elements]
call[.eat, parameter[member[TokenType.OPEN_SQUARE]]]
... | Keyword[private] identifier[ParseTree] identifier[parseArrayPattern] operator[SEP] identifier[PatternKind] identifier[kind] operator[SEP] {
identifier[SourcePosition] identifier[start] operator[=] identifier[getTreeStartLocation] operator[SEP] operator[SEP] operator[SEP] identifier[ImmutableList] operator[SEP] i... |
public static boolean deleteDir(final Path self) {
if (!Files.exists(self))
return true;
if (!Files.isDirectory(self))
return false;
// delete contained files
try (DirectoryStream<Path> stream = Files.newDirectoryStream(self)) {
for (Path path : stre... | class class_name[name] begin[{]
method[deleteDir, return_type[type[boolean]], modifier[public static], parameter[self]] begin[{]
if[call[Files.exists, parameter[member[.self]]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
if[call[Files.isDirectory, p... | Keyword[public] Keyword[static] Keyword[boolean] identifier[deleteDir] operator[SEP] Keyword[final] identifier[Path] identifier[self] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[Files] operator[SEP] identifier[exists] operator[SEP] identifier[self] operator[SEP] operator[SEP] Keyword[return]... |
public static String toTableName(Class<?> table) {
if (table.isAnnotationPresent(Table.class)) {
Table annotation = table.getAnnotation(Table.class);
if ("".equals(annotation.name())) {
return NamingHelper.toSQLNameDefault(table.getSimpleName());
}
... | class class_name[name] begin[{]
method[toTableName, return_type[type[String]], modifier[public static], parameter[table]] begin[{]
if[call[table.isAnnotationPresent, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, ... | Keyword[public] Keyword[static] identifier[String] identifier[toTableName] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[table] operator[SEP] {
Keyword[if] operator[SEP] identifier[table] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[Table] operator[SEP] ... |
private void init() {
// null implies "no expression"
value_ = type_ = pattern_ = null;
currencyCode_ = currencySymbol_ = null;
groupingUsed_ = null;
maxIntegerDigits_ = minIntegerDigits_ = null;
maxFractionDigits_ = minFractionDigits_ = null;
} | class class_name[name] begin[{]
method[init, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.value_], assign[member[.type_], assign[member[.pattern_], literal[null]]]]
assign[member[.currencyCode_], assign[member[.currencySymbol_], literal[null]]]
... | Keyword[private] Keyword[void] identifier[init] operator[SEP] operator[SEP] {
identifier[value_] operator[=] identifier[type_] operator[=] identifier[pattern_] operator[=] Other[null] operator[SEP] identifier[currencyCode_] operator[=] identifier[currencySymbol_] operator[=] Other[null] operator[SEP] identifier[... |
private void addFragmentToView(final int viewId, final Fragment fragment) {
fragmentManager.beginTransaction().replace(viewId, fragment).commit();
} | class class_name[name] begin[{]
method[addFragmentToView, return_type[void], modifier[private], parameter[viewId, fragment]] begin[{]
call[fragmentManager.beginTransaction, parameter[]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[addFragmentToView] operator[SEP] Keyword[final] Keyword[int] identifier[viewId] , Keyword[final] identifier[Fragment] identifier[fragment] operator[SEP] {
identifier[fragmentManager] operator[SEP] identifier[beginTransaction] operator[SEP] operator[SEP] operator[SEP] id... |
public static QueryString decode(final String s) {
final QueryString params = new QueryString();
String name = null;
int pos = 0; // Beginning of the unprocessed region
int i; // End of the unprocessed region
for (i = 0; i < s.length(); i++) {
final char c = s.charAt(i);
if (c == '... | class class_name[name] begin[{]
method[decode, return_type[type[QueryString]], modifier[public static], parameter[s]] begin[{]
local_variable[type[QueryString], params]
local_variable[type[String], name]
local_variable[type[int], pos]
local_variable[type[int], i]
ForStat... | Keyword[public] Keyword[static] identifier[QueryString] identifier[decode] operator[SEP] Keyword[final] identifier[String] identifier[s] operator[SEP] {
Keyword[final] identifier[QueryString] identifier[params] operator[=] Keyword[new] identifier[QueryString] operator[SEP] operator[SEP] operator[SEP] identifier[... |
protected void addSharedLibraries( JarArchiver jarArchiver, File directory, String architecture )
{
getLog().debug( "Searching for shared libraries in " + directory );
File[] libFiles = directory.listFiles( new FilenameFilter()
{
public boolean accept( final File dir, final Strin... | class class_name[name] begin[{]
method[addSharedLibraries, return_type[void], modifier[protected], parameter[jarArchiver, directory, architecture]] begin[{]
call[.getLog, parameter[]]
local_variable[type[File], libFiles]
if[binary_operation[member[.libFiles], !=, literal... | Keyword[protected] Keyword[void] identifier[addSharedLibraries] operator[SEP] identifier[JarArchiver] identifier[jarArchiver] , identifier[File] identifier[directory] , identifier[String] identifier[architecture] operator[SEP] {
identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] ope... |
public void putUnknownHost(String hostname, int netId, String detailMessage) {
cache.put(new AddressCacheKey(hostname, netId), new AddressCacheEntry(detailMessage));
} | class class_name[name] begin[{]
method[putUnknownHost, return_type[void], modifier[public], parameter[hostname, netId, detailMessage]] begin[{]
call[cache.put, parameter[ClassCreator(arguments=[MemberReference(member=hostname, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])... | Keyword[public] Keyword[void] identifier[putUnknownHost] operator[SEP] identifier[String] identifier[hostname] , Keyword[int] identifier[netId] , identifier[String] identifier[detailMessage] operator[SEP] {
identifier[cache] operator[SEP] identifier[put] operator[SEP] Keyword[new] identifier[AddressCacheKey] o... |
public void placeMFOrder(KiteConnect kiteConnect) throws KiteException, IOException {
System.out.println("place order: "+ kiteConnect.placeMFOrder("INF174K01LS2", Constants.TRANSACTION_TYPE_BUY, 5000, 0, "myTag").orderId);
} | class class_name[name] begin[{]
method[placeMFOrder, return_type[void], modifier[public], parameter[kiteConnect]] begin[{]
call[System.out.println, parameter[binary_operation[literal["place order: "], +, call[kiteConnect.placeMFOrder, parameter[literal["INF174K01LS2"], member[Constants.TRANSACT... | Keyword[public] Keyword[void] identifier[placeMFOrder] operator[SEP] identifier[KiteConnect] identifier[kiteConnect] operator[SEP] Keyword[throws] identifier[KiteException] , identifier[IOException] {
identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String... |
public void setOrientation(final Orientation orientation) {
if (orientation != mOrientation) {
mOrientation = orientation;
if (mContainer != null) {
mContainer.onLayoutChanged(this);
}
}
} | class class_name[name] begin[{]
method[setOrientation, return_type[void], modifier[public], parameter[orientation]] begin[{]
if[binary_operation[member[.orientation], !=, member[.mOrientation]]] begin[{]
assign[member[.mOrientation], member[.orientation]]
... | Keyword[public] Keyword[void] identifier[setOrientation] operator[SEP] Keyword[final] identifier[Orientation] identifier[orientation] operator[SEP] {
Keyword[if] operator[SEP] identifier[orientation] operator[!=] identifier[mOrientation] operator[SEP] {
identifier[mOrientation] operator[=] identifier[... |
static void set(WarpContext warpContext) {
Validate.notNull(warpContext, "WarpContext for setting to store can't be null");
try {
while (!reference.compareAndSet(null, warpContext)) {
Thread.sleep(100);
}
} catch (InterruptedException e) {
thr... | class class_name[name] begin[{]
method[set, return_type[void], modifier[static], parameter[warpContext]] begin[{]
call[Validate.notNull, parameter[member[.warpContext], literal["WarpContext for setting to store can't be null"]]]
TryStatement(block=[WhileStatement(body=BlockStatement(lab... | Keyword[static] Keyword[void] identifier[set] operator[SEP] identifier[WarpContext] identifier[warpContext] operator[SEP] {
identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[warpContext] , literal[String] operator[SEP] operator[SEP] Keyword[try] {
Keyword[while] operator... |
public BehaviorTree<E> parse (Reader reader, E object) {
btReader.parse(reader);
return createBehaviorTree(btReader.root, object);
} | class class_name[name] begin[{]
method[parse, return_type[type[BehaviorTree]], modifier[public], parameter[reader, object]] begin[{]
call[btReader.parse, parameter[member[.reader]]]
return[call[.createBehaviorTree, parameter[member[btReader.root], member[.object]]]]
end[}]
END[}] | Keyword[public] identifier[BehaviorTree] operator[<] identifier[E] operator[>] identifier[parse] operator[SEP] identifier[Reader] identifier[reader] , identifier[E] identifier[object] operator[SEP] {
identifier[btReader] operator[SEP] identifier[parse] operator[SEP] identifier[reader] operator[SEP] operator[SEP... |
@Override
public List<CPTaxCategory> findByGroupId(long groupId, int start, int end) {
return findByGroupId(groupId, start, end, null);
} | class class_name[name] begin[{]
method[findByGroupId, return_type[type[List]], modifier[public], parameter[groupId, start, end]] begin[{]
return[call[.findByGroupId, parameter[member[.groupId], member[.start], member[.end], literal[null]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CPTaxCategory] operator[>] identifier[findByGroupId] operator[SEP] Keyword[long] identifier[groupId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
Keyword[return] identifier[findByGroupI... |
protected HttpSession getIHttpSession(HttpServletRequest _request, HttpServletResponse _response, boolean create, boolean cacheOnly)
{
// create local variable - JIT performance improvement
final boolean isTraceOn = com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled();
if (isTraceOn && LoggingUtil.SESSION... | class class_name[name] begin[{]
method[getIHttpSession, return_type[type[HttpSession]], modifier[protected], parameter[_request, _response, create, cacheOnly]] begin[{]
local_variable[type[boolean], isTraceOn]
if[binary_operation[member[.isTraceOn], &&, call[LoggingUtil.SESSION_LOGGER_C... | Keyword[protected] identifier[HttpSession] identifier[getIHttpSession] operator[SEP] identifier[HttpServletRequest] identifier[_request] , identifier[HttpServletResponse] identifier[_response] , Keyword[boolean] identifier[create] , Keyword[boolean] identifier[cacheOnly] operator[SEP] {
Keyword[final] Keyword... |
protected void doLogSql() {
LOG.info("XianPatternSQL :" + getPatternSql());
LOG.info("Prepared SQL:" + getSqlDriver().preparedSql(getPatternSql()));
LOG.info("Full SQL:" + getFullSql());
} | class class_name[name] begin[{]
method[doLogSql, return_type[void], modifier[protected], parameter[]] begin[{]
call[LOG.info, parameter[binary_operation[literal["XianPatternSQL :"], +, call[.getPatternSql, parameter[]]]]]
call[LOG.info, parameter[binary_operation[literal["Prepar... | Keyword[protected] Keyword[void] identifier[doLogSql] operator[SEP] operator[SEP] {
identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[getPatternSql] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SE... |
public static void sort(int[] data, Comparator<? super DBIDRef> comp) {
sort(data, 0, data.length, comp);
} | class class_name[name] begin[{]
method[sort, return_type[void], modifier[public static], parameter[data, comp]] begin[{]
call[.sort, parameter[member[.data], literal[0], member[data.length], member[.comp]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[sort] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[data] , identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[DBIDRef] operator[>] identifier[comp] operator[SEP] {
identifier[sort] operator[SEP] identifier[data] ... |
private Expression readCaseWhenExpression() {
Expression l = null;
read();
readThis(Tokens.OPENBRACKET);
l = XreadBooleanValueExpression();
readThis(Tokens.COMMA);
Expression thenelse = XreadRowValueExpression();
readThis(Tokens.COMMA);
thenelse = n... | class class_name[name] begin[{]
method[readCaseWhenExpression, return_type[type[Expression]], modifier[private], parameter[]] begin[{]
local_variable[type[Expression], l]
call[.read, parameter[]]
call[.readThis, parameter[member[Tokens.OPENBRACKET]]]
assi... | Keyword[private] identifier[Expression] identifier[readCaseWhenExpression] operator[SEP] operator[SEP] {
identifier[Expression] identifier[l] operator[=] Other[null] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] identifier[readThis] operator[SEP] identifier[Tokens] operator[SEP] identi... |
@Override
public UpdateServiceResult updateService(UpdateServiceRequest request) {
request = beforeClientExecution(request);
return executeUpdateService(request);
} | class class_name[name] begin[{]
method[updateService, return_type[type[UpdateServiceResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeUpdateService, parameter[member[.request]]... | annotation[@] identifier[Override] Keyword[public] identifier[UpdateServiceResult] identifier[updateService] operator[SEP] identifier[UpdateServiceRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operato... |
public T get() {
long expiration = whenItExpires;
long now = System.nanoTime();
// if uninitialized or expired update value
if (expiration == 0 || now >= expiration) {
synchronized (this) {
// ensure a different thread didn't update it
if (whenItExpires == expiration) {
... | class class_name[name] begin[{]
method[get, return_type[type[T]], modifier[public], parameter[]] begin[{]
local_variable[type[long], expiration]
local_variable[type[long], now]
if[binary_operation[binary_operation[member[.expiration], ==, literal[0]], ||, binary_operation[member... | Keyword[public] identifier[T] identifier[get] operator[SEP] operator[SEP] {
Keyword[long] identifier[expiration] operator[=] identifier[whenItExpires] operator[SEP] Keyword[long] identifier[now] operator[=] identifier[System] operator[SEP] identifier[nanoTime] operator[SEP] operator[SEP] operator[SEP] Keyword[if... |
public int getImportInsertOffset(SarlScript script) {
final ICompositeNode node = NodeModelUtils.findActualNodeFor(script.getImportSection());
if (node == null) {
final List<INode> children = NodeModelUtils.findNodesForFeature(script,
XtendPackage.eINSTANCE.getXtendFile_Package());
if (children.isEmpty()... | class class_name[name] begin[{]
method[getImportInsertOffset, return_type[type[int]], modifier[public], parameter[script]] begin[{]
local_variable[type[ICompositeNode], node]
if[binary_operation[member[.node], ==, literal[null]]] begin[{]
local_variable[type[List], children]... | Keyword[public] Keyword[int] identifier[getImportInsertOffset] operator[SEP] identifier[SarlScript] identifier[script] operator[SEP] {
Keyword[final] identifier[ICompositeNode] identifier[node] operator[=] identifier[NodeModelUtils] operator[SEP] identifier[findActualNodeFor] operator[SEP] identifier[script] ope... |
protected void releaseReader() {
if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
checkRequestObjectInUse();
}
if (_srtRequestHelper._gotReader) {
if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {
logger.logp(Level.FINE, CLA... | class class_name[name] begin[{]
method[releaseReader, return_type[void], modifier[protected], parameter[]] begin[{]
if[member[WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE]] begin[{]
call[.checkRequestObjectInUse, parameter[]]
else begin[{]
None
end[}]
... | Keyword[protected] Keyword[void] identifier[releaseReader] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[WCCustomProperties] operator[SEP] identifier[CHECK_REQUEST_OBJECT_IN_USE] operator[SEP] {
identifier[checkRequestObjectInUse] operator[SEP] operator[SEP] operator[SEP]
}... |
public static base_response delete(nitro_service client, dnsaddrec resource) throws Exception {
dnsaddrec deleteresource = new dnsaddrec();
deleteresource.hostname = resource.hostname;
deleteresource.ipaddress = resource.ipaddress;
return deleteresource.delete_resource(client);
} | class class_name[name] begin[{]
method[delete, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{]
local_variable[type[dnsaddrec], deleteresource]
assign[member[deleteresource.hostname], member[resource.hostname]]
assign[membe... | Keyword[public] Keyword[static] identifier[base_response] identifier[delete] operator[SEP] identifier[nitro_service] identifier[client] , identifier[dnsaddrec] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[dnsaddrec] identifier[deleteresource] operator[=] Keyword[new] ide... |
public static void init(AuthAPI authzAPI, AuthzFacade facade) throws Exception {
/**
* Get History
*/
authzAPI.route(GET,"/authz/hist/user/:user",API.HISTORY,new Code(facade,"Get History by User", true) {
@Override
public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) th... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public static], parameter[authzAPI, facade]] begin[{]
call[authzAPI.route, parameter[member[.GET], literal["/authz/hist/user/:user"], member[API.HISTORY], ClassCreator(arguments=[MemberReference(member=facade, postfix_oper... | Keyword[public] Keyword[static] Keyword[void] identifier[init] operator[SEP] identifier[AuthAPI] identifier[authzAPI] , identifier[AuthzFacade] identifier[facade] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[authzAPI] operator[SEP] identifier[route] operator[SEP] identifier[GET] , literal[S... |
public void marshall(DeleteBrokerRequest deleteBrokerRequest, ProtocolMarshaller protocolMarshaller) {
if (deleteBrokerRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(deleteBrokerRequest.ge... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[deleteBrokerRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.deleteBrokerRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeleteBrokerRequest] identifier[deleteBrokerRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[deleteBrokerRequest] operator[==] Other[null] operator[SEP] {
... |
public Image addImageUrlInput(String listId, String contentType, BodyModelModel imageUrl, AddImageUrlInputOptionalParameter addImageUrlInputOptionalParameter) {
return addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl, addImageUrlInputOptionalParameter).toBlocking().single().body();
} | class class_name[name] begin[{]
method[addImageUrlInput, return_type[type[Image]], modifier[public], parameter[listId, contentType, imageUrl, addImageUrlInputOptionalParameter]] begin[{]
return[call[.addImageUrlInputWithServiceResponseAsync, parameter[member[.listId], member[.contentType], member[.imag... | Keyword[public] identifier[Image] identifier[addImageUrlInput] operator[SEP] identifier[String] identifier[listId] , identifier[String] identifier[contentType] , identifier[BodyModelModel] identifier[imageUrl] , identifier[AddImageUrlInputOptionalParameter] identifier[addImageUrlInputOptionalParameter] operator[SEP]... |
@XmlElementDecl(namespace = "http://votering.riksdagen.external.model.cia.hack23.com/impl", name = "votering")
public JAXBElement<BallotContainer> createVotering(final BallotContainer value) {
return new JAXBElement<>(_Votering_QNAME, BallotContainer.class, null, value);
} | class class_name[name] begin[{]
method[createVotering, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_Votering_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operato... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[BallotContainer] operator[>] identifier[createVotering] operator[SEP] Keyword[final] ident... |
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case AfplibPackage.GCMRK__RG:
getRg().clear();
getRg().addAll((Collection<? extends GCMRKRG>)newValue);
return;
}
super.eSet(featureID, newValue);
} | class class_name[name] begin[{]
method[eSet, return_type[void], modifier[public], parameter[featureID, newValue]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=GCMRK__RG, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[S... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eSet] operator[SEP] Keyword[int] identifier[featureID] , identifier[Object] identifier[newValue] operator[SEP] {
Keyword[switch] operator[SEP] identi... |
public void setDeviceSelectorConfiguration(String deviceSelector) {
m_deviceSelectorConfiguration = deviceSelector;
Object objectInstance;
try {
objectInstance = Class.forName(m_deviceSelectorConfiguration).newInstance();
} catch (Throwable t) {
LOG.error(
... | class class_name[name] begin[{]
method[setDeviceSelectorConfiguration, return_type[void], modifier[public], parameter[deviceSelector]] begin[{]
assign[member[.m_deviceSelectorConfiguration], member[.deviceSelector]]
local_variable[type[Object], objectInstance]
TryStatement(block... | Keyword[public] Keyword[void] identifier[setDeviceSelectorConfiguration] operator[SEP] identifier[String] identifier[deviceSelector] operator[SEP] {
identifier[m_deviceSelectorConfiguration] operator[=] identifier[deviceSelector] operator[SEP] identifier[Object] identifier[objectInstance] operator[SEP] Keyword[t... |
private void unmarshall()
{
sheetData = sheet.getJaxbElement().getSheetData();
rows = sheetData.getRow();
if(rows != null && rows.size() > 0)
{
Row r = (Row)rows.get(0);
numColumns = r.getC().size();
}
} | class class_name[name] begin[{]
method[unmarshall, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.sheetData], call[sheet.getJaxbElement, parameter[]]]
assign[member[.rows], call[sheetData.getRow, parameter[]]]
if[binary_operation[binar... | Keyword[private] Keyword[void] identifier[unmarshall] operator[SEP] operator[SEP] {
identifier[sheetData] operator[=] identifier[sheet] operator[SEP] identifier[getJaxbElement] operator[SEP] operator[SEP] operator[SEP] identifier[getSheetData] operator[SEP] operator[SEP] operator[SEP] identifier[rows] operator[=... |
public synchronized void synchronizeSchema() {
OObjectDatabaseTx database = ((OObjectDatabaseTx) ODatabaseRecordThreadLocal.instance().get().getDatabaseOwner());
Collection<Class<?>> registeredEntities = database.getEntityManager().getRegisteredEntities();
boolean automaticSchemaGeneration = database.isAuto... | class class_name[name] begin[{]
method[synchronizeSchema, return_type[void], modifier[synchronized public], parameter[]] begin[{]
local_variable[type[OObjectDatabaseTx], database]
local_variable[type[Collection], registeredEntities]
local_variable[type[boolean], automaticSchemaGeneratio... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[synchronizeSchema] operator[SEP] operator[SEP] {
identifier[OObjectDatabaseTx] identifier[database] operator[=] operator[SEP] operator[SEP] identifier[OObjectDatabaseTx] operator[SEP] identifier[ODatabaseRecordThreadLocal] operator[SEP] identifier[in... |
public static boolean isConsistent(String eventDate, String startDayOfYear, String endDayOfYear, String year, String month, String day) {
if (isEmpty(eventDate) || (isEmpty(startDayOfYear) && isEmpty(endDayOfYear) && isEmpty(year) && isEmpty(month) && isEmpty(day))) {
return true;
}
// TODO: Add supp... | class class_name[name] begin[{]
method[isConsistent, return_type[type[boolean]], modifier[public static], parameter[eventDate, startDayOfYear, endDayOfYear, year, month, day]] begin[{]
if[binary_operation[call[.isEmpty, parameter[member[.eventDate]]], ||, binary_operation[binary_operation[binar... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isConsistent] operator[SEP] identifier[String] identifier[eventDate] , identifier[String] identifier[startDayOfYear] , identifier[String] identifier[endDayOfYear] , identifier[String] identifier[year] , identifier[String] identifier[month] , identifier[St... |
public void pass(String check, double waitFor, String actual, double timeTook) {
passes++;
recordStep(getAction(check, waitFor), "Expected " + check, getActual(actual, timeTook), true, Success.PASS);
} | class class_name[name] begin[{]
method[pass, return_type[void], modifier[public], parameter[check, waitFor, actual, timeTook]] begin[{]
member[.passes]
call[.recordStep, parameter[call[.getAction, parameter[member[.check], member[.waitFor]]], binary_operation[literal["Expected "... | Keyword[public] Keyword[void] identifier[pass] operator[SEP] identifier[String] identifier[check] , Keyword[double] identifier[waitFor] , identifier[String] identifier[actual] , Keyword[double] identifier[timeTook] operator[SEP] {
identifier[passes] operator[++] operator[SEP] identifier[recordStep] operator[S... |
public void configure(XmlParser.Node rootNode, Object obj, String xpath) throws XPathNotFoundException, XmlBeanException {
// if xpath isn't null
if (xpath != null) {
// attempt to select a new rootNode using the xpath
rootNode = XPath.select(rootNode, xpath);
// if ... | class class_name[name] begin[{]
method[configure, return_type[void], modifier[public], parameter[rootNode, obj, xpath]] begin[{]
if[binary_operation[member[.xpath], !=, literal[null]]] begin[{]
assign[member[.rootNode], call[XPath.select, parameter[member[.rootNode], mem... | Keyword[public] Keyword[void] identifier[configure] operator[SEP] identifier[XmlParser] operator[SEP] identifier[Node] identifier[rootNode] , identifier[Object] identifier[obj] , identifier[String] identifier[xpath] operator[SEP] Keyword[throws] identifier[XPathNotFoundException] , identifier[XmlBeanException] {
... |
public ItemRequest<Story> findById(String story) {
String path = String.format("/stories/%s", story);
return new ItemRequest<Story>(this, Story.class, path, "GET");
} | class class_name[name] begin[{]
method[findById, return_type[type[ItemRequest]], modifier[public], parameter[story]] begin[{]
local_variable[type[String], path]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassReference(postfix_o... | Keyword[public] identifier[ItemRequest] operator[<] identifier[Story] operator[>] identifier[findById] operator[SEP] identifier[String] identifier[story] operator[SEP] {
identifier[String] identifier[path] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier... |
protected Logger buildLogger(String fileStr) throws IOException {
String loggerName = buildLoggerName();
Appender appender = buildAppender(loggerName, fileStr);
// Create the logger and add to the map of loggers using our factory
Logger logger = loggerContext.getLogger(loggerName);
logger.addAppender(appende... | class class_name[name] begin[{]
method[buildLogger, return_type[type[Logger]], modifier[protected], parameter[fileStr]] begin[{]
local_variable[type[String], loggerName]
local_variable[type[Appender], appender]
local_variable[type[Logger], logger]
call[logger.addAppender... | Keyword[protected] identifier[Logger] identifier[buildLogger] operator[SEP] identifier[String] identifier[fileStr] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[loggerName] operator[=] identifier[buildLoggerName] operator[SEP] operator[SEP] operator[SEP] identifier[Appende... |
public static <T> T asType(CharSequence self, Class<T> c) {
return asType(self.toString(), c);
} | class class_name[name] begin[{]
method[asType, return_type[type[T]], modifier[public static], parameter[self, c]] begin[{]
return[call[.asType, parameter[call[self.toString, parameter[]], member[.c]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[asType] operator[SEP] identifier[CharSequence] identifier[self] , identifier[Class] operator[<] identifier[T] operator[>] identifier[c] operator[SEP] {
Keyword[return] identifier[asType] operator[SEP] identifier[self]... |
@Override
public int getPositionForSection(int sectionIndex) {
if (mSectionList.size() == 0) {
for (Integer key : mSections.keySet()) {
mSectionList.add(key);
}
}
return sectionIndex < mSectionList.size() ? mSectionList.get(sectionIndex) : getCount();
... | class class_name[name] begin[{]
method[getPositionForSection, return_type[type[int]], modifier[public], parameter[sectionIndex]] begin[{]
if[binary_operation[call[mSectionList.size, parameter[]], ==, literal[0]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[Stat... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[getPositionForSection] operator[SEP] Keyword[int] identifier[sectionIndex] operator[SEP] {
Keyword[if] operator[SEP] identifier[mSectionList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] ... |
@Override
public CommerceTierPriceEntry fetchByCommercePriceEntryId_Last(
long commercePriceEntryId,
OrderByComparator<CommerceTierPriceEntry> orderByComparator) {
int count = countByCommercePriceEntryId(commercePriceEntryId);
if (count == 0) {
return null;
}
List<CommerceTierPriceEntry> list = findBy... | class class_name[name] begin[{]
method[fetchByCommercePriceEntryId_Last, return_type[type[CommerceTierPriceEntry]], modifier[public], parameter[commercePriceEntryId, orderByComparator]] begin[{]
local_variable[type[int], count]
if[binary_operation[member[.count], ==, literal[0]]] begin[... | annotation[@] identifier[Override] Keyword[public] identifier[CommerceTierPriceEntry] identifier[fetchByCommercePriceEntryId_Last] operator[SEP] Keyword[long] identifier[commercePriceEntryId] , identifier[OrderByComparator] operator[<] identifier[CommerceTierPriceEntry] operator[>] identifier[orderByComparator] operat... |
public static String convertObjectToString(Object objData, Class<?> classData, Object objDefault)
{
try {
objData = Converter.convertObjectToDatatype(objData, classData, objDefault);
} catch (Exception ex) {
objData = null;
}
if (objData == null)
r... | class class_name[name] begin[{]
method[convertObjectToString, return_type[type[String]], modifier[public static], parameter[objData, classData, objDefault]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objData, postfix_operators=[], prefix_op... | Keyword[public] Keyword[static] identifier[String] identifier[convertObjectToString] operator[SEP] identifier[Object] identifier[objData] , identifier[Class] operator[<] operator[?] operator[>] identifier[classData] , identifier[Object] identifier[objDefault] operator[SEP] {
Keyword[try] {
identifie... |
private void copySchemaConceptLabelsToKeyspaceCache(TransactionOLTP tx) {
copyToCache(tx.getMetaConcept());
copyToCache(tx.getMetaRole());
copyToCache(tx.getMetaRule());
} | class class_name[name] begin[{]
method[copySchemaConceptLabelsToKeyspaceCache, return_type[void], modifier[private], parameter[tx]] begin[{]
call[.copyToCache, parameter[call[tx.getMetaConcept, parameter[]]]]
call[.copyToCache, parameter[call[tx.getMetaRole, parameter[]]]]
... | Keyword[private] Keyword[void] identifier[copySchemaConceptLabelsToKeyspaceCache] operator[SEP] identifier[TransactionOLTP] identifier[tx] operator[SEP] {
identifier[copyToCache] operator[SEP] identifier[tx] operator[SEP] identifier[getMetaConcept] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifi... |
private TxnRecord getTxnRecord(Path indexFilePath) throws IOException {
Path tmpPath = tmpFilePath(indexFilePath.toString());
if (this.options.fs.exists(indexFilePath)) {
return readTxnRecord(indexFilePath);
} else if (this.options.fs.exists(tmpPath)) {
return readTxnReco... | class class_name[name] begin[{]
method[getTxnRecord, return_type[type[TxnRecord]], modifier[private], parameter[indexFilePath]] begin[{]
local_variable[type[Path], tmpPath]
if[THIS[member[None.options]member[None.fs]call[None.exists, parameter[member[.indexFilePath]]]]] begin[{]
... | Keyword[private] identifier[TxnRecord] identifier[getTxnRecord] operator[SEP] identifier[Path] identifier[indexFilePath] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Path] identifier[tmpPath] operator[=] identifier[tmpFilePath] operator[SEP] identifier[indexFilePath] operator[SEP] identifie... |
private void killScheduler() {
if (scheduler != null) {
WfdLog.d(TAG, "scheduler killed");
scheduler.shutdown();
scheduler = null;
}
} | class class_name[name] begin[{]
method[killScheduler, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.scheduler], !=, literal[null]]] begin[{]
call[WfdLog.d, parameter[member[.TAG], literal["scheduler killed"]]]
... | Keyword[private] Keyword[void] identifier[killScheduler] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[scheduler] operator[!=] Other[null] operator[SEP] {
identifier[WfdLog] operator[SEP] identifier[d] operator[SEP] identifier[TAG] , literal[String] operator[SEP] operator[SEP] id... |
static public double tangent(Angle angle) {
double result = lock(Math.tan(angle.value));
return result;
} | class class_name[name] begin[{]
method[tangent, return_type[type[double]], modifier[public static], parameter[angle]] begin[{]
local_variable[type[double], result]
return[member[.result]]
end[}]
END[}] | Keyword[static] Keyword[public] Keyword[double] identifier[tangent] operator[SEP] identifier[Angle] identifier[angle] operator[SEP] {
Keyword[double] identifier[result] operator[=] identifier[lock] operator[SEP] identifier[Math] operator[SEP] identifier[tan] operator[SEP] identifier[angle] operator[SEP] identifi... |
public void setPara(AttributedCharacterIterator paragraph)
{
byte paraLvl;
Boolean runDirection = (Boolean) paragraph.getAttribute(TextAttribute.RUN_DIRECTION);
if (runDirection == null) {
paraLvl = LEVEL_DEFAULT_LTR;
} else {
paraLvl = (runDirection.equals(Te... | class class_name[name] begin[{]
method[setPara, return_type[void], modifier[public], parameter[paragraph]] begin[{]
local_variable[type[byte], paraLvl]
local_variable[type[Boolean], runDirection]
if[binary_operation[member[.runDirection], ==, literal[null]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setPara] operator[SEP] identifier[AttributedCharacterIterator] identifier[paragraph] operator[SEP] {
Keyword[byte] identifier[paraLvl] operator[SEP] identifier[Boolean] identifier[runDirection] operator[=] operator[SEP] identifier[Boolean] operator[SEP] identifier[paragra... |
public static byte[] downloadBytes(final String url) throws IOException {
try (InputStream inputStream = new URL(url).openStream()) {
return StreamUtil.readBytes(inputStream);
}
} | class class_name[name] begin[{]
method[downloadBytes, return_type[type[byte]], modifier[public static], parameter[url]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=inputStream, postfix_operators=[], prefix_operators=[], qualifier=, selector... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[downloadBytes] operator[SEP] Keyword[final] identifier[String] identifier[url] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] operator[SEP] identifier[InputStream] identifier[inputStream] operator[=] Keywor... |
public static File zip(String srcPath, String zipPath, boolean withSrcDir) throws UtilException {
return zip(srcPath, zipPath, DEFAULT_CHARSET, withSrcDir);
} | class class_name[name] begin[{]
method[zip, return_type[type[File]], modifier[public static], parameter[srcPath, zipPath, withSrcDir]] begin[{]
return[call[.zip, parameter[member[.srcPath], member[.zipPath], member[.DEFAULT_CHARSET], member[.withSrcDir]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[File] identifier[zip] operator[SEP] identifier[String] identifier[srcPath] , identifier[String] identifier[zipPath] , Keyword[boolean] identifier[withSrcDir] operator[SEP] Keyword[throws] identifier[UtilException] {
Keyword[return] identifier[zip] operator[SEP] identi... |
@SuppressWarnings("unchecked")
@Override
public EList<IfcRelFillsElement> getFillsVoids() {
return (EList<IfcRelFillsElement>) eGet(Ifc4Package.Literals.IFC_ELEMENT__FILLS_VOIDS, true);
} | class class_name[name] begin[{]
method[getFillsVoids, return_type[type[EList]], modifier[public], parameter[]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_ELEMENT__FILLS_VOIDS, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package.Literals, selector... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[EList] operator[<] identifier[IfcRelFillsElement] operator[>] identifier[getFillsVoids] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP] identifier[EList... |
public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> spy2nd(TriFunction<T1, T2, T3, R> function, Box<T2> param2) {
return spy(function, Box.<R>empty(), Box.<T1>empty(), param2, Box.<T3>empty());
} | class class_name[name] begin[{]
method[spy2nd, return_type[type[TriFunction]], modifier[public static], parameter[function, param2]] begin[{]
return[call[.spy, parameter[member[.function], call[.Box, parameter[]], call[.Box, parameter[]], member[.param2], call[.Box, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T1] , identifier[T2] , identifier[T3] , identifier[R] operator[>] identifier[TriFunction] operator[<] identifier[T1] , identifier[T2] , identifier[T3] , identifier[R] operator[>] identifier[spy2nd] operator[SEP] identifier[TriFunction] operator[<] identifier[... |
public static Iterator<ImmutableRoaringBitmap> convertToImmutable(
final Iterator<MutableRoaringBitmap> i) {
return new Iterator<ImmutableRoaringBitmap>() {
@Override
public boolean hasNext() {
return i.hasNext();
}
@Override
public ImmutableRoaringBitmap next() {
... | class class_name[name] begin[{]
method[convertToImmutable, return_type[type[Iterator]], modifier[public static], parameter[i]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(argu... | Keyword[public] Keyword[static] identifier[Iterator] operator[<] identifier[ImmutableRoaringBitmap] operator[>] identifier[convertToImmutable] operator[SEP] Keyword[final] identifier[Iterator] operator[<] identifier[MutableRoaringBitmap] operator[>] identifier[i] operator[SEP] {
Keyword[return] Keyword[new] iden... |
public ServiceFuture<Void> renewAsync(String resourceGroupName, String certificateOrderName, RenewCertificateOrderRequest renewCertificateOrderRequest, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(renewWithServiceResponseAsync(resourceGroupName, certificateOrderName, renewCer... | class class_name[name] begin[{]
method[renewAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, certificateOrderName, renewCertificateOrderRequest, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.renewWithServiceResponseAsync, param... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[Void] operator[>] identifier[renewAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[certificateOrderName] , identifier[RenewCertificateOrderRequest] identifier[renewCertificateOrderRequest] , Keyword[... |
public <T> Query appendIf(final String name, final T value) throws UnsupportedEncodingException {
if (value != null) {
append(name, value.toString());
}
return this;
} | class class_name[name] begin[{]
method[appendIf, return_type[type[Query]], modifier[public], parameter[name, value]] begin[{]
if[binary_operation[member[.value], !=, literal[null]]] begin[{]
call[.append, parameter[member[.name], call[value.toString, parameter[]]]]
... | Keyword[public] operator[<] identifier[T] operator[>] identifier[Query] identifier[appendIf] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[T] identifier[value] operator[SEP] Keyword[throws] identifier[UnsupportedEncodingException] {
Keyword[if] operator[SEP] identi... |
private void addIntegerRoundingMethod(Java.CLASS clazz) {
// round method
Java.METHOD iround = clazz.addMETHOD("private", "int", "iround");
iround.setComment("Round to the nearest integer");
iround.setReturnComment("the nearest integer");
iround.addArg("Number", "value", "value to be rounded");
iround.addRE... | class class_name[name] begin[{]
method[addIntegerRoundingMethod, return_type[void], modifier[private], parameter[clazz]] begin[{]
local_variable[type[Java], iround]
call[iround.setComment, parameter[literal["Round to the nearest integer"]]]
call[iround.setReturnComment, ... | Keyword[private] Keyword[void] identifier[addIntegerRoundingMethod] operator[SEP] identifier[Java] operator[SEP] identifier[CLASS] identifier[clazz] operator[SEP] {
identifier[Java] operator[SEP] identifier[METHOD] identifier[iround] operator[=] identifier[clazz] operator[SEP] identifier[addMETHOD] operator[SEP]... |
private static DefaultDirectedGraph<ObjectPropertyExpression,DefaultEdge> getObjectPropertyGraph(OntologyImpl.UnclassifiedOntologyTBox ontology) {
DefaultDirectedGraph<ObjectPropertyExpression,DefaultEdge> graph = new DefaultDirectedGraph<>(DefaultEdge.class);
for (ObjectPropertyExpression role : ontology.objectP... | class class_name[name] begin[{]
method[getObjectPropertyGraph, return_type[type[DefaultDirectedGraph]], modifier[private static], parameter[ontology]] begin[{]
local_variable[type[DefaultDirectedGraph], graph]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Binary... | Keyword[private] Keyword[static] identifier[DefaultDirectedGraph] operator[<] identifier[ObjectPropertyExpression] , identifier[DefaultEdge] operator[>] identifier[getObjectPropertyGraph] operator[SEP] identifier[OntologyImpl] operator[SEP] identifier[UnclassifiedOntologyTBox] identifier[ontology] operator[SEP] {
... |
public static <C extends Comparable<? super C>>
Predicate<EvolutionResult<?, C>> bySteadyFitness(final int generations) {
return new SteadyFitnessLimit<>(generations);
} | class class_name[name] begin[{]
method[bySteadyFitness, return_type[type[Predicate]], modifier[public static], parameter[generations]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=generations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructo... | Keyword[public] Keyword[static] operator[<] identifier[C] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[C] operator[>] operator[>] identifier[Predicate] operator[<] identifier[EvolutionResult] operator[<] operator[?] , identifier[C] operator[>] operator[>] identifier[byStead... |
public void parse() {
ChunkHeader firstChunkHeader = readChunkHeader();
if (firstChunkHeader == null) {
return;
}
switch (firstChunkHeader.getChunkType()) {
case ChunkType.XML:
case ChunkType.NULL:
break;
case ChunkType.STR... | class class_name[name] begin[{]
method[parse, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[ChunkHeader], firstChunkHeader]
if[binary_operation[member[.firstChunkHeader], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
... | Keyword[public] Keyword[void] identifier[parse] operator[SEP] operator[SEP] {
identifier[ChunkHeader] identifier[firstChunkHeader] operator[=] identifier[readChunkHeader] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[firstChunkHeader] operator[==] Other[null] operator[SEP] {
... |
public JComponent createComponentButton(String strProductType, BaseApplet applet)
{
ProductTypeInfo productType = ProductTypeInfo.getProductType(strProductType);
if (productType == null)
{
ImageIcon icon = null;
if (applet != null)
icon = applet.loadIm... | class class_name[name] begin[{]
method[createComponentButton, return_type[type[JComponent]], modifier[public], parameter[strProductType, applet]] begin[{]
local_variable[type[ProductTypeInfo], productType]
if[binary_operation[member[.productType], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[JComponent] identifier[createComponentButton] operator[SEP] identifier[String] identifier[strProductType] , identifier[BaseApplet] identifier[applet] operator[SEP] {
identifier[ProductTypeInfo] identifier[productType] operator[=] identifier[ProductTypeInfo] operator[SEP] identifier[ge... |
public static JsonObject getJsonQuery(URL url) throws MalformedURLException {
String query = url.getQuery();
JsonObject payload = new JsonObject();
JsonParser parser = new JsonParser();
if (query == null) {
return null;
}
for (String kv : query.split("&")) {... | class class_name[name] begin[{]
method[getJsonQuery, return_type[type[JsonObject]], modifier[public static], parameter[url]] begin[{]
local_variable[type[String], query]
local_variable[type[JsonObject], payload]
local_variable[type[JsonParser], parser]
if[binary_operatio... | Keyword[public] Keyword[static] identifier[JsonObject] identifier[getJsonQuery] operator[SEP] identifier[URL] identifier[url] operator[SEP] Keyword[throws] identifier[MalformedURLException] {
identifier[String] identifier[query] operator[=] identifier[url] operator[SEP] identifier[getQuery] operator[SEP] operato... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.