code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@Deprecated public String registerDeviceWithId(String deviceId, String deviceName) throws ApiException, IOException { final Device d = new Device.Builder(projectId).id(deviceId).name(deviceName).build(); return registerDevice(d); }
class class_name[name] begin[{] method[registerDeviceWithId, return_type[type[String]], modifier[public], parameter[deviceId, deviceName]] begin[{] local_variable[type[Device], d] return[call[.registerDevice, parameter[member[.d]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] identifier[String] identifier[registerDeviceWithId] operator[SEP] identifier[String] identifier[deviceId] , identifier[String] identifier[deviceName] operator[SEP] Keyword[throws] identifier[ApiException] , identifier[IOException] { Keyword[final] identifier...
public void initTimestamp() throws ChronosException, FatalChronosException { maxAssignedTimestamp = chronosServerWatcher.getPersistentTimestamp(); long newPersistentTimestamp = maxAssignedTimestamp + zkAdvanceTimestamp; chronosServerWatcher.setPersistentTimestamp(newPersistentTimestamp); LOG.info("Get p...
class class_name[name] begin[{] method[initTimestamp, return_type[void], modifier[public], parameter[]] begin[{] assign[member[.maxAssignedTimestamp], call[chronosServerWatcher.getPersistentTimestamp, parameter[]]] local_variable[type[long], newPersistentTimestamp] call[...
Keyword[public] Keyword[void] identifier[initTimestamp] operator[SEP] operator[SEP] Keyword[throws] identifier[ChronosException] , identifier[FatalChronosException] { identifier[maxAssignedTimestamp] operator[=] identifier[chronosServerWatcher] operator[SEP] identifier[getPersistentTimestamp] operator[SEP] oper...
public <T> void invokeNodeRequest ( final NodeRequest request, final NodeRequestsListener<T> listener) { // if we're not on the dobjmgr thread, get there if (!_omgr.isDispatchThread()) { _omgr.postRunnable(new Runnable() { public void run () { ...
class class_name[name] begin[{] method[invokeNodeRequest, return_type[void], modifier[public], parameter[request, listener]] begin[{] if[call[_omgr.isDispatchThread, parameter[]]] begin[{] call[_omgr.postRunnable, parameter[ClassCreator(arguments=[], body=[MethodDeclarat...
Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[invokeNodeRequest] operator[SEP] Keyword[final] identifier[NodeRequest] identifier[request] , Keyword[final] identifier[NodeRequestsListener] operator[<] identifier[T] operator[>] identifier[listener] operator[SEP] { Keyword[if] oper...
@Override protected Element getImage(final Element rssRoot) { final Element eChannel = rssRoot.getChild("channel", getRSSNamespace()); if (eChannel != null) { return eChannel.getChild("image", getRSSNamespace()); } else { return null; } }
class class_name[name] begin[{] method[getImage, return_type[type[Element]], modifier[protected], parameter[rssRoot]] begin[{] local_variable[type[Element], eChannel] if[binary_operation[member[.eChannel], !=, literal[null]]] begin[{] return[call[eChannel.getChild, parameter...
annotation[@] identifier[Override] Keyword[protected] identifier[Element] identifier[getImage] operator[SEP] Keyword[final] identifier[Element] identifier[rssRoot] operator[SEP] { Keyword[final] identifier[Element] identifier[eChannel] operator[=] identifier[rssRoot] operator[SEP] identifier[getChild] operator[S...
@Nonnull public static BitSet createBitSet (final byte nValue) { final BitSet ret = new BitSet (CGlobal.BITS_PER_BYTE); for (int i = 0; i < CGlobal.BITS_PER_BYTE; ++i) ret.set (i, ((nValue >> i) & 1) == 1); return ret; }
class class_name[name] begin[{] method[createBitSet, return_type[type[BitSet]], modifier[public static], parameter[nValue]] begin[{] local_variable[type[BitSet], ret] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], pre...
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[BitSet] identifier[createBitSet] operator[SEP] Keyword[final] Keyword[byte] identifier[nValue] operator[SEP] { Keyword[final] identifier[BitSet] identifier[ret] operator[=] Keyword[new] identifier[BitSet] operator[SEP] identifier[CGloba...
@Override public void prepare(final AbstractSQLInsertUpdate<?> _insertUpdate, final Attribute _attribute, final Object... _values) throws SQLException { checkSQLColumnSize(_attribute, 1); _insertUpdate.column(_attribute.getSqlColNames().get...
class class_name[name] begin[{] method[prepare, return_type[void], modifier[public], parameter[_insertUpdate, _attribute, _values]] begin[{] call[.checkSQLColumnSize, parameter[member[._attribute], literal[1]]] call[_insertUpdate.column, parameter[call[_attribute.getSqlColNames,...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[prepare] operator[SEP] Keyword[final] identifier[AbstractSQLInsertUpdate] operator[<] operator[?] operator[>] identifier[_insertUpdate] , Keyword[final] identifier[Attribute] identifier[_attribute] , Keyword[final] identifier[Object] operator...
public static void fe_copy(int[] h,int[] f) { int f0 = f[0]; int f1 = f[1]; int f2 = f[2]; int f3 = f[3]; int f4 = f[4]; int f5 = f[5]; int f6 = f[6]; int f7 = f[7]; int f8 = f[8]; int f9 = f[9]; h[0] = f0; h[1] = f1; h[2] = f2; h[3] = f3; h[4] = f4; h[5] = f5; h[6] = f6; h[7] = f7; ...
class class_name[name] begin[{] method[fe_copy, return_type[void], modifier[public static], parameter[h, f]] begin[{] local_variable[type[int], f0] local_variable[type[int], f1] local_variable[type[int], f2] local_variable[type[int], f3] local_variable[type[int], f4] ...
Keyword[public] Keyword[static] Keyword[void] identifier[fe_copy] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[h] , Keyword[int] operator[SEP] operator[SEP] identifier[f] operator[SEP] { Keyword[int] identifier[f0] operator[=] identifier[f] operator[SEP] Other[0] operator[SEP] operator[SEP]...
public static CounterValue newCounterValue(CounterConfiguration configuration) { return configuration.type() == CounterType.BOUNDED_STRONG ? newCounterValue(configuration.initialValue(), configuration.lowerBound(), configuration.upperBound()) : newCounterValue(configuration.initialValue())...
class class_name[name] begin[{] method[newCounterValue, return_type[type[CounterValue]], modifier[public static], parameter[configuration]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=type, postfix_operators=[], prefix_operators=[], qualifi...
Keyword[public] Keyword[static] identifier[CounterValue] identifier[newCounterValue] operator[SEP] identifier[CounterConfiguration] identifier[configuration] operator[SEP] { Keyword[return] identifier[configuration] operator[SEP] identifier[type] operator[SEP] operator[SEP] operator[==] identifier[CounterType] o...
public static void resetNamedTimer(String timerName, int todoFlags, long threadId) { getNamedTimer(timerName, todoFlags, threadId).reset(); }
class class_name[name] begin[{] method[resetNamedTimer, return_type[void], modifier[public static], parameter[timerName, todoFlags, threadId]] begin[{] call[.getNamedTimer, parameter[member[.timerName], member[.todoFlags], member[.threadId]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[resetNamedTimer] operator[SEP] identifier[String] identifier[timerName] , Keyword[int] identifier[todoFlags] , Keyword[long] identifier[threadId] operator[SEP] { identifier[getNamedTimer] operator[SEP] identifier[timerName] , identifier[todoFlags] , id...
public ListDedicatedIpPoolsResult withDedicatedIpPools(String... dedicatedIpPools) { if (this.dedicatedIpPools == null) { setDedicatedIpPools(new java.util.ArrayList<String>(dedicatedIpPools.length)); } for (String ele : dedicatedIpPools) { this.dedicatedIpPools.add(ele);...
class class_name[name] begin[{] method[withDedicatedIpPools, return_type[type[ListDedicatedIpPoolsResult]], modifier[public], parameter[dedicatedIpPools]] begin[{] if[binary_operation[THIS[member[None.dedicatedIpPools]], ==, literal[null]]] begin[{] call[.setDedicatedIpP...
Keyword[public] identifier[ListDedicatedIpPoolsResult] identifier[withDedicatedIpPools] operator[SEP] identifier[String] operator[...] identifier[dedicatedIpPools] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[dedicatedIpPools] operator[==] Other[null] operator[SEP] { ...
public void fieldChanged(Field field) { Record record = this.getMainRecord(); if (field != null) if (record != null) if (field.getRecord() == record) { int iErrorCode= record.handleRecordChange((BaseField)field, DBConstants.FIELD_CHANGED_TYPE, DBConstants....
class class_name[name] begin[{] method[fieldChanged, return_type[void], modifier[public], parameter[field]] begin[{] local_variable[type[Record], record] if[binary_operation[member[.field], !=, literal[null]]] begin[{] if[binary_operation[member[.record], !=, literal[null]]]...
Keyword[public] Keyword[void] identifier[fieldChanged] operator[SEP] identifier[Field] identifier[field] operator[SEP] { identifier[Record] identifier[record] operator[=] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[field] op...
public static String getSymbol(CurrencyUnit cu) { try { return Waehrung.of(cu).getSymbol(); } catch (IllegalArgumentException ex) { LOG.log(Level.WARNING, "Cannot get symbol for '" + cu + "':", ex); return cu.getCurrencyCode(); } }
class class_name[name] begin[{] method[getSymbol, return_type[type[String]], modifier[public static], parameter[cu]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=cu, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], memb...
Keyword[public] Keyword[static] identifier[String] identifier[getSymbol] operator[SEP] identifier[CurrencyUnit] identifier[cu] operator[SEP] { Keyword[try] { Keyword[return] identifier[Waehrung] operator[SEP] identifier[of] operator[SEP] identifier[cu] operator[SEP] operator[SEP] identifier[getSymbol]...
static boolean checkPreLongsFlagsCap(final int preambleLongs, final int flags, final long memCapBytes) { final boolean empty = (flags & EMPTY_FLAG_MASK) > 0; //Preamble flags empty state final int minPre = Family.QUANTILES.getMinPreLongs(); //1 final int maxPre = Family.QUANTILES.getMaxPreLongs(); //2 f...
class class_name[name] begin[{] method[checkPreLongsFlagsCap, return_type[type[boolean]], modifier[static], parameter[preambleLongs, flags, memCapBytes]] begin[{] local_variable[type[boolean], empty] local_variable[type[int], minPre] local_variable[type[int], maxPre] local_varia...
Keyword[static] Keyword[boolean] identifier[checkPreLongsFlagsCap] operator[SEP] Keyword[final] Keyword[int] identifier[preambleLongs] , Keyword[final] Keyword[int] identifier[flags] , Keyword[final] Keyword[long] identifier[memCapBytes] operator[SEP] { Keyword[final] Keyword[boolean] identifier[empty] operato...
public static byte[] encryptWithPublicKey(byte[] publicKeyData, byte[] data) throws InvalidKeyException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, IOException { return encryptWithPublicKey(publicKeyData, dat...
class class_name[name] begin[{] method[encryptWithPublicKey, return_type[type[byte]], modifier[public static], parameter[publicKeyData, data]] begin[{] return[call[.encryptWithPublicKey, parameter[member[.publicKeyData], member[.data], member[.DEFAULT_CIPHER_TRANSFORMATION], member[.DEFAULT_PADDING_SIZ...
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[encryptWithPublicKey] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[publicKeyData] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] Keyword[throws] identifier[InvalidKeyException] , iden...
public static void pow(ComplexPolar_F64 a , int N , ComplexPolar_F64 result ) { result.r = Math.pow(a.r,N); result.theta = N*a.theta; }
class class_name[name] begin[{] method[pow, return_type[void], modifier[public static], parameter[a, N, result]] begin[{] assign[member[result.r], call[Math.pow, parameter[member[a.r], member[.N]]]] assign[member[result.theta], binary_operation[member[.N], *, member[a.theta]]] ...
Keyword[public] Keyword[static] Keyword[void] identifier[pow] operator[SEP] identifier[ComplexPolar_F64] identifier[a] , Keyword[int] identifier[N] , identifier[ComplexPolar_F64] identifier[result] operator[SEP] { identifier[result] operator[SEP] identifier[r] operator[=] identifier[Math] operator[SEP] identif...
public String getJmolScript(Atom[] atoms, int axisID){ final double width=.5;// width of JMol object final String axisColor = "yellow"; //axis color final String screwColor = "orange"; //screw translation color Pair<Atom> endPoints = getAxisEnds(atoms); Atom axisMin = endPoints.getFirst(); Atom axisMax = e...
class class_name[name] begin[{] method[getJmolScript, return_type[type[String]], modifier[public], parameter[atoms, axisID]] begin[{] local_variable[type[double], width] local_variable[type[String], axisColor] local_variable[type[String], screwColor] local_variable[type[Pair], e...
Keyword[public] identifier[String] identifier[getJmolScript] operator[SEP] identifier[Atom] operator[SEP] operator[SEP] identifier[atoms] , Keyword[int] identifier[axisID] operator[SEP] { Keyword[final] Keyword[double] identifier[width] operator[=] literal[Float] operator[SEP] Keyword[final] identifier[String] ...
private void readObject (ObjectInputStream s) throws IOException, ClassNotFoundException { // read in number of buckets and allocate the bucket array _buckets = createBuckets(s.readInt()); _loadFactor = s.readFloat(); // read in size (number of mappings) int size = ...
class class_name[name] begin[{] method[readObject, return_type[void], modifier[private], parameter[s]] begin[{] assign[member[._buckets], call[.createBuckets, parameter[call[s.readInt, parameter[]]]]] assign[member[._loadFactor], call[s.readFloat, parameter[]]] local_var...
Keyword[private] Keyword[void] identifier[readObject] operator[SEP] identifier[ObjectInputStream] identifier[s] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { identifier[_buckets] operator[=] identifier[createBuckets] operator[SEP] identifier[s] operator[SEP] identi...
@SuppressWarnings("unchecked") public static <T extends Throwable> T convertFromOrSuppressedThrowable(Throwable throwable, Class<T> exceptionClass, boolean checkCause) { if (throwable == null || exceptionClass == null) { return null; } if (exceptionClass.isAssignableFrom(throwable.getClass())) { return (T)...
class class_name[name] begin[{] method[convertFromOrSuppressedThrowable, return_type[type[T]], modifier[public static], parameter[throwable, exceptionClass, checkCause]] begin[{] if[binary_operation[binary_operation[member[.throwable], ==, literal[null]], ||, binary_operation[member[.exceptionC...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Throwable] operator[>] identifier[T] identifier[convertFromOrSuppressedThrowable] operator[SEP] identifier[Throwable] identifier[throwable] , iden...
public static Element drawFrame(SVGPlot svgp, Projection2D proj, SpatialComparable box) { SVGPath path = new SVGPath(); ArrayList<double[]> edges = getVisibleEdges(proj, box); final int dim = box.getDimensionality(); double[] min = new double[dim]; for(int i = 0; i < dim; i++) { min[i] = box.g...
class class_name[name] begin[{] method[drawFrame, return_type[type[Element]], modifier[public static], parameter[svgp, proj, box]] begin[{] local_variable[type[SVGPath], path] local_variable[type[ArrayList], edges] local_variable[type[int], dim] local_variable[type[double], min]...
Keyword[public] Keyword[static] identifier[Element] identifier[drawFrame] operator[SEP] identifier[SVGPlot] identifier[svgp] , identifier[Projection2D] identifier[proj] , identifier[SpatialComparable] identifier[box] operator[SEP] { identifier[SVGPath] identifier[path] operator[=] Keyword[new] identifier[SVGPa...
public static String link(Key k, String content, Key cp, String response, Key val) { DeepLearning req = new DeepLearning(); RString rs = new RString("<a href='" + req.href() + ".query?source=%$key" + (cp == null ? "" : "&checkpoint=%$cp") + (response == null ? "" : "&response=%$resp") + ...
class class_name[name] begin[{] method[link, return_type[type[String]], modifier[public static], parameter[k, content, cp, response, val]] begin[{] local_variable[type[DeepLearning], req] local_variable[type[RString], rs] call[rs.replace, parameter[literal["key"], call[k.toStrin...
Keyword[public] Keyword[static] identifier[String] identifier[link] operator[SEP] identifier[Key] identifier[k] , identifier[String] identifier[content] , identifier[Key] identifier[cp] , identifier[String] identifier[response] , identifier[Key] identifier[val] operator[SEP] { identifier[DeepLearning] identi...
@Override public boolean eIsSet(int featureID) { switch (featureID) { case BpsimPackage.NUMERIC_PARAMETER_TYPE__CURRENCY_UNIT: return CURRENCY_UNIT_EDEFAULT == null ? currencyUnit != null : !CURRENCY_UNIT_EDEFAULT.equals(currencyUnit); case BpsimPackage.NUMERIC_PARAMETER_TYPE__TIME_UNIT: return isSetTi...
class class_name[name] begin[{] method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=NUMERIC_PARAMETER_TYPE__CURRENCY_UNIT, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackage, s...
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[BpsimPackage] operator[SEP] identifier[NUMERIC_PARAMETER_...
@BetaApi public final Operation disableXpnHostProject(String project) { DisableXpnHostProjectHttpRequest request = DisableXpnHostProjectHttpRequest.newBuilder().setProject(project).build(); return disableXpnHostProject(request); }
class class_name[name] begin[{] method[disableXpnHostProject, return_type[type[Operation]], modifier[final public], parameter[project]] begin[{] local_variable[type[DisableXpnHostProjectHttpRequest], request] return[call[.disableXpnHostProject, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[disableXpnHostProject] operator[SEP] identifier[String] identifier[project] operator[SEP] { identifier[DisableXpnHostProjectHttpRequest] identifier[request] operator[=] identifier[DisableXpnHostProjectHttpRequest] o...
@Override protected void loadJar(final Configuration hadoopConfiguration, final File file, final Object... params) { final JavaSparkContext sparkContext = (JavaSparkContext) params[0]; sparkContext.addJar(file.getAbsolutePath()); }
class class_name[name] begin[{] method[loadJar, return_type[void], modifier[protected], parameter[hadoopConfiguration, file, params]] begin[{] local_variable[type[JavaSparkContext], sparkContext] call[sparkContext.addJar, parameter[call[file.getAbsolutePath, parameter[]]]] end[}] EN...
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[loadJar] operator[SEP] Keyword[final] identifier[Configuration] identifier[hadoopConfiguration] , Keyword[final] identifier[File] identifier[file] , Keyword[final] identifier[Object] operator[...] identifier[params] operator[SEP] { ...
@SuppressWarnings("unchecked") @Override public EList<IfcCartesianPoint> getPoints() { return (EList<IfcCartesianPoint>) eGet(Ifc4Package.Literals.IFC_POLYLINE__POINTS, true); }
class class_name[name] begin[{] method[getPoints, return_type[type[EList]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_POLYLINE__POINTS, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package.Literals, selectors=[]), L...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[EList] operator[<] identifier[IfcCartesianPoint] operator[>] identifier[getPoints] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[EList] ope...
private SearchFilter getSearchFilter(HttpServletRequest httpServletRequest) { SearchFilter ret = new SearchFilter(); Set<String> keySet = httpServletRequest.getParameterMap().keySet(); for (String key : keySet) { ret.setParam(String.valueOf(key), String.valueOf(httpServletRequest.get...
class class_name[name] begin[{] method[getSearchFilter, return_type[type[SearchFilter]], modifier[private], parameter[httpServletRequest]] begin[{] local_variable[type[SearchFilter], ret] local_variable[type[Set], keySet] ForStatement(body=BlockStatement(label=None, statements=[Statemen...
Keyword[private] identifier[SearchFilter] identifier[getSearchFilter] operator[SEP] identifier[HttpServletRequest] identifier[httpServletRequest] operator[SEP] { identifier[SearchFilter] identifier[ret] operator[=] Keyword[new] identifier[SearchFilter] operator[SEP] operator[SEP] operator[SEP] identifier[Set] op...
public static sslcipher_individualcipher_binding[] get_filtered(nitro_service service, String ciphergroupname, filtervalue[] filter) throws Exception{ sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding(); obj.set_ciphergroupname(ciphergroupname); options option = new options(); opti...
class class_name[name] begin[{] method[get_filtered, return_type[type[sslcipher_individualcipher_binding]], modifier[public static], parameter[service, ciphergroupname, filter]] begin[{] local_variable[type[sslcipher_individualcipher_binding], obj] call[obj.set_ciphergroupname, paramete...
Keyword[public] Keyword[static] identifier[sslcipher_individualcipher_binding] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[ciphergroupname] , identifier[filtervalue] operator[SEP] operator[SEP] identifier[filter] oper...
@Override public void processMessage() { if (clipboard.isTracking(this.originatorId, this.getTaskId())) { clipboard.pin(this); if (clipboard.isReady(this.originatorId, taskId)) { VoidAggregation aggregation = clipboard.unpin(this.originatorId, taskId); ...
class class_name[name] begin[{] method[processMessage, return_type[void], modifier[public], parameter[]] begin[{] if[call[clipboard.isTracking, parameter[THIS[member[None.originatorId]], THIS[call[None.getTaskId, parameter[]]]]]] begin[{] call[clipboard.pin, parameter[TH...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[processMessage] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[clipboard] operator[SEP] identifier[isTracking] operator[SEP] Keyword[this] operator[SEP] identifier[originatorId] , Keyword[this] operator[SEP] identifi...
static <T> boolean tryAsCompletable(Object source, Function<? super T, ? extends CompletableSource> mapper, CompletableObserver observer) { if (source instanceof Callable) { @SuppressWarnings("unchecked") Callable<T> call = (Callable<T>) source; Comple...
class class_name[name] begin[{] method[tryAsCompletable, return_type[type[boolean]], modifier[static], parameter[source, mapper, observer]] begin[{] if[binary_operation[member[.source], instanceof, type[Callable]]] begin[{] local_variable[type[Callable], call] local_vari...
Keyword[static] operator[<] identifier[T] operator[>] Keyword[boolean] identifier[tryAsCompletable] operator[SEP] identifier[Object] identifier[source] , identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[CompletableSource] operator[>] identifier[mapper...
private int getSentenceBreak(String s, DocTree dt) { BreakIterator breakIterator = trees.getBreakIterator(); if (breakIterator == null) { return defaultSentenceBreak(s); } breakIterator.setText(s); final int sbrk = breakIterator.next(); // This is the last doc...
class class_name[name] begin[{] method[getSentenceBreak, return_type[type[int]], modifier[private], parameter[s, dt]] begin[{] local_variable[type[BreakIterator], breakIterator] if[binary_operation[member[.breakIterator], ==, literal[null]]] begin[{] return[call[.defaultSent...
Keyword[private] Keyword[int] identifier[getSentenceBreak] operator[SEP] identifier[String] identifier[s] , identifier[DocTree] identifier[dt] operator[SEP] { identifier[BreakIterator] identifier[breakIterator] operator[=] identifier[trees] operator[SEP] identifier[getBreakIterator] operator[SEP] operator[SEP] ...
public String execute(List<String> parameterList, TestContext context) { if (parameterList == null || parameterList.size() < 8) { throw new InvalidFunctionUsageException("Function parameters not set correctly - need parameters: username,password,realm,noncekey,method,uri,opaque,algorithm"); ...
class class_name[name] begin[{] method[execute, return_type[type[String]], modifier[public], parameter[parameterList, context]] begin[{] if[binary_operation[binary_operation[member[.parameterList], ==, literal[null]], ||, binary_operation[call[parameterList.size, parameter[]], <, literal[8]]]] ...
Keyword[public] identifier[String] identifier[execute] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[parameterList] , identifier[TestContext] identifier[context] operator[SEP] { Keyword[if] operator[SEP] identifier[parameterList] operator[==] Other[null] operator[||] ident...
public static <K, V> ImmutableListMultimap<K, V> copyOf( Multimap<? extends K, ? extends V> multimap) { if (multimap.isEmpty()) { return of(); } // TODO(user): copy ImmutableSetMultimap by using asList() on the sets if (multimap instanceof ImmutableListMultimap) { @SuppressWarnings("u...
class class_name[name] begin[{] method[copyOf, return_type[type[ImmutableListMultimap]], modifier[public static], parameter[multimap]] begin[{] if[call[multimap.isEmpty, parameter[]]] begin[{] return[call[.of, parameter[]]] else begin[{] None end[}] i...
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[ImmutableListMultimap] operator[<] identifier[K] , identifier[V] operator[>] identifier[copyOf] operator[SEP] identifier[Multimap] operator[<] operator[?] Keyword[extends] identifier[K] , operator[?] Keyword[extends] ide...
@Override public List<String> getHeadLines(final String type) { ArrayList<String> lines = headers.get(type); return lines == null ? null : Collections.unmodifiableList(lines); }
class class_name[name] begin[{] method[getHeadLines, return_type[type[List]], modifier[public], parameter[type]] begin[{] local_variable[type[ArrayList], lines] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=lines, postfix_operators=[], prefix_operators=[], q...
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getHeadLines] operator[SEP] Keyword[final] identifier[String] identifier[type] operator[SEP] { identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[lines] operator[=] i...
private int processNextToken(RawTextNode node, final int offset, String text) { // Find the transition whose pattern matches earliest in the raw text (and is applicable) int numCharsConsumed; Context next; int earliestStart = Integer.MAX_VALUE; int earliestEnd = -1; Transition earliestTransition...
class class_name[name] begin[{] method[processNextToken, return_type[type[int]], modifier[private], parameter[node, offset, text]] begin[{] local_variable[type[int], numCharsConsumed] local_variable[type[Context], next] local_variable[type[int], earliestStart] local_variable[typ...
Keyword[private] Keyword[int] identifier[processNextToken] operator[SEP] identifier[RawTextNode] identifier[node] , Keyword[final] Keyword[int] identifier[offset] , identifier[String] identifier[text] operator[SEP] { Keyword[int] identifier[numCharsConsumed] operator[SEP] identifier[Context] identifier[next] o...
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public synchronized void start(final Listener listener, final Infrastructure infra) { if (listener == null) throw new IllegalArgumentException("Cannot pass null to " + BlockingQueueReceiver.class.getSimpleName() + ".setListener"); ...
class class_name[name] begin[{] method[start, return_type[void], modifier[synchronized public], parameter[listener, infra]] begin[{] if[binary_operation[member[.listener], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(ope...
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[start] operator[SEP] Keyword[final] identifier[Listener] identifier[listener] , Keyword[final] identi...
public static final short readShort(byte[] array, int offset) { if (array.length < offset + 2) { throw new IllegalArgumentException("no room in array"); } return (short) (((array[offset]<<8) & 0xff00) + (array[offset + 1] & 0xff ))...
class class_name[name] begin[{] method[readShort, return_type[type[short]], modifier[final public static], parameter[array, offset]] begin[{] if[binary_operation[member[array.length], <, binary_operation[member[.offset], +, literal[2]]]] begin[{] ThrowStatement(expression=ClassCreat...
Keyword[public] Keyword[static] Keyword[final] Keyword[short] identifier[readShort] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[array] , Keyword[int] identifier[offset] operator[SEP] { Keyword[if] operator[SEP] identifier[array] operator[SEP] identifier[length] operator[<] identifier[offs...
public static String getConnectionUser(AlluxioConfiguration conf) throws AccessControlException { if (!SecurityUtils.isAuthenticationEnabled(conf)) { throw new AccessControlException(ExceptionMessage.AUTHENTICATION_IS_NOT_ENABLED.getMessage()); } User user = sConnectionUserThreadLocal.get(); if (u...
class class_name[name] begin[{] method[getConnectionUser, return_type[type[String]], modifier[public static], parameter[conf]] begin[{] if[call[SecurityUtils.isAuthenticationEnabled, parameter[member[.conf]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocati...
Keyword[public] Keyword[static] identifier[String] identifier[getConnectionUser] operator[SEP] identifier[AlluxioConfiguration] identifier[conf] operator[SEP] Keyword[throws] identifier[AccessControlException] { Keyword[if] operator[SEP] operator[!] identifier[SecurityUtils] operator[SEP] identifier[isAuthentica...
private SepaVersion determinePainVersionInternal(HBCIPassportInternal passport, final String gvName) { log.debug("searching for supported pain versions for GV " + gvName); if (!passport.jobSupported(gvName)) { log.debug("don't have any BPD for GV " + gvName); return null; ...
class class_name[name] begin[{] method[determinePainVersionInternal, return_type[type[SepaVersion]], modifier[private], parameter[passport, gvName]] begin[{] call[log.debug, parameter[binary_operation[literal["searching for supported pain versions for GV "], +, member[.gvName]]]] ...
Keyword[private] identifier[SepaVersion] identifier[determinePainVersionInternal] operator[SEP] identifier[HBCIPassportInternal] identifier[passport] , Keyword[final] identifier[String] identifier[gvName] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] i...
public double getAndAdd(int index, double delta) { writeLock.lock(); double value = vector.get(index); vector.set(index, value + delta); writeLock.unlock(); return value; }
class class_name[name] begin[{] method[getAndAdd, return_type[type[double]], modifier[public], parameter[index, delta]] begin[{] call[writeLock.lock, parameter[]] local_variable[type[double], value] call[vector.set, parameter[member[.index], binary_operation[member[.valu...
Keyword[public] Keyword[double] identifier[getAndAdd] operator[SEP] Keyword[int] identifier[index] , Keyword[double] identifier[delta] operator[SEP] { identifier[writeLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[value] operator[=] identifier[vector] o...
public static <T> DataSet<LongValue> count(DataSet<T> input) { return input .map(new MapTo<>(new LongValue(1))) .returns(LONG_VALUE_TYPE_INFO) .name("Emit 1") .reduce(new AddLongValue()) .name("Sum"); }
class class_name[name] begin[{] method[count, return_type[type[DataSet]], modifier[public static], parameter[input]] begin[{] return[call[input.map, parameter[ClassCreator(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], body...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[DataSet] operator[<] identifier[LongValue] operator[>] identifier[count] operator[SEP] identifier[DataSet] operator[<] identifier[T] operator[>] identifier[input] operator[SEP] { Keyword[return] identifier[input] operator[SEP] ident...
public String getPcType() { String result = m_loginForm.getPcType(); if (result == null) { result = CmsLoginForm.PC_TYPE_PUBLIC; } return result; }
class class_name[name] begin[{] method[getPcType, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[String], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] assign[member[.result], member[CmsLoginForm...
Keyword[public] identifier[String] identifier[getPcType] operator[SEP] operator[SEP] { identifier[String] identifier[result] operator[=] identifier[m_loginForm] operator[SEP] identifier[getPcType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] oper...
public static <E> Set<E> copyOf(Iterator<? extends E> elementsIterator) { Set<E> result = new HashSet<>(); while (elementsIterator.hasNext()) { result.add(elementsIterator.next()); } return Collections.unmodifiableSet(result); }
class class_name[name] begin[{] method[copyOf, return_type[type[Set]], modifier[public static], parameter[elementsIterator]] begin[{] local_variable[type[Set], result] while[call[elementsIterator.hasNext, parameter[]]] begin[{] call[result.add, parameter[call[ele...
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Set] operator[<] identifier[E] operator[>] identifier[copyOf] operator[SEP] identifier[Iterator] operator[<] operator[?] Keyword[extends] identifier[E] operator[>] identifier[elementsIterator] operator[SEP] { identifier[Set] operato...
private RegistrationResponse registerJobMasterInternal( final JobMasterGateway jobMasterGateway, JobID jobId, String jobManagerAddress, ResourceID jobManagerResourceId) { if (jobManagerRegistrations.containsKey(jobId)) { JobManagerRegistration oldJobManagerRegistration = jobManagerRegistrations.get(jobId);...
class class_name[name] begin[{] method[registerJobMasterInternal, return_type[type[RegistrationResponse]], modifier[private], parameter[jobMasterGateway, jobId, jobManagerAddress, jobManagerResourceId]] begin[{] if[call[jobManagerRegistrations.containsKey, parameter[member[.jobId]]]] begin[{] ...
Keyword[private] identifier[RegistrationResponse] identifier[registerJobMasterInternal] operator[SEP] Keyword[final] identifier[JobMasterGateway] identifier[jobMasterGateway] , identifier[JobID] identifier[jobId] , identifier[String] identifier[jobManagerAddress] , identifier[ResourceID] identifier[jobManagerResourc...
private void obtainBackButtonText() { CharSequence text; try { text = ThemeUtil.getText(this, R.attr.backButtonText); } catch (NotFoundException e) { text = getText(R.string.back_button_text); } setBackButtonText(text); }
class class_name[name] begin[{] method[obtainBackButtonText, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[CharSequence], text] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=text, postfix_operators=[], prefix_o...
Keyword[private] Keyword[void] identifier[obtainBackButtonText] operator[SEP] operator[SEP] { identifier[CharSequence] identifier[text] operator[SEP] Keyword[try] { identifier[text] operator[=] identifier[ThemeUtil] operator[SEP] identifier[getText] operator[SEP] Keyword[this] , identifier[R] operato...
public List<PropertyData> getChildPropertiesData(NodeData parent, List<QPathEntryFilter> itemDataFilters) throws RepositoryException { return persistentManager.getChildPropertiesData(parent, itemDataFilters); }
class class_name[name] begin[{] method[getChildPropertiesData, return_type[type[List]], modifier[public], parameter[parent, itemDataFilters]] begin[{] return[call[persistentManager.getChildPropertiesData, parameter[member[.parent], member[.itemDataFilters]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[PropertyData] operator[>] identifier[getChildPropertiesData] operator[SEP] identifier[NodeData] identifier[parent] , identifier[List] operator[<] identifier[QPathEntryFilter] operator[>] identifier[itemDataFilters] operator[SEP] Keyword[throws] identifier[Reposit...
public static <T> Stream<Indexed<T>> zipWithIndex(Stream<T> source) { return zip(indices().mapToObj(Long::valueOf), source, Indexed::index) .onClose(source::close); }
class class_name[name] begin[{] method[zipWithIndex, return_type[type[Stream]], modifier[public static], parameter[source]] begin[{] return[call[.zip, parameter[call[.indices, parameter[]], member[.source], MethodReference(expression=MemberReference(member=Indexed, postfix_operators=[], prefix_operator...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Stream] operator[<] identifier[Indexed] operator[<] identifier[T] operator[>] operator[>] identifier[zipWithIndex] operator[SEP] identifier[Stream] operator[<] identifier[T] operator[>] identifier[source] operator[SEP] { Keyword[ret...
@java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getProperties() { return getPropertiesMap(); }
class class_name[name] begin[{] method[getProperties, return_type[type[java]], modifier[public], parameter[]] begin[{] return[call[.getPropertiesMap, parameter[]]] end[}] END[}]
annotation[@] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Deprecated] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] , identifier[java] operator[SEP] ...
public void releaseAll() { synchronized(this) { Object[] refSet = allocatedMemoryReferences.values().toArray(); if(refSet.length != 0) { logger.finer("Releasing allocated memory regions"); } for(Object ref : refSet) { release((Memor...
class class_name[name] begin[{] method[releaseAll, return_type[void], modifier[public], parameter[]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] local_variable[type[Object], refSet] if[binary_operation[member[refSet.length], !=, literal[0]]] begin[{] ...
Keyword[public] Keyword[void] identifier[releaseAll] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { identifier[Object] operator[SEP] operator[SEP] identifier[refSet] operator[=] identifier[allocatedMemoryReferences] operator[SEP] identifier[values] oper...
public static String formatDate(long time) { // Map date/time to a GregorianCalendar object (local time zone). GregorianCalendar date = new GregorianCalendar(); date.setTimeInMillis(time); return formatDate(date, Calendar.SECOND); }
class class_name[name] begin[{] method[formatDate, return_type[type[String]], modifier[public static], parameter[time]] begin[{] local_variable[type[GregorianCalendar], date] call[date.setTimeInMillis, parameter[member[.time]]] return[call[.formatDate, parameter[member[.date], m...
Keyword[public] Keyword[static] identifier[String] identifier[formatDate] operator[SEP] Keyword[long] identifier[time] operator[SEP] { identifier[GregorianCalendar] identifier[date] operator[=] Keyword[new] identifier[GregorianCalendar] operator[SEP] operator[SEP] operator[SEP] identifier[date] operator[SEP] ide...
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { String redirectUrl = null; if (useForward) { if (forceHttps && "http".equals(request.getScheme())) { // First redirect the current request to HTTP...
class class_name[name] begin[{] method[commence, return_type[void], modifier[public], parameter[request, response, authException]] begin[{] local_variable[type[String], redirectUrl] if[member[.useForward]] begin[{] if[binary_operation[member[.forceHttps], &&, lit...
Keyword[public] Keyword[void] identifier[commence] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , identifier[AuthenticationException] identifier[authException] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletExceptio...
public GitlabLabel createLabel( Serializable projectId, String name, String color) throws IOException { String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabLabel.URL; return dispatch().with("name", name) .with("color", color...
class class_name[name] begin[{] method[createLabel, return_type[type[GitlabLabel]], modifier[public], parameter[projectId, name, color]] begin[{] local_variable[type[String], tailUrl] return[call[.dispatch, parameter[]]] end[}] END[}]
Keyword[public] identifier[GitlabLabel] identifier[createLabel] operator[SEP] identifier[Serializable] identifier[projectId] , identifier[String] identifier[name] , identifier[String] identifier[color] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[tailUrl] operator[=] id...
public int elementCount(boolean leaves) { if (!leaves) return mapVars.size() + 1; // Number of Maps plus 1 Array component else { int count = 0; for (Enumeration e = mapVars.elements(); e.hasMoreElements();) { BaseType bt = (BaseType) e.nextEleme...
class class_name[name] begin[{] method[elementCount, return_type[type[int]], modifier[public], parameter[leaves]] begin[{] if[member[.leaves]] begin[{] return[binary_operation[call[mapVars.size, parameter[]], +, literal[1]]] else begin[{] local_variable[type[int], count] ...
Keyword[public] Keyword[int] identifier[elementCount] operator[SEP] Keyword[boolean] identifier[leaves] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[leaves] operator[SEP] Keyword[return] identifier[mapVars] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] Other[1] operat...
private static Long parseLong(final String text) { if (text.length() == 0) { return null; } else { try { return Long.parseLong(text); } catch (NumberFormatException ex) { return null; } } }
class class_name[name] begin[{] method[parseLong, return_type[type[Long]], modifier[private static], parameter[text]] begin[{] if[binary_operation[call[text.length, parameter[]], ==, literal[0]]] begin[{] return[literal[null]] else begin[{] TryStatement(block=[Re...
Keyword[private] Keyword[static] identifier[Long] identifier[parseLong] operator[SEP] Keyword[final] identifier[String] identifier[text] operator[SEP] { Keyword[if] operator[SEP] identifier[text] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword...
public void fillContent(List<CmsCategoryTreeEntry> categoryRoot, List<String> selected) { setInitOpen(true); updateContentTree(categoryRoot, selected); }
class class_name[name] begin[{] method[fillContent, return_type[void], modifier[public], parameter[categoryRoot, selected]] begin[{] call[.setInitOpen, parameter[literal[true]]] call[.updateContentTree, parameter[member[.categoryRoot], member[.selected]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[fillContent] operator[SEP] identifier[List] operator[<] identifier[CmsCategoryTreeEntry] operator[>] identifier[categoryRoot] , identifier[List] operator[<] identifier[String] operator[>] identifier[selected] operator[SEP] { identifier[setInitOpen] operator[SEP] literal[...
public static Random getRandom() { if (_isTest) { return _testRandom; } Random random = _freeRandomList.allocate(); if (random == null) { random = new SecureRandom(); } return random; }
class class_name[name] begin[{] method[getRandom, return_type[type[Random]], modifier[public static], parameter[]] begin[{] if[member[._isTest]] begin[{] return[member[._testRandom]] else begin[{] None end[}] local_variable[type[Random], random] ...
Keyword[public] Keyword[static] identifier[Random] identifier[getRandom] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[_isTest] operator[SEP] { Keyword[return] identifier[_testRandom] operator[SEP] } identifier[Random] identifier[random] operator[=] identifier[_freeR...
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { serviceID = new ServiceID(in.readUTF(), in.readUTF(), in.readUTF()); convergenceName = in.readUTF(); }
class class_name[name] begin[{] method[readExternal, return_type[void], modifier[public], parameter[in]] begin[{] assign[member[.serviceID], ClassCreator(arguments=[MethodInvocation(arguments=[], member=readUTF, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_argumen...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[readExternal] operator[SEP] identifier[ObjectInput] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { identifier[serviceID] operator[=] Keyword[new] identifier[ServiceID] operato...
@Override public void put(ByteArray keyBytes, Versioned<byte[]> valueBytes, byte[] transforms) throws VoldemortException { // acquire write lock writeLock.lock(); try { String key = ByteUtils.getString(keyBytes.get(), "UTF-8"); Versioned<String> value = ne...
class class_name[name] begin[{] method[put, return_type[void], modifier[public], parameter[keyBytes, valueBytes, transforms]] begin[{] call[writeLock.lock, parameter[]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initialize...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[ByteArray] identifier[keyBytes] , identifier[Versioned] operator[<] Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[valueBytes] , Keyword[byte] operator[SEP] operator[SEP] identifier[transforms] ...
public double[] sample(int numSamples, Random rand) { double[] samples = new double[numSamples]; for(int i = 0; i < samples.length; i++) samples[i] = invCdf(rand.nextDouble()); return samples; }
class class_name[name] begin[{] method[sample, return_type[type[double]], modifier[public], parameter[numSamples, rand]] begin[{] local_variable[type[double], samples] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=samples, postfix_operators=[], p...
Keyword[public] Keyword[double] operator[SEP] operator[SEP] identifier[sample] operator[SEP] Keyword[int] identifier[numSamples] , identifier[Random] identifier[rand] operator[SEP] { Keyword[double] operator[SEP] operator[SEP] identifier[samples] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier...
public JStormCache putMetricData(String topologyId, TopologyMetric tpMetric) { // map<key, [ts, metric_info]> Map<String, Object> batchData = new HashMap<>(); long ts = System.currentTimeMillis(); int tp = 0, comp = 0, compStream = 0, task = 0, stream = 0, worker = 0, netty = 0; ...
class class_name[name] begin[{] method[putMetricData, return_type[type[JStormCache]], modifier[public], parameter[topologyId, tpMetric]] begin[{] local_variable[type[Map], batchData] local_variable[type[long], ts] local_variable[type[int], tp] if[binary_operation[call[tp...
Keyword[public] identifier[JStormCache] identifier[putMetricData] operator[SEP] identifier[String] identifier[topologyId] , identifier[TopologyMetric] identifier[tpMetric] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[batchData] operator[=] Keyword[n...
private String getEarName(final DeploymentUnit deploymentUnit) { final String duName = deploymentUnit.getName(); if (duName.endsWith(".ear")) { return duName.substring(0, duName.length() - ".ear".length()); } return null; }
class class_name[name] begin[{] method[getEarName, return_type[type[String]], modifier[private], parameter[deploymentUnit]] begin[{] local_variable[type[String], duName] if[call[duName.endsWith, parameter[literal[".ear"]]]] begin[{] return[call[duName.substring, parameter[li...
Keyword[private] identifier[String] identifier[getEarName] operator[SEP] Keyword[final] identifier[DeploymentUnit] identifier[deploymentUnit] operator[SEP] { Keyword[final] identifier[String] identifier[duName] operator[=] identifier[deploymentUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] o...
public Date unmarshal(String value) { if (value != null) { if (value.length() >= lengthOfDateFmtYYYY_MM_DD) { //Extract just the date from the string YYYY-MM-DD value = value.substring(0, lengthOfDateFmtYYYY_MM_DD); boolean isMatch = value.matches(datePattern); if (isMatch) { return Dat...
class class_name[name] begin[{] method[unmarshal, return_type[type[Date]], modifier[public], parameter[value]] begin[{] if[binary_operation[member[.value], !=, literal[null]]] begin[{] if[binary_operation[call[value.length, parameter[]], >=, member[.lengthOfDateFmtYYYY_M...
Keyword[public] identifier[Date] identifier[unmarshal] operator[SEP] identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[SEP] identifier[length] operator[SEP] oper...
public void checkParameters(Class[] arguments) { // lets check that the argument types are valid if (!isValidMethod(arguments)) { throw new IllegalArgumentException( "Parameters to method: " + getName() + " do not match types: " ...
class class_name[name] begin[{] method[checkParameters, return_type[void], modifier[public], parameter[arguments]] begin[{] if[call[.isValidMethod, parameter[member[.arguments]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(ope...
Keyword[public] Keyword[void] identifier[checkParameters] operator[SEP] identifier[Class] operator[SEP] operator[SEP] identifier[arguments] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isValidMethod] operator[SEP] identifier[arguments] operator[SEP] operator[SEP] { Keyword[throw] K...
private void readCreator(TagValue tv) { int creatorSignature = tv.getBytesBigEndian(4, 4); creator = IccProfileCreators.getIccProfile(creatorSignature); }
class class_name[name] begin[{] method[readCreator, return_type[void], modifier[private], parameter[tv]] begin[{] local_variable[type[int], creatorSignature] assign[member[.creator], call[IccProfileCreators.getIccProfile, parameter[member[.creatorSignature]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[readCreator] operator[SEP] identifier[TagValue] identifier[tv] operator[SEP] { Keyword[int] identifier[creatorSignature] operator[=] identifier[tv] operator[SEP] identifier[getBytesBigEndian] operator[SEP] Other[4] , Other[4] operator[SEP] operator[SEP] identifier[creat...
public java.util.List<String> getSubnetIds() { if (subnetIds == null) { subnetIds = new com.amazonaws.internal.SdkInternalList<String>(); } return subnetIds; }
class class_name[name] begin[{] method[getSubnetIds, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.subnetIds], ==, literal[null]]] begin[{] assign[member[.subnetIds], ClassCreator(arguments=[], body=None, constructor_type_ar...
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getSubnetIds] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[subnetIds] operator[==] Other[null] operator[SEP] { identifier[subnetIds...
@Deprecated public <R> SingleOutputStreamOperator<R> apply(ReduceFunction<T> reduceFunction, AllWindowFunction<T, R, W> function) { TypeInformation<T> inType = input.getType(); TypeInformation<R> resultType = getAllWindowFunctionReturnType(function, inType); return apply(reduceFunction, function, resultType); ...
class class_name[name] begin[{] method[apply, return_type[type[SingleOutputStreamOperator]], modifier[public], parameter[reduceFunction, function]] begin[{] local_variable[type[TypeInformation], inType] local_variable[type[TypeInformation], resultType] return[call[.apply, parameter[memb...
annotation[@] identifier[Deprecated] Keyword[public] operator[<] identifier[R] operator[>] identifier[SingleOutputStreamOperator] operator[<] identifier[R] operator[>] identifier[apply] operator[SEP] identifier[ReduceFunction] operator[<] identifier[T] operator[>] identifier[reduceFunction] , identifier[AllWindowFunct...
public PropertyDataReader forProperty(InternalQName name, int type) { if (nodePropertyReader == null) { nodePropertyReader = new PropertyDataReader(parent, dataManager); } return nodePropertyReader.forProperty(name, type); }
class class_name[name] begin[{] method[forProperty, return_type[type[PropertyDataReader]], modifier[public], parameter[name, type]] begin[{] if[binary_operation[member[.nodePropertyReader], ==, literal[null]]] begin[{] assign[member[.nodePropertyReader], ClassCreator(arg...
Keyword[public] identifier[PropertyDataReader] identifier[forProperty] operator[SEP] identifier[InternalQName] identifier[name] , Keyword[int] identifier[type] operator[SEP] { Keyword[if] operator[SEP] identifier[nodePropertyReader] operator[==] Other[null] operator[SEP] { identifier[nodePropertyRead...
private static void addFileToZip(String path, File file, ZipOutputStream zos) throws IOException { String currentPath = StringUtils.isNotEmpty(path)? path + "/" + file.getName(): file.getName(); zos.putNextEntry(new ZipEntry(currentPath)); InputStream is = new BufferedInputStream(new FileInput...
class class_name[name] begin[{] method[addFileToZip, return_type[void], modifier[private static], parameter[path, file, zos]] begin[{] local_variable[type[String], currentPath] call[zos.putNextEntry, parameter[ClassCreator(arguments=[MemberReference(member=currentPath, postfix_operators...
Keyword[private] Keyword[static] Keyword[void] identifier[addFileToZip] operator[SEP] identifier[String] identifier[path] , identifier[File] identifier[file] , identifier[ZipOutputStream] identifier[zos] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[currentPath] operator...
protected boolean isReversed(byte directionality) { switch (directionality) { case Character.DIRECTIONALITY_RIGHT_TO_LEFT: case Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC: case Character.DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING: case Character.DIRECTI...
class class_name[name] begin[{] method[isReversed, return_type[type[boolean]], modifier[protected], parameter[directionality]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=DIRECTIONALITY_RIGHT_TO_LEFT, postfix_operators=[], prefix_operators=[], qualifier=Character, s...
Keyword[protected] Keyword[boolean] identifier[isReversed] operator[SEP] Keyword[byte] identifier[directionality] operator[SEP] { Keyword[switch] operator[SEP] identifier[directionality] operator[SEP] { Keyword[case] identifier[Character] operator[SEP] identifier[DIRECTIONALITY_RIGHT_TO_LEFT] operator...
public static Optional<Class> resolveSuperGenericTypeArgument(Class type) { try { Type genericSuperclass = type.getGenericSuperclass(); if (genericSuperclass instanceof ParameterizedType) { return resolveSingleTypeArgument(genericSuperclass); } ret...
class class_name[name] begin[{] method[resolveSuperGenericTypeArgument, return_type[type[Optional]], modifier[public static], parameter[type]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], ...
Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[Class] operator[>] identifier[resolveSuperGenericTypeArgument] operator[SEP] identifier[Class] identifier[type] operator[SEP] { Keyword[try] { identifier[Type] identifier[genericSuperclass] operator[=] identifier[type] operato...
private RedBlackTreeNode<Key, Value> balance(RedBlackTreeNode<Key, Value> h) { // assert (h != null); if (isRed(h.getRight())) h = rotateLeft(h); if (isRed(h.getLeft()) && isRed(h.getLeft().getLeft())) h = rotateRight(h); if (isRed(h.getLeft()) && isRed(h.getRight())) flipColors(h); h.setSize(size...
class class_name[name] begin[{] method[balance, return_type[type[RedBlackTreeNode]], modifier[private], parameter[h]] begin[{] if[call[.isRed, parameter[call[h.getRight, parameter[]]]]] begin[{] assign[member[.h], call[.rotateLeft, parameter[member[.h]]]] else begin[{] None ...
Keyword[private] identifier[RedBlackTreeNode] operator[<] identifier[Key] , identifier[Value] operator[>] identifier[balance] operator[SEP] identifier[RedBlackTreeNode] operator[<] identifier[Key] , identifier[Value] operator[>] identifier[h] operator[SEP] { Keyword[if] operator[SEP] identifier[isRed] operator...
@Override public final OnlineBuyer getBuyr(final Map<String, Object> pRqVs, final IRequestData pRqDt) throws Exception { Long buyerId = null; String buyerIdStr = pRqDt.getCookieValue("cBuyerId"); if (buyerIdStr != null && buyerIdStr.length() > 0) { buyerId = Long.valueOf(buyerIdStr); } ...
class class_name[name] begin[{] method[getBuyr, return_type[type[OnlineBuyer]], modifier[final public], parameter[pRqVs, pRqDt]] begin[{] local_variable[type[Long], buyerId] local_variable[type[String], buyerIdStr] if[binary_operation[binary_operation[member[.buyerIdStr], !=, li...
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[OnlineBuyer] identifier[getBuyr] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pRqVs] , Keyword[final] identifier[IRequestData] identifier[pRqDt] operator[SEP] Keyword...
@Override protected void addColumnComponent(HtmlDataTable dataTable, Map<String, String> tableAttributes, String elementName, Map<String, String> columnAttributes, StaticXmlMetawidget metawidget) { // Suppress columns that show Collection values. Their toString is never very nice, an...
class class_name[name] begin[{] method[addColumnComponent, return_type[void], modifier[protected], parameter[dataTable, tableAttributes, elementName, columnAttributes, metawidget]] begin[{] local_variable[type[Class], clazz] if[binary_operation[binary_operation[member[.clazz], !=, liter...
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[addColumnComponent] operator[SEP] identifier[HtmlDataTable] identifier[dataTable] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[tableAttributes] , identifier[String] identifier[elementName] ,...
public @Nullable Drawable setCurrent(@Nullable Drawable newDelegate) { Drawable previousDelegate = setCurrentWithoutInvalidate(newDelegate); invalidateSelf(); return previousDelegate; }
class class_name[name] begin[{] method[setCurrent, return_type[type[Drawable]], modifier[public], parameter[newDelegate]] begin[{] local_variable[type[Drawable], previousDelegate] call[.invalidateSelf, parameter[]] return[member[.previousDelegate]] end[}] END[}]
Keyword[public] annotation[@] identifier[Nullable] identifier[Drawable] identifier[setCurrent] operator[SEP] annotation[@] identifier[Nullable] identifier[Drawable] identifier[newDelegate] operator[SEP] { identifier[Drawable] identifier[previousDelegate] operator[=] identifier[setCurrentWithoutInvalidate] operat...
private void checkIsValid(final Document document, final Source source) throws SAXException, IOException { final SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); final Schema schema = schemaFactory.newSchema(source); final Validator validator = schema...
class class_name[name] begin[{] method[checkIsValid, return_type[void], modifier[private], parameter[document, source]] begin[{] local_variable[type[SchemaFactory], schemaFactory] local_variable[type[Schema], schema] local_variable[type[Validator], validator] call[valida...
Keyword[private] Keyword[void] identifier[checkIsValid] operator[SEP] Keyword[final] identifier[Document] identifier[document] , Keyword[final] identifier[Source] identifier[source] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] { Keyword[final] identifier[SchemaFactory] ident...
public static double toleranceDistance(int zoom, int pixelWidth, int pixelHeight) { return toleranceDistance(zoom, Math.max(pixelWidth, pixelHeight)); }
class class_name[name] begin[{] method[toleranceDistance, return_type[type[double]], modifier[public static], parameter[zoom, pixelWidth, pixelHeight]] begin[{] return[call[.toleranceDistance, parameter[member[.zoom], call[Math.max, parameter[member[.pixelWidth], member[.pixelHeight]]]]]] end[}] EN...
Keyword[public] Keyword[static] Keyword[double] identifier[toleranceDistance] operator[SEP] Keyword[int] identifier[zoom] , Keyword[int] identifier[pixelWidth] , Keyword[int] identifier[pixelHeight] operator[SEP] { Keyword[return] identifier[toleranceDistance] operator[SEP] identifier[zoom] , identifier[Math]...
public void triggerPurge(final Runnable afterPurgeAction) { OpenCms.getExecutor().execute(new Runnable() { @SuppressWarnings("synthetic-access") public void run() { try { m_purgeLock.writeLock().lock(); for (ReentrantReadWriteLoc...
class class_name[name] begin[{] method[triggerPurge, return_type[void], modifier[public], parameter[afterPurgeAction]] begin[{] call[OpenCms.getExecutor, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[triggerPurge] operator[SEP] Keyword[final] identifier[Runnable] identifier[afterPurgeAction] operator[SEP] { identifier[OpenCms] operator[SEP] identifier[getExecutor] operator[SEP] operator[SEP] operator[SEP] identifier[execute] operator[SEP] Keyword[new] identifier[Runna...
public static String randomString(int length, int min, int max, @NonNull CharMatcher validChar) { if (length <= 0) { return EMPTY; } Random random = new Random(); int maxRandom = max - min; char[] array = new char[length]; for (int i = 0; i < array.length; i++) { ch...
class class_name[name] begin[{] method[randomString, return_type[type[String]], modifier[public static], parameter[length, min, max, validChar]] begin[{] if[binary_operation[member[.length], <=, literal[0]]] begin[{] return[member[.EMPTY]] else begin[{] None end[}] ...
Keyword[public] Keyword[static] identifier[String] identifier[randomString] operator[SEP] Keyword[int] identifier[length] , Keyword[int] identifier[min] , Keyword[int] identifier[max] , annotation[@] identifier[NonNull] identifier[CharMatcher] identifier[validChar] operator[SEP] { Keyword[if] operator[SEP] id...
public SubGraphPredicate withInputSubgraph(int inputNum, @NonNull OpPredicate opPredicate){ opInputSubgraphPredicates.put(inputNum, opPredicate); return this; }
class class_name[name] begin[{] method[withInputSubgraph, return_type[type[SubGraphPredicate]], modifier[public], parameter[inputNum, opPredicate]] begin[{] call[opInputSubgraphPredicates.put, parameter[member[.inputNum], member[.opPredicate]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[SubGraphPredicate] identifier[withInputSubgraph] operator[SEP] Keyword[int] identifier[inputNum] , annotation[@] identifier[NonNull] identifier[OpPredicate] identifier[opPredicate] operator[SEP] { identifier[opInputSubgraphPredicates] operator[SEP] identifier[put] operator[SEP] identi...
public static void mergeWindows(Collection<TimeWindow> windows, MergingWindowAssigner.MergeCallback<TimeWindow> c) { // sort the windows by the start time and then merge overlapping windows List<TimeWindow> sortedWindows = new ArrayList<>(windows); Collections.sort(sortedWindows, new Comparator<TimeWindow>() {...
class class_name[name] begin[{] method[mergeWindows, return_type[void], modifier[public static], parameter[windows, c]] begin[{] local_variable[type[List], sortedWindows] call[Collections.sort, parameter[member[.sortedWindows], ClassCreator(arguments=[], body=[MethodDeclaration(annotati...
Keyword[public] Keyword[static] Keyword[void] identifier[mergeWindows] operator[SEP] identifier[Collection] operator[<] identifier[TimeWindow] operator[>] identifier[windows] , identifier[MergingWindowAssigner] operator[SEP] identifier[MergeCallback] operator[<] identifier[TimeWindow] operator[>] identifier[c] operato...
public String entityToTable(String entityName) { int index = entityName.lastIndexOf('.'); if(index >= 0){ entityName = entityName.substring(index + 1); } index = entityName.lastIndexOf('$'); if(index >= 0){ entityName = entityName.substring(index + ...
class class_name[name] begin[{] method[entityToTable, return_type[type[String]], modifier[public], parameter[entityName]] begin[{] local_variable[type[int], index] if[binary_operation[member[.index], >=, literal[0]]] begin[{] assign[member[.entityName], call[enti...
Keyword[public] identifier[String] identifier[entityToTable] operator[SEP] identifier[String] identifier[entityName] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[entityName] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operat...
public GetFolderResult withSubFolders(Folder... subFolders) { if (this.subFolders == null) { setSubFolders(new java.util.ArrayList<Folder>(subFolders.length)); } for (Folder ele : subFolders) { this.subFolders.add(ele); } return this; }
class class_name[name] begin[{] method[withSubFolders, return_type[type[GetFolderResult]], modifier[public], parameter[subFolders]] begin[{] if[binary_operation[THIS[member[None.subFolders]], ==, literal[null]]] begin[{] call[.setSubFolders, parameter[ClassCreator(argume...
Keyword[public] identifier[GetFolderResult] identifier[withSubFolders] operator[SEP] identifier[Folder] operator[...] identifier[subFolders] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[subFolders] operator[==] Other[null] operator[SEP] { identifier[setSubFolders] o...
private void mapAndSetOffset() { try { final RandomAccessFile backingFile = new RandomAccessFile(this.file, "rw"); backingFile.setLength(this.size); final FileChannel ch = backingFile.getChannel(); this.addr = (Long) mmap.invoke(ch, 1, 0L, this.size); ...
class class_name[name] begin[{] method[mapAndSetOffset, return_type[void], modifier[private], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators...
Keyword[private] Keyword[void] identifier[mapAndSetOffset] operator[SEP] operator[SEP] { Keyword[try] { Keyword[final] identifier[RandomAccessFile] identifier[backingFile] operator[=] Keyword[new] identifier[RandomAccessFile] operator[SEP] Keyword[this] operator[SEP] identifier[file] , literal[String...
@Override public <T> T get(IKvEntryMapper<T> mapper, String table, String key) { byte[] data = get(table, key); return data != null ? mapper.mapEntry(table, key, data) : null; }
class class_name[name] begin[{] method[get, return_type[type[T]], modifier[public], parameter[mapper, table, key]] begin[{] local_variable[type[byte], data] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualif...
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[get] operator[SEP] identifier[IKvEntryMapper] operator[<] identifier[T] operator[>] identifier[mapper] , identifier[String] identifier[table] , identifier[String] identifier[key] operator[SEP] { Ke...
public static List<File> extractContainedLibraries(URL jarFile) throws ProgramInvocationException { Random rnd = new Random(); JarFile jar = null; try { jar = new JarFile(new File(jarFile.toURI())); final List<JarEntry> containedJarFileEntries = new ArrayList<JarEntry>(); Enumeration<JarEntry> entries...
class class_name[name] begin[{] method[extractContainedLibraries, return_type[type[List]], modifier[public static], parameter[jarFile]] begin[{] local_variable[type[Random], rnd] local_variable[type[JarFile], jar] TryStatement(block=[StatementExpression(expression=Assignment(expressionl...
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[File] operator[>] identifier[extractContainedLibraries] operator[SEP] identifier[URL] identifier[jarFile] operator[SEP] Keyword[throws] identifier[ProgramInvocationException] { identifier[Random] identifier[rnd] operator[=] Keyword[new] iden...
public FeatureList getFeatureList() throws IOException, ServerException { if (this.session.featureList != null) { return this.session.featureList; } // TODO: this can also be optimized. Instead of parsing the // reply after it is reveiced, we can parse it as it is /...
class class_name[name] begin[{] method[getFeatureList, return_type[type[FeatureList]], modifier[public], parameter[]] begin[{] if[binary_operation[THIS[member[None.session]member[None.featureList]], !=, literal[null]]] begin[{] return[THIS[member[None.session]member[None.featureList...
Keyword[public] identifier[FeatureList] identifier[getFeatureList] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServerException] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[session] operator[SEP] identifier[featureList] operator[!=] Other[null] operator...
public Coder getCoder() { long cPtr = VideoJNI.MuxerStream_getCoder(swigCPtr, this); return (cPtr == 0) ? null : new Coder(cPtr, false); }
class class_name[name] begin[{] method[getCoder, return_type[type[Coder]], modifier[public], parameter[]] begin[{] local_variable[type[long], cPtr] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=cPtr, postfix_operators=[], prefix_operators=[], qualifier=, sel...
Keyword[public] identifier[Coder] identifier[getCoder] operator[SEP] operator[SEP] { Keyword[long] identifier[cPtr] operator[=] identifier[VideoJNI] operator[SEP] identifier[MuxerStream_getCoder] operator[SEP] identifier[swigCPtr] , Keyword[this] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identif...
public static managed_device[] get(nitro_service client) throws Exception { managed_device resource = new managed_device(); resource.validate("get"); return (managed_device[]) resource.get_resources(client); }
class class_name[name] begin[{] method[get, return_type[type[managed_device]], modifier[public static], parameter[client]] begin[{] local_variable[type[managed_device], resource] call[resource.validate, parameter[literal["get"]]] return[Cast(expression=MethodInvocation(arguments...
Keyword[public] Keyword[static] identifier[managed_device] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[client] operator[SEP] Keyword[throws] identifier[Exception] { identifier[managed_device] identifier[resource] operator[=] Keyword[new] identifier[managed_devic...
public static Set<IndexFlavor> complementOf(final Set<IndexFlavor> indexFlavors) { final Set<IndexFlavor> set = allOf(); set.removeAll(indexFlavors); return set; }
class class_name[name] begin[{] method[complementOf, return_type[type[Set]], modifier[public static], parameter[indexFlavors]] begin[{] local_variable[type[Set], set] call[set.removeAll, parameter[member[.indexFlavors]]] return[member[.set]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[IndexFlavor] operator[>] identifier[complementOf] operator[SEP] Keyword[final] identifier[Set] operator[<] identifier[IndexFlavor] operator[>] identifier[indexFlavors] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[Inde...
static public String intToHexString(int n, int width) { StringBuilder dest = new StringBuilder(width); dest.append(Integer.toHexString(n)); while (dest.length() < width) { dest.insert(0, ' '); } return dest.toString(); }
class class_name[name] begin[{] method[intToHexString, return_type[type[String]], modifier[public static], parameter[n, width]] begin[{] local_variable[type[StringBuilder], dest] call[dest.append, parameter[call[Integer.toHexString, parameter[member[.n]]]]] while[binary_...
Keyword[static] Keyword[public] identifier[String] identifier[intToHexString] operator[SEP] Keyword[int] identifier[n] , Keyword[int] identifier[width] operator[SEP] { identifier[StringBuilder] identifier[dest] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[width] operator[SEP] oper...
public static int checkPreconditionI( final int value, final boolean condition, final IntFunction<String> describer) { return innerCheckI(value, condition, describer); }
class class_name[name] begin[{] method[checkPreconditionI, return_type[type[int]], modifier[public static], parameter[value, condition, describer]] begin[{] return[call[.innerCheckI, parameter[member[.value], member[.condition], member[.describer]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[checkPreconditionI] operator[SEP] Keyword[final] Keyword[int] identifier[value] , Keyword[final] Keyword[boolean] identifier[condition] , Keyword[final] identifier[IntFunction] operator[<] identifier[String] operator[>] identifier[describer] operator[SEP] { ...
public Dater setClock(String clock) { String tip = "clock format must HH:mm:ss"; checkArgument(checkNotNull(clock).length() == 8, tip); List<String> pieces = Splitter.on(":").splitToList(clock); checkArgument(pieces.size() == 3, tip); return setClock(Ints.tryParse(pieces.get(0)), Ints.tryParse(pieces.get(1)),...
class class_name[name] begin[{] method[setClock, return_type[type[Dater]], modifier[public], parameter[clock]] begin[{] local_variable[type[String], tip] call[.checkArgument, parameter[binary_operation[call[.checkNotNull, parameter[member[.clock]]], ==, literal[8]], member[.tip]]] ...
Keyword[public] identifier[Dater] identifier[setClock] operator[SEP] identifier[String] identifier[clock] operator[SEP] { identifier[String] identifier[tip] operator[=] literal[String] operator[SEP] identifier[checkArgument] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[clock] operator[SEP] ope...
public void writeResource(CmsDbContext dbc, CmsResource resource) throws CmsException { // access was granted - write the resource resource.setUserLastModified(dbc.currentUser().getId()); CmsUUID projectId = ((dbc.getProjectId() == null) || dbc.getProjectId().isNullUUID()) ? dbc.current...
class class_name[name] begin[{] method[writeResource, return_type[void], modifier[public], parameter[dbc, resource]] begin[{] call[resource.setUserLastModified, parameter[call[dbc.currentUser, parameter[]]]] local_variable[type[CmsUUID], projectId] call[.getVfsDriver, pa...
Keyword[public] Keyword[void] identifier[writeResource] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[CmsResource] identifier[resource] operator[SEP] Keyword[throws] identifier[CmsException] { identifier[resource] operator[SEP] identifier[setUserLastModified] operator[SEP] identifier[dbc] ...
public static XMLStreamReader getXMLStreamReader(Source source) { if (source instanceof StAXSource) { return ((StAXSource) source).getXMLStreamReader(); } else if (source instanceof StaxSource) { return ((StaxSource) source).getXMLStreamReader(); } else { thro...
class class_name[name] begin[{] method[getXMLStreamReader, return_type[type[XMLStreamReader]], modifier[public static], parameter[source]] begin[{] if[binary_operation[member[.source], instanceof, type[StAXSource]]] begin[{] return[Cast(expression=MemberReference(member=source, post...
Keyword[public] Keyword[static] identifier[XMLStreamReader] identifier[getXMLStreamReader] operator[SEP] identifier[Source] identifier[source] operator[SEP] { Keyword[if] operator[SEP] identifier[source] Keyword[instanceof] identifier[StAXSource] operator[SEP] { Keyword[return] operator[SEP] operator[...
public static float makeFloatValue( Object obj ) { if( obj == null ) { return Float.NaN; } return CommonServices.getCoercionManager().makePrimitiveFloatFrom( obj ); }
class class_name[name] begin[{] method[makeFloatValue, return_type[type[float]], modifier[public static], parameter[obj]] begin[{] if[binary_operation[member[.obj], ==, literal[null]]] begin[{] return[member[Float.NaN]] else begin[{] None end[}] return[call[C...
Keyword[public] Keyword[static] Keyword[float] identifier[makeFloatValue] operator[SEP] identifier[Object] identifier[obj] operator[SEP] { Keyword[if] operator[SEP] identifier[obj] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Float] operator[SEP] identifier[NaN] operator[SEP] ...
@Override protected void consume() { int size = 0; LinkedHashSet<E> batch = new LinkedHashSet<E>(); E obj = null; try { obj = queue.take(); } catch (InterruptedException e) { return; } batch.add(obj); size++; if (pollTimeout == 0){ // no waiting while(size < maxBatchSize && ...
class class_name[name] begin[{] method[consume, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[int], size] local_variable[type[LinkedHashSet], batch] local_variable[type[E], obj] TryStatement(block=[StatementExpression(expression=Assignment(exp...
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[consume] operator[SEP] operator[SEP] { Keyword[int] identifier[size] operator[=] Other[0] operator[SEP] identifier[LinkedHashSet] operator[<] identifier[E] operator[>] identifier[batch] operator[=] Keyword[new] identifier[LinkedHashSe...
public Deserializer getListDeserializer(String type) throws HessianProtocolException { Deserializer deserializer = getDeserializer(type); if (deserializer != null) return deserializer; else if (_arrayListDeserializer != null) return _arrayListDeserializer; ...
class class_name[name] begin[{] method[getListDeserializer, return_type[type[Deserializer]], modifier[public], parameter[type]] begin[{] local_variable[type[Deserializer], deserializer] if[binary_operation[member[.deserializer], !=, literal[null]]] begin[{] return[member[.deserializer]]...
Keyword[public] identifier[Deserializer] identifier[getListDeserializer] operator[SEP] identifier[String] identifier[type] operator[SEP] Keyword[throws] identifier[HessianProtocolException] { identifier[Deserializer] identifier[deserializer] operator[=] identifier[getDeserializer] operator[SEP] identifier[type] ...
public void setImageUrlAttribute(String name, String value) { ensureAttributes(); Attribute attribute = new ImageUrlAttribute(value); attribute.setEditable(isEditable(name)); getAllAttributes().put(name, attribute); }
class class_name[name] begin[{] method[setImageUrlAttribute, return_type[void], modifier[public], parameter[name, value]] begin[{] call[.ensureAttributes, parameter[]] local_variable[type[Attribute], attribute] call[attribute.setEditable, parameter[call[.isEditable, para...
Keyword[public] Keyword[void] identifier[setImageUrlAttribute] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] { identifier[ensureAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[Attribute] identifier[attribute] operator[=] Keyword[new] iden...
@TargetApi(18) public void stopMonitoringBeaconsInRegion(@NonNull Region region) throws RemoteException { if (!isBleAvailableOrSimulated()) { LogManager.w(TAG, "Method invocation will be ignored."); return; } if (determineIfCalledFromSeparateScannerProcess()) { ...
class class_name[name] begin[{] method[stopMonitoringBeaconsInRegion, return_type[void], modifier[public], parameter[region]] begin[{] if[call[.isBleAvailableOrSimulated, parameter[]]] begin[{] call[LogManager.w, parameter[member[.TAG], literal["Method invocation will be...
annotation[@] identifier[TargetApi] operator[SEP] Other[18] operator[SEP] Keyword[public] Keyword[void] identifier[stopMonitoringBeaconsInRegion] operator[SEP] annotation[@] identifier[NonNull] identifier[Region] identifier[region] operator[SEP] Keyword[throws] identifier[RemoteException] { Keyword[if] operator[...
public static boolean filterSeat(SeatBidOrBuilder seatbid, @Nullable String seatFilter) { return seatFilter == null ? !seatbid.hasSeat() : seatFilter == SEAT_ANY || seatFilter.equals(seatbid.getSeat()); }
class class_name[name] begin[{] method[filterSeat, return_type[type[boolean]], modifier[public static], parameter[seatbid, seatFilter]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=seatFilter, postfix_operators=[], prefix_operators=[], qualifier=, selector...
Keyword[public] Keyword[static] Keyword[boolean] identifier[filterSeat] operator[SEP] identifier[SeatBidOrBuilder] identifier[seatbid] , annotation[@] identifier[Nullable] identifier[String] identifier[seatFilter] operator[SEP] { Keyword[return] identifier[seatFilter] operator[==] Other[null] operator[?] operat...
@Override public boolean process() throws BimserverDatabaseException, QueryException { if (converted) { return true; } else { converted = true; queryObjectProvider.push(new QueryOidsAndTypesStackFrame(queryObjectProvider, eClass, jsonQuery, reusable, new ArrayList<>(oids))); return false; } ...
class class_name[name] begin[{] method[process, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[member[.converted]] begin[{] return[literal[true]] else begin[{] assign[member[.converted], literal[true]] c...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[process] operator[SEP] operator[SEP] Keyword[throws] identifier[BimserverDatabaseException] , identifier[QueryException] { Keyword[if] operator[SEP] identifier[converted] operator[SEP] { Keyword[return] literal[boolean] op...
public ConversationList listConversations(final int offset, final int limit) throws UnauthorizedException, GeneralException { String url = CONVERSATIONS_BASE_URL + CONVERSATION_PATH; return messageBirdService.requestList(url, offset, limit, ConversationList.class); }
class class_name[name] begin[{] method[listConversations, return_type[type[ConversationList]], modifier[public], parameter[offset, limit]] begin[{] local_variable[type[String], url] return[call[messageBirdService.requestList, parameter[member[.url], member[.offset], member[.limit], ClassReferen...
Keyword[public] identifier[ConversationList] identifier[listConversations] operator[SEP] Keyword[final] Keyword[int] identifier[offset] , Keyword[final] Keyword[int] identifier[limit] operator[SEP] Keyword[throws] identifier[UnauthorizedException] , identifier[GeneralException] { identifier[String] identifier[...