code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private static BooleanNode doesStringContain(JsonNode subject, JsonNode search) { if (subject.asText().contains(search.asText())) { return BooleanNode.TRUE; } return BooleanNode.FALSE; }
class class_name[name] begin[{] method[doesStringContain, return_type[type[BooleanNode]], modifier[private static], parameter[subject, search]] begin[{] if[call[subject.asText, parameter[]]] begin[{] return[member[BooleanNode.TRUE]] else begin[{] None end[}] ...
Keyword[private] Keyword[static] identifier[BooleanNode] identifier[doesStringContain] operator[SEP] identifier[JsonNode] identifier[subject] , identifier[JsonNode] identifier[search] operator[SEP] { Keyword[if] operator[SEP] identifier[subject] operator[SEP] identifier[asText] operator[SEP] operator[SEP] opera...
public void setAttribute(String name, String value) { Params.notNullOrEmpty(name, "Attribute name"); Params.notEmpty(value, "Attribute value"); if(value != null) { attributes.put(name, value); } else { attributes.remove(name); } }
class class_name[name] begin[{] method[setAttribute, return_type[void], modifier[public], parameter[name, value]] begin[{] call[Params.notNullOrEmpty, parameter[member[.name], literal["Attribute name"]]] call[Params.notEmpty, parameter[member[.value], literal["Attribute value"]]...
Keyword[public] Keyword[void] identifier[setAttribute] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] { identifier[Params] operator[SEP] identifier[notNullOrEmpty] operator[SEP] identifier[name] , literal[String] operator[SEP] operator[SEP] identifier[Par...
@Override public Wave addDatas(final WaveData<?>... waveDatas) { for (final WaveData<?> waveData : waveDatas) { // Init the order of the wave Data waveData.order(waveDatas().size()); // Grab the previous value if any final WaveData<?> previous = this.waveIt...
class class_name[name] begin[{] method[addDatas, return_type[type[Wave]], modifier[public], parameter[waveDatas]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=waveDatas, postfix_operato...
annotation[@] identifier[Override] Keyword[public] identifier[Wave] identifier[addDatas] operator[SEP] Keyword[final] identifier[WaveData] operator[<] operator[?] operator[>] operator[...] identifier[waveDatas] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[WaveData] operator[<] operator[?]...
public AnnotatedTypeBuilder<X> removeFromMethodParameter(Method method, int position, Class<? extends Annotation> annotationType) { if (methods.get(method) == null) { throw new IllegalArgumentException("Method not present " + method + " on " + javaClass); } else { if (methodParamete...
class class_name[name] begin[{] method[removeFromMethodParameter, return_type[type[AnnotatedTypeBuilder]], modifier[public], parameter[method, position, annotationType]] begin[{] if[binary_operation[call[methods.get, parameter[member[.method]]], ==, literal[null]]] begin[{] ThrowSta...
Keyword[public] identifier[AnnotatedTypeBuilder] operator[<] identifier[X] operator[>] identifier[removeFromMethodParameter] operator[SEP] identifier[Method] identifier[method] , Keyword[int] identifier[position] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Annotation] operator[>] identifie...
public static synchronized void setTextDestination(String location, boolean enablePurgeBySize, boolean enablePurgeByTime, boolean enableFileSwitch, boolean enableBuffering, long maxRepositorySize, long retentionTime, int fileSwitchHour, String outOfSpaceAction, String outputFormat, boolean includeTrace) { // F00...
class class_name[name] begin[{] method[setTextDestination, return_type[void], modifier[synchronized public static], parameter[location, enablePurgeBySize, enablePurgeByTime, enableFileSwitch, enableBuffering, maxRepositorySize, retentionTime, fileSwitchHour, outOfSpaceAction, outputFormat, includeTrace]] begin...
Keyword[public] Keyword[static] Keyword[synchronized] Keyword[void] identifier[setTextDestination] operator[SEP] identifier[String] identifier[location] , Keyword[boolean] identifier[enablePurgeBySize] , Keyword[boolean] identifier[enablePurgeByTime] , Keyword[boolean] identifier[enableFileSwitch] , Keyword[boolean...
@SuppressWarnings("static-method") protected File createTempDirectory() { final File tmpPath = new File(System.getProperty("java.io.tmpdir")); //$NON-NLS-1$ int i = 0; File tmp = new File(tmpPath, "sarlc" + i); //$NON-NLS-1$ while (tmp.exists()) { ++i; tmp = new File(tmpPath, "sarlc" + i); //$NON-NLS-1$ ...
class class_name[name] begin[{] method[createTempDirectory, return_type[type[File]], modifier[protected], parameter[]] begin[{] local_variable[type[File], tmpPath] local_variable[type[int], i] local_variable[type[File], tmp] while[call[tmp.exists, parameter[]]] begin[{] ...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[File] identifier[createTempDirectory] operator[SEP] operator[SEP] { Keyword[final] identifier[File] identifier[tmpPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[System] o...
protected void drawCompositeImage(int width, int height) { ImageData bg = getImageData(fBaseImage); drawImage(bg, 0, 0); drawTopRight(); drawBottomRight(); drawBottomLeft(); }
class class_name[name] begin[{] method[drawCompositeImage, return_type[void], modifier[protected], parameter[width, height]] begin[{] local_variable[type[ImageData], bg] call[.drawImage, parameter[member[.bg], literal[0], literal[0]]] call[.drawTopRight, parameter[]] ...
Keyword[protected] Keyword[void] identifier[drawCompositeImage] operator[SEP] Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] { identifier[ImageData] identifier[bg] operator[=] identifier[getImageData] operator[SEP] identifier[fBaseImage] operator[SEP] operator[SEP] identifier[dra...
public void dispatchConsumerSetChangeCallbackEvent(ConsumerSetChangeCallback consumerSetChangeCallback,boolean isEmpty) { if(TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "dispatchConsumerSetChangeCallbackEvent", new Object[]{consumerSetChangeCallback, isEmpty})...
class class_name[name] begin[{] method[dispatchConsumerSetChangeCallbackEvent, return_type[void], modifier[public], parameter[consumerSetChangeCallback, isEmpty]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin...
Keyword[public] Keyword[void] identifier[dispatchConsumerSetChangeCallbackEvent] operator[SEP] identifier[ConsumerSetChangeCallback] identifier[consumerSetChangeCallback] , Keyword[boolean] identifier[isEmpty] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTra...
@Override public EClass getIfcCartesianPointList2D() { if (ifcCartesianPointList2DEClass == null) { ifcCartesianPointList2DEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(79); } return ifcCartesianPointList2DEClass; }
class class_name[name] begin[{] method[getIfcCartesianPointList2D, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcCartesianPointList2DEClass], ==, literal[null]]] begin[{] assign[member[.ifcCartesianPointList2DEClass], C...
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcCartesianPointList2D] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcCartesianPointList2DEClass] operator[==] Other[null] operator[SEP] { identifier[ifcCartesianPointList2DEClass] operator[=] ...
void compileToPySrcFiles(String outputPathFormat, SoyPySrcOptions pySrcOptions) throws IOException { resetErrorReporter(); ParseResult result = parse(); throwIfErrorsPresent(); new PySrcMain(scopedData.enterable()) .genPyFiles(result.fileSet(), pySrcOptions, outputPathFormat, errorReporter...
class class_name[name] begin[{] method[compileToPySrcFiles, return_type[void], modifier[default], parameter[outputPathFormat, pySrcOptions]] begin[{] call[.resetErrorReporter, parameter[]] local_variable[type[ParseResult], result] call[.throwIfErrorsPresent, parameter[]]...
Keyword[void] identifier[compileToPySrcFiles] operator[SEP] identifier[String] identifier[outputPathFormat] , identifier[SoyPySrcOptions] identifier[pySrcOptions] operator[SEP] Keyword[throws] identifier[IOException] { identifier[resetErrorReporter] operator[SEP] operator[SEP] operator[SEP] identifier[ParseResu...
private FileObserver createFileObserver(final String path) { return new FileObserver(path, FileObserver.CREATE | FileObserver.DELETE | FileObserver.MOVED_FROM | FileObserver.MOVED_TO) { @Override public void onEvent(final int event, final String path) { d...
class class_name[name] begin[{] method[createFileObserver, return_type[type[FileObserver]], modifier[private], parameter[path]] begin[{] return[ClassCreator(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOpera...
Keyword[private] identifier[FileObserver] identifier[createFileObserver] operator[SEP] Keyword[final] identifier[String] identifier[path] operator[SEP] { Keyword[return] Keyword[new] identifier[FileObserver] operator[SEP] identifier[path] , identifier[FileObserver] operator[SEP] identifier[CREATE] operator[|] i...
public boolean hasPermissionById(String id, String permission) { Permission resolvedPermission = getPermissionResolver().resolvePermission(permission); return hasPermissionById(id, resolvedPermission); }
class class_name[name] begin[{] method[hasPermissionById, return_type[type[boolean]], modifier[public], parameter[id, permission]] begin[{] local_variable[type[Permission], resolvedPermission] return[call[.hasPermissionById, parameter[member[.id], member[.resolvedPermission]]]] end[}] END[}...
Keyword[public] Keyword[boolean] identifier[hasPermissionById] operator[SEP] identifier[String] identifier[id] , identifier[String] identifier[permission] operator[SEP] { identifier[Permission] identifier[resolvedPermission] operator[=] identifier[getPermissionResolver] operator[SEP] operator[SEP] operator[SEP]...
public static Object flatten(Object input, JsonLdOptions opts) throws JsonLdError { return flatten(input, null, opts); }
class class_name[name] begin[{] method[flatten, return_type[type[Object]], modifier[public static], parameter[input, opts]] begin[{] return[call[.flatten, parameter[member[.input], literal[null], member[.opts]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[flatten] operator[SEP] identifier[Object] identifier[input] , identifier[JsonLdOptions] identifier[opts] operator[SEP] Keyword[throws] identifier[JsonLdError] { Keyword[return] identifier[flatten] operator[SEP] identifier[input] , Other[null] , ide...
public static <T, K, U, M extends ConcurrentMap<K, U>> Collector<T, ?, M> toConcurrentMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends U> valueMapper, BinaryOperator<U> mergeFunction, ...
class class_name[name] begin[{] method[toConcurrentMap, return_type[type[Collector]], modifier[public static], parameter[keyMapper, valueMapper, mergeFunction, mapSupplier]] begin[{] local_variable[type[BiConsumer], accumulator] return[ClassCreator(arguments=[MemberReference(member=mapSupplier,...
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[K] , identifier[U] , identifier[M] Keyword[extends] identifier[ConcurrentMap] operator[<] identifier[K] , identifier[U] operator[>] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[M] operator[>] identifie...
private void put(String name, BeanDefine beanDefine) { if (pool.put(name, beanDefine) != null) { log.warn("Duplicated Bean: {}", name); } }
class class_name[name] begin[{] method[put, return_type[void], modifier[private], parameter[name, beanDefine]] begin[{] if[binary_operation[call[pool.put, parameter[member[.name], member[.beanDefine]]], !=, literal[null]]] begin[{] call[log.warn, parameter[literal["Dupli...
Keyword[private] Keyword[void] identifier[put] operator[SEP] identifier[String] identifier[name] , identifier[BeanDefine] identifier[beanDefine] operator[SEP] { Keyword[if] operator[SEP] identifier[pool] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[beanDefine] operator[SEP] operato...
private void pushContentSource(char[] newBuffer) { nextContentSource = new ContentSource(nextContentSource, buffer, position, limit); buffer = newBuffer; position = 0; limit = newBuffer.length; }
class class_name[name] begin[{] method[pushContentSource, return_type[void], modifier[private], parameter[newBuffer]] begin[{] assign[member[.nextContentSource], ClassCreator(arguments=[MemberReference(member=nextContentSource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]...
Keyword[private] Keyword[void] identifier[pushContentSource] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[newBuffer] operator[SEP] { identifier[nextContentSource] operator[=] Keyword[new] identifier[ContentSource] operator[SEP] identifier[nextContentSource] , identifier[buffer] , identifi...
public static UnsupportedOperationException newUnsupportedOperationException(Throwable cause, String message, Object... args) { return new UnsupportedOperationException(format(message, args), cause); }
class class_name[name] begin[{] method[newUnsupportedOperationException, return_type[type[UnsupportedOperationException]], modifier[public static], parameter[cause, message, args]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=message, postfix_operators=[], ...
Keyword[public] Keyword[static] identifier[UnsupportedOperationException] identifier[newUnsupportedOperationException] operator[SEP] identifier[Throwable] identifier[cause] , identifier[String] identifier[message] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[return] Keyword[new] ...
public String getParam(String paramName) { if (requestParameters == null) { return null; } String[] values = requestParameters.get(paramName); if (ArrayUtil.isNotEmpty(values)) { return values[0]; } return null; }
class class_name[name] begin[{] method[getParam, return_type[type[String]], modifier[public], parameter[paramName]] begin[{] if[binary_operation[member[.requestParameters], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_var...
Keyword[public] identifier[String] identifier[getParam] operator[SEP] identifier[String] identifier[paramName] operator[SEP] { Keyword[if] operator[SEP] identifier[requestParameters] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[String] o...
private void weightGraphGenerateHelper(TopologySpec topologySpec) { try { Map<ServiceNode, ServiceNode> capabilities = topologySpec.getSpecExecutor().getCapabilities().get(); for (Map.Entry<ServiceNode, ServiceNode> capability : capabilities.entrySet()) { BaseServiceNodeImpl sourceNode = new Ba...
class class_name[name] begin[{] method[weightGraphGenerateHelper, return_type[void], modifier[private], parameter[topologySpec]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSpec...
Keyword[private] Keyword[void] identifier[weightGraphGenerateHelper] operator[SEP] identifier[TopologySpec] identifier[topologySpec] operator[SEP] { Keyword[try] { identifier[Map] operator[<] identifier[ServiceNode] , identifier[ServiceNode] operator[>] identifier[capabilities] operator[=] identifier...
@SuppressWarnings("unchecked") MonoDelayUntil<T> copyWithNewTriggerGenerator(boolean delayError, Function<? super T, ? extends Publisher<?>> triggerGenerator) { Objects.requireNonNull(triggerGenerator, "triggerGenerator"); Function<? super T, ? extends Publisher<?>>[] oldTriggers = this.otherGenerators; Funct...
class class_name[name] begin[{] method[copyWithNewTriggerGenerator, return_type[type[MonoDelayUntil]], modifier[default], parameter[delayError, triggerGenerator]] begin[{] call[Objects.requireNonNull, parameter[member[.triggerGenerator], literal["triggerGenerator"]]] local_variable[type...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[MonoDelayUntil] operator[<] identifier[T] operator[>] identifier[copyWithNewTriggerGenerator] operator[SEP] Keyword[boolean] identifier[delayError] , identifier[Function] operator[<] operator[?] Keyword[super] identifier[...
public Vector3f getTranslation(Vector3f dest) { dest.x = m30; dest.y = m31; dest.z = m32; return dest; }
class class_name[name] begin[{] method[getTranslation, return_type[type[Vector3f]], modifier[public], parameter[dest]] begin[{] assign[member[dest.x], member[.m30]] assign[member[dest.y], member[.m31]] assign[member[dest.z], member[.m32]] return[member[.d...
Keyword[public] identifier[Vector3f] identifier[getTranslation] operator[SEP] identifier[Vector3f] identifier[dest] operator[SEP] { identifier[dest] operator[SEP] identifier[x] operator[=] identifier[m30] operator[SEP] identifier[dest] operator[SEP] identifier[y] operator[=] identifier[m31] operator[SEP] identif...
@Override public int compareTo(Duration otherDuration) { int cmp = Long.compare(seconds, otherDuration.seconds); if (cmp != 0) { return cmp; } return nanos - otherDuration.nanos; }
class class_name[name] begin[{] method[compareTo, return_type[type[int]], modifier[public], parameter[otherDuration]] begin[{] local_variable[type[int], cmp] if[binary_operation[member[.cmp], !=, literal[0]]] begin[{] return[member[.cmp]] else begin[{] None e...
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Duration] identifier[otherDuration] operator[SEP] { Keyword[int] identifier[cmp] operator[=] identifier[Long] operator[SEP] identifier[compare] operator[SEP] identifier[seconds] , identifier[otherDurat...
public PagedResult<Favorite> listFavorites(PaginationParameters parameters) throws SmartsheetException{ String path = "favorites"; if (parameters != null) { path += parameters.toQueryString(); } return this.listResourcesWithWrapper(path, Favorite.class); }
class class_name[name] begin[{] method[listFavorites, return_type[type[PagedResult]], modifier[public], parameter[parameters]] begin[{] local_variable[type[String], path] if[binary_operation[member[.parameters], !=, literal[null]]] begin[{] assign[member[.path], ...
Keyword[public] identifier[PagedResult] operator[<] identifier[Favorite] operator[>] identifier[listFavorites] operator[SEP] identifier[PaginationParameters] identifier[parameters] operator[SEP] Keyword[throws] identifier[SmartsheetException] { identifier[String] identifier[path] operator[=] literal[String] oper...
public static void validString(String pContent, String pParamName) throws APPErrorException { if (StringUtil.isNullOrEmpty(pContent)) { throw new APPErrorException(pParamName + " 不能为空"); } }
class class_name[name] begin[{] method[validString, return_type[void], modifier[public static], parameter[pContent, pParamName]] begin[{] if[call[StringUtil.isNullOrEmpty, parameter[member[.pContent]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(opera...
Keyword[public] Keyword[static] Keyword[void] identifier[validString] operator[SEP] identifier[String] identifier[pContent] , identifier[String] identifier[pParamName] operator[SEP] Keyword[throws] identifier[APPErrorException] { Keyword[if] operator[SEP] identifier[StringUtil] operator[SEP] identifier[isNullOr...
public static boolean fixedTimeEqual(String lhs, String rhs) { boolean equal = (lhs.length() == rhs.length() ? true : false); // If not equal, work on a single operand to have same length. if(!equal) { rhs = lhs; } int len = lhs.length(); for(int i=0;i<len;i++) { if(lhs.charAt(i) == rhs.charAt(i...
class class_name[name] begin[{] method[fixedTimeEqual, return_type[type[boolean]], modifier[public static], parameter[lhs, rhs]] begin[{] local_variable[type[boolean], equal] if[member[.equal]] begin[{] assign[member[.rhs], member[.lhs]] else begin[{] Non...
Keyword[public] Keyword[static] Keyword[boolean] identifier[fixedTimeEqual] operator[SEP] identifier[String] identifier[lhs] , identifier[String] identifier[rhs] operator[SEP] { Keyword[boolean] identifier[equal] operator[=] operator[SEP] identifier[lhs] operator[SEP] identifier[length] operator[SEP] operator[S...
public SDVariable replaceWhere(SDVariable update, SDVariable from, Condition condition) { return replaceWhere(null, update, from, condition); }
class class_name[name] begin[{] method[replaceWhere, return_type[type[SDVariable]], modifier[public], parameter[update, from, condition]] begin[{] return[call[.replaceWhere, parameter[literal[null], member[.update], member[.from], member[.condition]]]] end[}] END[}]
Keyword[public] identifier[SDVariable] identifier[replaceWhere] operator[SEP] identifier[SDVariable] identifier[update] , identifier[SDVariable] identifier[from] , identifier[Condition] identifier[condition] operator[SEP] { Keyword[return] identifier[replaceWhere] operator[SEP] Other[null] , identifier[update...
private Token eventuallyMatch(Token.Kind kind) { checkNotEof(); Token token = tokens.get(index); if (token.kind != kind) { return null; } else { index = index + 1; return token; } }
class class_name[name] begin[{] method[eventuallyMatch, return_type[type[Token]], modifier[private], parameter[kind]] begin[{] call[.checkNotEof, parameter[]] local_variable[type[Token], token] if[binary_operation[member[token.kind], !=, member[.kind]]] begin[{] ...
Keyword[private] identifier[Token] identifier[eventuallyMatch] operator[SEP] identifier[Token] operator[SEP] identifier[Kind] identifier[kind] operator[SEP] { identifier[checkNotEof] operator[SEP] operator[SEP] operator[SEP] identifier[Token] identifier[token] operator[=] identifier[tokens] operator[SEP] identif...
protected Corpus onComplete(Corpus corpus, ProcessorContext context, Counter<String> counts) { return corpus; }
class class_name[name] begin[{] method[onComplete, return_type[type[Corpus]], modifier[protected], parameter[corpus, context, counts]] begin[{] return[member[.corpus]] end[}] END[}]
Keyword[protected] identifier[Corpus] identifier[onComplete] operator[SEP] identifier[Corpus] identifier[corpus] , identifier[ProcessorContext] identifier[context] , identifier[Counter] operator[<] identifier[String] operator[>] identifier[counts] operator[SEP] { Keyword[return] identifier[corpus] operator[SEP...
public static Function<? super ReactiveSeq<Integer>, ? extends ReactiveSeq<Integer>> limitInts(long maxSize){ return a->a.ints(i->i,s->s.limit(maxSize)); }
class class_name[name] begin[{] method[limitInts, return_type[type[Function]], modifier[public static], parameter[maxSize]] begin[{] return[LambdaExpression(body=MethodInvocation(arguments=[LambdaExpression(body=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=...
Keyword[public] Keyword[static] identifier[Function] operator[<] operator[?] Keyword[super] identifier[ReactiveSeq] operator[<] identifier[Integer] operator[>] , operator[?] Keyword[extends] identifier[ReactiveSeq] operator[<] identifier[Integer] operator[>] operator[>] identifier[limitInts] operator[SEP] Keyword[long...
public String processModification(Properties attributes) throws XDocletException { String name = attributes.getProperty(ATTRIBUTE_NAME); Properties mods = _curClassDef.getModification(name); String key; String value; if (mods == null) { ...
class class_name[name] begin[{] method[processModification, return_type[type[String]], modifier[public], parameter[attributes]] begin[{] local_variable[type[String], name] local_variable[type[Properties], mods] local_variable[type[String], key] local_variable[type[String], value...
Keyword[public] identifier[String] identifier[processModification] operator[SEP] identifier[Properties] identifier[attributes] operator[SEP] Keyword[throws] identifier[XDocletException] { identifier[String] identifier[name] operator[=] identifier[attributes] operator[SEP] identifier[getProperty] operator[SEP] id...
public EpollSocketChannelConfig setSoBusyPoll(int loopMicros) { try { ((EpollSocketChannel) channel).socket.setSoBusyPoll(loopMicros); return this; } catch (IOException e) { throw new ChannelException(e); } }
class class_name[name] begin[{] method[setSoBusyPoll, return_type[type[EpollSocketChannelConfig]], modifier[public], parameter[loopMicros]] begin[{] TryStatement(block=[StatementExpression(expression=Cast(expression=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, ...
Keyword[public] identifier[EpollSocketChannelConfig] identifier[setSoBusyPoll] operator[SEP] Keyword[int] identifier[loopMicros] operator[SEP] { Keyword[try] { operator[SEP] operator[SEP] identifier[EpollSocketChannel] operator[SEP] identifier[channel] operator[SEP] operator[SEP] identifier[socket] op...
protected boolean estimatePose( int which ,List<Point2D3D> points , Se3_F64 fiducialToCamera ) { if( !estimatePnP.process(points, initialEstimate) ) { return false; } filtered.clear(); // Don't bother if there are hardly any points to work with if( points.size() > 6 ) { w2p.configure(lensDistortion, ini...
class class_name[name] begin[{] method[estimatePose, return_type[type[boolean]], modifier[protected], parameter[which, points, fiducialToCamera]] begin[{] if[call[estimatePnP.process, parameter[member[.points], member[.initialEstimate]]]] begin[{] return[literal[false]] else...
Keyword[protected] Keyword[boolean] identifier[estimatePose] operator[SEP] Keyword[int] identifier[which] , identifier[List] operator[<] identifier[Point2D3D] operator[>] identifier[points] , identifier[Se3_F64] identifier[fiducialToCamera] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[estim...
public MarcField matchValue(Pattern pattern) { if (value != null && pattern.matcher(value).matches()) { return this; } for (Subfield subfield : subfields) { if (pattern.matcher(subfield.getValue()).matches()) { return this; } } ...
class class_name[name] begin[{] method[matchValue, return_type[type[MarcField]], modifier[public], parameter[pattern]] begin[{] if[binary_operation[binary_operation[member[.value], !=, literal[null]], &&, call[pattern.matcher, parameter[member[.value]]]]] begin[{] return[THIS[]] ...
Keyword[public] identifier[MarcField] identifier[matchValue] operator[SEP] identifier[Pattern] identifier[pattern] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[&&] identifier[pattern] operator[SEP] identifier[matcher] operator[SEP] identifier[value] operator[SEP] ...
public void setWebxml( File descr ) throws ArchiverException { deploymentDescriptor = descr; if ( !deploymentDescriptor.exists() ) { throw new ArchiverException( "Deployment descriptor: " + deploymentDescriptor + " does not exist." ); } addFile( descr, "W...
class class_name[name] begin[{] method[setWebxml, return_type[void], modifier[public], parameter[descr]] begin[{] assign[member[.deploymentDescriptor], member[.descr]] if[call[deploymentDescriptor.exists, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(...
Keyword[public] Keyword[void] identifier[setWebxml] operator[SEP] identifier[File] identifier[descr] operator[SEP] Keyword[throws] identifier[ArchiverException] { identifier[deploymentDescriptor] operator[=] identifier[descr] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[deploymentDescriptor] op...
void putEntityManager(EntityManager entityManager) { if (entityManager != null && entityManager.isOpen()) { boolean addToPool = false; entityManager.clear(); synchronized (this) { if (ivPoolSize < ivPoolCapacity) { ++ivPoolSize; ...
class class_name[name] begin[{] method[putEntityManager, return_type[void], modifier[default], parameter[entityManager]] begin[{] if[binary_operation[binary_operation[member[.entityManager], !=, literal[null]], &&, call[entityManager.isOpen, parameter[]]]] begin[{] local_variable[ty...
Keyword[void] identifier[putEntityManager] operator[SEP] identifier[EntityManager] identifier[entityManager] operator[SEP] { Keyword[if] operator[SEP] identifier[entityManager] operator[!=] Other[null] operator[&&] identifier[entityManager] operator[SEP] identifier[isOpen] operator[SEP] operator[SEP] operator[SE...
@Override public void run () { boolean lastAcquireFailed = false; while (!m_aHalted.get ()) { try { // check if we're supposed to pause... synchronized (m_aSigLock) { while (m_bPaused && !m_aHalted.get ()) { try { ...
class class_name[name] begin[{] method[run, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[boolean], lastAcquireFailed] while[call[m_aHalted.get, parameter[]]] begin[{] TryStatement(block=[SynchronizedStatement(block=[WhileStatement(body=Block...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[boolean] identifier[lastAcquireFailed] operator[=] literal[boolean] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[m_aHalted] operator[SEP] identifier[get] operator[SEP] opera...
public <T> DomainObjectMatch<T> AS(Class<T> domainObjectType) { CollectExpression ce = (CollectExpression)this.astObject; DomainObjectMatch<T> ret =APIAccess.createDomainObjectMatch(domainObjectType, ce.getQueryExecutor().getDomainObjectMatches().size(), ce.getQueryExecutor().getMappingInfo()); ce.setEnd(...
class class_name[name] begin[{] method[AS, return_type[type[DomainObjectMatch]], modifier[public], parameter[domainObjectType]] begin[{] local_variable[type[CollectExpression], ce] local_variable[type[DomainObjectMatch], ret] call[ce.setEnd, parameter[member[.ret]]] ...
Keyword[public] operator[<] identifier[T] operator[>] identifier[DomainObjectMatch] operator[<] identifier[T] operator[>] identifier[AS] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[domainObjectType] operator[SEP] { identifier[CollectExpression] identifier[ce] operator[=] oper...
public static void annotateChunkText(CoreMap chunk, CoreMap origAnnotation) { String annoText = origAnnotation.get(CoreAnnotations.TextAnnotation.class); Integer annoBeginCharOffset = origAnnotation.get(CoreAnnotations.CharacterOffsetBeginAnnotation.class); if (annoBeginCharOffset == null) { annoBegin...
class class_name[name] begin[{] method[annotateChunkText, return_type[void], modifier[public static], parameter[chunk, origAnnotation]] begin[{] local_variable[type[String], annoText] local_variable[type[Integer], annoBeginCharOffset] if[binary_operation[member[.annoBeginCharOff...
Keyword[public] Keyword[static] Keyword[void] identifier[annotateChunkText] operator[SEP] identifier[CoreMap] identifier[chunk] , identifier[CoreMap] identifier[origAnnotation] operator[SEP] { identifier[String] identifier[annoText] operator[=] identifier[origAnnotation] operator[SEP] identifier[get] operator[S...
public CompletableFuture<Void> close() { if (client == null) { return CompletableFuture.completedFuture(null); } CompletableFuture<Void> future = new CompletableFuture<>(); client.stop().whenComplete((clientResult, clientError) -> { if (server != null) { server.stop().whenComplete((...
class class_name[name] begin[{] method[close, return_type[type[CompletableFuture]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.client], ==, literal[null]]] begin[{] return[call[CompletableFuture.completedFuture, parameter[literal[null]]]] else begin[...
Keyword[public] identifier[CompletableFuture] operator[<] identifier[Void] operator[>] identifier[close] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[client] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[CompletableFuture] operator[SEP] identifier[completedF...
private <T extends Request, U> void sendRequest(T request, BiFunction<Request, Connection, CompletableFuture<U>> sender, Connection connection, Throwable error, CompletableFuture<U> future) { if (open) { if (error == null) { if (connection != null) { LOGGER.trace("{} - Sending {}", id, reque...
class class_name[name] begin[{] method[sendRequest, return_type[void], modifier[private], parameter[request, sender, connection, error, future]] begin[{] if[member[.open]] begin[{] if[binary_operation[member[.error], ==, literal[null]]] begin[{] ...
Keyword[private] operator[<] identifier[T] Keyword[extends] identifier[Request] , identifier[U] operator[>] Keyword[void] identifier[sendRequest] operator[SEP] identifier[T] identifier[request] , identifier[BiFunction] operator[<] identifier[Request] , identifier[Connection] , identifier[CompletableFuture] operator...
private static void appendUNTIL(Writer writer, String until) throws IOException { if (until != null) { writer.write(SEMICOLON); writer.write(ICAL_UNTIL); writer.write(EQUALS_SIGN); writer.write(until); } }
class class_name[name] begin[{] method[appendUNTIL, return_type[void], modifier[private static], parameter[writer, until]] begin[{] if[binary_operation[member[.until], !=, literal[null]]] begin[{] call[writer.write, parameter[member[.SEMICOLON]]] ...
Keyword[private] Keyword[static] Keyword[void] identifier[appendUNTIL] operator[SEP] identifier[Writer] identifier[writer] , identifier[String] identifier[until] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[until] operator[!=] Other[null] operator[SEP] { ...
private Locale getUserLocale(IPerson user) { // get user locale Locale[] locales = localeStore.getUserLocales(user); LocaleManager localeManager = localeManagerFactory.createLocaleManager(user, Arrays.asList(locales)); return localeManager.getLocales().get(0); }
class class_name[name] begin[{] method[getUserLocale, return_type[type[Locale]], modifier[private], parameter[user]] begin[{] local_variable[type[Locale], locales] local_variable[type[LocaleManager], localeManager] return[call[localeManager.getLocales, parameter[]]] end[}] END[}]
Keyword[private] identifier[Locale] identifier[getUserLocale] operator[SEP] identifier[IPerson] identifier[user] operator[SEP] { identifier[Locale] operator[SEP] operator[SEP] identifier[locales] operator[=] identifier[localeStore] operator[SEP] identifier[getUserLocales] operator[SEP] identifier[user] operator[...
public Boolean getMinifyResources() { if(getDevelopment()) { return minifyResources != null ? minifyResources : false; } else { return minifyResources != null ? minifyResources : true; } }
class class_name[name] begin[{] method[getMinifyResources, return_type[type[Boolean]], modifier[public], parameter[]] begin[{] if[call[.getDevelopment, parameter[]]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=minifyResources, postfix_...
Keyword[public] identifier[Boolean] identifier[getMinifyResources] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[getDevelopment] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[minifyResources] operator[!=] Other[null] operator[?] identifier[minifyResources]...
public BigFloat root(BigFloat y) { if (y.isSpecial()) return y; Context c = max(context, y.context); return c.valueOf(BigDecimalMath.root(this.value, y.value, c.mathContext)); }
class class_name[name] begin[{] method[root, return_type[type[BigFloat]], modifier[public], parameter[y]] begin[{] if[call[y.isSpecial, parameter[]]] begin[{] return[member[.y]] else begin[{] None end[}] local_variable[type[Context], c] return[call[c.valueOf, par...
Keyword[public] identifier[BigFloat] identifier[root] operator[SEP] identifier[BigFloat] identifier[y] operator[SEP] { Keyword[if] operator[SEP] identifier[y] operator[SEP] identifier[isSpecial] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[y] operator[SEP] identifier[Context] identifier[c...
public synchronized OptionalThing<LaJobHistory> find(String historyKey) { final LaJobHistory found = historyMap.get(historyKey); return OptionalThing.ofNullable(found, () -> { final ExceptionMessageBuilder br = new ExceptionMessageBuilder(); br.addNotice("Not found the job histor...
class class_name[name] begin[{] method[find, return_type[type[OptionalThing]], modifier[synchronized public], parameter[historyKey]] begin[{] local_variable[type[LaJobHistory], found] return[call[OptionalThing.ofNullable, parameter[member[.found], LambdaExpression(body=[LocalVariableDeclaration...
Keyword[public] Keyword[synchronized] identifier[OptionalThing] operator[<] identifier[LaJobHistory] operator[>] identifier[find] operator[SEP] identifier[String] identifier[historyKey] operator[SEP] { Keyword[final] identifier[LaJobHistory] identifier[found] operator[=] identifier[historyMap] operator[SEP] iden...
public static void setDefaultParseExceptionHandler (@Nonnull final ICSSParseExceptionCallback aDefaultParseExceptionHandler) { ValueEnforcer.notNull (aDefaultParseExceptionHandler, "DefaultParseExceptionHandler"); s_aRWLock.writeLocked ( () -> s_aDefaultParseExceptionHandler = aDefaultParseExceptionHandler);...
class class_name[name] begin[{] method[setDefaultParseExceptionHandler, return_type[void], modifier[public static], parameter[aDefaultParseExceptionHandler]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aDefaultParseExceptionHandler], literal["DefaultParseExceptionHandler"]]] ...
Keyword[public] Keyword[static] Keyword[void] identifier[setDefaultParseExceptionHandler] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[ICSSParseExceptionCallback] identifier[aDefaultParseExceptionHandler] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] ope...
public static void wapPay(HttpServletResponse response, AlipayTradeWapPayModel model, String returnUrl, String notifyUrl) throws AlipayApiException, IOException { String form = wapPayStr(response, model, returnUrl, notifyUrl); HttpServletResponse httpResponse = response; httpResponse.setContentType("text/html;...
class class_name[name] begin[{] method[wapPay, return_type[void], modifier[public static], parameter[response, model, returnUrl, notifyUrl]] begin[{] local_variable[type[String], form] local_variable[type[HttpServletResponse], httpResponse] call[httpResponse.setContentType, para...
Keyword[public] Keyword[static] Keyword[void] identifier[wapPay] operator[SEP] identifier[HttpServletResponse] identifier[response] , identifier[AlipayTradeWapPayModel] identifier[model] , identifier[String] identifier[returnUrl] , identifier[String] identifier[notifyUrl] operator[SEP] Keyword[throws] identifier[Ali...
public static void runExample( AdManagerServices adManagerServices, AdManagerSession session, long lineItemId) throws RemoteException { // Get the LineItemCreativeAssociationService. LineItemCreativeAssociationServiceInterface licaService = adManagerServices.get(session, LineItemCreativeAsso...
class class_name[name] begin[{] method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session, lineItemId]] begin[{] local_variable[type[LineItemCreativeAssociationServiceInterface], licaService] local_variable[type[StatementBuilder], statementBuilder] ...
Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] , Keyword[long] identifier[lineItemId] operator[SEP] Keyword[throws] identifier[RemoteException] { identifier[LineIte...
public void setParentHyperParameterTuningJobs(java.util.Collection<ParentHyperParameterTuningJob> parentHyperParameterTuningJobs) { if (parentHyperParameterTuningJobs == null) { this.parentHyperParameterTuningJobs = null; return; } this.parentHyperParameterTuningJobs = n...
class class_name[name] begin[{] method[setParentHyperParameterTuningJobs, return_type[void], modifier[public], parameter[parentHyperParameterTuningJobs]] begin[{] if[binary_operation[member[.parentHyperParameterTuningJobs], ==, literal[null]]] begin[{] assign[THIS[member...
Keyword[public] Keyword[void] identifier[setParentHyperParameterTuningJobs] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[ParentHyperParameterTuningJob] operator[>] identifier[parentHyperParameterTuningJobs] operator[SEP] { Keyword[if] o...
private void loadXmlConfiguration(URL url, I_CmsXmlConfiguration configuration) throws SAXException, IOException { // generate the file URL for the XML input URL fileUrl = new URL(url, configuration.getXmlFileName()); CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_LOAD_CONFIG_XML...
class class_name[name] begin[{] method[loadXmlConfiguration, return_type[void], modifier[private], parameter[url, configuration]] begin[{] local_variable[type[URL], fileUrl] call[CmsLog.INIT.info, parameter[call[Messages.get, parameter[]]]] local_variable[type[boolean], hasTrans...
Keyword[private] Keyword[void] identifier[loadXmlConfiguration] operator[SEP] identifier[URL] identifier[url] , identifier[I_CmsXmlConfiguration] identifier[configuration] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] { identifier[URL] identifier[fileUrl] operator[=] Keyword[...
@SuppressWarnings({"unchecked"}) public final ArrayList<ConstraintViolation<?>> getValidationErrorSet(final Object pclass) { return new ArrayList<>(validationErrorSet.stream() .map(violation -> ConstraintViolationImpl.forBeanValidation( // violation.getMessageTemplate(), // Collect...
class class_name[name] begin[{] method[getValidationErrorSet, return_type[type[ArrayList]], modifier[final public], parameter[pclass]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=stream, postfix_operators=[], prefix_operators=[], qualifier=validationErrorSet, selectors...
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] } operator[SEP] Keyword[public] Keyword[final] identifier[ArrayList] operator[<] identifier[ConstraintViolation] operator[<] operator[?] operator[>] operator[>] identifier[getValidationErrorSet] operator[SEP] Keyword[final] identifier[...
private synchronized void createReconstituteThreadPool() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createReconstituteThreadPool"); if (_reconstituteThreadpool == null) { int maxThreadPoolSize; if (messageProcesso...
class class_name[name] begin[{] method[createReconstituteThreadPool, return_type[void], modifier[synchronized private], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.ent...
Keyword[private] Keyword[synchronized] Keyword[void] identifier[createReconstituteThreadPool] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEn...
private synchronized Vector resolveAllSubordinateCatalogs(int entityType, String entityName, String publicId, String systemId) throws MalformedURLException, IOException { Vector resolutions = new Vector(); for (int catPos = 0; catPos < catalogs.size(); catPos++) { Resolver c =...
class class_name[name] begin[{] method[resolveAllSubordinateCatalogs, return_type[type[Vector]], modifier[synchronized private], parameter[entityType, entityName, publicId, systemId]] begin[{] local_variable[type[Vector], resolutions] ForStatement(body=BlockStatement(label=None, statements=[Loc...
Keyword[private] Keyword[synchronized] identifier[Vector] identifier[resolveAllSubordinateCatalogs] operator[SEP] Keyword[int] identifier[entityType] , identifier[String] identifier[entityName] , identifier[String] identifier[publicId] , identifier[String] identifier[systemId] operator[SEP] Keyword[throws] identifie...
private JDefinedClass createClass(String nodeName, JsonNode node, JPackage _package) throws ClassAlreadyExistsException { JDefinedClass newType; Annotator annotator = ruleFactory.getAnnotator(); try { if (node.has("existingJavaType")) { String fqn = substringBefore...
class class_name[name] begin[{] method[createClass, return_type[type[JDefinedClass]], modifier[private], parameter[nodeName, node, _package]] begin[{] local_variable[type[JDefinedClass], newType] local_variable[type[Annotator], annotator] TryStatement(block=[IfStatement(condition=Method...
Keyword[private] identifier[JDefinedClass] identifier[createClass] operator[SEP] identifier[String] identifier[nodeName] , identifier[JsonNode] identifier[node] , identifier[JPackage] identifier[_package] operator[SEP] Keyword[throws] identifier[ClassAlreadyExistsException] { identifier[JDefinedClass] identifi...
public ScanSpecPathMatch dirWhitelistMatchStatus(final String relativePath) { // In blacklisted path if (pathWhiteBlackList.isBlacklisted(relativePath)) { // The directory is blacklisted. return ScanSpecPathMatch.HAS_BLACKLISTED_PATH_PREFIX; } if (pathPrefixWhiteB...
class class_name[name] begin[{] method[dirWhitelistMatchStatus, return_type[type[ScanSpecPathMatch]], modifier[public], parameter[relativePath]] begin[{] if[call[pathWhiteBlackList.isBlacklisted, parameter[member[.relativePath]]]] begin[{] return[member[ScanSpecPathMatch.HAS_BLACKLI...
Keyword[public] identifier[ScanSpecPathMatch] identifier[dirWhitelistMatchStatus] operator[SEP] Keyword[final] identifier[String] identifier[relativePath] operator[SEP] { Keyword[if] operator[SEP] identifier[pathWhiteBlackList] operator[SEP] identifier[isBlacklisted] operator[SEP] identifier[relativePath] operat...
public boolean rename(Path src, Path dst) throws IOException { return dfs.rename(getPathName(src), getPathName(dst)); }
class class_name[name] begin[{] method[rename, return_type[type[boolean]], modifier[public], parameter[src, dst]] begin[{] return[call[dfs.rename, parameter[call[.getPathName, parameter[member[.src]]], call[.getPathName, parameter[member[.dst]]]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[rename] operator[SEP] identifier[Path] identifier[src] , identifier[Path] identifier[dst] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[dfs] operator[SEP] identifier[rename] operator[SEP] identifier[getPathName] operator[SEP] ident...
public FessMessages addErrorsDocumentNotFound(String property, String arg0) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_document_not_found, arg0)); return this; }
class class_name[name] begin[{] method[addErrorsDocumentNotFound, return_type[type[FessMessages]], modifier[public], parameter[property, arg0]] begin[{] call[.assertPropertyNotNull, parameter[member[.property]]] call[.add, parameter[member[.property], ClassCreator(arguments=[Mem...
Keyword[public] identifier[FessMessages] identifier[addErrorsDocumentNotFound] operator[SEP] identifier[String] identifier[property] , identifier[String] identifier[arg0] operator[SEP] { identifier[assertPropertyNotNull] operator[SEP] identifier[property] operator[SEP] operator[SEP] identifier[add] operator[SEP...
@Override public void config(Config config) throws ConfigException, IOException { for (Config repositorySection : config.findChildren("repository")) { // view manager configuration section is named <views> // a <views> configuration section has one or many <repository> child sections // scan every repo...
class class_name[name] begin[{] method[config, return_type[void], modifier[public], parameter[config]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Litera...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[config] operator[SEP] identifier[Config] identifier[config] operator[SEP] Keyword[throws] identifier[ConfigException] , identifier[IOException] { Keyword[for] operator[SEP] identifier[Config] identifier[repositorySection] operator[:] i...
public static <E> Set<E> newSetFromMap(Map<E, Boolean> m) { return new SetFromMap<>(m); }
class class_name[name] begin[{] method[newSetFromMap, return_type[type[Set]], modifier[public static], parameter[m]] begin[{] return[ClassCreator(arguments=[MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postf...
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Set] operator[<] identifier[E] operator[>] identifier[newSetFromMap] operator[SEP] identifier[Map] operator[<] identifier[E] , identifier[Boolean] operator[>] identifier[m] operator[SEP] { Keyword[return] Keyword[new] identifier[Se...
@SuppressWarnings("unchecked") public static List<IdName> getSelectValues(Connection con, String select, boolean sort, byte orderBy) throws SQLException, DialectException { List<IdName> values = new ArrayList<IdName>(); ResultSet rs = null; Statement stmt = null; Dialect...
class class_name[name] begin[{] method[getSelectValues, return_type[type[List]], modifier[public static], parameter[con, select, sort, orderBy]] begin[{] local_variable[type[List], values] local_variable[type[ResultSet], rs] local_variable[type[Statement], stmt] local_variable[t...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[List] operator[<] identifier[IdName] operator[>] identifier[getSelectValues] operator[SEP] identifier[Connection] identifier[con] , identifier[String] identifier[select] , Keyword[boolean]...
public synchronized int getPrimaryMasterIndex(int timeoutMs) throws TimeoutException, InterruptedException { final FileSystem fs = getFileSystemClient(); final MasterInquireClient inquireClient = getMasterInquireClient(); CommonUtils.waitFor("a primary master to be serving", () -> { try { ...
class class_name[name] begin[{] method[getPrimaryMasterIndex, return_type[type[int]], modifier[synchronized public], parameter[timeoutMs]] begin[{] local_variable[type[FileSystem], fs] local_variable[type[MasterInquireClient], inquireClient] call[CommonUtils.waitFor, parameter[l...
Keyword[public] Keyword[synchronized] Keyword[int] identifier[getPrimaryMasterIndex] operator[SEP] Keyword[int] identifier[timeoutMs] operator[SEP] Keyword[throws] identifier[TimeoutException] , identifier[InterruptedException] { Keyword[final] identifier[FileSystem] identifier[fs] operator[=] identifier[getFil...
public <T> AbstractListAssert<?, ? extends List<? extends T>, T, ? extends AbstractAssert<?, T>> jsonPathAsListOf(String path, Class<T> type) { return Assertions.assertThat(actual.read(path, new TypeRef<List<T>>() { })); }
class class_name[name] begin[{] method[jsonPathAsListOf, return_type[type[AbstractListAssert]], modifier[public], parameter[path, type]] begin[{] return[call[Assertions.assertThat, parameter[call[actual.read, parameter[member[.path], ClassCreator(arguments=[], body=[], constructor_type_arguments=None, ...
Keyword[public] operator[<] identifier[T] operator[>] identifier[AbstractListAssert] operator[<] operator[?] , operator[?] Keyword[extends] identifier[List] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] , identifier[T] , operator[?] Keyword[extends] identifier[AbstractAssert] operator[<] operato...
public void setHandling( PomProperty<?> property, ElementHandling handling ) { this.name2handlingMap.put( property.getName(), handling ); }
class class_name[name] begin[{] method[setHandling, return_type[void], modifier[public], parameter[property, handling]] begin[{] THIS[member[None.name2handlingMap]call[None.put, parameter[call[property.getName, parameter[]], member[.handling]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setHandling] operator[SEP] identifier[PomProperty] operator[<] operator[?] operator[>] identifier[property] , identifier[ElementHandling] identifier[handling] operator[SEP] { Keyword[this] operator[SEP] identifier[name2handlingMap] operator[SEP] identifier[put] operator[...
public static void byColumn(Matrix m) { for (int i = 0; i < m.columns(); ++i) { double colSum = 0; for (int j = 0; j < m.rows(); ++j) colSum += m.get(j,i); // Skip columns whose sume is zero. if (colSum == 0) continue; ...
class class_name[name] begin[{] method[byColumn, return_type[void], modifier[public static], parameter[m]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], ...
Keyword[public] Keyword[static] Keyword[void] identifier[byColumn] operator[SEP] identifier[Matrix] identifier[m] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[m] operator[SEP] identifier[columns] operator[SEP] operat...
protected void checkExtendsAction(ComponentDef componentDef) { final Class<?> componentType = componentDef.getComponentClass(); if (LastaAction.class.isAssignableFrom(componentType)) { throwJobExtendsActionException(componentType); } }
class class_name[name] begin[{] method[checkExtendsAction, return_type[void], modifier[protected], parameter[componentDef]] begin[{] local_variable[type[Class], componentType] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=...
Keyword[protected] Keyword[void] identifier[checkExtendsAction] operator[SEP] identifier[ComponentDef] identifier[componentDef] operator[SEP] { Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[componentType] operator[=] identifier[componentDef] operator[SEP] identifier[getComponent...
@Override public void closeOperation(OperationHandle opHandle) throws HiveSQLException { try { TCloseOperationReq req = new TCloseOperationReq(opHandle.toTOperationHandle()); TCloseOperationResp resp = cliService.CloseOperation(req); checkStatus(resp.getStatus()); } catch (HiveSQLExce...
class class_name[name] begin[{] method[closeOperation, return_type[void], modifier[public], parameter[opHandle]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[closeOperation] operator[SEP] identifier[OperationHandle] identifier[opHandle] operator[SEP] Keyword[throws] identifier[HiveSQLException] { Keyword[try] { identifier[TCloseOperationReq] identifier[req] operator[=] Keyword[new]...
public Vector3f div(float x, float y, float z) { return div(x, y, z, thisOrNew()); }
class class_name[name] begin[{] method[div, return_type[type[Vector3f]], modifier[public], parameter[x, y, z]] begin[{] return[call[.div, parameter[member[.x], member[.y], member[.z], call[.thisOrNew, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[Vector3f] identifier[div] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] , Keyword[float] identifier[z] operator[SEP] { Keyword[return] identifier[div] operator[SEP] identifier[x] , identifier[y] , identifier[z] , identifier[thisOrNew] operator[SEP] oper...
static Class<?> findClassFromClassLoaders(final String className, final Iterable<ClassLoader> classLoaders) throws ClassNotFoundException, IllegalArgumentException { // Precondition checks assert className != null && className.length() > 0 : "Class Name must be specified"; assert classLo...
class class_name[name] begin[{] method[findClassFromClassLoaders, return_type[type[Class]], modifier[static], parameter[className, classLoaders]] begin[{] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=className, postfix_operators=[], prefix_operators...
Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[findClassFromClassLoaders] operator[SEP] Keyword[final] identifier[String] identifier[className] , Keyword[final] identifier[Iterable] operator[<] identifier[ClassLoader] operator[>] identifier[classLoaders] operator[SEP] Keyword[throws] ...
private static CloseableHttpClient sslClient() { try { // 在调用SSL之前需要重写验证方法,取消检测SSL X509TrustManager trustManager = new X509TrustManager() { @Override public X509Certificate[] getAcceptedIssuers() { return null; } @Overri...
class class_name[name] begin[{] method[sslClient, return_type[type[CloseableHttpClient]], modifier[private static], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=[MethodDeclar...
Keyword[private] Keyword[static] identifier[CloseableHttpClient] identifier[sslClient] operator[SEP] operator[SEP] { Keyword[try] { identifier[X509TrustManager] identifier[trustManager] operator[=] Keyword[new] identifier[X509TrustManager] operator[SEP] operator[SEP] { annotation[@] ide...
public static double getCoverage(List<MathNode> refLeafs, List<MathNode> compLeafs) { if (compLeafs.size() == 0) { return 1.; } HashMultiset<MathNode> tmp = HashMultiset.create(); tmp.addAll(compLeafs); tmp.removeAll(refLeafs); return 1 - (double) tmp.size() /...
class class_name[name] begin[{] method[getCoverage, return_type[type[double]], modifier[public static], parameter[refLeafs, compLeafs]] begin[{] if[binary_operation[call[compLeafs.size, parameter[]], ==, literal[0]]] begin[{] return[literal[1.]] else begin[{] None en...
Keyword[public] Keyword[static] Keyword[double] identifier[getCoverage] operator[SEP] identifier[List] operator[<] identifier[MathNode] operator[>] identifier[refLeafs] , identifier[List] operator[<] identifier[MathNode] operator[>] identifier[compLeafs] operator[SEP] { Keyword[if] operator[SEP] identifier[comp...
public static Pace pace(final Number value, final TimeMillis interval) { return pace(value, interval.millis()); }
class class_name[name] begin[{] method[pace, return_type[type[Pace]], modifier[public static], parameter[value, interval]] begin[{] return[call[.pace, parameter[member[.value], call[interval.millis, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Pace] identifier[pace] operator[SEP] Keyword[final] identifier[Number] identifier[value] , Keyword[final] identifier[TimeMillis] identifier[interval] operator[SEP] { Keyword[return] identifier[pace] operator[SEP] identifier[value] , identifier[interval] operator[SEP] ...
public Iterator getIteratorByQuery(Query query) throws PersistenceBrokerException { Class itemClass = query.getSearchClass(); ClassDescriptor cld = getClassDescriptor(itemClass); return getIteratorFromQuery(query, cld); }
class class_name[name] begin[{] method[getIteratorByQuery, return_type[type[Iterator]], modifier[public], parameter[query]] begin[{] local_variable[type[Class], itemClass] local_variable[type[ClassDescriptor], cld] return[call[.getIteratorFromQuery, parameter[member[.query], member[.cld...
Keyword[public] identifier[Iterator] identifier[getIteratorByQuery] operator[SEP] identifier[Query] identifier[query] operator[SEP] Keyword[throws] identifier[PersistenceBrokerException] { identifier[Class] identifier[itemClass] operator[=] identifier[query] operator[SEP] identifier[getSearchClass] operator[SEP]...
public void marshall(GetRecordsRequest getRecordsRequest, ProtocolMarshaller protocolMarshaller) { if (getRecordsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getRecordsRequest.getShardIt...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[getRecordsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.getRecordsRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(pos...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetRecordsRequest] identifier[getRecordsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[getRecordsRequest] operator[==] Other[null] operator[SEP] { ...
public void triggerRefreshTo(long version) { if (announcementWatcher != null) throw new UnsupportedOperationException("Cannot trigger refresh to specified version when a HollowConsumer.AnnouncementWatcher is present"); try { updater.updateTo(version); } catch (Error | Ru...
class class_name[name] begin[{] method[triggerRefreshTo, return_type[void], modifier[public], parameter[version]] begin[{] if[binary_operation[member[.announcementWatcher], !=, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operat...
Keyword[public] Keyword[void] identifier[triggerRefreshTo] operator[SEP] Keyword[long] identifier[version] operator[SEP] { Keyword[if] operator[SEP] identifier[announcementWatcher] operator[!=] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[S...
<T> List<T> add(List<T> list, T obj) { if (list == null) { list = new LinkedList<>(); } list.add(obj); return list; }
class class_name[name] begin[{] method[add, return_type[type[List]], modifier[default], parameter[list, obj]] begin[{] if[binary_operation[member[.list], ==, literal[null]]] begin[{] assign[member[.list], ClassCreator(arguments=[], body=None, constructor_type_arguments=N...
operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[add] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[list] , identifier[T] identifier[obj] operator[SEP] { Keyword[if] operator[SEP] identifier[list] operator[==] Other[null] o...
@Override public void inject(Class<?> klass) throws DataException, ServiceException { // loads function def table from annotated class ScriptExtensions extensions = new ScriptProxy(klass); // load func def table and set parent to the default script context ScriptContext defaultScriptContext = (Scrip...
class class_name[name] begin[{] method[inject, return_type[void], modifier[public], parameter[klass]] begin[{] local_variable[type[ScriptExtensions], extensions] local_variable[type[ScriptContext], defaultScriptContext] call[extensions.load, parameter[member[.defaultScriptContex...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[inject] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[klass] operator[SEP] Keyword[throws] identifier[DataException] , identifier[ServiceException] { identifier[ScriptExtensions] identifier[extensions] o...
public boolean stopLoadingExcept( URL exemptionURL ) { if ( imageUrl == null ) return false; // has never been used yet if ( pictureStatusCode != LOADING ) { Tools.log( "SourcePicture.stopLoadingExcept: called but pointless since image is not LOADING: " + imageUrl.toString()); return false; } if ...
class class_name[name] begin[{] method[stopLoadingExcept, return_type[type[boolean]], modifier[public], parameter[exemptionURL]] begin[{] if[binary_operation[member[.imageUrl], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binar...
Keyword[public] Keyword[boolean] identifier[stopLoadingExcept] operator[SEP] identifier[URL] identifier[exemptionURL] operator[SEP] { Keyword[if] operator[SEP] identifier[imageUrl] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[pictureSt...
public ServiceFuture<ManagedBackupShortTermRetentionPolicyInner> beginUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, Integer retentionDays, final ServiceCallback<ManagedBackupShortTermRetentionPolicyInner> serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWi...
class class_name[name] begin[{] method[beginUpdateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, managedInstanceName, databaseName, retentionDays, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.beginUpdateWithServiceResponseAs...
Keyword[public] identifier[ServiceFuture] operator[<] identifier[ManagedBackupShortTermRetentionPolicyInner] operator[>] identifier[beginUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[managedInstanceName] , identifier[String] identifier[databaseName] , ide...
@Override public void endElement(String uri, String name, String qName) { setContent(content.toString().trim()); content = new StringBuilder(); inside = ""; if (qName.equals("function")) endFunction(); else if (qName.equals("argument")) endArg(); else if (qName.equals("return")) endReturn(); else if (qName.e...
class class_name[name] begin[{] method[endElement, return_type[void], modifier[public], parameter[uri, name, qName]] begin[{] call[.setContent, parameter[call[content.toString, parameter[]]]] assign[member[.content], ClassCreator(arguments=[], body=None, constructor_type_argumen...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[endElement] operator[SEP] identifier[String] identifier[uri] , identifier[String] identifier[name] , identifier[String] identifier[qName] operator[SEP] { identifier[setContent] operator[SEP] identifier[content] operator[SEP] identifier...
private Collection<SSTableReader> doAntiCompaction(ColumnFamilyStore cfs, Collection<Range<Token>> ranges, Collection<SSTableReader> repairedSSTables, long repairedAt) { List<SSTableReader> anticompactedSSTables = new ArrayList<>(); int repairedKeyCount = 0; int unrepairedKeyCount = 0; ...
class class_name[name] begin[{] method[doAntiCompaction, return_type[type[Collection]], modifier[private], parameter[cfs, ranges, repairedSSTables, repairedAt]] begin[{] local_variable[type[List], anticompactedSSTables] local_variable[type[int], repairedKeyCount] local_variable[type[int...
Keyword[private] identifier[Collection] operator[<] identifier[SSTableReader] operator[>] identifier[doAntiCompaction] operator[SEP] identifier[ColumnFamilyStore] identifier[cfs] , identifier[Collection] operator[<] identifier[Range] operator[<] identifier[Token] operator[>] operator[>] identifier[ranges] , identifie...
private void parseWriteTimeout(Map<Object, Object> props) { Object value = props.get(HttpConfigConstants.PROPNAME_WRITE_TIMEOUT); if (null != value) { try { this.writeTimeout = TIMEOUT_MODIFIER * minLimit(convertInteger(value), HttpConfigConstants.MIN_TIMEOUT); ...
class class_name[name] begin[{] method[parseWriteTimeout, return_type[void], modifier[private], parameter[props]] begin[{] local_variable[type[Object], value] if[binary_operation[literal[null], !=, member[.value]]] begin[{] TryStatement(block=[StatementExpression(expression=...
Keyword[private] Keyword[void] identifier[parseWriteTimeout] operator[SEP] identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[props] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[props] operator[SEP] identifier[get] operator[SEP] identifier[H...
private Object valueOf(String columnName, Object value) { java.lang.reflect.Field field; try { field = tableObject.getDeclaredField(columnName); } catch (NoSuchFieldException e) { throw new RuntimeException( String.format("%s isEqualTo not a field found in %s", columnName, tableObject)...
class class_name[name] begin[{] method[valueOf, return_type[type[Object]], modifier[private], parameter[columnName, value]] begin[{] local_variable[type[java], field] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=field, postfix_operators=[], pr...
Keyword[private] identifier[Object] identifier[valueOf] operator[SEP] identifier[String] identifier[columnName] , identifier[Object] identifier[value] operator[SEP] { identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[reflect] operator[SEP] identifier[Field] identifier[field] operator[SEP]...
public void addMapDataStore(MapDataStore mapDataStore, boolean useStartZoomLevel, boolean useStartPosition) { if (this.mapDatabases.contains(mapDataStore)) { throw new IllegalArgumentException("Duplicate map database"); } this.mapDatabases.add(mapDataStore); if (useStartZoomL...
class class_name[name] begin[{] method[addMapDataStore, return_type[void], modifier[public], parameter[mapDataStore, useStartZoomLevel, useStartPosition]] begin[{] if[THIS[member[None.mapDatabases]call[None.contains, parameter[member[.mapDataStore]]]]] begin[{] ThrowStatement(expres...
Keyword[public] Keyword[void] identifier[addMapDataStore] operator[SEP] identifier[MapDataStore] identifier[mapDataStore] , Keyword[boolean] identifier[useStartZoomLevel] , Keyword[boolean] identifier[useStartPosition] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[mapDatabase...
@Override public UserCustomRow getRow(int[] columnTypes, Object[] values) { return new UserCustomRow(getTable(), columnTypes, values); }
class class_name[name] begin[{] method[getRow, return_type[type[UserCustomRow]], modifier[public], parameter[columnTypes, values]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=...
annotation[@] identifier[Override] Keyword[public] identifier[UserCustomRow] identifier[getRow] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[columnTypes] , identifier[Object] operator[SEP] operator[SEP] identifier[values] operator[SEP] { Keyword[return] Keyword[new] identifier[UserCustomRow...
public static void swap(short[] shortArray, int index1, int index2) { TrivialSwap.swap(shortArray, index1, shortArray, index2); }
class class_name[name] begin[{] method[swap, return_type[void], modifier[public static], parameter[shortArray, index1, index2]] begin[{] call[TrivialSwap.swap, parameter[member[.shortArray], member[.index1], member[.shortArray], member[.index2]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[swap] operator[SEP] Keyword[short] operator[SEP] operator[SEP] identifier[shortArray] , Keyword[int] identifier[index1] , Keyword[int] identifier[index2] operator[SEP] { identifier[TrivialSwap] operator[SEP] identifier[swap] operator[SEP] identifier[shor...
public boolean allAreFinished(final Set<ProcessorGraphNode<?, ?>> processorNodes) { this.processorLock.lock(); try { for (ProcessorGraphNode<?, ?> node: processorNodes) { if (!isFinished(node)) { return false; } } re...
class class_name[name] begin[{] method[allAreFinished, return_type[type[boolean]], modifier[public], parameter[processorNodes]] begin[{] THIS[member[None.processorLock]call[None.lock, parameter[]]] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(...
Keyword[public] Keyword[boolean] identifier[allAreFinished] operator[SEP] Keyword[final] identifier[Set] operator[<] identifier[ProcessorGraphNode] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[processorNodes] operator[SEP] { Keyword[this] operator[SEP] identifier[processorLock] opera...
public String getDriverClassName() { final String driverClassName = basicJdbcConfiguration.getConfiguredDriverClassName(); if (calculatedDriverClassName == null || StringUtils.hasText(driverClassName)) { if (StringUtils.hasText(driverClassName)) { if (!driverClassIsPresent(dr...
class class_name[name] begin[{] method[getDriverClassName, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[String], driverClassName] if[binary_operation[binary_operation[member[.calculatedDriverClassName], ==, literal[null]], ||, call[StringUtils.h...
Keyword[public] identifier[String] identifier[getDriverClassName] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[driverClassName] operator[=] identifier[basicJdbcConfiguration] operator[SEP] identifier[getConfiguredDriverClassName] operator[SEP] operator[SEP] operator[SEP] Keyword[if]...
public void marshall(CancelJobRequest cancelJobRequest, ProtocolMarshaller protocolMarshaller) { if (cancelJobRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(cancelJobRequest.getJobId(), JO...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[cancelJobRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.cancelJobRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postf...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CancelJobRequest] identifier[cancelJobRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[cancelJobRequest] operator[==] Other[null] operator[SEP] { Ke...
@Override public int read() throws IOException { synchronized ( lock ) { ensureOpen(); if ( next >= length ) return -1; return seq.charAt( next++ ); } }
class class_name[name] begin[{] method[read, return_type[type[int]], modifier[public], parameter[]] begin[{] SYNCHRONIZED[member[.lock]] BEGIN[{] call[.ensureOpen, parameter[]] if[binary_operation[member[.next], >=, member[.length]]] begin[{] retu...
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[read] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] { identifier[ensureOpen] operator[SEP] operator[SEP] operator[SEP] Keyword[if] opera...
@Override public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { // check the error status Integer errorStatus = (Integer)req.getAttribute(CmsJspStatusBean.ERROR_STATUS_CODE); if (errorStatus != null) { // only use super method ...
class class_name[name] begin[{] method[doGet, return_type[void], modifier[public], parameter[req, res]] begin[{] local_variable[type[Integer], errorStatus] if[binary_operation[member[.errorStatus], !=, literal[null]]] begin[{] if[binary_operation[call[OpenCmsCore...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[doGet] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[HttpServletResponse] identifier[res] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] { identifier[Integer] identifier...
private static String getDefaultPersistentFieldClassName() { try { PersistenceBrokerConfiguration config = (PersistenceBrokerConfiguration) OjbConfigurator.getInstance().getConfigurationFor( null); Class clazz = config....
class class_name[name] begin[{] method[getDefaultPersistentFieldClassName, return_type[type[String]], modifier[private static], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(...
Keyword[private] Keyword[static] identifier[String] identifier[getDefaultPersistentFieldClassName] operator[SEP] operator[SEP] { Keyword[try] { identifier[PersistenceBrokerConfiguration] identifier[config] operator[=] operator[SEP] identifier[PersistenceBrokerConfiguration] operator[SEP] identifier[Oj...
@SuppressWarnings("unchecked") @Override public final void enforce(String subjectId, String action, String api, String pid, String namespace, Context context) thr...
class class_name[name] begin[{] method[enforce, return_type[void], modifier[final public], parameter[subjectId, action, api, pid, namespace, context]] begin[{] local_variable[type[boolean], debug] local_variable[type[long], enforceStartTime] TryStatement(block=[SynchronizedStatement(blo...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[enforce] operator[SEP] identifier[String] identifier[subjectId] , identifier[String] identifier[action] , identifier[String] identifier[api]...
public static boolean checkSelector(SlingHttpServletRequest request, String key) { String[] selectors = request.getRequestPathInfo().getSelectors(); for (String selector : selectors) { if (selector.equals(key)) { return true; } } return false; ...
class class_name[name] begin[{] method[checkSelector, return_type[type[boolean]], modifier[public static], parameter[request, key]] begin[{] local_variable[type[String], selectors] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberR...
Keyword[public] Keyword[static] Keyword[boolean] identifier[checkSelector] operator[SEP] identifier[SlingHttpServletRequest] identifier[request] , identifier[String] identifier[key] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[selectors] operator[=] identifier[request] operator[SEP]...
public static void unJar(File jarFile, File toDir) throws IOException { JarFile jar = new JarFile(jarFile); try { Enumeration entries = jar.entries(); while (entries.hasMoreElements()) { JarEntry entry = (JarEntry)entries.nextElement(); if (!entry.isDirectory()) { InputStre...
class class_name[name] begin[{] method[unJar, return_type[void], modifier[public static], parameter[jarFile, toDir]] begin[{] local_variable[type[JarFile], jar] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocati...
Keyword[public] Keyword[static] Keyword[void] identifier[unJar] operator[SEP] identifier[File] identifier[jarFile] , identifier[File] identifier[toDir] operator[SEP] Keyword[throws] identifier[IOException] { identifier[JarFile] identifier[jar] operator[=] Keyword[new] identifier[JarFile] operator[SEP] identifie...
public void encode(DataItem dataItem) throws CborException { if (dataItem == null) { dataItem = SimpleValue.NULL; } if (dataItem.hasTag()) { Tag tagDi = dataItem.getTag(); tagEncoder.encode(tagDi); } switch (dataItem.getMajorType()) { ...
class class_name[name] begin[{] method[encode, return_type[void], modifier[public], parameter[dataItem]] begin[{] if[binary_operation[member[.dataItem], ==, literal[null]]] begin[{] assign[member[.dataItem], member[SimpleValue.NULL]] else begin[{] None en...
Keyword[public] Keyword[void] identifier[encode] operator[SEP] identifier[DataItem] identifier[dataItem] operator[SEP] Keyword[throws] identifier[CborException] { Keyword[if] operator[SEP] identifier[dataItem] operator[==] Other[null] operator[SEP] { identifier[dataItem] operator[=] identifier[SimpleV...
public String renderShortName(String shortName) { Assert.notNull(shortName, "No short name specified"); StringBuffer sb = new StringBuffer(shortName.length() + 5); char[] chars = shortName.toCharArray(); sb.append(Character.toUpperCase(chars[0])); for (int i = 1; i < chars.length; i++) { char c = chars[i];...
class class_name[name] begin[{] method[renderShortName, return_type[type[String]], modifier[public], parameter[shortName]] begin[{] call[Assert.notNull, parameter[member[.shortName], literal["No short name specified"]]] local_variable[type[StringBuffer], sb] local_variable[type[...
Keyword[public] identifier[String] identifier[renderShortName] operator[SEP] identifier[String] identifier[shortName] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[shortName] , literal[String] operator[SEP] operator[SEP] identifier[StringBuffer] identifier[sb] ope...
public static byte searchMin(byte[] byteArray) { if(byteArray.length == 0) { throw new IllegalArgumentException("The array you provided does not have any elements"); } byte min = byteArray[0]; for(int i = 1; i < byteArray.length; i++) { if(byteArray[i] < min) { ...
class class_name[name] begin[{] method[searchMin, return_type[type[byte]], modifier[public static], parameter[byteArray]] begin[{] if[binary_operation[member[byteArray.length], ==, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], ...
Keyword[public] Keyword[static] Keyword[byte] identifier[searchMin] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[byteArray] operator[SEP] { Keyword[if] operator[SEP] identifier[byteArray] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[throw] Keywor...
protected File getHomeDir() { // check JNDI for the home directory first String varName = getApplicationName().toUpperCase() + "_HOME"; try { InitialContext iniCtxt = new InitialContext(); Context env = (Context) iniCtxt.lookup("java:comp/env"); String value =...
class class_name[name] begin[{] method[getHomeDir, return_type[type[File]], modifier[protected], parameter[]] begin[{] local_variable[type[String], varName] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(argum...
Keyword[protected] identifier[File] identifier[getHomeDir] operator[SEP] operator[SEP] { identifier[String] identifier[varName] operator[=] identifier[getApplicationName] operator[SEP] operator[SEP] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] Keywor...
public static String hashToString(byte[] hash) { StringBuilder buf = new StringBuilder(); for (byte b : hash) { buf.append(HEX_CHARS[(b >> 4) & 0xF]); buf.append(HEX_CHARS[b & 0xF]); } return buf.toString(); }
class class_name[name] begin[{] method[hashToString, return_type[type[String]], modifier[public static], parameter[hash]] begin[{] local_variable[type[StringBuilder], buf] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberR...
Keyword[public] Keyword[static] identifier[String] identifier[hashToString] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[hash] operator[SEP] { identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] ...
public static MapProxy create(Map<?, ?> map) { return (map instanceof MapProxy) ? (MapProxy) map : new MapProxy(map); }
class class_name[name] begin[{] method[create, return_type[type[MapProxy]], modifier[public static], parameter[map]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceT...
Keyword[public] Keyword[static] identifier[MapProxy] identifier[create] operator[SEP] identifier[Map] operator[<] operator[?] , operator[?] operator[>] identifier[map] operator[SEP] { Keyword[return] operator[SEP] identifier[map] Keyword[instanceof] identifier[MapProxy] operator[SEP] operator[?] operator[SEP] i...