code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private static String getEncodedData(boolean[] correctedBits) { int endIndex = correctedBits.length; Table latchTable = Table.UPPER; // table most recently latched to Table shiftTable = Table.UPPER; // table to use for the next read StringBuilder result = new StringBuilder(20); int index = 0; wh...
class class_name[name] begin[{] method[getEncodedData, return_type[type[String]], modifier[private static], parameter[correctedBits]] begin[{] local_variable[type[int], endIndex] local_variable[type[Table], latchTable] local_variable[type[Table], shiftTable] local_variable[type[...
Keyword[private] Keyword[static] identifier[String] identifier[getEncodedData] operator[SEP] Keyword[boolean] operator[SEP] operator[SEP] identifier[correctedBits] operator[SEP] { Keyword[int] identifier[endIndex] operator[=] identifier[correctedBits] operator[SEP] identifier[length] operator[SEP] identifier[Tab...
public <T extends RedGEntity> T findSingleEntity(final Class<T> type, final Predicate<T> filter) { return this.entities.stream() .filter(obj -> Objects.equals(type, obj.getClass())) .map(type::cast) .filter(filter) .findFirst() ...
class class_name[name] begin[{] method[findSingleEntity, return_type[type[T]], modifier[public], parameter[type, filter]] begin[{] return[THIS[member[None.entities]call[None.stream, parameter[]]call[None.filter, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=type, po...
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[RedGEntity] operator[>] identifier[T] identifier[findSingleEntity] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , Keyword[final] identifier[Predicate] operator[<] identifier[T] operator[>] ide...
public void selectByLabel(String label) { getDispatcher().beforeSelect(this, label); new Select(getElement()).selectByVisibleText(label); if (Config.getBoolConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING)) { logUIActions(UIActions.SELECTED, label); } ...
class class_name[name] begin[{] method[selectByLabel, return_type[void], modifier[public], parameter[label]] begin[{] call[.getDispatcher, parameter[]] ClassCreator(arguments=[MethodInvocation(arguments=[], member=getElement, postfix_operators=[], prefix_operators=[], qualifier=...
Keyword[public] Keyword[void] identifier[selectByLabel] operator[SEP] identifier[String] identifier[label] operator[SEP] { identifier[getDispatcher] operator[SEP] operator[SEP] operator[SEP] identifier[beforeSelect] operator[SEP] Keyword[this] , identifier[label] operator[SEP] operator[SEP] Keyword[new] identif...
private static void deleteBlock(FatCatParameters params, AFPChain afpChain,Atom[] ca1, Atom[] ca2) { int blockNum = afpChain.getBlockNum(); List<AFP> afpSet = afpChain.getAfpSet(); int[] afpChainList =afpChain.getAfpChainList(); int[] block2Afp = afpChain.getBlock2Afp(); int[] blockSize = afpChain.getBlo...
class class_name[name] begin[{] method[deleteBlock, return_type[void], modifier[private static], parameter[params, afpChain, ca1, ca2]] begin[{] local_variable[type[int], blockNum] local_variable[type[List], afpSet] local_variable[type[int], afpChainList] local_variable[type[int...
Keyword[private] Keyword[static] Keyword[void] identifier[deleteBlock] operator[SEP] identifier[FatCatParameters] identifier[params] , identifier[AFPChain] identifier[afpChain] , identifier[Atom] operator[SEP] operator[SEP] identifier[ca1] , identifier[Atom] operator[SEP] operator[SEP] identifier[ca2] operator[SEP] ...
public List<E> getEntriesForActivities(Set<String> activities) { Validate.noNullElements(activities); List<E> result = new ArrayList<>(); for (E entry : logEntries) { if (activities.contains(entry.getActivity())) { result.add(entry); } } re...
class class_name[name] begin[{] method[getEntriesForActivities, return_type[type[List]], modifier[public], parameter[activities]] begin[{] call[Validate.noNullElements, parameter[member[.activities]]] local_variable[type[List], result] ForStatement(body=BlockStatement(label=None...
Keyword[public] identifier[List] operator[<] identifier[E] operator[>] identifier[getEntriesForActivities] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[activities] operator[SEP] { identifier[Validate] operator[SEP] identifier[noNullElements] operator[SEP] identifier[activit...
public Observable<Page<ApplicationGatewaySslPredefinedPolicyInner>> listAvailableSslPredefinedPoliciesNextAsync(final String nextPageLink) { return listAvailableSslPredefinedPoliciesNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<ApplicationGatewaySslPredefinedPolicyIn...
class class_name[name] begin[{] method[listAvailableSslPredefinedPoliciesNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] return[call[.listAvailableSslPredefinedPoliciesNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[ApplicationGatewaySslPredefinedPolicyInner] operator[>] operator[>] identifier[listAvailableSslPredefinedPoliciesNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[r...
@Override public void stop() { threadPoolExecutor.shutdown(); BlockingQueue<Runnable> taskQueue = threadPoolExecutor.getQueue(); int bufferSizeBeforeShutdown = threadPoolExecutor.getQueue().size(); boolean gracefulShutdown = true; try { gracefulShutdown = threadPoolExecutor.awaitTermination(...
class class_name[name] begin[{] method[stop, return_type[void], modifier[public], parameter[]] begin[{] call[threadPoolExecutor.shutdown, parameter[]] local_variable[type[BlockingQueue], taskQueue] local_variable[type[int], bufferSizeBeforeShutdown] local_variable[type[b...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[stop] operator[SEP] operator[SEP] { identifier[threadPoolExecutor] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] identifier[BlockingQueue] operator[<] identifier[Runnable] operator[>] identifier[taskQueue] ...
@Override public void eSet(int featureID, Object newValue) { switch (featureID) { case AfplibPackage.CGCSGID__GCSGID: setGCSGID((Integer)newValue); return; case AfplibPackage.CGCSGID__CPGID: setCPGID((Integer)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=CGCSGID__GCSGID, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], stateme...
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] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] oper...
public static ClusterSetInfo classifyPoints(final ClusterSet clusterSet, List<Point> points, ExecutorService executorService) { final ClusterSetInfo clusterSetInfo = ClusterSetInfo.initialize(clusterSet, true); List<Runnable> tasks = new ArrayList<>(); for (final Point point...
class class_name[name] begin[{] method[classifyPoints, return_type[type[ClusterSetInfo]], modifier[public static], parameter[clusterSet, points, executorService]] begin[{] local_variable[type[ClusterSetInfo], clusterSetInfo] local_variable[type[List], tasks] ForStatement(body=BlockState...
Keyword[public] Keyword[static] identifier[ClusterSetInfo] identifier[classifyPoints] operator[SEP] Keyword[final] identifier[ClusterSet] identifier[clusterSet] , identifier[List] operator[<] identifier[Point] operator[>] identifier[points] , identifier[ExecutorService] identifier[executorService] operator[SEP] { ...
public static <A, S, C extends Comparable<C>, N extends HeuristicNode<A, S, C, N>> AStar<A, S, C, N> createAStar( SearchProblem<A, S, N> components) { return new AStar<A, S, C, N>(components.getInitialNode(), components.getExpander()); }
class class_name[name] begin[{] method[createAStar, return_type[type[AStar]], modifier[public static], parameter[components]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getInitialNode, postfix_operators=[], prefix_operators=[], qualifier=components, selectors=[], type...
Keyword[public] Keyword[static] operator[<] identifier[A] , identifier[S] , identifier[C] Keyword[extends] identifier[Comparable] operator[<] identifier[C] operator[>] , identifier[N] Keyword[extends] identifier[HeuristicNode] operator[<] identifier[A] , identifier[S] , identifier[C] , identifier[N] operator[>] o...
@NotNull @SuppressWarnings("unchecked") public static <T> Stream<T> ofNullable(@Nullable T element) { return (element == null) ? Stream.<T>empty() : Stream.of(element); }
class class_name[name] begin[{] method[ofNullable, return_type[type[Stream]], modifier[public static], parameter[element]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=...
annotation[@] identifier[NotNull] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Stream] operator[<] identifier[T] operator[>] identifier[ofNullable] operator[SEP] annotation[@] identifier[Nullable] ...
public void readDwgSplineV15(int[] data, int offset) throws Exception { int bitPos = offset; bitPos = readObjectHeaderV15(data, bitPos); Vector v = DwgUtil.getBitShort(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); int sc = ((Integer)v.get(1)).intValue(); scenario = sc; v = DwgUtil.getBitShort(da...
class class_name[name] begin[{] method[readDwgSplineV15, return_type[void], modifier[public], parameter[data, offset]] begin[{] local_variable[type[int], bitPos] assign[member[.bitPos], call[.readObjectHeaderV15, parameter[member[.data], member[.bitPos]]]] local_variable[type[Ve...
Keyword[public] Keyword[void] identifier[readDwgSplineV15] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[offset] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[int] identifier[bitPos] operator[=] identifier[offset] operator[SEP] identifier[bitPo...
public static void close(String poolName) { if (poolName == null) { return; } synchronized (poolMap) { for (Pool pool : poolMap.values()) { if (poolName.equals(pool.getUrlParser().getOptions().poolName)) { try { pool.close(); } catch (InterruptedException ...
class class_name[name] begin[{] method[close, return_type[void], modifier[public static], parameter[poolName]] begin[{] if[binary_operation[member[.poolName], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] SYNCHRONIZED[member[.poo...
Keyword[public] Keyword[static] Keyword[void] identifier[close] operator[SEP] identifier[String] identifier[poolName] operator[SEP] { Keyword[if] operator[SEP] identifier[poolName] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } Keyword[synchronized] operator[SEP...
public static long count(nitro_service service, String limitidentifier) throws Exception{ nslimitidentifier_nslimitsessions_binding obj = new nslimitidentifier_nslimitsessions_binding(); obj.set_limitidentifier(limitidentifier); options option = new options(); option.set_count(true); nslimitidentifier_nslimit...
class class_name[name] begin[{] method[count, return_type[type[long]], modifier[public static], parameter[service, limitidentifier]] begin[{] local_variable[type[nslimitidentifier_nslimitsessions_binding], obj] call[obj.set_limitidentifier, parameter[member[.limitidentifier]]] l...
Keyword[public] Keyword[static] Keyword[long] identifier[count] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[limitidentifier] operator[SEP] Keyword[throws] identifier[Exception] { identifier[nslimitidentifier_nslimitsessions_binding] identifier[obj] operator[=] Key...
public Object set(int index, Object element) { if (index >= elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + elementCount); } if (index < 0)...
class class_name[name] begin[{] method[set, return_type[type[Object]], modifier[public], parameter[index, element]] begin[{] if[binary_operation[member[.index], >=, member[.elementCount]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOper...
Keyword[public] identifier[Object] identifier[set] operator[SEP] Keyword[int] identifier[index] , identifier[Object] identifier[element] operator[SEP] { Keyword[if] operator[SEP] identifier[index] operator[>=] identifier[elementCount] operator[SEP] { Keyword[throw] Keyword[new] identifier[IndexOutOfB...
public static Value parse(File file, Charset charset) throws JSONException { try { return parse(new InputStreamReader(new BufferedInputStream(new FileInputStream(file)), charset)); } catch (FileNotFoundException e) { throw new JSONException(e); } }
class class_name[name] begin[{] method[parse, return_type[type[Value]], modifier[public static], parameter[file, charset]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[ClassCreator(arguments=[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=f...
Keyword[public] Keyword[static] identifier[Value] identifier[parse] operator[SEP] identifier[File] identifier[file] , identifier[Charset] identifier[charset] operator[SEP] Keyword[throws] identifier[JSONException] { Keyword[try] { Keyword[return] identifier[parse] operator[SEP] Keyword[new] identifie...
public static double approxSumPaths(WeightedIntDiGraph g, RealVector startWeights, RealVector endWeights, Iterator<DiEdge> seq, DoubleConsumer c) { // we keep track of the total weight of discovered paths ending along // each edge and the total weight // of all paths ending at each n...
class class_name[name] begin[{] method[approxSumPaths, return_type[type[double]], modifier[public static], parameter[g, startWeights, endWeights, seq, c]] begin[{] local_variable[type[DefaultDict], prefixWeightsEndingAt] local_variable[type[RealVector], currentSums] local_variable[type[...
Keyword[public] Keyword[static] Keyword[double] identifier[approxSumPaths] operator[SEP] identifier[WeightedIntDiGraph] identifier[g] , identifier[RealVector] identifier[startWeights] , identifier[RealVector] identifier[endWeights] , identifier[Iterator] operator[<] identifier[DiEdge] operator[>] identifier[seq] , ...
public void registerPartition(ResultPartitionID partitionId) { checkNotNull(partitionId); synchronized (registeredHandlers) { LOG.debug("registering {}", partitionId); if (registeredHandlers.put(partitionId, new TaskEventHandler()) != null) { throw new IllegalStateException( "Partition " + partition...
class class_name[name] begin[{] method[registerPartition, return_type[void], modifier[public], parameter[partitionId]] begin[{] call[.checkNotNull, parameter[member[.partitionId]]] SYNCHRONIZED[member[.registeredHandlers]] BEGIN[{] call[LOG.debug, paramet...
Keyword[public] Keyword[void] identifier[registerPartition] operator[SEP] identifier[ResultPartitionID] identifier[partitionId] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[partitionId] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[registeredHandlers] operator[SE...
private void notifyIfStopped() { if (isAcceptingNewJobs() || !this.runningTasksFutures.isEmpty()) { return; } final File stoppedFile = new File(this.workingDirectories.getWorking(), "stopped"); try { LOGGER.info("The print has finished processing jobs and can now ...
class class_name[name] begin[{] method[notifyIfStopped, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[call[.isAcceptingNewJobs, parameter[]], ||, THIS[member[None.runningTasksFutures]call[None.isEmpty, parameter[]]]]] begin[{] return[None] e...
Keyword[private] Keyword[void] identifier[notifyIfStopped] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isAcceptingNewJobs] operator[SEP] operator[SEP] operator[||] operator[!] Keyword[this] operator[SEP] identifier[runningTasksFutures] operator[SEP] identifier[isEmpty] operator[SEP] operat...
public List<Long> getSlidingCountTimestamps(long startTs, long endTs, int slidingCount) { List<Long> timestamps = new ArrayList<>(); if (endTs > startTs) { int count = 0; long ts = Long.MIN_VALUE; for (Event<T> event : queue) { if (event.getTimestamp()...
class class_name[name] begin[{] method[getSlidingCountTimestamps, return_type[type[List]], modifier[public], parameter[startTs, endTs, slidingCount]] begin[{] local_variable[type[List], timestamps] if[binary_operation[member[.endTs], >, member[.startTs]]] begin[{] local_vari...
Keyword[public] identifier[List] operator[<] identifier[Long] operator[>] identifier[getSlidingCountTimestamps] operator[SEP] Keyword[long] identifier[startTs] , Keyword[long] identifier[endTs] , Keyword[int] identifier[slidingCount] operator[SEP] { identifier[List] operator[<] identifier[Long] operator[>] ide...
public static File getArtifactFileFromPluginDependencies(AbstractWisdomMojo mojo, String artifactId, String type) { Preconditions.checkNotNull(mojo); Preconditions.checkNotNull(artifactId); Preconditions.checkNotNull(type); for (Artifact artifact : mojo.pluginDependencies) { ...
class class_name[name] begin[{] method[getArtifactFileFromPluginDependencies, return_type[type[File]], modifier[public static], parameter[mojo, artifactId, type]] begin[{] call[Preconditions.checkNotNull, parameter[member[.mojo]]] call[Preconditions.checkNotNull, parameter[membe...
Keyword[public] Keyword[static] identifier[File] identifier[getArtifactFileFromPluginDependencies] operator[SEP] identifier[AbstractWisdomMojo] identifier[mojo] , identifier[String] identifier[artifactId] , identifier[String] identifier[type] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[c...
@Nonnull public static <R> LCharFunctionBuilder<R> charFunction(Consumer<LCharFunction<R>> consumer) { return new LCharFunctionBuilder(consumer); }
class class_name[name] begin[{] method[charFunction, return_type[type[LCharFunctionBuilder]], modifier[public static], parameter[consumer]] begin[{] return[ClassCreator(arguments=[MemberReference(member=consumer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, construc...
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[R] operator[>] identifier[LCharFunctionBuilder] operator[<] identifier[R] operator[>] identifier[charFunction] operator[SEP] identifier[Consumer] operator[<] identifier[LCharFunction] operator[<] identifier[R] operator[>] operator[...
public boolean has(String tableName, String columnName, GeometryType geometryType) { String extensionName = getExtensionName(geometryType); boolean exists = has(extensionName, tableName, columnName); return exists; }
class class_name[name] begin[{] method[has, return_type[type[boolean]], modifier[public], parameter[tableName, columnName, geometryType]] begin[{] local_variable[type[String], extensionName] local_variable[type[boolean], exists] return[member[.exists]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[has] operator[SEP] identifier[String] identifier[tableName] , identifier[String] identifier[columnName] , identifier[GeometryType] identifier[geometryType] operator[SEP] { identifier[String] identifier[extensionName] operator[=] identifier[getExtensionName] operator[...
public <T> T post(final Class<T> type, @DelegatesTo(HttpConfig.class) final Closure closure) { return type.cast(interceptors.get(HttpVerb.POST).apply(configureRequest(type, HttpVerb.POST, closure), this::doPost)); }
class class_name[name] begin[{] method[post, return_type[type[T]], modifier[public], parameter[type, closure]] begin[{] return[call[type.cast, parameter[call[interceptors.get, parameter[member[HttpVerb.POST]]]]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[post] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , annotation[@] identifier[DelegatesTo] operator[SEP] identifier[HttpConfig] operator[SEP] Keyword[class] operator[SEP] Keyword[fina...
private void execute(ReadOperation op, int length) { checkReadable(length); if (!buffers.isEmpty()) { advanceBufferIfNecessary(); } for (; length > 0 && !buffers.isEmpty(); advanceBufferIfNecessary()) { ReadableBuffer buffer = buffers.peek(); int lengthToCopy = Math.min(length, buffe...
class class_name[name] begin[{] method[execute, return_type[void], modifier[private], parameter[op, length]] begin[{] call[.checkReadable, parameter[member[.length]]] if[call[buffers.isEmpty, parameter[]]] begin[{] call[.advanceBufferIfNecessary, paramete...
Keyword[private] Keyword[void] identifier[execute] operator[SEP] identifier[ReadOperation] identifier[op] , Keyword[int] identifier[length] operator[SEP] { identifier[checkReadable] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[buffers] operator[SE...
private static void populateDC(Context ctx, DigitalObject obj, DOWriter w, Date nowUTC) throws IOException, ServerException { logger.debug("Adding/Checking default DC datastream"); Datastream dc = w.GetDatastream("DC", null); DCFields dcf; XMLDatastreamProcessor dcxml = null;...
class class_name[name] begin[{] method[populateDC, return_type[void], modifier[private static], parameter[ctx, obj, w, nowUTC]] begin[{] call[logger.debug, parameter[literal["Adding/Checking default DC datastream"]]] local_variable[type[Datastream], dc] local_variable[type[DCFie...
Keyword[private] Keyword[static] Keyword[void] identifier[populateDC] operator[SEP] identifier[Context] identifier[ctx] , identifier[DigitalObject] identifier[obj] , identifier[DOWriter] identifier[w] , identifier[Date] identifier[nowUTC] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServerExce...
@SuppressWarnings("checkstyle:regexp") public static void showDefaults() { final Properties defaultValues = new Properties(); JanusConfig.getDefaultValues(defaultValues); NetworkConfig.getDefaultValues(defaultValues); try (OutputStream os = getConsoleLogger()) { defaultValues.storeToXML(os, null); os.flu...
class class_name[name] begin[{] method[showDefaults, return_type[void], modifier[public static], parameter[]] begin[{] local_variable[type[Properties], defaultValues] call[JanusConfig.getDefaultValues, parameter[member[.defaultValues]]] call[NetworkConfig.getDefaultValue...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[showDefaults] operator[SEP] operator[SEP] { Keyword[final] identifier[Properties] identifier[defaultValues] operator[=] Keyword[new] identifier[Properties] operator[SEP]...
private void updatePreemptionVariables() { long now = clock.getTime(); for (Map.Entry<JobInProgress, JobInfo> entry: infos.entrySet()) { JobInProgress job = entry.getKey(); JobInfo info = entry.getValue(); if (job.getStatus().getRunState() != JobStatus.RUNNING) { // Job is still in PRE...
class class_name[name] begin[{] method[updatePreemptionVariables, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[long], now] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensi...
Keyword[private] Keyword[void] identifier[updatePreemptionVariables] operator[SEP] operator[SEP] { Keyword[long] identifier[now] operator[=] identifier[clock] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] ope...
@Override public Set<Island> getIslands() { Map<Coordinate, Island> coordinateMapper = new HashMap<>(); List<Coordinate> allMatches = allMatches(); for (Coordinate c : allMatches) { // LOG.debug("coordinate {}", c); addToIslands(coordinateMapper, c); } ...
class class_name[name] begin[{] method[getIslands, return_type[type[Set]], modifier[public], parameter[]] begin[{] local_variable[type[Map], coordinateMapper] local_variable[type[List], allMatches] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=M...
annotation[@] identifier[Override] Keyword[public] identifier[Set] operator[<] identifier[Island] operator[>] identifier[getIslands] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[Coordinate] , identifier[Island] operator[>] identifier[coordinateMapper] operator[=] Keyword[new] identifier[...
public static Object convertStringToObject(String string) { try { return ClassServiceUtility.getClassService().convertStringToObject(string, null); } catch (ClassNotFoundException e) { throw new RuntimeException(e.getMessage()); } }
class class_name[name] begin[{] method[convertStringToObject, return_type[type[Object]], modifier[public static], parameter[string]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getClassService, postfix_operators=[], prefix_operators=[], qualifier=ClassS...
Keyword[public] Keyword[static] identifier[Object] identifier[convertStringToObject] operator[SEP] identifier[String] identifier[string] operator[SEP] { Keyword[try] { Keyword[return] identifier[ClassServiceUtility] operator[SEP] identifier[getClassService] operator[SEP] operator[SEP] operator[SEP] id...
public static byte[] canonicalize(byte[] inBytes) throws IOException { try { Canonicalizer c = Canonicalizer.getInstance( Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS); return c.canonicalize(inBytes); } catch (Exception e) { throw new IOException(e);...
class class_name[name] begin[{] method[canonicalize, return_type[type[byte]], modifier[public static], parameter[inBytes]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=...
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[canonicalize] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[inBytes] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { identifier[Canonicalizer] identifier[c] operator[=] iden...
protected Thread createPump(InputStream is, OutputStream os, boolean closeWhenExhausted, boolean nonBlockingIO) { StreamPumper pumper = new StreamPumper(is, os, closeWhenExhausted, nonBlockingIO); pumper.setAutoflush(true); final Thread result = new ThreadWithPumper(pumper); result.setDaemon(true); ...
class class_name[name] begin[{] method[createPump, return_type[type[Thread]], modifier[protected], parameter[is, os, closeWhenExhausted, nonBlockingIO]] begin[{] local_variable[type[StreamPumper], pumper] call[pumper.setAutoflush, parameter[literal[true]]] local_variable[type[Th...
Keyword[protected] identifier[Thread] identifier[createPump] operator[SEP] identifier[InputStream] identifier[is] , identifier[OutputStream] identifier[os] , Keyword[boolean] identifier[closeWhenExhausted] , Keyword[boolean] identifier[nonBlockingIO] operator[SEP] { identifier[StreamPumper] identifier[pumper]...
private int calculateEndLevel() { int result = 0; if (m_navRootPath != null) { // where are we? (start level) StringTokenizer counter = new StringTokenizer(m_navRootPath, "/", false); // one less as level 0 nav elements accepted is one level (depth 1). r...
class class_name[name] begin[{] method[calculateEndLevel, return_type[type[int]], modifier[private], parameter[]] begin[{] local_variable[type[int], result] if[binary_operation[member[.m_navRootPath], !=, literal[null]]] begin[{] local_variable[type[StringTokenizer], counter...
Keyword[private] Keyword[int] identifier[calculateEndLevel] operator[SEP] operator[SEP] { Keyword[int] identifier[result] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[m_navRootPath] operator[!=] Other[null] operator[SEP] { identifier[StringTokenizer] identifier[counter] oper...
public boolean release(long index) { assertSegmentOpen(); long offset = offsetIndex.find(relativeOffset(index)); return offset != -1 && offsetPredicate.release(offset); }
class class_name[name] begin[{] method[release, return_type[type[boolean]], modifier[public], parameter[index]] begin[{] call[.assertSegmentOpen, parameter[]] local_variable[type[long], offset] return[binary_operation[binary_operation[member[.offset], !=, literal[1]], &&, call[o...
Keyword[public] Keyword[boolean] identifier[release] operator[SEP] Keyword[long] identifier[index] operator[SEP] { identifier[assertSegmentOpen] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[offset] operator[=] identifier[offsetIndex] operator[SEP] identifier[find] operator[SEP] identifier[r...
public void marshall(GetDeployablePatchSnapshotForInstanceRequest getDeployablePatchSnapshotForInstanceRequest, ProtocolMarshaller protocolMarshaller) { if (getDeployablePatchSnapshotForInstanceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } ...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[getDeployablePatchSnapshotForInstanceRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.getDeployablePatchSnapshotForInstanceRequest], ==, literal[null]]] begin[{] ThrowSt...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetDeployablePatchSnapshotForInstanceRequest] identifier[getDeployablePatchSnapshotForInstanceRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[getDeployablePat...
public static <TERM> Map<TERM, Double> idfFromTfs(Iterable<Map<TERM, Double>> tfs, boolean smooth, boolean addOne) { return idf(new KeySetIterable<TERM, Double>(tfs), smooth, addOne); }
class class_name[name] begin[{] method[idfFromTfs, return_type[type[Map]], modifier[public static], parameter[tfs, smooth, addOne]] begin[{] return[call[.idf, parameter[ClassCreator(arguments=[MemberReference(member=tfs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, ...
Keyword[public] Keyword[static] operator[<] identifier[TERM] operator[>] identifier[Map] operator[<] identifier[TERM] , identifier[Double] operator[>] identifier[idfFromTfs] operator[SEP] identifier[Iterable] operator[<] identifier[Map] operator[<] identifier[TERM] , identifier[Double] operator[>] operator[>] identif...
private static ByteBuffer trim(ByteBuffer buf) { if (buf.capacity() <= 4 * buf.remaining()) { return buf; } else { ByteBuffer clone = ByteBuffer.allocate(buf.remaining()); buf.get(clone.array()); return clone; } }
class class_name[name] begin[{] method[trim, return_type[type[ByteBuffer]], modifier[private static], parameter[buf]] begin[{] if[binary_operation[call[buf.capacity, parameter[]], <=, binary_operation[literal[4], *, call[buf.remaining, parameter[]]]]] begin[{] return[member[.buf]] ...
Keyword[private] Keyword[static] identifier[ByteBuffer] identifier[trim] operator[SEP] identifier[ByteBuffer] identifier[buf] operator[SEP] { Keyword[if] operator[SEP] identifier[buf] operator[SEP] identifier[capacity] operator[SEP] operator[SEP] operator[<=] Other[4] operator[*] identifier[buf] operator[SEP] id...
public Sheet importCsv(String file, String sheetName, Integer headerRowIndex, Integer primaryRowIndex) throws SmartsheetException { return importFile("sheets/import", file,"text/csv", sheetName, headerRowIndex, primaryRowIndex); }
class class_name[name] begin[{] method[importCsv, return_type[type[Sheet]], modifier[public], parameter[file, sheetName, headerRowIndex, primaryRowIndex]] begin[{] return[call[.importFile, parameter[literal["sheets/import"], member[.file], literal["text/csv"], member[.sheetName], member[.headerRowIndex...
Keyword[public] identifier[Sheet] identifier[importCsv] operator[SEP] identifier[String] identifier[file] , identifier[String] identifier[sheetName] , identifier[Integer] identifier[headerRowIndex] , identifier[Integer] identifier[primaryRowIndex] operator[SEP] Keyword[throws] identifier[SmartsheetException] { ...
public Voice getVoice(String voiceName) { for (Object m_voice : m_voices) { Voice v = (Voice) m_voice; if (v.getVoiceName().equals(voiceName)) return v; } Voice v = new Voice(voiceName, m_firstBarNumber); v.setPartLabel(m_partLabel); m_voices.add(v);...
class class_name[name] begin[{] method[getVoice, return_type[type[Voice]], modifier[public], parameter[voiceName]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=Member...
Keyword[public] identifier[Voice] identifier[getVoice] operator[SEP] identifier[String] identifier[voiceName] operator[SEP] { Keyword[for] operator[SEP] identifier[Object] identifier[m_voice] operator[:] identifier[m_voices] operator[SEP] { identifier[Voice] identifier[v] operator[=] operator[SEP] id...
public static TransportAddress applyXor(TransportAddress address, byte[] transactionID) { byte[] addressBytes = address.getAddressBytes(); char port = (char) address.getPort(); char portModifier = (char) ((transactionID[0] << 8 & 0x0000FF00) | (transactionID[1] & 0x000000FF)); port ^= portModifier; for (...
class class_name[name] begin[{] method[applyXor, return_type[type[TransportAddress]], modifier[public static], parameter[address, transactionID]] begin[{] local_variable[type[byte], addressBytes] local_variable[type[char], port] local_variable[type[char], portModifier] a...
Keyword[public] Keyword[static] identifier[TransportAddress] identifier[applyXor] operator[SEP] identifier[TransportAddress] identifier[address] , Keyword[byte] operator[SEP] operator[SEP] identifier[transactionID] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[addressBytes] operator[=] id...
public <U> Class<? extends U> getClass(String name, Class<? extends U> defaultValue, Class<U> xface) { try { Class<?> theClass = getClass(name, defaultValue); if (theClass != null && !xface.isAssignableFrom(theClass)) throw new ...
class class_name[name] begin[{] method[getClass, return_type[type[Class]], modifier[public], parameter[name, defaultValue, xface]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference...
Keyword[public] operator[<] identifier[U] operator[>] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[U] operator[>] identifier[getClass] operator[SEP] identifier[String] identifier[name] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[U] operator[>] identifier[defaultValu...
public T delayScaleY(@FloatRange(from = 0.0) float end) { getDelayedProcessor().addProcess(SCALE_Y, end); return self(); }
class class_name[name] begin[{] method[delayScaleY, return_type[type[T]], modifier[public], parameter[end]] begin[{] call[.getDelayedProcessor, parameter[]] return[call[.self, parameter[]]] end[}] END[}]
Keyword[public] identifier[T] identifier[delayScaleY] operator[SEP] annotation[@] identifier[FloatRange] operator[SEP] identifier[from] operator[=] literal[Float] operator[SEP] Keyword[float] identifier[end] operator[SEP] { identifier[getDelayedProcessor] operator[SEP] operator[SEP] operator[SEP] identifier[addP...
public CompletableFuture<List<QueueDescription>> getQueuesAsync(int count, int skip) { if (count > 100 || count < 1) { throw new IllegalArgumentException("Count should be between 1 and 100"); } if (skip < 0) { throw new IllegalArgumentException("Skip cannot be negative")...
class class_name[name] begin[{] method[getQueuesAsync, return_type[type[CompletableFuture]], modifier[public], parameter[count, skip]] begin[{] if[binary_operation[binary_operation[member[.count], >, literal[100]], ||, binary_operation[member[.count], <, literal[1]]]] begin[{] Throw...
Keyword[public] identifier[CompletableFuture] operator[<] identifier[List] operator[<] identifier[QueueDescription] operator[>] operator[>] identifier[getQueuesAsync] operator[SEP] Keyword[int] identifier[count] , Keyword[int] identifier[skip] operator[SEP] { Keyword[if] operator[SEP] identifier[count] operator...
private GroupMetadata findGroup(GroupHierarchyConfig config, String parentGroupId) { GroupMetadata parentGroup = findByRef(Group.refById(parentGroupId)); return parentGroup.getGroups().stream() .filter(group -> group.getName().equals(config.getName())) .findFirst() ....
class class_name[name] begin[{] method[findGroup, return_type[type[GroupMetadata]], modifier[private], parameter[config, parentGroupId]] begin[{] local_variable[type[GroupMetadata], parentGroup] return[call[parentGroup.getGroups, parameter[]]] end[}] END[}]
Keyword[private] identifier[GroupMetadata] identifier[findGroup] operator[SEP] identifier[GroupHierarchyConfig] identifier[config] , identifier[String] identifier[parentGroupId] operator[SEP] { identifier[GroupMetadata] identifier[parentGroup] operator[=] identifier[findByRef] operator[SEP] identifier[Group] op...
public void marshall(Authorizer authorizer, ProtocolMarshaller protocolMarshaller) { if (authorizer == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(authorizer.getId(), ID_BINDING); prot...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[authorizer, protocolMarshaller]] begin[{] if[binary_operation[member[.authorizer], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Authorizer] identifier[authorizer] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[authorizer] operator[==] Other[null] operator[SEP] { Keyword[throw] Keywo...
public static long encode(int hi, int lo) { long h = ((long) hi) & 0xFFFF_FFFFL; long l = ((long) lo) & 0xFFFF_FFFFL; return (h << 32) + l; }
class class_name[name] begin[{] method[encode, return_type[type[long]], modifier[public static], parameter[hi, lo]] begin[{] local_variable[type[long], h] local_variable[type[long], l] return[binary_operation[binary_operation[member[.h], <<, literal[32]], +, member[.l]]] end[}] END[...
Keyword[public] Keyword[static] Keyword[long] identifier[encode] operator[SEP] Keyword[int] identifier[hi] , Keyword[int] identifier[lo] operator[SEP] { Keyword[long] identifier[h] operator[=] operator[SEP] operator[SEP] Keyword[long] operator[SEP] identifier[hi] operator[SEP] operator[&] literal[Integer] opera...
public static int hash32(final String text) { final byte[] bytes = text.getBytes(); return hash32(bytes, bytes.length); }
class class_name[name] begin[{] method[hash32, return_type[type[int]], modifier[public static], parameter[text]] begin[{] local_variable[type[byte], bytes] return[call[.hash32, parameter[member[.bytes], member[bytes.length]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[hash32] operator[SEP] Keyword[final] identifier[String] identifier[text] operator[SEP] { Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[text] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] o...
public static final boolean isInside(int x, int y, Rect box) { return (box.x < x && x < box.x + box.w && box.y < y && y < box.y + box.h); }
class class_name[name] begin[{] method[isInside, return_type[type[boolean]], modifier[final public static], parameter[x, y, box]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[member[box.x], <, member[.x]], &&, binary_operation[member[.x], <, binary_operation[membe...
Keyword[public] Keyword[static] Keyword[final] Keyword[boolean] identifier[isInside] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] , identifier[Rect] identifier[box] operator[SEP] { Keyword[return] operator[SEP] identifier[box] operator[SEP] identifier[x] operator[<] identifier[x] opera...
@BetaApi public final Address getGlobalAddress(String address) { GetGlobalAddressHttpRequest request = GetGlobalAddressHttpRequest.newBuilder().setAddress(address).build(); return getGlobalAddress(request); }
class class_name[name] begin[{] method[getGlobalAddress, return_type[type[Address]], modifier[final public], parameter[address]] begin[{] local_variable[type[GetGlobalAddressHttpRequest], request] return[call[.getGlobalAddress, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Address] identifier[getGlobalAddress] operator[SEP] identifier[String] identifier[address] operator[SEP] { identifier[GetGlobalAddressHttpRequest] identifier[request] operator[=] identifier[GetGlobalAddressHttpRequest] operator[SEP] iden...
public void setOnMouseOver(String onMouseOver) { _tbodyTag.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEOVER, onMouseOver); }
class class_name[name] begin[{] method[setOnMouseOver, return_type[void], modifier[public], parameter[onMouseOver]] begin[{] call[_tbodyTag.registerAttribute, parameter[member[AbstractHtmlState.ATTR_JAVASCRIPT], member[HtmlConstants.ONMOUSEOVER], member[.onMouseOver]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setOnMouseOver] operator[SEP] identifier[String] identifier[onMouseOver] operator[SEP] { identifier[_tbodyTag] operator[SEP] identifier[registerAttribute] operator[SEP] identifier[AbstractHtmlState] operator[SEP] identifier[ATTR_JAVASCRIPT] , identifier[HtmlConstants] op...
public void startRollingText() { for (int i = 0; i < INITIAL_TEXT.length(); i++) { StringBuilder sb = new StringBuilder(INITIAL_TEXT); sb.insert(i + 1, "</font>"); sb.insert(i, "<font color=\"red\">"); sb.insert(0, "<html>"); sb.append("</html>"); rollingText[i]...
class class_name[name] begin[{] method[startRollingText, return_type[void], modifier[public], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Member...
Keyword[public] Keyword[void] identifier[startRollingText] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[INITIAL_TEXT] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifie...
@Override public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException { if (inputType.length > 1) throw new InvalidKerasConfigurationException( "Keras Convolution layer accepts only one input (received " + inputType.length + ")"); ...
class class_name[name] begin[{] method[getOutputType, return_type[type[InputType]], modifier[public], parameter[inputType]] begin[{] if[binary_operation[member[inputType.length], >, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(...
annotation[@] identifier[Override] Keyword[public] identifier[InputType] identifier[getOutputType] operator[SEP] identifier[InputType] operator[...] identifier[inputType] operator[SEP] Keyword[throws] identifier[InvalidKerasConfigurationException] { Keyword[if] operator[SEP] identifier[inputType] operator[SEP] i...
public ByteArraySegment subSegment(int offset, int length, boolean readOnly) { Exceptions.checkArrayRange(offset, length, this.length, "offset", "length"); return new ByteArraySegment(this.array, this.startOffset + offset, length, readOnly || this.readOnly); }
class class_name[name] begin[{] method[subSegment, return_type[type[ByteArraySegment]], modifier[public], parameter[offset, length, readOnly]] begin[{] call[Exceptions.checkArrayRange, parameter[member[.offset], member[.length], THIS[member[None.length]], literal["offset"], literal["length"]]] ...
Keyword[public] identifier[ByteArraySegment] identifier[subSegment] operator[SEP] Keyword[int] identifier[offset] , Keyword[int] identifier[length] , Keyword[boolean] identifier[readOnly] operator[SEP] { identifier[Exceptions] operator[SEP] identifier[checkArrayRange] operator[SEP] identifier[offset] , identi...
@Override public void setConnectionProximity(String newConnectionProximity) throws JMSException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setConnectionProximity", newConnectionProximity); // Check for null and empty string, and set to defa...
class class_name[name] begin[{] method[setConnectionProximity, return_type[void], modifier[public], parameter[newConnectionProximity]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.e...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setConnectionProximity] operator[SEP] identifier[String] identifier[newConnectionProximity] operator[SEP] Keyword[throws] identifier[JMSException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTraci...
public UserManagedCacheBuilder<K, V, T> using(ServiceCreationConfiguration<?> serviceConfiguration) { UserManagedCacheBuilder<K, V, T> otherBuilder = new UserManagedCacheBuilder<>(this); if (serviceConfiguration instanceof DefaultSizeOfEngineProviderConfiguration) { removeAnySizeOfEngine(otherBuilder); ...
class class_name[name] begin[{] method[using, return_type[type[UserManagedCacheBuilder]], modifier[public], parameter[serviceConfiguration]] begin[{] local_variable[type[UserManagedCacheBuilder], otherBuilder] if[binary_operation[member[.serviceConfiguration], instanceof, type[DefaultSi...
Keyword[public] identifier[UserManagedCacheBuilder] operator[<] identifier[K] , identifier[V] , identifier[T] operator[>] identifier[using] operator[SEP] identifier[ServiceCreationConfiguration] operator[<] operator[?] operator[>] identifier[serviceConfiguration] operator[SEP] { identifier[UserManagedCacheBuil...
private synchronized void name(InstructionGroup group, ParserClassNode classNode) { // generate an MD5 hash across the buffer, use only the first 96 bit MD5Digester digester = new MD5Digester(classNode.name); group.getInstructions().accept(digester); for (FieldNode field: group.getFields...
class class_name[name] begin[{] method[name, return_type[void], modifier[synchronized private], parameter[group, classNode]] begin[{] local_variable[type[MD5Digester], digester] call[group.getInstructions, parameter[]] ForStatement(body=StatementExpression(expression=MethodInvoc...
Keyword[private] Keyword[synchronized] Keyword[void] identifier[name] operator[SEP] identifier[InstructionGroup] identifier[group] , identifier[ParserClassNode] identifier[classNode] operator[SEP] { identifier[MD5Digester] identifier[digester] operator[=] Keyword[new] identifier[MD5Digester] operator[SEP] ident...
public long check() { long remaining = 0; lock.readLock().lock(); try { if (this.timedout) { // Note: this clears the interrupted flag if it was set // Assumption is that the interruption was caused by the Timeout boolean wasInterrupted...
class class_name[name] begin[{] method[check, return_type[type[long]], modifier[public], parameter[]] begin[{] local_variable[type[long], remaining] call[lock.readLock, parameter[]] TryStatement(block=[IfStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifi...
Keyword[public] Keyword[long] identifier[check] operator[SEP] operator[SEP] { Keyword[long] identifier[remaining] operator[=] Other[0] operator[SEP] identifier[lock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try...
public static XOManagerFactory createXOManagerFactory(String name) { if (OSGiUtil.isXOLoadedAsOSGiBundle()) { try { BundleContext bundleContext = FrameworkUtil.getBundle(XOSGi.class).getBundleContext(); String filterString = "(name=" + name + ")"; Coll...
class class_name[name] begin[{] method[createXOManagerFactory, return_type[type[XOManagerFactory]], modifier[public static], parameter[name]] begin[{] if[call[OSGiUtil.isXOLoadedAsOSGiBundle, parameter[]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declara...
Keyword[public] Keyword[static] identifier[XOManagerFactory] identifier[createXOManagerFactory] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] identifier[OSGiUtil] operator[SEP] identifier[isXOLoadedAsOSGiBundle] operator[SEP] operator[SEP] operator[SEP] { ...
private @Nullable CacheWriterException deleteAllToCacheWriter(Set<? extends K> keys) { if (!configuration.isWriteThrough() || keys.isEmpty()) { return null; } List<K> keysToDelete = new ArrayList<>(keys); try { writer.deleteAll(keysToDelete); return null; } catch (CacheWriterExcept...
class class_name[name] begin[{] method[deleteAllToCacheWriter, return_type[type[CacheWriterException]], modifier[private], parameter[keys]] begin[{] if[binary_operation[call[configuration.isWriteThrough, parameter[]], ||, call[keys.isEmpty, parameter[]]]] begin[{] return[literal[nul...
Keyword[private] annotation[@] identifier[Nullable] identifier[CacheWriterException] identifier[deleteAllToCacheWriter] operator[SEP] identifier[Set] operator[<] operator[?] Keyword[extends] identifier[K] operator[>] identifier[keys] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[configuration]...
@Override public int get(TemporalField field) { if (field instanceof ChronoField) { switch ((ChronoField) field) { case INSTANT_SECONDS: throw new UnsupportedTemporalTypeException("Invalid field 'InstantSeconds' for get() method, use getLong() instead"); ...
class class_name[name] begin[{] method[get, return_type[type[int]], modifier[public], parameter[field]] begin[{] if[binary_operation[member[.field], instanceof, type[ChronoField]]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['INSTANT_SECONDS'], statements=[ThrowStateme...
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[get] operator[SEP] identifier[TemporalField] identifier[field] operator[SEP] { Keyword[if] operator[SEP] identifier[field] Keyword[instanceof] identifier[ChronoField] operator[SEP] { Keyword[switch] operator[SEP] operator[SEP] ...
public Set<SIFInteraction> searchSIF(final Model model) { if (miners == null) initMiners(); final Map<SIFInteraction, SIFInteraction> map = new ConcurrentHashMap<SIFInteraction, SIFInteraction>(); for (final SIFMiner miner : miners) { if (miner instanceof MinerAdapter) ((MinerAdapter) miner).setIdMap(...
class class_name[name] begin[{] method[searchSIF, return_type[type[Set]], modifier[public], parameter[model]] begin[{] if[binary_operation[member[.miners], ==, literal[null]]] begin[{] call[.initMiners, parameter[]] else begin[{] None end[}] local_variable[ty...
Keyword[public] identifier[Set] operator[<] identifier[SIFInteraction] operator[>] identifier[searchSIF] operator[SEP] Keyword[final] identifier[Model] identifier[model] operator[SEP] { Keyword[if] operator[SEP] identifier[miners] operator[==] Other[null] operator[SEP] identifier[initMiners] operator[SEP] operat...
private Document updateOrCreateIndex(EntityMetadata metadata, final MetamodelImpl metaModel, Object entity, String parentId, Class<?> clazz, boolean isUpdate) { boolean isEmbeddedId = metaModel.isEmbeddable(metadata.getIdAttribute().getBindableJavaType()); if (!metadata.isIndexable()) ...
class class_name[name] begin[{] method[updateOrCreateIndex, return_type[type[Document]], modifier[private], parameter[metadata, metaModel, entity, parentId, clazz, isUpdate]] begin[{] local_variable[type[boolean], isEmbeddedId] if[call[metadata.isIndexable, parameter[]]] begin[{] ...
Keyword[private] identifier[Document] identifier[updateOrCreateIndex] operator[SEP] identifier[EntityMetadata] identifier[metadata] , Keyword[final] identifier[MetamodelImpl] identifier[metaModel] , identifier[Object] identifier[entity] , identifier[String] identifier[parentId] , identifier[Class] operator[<] opera...
private int defaultThreadID() { long tid = Thread.currentThread().getId(); if (tid < MIN_SEQUENTIAL_THREAD_ID) { return (int) tid; } else { Integer id = threadIds.get(); if (id == null) { id = nextThreadId.getAndIncrement(); thr...
class class_name[name] begin[{] method[defaultThreadID, return_type[type[int]], modifier[private], parameter[]] begin[{] local_variable[type[long], tid] if[binary_operation[member[.tid], <, member[.MIN_SEQUENTIAL_THREAD_ID]]] begin[{] return[Cast(expression=MemberReference(m...
Keyword[private] Keyword[int] identifier[defaultThreadID] operator[SEP] operator[SEP] { Keyword[long] identifier[tid] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[S...
public <T> TopicProducer<T> createTopicProducer(final String topic, final ProducerCallback<T> messageCallback) { Preconditions.checkState(connectionFactory != null, "connection factory was never injected!"); return new TopicProducer<T>(connectionFactory, jmsConfig, topic, messageCallback); }
class class_name[name] begin[{] method[createTopicProducer, return_type[type[TopicProducer]], modifier[public], parameter[topic, messageCallback]] begin[{] call[Preconditions.checkState, parameter[binary_operation[member[.connectionFactory], !=, literal[null]], literal["connection factory was n...
Keyword[public] operator[<] identifier[T] operator[>] identifier[TopicProducer] operator[<] identifier[T] operator[>] identifier[createTopicProducer] operator[SEP] Keyword[final] identifier[String] identifier[topic] , Keyword[final] identifier[ProducerCallback] operator[<] identifier[T] operator[>] identifier[messageC...
public static double dotProduct4( final double x0, final double y0, final double z0, final double w0, final double x1, final double y1, final double z1, final double w1) { final double x = x0 * x1; final double y = y0 * y1; final double z = z0 * z1; final double w = w0 ...
class class_name[name] begin[{] method[dotProduct4, return_type[type[double]], modifier[public static], parameter[x0, y0, z0, w0, x1, y1, z1, w1]] begin[{] local_variable[type[double], x] local_variable[type[double], y] local_variable[type[double], z] local_variable[type[double]...
Keyword[public] Keyword[static] Keyword[double] identifier[dotProduct4] operator[SEP] Keyword[final] Keyword[double] identifier[x0] , Keyword[final] Keyword[double] identifier[y0] , Keyword[final] Keyword[double] identifier[z0] , Keyword[final] Keyword[double] identifier[w0] , Keyword[final] Keyword[double] identif...
public double gammaDenom(double w, double y, double z, double f) { switch (distribution) { case gaussian: case gamma: return w; case bernoulli: case quasibinomial: double ff = y-z; return w * ff*(1-ff); case multinomial: double absz = Math.abs(z); ...
class class_name[name] begin[{] method[gammaDenom, return_type[type[double]], modifier[public], parameter[w, y, z, f]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['gaussian', 'gamma'], statements=[ReturnStatement(expression=MemberReference(member=w, postfix_operators=[], prefix_operators=...
Keyword[public] Keyword[double] identifier[gammaDenom] operator[SEP] Keyword[double] identifier[w] , Keyword[double] identifier[y] , Keyword[double] identifier[z] , Keyword[double] identifier[f] operator[SEP] { Keyword[switch] operator[SEP] identifier[distribution] operator[SEP] { Keyword[case] ide...
public void setPeriod(ReadableInterval interval) { if (interval == null) { setPeriod(0L); } else { Chronology chrono = DateTimeUtils.getChronology(interval.getChronology()); setPeriod(interval.getStartMillis(), interval.getEndMillis(), chrono); } }
class class_name[name] begin[{] method[setPeriod, return_type[void], modifier[public], parameter[interval]] begin[{] if[binary_operation[member[.interval], ==, literal[null]]] begin[{] call[.setPeriod, parameter[literal[0L]]] else begin[{] local_varia...
Keyword[public] Keyword[void] identifier[setPeriod] operator[SEP] identifier[ReadableInterval] identifier[interval] operator[SEP] { Keyword[if] operator[SEP] identifier[interval] operator[==] Other[null] operator[SEP] { identifier[setPeriod] operator[SEP] Other[0L] operator[SEP] operator[SEP] }...
private boolean areImplicitGlobalClientsDisabled() { String setting = System.getProperty(SDKGlobalConfiguration.DISABLE_S3_IMPLICIT_GLOBAL_CLIENTS_SYSTEM_PROPERTY); return setting != null && !setting.equals("false"); }
class class_name[name] begin[{] method[areImplicitGlobalClientsDisabled, return_type[type[boolean]], modifier[private], parameter[]] begin[{] local_variable[type[String], setting] return[binary_operation[binary_operation[member[.setting], !=, literal[null]], &&, call[setting.equals, parameter[l...
Keyword[private] Keyword[boolean] identifier[areImplicitGlobalClientsDisabled] operator[SEP] operator[SEP] { identifier[String] identifier[setting] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[SDKGlobalConfiguration] operator[SEP] identifier[DISABLE_S3_IMPLICIT_GL...
@Nonnull public static ESuccess writeToStream (@Nonnull final Node aNode, @Nonnull @WillClose final OutputStream aOS, @Nonnull final IXMLWriterSettings aSettings) { ValueEnforcer.notNull (aNode, "Node"); ValueEnforcer.notNull (a...
class class_name[name] begin[{] method[writeToStream, return_type[type[ESuccess]], modifier[public static], parameter[aNode, aOS, aSettings]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aNode], literal["Node"]]] call[ValueEnforcer.notNull, parameter[member[.aOS], lite...
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[ESuccess] identifier[writeToStream] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Node] identifier[aNode] , annotation[@] identifier[Nonnull] annotation[@] identifier[WillClose] Keyword[final] identifier[OutputStre...
public Observable<ServiceResponse<Page<ExperimentInner>>> listByWorkspaceWithServiceResponseAsync(final String resourceGroupName, final String workspaceName, final ExperimentsListByWorkspaceOptions experimentsListByWorkspaceOptions) { return listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, exper...
class class_name[name] begin[{] method[listByWorkspaceWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, workspaceName, experimentsListByWorkspaceOptions]] begin[{] return[call[.listByWorkspaceSinglePageAsync, parameter[member[.resourceGroupName], me...
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ExperimentInner] operator[>] operator[>] operator[>] identifier[listByWorkspaceWithServiceResponseAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Key...
public QueryParameters updateType(String key, Integer type) { this.types.put(processKey(key), type); return this; }
class class_name[name] begin[{] method[updateType, return_type[type[QueryParameters]], modifier[public], parameter[key, type]] begin[{] THIS[member[None.types]call[None.put, parameter[call[.processKey, parameter[member[.key]]], member[.type]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[QueryParameters] identifier[updateType] operator[SEP] identifier[String] identifier[key] , identifier[Integer] identifier[type] operator[SEP] { Keyword[this] operator[SEP] identifier[types] operator[SEP] identifier[put] operator[SEP] identifier[processKey] operator[SEP] identifier[key...
public ExceptionThrownRule getExceptionThrownRule(Throwable ex) { ExceptionThrownRule exceptionThrownRule = null; int deepest = Integer.MAX_VALUE; for (Map.Entry<String, ExceptionThrownRule> entry : exceptionThrownRuleMap.entrySet()) { int depth = getMatchedDepth(entry.getKey(), ex);...
class class_name[name] begin[{] method[getExceptionThrownRule, return_type[type[ExceptionThrownRule]], modifier[public], parameter[ex]] begin[{] local_variable[type[ExceptionThrownRule], exceptionThrownRule] local_variable[type[int], deepest] ForStatement(body=BlockStatement(label=None,...
Keyword[public] identifier[ExceptionThrownRule] identifier[getExceptionThrownRule] operator[SEP] identifier[Throwable] identifier[ex] operator[SEP] { identifier[ExceptionThrownRule] identifier[exceptionThrownRule] operator[=] Other[null] operator[SEP] Keyword[int] identifier[deepest] operator[=] identifier[Integ...
@Override public ColumnRealName toColumnRealName(String columnDbName) { return ColumnRealName.create(xgetAliasName(), toColumnSqlName(columnDbName)); }
class class_name[name] begin[{] method[toColumnRealName, return_type[type[ColumnRealName]], modifier[public], parameter[columnDbName]] begin[{] return[call[ColumnRealName.create, parameter[call[.xgetAliasName, parameter[]], call[.toColumnSqlName, parameter[member[.columnDbName]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ColumnRealName] identifier[toColumnRealName] operator[SEP] identifier[String] identifier[columnDbName] operator[SEP] { Keyword[return] identifier[ColumnRealName] operator[SEP] identifier[create] operator[SEP] identifier[xgetAliasName] operator[SEP] op...
public void marshall(UpdateRuleRequest updateRuleRequest, ProtocolMarshaller protocolMarshaller) { if (updateRuleRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateRuleRequest.getRuleId(...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[updateRuleRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.updateRuleRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(pos...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UpdateRuleRequest] identifier[updateRuleRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[updateRuleRequest] operator[==] Other[null] operator[SEP] { ...
public Set<ObjectName> getBeanNames() throws JMException { checkClientConnected(); try { return mbeanConn.queryNames(null, null); } catch (IOException e) { throw createJmException("Problems querying for jmx bean names: " + e, e); } }
class class_name[name] begin[{] method[getBeanNames, return_type[type[Set]], modifier[public], parameter[]] begin[{] call[.checkClientConnected, parameter[]] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qua...
Keyword[public] identifier[Set] operator[<] identifier[ObjectName] operator[>] identifier[getBeanNames] operator[SEP] operator[SEP] Keyword[throws] identifier[JMException] { identifier[checkClientConnected] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[mbeanConn] ...
public String list() throws IOException, BackupExecuteException { String sURL = path + HTTPBackupAgent.Constants.BASE_URL + HTTPBackupAgent.Constants.OperationType.CURRENT_BACKUPS_REPOSITORY_INFO; BackupAgentResponse repositoryResponse = transport.executeGET(...
class class_name[name] begin[{] method[list, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[String], sURL] local_variable[type[BackupAgentResponse], repositoryResponse] assign[member[.sURL], binary_operation[binary_operation[member[.path],...
Keyword[public] identifier[String] identifier[list] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[BackupExecuteException] { identifier[String] identifier[sURL] operator[=] identifier[path] operator[+] identifier[HTTPBackupAgent] operator[SEP] identifier[Constants] operator[SEP...
static void generateProjectPropertiesFile( final String name, final File destfile, final boolean overwrite, final Properties properties, boolean addDefaultProps ) { generateProjectPropertiesFile(name, destfile, overwrite, properties, false, nu...
class class_name[name] begin[{] method[generateProjectPropertiesFile, return_type[void], modifier[static], parameter[name, destfile, overwrite, properties, addDefaultProps]] begin[{] call[.generateProjectPropertiesFile, parameter[member[.name], member[.destfile], member[.overwrite], member[.pro...
Keyword[static] Keyword[void] identifier[generateProjectPropertiesFile] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[File] identifier[destfile] , Keyword[final] Keyword[boolean] identifier[overwrite] , Keyword[final] identifier[Properties] identifier[properties] , Key...
private void initBuckets() { if (buckets != null) { return; } buckets = createBucketList(); if (inputList == null || inputList.isEmpty()) { return; } // Sort the records by name. // Stable sort preserves input order of collation duplicates...
class class_name[name] begin[{] method[initBuckets, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[member[.buckets], !=, literal[null]]] begin[{] return[None] else begin[{] None end[}] assign[member[.buckets], call[.cr...
Keyword[private] Keyword[void] identifier[initBuckets] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[buckets] operator[!=] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[buckets] operator[=] identifier[createBucketList] operator[SEP] operator[...
@Override public void close() throws IOException { if (!closed) { closed = true; try { byte[] buffer = cipher.doFinal(); if (buffer != null) { output.write(buffer); } } catch (IllegalBlockSizeException | ...
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] if[member[.closed]] begin[{] assign[member[.closed], literal[true]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDecl...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[closed] operator[SEP] { identifier[closed] operator[=] literal[boolean] operator[SEP] Keyword[try] ...
@Override public GetStaticIpsResult getStaticIps(GetStaticIpsRequest request) { request = beforeClientExecution(request); return executeGetStaticIps(request); }
class class_name[name] begin[{] method[getStaticIps, return_type[type[GetStaticIpsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetStaticIps, parameter[member[.request]]]] ...
annotation[@] identifier[Override] Keyword[public] identifier[GetStaticIpsResult] identifier[getStaticIps] operator[SEP] identifier[GetStaticIpsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[S...
@Override public void initialize(ClassLoadHelper loadHelper, SchedulerSignaler signaler) throws SchedulerConfigException { final RedisJobStoreSchema redisSchema = new RedisJobStoreSchema(keyPrefix, keyDelimiter); ObjectMapper mapper = new ObjectMapper() .addMixIn(CronTrigger.class, ...
class class_name[name] begin[{] method[initialize, return_type[void], modifier[public], parameter[loadHelper, signaler]] begin[{] local_variable[type[RedisJobStoreSchema], redisSchema] local_variable[type[ObjectMapper], mapper] if[binary_operation[member[.redisCluster], &&, bina...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[initialize] operator[SEP] identifier[ClassLoadHelper] identifier[loadHelper] , identifier[SchedulerSignaler] identifier[signaler] operator[SEP] Keyword[throws] identifier[SchedulerConfigException] { Keyword[final] identifier[RedisJobSto...
public Quaternionf fromAxisAngleRad(Vector3fc axis, float angle) { return fromAxisAngleRad(axis.x(), axis.y(), axis.z(), angle); }
class class_name[name] begin[{] method[fromAxisAngleRad, return_type[type[Quaternionf]], modifier[public], parameter[axis, angle]] begin[{] return[call[.fromAxisAngleRad, parameter[call[axis.x, parameter[]], call[axis.y, parameter[]], call[axis.z, parameter[]], member[.angle]]]] end[}] END[}]
Keyword[public] identifier[Quaternionf] identifier[fromAxisAngleRad] operator[SEP] identifier[Vector3fc] identifier[axis] , Keyword[float] identifier[angle] operator[SEP] { Keyword[return] identifier[fromAxisAngleRad] operator[SEP] identifier[axis] operator[SEP] identifier[x] operator[SEP] operator[SEP] , iden...
private static int[] sequence(int e) { int[] a = new int[e]; for(int i = 0; i < a.length; i++) { a[i] = i; } return a; }
class class_name[name] begin[{] method[sequence, return_type[type[int]], modifier[private static], parameter[e]] begin[{] local_variable[type[int], a] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=a, postfix...
Keyword[private] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[sequence] operator[SEP] Keyword[int] identifier[e] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[a] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[for]...
public static int geometric(double p) { if (!(p >= 0.0 && p <= 1.0)) throw new IllegalArgumentException("Probability must be between 0.0 and 1.0"); // using algorithm given by Knuth return (int) Math.ceil(Math.log(uniform()) / Math.log(1.0 - p)); }
class class_name[name] begin[{] method[geometric, return_type[type[int]], modifier[public static], parameter[p]] begin[{] if[binary_operation[binary_operation[member[.p], >=, literal[0.0]], &&, binary_operation[member[.p], <=, literal[1.0]]]] begin[{] ThrowStatement(expression=ClassCreator(argu...
Keyword[public] Keyword[static] Keyword[int] identifier[geometric] operator[SEP] Keyword[double] identifier[p] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[p] operator[>=] literal[Float] operator[&&] identifier[p] operator[<=] literal[Float] operator[SEP] operator[SEP] Keyword[t...
@SuppressWarnings("unchecked") public Object filter(Object filterTarget, Expression filterExpression, EvaluationContext ctx) { MethodSecurityExpressionOperations rootObject = (MethodSecurityExpressionOperations) ctx .getRootObject().getValue(); final boolean debug = logger.isDebugEnabled(); List retainLis...
class class_name[name] begin[{] method[filter, return_type[type[Object]], modifier[public], parameter[filterTarget, filterExpression, ctx]] begin[{] local_variable[type[MethodSecurityExpressionOperations], rootObject] local_variable[type[boolean], debug] local_variable[type[List], retai...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Object] identifier[filter] operator[SEP] identifier[Object] identifier[filterTarget] , identifier[Expression] identifier[filterExpression] , identifier[EvaluationContext] identifier[ctx] operator[SEP] { ...
public final TextBuilder p(long l) { if (null != __buffer) __append(l); else __caller.p(l); return this; }
class class_name[name] begin[{] method[p, return_type[type[TextBuilder]], modifier[final public], parameter[l]] begin[{] if[binary_operation[literal[null], !=, member[.__buffer]]] begin[{] call[.__append, parameter[member[.l]]] else begin[{] call[__caller.p, para...
Keyword[public] Keyword[final] identifier[TextBuilder] identifier[p] operator[SEP] Keyword[long] identifier[l] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[!=] identifier[__buffer] operator[SEP] identifier[__append] operator[SEP] identifier[l] operator[SEP] operator[SEP] Keyword[else] identifie...
public String getNamespaceFromURI(String uri) { String breakChar = "/"; if (uri.contains("#")) { breakChar = "#"; } else { if (uri.substring(6).contains(":")) { breakChar = ":"; } } int pos = Math.min(uri.lastIndexOf(breakChar)...
class class_name[name] begin[{] method[getNamespaceFromURI, return_type[type[String]], modifier[public], parameter[uri]] begin[{] local_variable[type[String], breakChar] if[call[uri.contains, parameter[literal["#"]]]] begin[{] assign[member[.breakChar], literal["...
Keyword[public] identifier[String] identifier[getNamespaceFromURI] operator[SEP] identifier[String] identifier[uri] operator[SEP] { identifier[String] identifier[breakChar] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[uri] operator[SEP] identifier[contains] operator[SEP] literal...
public CuratorFramework newCurator() { // Make all of the curator threads daemon threads so they don't block the JVM from terminating. Also label them // with the ensemble they're connecting to, in case someone is trying to sort through a thread dump. ThreadFactory threadFactory = new ThreadFac...
class class_name[name] begin[{] method[newCurator, return_type[type[CuratorFramework]], modifier[public], parameter[]] begin[{] local_variable[type[ThreadFactory], threadFactory] local_variable[type[org], retry] return[call[CuratorFrameworkFactory.builder, parameter[]]] end[}] END[}...
Keyword[public] identifier[CuratorFramework] identifier[newCurator] operator[SEP] operator[SEP] { identifier[ThreadFactory] identifier[threadFactory] operator[=] Keyword[new] identifier[ThreadFactoryBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setNameFormat] operator[SEP] literal[String] operato...
public String createUpdateInStr(Map dbColMap0,Map modelEntryMap){ if(dbColMap0==null){ return null; } //add 201902 ning Map dbColMap=new CaseInsensitiveKeyMap(); if(dbColMap0!=null){ dbColMap.putAll(dbColMap0); } List realValueList=new ArrayList(); List extValueList=new ArrayList...
class class_name[name] begin[{] method[createUpdateInStr, return_type[type[String]], modifier[public], parameter[dbColMap0, modelEntryMap]] begin[{] if[binary_operation[member[.dbColMap0], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] ...
Keyword[public] identifier[String] identifier[createUpdateInStr] operator[SEP] identifier[Map] identifier[dbColMap0] , identifier[Map] identifier[modelEntryMap] operator[SEP] { Keyword[if] operator[SEP] identifier[dbColMap0] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operato...
private TreeNode setPos(DocTree node, TreeNode newNode) { int pos = pos(node); return newNode.setPosition(new SourcePosition(pos, length(node), lineNumber(pos))); }
class class_name[name] begin[{] method[setPos, return_type[type[TreeNode]], modifier[private], parameter[node, newNode]] begin[{] local_variable[type[int], pos] return[call[newNode.setPosition, parameter[ClassCreator(arguments=[MemberReference(member=pos, postfix_operators=[], prefix_operators=...
Keyword[private] identifier[TreeNode] identifier[setPos] operator[SEP] identifier[DocTree] identifier[node] , identifier[TreeNode] identifier[newNode] operator[SEP] { Keyword[int] identifier[pos] operator[=] identifier[pos] operator[SEP] identifier[node] operator[SEP] operator[SEP] Keyword[return] identifier[ne...
String getUniqueName(CharSequence base) { String name = base.toString(); for (int differentiator = 1; isInvalidName(name); differentiator++) { name = base.toString() + separator + differentiator; } return name; }
class class_name[name] begin[{] method[getUniqueName, return_type[type[String]], modifier[default], parameter[base]] begin[{] local_variable[type[String], name] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=...
identifier[String] identifier[getUniqueName] operator[SEP] identifier[CharSequence] identifier[base] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[base] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[dif...
@Override public Processor newProcessor(Processor sourceProcessor) { PredictionCombinerProcessor newProcessor = new PredictionCombinerProcessor(); PredictionCombinerProcessor originProcessor = (PredictionCombinerProcessor) sourceProcessor; if (originProcessor.getOutputStream() != null) { ...
class class_name[name] begin[{] method[newProcessor, return_type[type[Processor]], modifier[public], parameter[sourceProcessor]] begin[{] local_variable[type[PredictionCombinerProcessor], newProcessor] local_variable[type[PredictionCombinerProcessor], originProcessor] if[binary_...
annotation[@] identifier[Override] Keyword[public] identifier[Processor] identifier[newProcessor] operator[SEP] identifier[Processor] identifier[sourceProcessor] operator[SEP] { identifier[PredictionCombinerProcessor] identifier[newProcessor] operator[=] Keyword[new] identifier[PredictionCombinerProcessor] opera...
@Override public DirectedGraph<DirectedEdge> copy(Set<Integer> vertices) { // special case for If the called is requesting a copy of the entire // graph, which is more easily handled with the copy constructor if (vertices.size() == order() && vertices.equals(vertices())) return new S...
class class_name[name] begin[{] method[copy, return_type[type[DirectedGraph]], modifier[public], parameter[vertices]] begin[{] if[binary_operation[binary_operation[call[vertices.size, parameter[]], ==, call[.order, parameter[]]], &&, call[vertices.equals, parameter[call[.vertices, parameter[]]]...
annotation[@] identifier[Override] Keyword[public] identifier[DirectedGraph] operator[<] identifier[DirectedEdge] operator[>] identifier[copy] operator[SEP] identifier[Set] operator[<] identifier[Integer] operator[>] identifier[vertices] operator[SEP] { Keyword[if] operator[SEP] identifier[vertices] operator[SEP...
Key<T> getKeyForNewItem() { checkConfiguration(!bindingSelection.isInitialized(), "Multibinder was already initialized"); return Key.get( bindingSelection.getElementTypeLiteral(), new RealElement(bindingSelection.getSetName(), MULTIBINDER, "")); }
class class_name[name] begin[{] method[getKeyForNewItem, return_type[type[Key]], modifier[default], parameter[]] begin[{] call[.checkConfiguration, parameter[call[bindingSelection.isInitialized, parameter[]], literal["Multibinder was already initialized"]]] return[call[Key.get, paramete...
identifier[Key] operator[<] identifier[T] operator[>] identifier[getKeyForNewItem] operator[SEP] operator[SEP] { identifier[checkConfiguration] operator[SEP] operator[!] identifier[bindingSelection] operator[SEP] identifier[isInitialized] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP]...
public DeleteMessageBatchResult deleteMessageBatch(DeleteMessageBatchRequest deleteMessageBatchRequest) { if (deleteMessageBatchRequest == null) { String errorMessage = "deleteMessageBatchRequest cannot be null."; LOG.error(errorMessage); throw new AmazonClientException(errorMessage); } deleteMessageBa...
class class_name[name] begin[{] method[deleteMessageBatch, return_type[type[DeleteMessageBatchResult]], modifier[public], parameter[deleteMessageBatchRequest]] begin[{] if[binary_operation[member[.deleteMessageBatchRequest], ==, literal[null]]] begin[{] local_variable[type[String], ...
Keyword[public] identifier[DeleteMessageBatchResult] identifier[deleteMessageBatch] operator[SEP] identifier[DeleteMessageBatchRequest] identifier[deleteMessageBatchRequest] operator[SEP] { Keyword[if] operator[SEP] identifier[deleteMessageBatchRequest] operator[==] Other[null] operator[SEP] { identif...
public String getBaseSkeleton(String pattern) { synchronized (this) { // synchronized since a getter must be thread-safe current.set(pattern, fp, false); return current.getBasePattern(); } }
class class_name[name] begin[{] method[getBaseSkeleton, return_type[type[String]], modifier[public], parameter[pattern]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] call[current.set, parameter[member[.pattern], member[.fp], literal[false]]] return[call[current.get...
Keyword[public] identifier[String] identifier[getBaseSkeleton] operator[SEP] identifier[String] identifier[pattern] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { identifier[current] operator[SEP] identifier[set] operator[SEP] identifier[pattern] , identifier[fp] , ...
public GetPersonTrackingResult withPersons(PersonDetection... persons) { if (this.persons == null) { setPersons(new java.util.ArrayList<PersonDetection>(persons.length)); } for (PersonDetection ele : persons) { this.persons.add(ele); } return this; }
class class_name[name] begin[{] method[withPersons, return_type[type[GetPersonTrackingResult]], modifier[public], parameter[persons]] begin[{] if[binary_operation[THIS[member[None.persons]], ==, literal[null]]] begin[{] call[.setPersons, parameter[ClassCreator(arguments=...
Keyword[public] identifier[GetPersonTrackingResult] identifier[withPersons] operator[SEP] identifier[PersonDetection] operator[...] identifier[persons] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[persons] operator[==] Other[null] operator[SEP] { identifier[setPerso...
public BlockInfo queryBlockByNumber(Collection<Peer> peers, long blockNumber, User userContext) throws InvalidArgumentException, ProposalException { checkChannelState(); checkPeers(peers); userContextCheck(userContext); try { logger.debug("queryBlockByNumber with blockNumbe...
class class_name[name] begin[{] method[queryBlockByNumber, return_type[type[BlockInfo]], modifier[public], parameter[peers, blockNumber, userContext]] begin[{] call[.checkChannelState, parameter[]] call[.checkPeers, parameter[member[.peers]]] call[.userContextChe...
Keyword[public] identifier[BlockInfo] identifier[queryBlockByNumber] operator[SEP] identifier[Collection] operator[<] identifier[Peer] operator[>] identifier[peers] , Keyword[long] identifier[blockNumber] , identifier[User] identifier[userContext] operator[SEP] Keyword[throws] identifier[InvalidArgumentException] , ...
protected List<Message> getMessages(int prefetchBatchSize) throws InterruptedException { assert prefetchBatchSize > 0; ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest(queueUrl) .withMaxNumberOfMessages(prefetchBatchS...
class class_name[name] begin[{] method[getMessages, return_type[type[List]], modifier[protected], parameter[prefetchBatchSize]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=prefetchBatchSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ope...
Keyword[protected] identifier[List] operator[<] identifier[Message] operator[>] identifier[getMessages] operator[SEP] Keyword[int] identifier[prefetchBatchSize] operator[SEP] Keyword[throws] identifier[InterruptedException] { Keyword[assert] identifier[prefetchBatchSize] operator[>] Other[0] operator[SEP] identi...
Method findClassAvailableProxySetClassAvailableTargetMethod() throws Exception { Class<?> proxyClass = Class.forName(CLASS_AVAILABLE_PROXY_CLASS_NAME); Method method = ReflectionHelper.getDeclaredMethod(proxyClass, "setClassAvailableTarget", Object.class, Method.class); ReflectionHelper.setAcces...
class class_name[name] begin[{] method[findClassAvailableProxySetClassAvailableTargetMethod, return_type[type[Method]], modifier[default], parameter[]] begin[{] local_variable[type[Class], proxyClass] local_variable[type[Method], method] call[ReflectionHelper.setAccessible, para...
identifier[Method] identifier[findClassAvailableProxySetClassAvailableTargetMethod] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Class] operator[<] operator[?] operator[>] identifier[proxyClass] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identi...